Kaydet (Commit) 1896a09c authored tarafından Katarina Behrens's avatar Katarina Behrens

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/29813Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 416c5520
......@@ -156,8 +156,6 @@ protected:
css::uno::Reference<css::frame::XFrame> mxFrame;
sfx2::sidebar::SidebarController* mpSidebarController;
DECL_LINK(SelectFillTypeHdl, ListBox&, void );
DECL_LINK(SelectFillAttrHdl, ListBox&, void );
DECL_LINK(ChangeGradientAngle, Edit&, void);
......
......@@ -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<sal_uInt16>(-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)
......
......@@ -101,7 +101,6 @@
</child>
<child>
<object class="svxlo-ColorLB" id="fillgrad1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Fill gradient from.</property>
......@@ -146,7 +145,6 @@
</child>
<child>
<object class="svxlo-ColorLB" id="fillgrad2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Fill gradient to.</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment