diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-05-07 19:21:04 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-05-11 23:00:28 +0200 |
commit | a0e45956ce90401be01918f4712ae187beccf248 (patch) | |
tree | 422d88bc6138f7eeecf64be01b9e5663a4da697f /svx | |
parent | 893a5249b934f92f072b89b9b558c9de593aa557 (diff) |
fixed clear Direct Formatting button to sidebar in impress
Change-Id: I81cd30b3ce7087122c260dca99e86a3c857447b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93813
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.hxx | 2 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebartextpanel.ui | 25 |
3 files changed, 33 insertions, 0 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 6c3b20cedef6..642f41800718 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -57,6 +57,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref , mxToolBoxBackgroundColorDispatch(new ToolbarUnoDispatcher(*mxToolBoxBackgroundColor, *m_xBuilder, rxFrame)) , mxResetBar(m_xBuilder->weld_toolbar("resetattr")) , mxResetBarDispatch(new ToolbarUnoDispatcher(*mxResetBar, *m_xBuilder, rxFrame)) + , mxDefaultBar(m_xBuilder->weld_toolbar("defaultattr")) + , mxDefaultBarDispatch(new ToolbarUnoDispatcher(*mxDefaultBar, *m_xBuilder, rxFrame)) , mxPositionBar(m_xBuilder->weld_toolbar("position")) , mxPositionBarDispatch(new ToolbarUnoDispatcher(*mxPositionBar, *m_xBuilder, rxFrame)) , mxSpacingBar(m_xBuilder->weld_toolbar("spacingbar")) @@ -78,6 +80,7 @@ TextPropertyPanel::~TextPropertyPanel() void TextPropertyPanel::dispose() { mxResetBarDispatch.reset(); + mxDefaultBarDispatch.reset(); mxPositionBarDispatch.reset(); mxSpacingBarDispatch.reset(); mxToolBoxFontColorSwDispatch.reset(); @@ -89,6 +92,7 @@ void TextPropertyPanel::dispose() mxFontDispatch.reset(); mxResetBar.reset(); + mxDefaultBar.reset(); mxPositionBar.reset(); mxSpacingBar.reset(); mxToolBoxFontColorSw.reset(); @@ -140,6 +144,8 @@ void TextPropertyPanel::HandleContextChange ( mxToolBoxFontColor->set_visible(!bWriterText); mxToolBoxFontColorSw->set_visible(bWriterText); mxToolBoxBackgroundColor->set_visible(bDrawText); + mxResetBar->set_visible(bWriterText); + mxDefaultBar->set_visible(bDrawText); } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index baea3468f9de..437596145584 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -62,6 +62,8 @@ private: std::unique_ptr<ToolbarUnoDispatcher> mxToolBoxBackgroundColorDispatch; std::unique_ptr<weld::Toolbar> mxResetBar; std::unique_ptr<ToolbarUnoDispatcher> mxResetBarDispatch; + std::unique_ptr<weld::Toolbar> mxDefaultBar; + std::unique_ptr<ToolbarUnoDispatcher> mxDefaultBarDispatch; std::unique_ptr<weld::Toolbar> mxPositionBar; std::unique_ptr<ToolbarUnoDispatcher> mxPositionBarDispatch; std::unique_ptr<weld::Toolbar> mxSpacingBar; diff --git a/svx/uiconfig/ui/sidebartextpanel.ui b/svx/uiconfig/ui/sidebartextpanel.ui index 14584cdc63d1..943cf41b1165 100644 --- a/svx/uiconfig/ui/sidebartextpanel.ui +++ b/svx/uiconfig/ui/sidebartextpanel.ui @@ -338,6 +338,31 @@ </packing> </child> <child> + <object class="GtkToolbar" id="defaultattr"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <property name="icon_size">2</property> + <child> + <object class="GtkToolButton" id=".uno:SetDefault"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> <object class="GtkToolbar" id="position"> <property name="visible">True</property> <property name="can_focus">True</property> |