[Libreoffice-commits] core.git: 2 commits - sw/source
Tor Lillqvist
tml at collabora.com
Wed Apr 22 00:00:26 PDT 2015
sw/source/uibase/sidebar/ThemePanel.cxx | 58 +++-----------------------------
1 file changed, 6 insertions(+), 52 deletions(-)
New commits:
commit 81f9281de0b5b42d5f4e8f1c4ecb3a780c74ff95
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Apr 22 09:41:51 2015 +0300
WaE: Unreferenced function definition
Change-Id: I0f9d7374de59a916871677c08144bf79b39068dd
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index f4dcf25..c6577b1 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -58,47 +58,6 @@ class ColorSet
public:
OUString maName;
Color maColors[10];
-
- Color getBackgroundColor1()
- {
- return maColors[0];
- }
- Color getTextColor1()
- {
- return maColors[1];
- }
- Color getBackgroundColor2()
- {
- return maColors[2];
- }
- Color getTextColor2()
- {
- return maColors[3];
- }
- Color getAccent1()
- {
- return maColors[4];
- }
- Color getAccent2()
- {
- return maColors[5];
- }
- Color getAccent3()
- {
- return maColors[6];
- }
- Color getAccent4()
- {
- return maColors[7];
- }
- Color getAccent5()
- {
- return maColors[8];
- }
- Color getAccent6()
- {
- return maColors[9];
- }
};
class ColorVariable
@@ -110,11 +69,6 @@ public:
ColorVariable()
{}
- ColorVariable(Color aColor)
- : mnIndex(-1)
- , maColor(aColor)
- {}
-
ColorVariable(long nIndex)
: mnIndex(nIndex)
, maColor()
commit 1a6c49e3d583519e3a010a7bcfe486d06e8d50c6
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Apr 22 09:38:29 2015 +0300
WaE: passing 'class OUString' by value, rather pass by reference
Change-Id: I744425e079c426745e02056153707675311e58ca
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 9f86ff3..f4dcf25 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -130,7 +130,7 @@ public:
OUString maElementName;
public:
- StyleRedefinition(OUString aElementName)
+ StyleRedefinition(const OUString& aElementName)
: maElementName(aElementName)
{}
@@ -158,7 +158,7 @@ class StyleSet
std::vector<StyleRedefinition> maStyles;
public:
- StyleSet(OUString aName)
+ StyleSet(const OUString& aName)
: maName(aName)
, maStyles()
{}
@@ -168,7 +168,7 @@ public:
maStyles.push_back(aRedefinition);
}
- StyleRedefinition* get(OUString aString)
+ StyleRedefinition* get(const OUString& aString)
{
for (size_t i = 0; i < maStyles.size(); i++)
{
@@ -307,7 +307,7 @@ std::vector<FontSet> initFontSets()
return aFontSets;
}
-FontSet getFontSet(OUString& rFontVariant, std::vector<FontSet>& aFontSets)
+FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets)
{
for (size_t i = 0; i < aFontSets.size(); ++i)
{
@@ -348,7 +348,7 @@ std::vector<ColorSet> initColorSets()
return aColorSets;
}
-ColorSet getColorSet(OUString& rColorVariant, std::vector<ColorSet>& aColorSets)
+ColorSet getColorSet(const OUString& rColorVariant, std::vector<ColorSet>& aColorSets)
{
for (size_t i = 0; i < aColorSets.size(); ++i)
{
@@ -358,7 +358,7 @@ ColorSet getColorSet(OUString& rColorVariant, std::vector<ColorSet>& aColorSets)
return aColorSets[0];
}
-void applyTheme(SfxStyleSheetBasePool* pPool, OUString sFontSetName, OUString sColorSetName, StyleSet& rStyleSet)
+void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, const OUString& sColorSetName, StyleSet& rStyleSet)
{
SwDocStyleSheet* pStyle;
More information about the Libreoffice-commits
mailing list