svx/source/sidebar/text/TextPropertyPanel.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit 5bcf8afb26d43d61fd7c89bfc92dfba555af57d2 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri May 8 23:59:36 2020 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Wed May 27 08:49:55 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94850 Tested-by: Andras Timar <andras.ti...@collabora.com> 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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits