diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-06-02 11:55:40 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-06-03 17:25:53 +0000 |
commit | c0e07bc592b7fe270514ae392eacb6ebde3df879 (patch) | |
tree | 37bfdb135cfa3e836682ba36c5cdfb206f534e81 /svx/source/sidebar/text/TextPropertyPanel.cxx | |
parent | 7695e2eb2e4f62cb09e06512ffc44796dc975fe4 (diff) |
tdf#88276: toolbar|sidebar button for text background colour
Change-Id: I547a562384d30b95b744673feb284ccbcf50a614
Reviewed-on: https://gerrit.libreoffice.org/16030
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Yousuf Philips <philipz85@hotmail.com>
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
Diffstat (limited to 'svx/source/sidebar/text/TextPropertyPanel.cxx')
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 5e4f48a4b293..01661366285f 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -97,8 +97,9 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref get(mpToolBoxFont, "fonteffects"); get(mpToolBoxIncDec, "fontadjust"); get(mpToolBoxSpacing, "spacingbar"); - get(mpToolBoxFontColorSw, "colorbar"); - get(mpToolBoxFontColor, "colorsingle"); + get(mpToolBoxFontColorSw, "colorbar_writer"); + get(mpToolBoxFontColor, "colorbar_others"); + get(mpToolBoxBackgroundColor, "colorbar_background"); //toolbox SetupToolboxItems(); @@ -144,15 +145,20 @@ void TextPropertyPanel::HandleContextChange ( mpToolBoxIncDec->Show(maContext.GetApplication_DI() != sfx2::sidebar::EnumContext::Application_Calc); bool bWriterText = false; + bool bDrawText = false; + bool bNeedTextSpacing = false; + switch (maContext.GetCombinedContext_DI()) { case CombinedEnumContext(Application_Calc, Context_Cell): case CombinedEnumContext(Application_Calc, Context_Pivot): - mpToolBoxSpacing->Disable(); + // bNeedTextSpacing = false; break; case CombinedEnumContext(Application_Calc, Context_EditCell): case CombinedEnumContext(Application_Calc, Context_DrawText): + bNeedTextSpacing = true; + case CombinedEnumContext(Application_WriterVariants, Context_DrawText): case CombinedEnumContext(Application_WriterVariants, Context_Annotation): case CombinedEnumContext(Application_DrawImpress, Context_DrawText): @@ -162,12 +168,13 @@ void TextPropertyPanel::HandleContextChange ( case CombinedEnumContext(Application_DrawImpress, Context_Draw): case CombinedEnumContext(Application_DrawImpress, Context_TextObject): case CombinedEnumContext(Application_DrawImpress, Context_Graphic): - mpToolBoxSpacing->Enable(); + bNeedTextSpacing = true; + bDrawText = true; break; case CombinedEnumContext(Application_WriterVariants, Context_Text): case CombinedEnumContext(Application_WriterVariants, Context_Table): - mpToolBoxSpacing->Enable(); + bNeedTextSpacing = true; bWriterText = true; break; @@ -175,8 +182,10 @@ void TextPropertyPanel::HandleContextChange ( break; } + mpToolBoxSpacing->Enable(bNeedTextSpacing); mpToolBoxFontColor->Show(!bWriterText); mpToolBoxFontColorSw->Show(bWriterText); + mpToolBoxBackgroundColor->Show(bDrawText); } void TextPropertyPanel::DataChanged (const DataChangedEvent& /*rEvent*/) |