summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2020-05-08 23:59:36 +0530
committerAndras Timar <andras.timar@collabora.com>2020-05-27 08:49:55 +0200
commit5bcf8afb26d43d61fd7c89bfc92dfba555af57d2 (patch)
treecd907f84e417c192b58fc31e0809423a20b85f01
parent3530807d113074a825dd6590ef5881b9f568e125 (diff)
added clear Direct Formatting button in calc sidebar
Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94850 Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index e8a69b3f789d..f2b3d9ae492d 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -85,6 +85,7 @@ void TextPropertyPanel::HandleContextChange (
bool bWriterText = false;
bool bDrawText = false;
+ bool bCalcText = false;
switch (maContext.GetCombinedContext_DI())
{
@@ -106,6 +107,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;
}
@@ -113,7 +122,7 @@ void TextPropertyPanel::HandleContextChange (
mpToolBoxFontColor->Show(!bWriterText);
mpToolBoxFontColorSw->Show(bWriterText);
mpToolBoxBackgroundColor->Show(bDrawText);
- mpResetAttr->Show(bWriterText);
+ mpResetAttr->Show(bWriterText || bCalcText);
mpSetDefault->Show(bDrawText);
}