summaryrefslogtreecommitdiff
path: root/sw/source/ui/dialog
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-15 09:40:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-16 01:02:40 +0100
commit9bfdd19de3a2bc12bc6331b3357763e47a4bed5c (patch)
tree420d4dbaa039ab0aa3ea9df3fcb15e7e9a56c36a /sw/source/ui/dialog
parentd06f63db476c8b7e28688cd69124809718827aa1 (diff)
weld SwSectionPropertyTabDialog
Change-Id: I1958c4bcbd4e4acc1af1b81abd4dd6955a1a3de6 Reviewed-on: https://gerrit.libreoffice.org/69298 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/dialog')
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index b0e896c4a022..26acfcffae92 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1143,10 +1143,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, Button*, void)
aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
- ScopedVclPtrInstance< SwSectionPropertyTabDialog > aTabDlg(this, aSet, rSh);
- if(RET_OK == aTabDlg->Execute())
+ SwSectionPropertyTabDialog aTabDlg(GetFrameWeld(), aSet, rSh);
+ if (RET_OK == aTabDlg.run())
{
- const SfxItemSet* pOutSet = aTabDlg->GetOutputItemSet();
+ const SfxItemSet* pOutSet = aTabDlg.GetOutputItemSet();
if( pOutSet && pOutSet->Count() )
{
const SfxPoolItem *pColItem, *pBrushItem,
@@ -2123,26 +2123,26 @@ IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, weld::ToggleButton&, rBox, v
}
SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
- vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh)
- : SfxTabDialog(pParent, "FormatSectionDialog",
- "modules/swriter/ui/formatsectiondialog.ui", &rSet)
+ weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh)
+ : SfxTabDialogController(pParent, "modules/swriter/ui/formatsectiondialog.ui",
+ "FormatSectionDialog", &rSet)
, rWrtSh(rSh)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create);
- m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ) );
- m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create);
- m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create);
+ AddTabPage("columns", SwColumnPage::Create, nullptr);
+ AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), nullptr);
+ AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr);
+ AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
bool bWeb = dynamic_cast<SwWebDocShell*>( rSh.GetView().GetDocShell() ) != nullptr ;
if(bWeb)
{
- RemoveTabPage(m_nNotePageId);
- RemoveTabPage(m_nIndentPage);
+ RemoveTabPage("notes");
+ RemoveTabPage("indents");
if( HTML_CFG_NS40 != nHtmlMode && HTML_CFG_WRITER != nHtmlMode)
- RemoveTabPage(m_nColumnPageId);
+ RemoveTabPage("columns");
}
}
@@ -2150,20 +2150,20 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
{
}
-void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+void SwSectionPropertyTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
{
- if (nId == m_nBackPageId)
+ if (rId == "background")
{
- SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR)));
- rPage.PageCreated(aSet);
+ SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
+ aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_SELECTOR)));
+ rPage.PageCreated(aSet);
}
- else if (nId == m_nColumnPageId)
+ else if (rId == "columns")
{
static_cast<SwColumnPage&>(rPage).ShowBalance(true);
static_cast<SwColumnPage&>(rPage).SetInSection(true);
}
- else if (nId == m_nIndentPage)
+ else if (rId == "indents")
static_cast<SwSectionIndentTabPage&>(rPage).SetWrtShell(rWrtSh);
}