Kaydet (Commit) 946a36ec authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Michael Meeks

Related: #i122041# Added 'Automatic' to TextPropertyPanel, FontColor...

and HilightColor. Added 'No Color' to ParagraphPropertyPanel and
BackgroundColor

(cherry picked from commit 6b722f7d)

Conflicts:
	svx/inc/svx/dialogs.hrc

Change-Id: If75bdb87a1fc43e753c8c8ab15370808235926fd
üst 58a825b4
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Resource-Id's ------------------------------------------------------------ // Resource-Id's ------------------------------------------------------------
// !!! IMPORTANT: consider and update FIRSTFREE when introducing new RIDs !!! (not for RIDs for Strings - they have there own) // !!! 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 // some strings also used in CUI
#define RID_SVXERRCTX (RID_SVX_START + 351) #define RID_SVXERRCTX (RID_SVX_START + 351)
...@@ -270,6 +270,7 @@ ...@@ -270,6 +270,7 @@
#define RID_POPUPPANEL_PARAPAGE_LINESPACING (RID_SVX_START + 329) #define RID_POPUPPANEL_PARAPAGE_LINESPACING (RID_SVX_START + 329)
#define RID_POPUPPANEL_PARAPAGE_BULLETS (RID_SVX_START + 330) #define RID_POPUPPANEL_PARAPAGE_BULLETS (RID_SVX_START + 330)
#define RID_POPUPPANEL_PARAPAGE_NUMBERING (RID_SVX_START + 331) #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) // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above)
......
...@@ -83,11 +83,6 @@ namespace { ...@@ -83,11 +83,6 @@ namespace {
return bFound ? n : -1; return bFound ? n : -1;
} }
Color GetTransparentColor (void)
{
return COL_TRANSPARENT;
}
void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList) void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList)
{ {
const sal_uInt32 nCount(rList.Count()); const sal_uInt32 nCount(rList.Count());
...@@ -898,10 +893,16 @@ IMPL_LINK( LinePropertyPanel, ChangeTransparentHdl, void *, EMPTYARG ) ...@@ -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( return new ColorControl(
pParent, pParent,
mpBindings, mpBindings,
...@@ -910,7 +911,7 @@ PopupControl* LinePropertyPanel::CreateColorPopupControl (PopupContainer* pParen ...@@ -910,7 +911,7 @@ PopupControl* LinePropertyPanel::CreateColorPopupControl (PopupContainer* pParen
::boost::bind(GetTransparentColor), ::boost::bind(GetTransparentColor),
::boost::bind(&LinePropertyPanel::SetColor, this, _1, _2), ::boost::bind(&LinePropertyPanel::SetColor, this, _1, _2),
pParent, pParent,
&aResId); 0);
} }
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
//color popup page //color popup page
#define VS_COLOR 1 #define VS_COLOR 1
#define STR_AUTOMATICE 2
//style popup page //style popup page
#define VS_STYLE 1 #define VS_STYLE 1
......
...@@ -288,10 +288,6 @@ Control RID_POPUPPANEL_LINEPAGE_COLOR ...@@ -288,10 +288,6 @@ Control RID_POPUPPANEL_LINEPAGE_COLOR
TabStop = TRUE ; TabStop = TRUE ;
Text = "Color"; Text = "Color";
}; };
String STR_AUTOMATICE
{
Text [ en-US ] = "No Color";
};
}; };
Control RID_POPUPPANEL_LINEPAGE_STYLE Control RID_POPUPPANEL_LINEPAGE_STYLE
{ {
......
...@@ -757,11 +757,6 @@ void ParaPropertyPanel::ParaBKGStateChanged(sal_uInt16 /*nSID*/, SfxItemState eS ...@@ -757,11 +757,6 @@ void ParaPropertyPanel::ParaBKGStateChanged(sal_uInt16 /*nSID*/, SfxItemState eS
} }
} }
Color ParaPropertyPanel::GetBGColor (void) const
{
return maColor;
}
void ParaPropertyPanel::SetBGColor ( void ParaPropertyPanel::SetBGColor (
const String& /*rsColorName*/, const String& /*rsColorName*/,
const Color aColor) const Color aColor)
...@@ -1528,17 +1523,27 @@ PopupControl* ParaPropertyPanel::CreateNumberingPopupControl (PopupContainer* pP ...@@ -1528,17 +1523,27 @@ PopupControl* ParaPropertyPanel::CreateNumberingPopupControl (PopupContainer* pP
return new ParaNumberingControl(pParent, *this); return new ParaNumberingControl(pParent, *this);
} }
namespace
{
Color GetNoBackgroundColor(void)
{
return COL_TRANSPARENT;
}
} // end of anonymous namespace
PopupControl* ParaPropertyPanel::CreateBGColorPopupControl (PopupContainer* pParent) PopupControl* ParaPropertyPanel::CreateBGColorPopupControl (PopupContainer* pParent)
{ {
const ResId aResId(SVX_RES(STR_NOFILL));
return new ColorControl( return new ColorControl(
pParent, pParent,
mpBindings, mpBindings,
SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), SVX_RES(RID_POPUPPANEL_PARAPAGE_BACK_COLOR),
SVX_RES(VS_FONT_COLOR), SVX_RES(VS_FONT_COLOR),
::boost::bind(&ParaPropertyPanel::GetBGColor, this), ::boost::bind(GetNoBackgroundColor),
::boost::bind(&ParaPropertyPanel::SetBGColor, this, _1,_2), ::boost::bind(&ParaPropertyPanel::SetBGColor, this, _1,_2),
pParent, pParent,
0); &aResId);
} }
......
...@@ -274,7 +274,6 @@ private: ...@@ -274,7 +274,6 @@ private:
void InitToolBoxSpacing(); void InitToolBoxSpacing();
void InitToolBoxLineSpacing(); void InitToolBoxLineSpacing();
Color GetBGColor (void) const;
void SetBGColor (const String& rsColorName, const Color aColor); void SetBGColor (const String& rsColorName, const Color aColor);
}; };
......
...@@ -553,31 +553,27 @@ Control RID_SIDEBAR_PARA_PANEL ...@@ -553,31 +553,27 @@ Control RID_SIDEBAR_PARA_PANEL
}; };
//===========================================Back color page============================== //===========================================Back color page==============================
/*
Control RID_POPUPPANEL_PARAPAGE_BACK_COLOR Control RID_POPUPPANEL_PARAPAGE_BACK_COLOR
{ {
OutputSize = TRUE; OutputSize = TRUE;
DialogControl = TRUE; DialogControl = TRUE;
Border = FALSE; Border = FALSE;
Size = MAP_APPFONT( POPUP_COLOR_PICKER_WIDTH , POPUP_COLOR_PICKER_HEIGHT );
Size = MAP_APPFONT( POPUP_COLOR_PICKER_WIDTH + POPUP_BORDER_WIDTH , POPUP_COLOR_PICKER_HEIGHT +POPUP_BORDER_HEIGHT );
Control VS_FONT_COLOR Control VS_FONT_COLOR
{ {
HelpID = HID_PPROPERTYPANEL_PARA_BACK_COLOR_VS ; HelpID = HID_PPROPERTYPANEL_PARA_BACK_COLOR_VS ;
Hide = TRUE ; Hide = TRUE ;
Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y );
Size = MAP_APPFONT ( POPUP_COLOR_PICKER_WIDTH , POPUP_COLOR_PICKER_HEIGHT ); Size = MAP_APPFONT ( POPUP_COLOR_PICKER_WIDTH - OFFSET_X * 2, POPUP_COLOR_PICKER_HEIGHT - OFFSET_Y * 2);
TabStop = TRUE ; TabStop = TRUE ;
Text = "Color Picker"; Text = "Color Picker";
}; };
String STR_NOFILL String STR_NOFILL
{ {
Text [ en-US ] = "No Color"; Text [ en-US ] = "No Color";
}; };
};
};*/
//===========================================Bullet popup page============================== //===========================================Bullet popup page==============================
Control RID_POPUPPANEL_PARAPAGE_BULLETS Control RID_POPUPPANEL_PARAPAGE_BULLETS
......
...@@ -85,30 +85,42 @@ PopupControl* TextPropertyPanel::CreateUnderlinePopupControl (PopupContainer* pP ...@@ -85,30 +85,42 @@ PopupControl* TextPropertyPanel::CreateUnderlinePopupControl (PopupContainer* pP
return new TextUnderlineControl(pParent, *this); return new TextUnderlineControl(pParent, *this);
} }
namespace
{
Color GetAutomaticColor(void)
{
return COL_AUTO;
}
} // end of anonymous namespace
PopupControl* TextPropertyPanel::CreateFontColorPopupControl (PopupContainer* pParent) PopupControl* TextPropertyPanel::CreateFontColorPopupControl (PopupContainer* pParent)
{ {
const ResId aResId(SVX_RES(STR_AUTOMATICE));
return new ColorControl( return new ColorControl(
pParent, pParent,
mpBindings, mpBindings,
SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR),
SVX_RES(VS_FONT_COLOR), SVX_RES(VS_FONT_COLOR),
::boost::bind(&TextPropertyPanel::GetFontColor, this), ::boost::bind(GetAutomaticColor),
::boost::bind(&TextPropertyPanel::SetFontColor, this, _1,_2), ::boost::bind(&TextPropertyPanel::SetFontColor, this, _1,_2),
pParent, pParent,
0); &aResId);
} }
PopupControl* TextPropertyPanel::CreateBrushColorPopupControl (PopupContainer* pParent) PopupControl* TextPropertyPanel::CreateBrushColorPopupControl (PopupContainer* pParent)
{ {
const ResId aResId(SVX_RES(STR_AUTOMATICE));
return new ColorControl( return new ColorControl(
pParent, pParent,
mpBindings, mpBindings,
SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR), SVX_RES(RID_POPUPPANEL_TEXTPAGE_FONT_COLOR),
SVX_RES(VS_FONT_COLOR), SVX_RES(VS_FONT_COLOR),
::boost::bind(&TextPropertyPanel::GetBrushColor, this), ::boost::bind(GetAutomaticColor),
::boost::bind(&TextPropertyPanel::SetBrushColor, this, _1,_2), ::boost::bind(&TextPropertyPanel::SetBrushColor, this, _1,_2),
pParent, pParent,
0); &aResId);
} }
long TextPropertyPanel::GetSelFontSize() long TextPropertyPanel::GetSelFontSize()
...@@ -1531,11 +1543,6 @@ void TextPropertyPanel::UpdateFontScript() ...@@ -1531,11 +1543,6 @@ void TextPropertyPanel::UpdateFontScript()
} }
} }
Color TextPropertyPanel::GetFontColor (void) const
{
return maColor;
}
void TextPropertyPanel::SetFontColor ( void TextPropertyPanel::SetFontColor (
const String& /*rsColorName*/, const String& /*rsColorName*/,
const Color aColor) const Color aColor)
...@@ -1545,11 +1552,6 @@ void TextPropertyPanel::SetFontColor ( ...@@ -1545,11 +1552,6 @@ void TextPropertyPanel::SetFontColor (
maColor = aColor; maColor = aColor;
} }
Color TextPropertyPanel::GetBrushColor (void) const
{
return maBackColor;
}
void TextPropertyPanel::SetBrushColor ( void TextPropertyPanel::SetBrushColor (
const String& /*rsColorName*/, const String& /*rsColorName*/,
const Color aColor) const Color aColor)
......
...@@ -65,9 +65,7 @@ public: ...@@ -65,9 +65,7 @@ public:
void SetSpacing(long nKern); void SetSpacing(long nKern);
void EndSpacingPopupMode (void); void EndSpacingPopupMode (void);
void EndUnderlinePopupMode (void); void EndUnderlinePopupMode (void);
Color GetFontColor (void) const;
void SetFontColor (const String& rsColorName,const Color aColor); void SetFontColor (const String& rsColorName,const Color aColor);
Color GetBrushColor (void) const;
void SetBrushColor (const String& rsColorName,const Color aColor); void SetBrushColor (const String& rsColorName,const Color aColor);
void SetUnderline(FontUnderline eUnderline); void SetUnderline(FontUnderline eUnderline);
Color& GetUnderlineColor(); Color& GetUnderlineColor();
......
...@@ -500,7 +500,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR ...@@ -500,7 +500,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR
Control VS_FONT_COLOR Control VS_FONT_COLOR
{ {
// HelpID = HID_COLOR_VS ;
HelpID = HID_PPROPERTYPANEL_TEXT_COLOR_VS; HelpID = HID_PPROPERTYPANEL_TEXT_COLOR_VS;
Hide = TRUE ; Hide = TRUE ;
Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y ); Pos = MAP_APPFONT ( OFFSET_X , OFFSET_Y );
...@@ -512,7 +511,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR ...@@ -512,7 +511,6 @@ Control RID_POPUPPANEL_TEXTPAGE_FONT_COLOR
{ {
Text [ en-US ] = "Automatic"; Text [ en-US ] = "Automatic";
}; };
}; };
Control RID_POPUPPANEL_TEXTPAGE_SPACING Control RID_POPUPPANEL_TEXTPAGE_SPACING
......
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