summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
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 /sw/source/filter/xml
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 'sw/source/filter/xml')
-rw-r--r--sw/source/filter/xml/xmltexte.cxx11
-rw-r--r--sw/source/filter/xml/xmltexte.hxx2
2 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 5775a3343257..977690a82729 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -75,11 +75,12 @@ SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode(
return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode();
}
+static const OUStringLiteral gsEmbeddedObjectProtocol( "vnd.sun.star.EmbeddedObject:" );
+
SwXMLTextParagraphExport::SwXMLTextParagraphExport(
SwXMLExport& rExp,
SvXMLAutoStylePoolP& _rAutoStylePool ) :
XMLTextParagraphExport( rExp, _rAutoStylePool ),
- sEmbeddedObjectProtocol( "vnd.sun.star.EmbeddedObject:" ),
aAppletClassId( SO3_APPLET_CLASSID ),
aPluginClassId( SO3_PLUGIN_CLASSID ),
aIFrameClassId( SO3_IFRAME_CLASSID )
@@ -277,9 +278,9 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
// First the stuff common to each of Applet/Plugin/Floating Frame
OUString sStyle;
Any aAny;
- if( rPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
{
- aAny = rPropSet->getPropertyValue( sFrameStyleName );
+ aAny = rPropSet->getPropertyValue( gsFrameStyleName );
aAny >>= sStyle;
}
@@ -344,7 +345,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
if ( !bIsOwnLink )
{
- sURL = sEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName();
+ sURL = gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName();
}
sURL = GetExport().AddEmbeddedObject( sURL );
@@ -496,7 +497,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
case SV_EMBEDDED_OUTPLACE:
if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
{
- OUString sURL( sEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
+ OUString sURL( gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
if ( !( rXMLExport.getExportFlags() & SvXMLExportFlags::OASIS ) )
sURL += "?oasis=false";
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index 38d0d2bdd02e..8da021506c0d 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -34,8 +34,6 @@ namespace com { namespace sun { namespace star { namespace style {
class SwXMLTextParagraphExport : public XMLTextParagraphExport
{
- const OUString sEmbeddedObjectProtocol;
-
const SvGlobalName aAppletClassId;
const SvGlobalName aPluginClassId;
const SvGlobalName aIFrameClassId;