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 /reportdesign | |
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 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlStyleImport.cxx | 17 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlStyleImport.hxx | 4 |
2 files changed, 9 insertions, 12 deletions
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx index fc644f1d749b..5d0f9b1383a7 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.cxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx @@ -142,16 +142,17 @@ void OControlStyleContext::SetAttribute( sal_uInt16 nPrefixKey, } +static const OUStringLiteral g_sTableStyleFamilyName( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ); +static const OUStringLiteral g_sColumnStyleFamilyName( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ); +static const OUStringLiteral g_sRowStyleFamilyName( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ); +static const OUStringLiteral g_sCellStyleFamilyName( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ); + OReportStylesContext::OReportStylesContext( ORptFilter& rImport, sal_uInt16 nPrfx , const OUString& rLName , const Reference< XAttributeList > & xAttrList, const bool bTempAutoStyles ) : SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ), - m_sTableStyleFamilyName( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ), - m_sColumnStyleFamilyName( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ), - m_sRowStyleFamilyName( XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ), - m_sCellStyleFamilyName( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ), m_rImport(rImport), m_nNumberFormatIndex(-1), bAutoStyles(bTempAutoStyles) @@ -373,16 +374,16 @@ OUString OReportStylesContext::GetServiceName( sal_uInt16 nFamily ) const switch( nFamily ) { case XML_STYLE_FAMILY_TABLE_TABLE: - sServiceName = m_sTableStyleFamilyName; + sServiceName = g_sTableStyleFamilyName; break; case XML_STYLE_FAMILY_TABLE_COLUMN: - sServiceName = m_sColumnStyleFamilyName; + sServiceName = g_sColumnStyleFamilyName; break; case XML_STYLE_FAMILY_TABLE_ROW: - sServiceName = m_sRowStyleFamilyName; + sServiceName = g_sRowStyleFamilyName; break; case XML_STYLE_FAMILY_TABLE_CELL: - sServiceName = m_sCellStyleFamilyName; + sServiceName = g_sCellStyleFamilyName; break; default: break; diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx index 6f8741457a85..28641a8b8f59 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.hxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx @@ -75,10 +75,6 @@ namespace rptxml class OReportStylesContext : public SvXMLStylesContext { - const OUString m_sTableStyleFamilyName; - const OUString m_sColumnStyleFamilyName; - const OUString m_sRowStyleFamilyName; - const OUString m_sCellStyleFamilyName; ORptFilter& m_rImport; sal_Int32 m_nNumberFormatIndex; bool bAutoStyles : 1; |