From 1896a09cd831904099df5202bb4d22ec0ddbcb0c Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Fri, 14 Oct 2016 11:39:19 +0200 Subject: [PATCH] tdf#100180: Band-aid fix for non-editable chart sidebar no way should sfx2 sidebar controller be used in a base class, it just wreaks havoc in chart which inherits from this class, but uses its own controller. Since those NotifyResize calls were introduced to prevent cropped widgets on switching between different shape fills, try to make up for that with other means in .ui file Change-Id: I5a40e4d413b583b1de1e3f751493d65d41ff8465 Reviewed-on: https://gerrit.libreoffice.org/29813 Tested-by: Jenkins Reviewed-by: Katarina Behrens --- include/svx/sidebar/AreaPropertyPanelBase.hxx | 2 -- svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 14 +------------- svx/uiconfig/ui/sidebararea.ui | 2 -- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index 46ff5a4af928..5a438c6bf0e1 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -156,8 +156,6 @@ protected: css::uno::Reference mxFrame; - sfx2::sidebar::SidebarController* mpSidebarController; - DECL_LINK(SelectFillTypeHdl, ListBox&, void ); DECL_LINK(SelectFillAttrHdl, ListBox&, void ); DECL_LINK(ChangeGradientAngle, Edit&, void); diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 434e3467214d..3de9336d17a7 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -93,8 +93,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( maImgLinear(SVX_RES(IMG_LINEAR)), mpFloatTransparenceItem(), mpTransparanceItem(), - mxFrame(rxFrame), - mpSidebarController() + mxFrame(rxFrame) { get(mpColorTextFT, "filllabel"); get(mpLbFillType, "fillstyle"); @@ -189,8 +188,6 @@ void AreaPropertyPanelBase::Initialize() mpBTNGradient->SetItemImage(nIdGradient,maImgLinear); mpBTNGradient->Hide(); mpBmpImport->SetClickHdl( LINK(this, AreaPropertyPanelBase, ClickImportBitmapHdl)); - mpSidebarController = sfx2::sidebar::SidebarController::GetSidebarControllerForFrame(mxFrame); - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::SetTransparency(sal_uInt16 nVal) @@ -477,8 +474,6 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) { mpLbFillType->Selected(); } - - mpSidebarController->NotifyResize(); } IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillAttrHdl, ListBox&, void) @@ -636,7 +631,6 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl() break; } } - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::ImpUpdateTransparencies() @@ -889,7 +883,6 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, bool bDefault, const mpToolBoxColor->Hide(); meLastXFS = static_cast(-1); mpStyleItem.reset(); - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefault, const XFillGradientItem* pItem) @@ -928,7 +921,6 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefault, co mpLbFillGradTo->SetNoSelection(); } } - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefault, const XFillHatchItem* pItem) @@ -959,7 +951,6 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefault, const mpLbFillAttr->SetNoSelection(); } } - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::updateFillColor(bool bDefault, const XFillColorItem* pItem) @@ -976,7 +967,6 @@ void AreaPropertyPanelBase::updateFillColor(bool bDefault, const XFillColorItem* mpLbFillType->SelectEntryPos(SOLID); Update(); } - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefault, const XFillBitmapItem* pItem) @@ -1009,7 +999,6 @@ void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefault, cons mpLbFillAttr->SetNoSelection(); } } - mpSidebarController->NotifyResize(); } void AreaPropertyPanelBase::NotifyItemUpdate( @@ -1305,7 +1294,6 @@ void AreaPropertyPanelBase::Update() OSL_ENSURE(false, "Non supported FillType (!)"); break; } - mpSidebarController->NotifyResize(); } IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void) diff --git a/svx/uiconfig/ui/sidebararea.ui b/svx/uiconfig/ui/sidebararea.ui index 1e839ab71a0c..e85fe45dfa20 100644 --- a/svx/uiconfig/ui/sidebararea.ui +++ b/svx/uiconfig/ui/sidebararea.ui @@ -101,7 +101,6 @@ - True False True Fill gradient from. @@ -146,7 +145,6 @@ - True False True Fill gradient to.