diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-05-11 19:43:37 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-05-11 23:00:49 +0200 |
commit | 4118610df8a78b00e5369bad1d9ce21cf1fbafeb (patch) | |
tree | ffe7d3bb2af8aa173abd237ca8438c1456955418 /svx/source | |
parent | a0e45956ce90401be01918f4712ae187beccf248 (diff) |
added clear Direct Formatting button in calc sidebar
Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93969
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 642f41800718..89292ea03bc1 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -116,6 +116,7 @@ void TextPropertyPanel::HandleContextChange ( bool bWriterText = false; bool bDrawText = false; + bool bCalcText = false; switch (maContext.GetCombinedContext_DI()) { @@ -137,6 +138,14 @@ void TextPropertyPanel::HandleContextChange ( bWriterText = true; break; + case CombinedEnumContext(Application::Calc, Context::Text): + case CombinedEnumContext(Application::Calc, Context::Table): + case CombinedEnumContext(Application::Calc, Context::Cell): + case CombinedEnumContext(Application::Calc, Context::EditCell): + case CombinedEnumContext(Application::Calc, Context::Grid): + bCalcText = true; + break; + default: break; } @@ -144,7 +153,7 @@ void TextPropertyPanel::HandleContextChange ( mxToolBoxFontColor->set_visible(!bWriterText); mxToolBoxFontColorSw->set_visible(bWriterText); mxToolBoxBackgroundColor->set_visible(bDrawText); - mxResetBar->set_visible(bWriterText); + mxResetBar->set_visible(bWriterText || bCalcText); mxDefaultBar->set_visible(bDrawText); } |