diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 10:55:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-13 08:16:03 +0200 |
commit | 3457da6abe0fd03efd19442e9790fbd1aa04c160 (patch) | |
tree | a7a2d5b51839b200e7cda79af863dce7a04d3a10 /oox | |
parent | 47196637a41ddfc9a8707771b1b9f482fd72c3b6 (diff) |
loplugin:stringstatic also look for local statics
Add some API to O*StringLiteral, to make it easier
to use in some places that were using O*String
Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 4 | ||||
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 2 | ||||
-rw-r--r-- | oox/source/vml/vmlinputstream.cxx | 4 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index b3aec333967e..467758091ae7 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -247,7 +247,7 @@ void XmlFilterBase::putPropertiesToDocumentGrabBag(const css::uno::Reference<css { uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo(); - static const OUString aGrabBagPropName = "InteropGrabBag"; + static const OUStringLiteral aGrabBagPropName = "InteropGrabBag"; if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName)) { // get existing grab bag @@ -1033,7 +1033,7 @@ void XmlFilterBase::exportCustomFragments() uno::Reference<beans::XPropertySet> xPropSet(xModel, uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo(); - static const OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + static const OUStringLiteral aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; if (!xPropSetInfo->hasPropertyByName(aName)) return; diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 0a367874d2c4..cf8796e119d6 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -32,7 +32,7 @@ void lclRandomGenerateValues(sal_uInt8* aArray, sal_uInt32 aSize) rtl_random_destroyPool(aRandomPool); } -const OUString lclCspName = "Microsoft Enhanced RSA and AES Cryptographic Provider"; +const OUStringLiteral lclCspName = "Microsoft Enhanced RSA and AES Cryptographic Provider"; constexpr const sal_uInt32 AES128Size = 16; } // end anonymous namespace diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx index 5bc5b92db95b..72bceb6e4016 100644 --- a/oox/source/vml/vmlinputstream.cxx +++ b/oox/source/vml/vmlinputstream.cxx @@ -263,8 +263,8 @@ bool lclProcessCharacters( OStringBuffer& rBuffer, const OString& rChars ) } // namespace -const OString gaOpeningCData( "<![CDATA[" ); -const OString gaClosingCData( "]]>" ); +const OStringLiteral gaOpeningCData( "<![CDATA[" ); +const OStringLiteral gaClosingCData( "]]>" ); InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) : // use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 178d7c21f26a..f9ce59b8e431 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -290,7 +290,7 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent, { mrTypeModel.maShapeName = rAttribs.getXString( XML_id, OUString() ); // get ShapeType and ShapeId from name for compatibility - static const OUString sShapeTypePrefix = "shapetype_"; + static const OUStringLiteral sShapeTypePrefix = "shapetype_"; if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) ) { mrTypeModel.maShapeId = mrTypeModel.maShapeName; |