summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-25 10:17:24 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-25 10:17:24 +0200
commit52fe8d4909fbad4955da20708a6c02d677cf3bcc (patch)
tree38469b91d033dc48df9cea17eef9a221c7059584 /extensions/source
parent4cd66ec230ebda5d958cd95c8f5ba977d36befa7 (diff)
unoawt: completely separated the controller functionality of a wizard page from the wizard page itself,
by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally.
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx4
-rw-r--r--extensions/source/abpilot/abpfinalpage.hxx2
-rw-r--r--extensions/source/abpilot/tableselectionpage.cxx2
-rw-r--r--extensions/source/abpilot/tableselectionpage.hxx2
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx2
-rw-r--r--extensions/source/abpilot/typeselectionpage.hxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx4
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx6
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.hxx2
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx20
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx11
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx8
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx6
15 files changed, 39 insertions, 38 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 199264352..6505ae76c 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -141,12 +141,12 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool FinalPage::commitPage( CommitPageReason _eReason )
+ sal_Bool FinalPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
- if ( ( eTravelBackward != _eReason )
+ if ( ( ::svt::WizardTypes::eTravelBackward != _eReason )
&& ( !m_aLocationController.prepareCommit() )
)
return sal_False;
diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx
index 2fb874ba9..27b804c12 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -66,7 +66,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx
index 5e5b27344..eb5eb4304 100644
--- a/extensions/source/abpilot/tableselectionpage.cxx
+++ b/extensions/source/abpilot/tableselectionpage.cxx
@@ -109,7 +109,7 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool TableSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool TableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index cf1894e78..88015777d 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -51,7 +51,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 4e2323aa1..3133e9259 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -207,7 +207,7 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool TypeSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool TypeSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx
index 988e3c2f8..de0707873 100644
--- a/extensions/source/abpilot/typeselectionpage.hxx
+++ b/extensions/source/abpilot/typeselectionpage.hxx
@@ -83,7 +83,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index a8eddc56a..343ec9a5e 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -164,7 +164,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OTableSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OTableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OControlWizardPage::commitPage(_eReason))
return sal_False;
@@ -493,7 +493,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ODBFieldPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ODBFieldPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 9c69fdb59..2680523e8 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -64,7 +64,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
protected:
DECL_LINK( OnListboxSelection, ListBox* );
@@ -131,7 +131,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// own overridables
virtual String& getDBFieldSetting() = 0;
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index d751e998d..502eef04a 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -156,7 +156,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
- WizardState nPos;
+ ::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems, ++nIndex)
{
@@ -172,7 +172,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
- WizardState nPos;
+ ::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems)
{
@@ -254,7 +254,7 @@ namespace dbp
m_pFormDatasource->SetText(sDataSource);
m_pFormTable->SetText(sCommand);
- WizardState nCommandTypeResourceId = 0;
+ ::svt::WizardTypes::WizardState nCommandTypeResourceId = 0;
switch (nCommandType)
{
case CommandType::TABLE:
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 90afc61d9..e3097c2ce 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -362,7 +362,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OGridFieldsSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OGridFieldsSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGridPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index 6be4f08e7..687b45720 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -114,7 +114,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 2656ef71d..026741e35 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -79,7 +79,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- OWizardPage* OGroupBoxWizard::createPage(WizardState _nState)
+ OWizardPage* OGroupBoxWizard::createPage(::svt::WizardTypes::WizardState _nState)
{
switch (_nState)
{
@@ -106,7 +106,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- WizardTypes::WizardState OGroupBoxWizard::determineNextState( WizardState _nCurrentState ) const
+ WizardTypes::WizardState OGroupBoxWizard::determineNextState( ::svt::WizardTypes::WizardState _nCurrentState ) const
{
switch (_nCurrentState)
{
@@ -133,7 +133,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- void OGroupBoxWizard::enterState(WizardState _nState)
+ void OGroupBoxWizard::enterState(::svt::WizardTypes::WizardState _nState)
{
// some stuff to do before calling the base class (modifying our settings)
switch (_nState)
@@ -265,7 +265,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ORadioSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ORadioSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -277,7 +277,7 @@ namespace dbp
rSettings.aValues.clear();
rSettings.aLabels.reserve(m_aExistingRadios.GetEntryCount());
rSettings.aValues.reserve(m_aExistingRadios.GetEntryCount());
- for (WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
+ for (::svt::WizardTypes::WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
{
rSettings.aLabels.push_back(m_aExistingRadios.GetEntry(i));
rSettings.aValues.push_back(String::CreateFromInt32((sal_Int32)(i + 1)));
@@ -393,7 +393,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ODefaultFieldSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ODefaultFieldSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;
@@ -416,7 +416,7 @@ namespace dbp
,m_aValue (this, ModuleRes(ET_OPTIONVALUE))
,m_aOptionsLabel (this, ModuleRes(FT_RADIOBUTTONS))
,m_aOptions (this, ModuleRes(LB_RADIOBUTTONS))
- ,m_nLastSelection((WizardState)-1)
+ ,m_nLastSelection((::svt::WizardTypes::WizardState)-1)
{
FreeResource();
@@ -440,7 +440,7 @@ namespace dbp
//---------------------------------------------------------------------
void OOptionValuesPage::implTraveledOptions()
{
- if ((WizardState)-1 != m_nLastSelection)
+ if ((::svt::WizardTypes::WizardState)-1 != m_nLastSelection)
{
// save the value for the last option
DBG_ASSERT((size_t)m_nLastSelection < m_aUncommittedValues.size(), "OOptionValuesPage::implTraveledOptions: invalid previous selection index!");
@@ -480,7 +480,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OOptionValuesPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OOptionValuesPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -548,7 +548,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OFinalizeGBWPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OFinalizeGBWPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index c1fdf11fa..ec9d54954 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -117,7 +117,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
DECL_LINK( OnMoveEntry, PushButton* );
@@ -145,7 +145,7 @@ namespace dbp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
};
@@ -164,7 +164,8 @@ namespace dbp
ListBox m_aOptions;
StringArray m_aUncommittedValues;
- WizardState m_nLastSelection;
+ ::svt::WizardTypes::WizardState
+ m_nLastSelection;
public:
OOptionValuesPage( OControlWizard* _pParent );
@@ -175,7 +176,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
void implTraveledOptions();
@@ -217,7 +218,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 2c71eca4a..1d375ce3c 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -362,14 +362,14 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OContentTableSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OContentTableSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
OListComboSettings& rSettings = getSettings();
rSettings.sListContentTable = m_aSelectTable.GetSelectEntry();
- if (!rSettings.sListContentTable.Len() && (eTravelBackward != _eReason))
+ if (!rSettings.sListContentTable.Len() && (::svt::WizardTypes::eTravelBackward != _eReason))
// need to select a table
return sal_False;
@@ -440,7 +440,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OContentFieldSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OContentFieldSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
@@ -518,7 +518,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OLinkFieldsPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OLinkFieldsPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index a36c22b1c..ea7299523 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -129,7 +129,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:
@@ -163,7 +163,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};
@@ -190,7 +190,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
private: