summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-18 16:18:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-19 09:56:59 +0200
commit525f06ca797e3a5a81864e632f26421a10f43b01 (patch)
treec1ed8f3515731392cc74072152a188bdaafacbe2 /sw/source
parent3430102137a082625957d0669f7ec57834b94022 (diff)
weld SwTitlePageDlg
Change-Id: I16a82709f49ed9e85751afd8c8001705c40a6e6d Reviewed-on: https://gerrit.libreoffice.org/56049 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/misc/titlepage.cxx148
-rw-r--r--sw/source/uibase/inc/titlepage.hxx55
-rw-r--r--sw/source/uibase/shells/basesh.cxx16
5 files changed, 94 insertions, 132 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index b623c5d81a87..ae69d4b54f04 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -949,10 +949,9 @@ VclPtr<AbstractInsFootNoteDlg> SwAbstractDialogFactory_Impl::CreateInsFootNoteDl
return VclPtr<AbstractInsFootNoteDlg_Impl>::Create(new SwInsFootNoteDlg(pParent, rSh, bEd));
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( vcl::Window *pParent )
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent)
{
- VclPtr<Dialog> pDlg = VclPtr<SwTitlePageDlg>::Create( pParent );
- return VclPtr<VclAbstractDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractGenericDialog_Impl>::Create(new SwTitlePageDlg(pParent));
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 60b7072bf4a1..a06afd8175b6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -622,7 +622,7 @@ public:
SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) override;
virtual VclPtr<AbstractInsFootNoteDlg> CreateInsFootNoteDlg(
weld::Window * pParent, SwWrtShell &rSh, bool bEd = false) override;
- virtual VclPtr<VclAbstractDialog> CreateTitlePageDlg ( vcl::Window * pParent ) override;
+ virtual VclPtr<VclAbstractDialog> CreateTitlePageDlg(weld::Window* pParent) override;
virtual VclPtr<VclAbstractDialog> CreateVclSwViewDialog(SwView& rView) override;
virtual VclPtr<AbstractInsTableDlg> CreateInsTableDlg(SwView& rView) override;
virtual VclPtr<AbstractJavaEditDialog> CreateJavaEditDialog(weld::Window* pParent,
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 4d21a57850fa..36034678463b 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -130,45 +130,44 @@ namespace
*/
void SwTitlePageDlg::FillList()
{
- sal_uInt16 nTitlePages = m_pPageCountNF->GetValue();
- m_pPagePropertiesLB->Clear();
+ sal_uInt16 nTitlePages = m_xPageCountNF->get_value();
+ m_xPagePropertiesLB->clear();
if (mpTitleDesc)
- m_pPagePropertiesLB->InsertEntry(mpTitleDesc->GetName());
+ m_xPagePropertiesLB->append_text(mpTitleDesc->GetName());
if (nTitlePages > 1 && mpIndexDesc)
- m_pPagePropertiesLB->InsertEntry(mpIndexDesc->GetName());
+ m_xPagePropertiesLB->append_text(mpIndexDesc->GetName());
if (mpNormalDesc)
- m_pPagePropertiesLB->InsertEntry(mpNormalDesc->GetName());
- m_pPagePropertiesLB->SelectEntryPos(0);
+ m_xPagePropertiesLB->append_text(mpNormalDesc->GetName());
+ m_xPagePropertiesLB->set_active(0);
}
sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
{
sal_uInt16 nPage = 1;
- if (m_pPageStartNF->IsEnabled())
- nPage = m_pPageStartNF->GetValue();
+ if (m_xPageStartNF->get_sensitive())
+ nPage = m_xPageStartNF->get_value();
return nPage;
}
-SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
- SfxModalDialog( pParent, "DLG_TITLEPAGE", "modules/swriter/ui/titlepage.ui"),
- mpPageFormatDesc(nullptr)
+SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent)
+ : GenericDialogController(pParent, "modules/swriter/ui/titlepage.ui", "DLG_TITLEPAGE")
+ , mpPageFormatDesc(nullptr)
+ , m_xUseExistingPagesRB(m_xBuilder->weld_radio_button("RB_USE_EXISTING_PAGES"))
+ , m_xPageCountNF(m_xBuilder->weld_spin_button("NF_PAGE_COUNT"))
+ , m_xDocumentStartRB(m_xBuilder->weld_radio_button("RB_DOCUMENT_START"))
+ , m_xPageStartRB(m_xBuilder->weld_radio_button("RB_PAGE_START"))
+ , m_xPageStartNF(m_xBuilder->weld_spin_button("NF_PAGE_START"))
+ , m_xRestartNumberingCB(m_xBuilder->weld_check_button("CB_RESTART_NUMBERING"))
+ , m_xRestartNumberingNF(m_xBuilder->weld_spin_button("NF_RESTART_NUMBERING"))
+ , m_xSetPageNumberCB(m_xBuilder->weld_check_button("CB_SET_PAGE_NUMBER"))
+ , m_xSetPageNumberNF(m_xBuilder->weld_spin_button("NF_SET_PAGE_NUMBER"))
+ , m_xPagePropertiesLB(m_xBuilder->weld_combo_box_text("LB_PAGE_PROPERTIES"))
+ , m_xPagePropertiesPB(m_xBuilder->weld_button("PB_PAGE_PROPERTIES"))
+ , m_xOkPB(m_xBuilder->weld_button("ok"))
{
- get(m_pUseExistingPagesRB, "RB_USE_EXISTING_PAGES");
- get(m_pPageCountNF, "NF_PAGE_COUNT");
- get(m_pDocumentStartRB, "RB_DOCUMENT_START");
- get(m_pPageStartRB, "RB_PAGE_START");
- get(m_pPageStartNF, "NF_PAGE_START");
- get(m_pRestartNumberingCB, "CB_RESTART_NUMBERING");
- get(m_pRestartNumberingNF, "NF_RESTART_NUMBERING");
- get(m_pSetPageNumberCB, "CB_SET_PAGE_NUMBER");
- get(m_pSetPageNumberNF, "NF_SET_PAGE_NUMBER");
- get(m_pPagePropertiesLB, "LB_PAGE_PROPERTIES");
- get(m_pPagePropertiesPB, "PB_PAGE_PROPERTIES");
- get(m_pOkPB, "ok");
-
- m_pOkPB->SetClickHdl(LINK(this, SwTitlePageDlg, OKHdl));
- m_pRestartNumberingCB->SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
- m_pSetPageNumberCB->SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
+ m_xOkPB->connect_clicked(LINK(this, SwTitlePageDlg, OKHdl));
+ m_xRestartNumberingCB->connect_toggled(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
+ m_xSetPageNumberCB->connect_toggled(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
sal_uInt16 nSetPage = 1;
sal_uInt16 nResetPage = 1;
@@ -207,92 +206,67 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
}
lcl_PopCursor(mpSh);
- m_pUseExistingPagesRB->Check();
- m_pPageCountNF->SetValue(nTitlePages);
- m_pPageCountNF->SetUpHdl(LINK(this, SwTitlePageDlg, UpHdl));
- m_pPageCountNF->SetDownHdl(LINK(this, SwTitlePageDlg, DownHdl));
+ m_xUseExistingPagesRB->set_active(true);
+ m_xPageCountNF->set_value(nTitlePages);
+ m_xPageCountNF->connect_value_changed(LINK(this, SwTitlePageDlg, ValueChangeHdl));
- m_pDocumentStartRB->Check();
- m_pPageStartNF->Enable(false);
- m_pPageStartNF->SetValue(lcl_GetCurrentPage(mpSh));
- Link<Button*,void> aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
- m_pDocumentStartRB->SetClickHdl(aStartPageHdl);
- m_pPageStartRB->SetClickHdl(aStartPageHdl);
+ m_xDocumentStartRB->set_active(true);
+ m_xPageStartNF->set_sensitive(false);
+ m_xPageStartNF->set_value(lcl_GetCurrentPage(mpSh));
+ Link<weld::ToggleButton&,void> aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
+ m_xDocumentStartRB->connect_toggled(aStartPageHdl);
+ m_xPageStartRB->connect_toggled(aStartPageHdl);
if (bMaybeResetNumbering && nResetPage > 0)
{
- m_pRestartNumberingCB->Check();
- m_pRestartNumberingNF->SetValue(nResetPage);
+ m_xRestartNumberingCB->set_active(true);
+ m_xRestartNumberingNF->set_value(nResetPage);
}
- m_pRestartNumberingNF->Enable(m_pRestartNumberingCB->IsChecked());
+ m_xRestartNumberingNF->set_sensitive(m_xRestartNumberingCB->get_active());
- m_pSetPageNumberNF->SetValue(nSetPage);
+ m_xSetPageNumberNF->set_value(nSetPage);
if (nSetPage > 1)
- m_pSetPageNumberCB->Check();
- m_pSetPageNumberNF->Enable(m_pSetPageNumberCB->IsChecked());
+ m_xSetPageNumberCB->set_active(true);
+ m_xSetPageNumberNF->set_sensitive(m_xSetPageNumberCB->get_active());
FillList();
- m_pPagePropertiesPB->SetClickHdl(LINK(this, SwTitlePageDlg, EditHdl));
+ m_xPagePropertiesPB->connect_clicked(LINK(this, SwTitlePageDlg, EditHdl));
}
-IMPL_LINK_NOARG(SwTitlePageDlg, UpHdl, SpinField&, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, ValueChangeHdl, weld::SpinButton&, void)
{
- if (m_pPageCountNF->GetValue() == 2)
+ if (m_xPageCountNF->get_value() == 1 || m_xPageCountNF->get_value() == 2)
FillList();
}
-IMPL_LINK_NOARG(SwTitlePageDlg, DownHdl, SpinField&, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, RestartNumberingHdl, weld::ToggleButton&, void)
{
- if (m_pPageCountNF->GetValue() == 1)
- FillList();
-}
-
-IMPL_LINK_NOARG(SwTitlePageDlg, RestartNumberingHdl, Button*, void)
-{
- m_pRestartNumberingNF->Enable(m_pRestartNumberingCB->IsChecked());
+ m_xRestartNumberingNF->set_sensitive(m_xRestartNumberingCB->get_active());
}
-IMPL_LINK_NOARG(SwTitlePageDlg, SetPageNumberHdl, Button*, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, SetPageNumberHdl, weld::ToggleButton&, void)
{
- m_pSetPageNumberNF->Enable(m_pSetPageNumberCB->IsChecked());
+ m_xSetPageNumberNF->set_sensitive(m_xSetPageNumberCB->get_active());
}
-IMPL_LINK_NOARG(SwTitlePageDlg, StartPageHdl, Button*, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, StartPageHdl, weld::ToggleButton&, void)
{
- m_pPageStartNF->Enable(m_pPageStartRB->IsChecked());
+ m_xPageStartNF->set_sensitive(m_xPageStartRB->get_active());
}
SwTitlePageDlg::~SwTitlePageDlg()
{
- disposeOnce();
-}
-
-void SwTitlePageDlg::dispose()
-{
delete mpPageFormatDesc;
- m_pUseExistingPagesRB.clear();
- m_pPageCountNF.clear();
- m_pDocumentStartRB.clear();
- m_pPageStartRB.clear();
- m_pPageStartNF.clear();
- m_pRestartNumberingCB.clear();
- m_pRestartNumberingNF.clear();
- m_pSetPageNumberCB.clear();
- m_pSetPageNumberNF.clear();
- m_pPagePropertiesLB.clear();
- m_pPagePropertiesPB.clear();
- m_pOkPB.clear();
- SfxModalDialog::dispose();
}
-IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl, Button*, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl, weld::Button&, void)
{
SwView& rView = mpSh->GetView();
- rView.GetDocShell()->FormatPage(m_pPagePropertiesLB->GetSelectedEntry(), "page", *mpSh);
+ rView.GetDocShell()->FormatPage(m_xPagePropertiesLB->get_active_text(), "page", *mpSh);
rView.InvalidateRulerPos();
}
-IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl, Button*, void)
+IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl, weld::Button&, void)
{
lcl_PushCursor(mpSh);
@@ -300,13 +274,13 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl, Button*, void)
SwFormatPageDesc aTitleDesc(mpTitleDesc);
- if (m_pSetPageNumberCB->IsChecked())
- aTitleDesc.SetNumOffset(m_pSetPageNumberNF->GetValue());
+ if (m_xSetPageNumberCB->get_active())
+ aTitleDesc.SetNumOffset(m_xSetPageNumberNF->get_value());
else if (mpPageFormatDesc)
aTitleDesc.SetNumOffset(mpPageFormatDesc->GetNumOffset());
- sal_uInt16 nNoPages = m_pPageCountNF->GetValue();
- if (!m_pUseExistingPagesRB->IsChecked())
+ sal_uInt16 nNoPages = m_xPageCountNF->get_value();
+ if (!m_xUseExistingPagesRB->get_active())
{
mpSh->GotoPage(GetInsertPosition(), false);
for (sal_uInt16 nI=0; nI < nNoPages; ++nI)
@@ -329,9 +303,9 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl, Button*, void)
mpSh->SetAttrItem(aPageFormatDesc);
}
- if (m_pRestartNumberingCB->IsChecked() || nNoPages > 1)
+ if (m_xRestartNumberingCB->get_active() || nNoPages > 1)
{
- sal_uInt16 nPgNo = m_pRestartNumberingCB->IsChecked() ? m_pRestartNumberingNF->GetValue() : 0;
+ sal_uInt16 nPgNo = m_xRestartNumberingCB->get_active() ? m_xRestartNumberingNF->get_value() : 0;
const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : nullptr;
mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
lcl_ChangePage(mpSh, nPgNo, pNewDesc);
@@ -339,9 +313,9 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl, Button*, void)
mpSh->EndUndo();
lcl_PopCursor(mpSh);
- if (!m_pUseExistingPagesRB->IsChecked())
+ if (!m_xUseExistingPagesRB->get_active())
mpSh->GotoPage(GetInsertPosition(), false);
- EndDialog( RET_OK );
+ m_xDialog->response(RET_OK);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx
index 18bd3d93f161..836d1d7dc0c5 100644
--- a/sw/source/uibase/inc/titlepage.hxx
+++ b/sw/source/uibase/inc/titlepage.hxx
@@ -10,37 +10,15 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_TITLEPAGE_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_TITLEPAGE_HXX
-#include <sfx2/basedlgs.hxx>
-#include <vcl/button.hxx>
-#include <vcl/field.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/lstbox.hxx>
-#include "numberingtypelistbox.hxx"
+#include <vcl/weld.hxx>
namespace vcl { class Window; }
class SwWrtShell;
class SwPageDesc;
-class SwTitlePageDlg : public SfxModalDialog
+class SwTitlePageDlg : public weld::GenericDialogController
{
private:
- VclPtr<RadioButton> m_pUseExistingPagesRB;
- VclPtr<NumericField> m_pPageCountNF;
-
- VclPtr<RadioButton> m_pDocumentStartRB;
- VclPtr<RadioButton> m_pPageStartRB;
- VclPtr<NumericField> m_pPageStartNF;
-
- VclPtr<CheckBox> m_pRestartNumberingCB;
- VclPtr<NumericField> m_pRestartNumberingNF;
- VclPtr<CheckBox> m_pSetPageNumberCB;
- VclPtr<NumericField> m_pSetPageNumberNF;
-
- VclPtr<ListBox> m_pPagePropertiesLB;
- VclPtr<PushButton> m_pPagePropertiesPB;
-
- VclPtr<OKButton> m_pOkPB;
-
SwWrtShell *mpSh;
const SwFormatPageDesc *mpPageFormatDesc;
@@ -49,21 +27,32 @@ private:
const SwPageDesc *mpIndexDesc;
const SwPageDesc *mpNormalDesc;
+ std::unique_ptr<weld::RadioButton> m_xUseExistingPagesRB;
+ std::unique_ptr<weld::SpinButton> m_xPageCountNF;
+ std::unique_ptr<weld::RadioButton> m_xDocumentStartRB;
+ std::unique_ptr<weld::RadioButton> m_xPageStartRB;
+ std::unique_ptr<weld::SpinButton> m_xPageStartNF;
+ std::unique_ptr<weld::CheckButton> m_xRestartNumberingCB;
+ std::unique_ptr<weld::SpinButton> m_xRestartNumberingNF;
+ std::unique_ptr<weld::CheckButton> m_xSetPageNumberCB;
+ std::unique_ptr<weld::SpinButton> m_xSetPageNumberNF;
+ std::unique_ptr<weld::ComboBoxText> m_xPagePropertiesLB;
+ std::unique_ptr<weld::Button> m_xPagePropertiesPB;
+ std::unique_ptr<weld::Button> m_xOkPB;
+
void FillList();
sal_uInt16 GetInsertPosition() const;
- DECL_LINK(OKHdl, Button*, void);
- DECL_LINK(EditHdl, Button*, void);
- DECL_LINK(RestartNumberingHdl, Button*, void);
- DECL_LINK(SetPageNumberHdl, Button*, void);
- DECL_LINK(UpHdl, SpinField&, void);
- DECL_LINK(DownHdl, SpinField&, void);
- DECL_LINK(StartPageHdl, Button*, void);
+ DECL_LINK(OKHdl, weld::Button&, void);
+ DECL_LINK(EditHdl, weld::Button&, void);
+ DECL_LINK(RestartNumberingHdl, weld::ToggleButton&, void);
+ DECL_LINK(SetPageNumberHdl, weld::ToggleButton&, void);
+ DECL_LINK(ValueChangeHdl, weld::SpinButton&, void);
+ DECL_LINK(StartPageHdl, weld::ToggleButton&, void);
public:
- SwTitlePageDlg( vcl::Window *pParent );
+ SwTitlePageDlg(weld::Window *pParent);
virtual ~SwTitlePageDlg() override;
- virtual void dispose() override;
};
#endif
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 4a1d27e29692..42198e713b1f 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2400,7 +2400,7 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
void SwBaseShell::ExecDlg(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- vcl::Window *pMDI = &GetView().GetViewFrame()->GetWindow();
+ vcl::Window& rMDI = GetView().GetViewFrame()->GetWindow();
// So that from the basic no dialogues for the background views are called:
bool bBackground = (&GetView() != GetActiveView());
const SfxPoolItem* pItem = nullptr;
@@ -2417,7 +2417,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
case FN_FORMAT_TITLEPAGE_DLG:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTitlePageDlg( pMDI ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateTitlePageDlg(rMDI.GetFrameWeld()));
pDlg->Execute();
}
break;
@@ -2467,7 +2467,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
rSh.GetTabBorders( aSet );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::TABLE ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::TABLE ));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
@@ -2481,7 +2481,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::FRAME ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::FRAME ));
if ( pDlg->Execute() == RET_OK )
{
aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
@@ -2496,7 +2496,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
::PrepareBoxInfo( aSet, rSh );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::PARA ));
+ pDlg.disposeAndReset(pFact->CreateSwBorderDlg( &rMDI, aSet, SwBorderModes::PARA ));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetAttrSet( *pDlg->GetOutputItemSet() );
@@ -2524,7 +2524,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
// Get background attributes of the table and put it in the set
SvxBrushItem aBrush(RES_BACKGROUND);
rSh.GetBoxBackground( aBrush );
- pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
+ pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(&rMDI, aSet));
aSet.Put( aBrush );
if ( pDlg->Execute() == RET_OK )
{
@@ -2538,7 +2538,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
rSh.GetFlyFrameAttr( aSet );
- pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
+ pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(&rMDI, aSet));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetFlyFrameAttr(const_cast<SfxItemSet &>(*pDlg->GetOutputItemSet()) );
@@ -2550,7 +2550,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
// Set border attributes Umrandungsattribute with the shell quite normal.
rSh.GetCurAttr( aSet );
- pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet));
+ pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(&rMDI, aSet));
if ( pDlg->Execute() == RET_OK )
{
rSh.SetAttrSet( *pDlg->GetOutputItemSet() );