svx/source/sidebar/text/TextPropertyPanel.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit c0f1d703b4d1055768fc0bcbf3884c5d3cf71a1c Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri May 8 23:59:36 2020 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun May 10 13:15:59 2020 +0200 added clear Direct Formatting button in calc sidebar Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> 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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits