summaryrefslogtreecommitdiff
path: root/xmloff/source/core
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/core
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/core')
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 3ea9d3f6110d..ca5f677dbdd6 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -46,15 +46,16 @@
using namespace ::com::sun::star;
using namespace ::xmloff::token;
+static const OUStringLiteral gsPrinterIndependentLayout( "PrinterIndependentLayout" );
+static const OUStringLiteral gsColorTableURL( "ColorTableURL" );
+static const OUStringLiteral gsLineEndTableURL( "LineEndTableURL" );
+static const OUStringLiteral gsHatchTableURL( "HatchTableURL" );
+static const OUStringLiteral gsDashTableURL( "DashTableURL" );
+static const OUStringLiteral gsGradientTableURL( "GradientTableURL" );
+static const OUStringLiteral gsBitmapTableURL( "BitmapTableURL" );
+
XMLSettingsExportHelper::XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext )
: m_rContext( i_rContext )
-, msPrinterIndependentLayout( "PrinterIndependentLayout" )
-, msColorTableURL( "ColorTableURL" )
-, msLineEndTableURL( "LineEndTableURL" )
-, msHatchTableURL( "HatchTableURL" )
-, msDashTableURL( "DashTableURL" )
-, msGradientTableURL( "GradientTableURL" )
-, msBitmapTableURL( "BitmapTableURL" )
{
}
@@ -483,7 +484,7 @@ void XMLSettingsExportHelper::exportAllSettings(
*/
void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const OUString& rName ) const
{
- if( rName == msPrinterIndependentLayout )
+ if( rName == gsPrinterIndependentLayout )
{
sal_Int16 nTmp = sal_Int16();
if( rAny >>= nTmp )
@@ -496,8 +497,8 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const OUString&
rAny <<= OUString("high-resolution");
}
}
- else if( (rName == msColorTableURL) || (rName == msLineEndTableURL) || (rName == msHatchTableURL) ||
- (rName == msDashTableURL) || (rName == msGradientTableURL) || (rName == msBitmapTableURL ) )
+ else if( (rName == gsColorTableURL) || (rName == gsLineEndTableURL) || (rName == gsHatchTableURL) ||
+ (rName == gsDashTableURL) || (rName == gsGradientTableURL) || (rName == gsBitmapTableURL ) )
{
if( !mxStringSubsitution.is() )
{