summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-22 09:15:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-08-23 16:28:12 +0200
commit693d9ff29e7838bafcad5faa7a4e7355807c54cb (patch)
treedc343d9002fb6dd0abda2875fbff233f6111eda9 /sw
parent61f75f05adb171064d9ba17b4684069de36fa11a (diff)
weld SwMailMergeWizard
Change-Id: I03a7fd1f7676792387155db986d710a001887c8d Reviewed-on: https://gerrit.libreoffice.org/77977 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx62
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx9
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx4
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx9
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx3
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx1
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx8
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx3
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx19
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx10
-rw-r--r--sw/source/uibase/inc/mailmergewizard.hxx12
-rw-r--r--sw/uiconfig/swriter/ui/mmaddressblockpage.ui91
-rw-r--r--sw/uiconfig/swriter/ui/mmoutputtypepage.ui12
-rw-r--r--sw/uiconfig/swriter/ui/mmsalutationpage.ui4
16 files changed, 87 insertions, 164 deletions
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 6ca8822cbfc3..f7b6362ddbf0 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -38,27 +38,27 @@
using namespace svt;
using namespace ::com::sun::star;
-SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> const & rItem) :
- RoadmapWizard(&rView.GetViewFrame()->GetWindow()),
- m_pSwView(&rView),
- m_bDocumentLoad( false ),
- m_xConfigItem(rItem),
- m_sStarting( SwResId( ST_STARTING )),
- m_sDocumentType( SwResId( ST_DOCUMENTTYPE )),
- m_sAddressBlock( SwResId( ST_ADDRESSBLOCK )),
- m_sAddressList( SwResId( ST_ADDRESSLIST )),
- m_sGreetingsLine( SwResId( ST_GREETINGSLINE )),
- m_sLayout( SwResId( ST_LAYOUT )),
- m_nRestartPage( MM_DOCUMENTSELECTPAGE )
+SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> const & rItem)
+ : RoadmapWizardMachine(rView.GetFrameWeld())
+ , m_pSwView(&rView)
+ , m_bDocumentLoad(false)
+ , m_xConfigItem(rItem)
+ , m_sStarting(SwResId(ST_STARTING))
+ , m_sDocumentType(SwResId(ST_DOCUMENTTYPE))
+ , m_sAddressBlock(SwResId(ST_ADDRESSBLOCK))
+ , m_sAddressList(SwResId(ST_ADDRESSLIST))
+ , m_sGreetingsLine(SwResId(ST_GREETINGSLINE))
+ , m_sLayout(SwResId(ST_LAYOUT))
+ , m_nRestartPage(MM_DOCUMENTSELECTPAGE)
{
defaultButton(WizardButtonFlags::NEXT);
enableButtons(WizardButtonFlags::FINISH, false);
- setTitleBase(SwResId( ST_MMWTITLE ) );
+ setTitleBase(SwResId(ST_MMWTITLE));
- m_pFinish->SetText(SwResId( ST_FINISH ));
- m_pNextPage->SetHelpId(HID_MM_NEXT_PAGE);
- m_pPrevPage->SetHelpId(HID_MM_PREV_PAGE);
+ m_xFinish->set_label(SwResId( ST_FINISH ));
+ m_xNextPage->set_help_id(HID_MM_NEXT_PAGE);
+ m_xPrevPage->set_help_id(HID_MM_PREV_PAGE);
//#i51949# no output type page visible if e-Mail is not supported
if (m_xConfigItem->IsMailAvailable())
@@ -80,6 +80,7 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeC
);
ActivatePage();
+ m_xAssistant->set_current_page(0);
UpdateRoadmap();
}
@@ -89,11 +90,16 @@ SwMailMergeWizard::~SwMailMergeWizard()
VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState)
{
+ OString sIdent(OString::number(_nState));
+ weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
+ // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent
+ TabPageParent aParent(pPageContainer, this);
+
VclPtr<vcl::OWizardPage> pRet;
switch(_nState)
{
case MM_DOCUMENTSELECTPAGE :
- pRet = VclPtr<SwMailMergeDocSelectPage>::Create(this, TabPageParent(this));
+ pRet = VclPtr<SwMailMergeDocSelectPage>::Create(this, aParent);
/* tdf#52986 Set help ID using SetRoadmapHelpId for all pages
so that when by default the focus is on the left side pane of
@@ -102,29 +108,33 @@ VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState)
SetRoadmapHelpId("modules/swriter/ui/mmselectpage/MMSelectPage");
break;
case MM_OUTPUTTYPETPAGE :
- pRet = VclPtr<SwMailMergeOutputTypePage>::Create(this, TabPageParent(this));
+ pRet = VclPtr<SwMailMergeOutputTypePage>::Create(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmoutputtypepage/MMOutputTypePage");
break;
case MM_ADDRESSBLOCKPAGE :
- pRet = VclPtr<SwMailMergeAddressBlockPage>::Create(this, TabPageParent(this));
+ pRet = VclPtr<SwMailMergeAddressBlockPage>::Create(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmaddressblockpage/MMAddressBlockPage");
break;
case MM_GREETINGSPAGE :
- pRet = VclPtr<SwMailMergeGreetingsPage>::Create(this, TabPageParent(this));
+ pRet = VclPtr<SwMailMergeGreetingsPage>::Create(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmsalutationpage/MMSalutationPage");
break;
case MM_LAYOUTPAGE :
- pRet = VclPtr<SwMailMergeLayoutPage>::Create(this, TabPageParent(this));
+ pRet = VclPtr<SwMailMergeLayoutPage>::Create(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmlayoutpage/MMLayoutPage");
break;
}
+
+ m_xAssistant->set_page_title(sIdent, getStateDisplayName(_nState));
+
+
OSL_ENSURE(pRet, "no page created in ::createPage");
return pRet;
}
void SwMailMergeWizard::enterState( WizardState _nState )
{
- ::vcl::RoadmapWizard::enterState( _nState );
+ ::vcl::RoadmapWizardMachine::enterState( _nState );
if (m_xConfigItem->GetTargetView())
{
@@ -132,7 +142,7 @@ void SwMailMergeWizard::enterState( WizardState _nState )
m_nRestartPage = _nState;
//set ResultSet back to start
m_xConfigItem->MoveResultSet(1);
- EndDialog(RET_REMOVE_TARGET);
+ m_xAssistant->response(RET_REMOVE_TARGET);
return;
}
bool bEnablePrev = true;
@@ -188,7 +198,7 @@ void SwMailMergeWizard::UpdateRoadmap()
*/
// enableState( <page id>, false );
- const sal_uInt16 nCurPage = GetCurLevel();
+ const sal_uInt16 nCurPage = m_xAssistant->get_current_page();
TabPage* pCurPage = GetPage( nCurPage );
if(!pCurPage)
return;
@@ -224,6 +234,8 @@ void SwMailMergeWizard::UpdateRoadmap()
break;
case MM_ADDRESSBLOCKPAGE:
bEnable = !m_bDocumentLoad && bEnableOutputTypePage;
+ // update page title for email vs letter
+ m_xAssistant->set_page_title(OString::number(MM_ADDRESSBLOCKPAGE), getStateDisplayName(MM_ADDRESSBLOCKPAGE));
break;
case MM_GREETINGSPAGE:
bEnable = !m_bDocumentLoad && bEnableOutputTypePage &&
@@ -240,7 +252,7 @@ void SwMailMergeWizard::UpdateRoadmap()
}
}
-short SwMailMergeWizard::Execute()
+short SwMailMergeWizard::run()
{
OSL_FAIL("SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
"It creates a thread (MailDispatcher instance) that will call"
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index b95d4344a402..51d00b0b53da 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -73,7 +73,7 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz
, m_xDocumentIndexFI(m_xBuilder->weld_label("documentindex"))
, m_xPrevSetIB(m_xBuilder->weld_button("prev"))
, m_xNextSetIB(m_xBuilder->weld_button("next"))
- , m_xDifferentlist(m_xBuilder->weld_label("differentlist"))
+ , m_xDifferentlist(m_xBuilder->weld_button("differentlist"))
, m_xSettings(new SwAddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin")))
, m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin")))
, m_xSettingsWIN(new weld::CustomWeld(*m_xBuilder, "settingspreview", *m_xSettings))
@@ -111,7 +111,6 @@ void SwMailMergeAddressBlockPage::dispose()
m_xPreview.reset();
m_xSettings.reset();
- m_pWizard.clear();
vcl::OWizardPage::dispose();
}
@@ -210,7 +209,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AssignHdl_Impl, weld::Button&, void
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
const sal_uInt16 nSel = m_xSettings->GetSelectedAddress();
const uno::Sequence< OUString> aBlocks = rConfigItem.GetAddressBlocks();
- SwAssignFieldsDialog aDlg(m_pWizard->GetFrameWeld(), m_pWizard->GetConfigItem(), aBlocks[nSel], true);
+ SwAssignFieldsDialog aDlg(m_pWizard->getDialog(), m_pWizard->GetConfigItem(), aBlocks[nSel], true);
if(RET_OK == aDlg.run())
{
//preview update
@@ -263,7 +262,7 @@ void SwMailMergeAddressBlockPage::InsertDataHdl(weld::Button* pButton)
{
//if no pButton is given, the first set has to be pre-set
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
- m_pWizard->EnterWait();
+ std::unique_ptr<weld::WaitObject> xWaitObj(new weld::WaitObject(m_pWizard->getDialog()));
if(!pButton)
{
rConfig.GetResultSet();
@@ -274,7 +273,7 @@ void SwMailMergeAddressBlockPage::InsertDataHdl(weld::Button* pButton)
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
- m_pWizard->LeaveWait();
+ xWaitObj.reset();
sal_Int32 nPos = rConfig.GetResultSetPosition();
bool bEnable = true;
if(nPos < 1)
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 4d50cfaa4961..910110814740 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -38,7 +38,7 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage
OUString m_sCurrentAddress;
OUString m_sChangeAddress;
- VclPtr<SwMailMergeWizard> m_pWizard;
+ SwMailMergeWizard* m_pWizard;
std::unique_ptr<weld::Button> m_xAddressListPB;
std::unique_ptr<weld::Label> m_xCurrentAddressFI;
@@ -58,7 +58,7 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage
std::unique_ptr<weld::Button> m_xPrevSetIB;
std::unique_ptr<weld::Button> m_xNextSetIB;
- std::unique_ptr<weld::Label> m_xDifferentlist;
+ std::unique_ptr<weld::Button> m_xDifferentlist;
std::unique_ptr<SwAddressPreview> m_xSettings;
std::unique_ptr<SwAddressPreview> m_xPreview;
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index ee22935376e3..d7ef4d37f336 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -88,13 +88,6 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pWizard, T
SwMailMergeDocSelectPage::~SwMailMergeDocSelectPage()
{
- disposeOnce();
-}
-
-void SwMailMergeDocSelectPage::dispose()
-{
- m_pWizard.clear();
- vcl::OWizardPage::dispose();
}
IMPL_LINK_NOARG(SwMailMergeDocSelectPage, DocSelectHdl, weld::ToggleButton&, void)
@@ -194,7 +187,7 @@ bool SwMailMergeDocSelectPage::commitPage( ::vcl::WizardTypes::CommitPageReason
if(!sReloadDocument.isEmpty())
m_pWizard->SetReloadDocument( sReloadDocument );
m_pWizard->SetRestartPage(MM_OUTPUTTYPETPAGE);
- m_pWizard->EndDialog(RET_LOAD_DOC);
+ m_pWizard->response(RET_LOAD_DOC);
}
}
return bReturn;
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 0a7afb45f240..ef35e5c8f2e4 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -29,7 +29,7 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage
OUString m_sLoadFileName;
OUString m_sLoadTemplateName;
- VclPtr<SwMailMergeWizard> m_pWizard;
+ SwMailMergeWizard* m_pWizard;
std::unique_ptr<weld::RadioButton> m_xCurrentDocRB;
std::unique_ptr<weld::RadioButton> m_xNewDocRB;
@@ -48,7 +48,6 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage
public:
SwMailMergeDocSelectPage(SwMailMergeWizard* pWizard, TabPageParent pParent);
virtual ~SwMailMergeDocSelectPage() override;
- virtual void dispose() override;
};
#endif
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index b3e241a9fa82..e3560986a947 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -31,7 +31,7 @@ class SwMailMergeWizard;
class SwGreetingsHandler
{
protected:
- VclPtr<SwMailMergeWizard> m_pWizard;
+ SwMailMergeWizard* m_pWizard;
/// The mail merge state, available even when m_pWizard is nullptr.
SwMailMergeConfigItem& m_rConfigItem;
bool m_bIsTabPage;
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index ef464a8a6648..95a27bf16615 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -159,7 +159,6 @@ SwMailMergeLayoutPage::~SwMailMergeLayoutPage()
void SwMailMergeLayoutPage::dispose()
{
File::remove( m_sExampleURL );
- m_pWizard.clear();
vcl::OWizardPage::dispose();
}
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 6ce46554b993..6e63992f1b65 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -40,7 +40,7 @@ class SwMailMergeLayoutPage : public vcl::OWizardPage
bool m_bIsGreetingInserted;
- VclPtr<SwMailMergeWizard> m_pWizard;
+ SwMailMergeWizard* m_pWizard;
css::uno::Reference< css::beans::XPropertySet > m_xViewProperties;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index c470a9f1a9e0..d74a7a0c85b1 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -62,13 +62,6 @@ SwMailMergeOutputTypePage::SwMailMergeOutputTypePage(SwMailMergeWizard* pWizard,
SwMailMergeOutputTypePage::~SwMailMergeOutputTypePage()
{
- disposeOnce();
-}
-
-void SwMailMergeOutputTypePage::dispose()
-{
- m_pWizard.clear();
- vcl::OWizardPage::dispose();
}
IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl, weld::ToggleButton&, void)
@@ -77,7 +70,6 @@ IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl, weld::ToggleButton&, vo
m_xLetterHint->set_visible(bLetter);
m_xMailHint->set_visible(!bLetter);
m_pWizard->GetConfigItem().SetOutputToLetter(bLetter);
- m_pWizard->updateRoadmapItemLabel( MM_ADDRESSBLOCKPAGE );
m_pWizard->UpdateRoadmap();
}
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx
index 5b2f2ab1c17c..73346dfe8bde 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.hxx
@@ -25,7 +25,7 @@ class SwMailMergeWizard;
class SwMailMergeOutputTypePage : public vcl::OWizardPage
{
- VclPtr<SwMailMergeWizard> m_pWizard;
+ SwMailMergeWizard* m_pWizard;
std::unique_ptr<weld::RadioButton> m_xLetterRB;
std::unique_ptr<weld::RadioButton> m_xMailRB;
@@ -37,7 +37,6 @@ class SwMailMergeOutputTypePage : public vcl::OWizardPage
public:
SwMailMergeOutputTypePage(SwMailMergeWizard* pWizard, TabPageParent pParent);
virtual ~SwMailMergeOutputTypePage() override;
- virtual void dispose() override;
};
#endif
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index b4da2613af55..dbcc97b426fb 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -739,13 +739,6 @@ void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, cons
AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
{
- disposeOnce();
-}
-
-void AbstractMailMergeWizard_Impl::dispose()
-{
- pDlg.disposeAndClear();
- AbstractMailMergeWizard::dispose();
}
bool AbstractMailMergeWizard_Impl::StartExecuteAsync(AsyncContext &rCtx)
@@ -753,27 +746,27 @@ bool AbstractMailMergeWizard_Impl::StartExecuteAsync(AsyncContext &rCtx)
// SwMailMergeWizardExecutor wants to run the lifecycle of this dialog
// so clear mxOwner here and leave it up to SwMailMergeWizardExecutor
rCtx.mxOwner.clear();
- return pDlg->StartExecuteAsync(rCtx);
+ return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
}
short AbstractMailMergeWizard_Impl::Execute()
{
- return pDlg->Execute();
+ return m_xDlg->run();
}
OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const
{
- return pDlg->GetReloadDocument();
+ return m_xDlg->GetReloadDocument();
}
void AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
{
- pDlg->skipUntil(nLevel);
+ m_xDlg->skipUntil(nLevel);
}
sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
{
- return pDlg->GetRestartPage();
+ return m_xDlg->GetRestartPage();
}
VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent)
@@ -1149,7 +1142,7 @@ VclPtr<AbstractMailMergeWizard> SwAbstractDialogFactory_Impl::CreateMailMergeWiz
SwView& rView, std::shared_ptr<SwMailMergeConfigItem>& rConfigItem)
{
#if HAVE_FEATURE_DBCONNECTIVITY
- return VclPtr<AbstractMailMergeWizard_Impl>::Create( VclPtr<SwMailMergeWizard>::Create(rView, rConfigItem));
+ return VclPtr<AbstractMailMergeWizard_Impl>::Create(std::make_unique<SwMailMergeWizard>(rView, rConfigItem));
#else
(void) rView;
(void) rConfigItem;
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index d149f5ce9e5b..656de1e57e3e 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -637,14 +637,14 @@ public:
class SwMailMergeWizard;
class AbstractMailMergeWizard_Impl : public AbstractMailMergeWizard
{
- VclPtr<SwMailMergeWizard> pDlg;
+ std::shared_ptr<SwMailMergeWizard> m_xDlg;
public:
- explicit AbstractMailMergeWizard_Impl( SwMailMergeWizard* p )
- : pDlg(p)
- {}
+ explicit AbstractMailMergeWizard_Impl(std::unique_ptr<SwMailMergeWizard> p)
+ : m_xDlg(std::move(p))
+ {
+ }
virtual ~AbstractMailMergeWizard_Impl() override;
- virtual void dispose() override;
virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
virtual short Execute() override;
diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx
index c6865a280e96..96407c14d2f2 100644
--- a/sw/source/uibase/inc/mailmergewizard.hxx
+++ b/sw/source/uibase/inc/mailmergewizard.hxx
@@ -31,7 +31,7 @@ class SwMailMergeConfigItem;
#define MM_GREETINGSPAGE 3
#define MM_LAYOUTPAGE 4
-class SwMailMergeWizard : public ::vcl::RoadmapWizard
+class SwMailMergeWizard : public ::vcl::RoadmapWizardMachine
{
SwView* const m_pSwView;
OUString sDocumentURL;
@@ -48,14 +48,12 @@ class SwMailMergeWizard : public ::vcl::RoadmapWizard
sal_uInt16 m_nRestartPage;
- using vcl::OWizardMachine::skipUntil;
+ using vcl::WizardMachine::skipUntil;
protected:
virtual VclPtr<TabPage> createPage( WizardState _nState ) override;
virtual void enterState( WizardState _nState ) override;
-// roadmap feature ??
-// virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual OUString getStateDisplayName( WizardState _nState ) const override;
public:
@@ -77,11 +75,9 @@ public:
void SetRestartPage(sal_uInt16 nPage) { m_nRestartPage = nPage;}
bool skipUntil( sal_uInt16 nPage)
- {return ::vcl::RoadmapWizard::skipUntil(WizardState(nPage));}
+ {return ::vcl::RoadmapWizardMachine::skipUntil(WizardState(nPage));}
- using vcl::RoadmapWizard::updateRoadmapItemLabel;
-
- virtual short Execute() override;
+ virtual short run() override;
};
#endif
diff --git a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
index ebecf2aad090..a79532185440 100644
--- a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
+++ b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-previous</property>
+ <property name="stock">gtk-go-back</property>
<property name="icon_size">1</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-next</property>
+ <property name="stock">gtk-go-forward</property>
<property name="icon_size">1</property>
</object>
<object class="GtkBox" id="MMAddressBlockPage">
@@ -68,8 +67,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -83,30 +80,25 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="currentaddress">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="mmaddressblockpage|currentaddress">Current address list: %1</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -120,48 +112,40 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes" context="mmaddressblockpage|label2">Select the address list containing the address data you want to use. This data is needed to create the address block.</property>
<property name="wrap">True</property>
<property name="max_width_chars">56</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="mmaddressblockpage|label3">1.</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes" context="mmaddressblockpage|label3">1.</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -182,8 +166,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -197,48 +179,40 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes" context="mmaddressblockpage|label4">Match the field name used in the mail merge to the column headers in your data source.</property>
<property name="wrap">True</property>
<property name="max_width_chars">56</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="settingsft1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="mmaddressblockpage|settingsft1">3.</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes" context="mmaddressblockpage|settingsft1">3.</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -253,14 +227,13 @@
<object class="GtkLabel" id="settingsft">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="mmaddressblockpage|settingsft">2.</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes" context="mmaddressblockpage|settingsft">2.</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
<property name="height">2</property>
</packing>
</child>
@@ -277,8 +250,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -314,8 +285,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -344,16 +313,12 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -369,8 +334,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -379,16 +342,12 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -438,8 +397,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -458,8 +415,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -473,8 +428,6 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -482,22 +435,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="mmaddressblockpage|documentindex">Document: %1</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -506,8 +455,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -521,48 +468,40 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes" context="mmaddressblockpage|label6">Check if the address data matches correctly.</property>
<property name="wrap">True</property>
<property name="max_width_chars">56</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="settingsft2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="mmaddressblockpage|settingsft2">4.</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes" context="mmaddressblockpage|settingsft2">4.</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
diff --git a/sw/uiconfig/swriter/ui/mmoutputtypepage.ui b/sw/uiconfig/swriter/ui/mmoutputtypepage.ui
index e5b1a366be91..1b70c6211b58 100644
--- a/sw/uiconfig/swriter/ui/mmoutputtypepage.ui
+++ b/sw/uiconfig/swriter/ui/mmoutputtypepage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkBox" id="MMOutputTypePage">
@@ -40,11 +40,12 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes" context="mmoutputtypepage|letterft">Send letters to a group of recipients. The letters can contain an address block and a salutation. The letters can be personalized for each recipient.</property>
<property name="wrap">True</property>
+ <property name="width_chars">72</property>
<property name="max_width_chars">72</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -57,11 +58,12 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes" context="mmoutputtypepage|emailft">Send email messages to a group of recipients. The email messages can contain a salutation. The email messages can be personalized for each recipient.</property>
<property name="wrap">True</property>
+ <property name="width_chars">72</property>
<property name="max_width_chars">72</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/sw/uiconfig/swriter/ui/mmsalutationpage.ui b/sw/uiconfig/swriter/ui/mmsalutationpage.ui
index d2c33bdfd286..46c6ebd53d8a 100644
--- a/sw/uiconfig/swriter/ui/mmsalutationpage.ui
+++ b/sw/uiconfig/swriter/ui/mmsalutationpage.ui
@@ -5,13 +5,13 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-previous</property>
+ <property name="stock">gtk-go-back</property>
<property name="icon_size">1</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-next</property>
+ <property name="stock">gtk-go-forward</property>
<property name="icon_size">1</property>
</object>
<object class="GtkBox" id="MMSalutationPage">