summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextMasterPageContext.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/text/XMLTextMasterPageContext.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/text/XMLTextMasterPageContext.cxx')
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index f679c7d2d273..9d298aa730bc 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -59,12 +59,13 @@ Reference < XStyle > XMLTextMasterPageContext::Create()
return xNewStyle;
}
+static const OUStringLiteral gsFollowStyle( "FollowStyle" );
+
XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
const Reference< XAttributeList > & xAttrList,
bool bOverwrite )
: SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_MASTER_PAGE )
-, sFollowStyle( "FollowStyle" )
, bInsertHeader( false )
, bInsertFooter( false )
, bInsertHeaderLeft( false )
@@ -271,7 +272,7 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
Reference< XPropertySetInfo > xPropSetInfo =
xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ if( xPropSetInfo->hasPropertyByName( gsFollowStyle ) )
{
OUString sDisplayFollow(
GetImport().GetStyleDisplayName(
@@ -280,12 +281,12 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
!xPageStyles->hasByName( sDisplayFollow ) )
sDisplayFollow = xStyle->getName();
- Any aAny = xPropSet->getPropertyValue( sFollowStyle );
+ Any aAny = xPropSet->getPropertyValue( gsFollowStyle );
OUString sCurrFollow;
aAny >>= sCurrFollow;
if( sCurrFollow != sDisplayFollow )
{
- xPropSet->setPropertyValue( sFollowStyle, Any(sDisplayFollow) );
+ xPropSet->setPropertyValue( gsFollowStyle, Any(sDisplayFollow) );
}
}