diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 16:00:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-08 08:15:07 +0200 |
commit | ddf32ef202b48081fca020c06b5be3a6faf0a467 (patch) | |
tree | e73528dcd387115c40b1ac7fcaf3f612c0f55180 /embeddedobj/source/general | |
parent | 8c67e94cf7a4349f365e1669d99e598dfd9c665c (diff) |
loplugin:ostr in embeddedobj
Change-Id: I644042d0ca6041174a8e11f780c546bcf7d4571a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167282
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'embeddedobj/source/general')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 50 | ||||
-rw-r--r-- | embeddedobj/source/general/dummyobject.cxx | 48 | ||||
-rw-r--r-- | embeddedobj/source/general/intercept.cxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 38 |
4 files changed, 70 insertions, 70 deletions
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* |