summaryrefslogtreecommitdiff
path: root/svtools/source/config
diff options
context:
space:
mode:
authorGökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr>2016-08-24 17:41:12 +0300
committerMichael Stahl <mstahl@redhat.com>2016-08-25 14:54:44 +0000
commitb7bf1ba2136b3d1e031673e7b541c6181e95ff61 (patch)
treea246e7d5f9cd1ed2e856a09426a924e4c815285e /svtools/source/config
parent4d6dc9b84b0afd31a380e71fd53a3bc99d403430 (diff)
tdf#100726 - Improve readability of OUString concatanations
Improved readability of OUString concatanations. Also removed unused OUStrings "sColor" and "sEntry" from the code. Change-Id: Ie9792f499cd880be72229f8a8c71f05ff8e258b6 Reviewed-on: https://gerrit.libreoffice.org/28375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svtools/source/config')
-rw-r--r--svtools/source/config/colorcfg.cxx11
-rw-r--r--svtools/source/config/extcolorcfg.cxx29
-rw-r--r--svtools/source/config/itemholder2.cxx8
3 files changed, 22 insertions, 26 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 1805465b50e2..f2ae5918c049 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -166,17 +166,16 @@ uno::Sequence< OUString> GetPropertyNames(const OUString& rScheme)
{ RTL_CONSTASCII_USTRINGPARAM("/SQLComment"), false }
};
int nIndex = 0;
- OUString sColor = cColor;
- OUString sBase(cColorSchemes);
- sBase += utl::wrapConfigurationElementName(rScheme);
+ OUString sBase = cColorSchemes
+ + utl::wrapConfigurationElementName(rScheme);
const int nCount = ColorConfigEntryCount;
for(sal_Int32 i = 0; i < 4 * nCount; i+= 4)
{
- OUString sBaseName(sBase);
sal_Int32 nPos = i / 4;
- sBaseName += OUString(cNames[nPos].cName, cNames[nPos].nLength, cNames[nPos].eEncoding);
+ OUString sBaseName = sBase
+ + OUString(cNames[nPos].cName, cNames[nPos].nLength, cNames[nPos].eEncoding);
pNames[nIndex] += sBaseName;
- pNames[nIndex++] += sColor;
+ pNames[nIndex++] += cColor;
if(cNames[nPos].bCanBeVisible)
{
pNames[nIndex] += sBaseName;
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 381767f889ac..2267f3efeeb3 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -253,8 +253,8 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
for(sal_Int32 i = 0;pIter != pEnd;++pIter,++i)
{
uno::Sequence < OUString > aComponentDisplayNames(1);
- aComponentDisplayNames[0] = *pIter;
- aComponentDisplayNames[0] += sDisplayName;
+ aComponentDisplayNames[0] = *pIter
+ + sDisplayName;
uno::Sequence< uno::Any > aComponentDisplayNamesValue = GetProperties( aComponentDisplayNames );
OUString sComponentDisplayName;
if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
@@ -295,8 +295,8 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
} // if(!sScheme.getLength())
m_sLoadedScheme = sScheme;
- OUString sBase("ExtendedColorScheme/ColorSchemes/");
- sBase += sScheme;
+ OUString sBase = "ExtendedColorScheme/ColorSchemes/"
+ + sScheme;
bool bFound = ExistsScheme(sScheme);
if ( bFound )
@@ -335,8 +335,8 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
OUString sComponentName = pIter->copy(pIter->lastIndexOf('/')+1);
if ( m_aConfigValues.find(sComponentName) == m_aConfigValues.end() )
{
- OUString sEntry = *pIter;
- sEntry += sColorEntries;
+ OUString sEntry = *pIter
+ + sColorEntries;
uno::Sequence < OUString > aColorNames = GetPropertyNames(sEntry);
uno::Sequence < OUString > aDefaultColorNames = aColorNames;
@@ -411,25 +411,22 @@ void ExtendedColorConfig_Impl::ImplCommit()
return;
const OUString sColorEntries("Entries");
const OUString sColor("/Color");
- OUString sBase("ExtendedColorScheme/ColorSchemes/");
+ OUString sBase = "ExtendedColorScheme/ColorSchemes/"
+ + m_sLoadedScheme;
const OUString s_sSep("/");
- sBase += m_sLoadedScheme;
TComponents::iterator aIter = m_aConfigValues.begin();
TComponents::iterator aEnd = m_aConfigValues.end();
for( ;aIter != aEnd;++aIter )
{
- OUString sEntry = aIter->first;
- sEntry += sColorEntries;
-
if ( ConfigItem::AddNode(sBase, aIter->first) )
{
- OUString sNode = sBase;
- sNode += s_sSep;
- sNode += aIter->first;
+ OUString sNode = sBase
+ + s_sSep
+ + aIter->first
//ConfigItem::AddNode(sNode, sColorEntries);
- sNode += s_sSep;
- sNode += sColorEntries;
+ + s_sSep
+ + sColorEntries;
uno::Sequence < beans::PropertyValue > aPropValues(aIter->second.first.size());
beans::PropertyValue* pPropValues = aPropValues.getArray();
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx
index bf6c4d1cd284..080c70f1aafc 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -59,10 +59,10 @@ ItemHolder2::ItemHolder2()
if(bMessage)
{
bMessage = false;
- OString sMsg("CreateInstance with arguments exception: ");
- sMsg += OString(rEx.Message.getStr(),
- rEx.Message.getLength(),
- RTL_TEXTENCODING_ASCII_US);
+ OString sMsg = "CreateInstance with arguments exception: "
+ + OString(rEx.Message.getStr(),
+ rEx.Message.getLength(),
+ RTL_TEXTENCODING_ASCII_US);
OSL_FAIL(sMsg.getStr());
}
}