summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-06-18 13:09:52 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-06-18 13:09:52 +0200
commit8360fcb0987c67c6d3b07c2d603b0632d369b3ec (patch)
tree2109310194c4d42bc6ee533c0e66939baabf659f /dbaccess/source/ui/dlg
parent122bcfa60b2e840ba2cd9264ce403fe8dfd0f7a4 (diff)
parent8c9b11794acc7edb27b603949abdeadf56f08743 (diff)
cws tl79: merge with DEV300_m83
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx2
-rwxr-xr-xdbaccess/source/ui/dlg/DbAdminImpl.cxx5
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx10
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx8
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx3
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx10
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx1
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx62
11 files changed, 66 insertions, 45 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 4561371ae..632ffa2f6 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -289,7 +289,7 @@ namespace dbaui
callModifiedHdl();
}
// -----------------------------------------------------------------------
- sal_Bool OConnectionTabPageSetup::commitPage( CommitPageReason /*_eReason*/ )
+ sal_Bool OConnectionTabPageSetup::commitPage( ::svt::WizardTypes::CommitPageReason /*_eReason*/ )
{
return commitURL();
}
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 874c4dc61..487015ade 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -89,7 +89,7 @@ namespace dbaui
virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index a2f37eb24..816d3d5e9 100755
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -31,6 +31,11 @@
#include "DbAdminImpl.hxx"
#include "dsmeta.hxx"
+#include <svl/poolitem.hxx>
+#include <svl/itempool.hxx>
+#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
#include "DriverSettings.hxx"
#include "IItemSetHelper.hxx"
#include "UITools.hxx"
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index f884f1450..de8488116 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -32,6 +32,9 @@
#include "dbadmin.hrc"
#include "dbadmin.hxx"
#include "dbu_dlg.hrc"
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include "dbustrings.hrc"
#include "dsitems.hxx"
#include "dsselect.hxx"
@@ -201,11 +204,16 @@ namespace dbaui
Reset(*m_pItemSetHelper->getOutputSet());
}
// -----------------------------------------------------------------------
- sal_Bool OGenericAdministrationPage::commitPage( CommitPageReason )
+ sal_Bool OGenericAdministrationPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
return sal_True;
}
// -----------------------------------------------------------------------
+ bool OGenericAdministrationPage::canAdvance() const
+ {
+ return true;
+ }
+ // -----------------------------------------------------------------------
void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue )
{
if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) )
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 716deabe6..4b38685ac 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -113,7 +113,8 @@ namespace dbaui
//=========================================================================
class IDatabaseSettingsDialog;
class IItemSetHelper;
- class OGenericAdministrationPage : public SfxTabPage, public svt::IWizardPage
+ class OGenericAdministrationPage :public SfxTabPage
+ ,public ::svt::IWizardPageController
{
private:
Link m_aModifiedHandler; /// to be called if something on the page has been modified
@@ -165,9 +166,10 @@ namespace dbaui
*/
sal_Bool getSelectedDataSource(::rtl::OUString& _sReturn,::rtl::OUString& _sCurr);
- // svt::IWizardPage
+ // svt::IWizardPageController
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
+ virtual bool canAdvance() const;
void SetRoadmapStateValue( sal_Bool _bDoEnable ) { m_abEnableRoadmap = _bDoEnable; }
bool GetRoadmapStateValue() const { return m_abEnableRoadmap; }
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index fd3bd38f4..481ee3981 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -35,6 +35,9 @@
#include "dbadmin.hrc"
#include "dbadmin.hxx"
#include "dbu_dlg.hrc"
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include "dbustrings.hrc"
#include "dsitems.hxx"
#include "dsnItem.hxx"
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 31c71ed5f..53e3f928d 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -405,16 +405,16 @@ sal_Bool ODbTypeWizDialog::saveDatasource()
return sal_True;
}
// -----------------------------------------------------------------------------
-IWizardPage* ODbTypeWizDialog::getWizardPage(TabPage* _pCurrentPage) const
+IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const
{
OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage);
return pPage;
}
// -----------------------------------------------------------------------------
-sal_Bool ODbTypeWizDialog::onFinish(sal_Int32 _nResult)
+sal_Bool ODbTypeWizDialog::onFinish()
{
saveDatasource();
- return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish(_nResult) : sal_False;
+ return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish() : sal_False;
}
//.........................................................................
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 8aa20d6ad..b43f6b7ab 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -789,7 +789,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPage*, /*_pGe
IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPage*, /*_pGeneralPage*/)
{
if ( prepareLeaveCurrentState( eFinish ) )
- onFinish( RET_OK );
+ onFinish();
return 0L;
}
@@ -1078,7 +1078,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
}
// -----------------------------------------------------------------------------
- IWizardPage* ODbTypeWizDialogSetup::getWizardPage(TabPage* _pCurrentPage) const
+ IWizardPageController* ODbTypeWizDialogSetup::getPageController( TabPage* _pCurrentPage ) const
{
OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage);
return pPage;
@@ -1206,7 +1206,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
}
// -----------------------------------------------------------------------------
- sal_Bool ODbTypeWizDialogSetup::onFinish(sal_Int32 _nResult)
+ sal_Bool ODbTypeWizDialogSetup::onFinish()
{
if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting )
{
@@ -1214,7 +1214,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
// wants us to load could be a non-database document. Instead, we asynchronously
// open the selected document. Thus, the wizard's return value is RET_CANCEL,
// which means to not continue loading the database document
- if ( !OWizardMachine::onFinish( RET_CANCEL ) )
+ if ( !OWizardMachine::Finnish( RET_CANCEL ) )
return sal_False;
Reference< XComponentLoader > xFrameLoader;
@@ -1237,7 +1237,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
skipUntil(PAGE_DBSETUPWIZARD_FINAL);
}
if (getCurrentState() == PAGE_DBSETUPWIZARD_FINAL)
- return SaveDatabaseDocument() ? OWizardMachine::onFinish( _nResult ) : sal_False;
+ return SaveDatabaseDocument() ? OWizardMachine::onFinish() : sal_False;
else
{
enableButtons( WZB_FINISH, sal_False );
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 1bbc4a91a..f8ae40b61 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -322,6 +322,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
}
else
m_pImpl->m_aTitle.SetText(m_pImpl->m_aName);
+ m_pImpl->m_aTitle.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
m_pImpl->m_aPB_OK.SetPosPixel(Point(m_pImpl->m_aPB_OK.GetPosPixel().X(),aPos.Y()));
m_pImpl->m_aPB_CANCEL.SetPosPixel(Point(m_pImpl->m_aPB_CANCEL.GetPosPixel().X(),aPos.Y()));
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 2dbb5cb10..1938fdab9 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -217,7 +217,7 @@ DBG_NAME(DbaIndexDialog)
,m_aDescription (this, ModuleRes(FT_DESCRIPTION))
,m_aUnique (this, ModuleRes(CB_UNIQUE))
,m_aFieldsLabel (this, ModuleRes(FT_FIELDS))
- ,m_pFields(new IndexFieldsControl (this, ModuleRes(CTR_FIELDS),_nMaxColumnsInIndex))
+ ,m_pFields(new IndexFieldsControl (this, ModuleRes(CTR_FIELDS),_nMaxColumnsInIndex,::dbtools::getBooleanDataSourceSetting( m_xConnection, "AddIndexAppendix" )))
,m_aClose (this, ModuleRes(PB_CLOSE))
,m_aHelp (this, ModuleRes(HB_HELP))
,m_pIndexes(NULL)
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index f802e2d69..e26a99a3f 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -119,12 +119,13 @@ namespace dbaui
//==================================================================
DBG_NAME(IndexFieldsControl)
//------------------------------------------------------------------
- IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex)
+ IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,sal_Bool _bAddIndexAppendix)
:EditBrowseBox(_pParent, _rId, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, BROWSER_STANDARD_FLAGS)
,m_aSeekRow(m_aFields.end())
,m_pSortingCell(NULL)
,m_pFieldNameCell(NULL)
,m_nMaxColumnsInIndex(_nMaxColumnsInIndex)
+ ,m_bAddIndexAppendix(_bAddIndexAppendix)
{
DBG_CTOR(IndexFieldsControl,NULL);
@@ -205,7 +206,7 @@ DBG_NAME(IndexFieldsControl)
RowInserted(GetRowCount(), m_aFields.size(), sal_False);
// insert an additional row for a new field for that index
// if(!m_nMaxColumnsInIndex || GetRowCount() < m_nMaxColumnsInIndex )
- RowInserted(GetRowCount(), 1, sal_False);
+ RowInserted(GetRowCount(), 1, sal_False);
SetUpdateMode(sal_True);
GoToRowColumnId(0, COLUMN_ID_FIELDNAME);
@@ -247,51 +248,52 @@ DBG_NAME(IndexFieldsControl)
{
RemoveColumns();
- m_sAscendingText = String(ModuleRes(STR_ORDER_ASCENDING));
- m_sDescendingText = String(ModuleRes(STR_ORDER_DESCENDING));
-
- // the "sort order" column
- String sColumnName = String(ModuleRes(STR_TAB_INDEX_SORTORDER));
- // the width of the order column is the maximum widths of the texts used
- // (the title of the column)
- sal_Int32 nSortOrderColumnWidth = GetTextWidth(sColumnName);
- // ("ascending" + scrollbar width)
- sal_Int32 nOther = GetTextWidth(m_sAscendingText) + GetSettings().GetStyleSettings().GetScrollBarSize();
- nSortOrderColumnWidth = nSortOrderColumnWidth > nOther ? nSortOrderColumnWidth : nOther;
- // ("descending" + scrollbar width)
- nOther = GetTextWidth(m_sDescendingText) + GetSettings().GetStyleSettings().GetScrollBarSize();
- nSortOrderColumnWidth = nSortOrderColumnWidth > nOther ? nSortOrderColumnWidth : nOther;
- // (plus some additional space)
- nSortOrderColumnWidth += GetTextWidth('0') * 2;
- InsertDataColumn(COLUMN_ID_ORDER, sColumnName, nSortOrderColumnWidth, HIB_STDSTYLE, 1);
-
// for the width: both columns together should be somewhat smaller than the whole window (without the scrollbar)
sal_Int32 nFieldNameWidth = GetSizePixel().Width();
- nFieldNameWidth -= nSortOrderColumnWidth;
+ if ( m_bAddIndexAppendix )
+ {
+ m_sAscendingText = String(ModuleRes(STR_ORDER_ASCENDING));
+ m_sDescendingText = String(ModuleRes(STR_ORDER_DESCENDING));
+
+ // the "sort order" column
+ String sColumnName = String(ModuleRes(STR_TAB_INDEX_SORTORDER));
+ // the width of the order column is the maximum widths of the texts used
+ // (the title of the column)
+ sal_Int32 nSortOrderColumnWidth = GetTextWidth(sColumnName);
+ // ("ascending" + scrollbar width)
+ sal_Int32 nOther = GetTextWidth(m_sAscendingText) + GetSettings().GetStyleSettings().GetScrollBarSize();
+ nSortOrderColumnWidth = nSortOrderColumnWidth > nOther ? nSortOrderColumnWidth : nOther;
+ // ("descending" + scrollbar width)
+ nOther = GetTextWidth(m_sDescendingText) + GetSettings().GetStyleSettings().GetScrollBarSize();
+ nSortOrderColumnWidth = nSortOrderColumnWidth > nOther ? nSortOrderColumnWidth : nOther;
+ // (plus some additional space)
+ nSortOrderColumnWidth += GetTextWidth('0') * 2;
+ InsertDataColumn(COLUMN_ID_ORDER, sColumnName, nSortOrderColumnWidth, HIB_STDSTYLE, 1);
+
+ m_pSortingCell = new ListBoxControl(&GetDataWindow());
+ m_pSortingCell->InsertEntry(m_sAscendingText);
+ m_pSortingCell->InsertEntry(m_sDescendingText);
+ m_pSortingCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_SORTORDER );
+
+ nFieldNameWidth -= nSortOrderColumnWidth;
+ }
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
nFieldNameWidth -= aSystemStyle.GetScrollBarSize();
nFieldNameWidth -= 8;
-
// the "field name" column
- sColumnName = String(ModuleRes(STR_TAB_INDEX_FIELD));
+ String sColumnName = String(ModuleRes(STR_TAB_INDEX_FIELD));
InsertDataColumn(COLUMN_ID_FIELDNAME, sColumnName, nFieldNameWidth, HIB_STDSTYLE, 0);
// create the cell controllers
// for the field name cell
m_pFieldNameCell = new ListBoxControl(&GetDataWindow());
m_pFieldNameCell->InsertEntry(String());
+ m_pFieldNameCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_FIELD );
const ::rtl::OUString* pFields = _rAvailableFields.getConstArray();
const ::rtl::OUString* pFieldsEnd = pFields + _rAvailableFields.getLength();
for (;pFields < pFieldsEnd; ++pFields)
m_pFieldNameCell->InsertEntry(*pFields);
- // for the sort cell
- m_pSortingCell = new ListBoxControl(&GetDataWindow());
- m_pSortingCell->InsertEntry(m_sAscendingText);
- m_pSortingCell->InsertEntry(m_sDescendingText);
-
- m_pFieldNameCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_FIELD );
- m_pSortingCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_SORTORDER );
}
//------------------------------------------------------------------