From 65438bcda46bab4f2fe6fb555f44aace45e11e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 28 Feb 2019 09:20:40 +0000 Subject: [PATCH] GetDialogController not valid yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I476744d8f351f4ab2afce5974355a066edc8a4a6 Reviewed-on: https://gerrit.libreoffice.org/68489 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/source/inc/cuitabarea.hxx | 2 +- cui/source/tabpages/backgrnd.cxx | 2 +- cui/source/tabpages/tparea.cxx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 98289ab450e6..5344c69e73bf 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -249,7 +249,7 @@ protected: std::unique_ptr m_xBtnBitmap; std::unique_ptr m_xBtnPattern; - void SetOptimalSize(); + void SetOptimalSize(weld::DialogController* pController); private: DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8711e3a3ebc9..3bb47de0799f 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1479,7 +1479,7 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet ) VclPtr SvxBkgTabPage::Create(TabPageParent pWindow, const SfxItemSet* rAttrs) { auto xRet = VclPtr::Create(pWindow, *rAttrs); - xRet->SetOptimalSize(); + xRet->SetOptimalSize(pWindow.pController); return xRet; } diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index ee48acd5f9a8..a311becb2fe1 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -119,9 +119,9 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs SetExchangeSupport(); } -void SvxAreaTabPage::SetOptimalSize() +void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController) { - TabPageParent aFillTab(m_xFillTab.get(), GetDialogController()); + TabPageParent aFillTab(m_xFillTab.get(), pController); // TEMP if (!aFillTab.pController) aFillTab.pParent = GetParentDialog(); @@ -343,7 +343,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) VclPtr SvxAreaTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs) { auto xRet = VclPtr::Create(pParent, *rAttrs); - xRet->SetOptimalSize(); + xRet->SetOptimalSize(pParent.pController); return xRet; }