diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 20:32:23 +0200 |
commit | 93c0780392758f783592f030aa2d4e824d57bb2f (patch) | |
tree | c39425c32c862df0f4b18a5161a194c20bb5e0b4 /embeddedobj | |
parent | 6581f028f85d72f3b85c873eaecd77a37c98ac31 (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: embeddedobj
Change-Id: I2761e0a093aff75c5660b2b78012277c67eb8e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158191
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 12 | ||||
-rw-r--r-- | embeddedobj/source/general/intercept.cxx | 12 | ||||
-rw-r--r-- | embeddedobj/source/msole/ownview.cxx | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 4bb8d19123a3..6859de216c24 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -178,7 +178,7 @@ static void TransferMediaType( const uno::Reference< embed::XStorage >& i_rSourc { const uno::Reference< beans::XPropertySet > xSourceProps( i_rSource, uno::UNO_QUERY_THROW ); const uno::Reference< beans::XPropertySet > xTargetProps( i_rTarget, uno::UNO_QUERY_THROW ); - static constexpr OUStringLiteral sMediaTypePropName( u"MediaType" ); + static constexpr OUString sMediaTypePropName( u"MediaType"_ustr ); xTargetProps->setPropertyValue( sMediaTypePropName, xSourceProps->getPropertyValue( sMediaTypePropName ) ); } catch( const uno::Exception& ) @@ -784,11 +784,11 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( if ( aFilterName.isEmpty() ) throw io::IOException(); // TODO: - static constexpr OUStringLiteral sFilterName = u"FilterName"; - static constexpr OUStringLiteral sHierarchicalDocumentName = u"HierarchicalDocumentName"; - static constexpr OUStringLiteral sDocumentBaseURL = u"DocumentBaseURL"; - static constexpr OUStringLiteral sSourceShellID = u"SourceShellID"; - static constexpr OUStringLiteral sDestinationShellID = u"DestinationShellID"; + static constexpr OUString sFilterName = u"FilterName"_ustr; + static constexpr OUString sHierarchicalDocumentName = u"HierarchicalDocumentName"_ustr; + static constexpr OUString sDocumentBaseURL = u"DocumentBaseURL"_ustr; + static constexpr OUString sSourceShellID = u"SourceShellID"_ustr; + static constexpr OUString sDestinationShellID = u"DestinationShellID"_ustr; uno::Sequence<beans::PropertyValue> aArgs{ comphelper::makePropertyValue(sFilterName, aFilterName), comphelper::makePropertyValue(sHierarchicalDocumentName, aHierarchName), diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 58a7ed49bcc0..db16a59b9d68 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -26,12 +26,12 @@ using namespace ::com::sun::star; -constexpr OUStringLiteral IU0 = u".uno:Save"; -constexpr OUStringLiteral IU1 = u".uno:SaveAll"; -constexpr OUStringLiteral IU2 = u".uno:CloseDoc"; -constexpr OUStringLiteral IU3 = u".uno:CloseWin"; -constexpr OUStringLiteral IU4 = u".uno:CloseFrame"; -constexpr OUStringLiteral IU5 = u".uno:SaveAs"; +constexpr OUString IU0 = u".uno:Save"_ustr; +constexpr OUString IU1 = u".uno:SaveAll"_ustr; +constexpr OUString IU2 = u".uno:CloseDoc"_ustr; +constexpr OUString IU3 = u".uno:CloseWin"_ustr; +constexpr OUString IU4 = u".uno:CloseFrame"_ustr; +constexpr OUString IU5 = u".uno:SaveAs"_ustr; const uno::Sequence< OUString > Interceptor::m_aInterceptedURL{ IU0, IU1, IU2, IU3, IU4, IU5 }; class StatusChangeListenerContainer diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index e4684d6d29bf..5576f8633cce 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -401,7 +401,7 @@ void OwnView_Impl::CreateNative() aArgs, m_xContext ), uno::UNO_QUERY_THROW ); - static constexpr OUStringLiteral aSubStreamName(u"\1Ole10Native"); + static constexpr OUString aSubStreamName(u"\1Ole10Native"_ustr); uno::Reference< embed::XClassifiedObject > xStor( xNameAccess, uno::UNO_QUERY_THROW ); uno::Sequence< sal_Int8 > aStorClassID = xStor->getClassID(); |