summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlstyli.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 /sc/source/filter/xml/xmlstyli.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 'sc/source/filter/xml/xmlstyli.cxx')
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 5087bf0591b9..03996c173c32 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -688,16 +688,17 @@ SvXMLStyleContext *XMLTableStylesContext::CreateDefaultStyleStyleChildContext(
return pStyle;
}
+static const OUStringLiteral gsCellStyleServiceName("com.sun.star.style.CellStyle");
+static const OUStringLiteral gsColumnStyleServiceName(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME);
+static const OUStringLiteral gsRowStyleServiceName(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME);
+static const OUStringLiteral gsTableStyleServiceName(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME);
+
XMLTableStylesContext::XMLTableStylesContext( SvXMLImport& rImport,
sal_uInt16 nPrfx ,
const OUString& rLName ,
const uno::Reference< XAttributeList > & xAttrList,
const bool bTempAutoStyles )
: SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList )
- , sCellStyleServiceName("com.sun.star.style.CellStyle")
- , sColumnStyleServiceName(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME)
- , sRowStyleServiceName(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME)
- , sTableStyleServiceName(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME)
, nNumberFormatIndex(-1)
, nConditionalFormatIndex(-1)
, nCellStyleIndex(-1)
@@ -860,16 +861,16 @@ OUString XMLTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const
switch( nFamily )
{
case XML_STYLE_FAMILY_TABLE_COLUMN:
- sServiceName = sColumnStyleServiceName;
+ sServiceName = gsColumnStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_ROW:
- sServiceName = sRowStyleServiceName;
+ sServiceName = gsRowStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_CELL:
- sServiceName = sCellStyleServiceName;
+ sServiceName = gsCellStyleServiceName;
break;
case XML_STYLE_FAMILY_TABLE_TABLE:
- sServiceName = sTableStyleServiceName;
+ sServiceName = gsTableStyleServiceName;
break;
}
}