diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-12 20:24:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-14 08:40:00 +0200 |
commit | 39acaf84f9b23442e1333db7d213100c6997ffe6 (patch) | |
tree | b46dcc085448fd0b5e56ba9972db071452fc35fa /xmloff | |
parent | e61ce6b317be45e405ba9b45aa79d2f1dac41e19 (diff) |
elide temporary OUString in SvXMLExport::initialize
Change-Id: Ibf1b99042ccae1fcf5fb21ab7e60bb30a9ad74f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 7c2291156852..f8e72d6fb3f3 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -699,27 +699,26 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = mxExportInfo->getPropertySetInfo(); - OUString sPropName( - "BaseURI" ); - if( xPropertySetInfo->hasPropertyByName(sPropName) ) + static constexpr OUStringLiteral sBaseURI = u"BaseURI"; + if( xPropertySetInfo->hasPropertyByName(sBaseURI) ) { - uno::Any aAny = mxExportInfo->getPropertyValue(sPropName); + uno::Any aAny = mxExportInfo->getPropertyValue(sBaseURI); aAny >>= msOrigFileName; mpImpl->msPackageURI = msOrigFileName; mpImpl->SetSchemeOf( msOrigFileName ); } OUString sRelPath; - sPropName = "StreamRelPath"; - if( xPropertySetInfo->hasPropertyByName(sPropName) ) + static constexpr OUStringLiteral sStreamRelPath = u"StreamRelPath"; + if( xPropertySetInfo->hasPropertyByName(sStreamRelPath) ) { - uno::Any aAny = mxExportInfo->getPropertyValue(sPropName); + uno::Any aAny = mxExportInfo->getPropertyValue(sStreamRelPath); aAny >>= sRelPath; } OUString sName; - sPropName = "StreamName"; - if( xPropertySetInfo->hasPropertyByName(sPropName) ) + static constexpr OUStringLiteral sStreamName = u"StreamName"; + if( xPropertySetInfo->hasPropertyByName(sStreamName) ) { - uno::Any aAny = mxExportInfo->getPropertyValue(sPropName); + uno::Any aAny = mxExportInfo->getPropertyValue(sStreamName); aAny >>= sName; } if( !msOrigFileName.isEmpty() && !sName.isEmpty() ) |