diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 09:53:33 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 10:06:26 +0100 |
commit | a0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch) | |
tree | c0d3443a27d9dc10266760110e96b50cce46ef02 /package | |
parent | e9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff) |
const OUString -> const OUStringLiteral
Mostly automated rewrite
Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/manifest/ManifestExport.cxx | 36 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 38 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 10 |
3 files changed, 42 insertions, 42 deletions
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx index c3c4be339646..7ac46874f7ae 100644 --- a/package/source/manifest/ManifestExport.cxx +++ b/package/source/manifest/ManifestExport.cxx @@ -89,24 +89,24 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con const OUString sAlgorithmAttribute13 ( ATTRIBUTE_ALGORITHM13 ); const OUString sCipherDataElement13 ( ELEMENT_CIPHERDATA13 ); const OUString sCipherValueElement13 ( ELEMENT_CIPHERVALUE13 ); - const OUString sKeyInfo ( "KeyInfo" ); - const OUString sPgpKeyIDProperty ( "KeyId" ); - const OUString sPgpKeyPacketProperty ( "KeyPacket" ); - const OUString sCipherValueProperty ( "CipherValue" ); - const OUString sFullPathProperty ( "FullPath" ); - const OUString sVersionProperty ( "Version" ); - const OUString sMediaTypeProperty ( "MediaType" ); - const OUString sIterationCountProperty ( "IterationCount" ); - const OUString sDerivedKeySizeProperty ( "DerivedKeySize" ); - const OUString sSaltProperty ( "Salt" ); - const OUString sInitialisationVectorProperty( "InitialisationVector" ); - const OUString sSizeProperty ( "Size" ); - const OUString sDigestProperty ( "Digest" ); - const OUString sEncryptionAlgProperty ( "EncryptionAlgorithm" ); - const OUString sStartKeyAlgProperty ( "StartKeyAlgorithm" ); - const OUString sDigestAlgProperty ( "DigestAlgorithm" ); - - const OUString sWhiteSpace ( " " ); + static const OUStringLiteral sKeyInfo ( u"KeyInfo" ); + static const OUStringLiteral sPgpKeyIDProperty ( u"KeyId" ); + static const OUStringLiteral sPgpKeyPacketProperty ( u"KeyPacket" ); + static const OUStringLiteral sCipherValueProperty ( u"CipherValue" ); + static const OUStringLiteral sFullPathProperty ( u"FullPath" ); + static const OUStringLiteral sVersionProperty ( u"Version" ); + static const OUStringLiteral sMediaTypeProperty ( u"MediaType" ); + static const OUStringLiteral sIterationCountProperty ( u"IterationCount" ); + static const OUStringLiteral sDerivedKeySizeProperty ( u"DerivedKeySize" ); + static const OUStringLiteral sSaltProperty ( u"Salt" ); + static const OUStringLiteral sInitialisationVectorProperty( u"InitialisationVector" ); + static const OUStringLiteral sSizeProperty ( u"Size" ); + static const OUStringLiteral sDigestProperty ( u"Digest" ); + static const OUStringLiteral sEncryptionAlgProperty ( u"EncryptionAlgorithm" ); + static const OUStringLiteral sStartKeyAlgProperty ( u"StartKeyAlgorithm" ); + static const OUStringLiteral sDigestAlgProperty ( u"DigestAlgorithm" ); + + static const OUStringLiteral sWhiteSpace ( u" " ); const OUString sSHA256_URL_ODF12 ( SHA256_URL_ODF12 ); const OUString sSHA1_Name ( SHA1_NAME ); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 3de64f6502b2..c31697f24184 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -174,11 +174,11 @@ void ZipPackage::parseManifest() return; bool bManifestParsed = false; - const OUString sMeta ("META-INF"); + static const OUStringLiteral sMeta (u"META-INF"); if ( m_xRootFolder->hasByName( sMeta ) ) { try { - const OUString sManifest ("manifest.xml"); + static const OUStringLiteral sManifest (u"manifest.xml"); uno::Reference< XUnoTunnel > xTunnel; Any aAny = m_xRootFolder->getByName( sMeta ); aAny >>= xTunnel; @@ -192,19 +192,19 @@ void ZipPackage::parseManifest() { uno::Reference < XManifestReader > xReader = ManifestReader::create( m_xContext ); - const OUString sPropFullPath ("FullPath"); - const OUString sPropVersion ("Version"); - const OUString sPropMediaType ("MediaType"); - const OUString sPropInitialisationVector ("InitialisationVector"); - const OUString sPropSalt ("Salt"); - const OUString sPropIterationCount ("IterationCount"); - const OUString sPropSize ("Size"); - const OUString sPropDigest ("Digest"); - const OUString sPropDerivedKeySize ("DerivedKeySize"); - const OUString sPropDigestAlgorithm ("DigestAlgorithm"); - const OUString sPropEncryptionAlgorithm ("EncryptionAlgorithm"); - const OUString sPropStartKeyAlgorithm ("StartKeyAlgorithm"); - const OUString sKeyInfo ("KeyInfo"); + static const OUStringLiteral sPropFullPath (u"FullPath"); + static const OUStringLiteral sPropVersion (u"Version"); + static const OUStringLiteral sPropMediaType (u"MediaType"); + static const OUStringLiteral sPropInitialisationVector (u"InitialisationVector"); + static const OUStringLiteral sPropSalt (u"Salt"); + static const OUStringLiteral sPropIterationCount (u"IterationCount"); + static const OUStringLiteral sPropSize (u"Size"); + static const OUStringLiteral sPropDigest (u"Digest"); + static const OUStringLiteral sPropDerivedKeySize (u"DerivedKeySize"); + static const OUStringLiteral sPropDigestAlgorithm (u"DigestAlgorithm"); + static const OUStringLiteral sPropEncryptionAlgorithm (u"EncryptionAlgorithm"); + static const OUStringLiteral sPropStartKeyAlgorithm (u"StartKeyAlgorithm"); + static const OUStringLiteral sKeyInfo (u"KeyInfo"); const uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence = xReader->readManifestSequence ( xSink->getInputStream() ); ZipPackageStream *pStream = nullptr; @@ -380,7 +380,7 @@ void ZipPackage::parseManifest() throw ZipIOException( THROW_WHERE "Could not parse manifest.xml" ); - const OUString sMimetype ("mimetype"); + static const OUStringLiteral sMimetype (u"mimetype"); if ( m_xRootFolder->hasByName( sMimetype ) ) { // get mediatype from the "mimetype" stream @@ -458,7 +458,7 @@ void ZipPackage::parseContentType() return; try { - const OUString aContentTypes("[Content_Types].xml"); + static const OUStringLiteral aContentTypes(u"[Content_Types].xml"); // the content type must exist in OFOPXML format! if ( !m_xRootFolder->hasByName( aContentTypes ) ) throw io::IOException(THROW_WHERE "Wrong format!" ); @@ -1015,7 +1015,7 @@ uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( c void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut ) { - const OUString sMime ("mimetype"); + static const OUStringLiteral sMime (u"mimetype"); if ( m_xRootFolder->hasByName( sMime ) ) m_xRootFolder->removeByName( sMime ); @@ -1229,7 +1229,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile() if ( m_xRootFolder->hasByName( sMeta ) ) { - const OUString sManifest ("manifest.xml"); + static const OUStringLiteral sManifest (u"manifest.xml"); uno::Reference< XUnoTunnel > xTunnel; Any aAny = m_xRootFolder->getByName( sMeta ); diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index fb1794841809..19cc550a3e85 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -452,11 +452,11 @@ bool ZipPackageStream::saveChild( { bool bSuccess = true; - const OUString sDigestProperty ("Digest"); - const OUString sEncryptionAlgProperty ("EncryptionAlgorithm"); - const OUString sStartKeyAlgProperty ("StartKeyAlgorithm"); - const OUString sDigestAlgProperty ("DigestAlgorithm"); - const OUString sDerivedKeySizeProperty ("DerivedKeySize"); + static const OUStringLiteral sDigestProperty (u"Digest"); + static const OUStringLiteral sEncryptionAlgProperty (u"EncryptionAlgorithm"); + static const OUStringLiteral sStartKeyAlgProperty (u"StartKeyAlgorithm"); + static const OUStringLiteral sDigestAlgProperty (u"DigestAlgorithm"); + static const OUStringLiteral sDerivedKeySizeProperty (u"DerivedKeySize"); uno::Sequence < beans::PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST); |