summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumi.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-16 16:57:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-22 13:31:57 +0200
commit60bc26354763fa3461db49a3e827da552484150d (patch)
tree5c66cee43f76f556f9a086a67fa8a6e88750c5d5 /xmloff/source/style/xmlnumi.cxx
parent7867e1f1cdd726cb98a236245e3d08557cc3a313 (diff)
new loplugin:conststringfield
Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style/xmlnumi.cxx')
-rw-r--r--xmloff/source/style/xmlnumi.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 1e1f7098cdeb..df5fab3f49ea 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -142,8 +142,6 @@ static const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap()
class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext
{
friend class SvxXMLListLevelStyleAttrContext_Impl;
- const OUString sStarBats;
- const OUString sStarMath;
OUString sPrefix;
OUString sSuffix;
@@ -244,15 +242,16 @@ public:
}
};
+static const OUStringLiteral gsStarBats( "StarBats" );
+static const OUStringLiteral gsStarMath( "StarMath" );
+
SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList )
: SvXMLImportContext( rImport, nPrfx, rLName )
-, sStarBats( "StarBats" )
-, sStarMath( "StarMath" )
-, sNumFormat( OUString("1") )
+, sNumFormat( "1" )
, nLevel( -1 )
, nSpaceBefore( 0 )
, nMinLabelWidth( 0 )
@@ -501,12 +500,12 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties()
aFDesc.CharSet = eBulletFontEncoding;
aFDesc.Weight = WEIGHT_DONTKNOW;
bool bStarSymbol = false;
- if( aFDesc.Name.equalsIgnoreAsciiCase( sStarBats ) )
+ if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarBats ) )
{
cBullet = GetImport().ConvStarBatsCharToStarSymbol( cBullet );
bStarSymbol = true;
}
- else if( aFDesc.Name.equalsIgnoreAsciiCase( sStarMath ) )
+ else if( aFDesc.Name.equalsIgnoreAsciiCase( gsStarMath ) )
{
cBullet = GetImport().ConvStarMathCharToStarSymbol( cBullet );
bStarSymbol = true;
@@ -1009,15 +1008,16 @@ void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
}
}
+static const OUStringLiteral sIsPhysical( "IsPhysical" );
+static const OUStringLiteral sNumberingRules( "NumberingRules" );
+static const OUStringLiteral sIsContinuousNumbering( "IsContinuousNumbering" );
+
SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList,
bool bOutl )
: SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, bOutl ? XML_STYLE_FAMILY_TEXT_OUTLINE : XML_STYLE_FAMILY_TEXT_LIST )
-, sIsPhysical( "IsPhysical" )
-, sNumberingRules( "NumberingRules" )
-, sIsContinuousNumbering( "IsContinuousNumbering" )
, bConsecutive( false )
, bOutline( bOutl )
{