diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-16 16:57:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-22 13:31:57 +0200 |
commit | 60bc26354763fa3461db49a3e827da552484150d (patch) | |
tree | 5c66cee43f76f556f9a086a67fa8a6e88750c5d5 /xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx | |
parent | 7867e1f1cdd726cb98a236245e3d08557cc3a313 (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/XMLFootnoteConfigurationImportContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 31412606573f..633a2151c400 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -109,6 +109,18 @@ void XMLFootnoteConfigHelper::Characters( const OUString& rChars ) // XMLFootnoteConfigurationImportContext +static const OUStringLiteral gsPropertyAnchorCharStyleName("AnchorCharStyleName"); +static const OUStringLiteral gsPropertyCharStyleName("CharStyleName"); +static const OUStringLiteral gsPropertyNumberingType("NumberingType"); +static const OUStringLiteral gsPropertyPageStyleName("PageStyleName"); +static const OUStringLiteral gsPropertyParagraphStyleName("ParaStyleName"); +static const OUStringLiteral gsPropertyPrefix("Prefix"); +static const OUStringLiteral gsPropertyStartAt("StartAt"); +static const OUStringLiteral gsPropertySuffix("Suffix"); +static const OUStringLiteral gsPropertyPositionEndOfDoc("PositionEndOfDoc"); +static const OUStringLiteral gsPropertyFootnoteCounting("FootnoteCounting"); +static const OUStringLiteral gsPropertyEndNotice("EndNotice"); +static const OUStringLiteral gsPropertyBeginNotice("BeginNotice"); XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext( SvXMLImport& rImport, @@ -116,18 +128,6 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG) -, sPropertyAnchorCharStyleName("AnchorCharStyleName") -, sPropertyCharStyleName("CharStyleName") -, sPropertyNumberingType("NumberingType") -, sPropertyPageStyleName("PageStyleName") -, sPropertyParagraphStyleName("ParaStyleName") -, sPropertyPrefix("Prefix") -, sPropertyStartAt("StartAt") -, sPropertySuffix("Suffix") -, sPropertyPositionEndOfDoc("PositionEndOfDoc") -, sPropertyFootnoteCounting("FootnoteCounting") -, sPropertyEndNotice("EndNotice") -, sPropertyBeginNotice("BeginNotice") , sNumFormat("1") , sNumSync("false") , pAttrTokenMap(nullptr) @@ -356,33 +356,33 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings( { aAny <<= GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sCitationStyle ); - rConfig->setPropertyValue(sPropertyCharStyleName, aAny); + rConfig->setPropertyValue(gsPropertyCharStyleName, aAny); } if (!sAnchorStyle.isEmpty()) { aAny <<= GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sAnchorStyle ); - rConfig->setPropertyValue(sPropertyAnchorCharStyleName, aAny); + rConfig->setPropertyValue(gsPropertyAnchorCharStyleName, aAny); } if (!sPageStyle.isEmpty()) { aAny <<= GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, sPageStyle ); - rConfig->setPropertyValue(sPropertyPageStyleName, aAny); + rConfig->setPropertyValue(gsPropertyPageStyleName, aAny); } if (!sDefaultStyle.isEmpty()) { aAny <<= GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sDefaultStyle ); - rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny); + rConfig->setPropertyValue(gsPropertyParagraphStyleName, aAny); } - rConfig->setPropertyValue(sPropertyPrefix, Any(sPrefix)); + rConfig->setPropertyValue(gsPropertyPrefix, Any(sPrefix)); - rConfig->setPropertyValue(sPropertySuffix, Any(sSuffix)); + rConfig->setPropertyValue(gsPropertySuffix, Any(sSuffix)); sal_Int16 nNumType = NumberingType::ARABIC; GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat, @@ -392,16 +392,16 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings( if( NumberingType::CHAR_SPECIAL == nNumType ) nNumType = NumberingType::ARABIC; - rConfig->setPropertyValue(sPropertyNumberingType, Any(nNumType)); + rConfig->setPropertyValue(gsPropertyNumberingType, Any(nNumType)); - rConfig->setPropertyValue(sPropertyStartAt, Any(nOffset)); + rConfig->setPropertyValue(gsPropertyStartAt, Any(nOffset)); if (!bIsEndnote) { - rConfig->setPropertyValue(sPropertyPositionEndOfDoc, Any(bPosition)); - rConfig->setPropertyValue(sPropertyFootnoteCounting, Any(nNumbering)); - rConfig->setPropertyValue(sPropertyEndNotice, Any(sEndNotice)); - rConfig->setPropertyValue(sPropertyBeginNotice, Any(sBeginNotice)); + rConfig->setPropertyValue(gsPropertyPositionEndOfDoc, Any(bPosition)); + rConfig->setPropertyValue(gsPropertyFootnoteCounting, Any(nNumbering)); + rConfig->setPropertyValue(gsPropertyEndNotice, Any(sEndNotice)); + rConfig->setPropertyValue(gsPropertyBeginNotice, Any(sBeginNotice)); } } |