summaryrefslogtreecommitdiff
path: root/svx
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-10 13:15:59 +0200
commitc0f1d703b4d1055768fc0bcbf3884c5d3cf71a1c (patch)
treee6874cbeb94c6308629afcb6ba73bc33631e510c /svx
parent0bbdfc152f9a3844d0c5f23e82e2c48e2d424ef7 (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>
Diffstat (limited to 'svx')
-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 fce4682eb2e1..9accfcdd0c6a 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -86,6 +86,7 @@ void TextPropertyPanel::HandleContextChange (
bool bWriterText = false;
bool bDrawText = false;
+ bool bCalcText = false;
switch (maContext.GetCombinedContext_DI())
{
@@ -107,6 +108,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;
}
@@ -114,7 +123,7 @@ void TextPropertyPanel::HandleContextChange (
mpToolBoxFontColor->Show(!bWriterText);
mpToolBoxFontColorSw->Show(bWriterText);
mpToolBoxBackgroundColor->Show(bDrawText);
- mpResetAttr->Show(bWriterText);
+ mpResetAttr->Show(bWriterText || bCalcText);
mpSetDefault->Show(bDrawText);
}