[Libreoffice-commits] core.git: svx/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 11 21:01:29 UTC 2020
svx/source/sidebar/text/TextPropertyPanel.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 4118610df8a78b00e5369bad1d9ce21cf1fbafeb
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Mon May 11 19:43:37 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon May 11 23:00:49 2020 +0200
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 at collabora.com>
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);
}
More information about the Libreoffice-commits
mailing list