summaryrefslogtreecommitdiff
path: root/extensions
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
commitd2b0dc2ee3de5158a1bf130e42bcfd46d997e74b (patch)
tree014d9f27062bb7e202fbd4295ad46091d5ef3b85 /extensions
parenta1441026696609083bafd0034e7aa663da33f91b (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')
-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 d633b597878d..2ffeb0d09739 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 415bc31f2bc1..27d6522d7df6 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 0cefba92ab5a..869c806ea819 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 36bc792fd0e7..d2d878c65d5f 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 adc173f84290..fd83630e81d9 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 18c8d6b9697d..9df17bb1d77f 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 7b58c8de8560..88d8e2eb352e 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 3cbe1ac2b514..a20587b36d72 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 b97eb60504b4..c5d816486ecc 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 6e28567aef62..ec42cf346450 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 d0f255ede729..1ab0d3186440 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 7bf3138bf5fe..f35ed890fde5 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 97a2cd1a3109..cba4895e8664 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 2e810654baa4..63659f613460 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 7dcf32316236..c30a19a77a00 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: