diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-08 17:18:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-09 10:08:45 +0100 |
commit | 862fd2fa19b64972247bde9b171ec828a30e1676 (patch) | |
tree | 9520a81e54e69864b427d7367fa790e9e6c3543e /sd | |
parent | 2befe5c56c29fec45c898c00773e906d2d2d9f19 (diff) |
defer getting toplevel for color picker until we need it
Change-Id: I60f4ded47f7d80b397647ea3344e83a5dfd1b11e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112183
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/BulletAndPositionDlg.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/copydlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 6 |
4 files changed, 9 insertions, 8 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 16df53997094..b202ddbfc931 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -201,7 +201,7 @@ private: SdColorPropertyBox::SdColorPropertyBox(weld::Label* pLabel, weld::Container* pParent, weld::Window* pTopLevel, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl) : SdPropertySubControl(pParent) , maModifyLink(rModifyHdl) - , mxControl(new ColorListBox(mxBuilder->weld_menu_button("color"), pTopLevel)) + , mxControl(new ColorListBox(mxBuilder->weld_menu_button("color"), [pTopLevel]{ return pTopLevel; })) { mxControl->SetSelectHdl(LINK(this, SdColorPropertyBox, OnSelect)); mxControl->set_help_id(HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX); @@ -913,7 +913,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar , mxFTAfterEffect(mxBuilder->weld_label("aeffect_label")) , mxLBAfterEffect(mxBuilder->weld_combo_box("aeffect_list")) , mxFTDimColor(mxBuilder->weld_label("dim_color_label")) - , mxCLBDimColor(new ColorListBox(mxBuilder->weld_menu_button("dim_color_list"), pDialog)) + , mxCLBDimColor(new ColorListBox(mxBuilder->weld_menu_button("dim_color_list"), [pDialog]{ return pDialog; })) , mxFTTextAnim(mxBuilder->weld_label("text_animation_label")) , mxLBTextAnim(mxBuilder->weld_combo_box("text_animation_list")) , mxMFTextDelay(mxBuilder->weld_metric_spin_button("text_delay", FieldUnit::PERCENT)) diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx index b5a41054b3b1..9523e711a911 100644 --- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx +++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx @@ -95,7 +95,8 @@ SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf , m_xSuffixED(m_xBuilder->weld_entry("suffix")) , m_xBeforeAfter(m_xBuilder->weld_frame("beforeafter")) , m_xBulColorFT(m_xBuilder->weld_label("colorft")) - , m_xBulColLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), pWindow)) + , m_xBulColLB(new ColorListBox(m_xBuilder->weld_menu_button("color"), + [this] { return m_xDialog.get(); })) , m_xBulRelSizeFT(m_xBuilder->weld_label("relsizeft")) , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button("relsize", FieldUnit::PERCENT)) , m_xStartFT(m_xBuilder->weld_label("startatft")) diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 89eb7992ea73..7dd290bdb9e7 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -51,8 +51,8 @@ CopyDlg::CopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* , m_xMtrFldHeight(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM)) , m_xFtEndColor(m_xBuilder->weld_label("endlabel")) , m_xBtnSetDefault(m_xBuilder->weld_button("default")) - , m_xLbStartColor(new ColorListBox(m_xBuilder->weld_menu_button("start"), pWindow)) - , m_xLbEndColor(new ColorListBox(m_xBuilder->weld_menu_button("end"), pWindow)) + , m_xLbStartColor(new ColorListBox(m_xBuilder->weld_menu_button("start"), [this]{ return m_xDialog.get(); } )) + , m_xLbEndColor(new ColorListBox(m_xBuilder->weld_menu_button("end"), [this]{ return m_xDialog.get(); } )) { m_xLbStartColor->SetSelectHdl( LINK( this, CopyDlg, SelectColorHdl ) ); m_xBtnSetViewData->connect_clicked( LINK( this, CopyDlg, SetViewData ) ); diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index f4896c00aecd..8a41a1adeac2 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -98,10 +98,10 @@ SlideBackground::SlideBackground( mxMasterSlide(m_xBuilder->weld_combo_box("masterslide")), mxBackgroundLabel(m_xBuilder->weld_label("label3")), mxFillStyle(m_xBuilder->weld_combo_box("fillstyle")), - mxFillLB(new ColorListBox(m_xBuilder->weld_menu_button("fillattr"), GetFrameWeld())), + mxFillLB(new ColorListBox(m_xBuilder->weld_menu_button("fillattr"), [this]{ return GetFrameWeld(); })), mxFillAttr(m_xBuilder->weld_combo_box("fillattr1")), - mxFillGrad1(new ColorListBox(m_xBuilder->weld_menu_button("fillattr2"), GetFrameWeld())), - mxFillGrad2(new ColorListBox(m_xBuilder->weld_menu_button("fillattr3"), GetFrameWeld())), + mxFillGrad1(new ColorListBox(m_xBuilder->weld_menu_button("fillattr2"), [this]{ return GetFrameWeld(); })), + mxFillGrad2(new ColorListBox(m_xBuilder->weld_menu_button("fillattr3"), [this]{ return GetFrameWeld(); })), mxInsertImage(m_xBuilder->weld_button("button2")), mxDspMasterBackground(m_xBuilder->weld_check_button("displaymasterbackground")), mxDspMasterObjects(m_xBuilder->weld_check_button("displaymasterobjects")), |