Kaydet (Commit) c0e07bc5 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Jan Holesovsky

tdf#88276: toolbar|sidebar button for text background colour

Change-Id: I547a562384d30b95b744673feb284ccbcf50a614
Reviewed-on: https://gerrit.libreoffice.org/16030Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarYousuf Philips <philipz85@hotmail.com>
Reviewed-by: 's avatarPhilippe Jung <phil.jung@free.fr>
Reviewed-by: 's avatarYousuf Philips <philipz85@hotmail.com>
üst 7695e2eb
...@@ -211,7 +211,7 @@ const SfxItemInfo aItemInfos[EDITITEMCOUNT] = { ...@@ -211,7 +211,7 @@ const SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
{ SID_ATTR_CHAR_OVERLINE, SfxItemPoolFlags::POOLABLE }, { SID_ATTR_CHAR_OVERLINE, SfxItemPoolFlags::POOLABLE },
{ SID_ATTR_CHAR_CASEMAP, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_CASEMAP { SID_ATTR_CHAR_CASEMAP, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_CASEMAP
{ SID_ATTR_CHAR_GRABBAG, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_GRABBAG { SID_ATTR_CHAR_GRABBAG, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_GRABBAG
{ 0, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_BKGCOLOR { SID_ATTR_CHAR_BACK_COLOR, SfxItemPoolFlags::POOLABLE }, // EE_CHAR_BKGCOLOR
{ 0, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_TAB { 0, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_TAB
{ 0, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_LINEBR { 0, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_LINEBR
{ SID_ATTR_CHAR_CHARSETCOLOR, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_NOTCONV { SID_ATTR_CHAR_CHARSETCOLOR, SfxItemPoolFlags::POOLABLE }, // EE_FEATURE_NOTCONV
......
...@@ -105,3 +105,7 @@ database/linked_text_table.png cmd/sc_dataimport.png ...@@ -105,3 +105,7 @@ database/linked_text_table.png cmd/sc_dataimport.png
#cmd/lc_undo.png cmd/he/lc_redo.png #cmd/lc_undo.png cmd/he/lc_redo.png
#cmd/sc_redo.png cmd/he/sc_undo.png #cmd/sc_redo.png cmd/he/sc_undo.png
#cmd/sc_undo.png cmd/he/sc_redo.png #cmd/sc_undo.png cmd/he/sc_redo.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png ...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -59,3 +59,6 @@ cmd/sc_formatselection.png sfx2/res/symphony/sidebar-property-small.png ...@@ -59,3 +59,6 @@ cmd/sc_formatselection.png sfx2/res/symphony/sidebar-property-small.png
cmd/lc_view3d.png sfx2/res/symphony/sidebar-3d-large.png cmd/lc_view3d.png sfx2/res/symphony/sidebar-3d-large.png
cmd/sc_view3d.png sfx2/res/symphony/sidebar-3d-small.png cmd/sc_view3d.png sfx2/res/symphony/sidebar-3d-small.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png ...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png ...@@ -4,3 +4,7 @@ cmd/lc_showsinglepage.png cmd/lc_adddirect.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -85,3 +85,6 @@ cmd/sc_insertrowbreak.png cmd/sc_insertpagebreak.png ...@@ -85,3 +85,6 @@ cmd/sc_insertrowbreak.png cmd/sc_insertpagebreak.png
cmd/lc_datafilterautofilter.png cmd/lc_autofilter.png cmd/lc_datafilterautofilter.png cmd/lc_autofilter.png
cmd/sc_datafilterautofilter.png cmd/sc_autofilter.png cmd/sc_datafilterautofilter.png cmd/sc_autofilter.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -543,3 +543,6 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png ...@@ -543,3 +543,6 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
cmd/lc_insertrowbreak.png cmd/lc_insertpagebreak.png cmd/lc_insertrowbreak.png cmd/lc_insertpagebreak.png
cmd/sc_insertrowbreak.png cmd/sc_insertpagebreak.png cmd/sc_insertrowbreak.png cmd/sc_insertpagebreak.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -34,3 +34,7 @@ cmd/lc_spellingandgrammardialog.png cmd/lc_spelldialog.png ...@@ -34,3 +34,7 @@ cmd/lc_spellingandgrammardialog.png cmd/lc_spelldialog.png
# paragraph line spacing # paragraph line spacing
cmd/lc_linespacing.png cmd/lc_spacepara15.png cmd/lc_linespacing.png cmd/lc_spacepara15.png
cmd/sc_linespacing.png cmd/sc_spacepara15.png cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
#define SID_ATTR_CHAR_LATIN_POSTURE ( SID_SVX_START + 997 ) #define SID_ATTR_CHAR_LATIN_POSTURE ( SID_SVX_START + 997 )
#define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_SVX_START + 998 ) #define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_SVX_START + 998 )
#define SID_ATTR_CHAR_GRABBAG ( SID_SVX_START + 1142 ) #define SID_ATTR_CHAR_GRABBAG ( SID_SVX_START + 1142 )
#define SID_ATTR_CHAR_BACK_COLOR ( SID_SVX_START + 1143 )
// these ID didn't exist prior to the svx split, add new ids here // these ID didn't exist prior to the svx split, add new ids here
#define SID_ATTR_CHAR_OVERLINE ( SID_EDIT_START + 68 ) #define SID_ATTR_CHAR_OVERLINE ( SID_EDIT_START + 68 )
...@@ -226,10 +227,11 @@ ...@@ -226,10 +227,11 @@
#define SID_ATTR_CHAR_LATIN_LANGUAGE ( SID_EDIT_START + 92 ) #define SID_ATTR_CHAR_LATIN_LANGUAGE ( SID_EDIT_START + 92 )
#define SID_ATTR_CHAR_LATIN_POSTURE ( SID_EDIT_START + 93 ) #define SID_ATTR_CHAR_LATIN_POSTURE ( SID_EDIT_START + 93 )
#define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_EDIT_START + 94 ) #define SID_ATTR_CHAR_LATIN_WEIGHT ( SID_EDIT_START + 94 )
#define SID_ATTR_CHAR_BACK_COLOR ( SID_EDIT_START + 95 )
*/ */
#if 94 > (SID_EDIT_END-SID_EDIT_START) #if 95 > (SID_EDIT_END-SID_EDIT_START)
#error Resource-Ueberlauf in #line, #file #error Resource-Overflow in #line, #file
#endif #endif
#define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL #define SID_DRAW_TEXT_VERTICAL SID_ATTR_CHAR_VERTICAL
......
...@@ -233,6 +233,7 @@ ...@@ -233,6 +233,7 @@
// Strings of the ToolBox-Controls from tbcontrl.cxx // Strings of the ToolBox-Controls from tbcontrl.cxx
#define RID_SVXSTR_FILLPATTERN (RID_SVX_START + 191) #define RID_SVXSTR_FILLPATTERN (RID_SVX_START + 191)
#define RID_SVXSTR_FRAME (RID_SVX_START + 192) #define RID_SVXSTR_FRAME (RID_SVX_START + 192)
#define RID_SVXSTR_CHAR_BACK_COLOR (RID_SVX_START + 193)
#define RID_SVXSTR_FRAME_COLOR (RID_SVX_START + 194) #define RID_SVXSTR_FRAME_COLOR (RID_SVX_START + 194)
#define RID_SVXSTR_FRAME_STYLE (RID_SVX_START + 195) #define RID_SVXSTR_FRAME_STYLE (RID_SVX_START + 195)
#define RID_SVXSTR_EXTRAS_CHARBACKGROUND (RID_SVX_START + 196) #define RID_SVXSTR_EXTRAS_CHARBACKGROUND (RID_SVX_START + 196)
......
...@@ -2788,6 +2788,14 @@ ...@@ -2788,6 +2788,14 @@
<value>1</value> <value>1</value>
</prop> </prop>
</node> </node>
<node oor:name=".uno:CharBackColor" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Text Background Color</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:BackgroundPatternController" oor:op="replace"> <node oor:name=".uno:BackgroundPatternController" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string"> <prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Background Pattern</value> <value xml:lang="en-US">Background Pattern</value>
......
...@@ -2722,6 +2722,11 @@ interface DrawView ...@@ -2722,6 +2722,11 @@ interface DrawView
ExecMethod = ExecChar ; ExecMethod = ExecChar ;
StateMethod = GetAttrState ; StateMethod = GetAttrState ;
] ]
SID_ATTR_CHAR_BACK_COLOR
[
ExecMethod = ExecChar ;
StateMethod = GetAttrState ;
]
SID_ATTR_CHAR_KERNING SID_ATTR_CHAR_KERNING
[ [
ExecMethod = ExecChar ; ExecMethod = ExecChar ;
......
...@@ -44,6 +44,12 @@ shell TextObjectBar ...@@ -44,6 +44,12 @@ shell TextObjectBar
StateMethod = GetAttrState; StateMethod = GetAttrState;
] ]
SID_ATTR_CHAR_BACK_COLOR // ole : ?, status : ?
[
ExecMethod = Execute;
StateMethod = GetAttrState;
]
SID_ATTR_CHAR_WEIGHT // ole : ?, status : ? SID_ATTR_CHAR_WEIGHT // ole : ?, status : ?
[ [
ExecMethod = Execute; ExecMethod = Execute;
......
...@@ -215,6 +215,7 @@ void SdDLL::RegisterControllers() ...@@ -215,6 +215,7 @@ void SdDLL::RegisterControllers()
SvxStyleToolBoxControl::RegisterControl(0, pMod); SvxStyleToolBoxControl::RegisterControl(0, pMod);
SvxFontNameToolBoxControl::RegisterControl(0, pMod); SvxFontNameToolBoxControl::RegisterControl(0, pMod);
SvxColorToolBoxControl::RegisterControl( SID_ATTR_CHAR_COLOR, pMod ); SvxColorToolBoxControl::RegisterControl( SID_ATTR_CHAR_COLOR, pMod );
SvxColorToolBoxControl::RegisterControl( SID_ATTR_CHAR_BACK_COLOR, pMod );
SvxGrafFilterToolBoxControl::RegisterControl( SID_GRFFILTER, pMod ); SvxGrafFilterToolBoxControl::RegisterControl( SID_GRFFILTER, pMod );
SvxGrafModeToolBoxControl::RegisterControl( SID_ATTR_GRAF_MODE, pMod ); SvxGrafModeToolBoxControl::RegisterControl( SID_ATTR_GRAF_MODE, pMod );
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<toolbar:toolbaritem xlink:href=".uno:Shadowed" toolbar:helpid="10010"/> <toolbar:toolbaritem xlink:href=".uno:Shadowed" toolbar:helpid="10010"/>
<toolbar:toolbaritem xlink:href=".uno:OutlineFont" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:OutlineFont" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/> <toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/>
<toolbar:toolbaritem xlink:href=".uno:CharBackColor" toolbar:style="dropdown"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:helpid="10028"/> <toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:helpid="10028"/>
<toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:helpid="10030"/> <toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:helpid="10030"/>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<toolbar:toolbaritem xlink:href=".uno:Shadowed" toolbar:helpid="10010"/> <toolbar:toolbaritem xlink:href=".uno:Shadowed" toolbar:helpid="10010"/>
<toolbar:toolbaritem xlink:href=".uno:OutlineFont" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:OutlineFont" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/> <toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/>
<toolbar:toolbaritem xlink:href=".uno:CharBackColor" toolbar:style="dropdown"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:helpid="10028"/> <toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:helpid="10028"/>
<toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:helpid="10030"/> <toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:helpid="10030"/>
......
...@@ -2169,6 +2169,31 @@ SvxColorItem Color SID_ATTR_CHAR_COLOR ...@@ -2169,6 +2169,31 @@ SvxColorItem Color SID_ATTR_CHAR_COLOR
GroupId = GID_FORMAT; GroupId = GID_FORMAT;
] ]
SvxBackgroundColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR
[
/* flags: */
AutoUpdate = TRUE,
Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = FALSE,
ReadOnlyDoc = FALSE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
Synchron;
Readonly = FALSE,
/* config: */
AccelConfig = FALSE,
MenuConfig = FALSE,
StatusBarConfig = FALSE,
ToolBoxConfig = TRUE,
GroupId = GID_FORMAT;
]
SfxBoolItem ColorControl SID_COLOR_CONTROL SfxBoolItem ColorControl SID_COLOR_CONTROL
......
...@@ -320,6 +320,7 @@ item INT16 SvxCharReliefItem; ...@@ -320,6 +320,7 @@ item INT16 SvxCharReliefItem;
item BOOL SvxBlinkItem; item BOOL SvxBlinkItem;
item BOOL SvxAutoKernItem; item BOOL SvxAutoKernItem;
item INT32 SvxColorItem; item INT32 SvxColorItem;
item INT32 SvxBackgroundColorItem;
item BOOL SvxContourItem; item BOOL SvxContourItem;
item INT16 SvxFormatBreakItem; // enum item INT16 SvxFormatBreakItem; // enum
item BOOL SvxFormatKeepItem; item BOOL SvxFormatKeepItem;
......
...@@ -97,8 +97,9 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref ...@@ -97,8 +97,9 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
get(mpToolBoxFont, "fonteffects"); get(mpToolBoxFont, "fonteffects");
get(mpToolBoxIncDec, "fontadjust"); get(mpToolBoxIncDec, "fontadjust");
get(mpToolBoxSpacing, "spacingbar"); get(mpToolBoxSpacing, "spacingbar");
get(mpToolBoxFontColorSw, "colorbar"); get(mpToolBoxFontColorSw, "colorbar_writer");
get(mpToolBoxFontColor, "colorsingle"); get(mpToolBoxFontColor, "colorbar_others");
get(mpToolBoxBackgroundColor, "colorbar_background");
//toolbox //toolbox
SetupToolboxItems(); SetupToolboxItems();
...@@ -144,15 +145,20 @@ void TextPropertyPanel::HandleContextChange ( ...@@ -144,15 +145,20 @@ void TextPropertyPanel::HandleContextChange (
mpToolBoxIncDec->Show(maContext.GetApplication_DI() != sfx2::sidebar::EnumContext::Application_Calc); mpToolBoxIncDec->Show(maContext.GetApplication_DI() != sfx2::sidebar::EnumContext::Application_Calc);
bool bWriterText = false; bool bWriterText = false;
bool bDrawText = false;
bool bNeedTextSpacing = false;
switch (maContext.GetCombinedContext_DI()) switch (maContext.GetCombinedContext_DI())
{ {
case CombinedEnumContext(Application_Calc, Context_Cell): case CombinedEnumContext(Application_Calc, Context_Cell):
case CombinedEnumContext(Application_Calc, Context_Pivot): case CombinedEnumContext(Application_Calc, Context_Pivot):
mpToolBoxSpacing->Disable(); // bNeedTextSpacing = false;
break; break;
case CombinedEnumContext(Application_Calc, Context_EditCell): case CombinedEnumContext(Application_Calc, Context_EditCell):
case CombinedEnumContext(Application_Calc, Context_DrawText): case CombinedEnumContext(Application_Calc, Context_DrawText):
bNeedTextSpacing = true;
case CombinedEnumContext(Application_WriterVariants, Context_DrawText): case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
case CombinedEnumContext(Application_WriterVariants, Context_Annotation): case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
case CombinedEnumContext(Application_DrawImpress, Context_DrawText): case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
...@@ -162,12 +168,13 @@ void TextPropertyPanel::HandleContextChange ( ...@@ -162,12 +168,13 @@ void TextPropertyPanel::HandleContextChange (
case CombinedEnumContext(Application_DrawImpress, Context_Draw): case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject): case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic): case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
mpToolBoxSpacing->Enable(); bNeedTextSpacing = true;
bDrawText = true;
break; break;
case CombinedEnumContext(Application_WriterVariants, Context_Text): case CombinedEnumContext(Application_WriterVariants, Context_Text):
case CombinedEnumContext(Application_WriterVariants, Context_Table): case CombinedEnumContext(Application_WriterVariants, Context_Table):
mpToolBoxSpacing->Enable(); bNeedTextSpacing = true;
bWriterText = true; bWriterText = true;
break; break;
...@@ -175,8 +182,10 @@ void TextPropertyPanel::HandleContextChange ( ...@@ -175,8 +182,10 @@ void TextPropertyPanel::HandleContextChange (
break; break;
} }
mpToolBoxSpacing->Enable(bNeedTextSpacing);
mpToolBoxFontColor->Show(!bWriterText); mpToolBoxFontColor->Show(!bWriterText);
mpToolBoxFontColorSw->Show(bWriterText); mpToolBoxFontColorSw->Show(bWriterText);
mpToolBoxBackgroundColor->Show(bDrawText);
} }
void TextPropertyPanel::DataChanged (const DataChangedEvent& /*rEvent*/) void TextPropertyPanel::DataChanged (const DataChangedEvent& /*rEvent*/)
......
...@@ -87,6 +87,7 @@ private: ...@@ -87,6 +87,7 @@ private:
VclPtr<ToolBox> mpToolBoxSpacing; VclPtr<ToolBox> mpToolBoxSpacing;
VclPtr<ToolBox> mpToolBoxFontColorSw; VclPtr<ToolBox> mpToolBoxFontColorSw;
VclPtr<ToolBox> mpToolBoxFontColor; VclPtr<ToolBox> mpToolBoxFontColor;
VclPtr<ToolBox> mpToolBoxBackgroundColor;
//control items //control items
::sfx2::sidebar::ControllerItem maFontSizeControl; ::sfx2::sidebar::ControllerItem maFontSizeControl;
......
...@@ -1436,6 +1436,8 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co ...@@ -1436,6 +1436,8 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
aColor = static_cast<const XLineColorItem*>(pState)->GetColorValue(); aColor = static_cast<const XLineColorItem*>(pState)->GetColorValue();
else if ( pState->ISA( XFillColorItem ) ) else if ( pState->ISA( XFillColorItem ) )
aColor = static_cast<const XFillColorItem*>(pState)->GetColorValue(); aColor = static_cast<const XFillColorItem*>(pState)->GetColorValue();
else if ( pState->ISA( SvxBackgroundColorItem ) )
aColor = static_cast<const SvxBackgroundColorItem*>(pState)->GetValue();
} }
if ( aColor == COL_TRANSPARENT ) if ( aColor == COL_TRANSPARENT )
...@@ -2553,6 +2555,11 @@ SvxColorToolBoxControl::SvxColorToolBoxControl( ...@@ -2553,6 +2555,11 @@ SvxColorToolBoxControl::SvxColorToolBoxControl(
bSidebarType = false; bSidebarType = false;
break; break;
case SID_ATTR_CHAR_BACK_COLOR:
addStatusListener( OUString( ".uno:CharBackColor" ));
mPaletteManager.SetLastColor( COL_YELLOW );
break;
case SID_FRAME_LINECOLOR: case SID_FRAME_LINECOLOR:
addStatusListener( OUString( ".uno:FrameLineColor" )); addStatusListener( OUString( ".uno:FrameLineColor" ));
addStatusListener( OUString( ".uno:BorderTLBR" )); addStatusListener( OUString( ".uno:BorderTLBR" ));
...@@ -2616,6 +2623,10 @@ VclPtr<SfxPopupWindow> SvxColorToolBoxControl::CreatePopupWindow() ...@@ -2616,6 +2623,10 @@ VclPtr<SfxPopupWindow> SvxColorToolBoxControl::CreatePopupWindow()
pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) ); pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) );
break; break;
case SID_ATTR_CHAR_BACK_COLOR :
pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_CHAR_BACK_COLOR ) );
break;
case SID_FRAME_LINECOLOR: case SID_FRAME_LINECOLOR:
pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) ); pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) );
break; break;
...@@ -2714,6 +2725,11 @@ void SvxColorToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/) ...@@ -2714,6 +2725,11 @@ void SvxColorToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/)
aParamName = "BackColor"; aParamName = "BackColor";
break; break;
case SID_ATTR_CHAR_BACK_COLOR :
aCommand = ".uno:CharBackColor";
aParamName = "CharBackColor";
break;
case SID_FRAME_LINECOLOR : case SID_FRAME_LINECOLOR :
aCommand = ".uno:FrameLineColor"; aCommand = ".uno:FrameLineColor";
aParamName = "FrameLineColor"; aParamName = "FrameLineColor";
...@@ -2752,6 +2768,8 @@ void SvxColorToolBoxControl::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod ...@@ -2752,6 +2768,8 @@ void SvxColorToolBoxControl::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod
SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XLineColorItem), nSlotId ) ); SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XLineColorItem), nSlotId ) );
else if ( nSlotId == SID_ATTR_FILL_COLOR ) else if ( nSlotId == SID_ATTR_FILL_COLOR )
SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XFillColorItem), nSlotId ) ); SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XFillColorItem), nSlotId ) );
else if ( nSlotId == SID_ATTR_CHAR_BACK_COLOR )
SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(SvxBackgroundColorItem), nSlotId ) );
else else
SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(SvxColorItem), nSlotId ) ); SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(SvxColorItem), nSlotId ) );
} }
......
...@@ -125,6 +125,11 @@ String RID_SVXSTR_EXTRAS_CHARBACKGROUND ...@@ -125,6 +125,11 @@ String RID_SVXSTR_EXTRAS_CHARBACKGROUND
Text [ en-US ] = "Highlighting" ; Text [ en-US ] = "Highlighting" ;
}; };
String RID_SVXSTR_CHAR_BACK_COLOR
{
Text [ en-US ] = "Text Background Color" ;
};
String RID_SVXSTR_BACKGROUND String RID_SVXSTR_BACKGROUND
{ {
Text [ en-US ] = "Background"; Text [ en-US ] = "Background";
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
<object class="sfxlo-SidebarToolBox" id="colorbar"> <object class="sfxlo-SidebarToolBox" id="colorbar_writer">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="show_arrow">False</property> <property name="show_arrow">False</property>
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="sfxlo-SidebarToolBox" id="colorsingle"> <object class="sfxlo-SidebarToolBox" id="colorbar_others">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
...@@ -279,6 +279,31 @@ ...@@ -279,6 +279,31 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="sfxlo-SidebarToolBox" id="colorbar_background">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuToolButton" id="backgroundcolor">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="action_name">.uno:CharBackColor</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="sfxlo-SidebarToolBox" id="position"> <object class="sfxlo-SidebarToolBox" id="position">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -315,7 +340,7 @@ ...@@ -315,7 +340,7 @@
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property> <property name="pack_type">end</property>
<property name="position">2</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -341,7 +366,7 @@ ...@@ -341,7 +366,7 @@
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="pack_type">end</property> <property name="pack_type">end</property>
<property name="position">3</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
</object> </object>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment