From cb16c0615a79235f74d3675549f39a1851157a06 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: 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. --- sw/source/ui/dbui/mailmergewizard.cxx | 2 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 4 ++-- sw/source/ui/dbui/mmaddressblockpage.hxx | 2 +- sw/source/ui/dbui/mmdocselectpage.cxx | 8 ++++---- sw/source/ui/dbui/mmdocselectpage.hxx | 2 +- sw/source/ui/dbui/mmgreetingspage.cxx | 2 +- sw/source/ui/dbui/mmgreetingspage.hxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 4 ++-- sw/source/ui/dbui/mmlayoutpage.hxx | 2 +- sw/source/ui/dbui/mmpreparemergepage.cxx | 4 ++-- sw/source/ui/dbui/mmpreparemergepage.hxx | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 54cf6edac512..365c56b4c0ea 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap() //#i97436# if a document has to be loaded then enable output type page only m_bDocumentLoad = false; bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) || - static_cast(pCurPage)->commitPage( eValidate ); + static_cast(pCurPage)->commitPage( ::svt::WizardTypes::eValidate ); for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage) { diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index b2d8c790c25d..a35b0727c1ed 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage() /*-- 27.05.2004 13:59:15--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { - if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) + if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) return sal_False; return sal_True; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index b47b71f1a561..eddaca225e9b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; public: diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 698e12f44882..e125b4f8ed2e 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) /*-- 06.04.2004 12:52:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { sal_Bool bReturn = sal_False; - bool bNext = _eReason == eTravelForward; - if(bNext || _eReason == eValidate ) + bool bNext = _eReason == ::svt::WizardTypes::eTravelForward; + if(bNext || _eReason == ::svt::WizardTypes::eValidate ) { ::rtl::OUString sReloadDocument; bReturn = m_aCurrentDocRB.IsChecked() || @@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) ((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )|| ((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())|| (m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength()); - if( _eReason == eValidate ) + if( _eReason == ::svt::WizardTypes::eValidate ) m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked()); if(bNext && !m_aCurrentDocRB.IsChecked()) diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 2785846b39e8..6483025f88ed 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage DECL_LINK(DocSelectHdl, RadioButton*); DECL_LINK(FileSelectHdl, PushButton*); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index c7613055d6ab..7281880c593d 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage() /*-- 11.05.2004 14:47:10--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason ) +sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 1756f78a29d8..3e237d797e2f 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, virtual void UpdatePreview(); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent); ~SwMailMergeGreetingsPage(); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 366eb23e9352..d9ae7b9c518f 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage() /*-- 11.05.2004 10:41:26--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { //now insert the frame and the greeting SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason) + if(::svt::WizardTypes::eTravelForward == _eReason) { long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP))); long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP))); diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 0a4569c71437..b7dd9dfab2e6 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample); virtual void ActivatePage(); - virtual sal_Bool commitPage(CommitPageReason _eReason); + virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason); public: SwMailMergeLayoutPage( SwMailMergeWizard* _pParent); ~SwMailMergeLayoutPage(); diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index a8650c4b37c9..8539f037ecdc 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage() /*-- 13.05.2004 15:38:32--------------------------------------------------- merge the data into a new file -----------------------------------------------------------------------*/ -sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason && !rConfigItem.IsMergeDone()) + if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone()) { m_pWizard->CreateTargetDocument(); m_pWizard->SetRestartPage(MM_MERGEPAGE); diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx index 90298711dd88..8fb7ad938996 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hxx +++ b/sw/source/ui/dbui/mmpreparemergepage.hxx @@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage DECL_LINK(MoveHdl_Impl, void*); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent); -- cgit v1.2.3