diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-22 11:36:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:37 +0200 |
commit | aaa1861c49bf2549e1bddc461961871ac102a83d (patch) | |
tree | 5ed83702976b886b25484bdbb2465e03ec2ba19d /sw/source | |
parent | f6d4cd396803f568ca667ed5e4d7725ade99b5df (diff) |
convert WZB_ constants to scoped enum
Change-Id: If2f12ea54b57f32df23fc22fb8be0aa3c6f2e76e
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/dbui/mailmergewizard.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmdocselectpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 16 |
5 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 068b08ffd54f..3a235582c605 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem) : RoadmapWizard(&rView.GetViewFrame()->GetWindow(), - static_cast<sal_uInt32>(WZB_NEXT|WZB_PREVIOUS|WZB_FINISH|WZB_CANCEL|WZB_HELP)), + WizardButtonFlags::NEXT|WizardButtonFlags::PREVIOUS|WizardButtonFlags::FINISH|WizardButtonFlags::CANCEL|WizardButtonFlags::HELP), m_pSwView(&rView), m_bDocumentLoad( false ), m_rConfigItem(rItem), @@ -59,8 +59,8 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rItem m_sFinish( SW_RES( ST_FINISH )), m_nRestartPage( MM_DOCUMENTSELECTPAGE ) { - defaultButton(WZB_NEXT); - enableButtons(WZB_FINISH, false); + defaultButton(WizardButtonFlags::NEXT); + enableButtons(WizardButtonFlags::FINISH, false); m_pFinish->SetText(m_sFinish); m_pNextPage->SetHelpId(HID_MM_NEXT_PAGE); @@ -165,8 +165,8 @@ void SwMailMergeWizard::enterState( WizardState _nState ) bEnableNext = false; break; } - enableButtons( WZB_PREVIOUS, bEnablePrev); - enableButtons( WZB_NEXT, bEnableNext); + enableButtons( WizardButtonFlags::PREVIOUS, bEnablePrev); + enableButtons( WizardButtonFlags::NEXT, bEnableNext); UpdateRoadmap(); } diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 37a06cc86276..3c455092c585 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -176,7 +176,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl) rConfigItem.SetFilter( sFilter ); InsertDataHdl_Impl(0); GetWizard()->UpdateRoadmap(); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); } } catch (const uno::Exception& e) @@ -210,7 +210,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton) } pDlg.reset(); GetWizard()->UpdateRoadmap(); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); return 0; } @@ -226,7 +226,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton) //preview update InsertDataHdl_Impl(0); GetWizard()->UpdateRoadmap(); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); } return 0; } @@ -261,7 +261,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl) m_pWizard->GetConfigItem())); m_pWizard->GetConfigItem().SetCurrentAddressBlockIndex( nSel ); GetWizard()->UpdateRoadmap(); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); return 0; } @@ -310,7 +310,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton m_pPrevSetIB->Enable(bEnable); m_pDocumentIndexFI->SetText(m_sDocument.replaceFirst("%1", OUString::number(nPos))); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); bool bHasResultSet = rConfig.GetResultSet().is(); m_pCurrentAddressFI->Show(bHasResultSet); if(bHasResultSet) diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 50fe45c17446..76035a2f3ef2 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -114,7 +114,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, DocSelectHdl, RadioButton*, pButton) m_pRecentDocLB->Enable(m_pRecentDocRB == pButton); m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); return 0; } @@ -169,7 +169,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) } } m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); return 0; } diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 717b1e1be2a3..171478787c69 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -98,7 +98,7 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl) { m_pWizard->GetConfigItem().SetIndividualGreeting(bIndividual, false); m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } UpdatePreview(); return 0; @@ -118,7 +118,7 @@ IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton) if(m_bIsTabPage) { m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } UpdatePreview(); } @@ -139,7 +139,7 @@ IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton) { UpdatePreview(); m_pWizard->UpdateRoadmap(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } return 0; } @@ -328,7 +328,7 @@ void SwMailMergeGreetingsPage::ActivatePage() m_pFemaleFieldCB->SaveValue(); UpdatePreview(); - m_pWizard->enableButtons(WZB_NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); + m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason ) diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 6c92c26f8b8c..5fc51147d4c5 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -583,7 +583,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) rConfigItem.AddSavedDocument( aURL.GetMainURL(INetURLObject::DECODE_TO_IURI)); pButton->Enable(false); - m_pWizard->enableButtons(WZB_FINISH, true); + m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); pButton->Enable(false); } @@ -739,7 +739,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) ); m_bCancelSaving = false; aSaveMonitor->Show(); - m_pWizard->enableButtons(WZB_CANCEL, false); + m_pWizard->enableButtons(WizardButtonFlags::CANCEL, false); for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc) { @@ -817,8 +817,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) } ::osl::File::remove( sTargetTempURL ); } - m_pWizard->enableButtons(WZB_CANCEL, true); - m_pWizard->enableButtons(WZB_FINISH, true); + m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); + m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); return 0; } @@ -906,7 +906,7 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) SfxObjectShell* pObjSh = pTargetView->GetViewFrame()->GetObjectShell(); SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), pObjSh)); SfxBoolItem aMergeSilent(SID_SILENT, false); - m_pWizard->enableButtons(WZB_CANCEL, false); + m_pWizard->enableButtons(WizardButtonFlags::CANCEL, false); uno::Sequence < beans::PropertyValue > aProps( 2 ); aProps[0]. Name = "MonitorVisible"; @@ -918,8 +918,8 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh)); pTargetView->SetMailMergeConfigItem(0, 0, false); - m_pWizard->enableButtons(WZB_CANCEL, true); - m_pWizard->enableButtons(WZB_FINISH, true); + m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); + m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); return 0; } @@ -1308,7 +1308,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) pDlg->EnableDesctruction(); ::osl::File::remove( sTargetTempURL ); - m_pWizard->enableButtons(WZB_FINISH, true); + m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); //the dialog deletes itself //delete pDlg; return 0; |