drawinglayer/qa/unit/vclmetafileprocessor2d.cxx | 2 drawinglayer/qa/unit/vclpixelprocessor2d.cxx | 2 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx | 6 drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 128 +++--- drawinglayer/source/dumper/XShapeDumper.cxx | 226 +++++------ drawinglayer/source/primitive2d/Tools.cxx | 154 +++---- drawinglayer/source/primitive2d/controlprimitive2d.cxx | 4 drawinglayer/source/primitive3d/Tools.cxx | 38 - drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 4 drawinglayer/source/tools/emfpbrush.cxx | 12 drawinglayer/source/tools/emfphelperdata.cxx | 98 ++-- drawinglayer/source/tools/emfppen.cxx | 44 +- drawinglayer/source/tools/emfpstringformat.cxx | 40 - drawinglayer/source/tools/primitive2dxmldump.cxx | 2 embeddedobj/qa/cppunit/general.cxx | 26 - embeddedobj/source/commonembedding/embedobj.cxx | 40 - embeddedobj/source/commonembedding/inplaceobj.cxx | 2 embeddedobj/source/commonembedding/miscobj.cxx | 8 embeddedobj/source/commonembedding/persistence.cxx | 114 ++--- embeddedobj/source/commonembedding/specialobject.cxx | 18 embeddedobj/source/commonembedding/visobj.cxx | 22 - embeddedobj/source/commonembedding/xfactory.cxx | 48 +- embeddedobj/source/general/docholder.cxx | 50 +- embeddedobj/source/general/dummyobject.cxx | 48 +- embeddedobj/source/general/intercept.cxx | 4 embeddedobj/source/general/xcreator.cxx | 38 - embeddedobj/source/msole/oleembed.cxx | 48 +- embeddedobj/source/msole/olemisc.cxx | 8 embeddedobj/source/msole/olepersist.cxx | 70 +-- embeddedobj/source/msole/olevisual.cxx | 28 - embeddedobj/source/msole/ownview.cxx | 8 embeddedobj/source/msole/xolefactory.cxx | 36 - 32 files changed, 691 insertions(+), 685 deletions(-)
New commits: commit ddf32ef202b48081fca020c06b5be3a6faf0a467 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 7 16:00:48 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed May 8 08:15:07 2024 +0200 loplugin:ostr in embeddedobj Change-Id: I644042d0ca6041174a8e11f780c546bcf7d4571a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167282 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/embeddedobj/qa/cppunit/general.cxx b/embeddedobj/qa/cppunit/general.cxx index 02ff289342a6..82bd2844388c 100644 --- a/embeddedobj/qa/cppunit/general.cxx +++ b/embeddedobj/qa/cppunit/general.cxx @@ -26,7 +26,7 @@ class Test : public UnoApiTest { public: Test() - : UnoApiTest("/embeddedobj/qa/cppunit/data/") + : UnoApiTest(u"/embeddedobj/qa/cppunit/data/"_ustr) { } }; @@ -46,14 +46,16 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfig) pBatchReset); pBatchReset->commit(); }); - mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument")); + mxComponent.set( + loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr)); // Insert a file as an embedded object. uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage(); comphelper::EmbeddedObjectContainer aContainer(xStorage); OUString aFileName = createFileURL(u"insert-file-config.doc"); - uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) }; - OUString aName("Object 1"); + uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr, + aFileName) }; + OUString aName(u"Object 1"_ustr); uno::Reference<embed::XEmbeddedObject> xObject = aContainer.InsertEmbeddedObject(aMedium, aName); @@ -77,14 +79,16 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigVsdx) officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::set(true, pBatchReset); pBatchReset->commit(); }); - mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument")); + mxComponent.set( + loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr)); // Insert a file as an embedded object. uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage(); comphelper::EmbeddedObjectContainer aContainer(xStorage); OUString aFileName = createFileURL(u"insert-file-config.vsdx"); - uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) }; - OUString aName("Object 1"); + uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr, + aFileName) }; + OUString aName(u"Object 1"_ustr); uno::Reference<embed::XEmbeddedObject> xObject = aContainer.InsertEmbeddedObject(aMedium, aName); @@ -108,14 +112,16 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigPdf) officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, pBatchReset); pBatchReset->commit(); }); - mxComponent.set(loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument")); + mxComponent.set( + loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr)); // Insert a PDF file as an embedded object. uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage(); comphelper::EmbeddedObjectContainer aContainer(xStorage); OUString aFileName = createFileURL(u"insert-file-config.pdf"); - uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) }; - OUString aName("Object 1"); + uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr, + aFileName) }; + OUString aName(u"Object 1"_ustr); uno::Reference<embed::XEmbeddedObject> xObject = aContainer.InsertEmbeddedObject(aMedium, aName); diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 61e5d1f39ef4..a5ce1443515e 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -170,7 +170,7 @@ void OCommonEmbeddedObject::Deactivate() { css::uno::Any anyEx = cppu::getCaughtException(); throw embed::StorageWrappedTargetException( - "The client could not store the object!", + u"The client could not store the object!"_ustr, static_cast< ::cppu::OWeakObject* >( this ), anyEx ); } @@ -220,7 +220,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( bool bBeforeChange, sa void OCommonEmbeddedObject::SetInplaceActiveState() { if ( !m_xClientSite.is() ) - throw embed::WrongStateException( "client site not set, yet", *this ); + throw embed::WrongStateException( u"client site not set, yet"_ustr, *this ); uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() ) @@ -302,7 +302,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) else { SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); - throw uno::RuntimeException("invalid next state, only RUNNING state allowed"); // TODO + throw uno::RuntimeException(u"invalid next state, only RUNNING state allowed"_ustr); // TODO } } else if ( m_nObjectState == embed::EmbedStates::RUNNING ) @@ -337,7 +337,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) else { SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); - throw uno::RuntimeException("invalid next state,only LOADED/INPLACE_ACTIVE/ACTIVE allowed"); // TODO + throw uno::RuntimeException(u"invalid next state,only LOADED/INPLACE_ACTIVE/ACTIVE allowed"_ustr); // TODO } } } @@ -405,7 +405,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) else { SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); - throw uno::RuntimeException("invalid next state,only RUNNING/UI_ACTIVE allowed"); // TODO + throw uno::RuntimeException(u"invalid next state,only RUNNING/UI_ACTIVE allowed"_ustr); // TODO } } else if ( m_nObjectState == embed::EmbedStates::ACTIVE ) @@ -418,7 +418,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) else { SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); - throw uno::RuntimeException("invalid next state, only RUNNING state allowed"); // TODO + throw uno::RuntimeException(u"invalid next state, only RUNNING state allowed"_ustr); // TODO } } else if ( m_nObjectState == embed::EmbedStates::UI_ACTIVE ) @@ -441,7 +441,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } } else - throw embed::WrongStateException( "The object is in unacceptable state!", + throw embed::WrongStateException( u"The object is in unacceptable state!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -455,7 +455,7 @@ uno::Sequence< sal_Int32 > const & OCommonEmbeddedObject::GetIntermediateStatesS break; if ( nCurInd == rAcceptedStates.getLength() ) - throw embed::WrongStateException( "The object is in unacceptable state!", + throw embed::WrongStateException( u"The object is in unacceptable state!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); sal_Int32 nDestInd = 0; @@ -465,7 +465,7 @@ uno::Sequence< sal_Int32 > const & OCommonEmbeddedObject::GetIntermediateStatesS if ( nDestInd == rAcceptedStates.getLength() ) throw embed::UnreachableStateException( - "The state either not reachable, or the object allows the state only as an intermediate one!", + u"The state either not reachable, or the object allows the state only as an intermediate one!"_ustr, static_cast< ::cppu::OWeakObject* >(this), m_nObjectState, nNewState ); @@ -484,7 +484,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); sal_Int32 nOldState = m_nObjectState; @@ -537,7 +537,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) // let the object window be shown if ( nNewState == embed::EmbedStates::UI_ACTIVE || nNewState == embed::EmbedStates::INPLACE_ACTIVE ) - PostEvent_Impl( "OnVisAreaChanged" ); + PostEvent_Impl( u"OnVisAreaChanged"_ustr ); } @@ -547,7 +547,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return getAcceptedStates(); @@ -560,7 +560,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_nObjectState; @@ -584,7 +584,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // for internal documents this call is just a duplicate of changeState @@ -615,7 +615,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_aObjectVerbs; @@ -633,7 +633,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - "The client site can not be set currently!", + u"The client site can not be set currently!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); m_xClientSite = xClient; @@ -647,7 +647,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_xClientSite; @@ -661,10 +661,10 @@ void SAL_CALL OCommonEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); - PostEvent_Impl( "OnVisAreaChanged" ); + PostEvent_Impl( u"OnVisAreaChanged"_ustr ); } @@ -675,7 +675,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE diff --git a/embeddedobj/source/commonembedding/inplaceobj.cxx b/embeddedobj/source/commonembedding/inplaceobj.cxx index c58d53358b66..86a7ef63a404 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -44,7 +44,7 @@ void SAL_CALL OCommonEmbeddedObject::setObjectRectangles( const awt::Rectangle& if ( m_nObjectState != embed::EmbedStates::INPLACE_ACTIVE && m_nObjectState != embed::EmbedStates::UI_ACTIVE ) - throw embed::WrongStateException( "The object is not activated inplace!", + throw embed::WrongStateException( u"The object is not activated inplace!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); awt::Rectangle aNewRectToShow = GetRectangleInterception( aPosRect, aClipRect ); diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index f34a35a2c1ac..2ea0dc59a07e 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -563,7 +563,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw uno::RuntimeException( "Can't store object without persistence!", + throw uno::RuntimeException( u"Can't store object without persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -736,7 +736,7 @@ void SAL_CALL OCommonEmbeddedObject::removeEventListener( const uno::Reference< OUString SAL_CALL OCommonEmbeddedObject::getImplementationName() { - return "com.sun.star.comp.embed.OCommonEmbeddedObject"; + return u"com.sun.star.comp.embed.OCommonEmbeddedObject"_ustr; } sal_Bool SAL_CALL OCommonEmbeddedObject::supportsService(const OUString& ServiceName) @@ -746,7 +746,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::supportsService(const OUString& Service uno::Sequence<OUString> SAL_CALL OCommonEmbeddedObject::getSupportedServiceNames() { - return { "com.sun.star.comp.embed.OCommonEmbeddedObject" }; + return { u"com.sun.star.comp.embed.OCommonEmbeddedObject"_ustr }; } uno::Sequence<uno::Type> SAL_CALL OCommonEmbeddedObject::getTypes() @@ -778,7 +778,7 @@ void SAL_CALL OCommonEmbeddedObject::initialize(const uno::Sequence<uno::Any>& r } comphelper::SequenceAsHashMap aMap(rArguments[0]); - auto it = aMap.find("ReadOnly"); + auto it = aMap.find(u"ReadOnly"_ustr); if (it != aMap.end()) { it->second >>= m_bReadOnly; diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 80fc047b1016..0abb340f4d32 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -143,7 +143,7 @@ static uno::Reference< io::XInputStream > createTempInpStreamFromStor( { css::uno::Any anyEx = cppu::getCaughtException(); throw embed::StorageWrappedTargetException( - "Can't copy storage!", + u"Can't copy storage!"_ustr, uno::Reference< uno::XInterface >(), anyEx ); } @@ -225,7 +225,7 @@ static void SetDocToEmbedded( const uno::Reference< frame::XModel >& rDocument, if (!rDocument.is()) return; - uno::Sequence< beans::PropertyValue > aSeq{ comphelper::makePropertyValue("SetEmbedded", true) }; + uno::Sequence< beans::PropertyValue > aSeq{ comphelper::makePropertyValue(u"SetEmbedded"_ustr, true) }; rDocument->attachResource( OUString(), aSeq ); if ( !aModuleName.isEmpty() ) @@ -381,7 +381,7 @@ bool OCommonEmbeddedObject::getAllowLinkUpdate() const uno::Reference<beans::XPropertySet> xPropSet(xParent, uno::UNO_QUERY); if (xPropSet.is()) { - uno::Any aAny = xPropSet->getPropertyValue("AllowLinkUpdate"); + uno::Any aAny = xPropSet->getPropertyValue(u"AllowLinkUpdate"_ustr); aAny >>= bAllowLinkUpdate; } } @@ -488,7 +488,7 @@ OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const if (comphelper::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT && sDocumentServiceName == "com.sun.star.chart2.ChartDocument") { - return "chart8"; + return u"chart8"_ustr; } try { ::comphelper::MimeConfigurationHelper aHelper( m_xContext ); @@ -508,16 +508,16 @@ OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const void OCommonEmbeddedObject::FillDefaultLoadArgs_Impl( const uno::Reference< embed::XStorage >& i_rxStorage, ::comphelper::NamedValueCollection& o_rLoadArgs ) const { - o_rLoadArgs.put( "DocumentBaseURL", GetBaseURL_Impl() ); - o_rLoadArgs.put( "HierarchicalDocumentName", m_aEntryName ); - o_rLoadArgs.put( "ReadOnly", m_bReadOnly ); + o_rLoadArgs.put( u"DocumentBaseURL"_ustr, GetBaseURL_Impl() ); + o_rLoadArgs.put( u"HierarchicalDocumentName"_ustr, m_aEntryName ); + o_rLoadArgs.put( u"ReadOnly"_ustr, m_bReadOnly ); OUString aFilterName = GetFilterName( ::comphelper::OStorageHelper::GetXStorageFormat( i_rxStorage ) ); SAL_WARN_IF( aFilterName.isEmpty(), "embeddedobj.common", "OCommonEmbeddedObject::FillDefaultLoadArgs_Impl: Wrong document service name!" ); if ( aFilterName.isEmpty() ) throw io::IOException(); // TODO: error message/code - o_rLoadArgs.put( "FilterName", aFilterName ); + o_rLoadArgs.put( u"FilterName"_ustr, aFilterName ); } @@ -560,7 +560,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempInpStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue("Uri") >>= aTempFileURL; + xTempStreamProps->getPropertyValue(u"Uri"_ustr) >>= aTempFileURL; } catch( const uno::Exception& ) { @@ -568,8 +568,8 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag SAL_WARN_IF( aTempFileURL.isEmpty(), "embeddedobj.common", "Couldn't retrieve temporary file URL!" ); - aLoadArgs.put( "URL", aTempFileURL ); - aLoadArgs.put( "InputStream", xTempInpStream ); + aLoadArgs.put( u"URL"_ustr, aTempFileURL ); + aLoadArgs.put( u"InputStream"_ustr, xTempInpStream ); } @@ -582,7 +582,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag if (m_bReadOnly) { - aLoadArgs.put("ReadOnly", true); + aLoadArgs.put(u"ReadOnly"_ustr, true); } if ( xDoc.is() ) @@ -633,22 +633,22 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr } if( !xStorable.is() ) - throw uno::RuntimeException("No storage is provided for storing!"); // TODO: + throw uno::RuntimeException(u"No storage is provided for storing!"_ustr); // TODO: OUString aFilterName = GetFilterName( nStorageFormat ); SAL_WARN_IF( aFilterName.isEmpty(), "embeddedobj.common", "Wrong document service name!" ); if ( aFilterName.isEmpty() ) - throw io::IOException("No filter name provided / Wrong document service name"); // TODO: + throw io::IOException(u"No filter name provided / Wrong document service name"_ustr); // TODO: uno::Sequence< beans::PropertyValue > aArgs{ - comphelper::makePropertyValue("FilterName", aFilterName), - comphelper::makePropertyValue("OutputStream", xTempOut), - comphelper::makePropertyValue("DocumentBaseURL", aBaseURL), - comphelper::makePropertyValue("HierarchicalDocumentName", aHierarchName) + comphelper::makePropertyValue(u"FilterName"_ustr, aFilterName), + comphelper::makePropertyValue(u"OutputStream"_ustr, xTempOut), + comphelper::makePropertyValue(u"DocumentBaseURL"_ustr, aBaseURL), + comphelper::makePropertyValue(u"HierarchicalDocumentName"_ustr, aHierarchName) }; - xStorable->storeToURL( "private:stream", aArgs ); + xStorable->storeToURL( u"private:stream"_ustr, aArgs ); try { xTempOut->closeOutput(); @@ -922,7 +922,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue("Uri") >>= aTempFileURL; + xTempStreamProps->getPropertyValue(u"Uri"_ustr) >>= aTempFileURL; } catch( const uno::Exception& ) { @@ -931,18 +931,18 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ SAL_WARN_IF( aTempFileURL.isEmpty(), "embeddedobj.common", "Couldn't retrieve temporary file URL!" ); aTempMediaDescr - = { comphelper::makePropertyValue("URL", aTempFileURL), - comphelper::makePropertyValue("InputStream", xTempStream), - comphelper::makePropertyValue("FilterName", GetFilterName( nStorageFormat )), - comphelper::makePropertyValue("AsTemplate", true) }; + = { comphelper::makePropertyValue(u"URL"_ustr, aTempFileURL), + comphelper::makePropertyValue(u"InputStream"_ustr, xTempStream), + comphelper::makePropertyValue(u"FilterName"_ustr, GetFilterName( nStorageFormat )), + comphelper::makePropertyValue(u"AsTemplate"_ustr, true) }; } else { aTempMediaDescr = { comphelper::makePropertyValue( - "URL", + u"URL"_ustr, // tdf#141529 use URL of the linked TempFile if it exists m_aLinkTempFile.is() ? m_aLinkTempFile->getUri() : m_aLinkURL), - comphelper::makePropertyValue("FilterName", m_aLinkFilterName) }; + comphelper::makePropertyValue(u"FilterName"_ustr, m_aLinkFilterName) }; } xResult = CreateDocFromMediaDescr_Impl( aTempMediaDescr ); @@ -966,12 +966,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -986,7 +986,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // it can switch persistent representation only without initialization throw embed::WrongStateException( - "Can't change persistent representation of activated object!", + u"Can't change persistent representation of activated object!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -994,7 +994,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( { if ( nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // saveCompleted is expected, handle it accordingly if ( m_xNewParentStorage == xStorage && m_aNewEntryName == sEntName ) @@ -1162,7 +1162,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( "Wrong connection mode is provided!", + throw lang::IllegalArgumentException( u"Wrong connection mode is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); } @@ -1181,13 +1181,13 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "Can't store object without persistence!", + throw embed::WrongStateException( u"Can't store object without persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1311,13 +1311,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "Can't store object without persistence!", + throw embed::WrongStateException( u"Can't store object without persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1368,7 +1368,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: SAL_WARN( "embeddedobj.common", "Can not retrieve own storage media type!" ); } - PostEvent_Impl( "OnSaveAs" ); + PostEvent_Impl( u"OnSaveAs"_ustr ); bool bTryOptimization = false; for ( beans::PropertyValue const & prop : lObjArgs ) @@ -1452,7 +1452,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "Can't store object without persistence!", + throw embed::WrongStateException( u"Can't store object without persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -1488,7 +1488,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xModif.is() ) xModif->setModified( false ); - PostEvent_Impl( "OnSaveAsDone"); + PostEvent_Impl( u"OnSaveAsDone"_ustr); } else { @@ -1526,7 +1526,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_xObjectStorage.is() ) @@ -1545,13 +1545,13 @@ OUString SAL_CALL OCommonEmbeddedObject::getEntryName() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "The object persistence is not initialized!", + throw embed::WrongStateException( u"The object persistence is not initialized!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_aEntryName; @@ -1571,13 +1571,13 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "Can't store object without persistence!", + throw embed::WrongStateException( u"Can't store object without persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bReadOnly ) @@ -1587,7 +1587,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == embed::EmbedStates::LOADED ) return; - PostEvent_Impl( "OnSave" ); + PostEvent_Impl( u"OnSave"_ustr ); SAL_WARN_IF( !m_xDocHolder->GetComponent().is(), "embeddedobj.common", "If an object is activated or in running state it must have a document!" ); if ( !m_xDocHolder->GetComponent().is() ) @@ -1634,7 +1634,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() aGuard.clear(); uno::Sequence<beans::PropertyValue> aEmpty; uno::Sequence<beans::PropertyValue> aMediaArgs{ comphelper::makePropertyValue( - "DocumentBaseURL", GetBaseURL_Impl()) }; + u"DocumentBaseURL"_ustr, GetBaseURL_Impl()) }; StoreDocToStorage_Impl( m_xObjectStorage, aMediaArgs, aEmpty, nStorageFormat, m_aEntryName, true ); aGuard.reset(); } @@ -1643,7 +1643,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( xModif.is() ) xModif->setModified( false ); - PostEvent_Impl( "OnSaveDone" ); + PostEvent_Impl( u"OnSaveDone"_ustr ); } @@ -1656,13 +1656,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "The object persistence is not initialized!", + throw embed::WrongStateException( u"The object persistence is not initialized!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_bReadOnly; @@ -1683,7 +1683,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( "The object persistence is not initialized!", + throw embed::WrongStateException( u"The object persistence is not initialized!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -1691,13 +1691,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( - "The object must be in loaded state to be reloaded!", + u"The object must be in loaded state to be reloaded!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bIsLinkURL ) @@ -1729,7 +1729,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( else { uno::Sequence< beans::PropertyValue > aArgs{ comphelper::makePropertyValue( - "URL", m_aLinkURL) }; + u"URL"_ustr, m_aLinkURL) }; m_aLinkFilterName = aHelper.UpdateMediaDescriptorWithFilterName( aArgs, false ); } } @@ -1804,25 +1804,25 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - "The object is not a valid linked object!", + u"The object is not a valid linked object!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } // the current implementation of OOo links does not implement this method since it does not implement // all the set of interfaces required for OOo embedded object ( XEmbedPersist is not supported ). if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY_THROW ); @@ -1896,7 +1896,7 @@ OUString SAL_CALL OCommonEmbeddedObject::getLinkURL() if ( !m_bIsLinkURL ) throw embed::WrongStateException( - "The object is not a link object!", + u"The object is not a link object!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_aLinkURL; diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index a2f282ed1aae..82380d851e3c 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -73,13 +73,13 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR // TODO: if object is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 || m_nObjectState == embed::EmbedStates::LOADED ) - throw embed::WrongStateException( "The own object has no model!", + throw embed::WrongStateException( u"The own object has no model!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // TODO: return for the aspect of the document @@ -96,7 +96,7 @@ void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, cons OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); maSize = aSize; @@ -111,11 +111,11 @@ awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The own object has no model!", + throw embed::WrongStateException( u"The own object has no model!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return maSize; @@ -130,7 +130,7 @@ sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -154,7 +154,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( nVerbID == -7 ) @@ -179,7 +179,7 @@ void SAL_CALL OSpecialEmbeddedObject::reload( OUString SAL_CALL OSpecialEmbeddedObject::getImplementationName() { - return "com.sun.star.comp.embed.OSpecialEmbeddedObject"; + return u"com.sun.star.comp.embed.OSpecialEmbeddedObject"_ustr; } sal_Bool SAL_CALL OSpecialEmbeddedObject::supportsService(const OUString& ServiceName) @@ -189,7 +189,7 @@ sal_Bool SAL_CALL OSpecialEmbeddedObject::supportsService(const OUString& Servic uno::Sequence<OUString> SAL_CALL OSpecialEmbeddedObject::getSupportedServiceNames() { - return { "com.sun.star.comp.embed.OSpecialEmbeddedObject" }; + return { u"com.sun.star.comp.embed.OSpecialEmbeddedObject"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 851457609e7d..ea86e73084f2 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -40,11 +40,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The own object has no persistence!", + throw embed::WrongStateException( u"The own object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); m_bHasClonedSize = false; @@ -64,7 +64,7 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const changeState( embed::EmbedStates::LOADED ); if ( !bSuccess ) - throw uno::Exception("SetExtent failed", nullptr); // TODO: + throw uno::Exception(u"SetExtent failed"_ustr, nullptr); // TODO: } awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) @@ -74,7 +74,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The own object has no persistence!", + throw embed::WrongStateException( u"The own object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); @@ -98,7 +98,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) changeState( embed::EmbedStates::LOADED ); if ( !bSuccess ) - throw uno::Exception("GetExtent failed", nullptr); // TODO: + throw uno::Exception(u"GetExtent failed"_ustr, nullptr); // TODO: return aResult; } @@ -112,11 +112,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The own object has no persistence!", + throw embed::WrongStateException( u"The own object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bHasClonedSize ) @@ -149,14 +149,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The own object has no persistence!", + throw embed::WrongStateException( u"The own object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); bool bBackToLoaded = false; @@ -190,8 +190,8 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe uno::Reference< datatransfer::XTransferable > xTransferable( m_xDocHolder->GetComponent(), uno::UNO_QUERY_THROW ); datatransfer::DataFlavor aDataFlavor( - "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", - "GDIMetaFile", + u"application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\""_ustr, + u"GDIMetaFile"_ustr, cppu::UnoType<uno::Sequence< sal_Int8 >>::get() ); if( !xTransferable->isDataFlavorSupported( aDataFlavor )) diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index cdc6d94b351b..84ac5955b4c1 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -44,14 +44,14 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -75,7 +75,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta OUString aMediaType; try { - uno::Any aAny = xPropSet->getPropertyValue("MediaType"); + uno::Any aAny = xPropSet->getPropertyValue(u"MediaType"_ustr); aAny >>= aMediaType; } catch ( const uno::Exception& ) @@ -123,14 +123,14 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -176,16 +176,16 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -221,14 +221,14 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta { // the initialization is completely controlled by user if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -268,7 +268,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); uno::Reference< uno::XInterface > xResult; uno::Sequence< beans::PropertyValue > aTempMedDescr( aMediaDescr ); @@ -280,7 +280,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta prop.Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( "No URL for the link is provided!", + throw lang::IllegalArgumentException( u"No URL for the link is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -315,17 +315,17 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); uno::Reference< uno::XInterface > xResult; // the initialization is completely controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -337,7 +337,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta prop.Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( "No URL for the link is provided!", + throw lang::IllegalArgumentException( u"No URL for the link is provided!"_ustr, uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -365,7 +365,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName() { - return "com.sun.star.comp.embed.OOoEmbeddedObjectFactory"; + return u"com.sun.star.comp.embed.OOoEmbeddedObjectFactory"_ustr; } sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& ServiceName ) @@ -375,7 +375,7 @@ sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& Ser uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedServiceNames() { - return { "com.sun.star.embed.OOoEmbeddedObjectFactory", "com.sun.star.comp.embed.OOoEmbeddedObjectFactory" }; + return { u"com.sun.star.embed.OOoEmbeddedObjectFactory"_ustr, u"com.sun.star.comp.embed.OOoEmbeddedObjectFactory"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* @@ -396,7 +396,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea const uno::Sequence< beans::PropertyValue >& /*lObjArgs*/ ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active embedded content is disabled!"); + throw lang::NoSupportException(u"Active embedded content is disabled!"_ustr); uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByClassID( aClassID ); if ( !aObject.hasElements() ) throw io::IOException(); // unexpected mimetype of the storage @@ -411,7 +411,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::getImplementationName() { - return "com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"; + return u"com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"_ustr; } sal_Bool SAL_CALL OOoSpecialEmbeddedObjectFactory::supportsService( const OUString& ServiceName ) @@ -421,7 +421,7 @@ sal_Bool SAL_CALL OOoSpecialEmbeddedObjectFactory::supportsService( const OUStri uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::getSupportedServiceNames() { - return { "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory", "com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory" }; + return { u"com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"_ustr, u"com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 4fcb563bc424..ca91d964bc11 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -103,8 +103,8 @@ static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& const uno::Reference< frame::XDispatchProvider >& xSourceDisp ) { sal_Int32 nInd = 0; - OUString aModuleIdentPropName( "ModuleIdentifier" ); - OUString aDispProvPropName( "DispatchProvider" ); + OUString aModuleIdentPropName( u"ModuleIdentifier"_ustr ); + OUString aDispProvPropName( u"DispatchProvider"_ustr ); bool bModuleNameSet = false; bool bDispProvSet = false; @@ -173,10 +173,10 @@ DocumentHolder::DocumentHolder( uno::Reference< uno::XComponentContext > xContex } osl_atomic_decrement(&m_refCount); - m_aOutplaceFrameProps = { uno::Any(beans::NamedValue{ "TopWindow", uno::Any(true) }), - uno::Any(beans::NamedValue{ "MakeVisible", uno::Any(false) }), + m_aOutplaceFrameProps = { uno::Any(beans::NamedValue{ u"TopWindow"_ustr, uno::Any(true) }), + uno::Any(beans::NamedValue{ u"MakeVisible"_ustr, uno::Any(false) }), //TODO/LATER: should use parent document frame - uno::Any(beans::NamedValue{ "ParentFrame", uno::Any(xDesktop) }) }; + uno::Any(beans::NamedValue{ u"ParentFrame"_ustr, uno::Any(xDesktop) }) }; } @@ -354,7 +354,7 @@ bool DocumentHolder::SetFrameLMVisibility( const uno::Reference< frame::XFrame > { uno::Reference< css::frame::XLayoutManager > xLayoutManager; uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xLayoutManager; if ( xLayoutManager.is() ) { xLayoutManager->setVisible( bVisible ); @@ -420,7 +420,7 @@ bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& xPar } awt::WindowDescriptor aOwnWinDescriptor( awt::WindowClass_TOP, - "dockingwindow", + u"dockingwindow"_ustr, xMyParent, 0, awt::Rectangle(),//aOwnRectangle, @@ -516,7 +516,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() if( xUIConfigManager.is()) { xResult = xUIConfigManager->getSettings( - "private:resource/menubar/menubar", + u"private:resource/menubar/menubar"_ustr, false ); } } @@ -538,13 +538,13 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() xModConfSupplier->getUIConfigurationManager( aModuleIdent ), uno::UNO_SET_THROW ); xResult = xModUIConfMan->getSettings( - "private:resource/menubar/menubar", + u"private:resource/menubar/menubar"_ustr, false ); } } if ( !xResult.is() ) - throw uno::RuntimeException("Unable to retrieve the UI configuration menu.", getXWeak()); + throw uno::RuntimeException(u"Unable to retrieve the UI configuration menu."_ustr, getXWeak()); return xResult; } @@ -634,11 +634,11 @@ bool DocumentHolder::MergeMenus_Impl( const uno::Reference< css::frame::XLayoutM try { uno::Reference< css::ui::XUIElementSettings > xUISettings( - xContLM->getElement( "private:resource/menubar/menubar" ), + xContLM->getElement( u"private:resource/menubar/menubar"_ustr ), uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xContMenu = xUISettings->getSettings( true ); if ( !xContMenu.is() ) - throw uno::RuntimeException("Unable to merge the menu", getXWeak()); + throw uno::RuntimeException(u"Unable to merge the menu"_ustr, getXWeak()); uno::Reference< container::XIndexAccess > xOwnMenu = RetrieveOwnMenu_Impl(); uno::Reference< frame::XDispatchProvider > xOwnDisp( m_xFrame, uno::UNO_QUERY_THROW ); @@ -668,7 +668,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >& try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xOwnLM; xDocAreaAcc = xContainerLM->getDockingAreaAcceptor(); } catch( const uno::Exception& ){} @@ -692,7 +692,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >& xContainerLM->setDockingAreaAcceptor( uno::Reference < ui::XDockingAreaAcceptor >() ); uno::Reference< lang::XServiceInfo> xServiceInfo(m_xComponent, uno::UNO_QUERY); - if (!xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument")) + if (!xServiceInfo.is() || !xServiceInfo->supportsService(u"com.sun.star.chart2.ChartDocument"_ustr)) { // prevent further changes at this LM xContainerLM->setVisible(false); @@ -765,7 +765,7 @@ bool DocumentHolder::HideUI( const uno::Reference< css::frame::XLayoutManager >& try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -787,7 +787,7 @@ bool DocumentHolder::HideUI( const uno::Reference< css::frame::XLayoutManager >& xContainerLM->setDockingAreaAcceptor( xDocAreaAcc ); uno::Reference< lang::XServiceInfo> xServiceInfo(m_xComponent, uno::UNO_QUERY); - if (!xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument")) + if (!xServiceInfo.is() || !xServiceInfo->supportsService(u"com.sun.star.chart2.ChartDocument"_ustr)) { xContainerLM->setVisible(true); xContainerLM->unlock(); @@ -844,7 +844,7 @@ uno::Reference< frame::XFrame > const & DocumentHolder::GetDocFrame() uno::Reference< css::frame::XLayoutManager > xOwnLM; try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; + xPropSet->getPropertyValue(u"LayoutManager"_ustr) >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -949,8 +949,8 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace ) uno::Reference< frame::XComponentLoader > xComponentLoader( m_xFrame, uno::UNO_QUERY_THROW ); ::comphelper::NamedValueCollection aArgs; - aArgs.put( "Model", m_xComponent ); - aArgs.put( "ReadOnly", m_bReadOnly ); + aArgs.put( u"Model"_ustr, m_xComponent ); + aArgs.put( u"ReadOnly"_ustr, m_bReadOnly ); // set document title to show in the title bar css::uno::Reference< css::frame::XTitle > xModelTitle( xDoc, css::uno::UNO_QUERY ); @@ -965,22 +965,22 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace ) } if ( bInPlace ) - aArgs.put( "PluginMode", sal_Int16(1) ); + aArgs.put( u"PluginMode"_ustr, sal_Int16(1) ); OUString sUrl; uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY); if ( xServiceInfo.is() - && xServiceInfo->supportsService("com.sun.star.report.ReportDefinition") ) + && xServiceInfo->supportsService(u"com.sun.star.report.ReportDefinition"_ustr) ) { sUrl = ".component:DB/ReportDesign"; } else if( xServiceInfo.is() - && xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument")) + && xServiceInfo->supportsService(u"com.sun.star.chart2.ChartDocument"_ustr)) sUrl = "private:factory/schart"; else sUrl = "private:object"; xComponentLoader->loadComponentFromURL( sUrl, - "_self", + u"_self"_ustr, 0, aArgs.getPropertyValues() ); @@ -1114,7 +1114,7 @@ void SAL_CALL DocumentHolder::disposing( const css::lang::EventObject& aSource ) void SAL_CALL DocumentHolder::queryClosing( const lang::EventObject& aSource, sal_Bool /*bGetsOwnership*/ ) { if ( m_xComponent.is() && m_xComponent == aSource.Source && !m_bAllowClosing ) - throw util::CloseVetoException("To close an embedded document, close the document holder (document definition), not the document itself.", static_cast< ::cppu::OWeakObject*>(this)); + throw util::CloseVetoException(u"To close an embedded document, close the document holder (document definition), not the document itself."_ustr, static_cast< ::cppu::OWeakObject*>(this)); } @@ -1162,7 +1162,7 @@ void SAL_CALL DocumentHolder::modified( const lang::EventObject& aEvent ) // if the component does not support document::XEventBroadcaster // the modify notifications are used as workaround, but only for running state if( aEvent.Source == m_xComponent && m_pEmbedObj && m_pEmbedObj->getCurrentState() == embed::EmbedStates::RUNNING ) - m_pEmbedObj->PostEvent_Impl( "OnVisAreaChanged" ); + m_pEmbedObj->PostEvent_Impl( u"OnVisAreaChanged"_ustr ); } diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 4d2af144a479..5efb3da5a8a5 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -45,7 +45,7 @@ void ODummyEmbeddedObject::CheckInit_WrongState() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -55,7 +55,7 @@ void ODummyEmbeddedObject::CheckInit_Runtime() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw uno::RuntimeException( "The object has no persistence!", + throw uno::RuntimeException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } void ODummyEmbeddedObject::PostEvent_Impl( const OUString& aEventName ) @@ -203,7 +203,7 @@ void SAL_CALL ODummyEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); m_nCachedAspect = nAspect; @@ -220,12 +220,12 @@ awt::Size SAL_CALL ODummyEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( !m_bHasCachedSize || m_nCachedAspect != nAspect ) throw embed::NoVisualAreaSizeException( - "No size available!", + u"No size available!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_aCachedSize; @@ -240,7 +240,7 @@ sal_Int32 SAL_CALL ODummyEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -253,7 +253,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep CheckInit_WrongState(); // no representation can be retrieved - throw embed::WrongStateException( "Illegal call!", + throw embed::WrongStateException( u"Illegal call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -270,12 +270,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -283,7 +283,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( && ( m_nObjectState == -1 || nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) ) { throw embed::WrongStateException( - "Can't change persistent representation of activated object!", + u"Can't change persistent representation of activated object!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -291,7 +291,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( { if ( nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); saveCompleted( m_xParentStorage != xStorage || m_aEntryName != sEntName ); @@ -300,12 +300,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( if ( nEntryConnectionMode != embed::EntryInitModes::DEFAULT_INIT && nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) - throw lang::IllegalArgumentException( "Wrong connection mode is provided!", + throw lang::IllegalArgumentException( u"Wrong connection mode is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); if ( !xStorage->hasByName( sEntName ) ) - throw lang::IllegalArgumentException( "Wrong entry is provided!", + throw lang::IllegalArgumentException( u"Wrong entry is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -325,7 +325,7 @@ void SAL_CALL ODummyEmbeddedObject::storeToEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -342,10 +342,10 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); - PostEvent_Impl( "OnSaveAs" ); + PostEvent_Impl( u"OnSaveAs"_ustr ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -377,7 +377,7 @@ void SAL_CALL ODummyEmbeddedObject::saveCompleted( sal_Bool bUseNew ) m_xParentStorage = m_xNewParentStorage; m_aEntryName = m_aNewEntryName; - PostEvent_Impl( "OnSaveAsDone" ); + PostEvent_Impl( u"OnSaveAsDone"_ustr ); } m_xNewParentStorage.clear(); @@ -393,7 +393,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( !m_aEntryName.isEmpty() ) @@ -410,7 +410,7 @@ OUString SAL_CALL ODummyEmbeddedObject::getEntryName() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_aEntryName; @@ -424,7 +424,7 @@ void SAL_CALL ODummyEmbeddedObject::storeOwn() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // the object can not be activated or changed @@ -438,7 +438,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // this object can not be changed @@ -455,7 +455,7 @@ void SAL_CALL ODummyEmbeddedObject::reload( if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - "The object waits for saveCompleted() call!", + u"The object waits for saveCompleted() call!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // nothing to reload @@ -622,7 +622,7 @@ void SAL_CALL ODummyEmbeddedObject::removeEventListener( const uno::Reference< d OUString SAL_CALL ODummyEmbeddedObject::getImplementationName() { - return "com.sun.star.comp.embed.ODummyEmbeddedObject"; + return u"com.sun.star.comp.embed.ODummyEmbeddedObject"_ustr; } sal_Bool SAL_CALL ODummyEmbeddedObject::supportsService(const OUString& ServiceName) @@ -632,7 +632,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::supportsService(const OUString& ServiceN uno::Sequence<OUString> SAL_CALL ODummyEmbeddedObject::getSupportedServiceNames() { - return { "com.sun.star.comp.embed.ODummyEmbeddedObject" }; + return { u"com.sun.star.comp.embed.ODummyEmbeddedObject"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 2ee2949bcf9f..45ffbc89bacf 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -110,7 +110,7 @@ Interceptor::dispatch( } uno::Reference< frame::XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( - URL, "_self", 0 ); + URL, u"_self"_ustr, 0 ); if ( xDispatch.is() ) xDispatch->dispatch( URL, aNewArgs ); } @@ -178,7 +178,7 @@ Interceptor::addStatusListener( aStateEvent.FeatureDescriptor = "SaveCopyTo"; aStateEvent.IsEnabled = true; aStateEvent.Requery = false; - aStateEvent.State <<= OUString("($3)"); + aStateEvent.State <<= u"($3)"_ustr; Control->statusChanged(aStateEvent); { diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index bceaab63c752..c6de2487766d 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -47,14 +47,14 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active OLE content is disabled!"); + throw lang::NoSupportException(u"Active OLE content is disabled!"_ustr); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 4 ); @@ -83,12 +83,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -109,7 +109,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< beans::XPropertySet > xPropSet( xSubStorage, uno::UNO_QUERY_THROW ); try { - uno::Any aAny = xPropSet->getPropertyValue("MediaType"); + uno::Any aAny = xPropSet->getPropertyValue(u"MediaType"_ustr); aAny >>= aMediaType; } catch ( const uno::Exception& ) @@ -138,7 +138,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< beans::XPropertySet > xPropSet( xSubStream, uno::UNO_QUERY_THROW ); try { - uno::Any aAny = xPropSet->getPropertyValue("MediaType"); + uno::Any aAny = xPropSet->getPropertyValue(u"MediaType"_ustr); aAny >>= aMediaType; if ( aMediaType == "application/vnd.sun.star.oleobject" ) aEmbedFactory = "com.sun.star.embed.OLEEmbeddedObjectFactory"; @@ -245,16 +245,16 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active OLE content is disabled!"); + throw lang::NoSupportException(u"Active OLE content is disabled!"_ustr); // TODO: use lObjArgs if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 2 ); @@ -308,14 +308,14 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& aObjectArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active OLE content is disabled!"); + throw lang::NoSupportException(u"Active OLE content is disabled!"_ustr); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 4 ); @@ -341,7 +341,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta const uno::Sequence< beans::PropertyValue >& lObjArgs ) { if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) - throw lang::NoSupportException("Active OLE content is disabled!"); + throw lang::NoSupportException(u"Active OLE content is disabled!"_ustr); uno::Reference< uno::XInterface > xResult; @@ -354,7 +354,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta prop.Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( "No URL for the link is provided!", + throw lang::IllegalArgumentException( u"No URL for the link is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); @@ -383,12 +383,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // was also extended. if ( !xStorage.is() ) - throw lang::IllegalArgumentException( "No parent storage is provided!", + throw lang::IllegalArgumentException( u"No parent storage is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( "Empty element name is provided!", + throw lang::IllegalArgumentException( u"Empty element name is provided!"_ustr, static_cast< ::cppu::OWeakObject* >(this), 4 ); @@ -403,7 +403,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta OUString SAL_CALL UNOEmbeddedObjectCreator::getImplementationName() { - return "com.sun.star.comp.embed.EmbeddedObjectCreator"; + return u"com.sun.star.comp.embed.EmbeddedObjectCreator"_ustr; } sal_Bool SAL_CALL UNOEmbeddedObjectCreator::supportsService( const OUString& ServiceName ) @@ -413,7 +413,7 @@ sal_Bool SAL_CALL UNOEmbeddedObjectCreator::supportsService( const OUString& Ser uno::Sequence< OUString > SAL_CALL UNOEmbeddedObjectCreator::getSupportedServiceNames() { - return { "com.sun.star.embed.EmbeddedObjectCreator", "com.sun.star.comp.embed.EmbeddedObjectCreator" }; + return { u"com.sun.star.embed.EmbeddedObjectCreator"_ustr, u"com.sun.star.comp.embed.EmbeddedObjectCreator"_ustr }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index a055ceae2249..a1e12ed5e3e8 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -217,7 +217,7 @@ uno::Reference< embed::XStorage > OleEmbeddedObject::CreateTemporarySubstorage( if ( !xResult.is() ) { o_aStorageName.clear(); - throw uno::RuntimeException("Failed to create temporary storage for OLE embed object"); + throw uno::RuntimeException(u"Failed to create temporary storage for OLE embed object"_ustr); } return xResult; @@ -238,7 +238,7 @@ OUString OleEmbeddedObject::MoveToTemporarySubstream() } if ( aResult.isEmpty() ) - throw uno::RuntimeException("Failed to rename temporary storage for OLE embed object"); + throw uno::RuntimeException(u"Failed to rename temporary storage for OLE embed object"_ustr); return aResult; } @@ -269,7 +269,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& || m_aFilterName == "MS Excel 97 Vorlage/Template" || m_aFilterName == "MS Word 97 Vorlage" ) ) { uno::Reference< container::XNameAccess > xFilterFactory( - m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.FilterFactory", m_xContext), + m_xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.document.FilterFactory"_ustr, m_xContext), uno::UNO_QUERY_THROW ); OUString aDocServiceName; @@ -286,7 +286,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& { // create the model uno::Sequence< uno::Any > aArguments{ uno::Any( - beans::NamedValue( "EmbeddedObject", uno::Any( true ))) }; + beans::NamedValue( u"EmbeddedObject"_ustr, uno::Any( true ))) }; uno::Reference< util::XCloseable > xDocument( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( aDocServiceName, aArguments, m_xContext ), uno::UNO_QUERY_THROW ); uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY_THROW ); @@ -295,16 +295,16 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& // let the model behave as embedded one uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aSeq{ comphelper::makePropertyValue( - "SetEmbedded", true) }; + u"SetEmbedded"_ustr, true) }; xModel->attachResource( OUString(), aSeq ); // load the model from the stream uno::Sequence< beans::PropertyValue > aArgs{ - comphelper::makePropertyValue("HierarchicalDocumentName", m_aEntryName), - comphelper::makePropertyValue("ReadOnly", true), - comphelper::makePropertyValue("FilterName", m_aFilterName), - comphelper::makePropertyValue("URL", OUString( "private:stream" )), - comphelper::makePropertyValue("InputStream", xStream->getInputStream()) + comphelper::makePropertyValue(u"HierarchicalDocumentName"_ustr, m_aEntryName), + comphelper::makePropertyValue(u"ReadOnly"_ustr, true), + comphelper::makePropertyValue(u"FilterName"_ustr, m_aFilterName), + comphelper::makePropertyValue(u"URL"_ustr, u"private:stream"_ustr), + comphelper::makePropertyValue(u"InputStream"_ustr, xStream->getInputStream()) }; xSeekable->seek( 0 ); @@ -316,7 +316,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& xDocument->close( true ); uno::Reference< beans::XPropertySet > xStorProps( xTmpStorage, uno::UNO_QUERY_THROW ); OUString aMediaType; - xStorProps->getPropertyValue("MediaType") >>= aMediaType; + xStorProps->getPropertyValue(u"MediaType"_ustr) >>= aMediaType; xTmpStorage->dispose(); // look for the related embedded object factory @@ -326,7 +326,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& aEmbedFactory = aConfigHelper.GetFactoryNameByMediaType( aMediaType ); if ( aEmbedFactory.isEmpty() ) - throw uno::RuntimeException("Failed to get OLE embedded object factory"); + throw uno::RuntimeException(u"Failed to get OLE embedded object factory"_ustr); uno::Reference< uno::XInterface > xFact = m_xContext->getServiceManager()->createInstanceWithContext( aEmbedFactory, m_xContext ); @@ -457,7 +457,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // in case the object is already in requested state @@ -609,7 +609,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); #ifdef _WIN32 @@ -652,7 +652,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); // TODO: Shouldn't we ask object? ( I guess no ) @@ -696,7 +696,7 @@ namespace uno::Any(true) }; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.embed.OLESimpleStorage", + u"com.sun.star.embed.OLESimpleStorage"_ustr, aArgs, xContext ), uno::UNO_QUERY_THROW ); //various stream names that can contain the real document contents for @@ -731,7 +731,7 @@ namespace uno::Reference< io::XStream > xOle10Native; try { - xNameContainer->getByName("Ole10Native") >>= xOle10Native; + xNameContainer->getByName(u"Ole10Native"_ustr) >>= xOle10Native; } catch (container::NoSuchElementException const&) { @@ -843,7 +843,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); #ifdef _WIN32 @@ -985,7 +985,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); #ifdef _WIN32 if ( m_pOleComponent ) @@ -1034,7 +1034,7 @@ void SAL_CALL OleEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - "The client site can not be set currently!", + u"The client site can not be set currently!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); m_xClientSite = xClient; @@ -1058,7 +1058,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); return m_xClientSite; @@ -1082,7 +1082,7 @@ void SAL_CALL OleEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) @@ -1114,7 +1114,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object has no persistence!", + throw embed::WrongStateException( u"The object has no persistence!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -1142,7 +1142,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( "The object must be in running state!", + throw embed::WrongStateException( u"The object must be in running state!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); sal_Int64 nResult = 0; diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 4f50aedeba5f..efed07fa187d 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -377,7 +377,7 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent() if ( m_nObjectState == -1 ) // || m_nObjectState == embed::EmbedStates::LOADED ) { // the object is still not running - throw uno::RuntimeException( "The object is not loaded!", + throw uno::RuntimeException( u"The object is not loaded!"_ustr, static_cast< ::cppu::OWeakObject* >(this) ); } @@ -687,14 +687,14 @@ void OleEmbeddedObject::initialize(const uno::Sequence<uno::Any>& rArguments) return; comphelper::SequenceAsHashMap aValues(rArguments[0]); - auto it = aValues.find("StreamReadOnly"); + auto it = aValues.find(u"StreamReadOnly"_ustr); if (it != aValues.end()) it->second >>= m_bStreamReadOnly; } OUString SAL_CALL OleEmbeddedObject::getImplementationName() { - return "com.sun.star.comp.embed.OleEmbeddedObject"; + return u"com.sun.star.comp.embed.OleEmbeddedObject"_ustr; } sal_Bool SAL_CALL OleEmbeddedObject::supportsService(const OUString& ServiceName) @@ -704,7 +704,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::supportsService(const OUString& ServiceName uno::Sequence<OUString> SAL_CALL OleEmbeddedObject::getSupportedServiceNames() { - return { "com.sun.star.comp.embed.OleEmbeddedObject" }; + return { u"com.sun.star.comp.embed.OleEmbeddedObject"_ustr }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index e6af72fedccf..486c636aee95 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -101,7 +101,7 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< uno::XComponentContext >& } if ( aResult.isEmpty() ) - throw uno::RuntimeException("Cannot create tempfile."); + throw uno::RuntimeException(u"Cannot create tempfile."_ustr); return aResult; } @@ -195,7 +195,7 @@ static void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStrea static void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStream ) { uno::Reference< beans::XPropertySet > xPropSet( xStream, uno::UNO_QUERY_THROW ); - xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption", + xPropSet->setPropertyValue(u"UseCommonStoragePasswordEncryption"_ustr, uno::Any( true ) ); } #ifdef _WIN32 @@ -365,7 +365,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea uno::Reference< container::XNameContainer > xNameContainer( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.embed.OLESimpleStorage", + u"com.sun.star.embed.OLESimpleStorage"_ustr, aArgs, m_xContext ), uno::UNO_QUERY_THROW ); @@ -483,7 +483,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea xCachedSeek->seek( 0 ); -e ... etc. - the rest is truncated