diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-17 12:15:11 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:15 +0100 |
commit | 946a36ec4377e114ad56fe437b8d8d8f41a7ccdf (patch) | |
tree | 9964ac27ed69060cf19367376c07e914f557cc51 | |
parent | 58a825b4d047c0f99d4f9a193c97af423b23fb97 (diff) |
Related: #i122041# Added 'Automatic' to TextPropertyPanel, FontColor...
and HilightColor. Added 'No Color' to ParagraphPropertyPanel and
BackgroundColor
(cherry picked from commit 6b722f7d7c1ae5a1b344a24442bd591afba8606b)
Conflicts:
svx/inc/svx/dialogs.hrc
Change-Id: If75bdb87a1fc43e753c8c8ab15370808235926fd
-rw-r--r-- | include/svx/dialogs.hrc | 3 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.cxx | 17 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.hrc | 1 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.src | 4 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 21 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.hxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.src | 14 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 30 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.hxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.src | 2 |
10 files changed, 45 insertions, 50 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 08ff470dc2f6..4cfa8c5fc1ce 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -26,7 +26,7 @@ // Resource-Id's ------------------------------------------------------------ // !!! IMPORTANT: consider and update FIRSTFREE when introducing new RIDs !!! (not for RIDs for Strings - they have there own) -#define RID_SVX_FIRSTFREE 332 +#define RID_SVX_FIRSTFREE 333 // some strings also used in CUI #define RID_SVXERRCTX (RID_SVX_START + 351) @@ -270,6 +270,7 @@ #define RID_POPUPPANEL_PARAPAGE_LINESPACING (RID_SVX_START + 329) #define RID_POPUPPANEL_PARAPAGE_BULLETS (RID_SVX_START + 330) #define RID_POPUPPANEL_PARAPAGE_NUMBERING (RID_SVX_START + 331) +#define RID_POPUPPANEL_PARAPAGE_BACK_COLOR (RID_SVX_START + 332) // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above) diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 8172091608ee..d58ad83f1362 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -83,11 +83,6 @@ namespace { return bFound ? n : -1; } - Color GetTransparentColor (void) - { - return COL_TRANSPARENT; - } - void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList) { const sal_uInt32 nCount(rList.Count()); @@ -898,10 +893,16 @@ IMPL_LINK( LinePropertyPanel, ChangeTransparentHdl, void *, EMPTYARG ) -PopupControl* LinePropertyPanel::CreateColorPopupControl (PopupContainer* pParent) +namespace { - const ResId aResId(SVX_RES(STR_AUTOMATICE)); + Color GetTransparentColor (void) + { + return COL_TRANSPARENT; + } +} // end of anonymous namespace +PopupControl* LinePropertyPanel::CreateColorPopupControl (PopupContainer* pParent) +{ return new ColorControl( pParent, mpBindings, @@ -910,7 +911,7 @@ PopupControl* LinePropertyPanel::CreateColorPopupControl (PopupContainer* pParen ::boost::bind(GetTransparentColor), ::boost::bind(&LinePropertyPanel::SetColor, this, _1, _2), pParent, - &aResId); + 0); } diff --git a/svx/source/sidebar/line/LinePropertyPanel.hrc b/svx/source/sidebar/line/LinePropertyPanel.hrc index 740741cdf9ae..13c446e4372b 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.hrc +++ b/svx/source/sidebar/line/LinePropertyPanel.hrc @@ -58,7 +58,6 @@ //color popup page #define VS_COLOR 1 -#define STR_AUTOMATICE 2 //style popup page #define VS_STYLE 1 diff --git a/svx/source/sidebar/line/LinePropertyPanel.src b/svx/source/sidebar/line/LinePropertyPanel.src index 7adc42f7441c..e90495877675 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.src +++ b/svx/source/sidebar/line/LinePropertyPanel.src @@ -288,10 +288,6 @@ Control RID_POPUPPANEL_LINEPAGE_COLOR TabStop = TRUE ; Text = "Color"; }; - String STR_AUTOMATICE - { - Text [ en-US ] = "No Color"; - }; }; Control RID_POPUPPANEL_LINEPAGE_STYLE { diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 36ce007af26b..76dd922b58db 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -757,11 +757,6 @@ void ParaPropertyPanel::ParaBKGStateChanged(sal_uInt16 /*nSID*/, SfxItemState eS } } -Color ParaPropertyPanel::GetBGColor (void) const -{ - return maColor; -} - void ParaPropertyPanel::SetBGColor ( const String& /*rsColorName*/, const Color aColor) @@ -1528,17 +1523,27 @@ PopupControl* ParaPropertyPanel::CreateNumberingPopupControl (PopupContainer* pP return new ParaNumberingControl(pParent, *this); } +namespace +{ + Color GetNoBackgroundColor(void) + { + return COL_TRANSPARENT; + } +} // end of anonymous namespace + PopupControl* ParaPropertyPanel::CreateBGColorPopupControl (PopupContainer* pParent) { + const ResId aResId(SVX_RES(STR_NOFILL)); + return new ColorControl( pParent, mpBindings, - SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), + SVX_RES(RID_POPUPPANEL_PARAPAGE_BACK_COLOR), SVX_RES(VS_FONT_COLOR), - ::boost::bind(&ParaPropertyPanel::GetBGColor, this), + ::boost::bind(GetNoBackgroundColor), ::boost::bind(&ParaPropertyPanel::SetBGColor, this, _1,_2), pParent, - 0); + &aResId); } diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index 4d240eec42dc..7d6677d1d894 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -274,7 +274,6 @@ private: void InitToolBoxSpacing(); void InitToolBoxLineSpacing(); - Color GetBGColor (void) const; void SetBGColor (const String& rsColorName, const Color aColor); }; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src index c946c9bc0ce9..b3c3adae995a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src @@ -553,31 +553,27 @@ Control RID_SIDEBAR_PARA_PANEL }; //===========================================Back color page============================== -/* Control RID_POPUPPANEL_PARAPAGE_BACK_COLOR { OutputSize = TRUE; DialogControl = TRUE; Border = FALSE; - - Size = MAP_APPFONT( POPUP_COLOR_PICKER_WIDTH + POPUP_BORDER_WIDTH , POPUP_COLOR_PICKER_HEIGHT +POPUP_BORDER_HEIGHT ); + Size = MAP_APPFONT( POPUP_COLOR_PICKER_WIDTH , POPUP_COLOR_PICKER_HEIGHT ); Control VS_FONT_COLOR { HelpID = HID_PPROPERTYPANEL_PARA_BACK_COLOR_VS ; - Hide = TRUE ; - Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); - Size = MAP_APPFONT ( POPUP_COLOR_PICKER_WIDTH , POPUP_COLOR_PICKER_HEIGHT ); + Hide = TRUE ; + Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); + Size = MAP_APPFONT ( POPUP_COLOR_PICKER_WIDTH - OFFSET_X * 2, POPUP_COLOR_PICKER_HEIGHT - OFFSET_Y * 2); TabStop = TRUE ; Text = "Color Picker"; }; - String STR_NOFILL { Text [ en-US ] = "No Color"; }; - -};*/ +}; //===========================================Bullet popup page============================== Control RID_POPUPPANEL_PARAPAGE_BULLETS diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index c0d0f3782fa8..79b24884766d 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -85,30 +85,42 @@ PopupControl* TextPropertyPanel::CreateUnderlinePopupControl (PopupContainer* pP return new TextUnderlineControl(pParent, *this); } +namespace +{ + Color GetAutomaticColor(void) + { + return COL_AUTO; + } +} // end of anonymous namespace + PopupControl* TextPropertyPanel::CreateFontColorPopupControl (PopupContainer* pParent) { + const ResId aResId(SVX_RES(STR_AUTOMATICE)); + return new ColorControl( pParent, mpBindings, SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), SVX_RES(VS_FONT_COLOR), - ::boost::bind(&TextPropertyPanel::GetFontColor, this), + ::boost::bind(GetAutomaticColor), ::boost::bind(&TextPropertyPanel::SetFontColor, this, _1,_2), pParent, - 0); + &aResId); } PopupControl* TextPropertyPanel::CreateBrushColorPopupControl (PopupContainer* pParent) { + const ResId aResId(SVX_RES(STR_AUTOMATICE)); + return new ColorControl( pParent, mpBindings, SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), SVX_RES(VS_FONT_COLOR), - ::boost::bind(&TextPropertyPanel::GetBrushColor, this), + ::boost::bind(GetAutomaticColor), ::boost::bind(&TextPropertyPanel::SetBrushColor, this, _1,_2), pParent, - 0); + &aResId); } long TextPropertyPanel::GetSelFontSize() @@ -1531,11 +1543,6 @@ void TextPropertyPanel::UpdateFontScript() } } -Color TextPropertyPanel::GetFontColor (void) const -{ - return maColor; -} - void TextPropertyPanel::SetFontColor ( const String& /*rsColorName*/, const Color aColor) @@ -1545,11 +1552,6 @@ void TextPropertyPanel::SetFontColor ( maColor = aColor; } -Color TextPropertyPanel::GetBrushColor (void) const -{ - return maBackColor; -} - void TextPropertyPanel::SetBrushColor ( const String& /*rsColorName*/, const Color aColor) diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index 546eb72b6157..b842e4fd5dad 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -65,9 +65,7 @@ public: void SetSpacing(long nKern); void EndSpacingPopupMode (void); void EndUnderlinePopupMode (void); - Color GetFontColor (void) const; void SetFontColor (const String& rsColorName,const Color aColor); - Color GetBrushColor (void) const; void SetBrushColor (const String& rsColorName,const Color aColor); void SetUnderline(FontUnderline eUnderline); Color& GetUnderlineColor(); diff --git a/svx/source/sidebar/text/TextPropertyPanel.src b/svx/source/sidebar/text/TextPropertyPanel.src index 6ced5c7b10ac..633750fe1fee 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.src +++ b/svx/source/sidebar/text/TextPropertyPanel.src @@ -500,7 +500,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR Control VS_FONT_COLOR { -// HelpID = HID_COLOR_VS ; HelpID = HID_PPROPERTYPANEL_TEXT_COLOR_VS; Hide = TRUE ; Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); @@ -512,7 +511,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR { Text [ en-US ] = "Automatic"; }; - }; Control RID_POPUPPANEL_TEXTPAGE_SPACING |