diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /embeddedobj | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'embeddedobj')
23 files changed, 306 insertions, 315 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index be9abc521060..974051b63a31 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -102,7 +102,7 @@ void OCommonEmbeddedObject::Deactivate() catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client could not store the object!" )), + ::rtl::OUString( "The client could not store the object!" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), uno::makeAny( e ) ); } @@ -227,7 +227,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) { if ( !m_xClientSite.is() ) throw embed::WrongStateException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "client site not set, yet" ) ), + ::rtl::OUString( "client site not set, yet" ), *this ); @@ -387,7 +387,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } } else - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is in unacceptable state!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -400,7 +400,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ break; if ( nCurInd == m_aAcceptedStates.getLength() ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is in unacceptable state!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nDestInd = 0; @@ -410,7 +410,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nDestInd == m_aAcceptedStates.getLength() ) throw embed::UnreachableStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The state either not reachable, or the object allows the state only as an intermediate one!\n" )), + ::rtl::OUString( "The state either not reachable, or the object allows the state only as an intermediate one!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), m_nObjectState, nNewState ); @@ -434,7 +434,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nOldState = m_nObjectState; @@ -487,7 +487,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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ) ); + PostEvent_Impl( ::rtl::OUString( "OnVisAreaChanged" ) ); } } @@ -500,7 +500,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aAcceptedStates; @@ -515,7 +515,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_nObjectState; @@ -546,7 +546,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for internal documents this call is just a duplicate of changeState @@ -579,7 +579,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aObjectVerbs; @@ -599,7 +599,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), + ::rtl::OUString( "The client site can not be set currently!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -615,7 +615,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -632,10 +632,10 @@ void SAL_CALL OCommonEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ) ); + PostEvent_Impl( ::rtl::OUString( "OnVisAreaChanged" ) ); } //---------------------------------------------- @@ -648,7 +648,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( 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 731603a6e8e9..d5aa627400b8 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -46,7 +46,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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not activated inplace!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not activated inplace!\n" ), uno::Reference< uno::XInterface >( 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 44a344d8b352..6b09b0742b9b 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -503,7 +503,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw uno::RuntimeException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index b7e61e485f83..fcd148936a24 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -110,7 +110,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: if ( !bAsTemplateSet ) { aResult.realloc( nLength + 1 ); - aResult[nLength].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); + aResult[nLength].Name = ::rtl::OUString( "AsTemplate" ); aResult[nLength].Value <<= sal_True; } @@ -144,7 +144,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( } catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't copy storage!" )), + ::rtl::OUString( "Can't copy storage!" ), uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -224,7 +224,7 @@ static void SetDocToEmbedded( const uno::Reference< frame::XModel > xDocument, c if ( xDocument.is() ) { uno::Sequence< beans::PropertyValue > aSeq( 1 ); - aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SetEmbedded" )); + aSeq[0].Name = ::rtl::OUString( "SetEmbedded" ); aSeq[0].Value <<= sal_True; xDocument->attachResource( ::rtl::OUString(), aSeq ); @@ -382,14 +382,14 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() sal_Int32 nLen = 2; uno::Sequence< beans::PropertyValue > aArgs( nLen ); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aArgs[0].Name = ::rtl::OUString( "URL" ); aArgs[0].Value <<= m_aLinkURL; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aArgs[1].Name = ::rtl::OUString( "FilterName" ); aArgs[1].Value <<= m_aLinkFilterName; if ( m_bLinkHasPassword ) { aArgs.realloc( ++nLen ); - aArgs[nLen-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Password" ) ); + aArgs[nLen-1].Name = ::rtl::OUString( "Password" ); aArgs[nLen-1].Value <<= m_aLinkPassword; } @@ -518,7 +518,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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString( "Uri" ) ) >>= aTempFileURL; } catch( const uno::Exception& ) { @@ -599,16 +599,16 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aArgs[0].Name = ::rtl::OUString( "FilterName" ); aArgs[0].Value <<= aFilterName; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OutputStream" )); + aArgs[1].Name = ::rtl::OUString( "OutputStream" ); aArgs[1].Value <<= xTempOut; - aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); + aArgs[2].Name = ::rtl::OUString( "DocumentBaseURL" ); aArgs[2].Value <<= aBaseURL; - aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); + aArgs[3].Name = ::rtl::OUString( "HierarchicalDocumentName" ); aArgs[3].Value <<= aHierarchName; - xStorable->storeToURL( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aArgs ); + xStorable->storeToURL( ::rtl::OUString( "private:stream" ), aArgs ); try { xTempOut->closeOutput(); @@ -661,7 +661,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() uno::Sequence< beans::PropertyValue > aModelProps = xParentModel->getArgs(); for ( nInd = 0; nInd < aModelProps.getLength(); nInd++ ) if ( aModelProps[nInd].Name.equals( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" ) ) ) ) + ::rtl::OUString( "DocumentBaseURL" ) ) ) { aModelProps[nInd].Value >>= aBaseURL; break; @@ -677,7 +677,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() { for ( nInd = 0; nInd < m_aDocMediaDescriptor.getLength(); nInd++ ) if ( m_aDocMediaDescriptor[nInd].Name.equals( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" ) ) ) ) + ::rtl::OUString( "DocumentBaseURL" ) ) ) { m_aDocMediaDescriptor[nInd].Value >>= aBaseURL; break; @@ -761,11 +761,11 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 3 ); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aArgs[0].Name = ::rtl::OUString( "FilterName" ); aArgs[0].Value <<= aFilterName; - aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); + aArgs[2].Name = ::rtl::OUString( "DocumentBaseURL" ); aArgs[2].Value <<= aBaseURL; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); + aArgs[1].Name = ::rtl::OUString( "HierarchicalDocumentName" ); aArgs[1].Value <<= aHierarchName; xDoc->storeToStorage( xStorage, aArgs ); @@ -869,7 +869,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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString( "Uri" ) ) >>= aTempFileURL; } catch( const uno::Exception& ) { @@ -877,21 +877,21 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ OSL_ENSURE( !aTempFileURL.isEmpty(), "Couldn't retrieve temporary file URL!\n" ); - aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aTempMediaDescr[0].Name = ::rtl::OUString( "URL" ); aTempMediaDescr[0].Value <<= aTempFileURL; - aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); + aTempMediaDescr[1].Name = ::rtl::OUString( "InputStream" ); aTempMediaDescr[1].Value <<= xTempStream; - aTempMediaDescr[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aTempMediaDescr[2].Name = ::rtl::OUString( "FilterName" ); aTempMediaDescr[2].Value <<= GetFilterName( nStorageFormat ); - aTempMediaDescr[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); + aTempMediaDescr[3].Name = ::rtl::OUString( "AsTemplate" ); aTempMediaDescr[3].Value <<= sal_True; } else { aTempMediaDescr.realloc( 2 ); - aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aTempMediaDescr[0].Name = ::rtl::OUString( "URL" ); aTempMediaDescr[0].Value <<= m_aLinkURL; - aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aTempMediaDescr[1].Name = ::rtl::OUString( "FilterName" ); aTempMediaDescr[1].Value <<= m_aLinkFilterName; } @@ -923,12 +923,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -943,7 +943,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // it can switch persistent representation only without initialization throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistent representation of activated object!\n" )), + ::rtl::OUString( "Can't change persistent representation of activated object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1124,7 +1124,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Wrong connection mode is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1150,7 +1150,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1278,7 +1278,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1325,7 +1325,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: OSL_FAIL( "Can not retrieve own storage media type!\n" ); } - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) ); + PostEvent_Impl( ::rtl::OUString( "OnSaveAs" ) ); sal_Bool bTryOptimization = sal_False; for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) @@ -1413,7 +1413,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1449,7 +1449,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) )); + PostEvent_Impl( ::rtl::OUString( "OnSaveAsDone" )); } else { @@ -1513,7 +1513,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1545,7 +1545,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1561,7 +1561,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == embed::EmbedStates::LOADED ) return; - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSave" )) ); + PostEvent_Impl( ::rtl::OUString( "OnSave" ) ); OSL_ENSURE( m_pDocHolder->GetComponent().is(), "If an object is activated or in running state it must have a document!\n" ); if ( !m_pDocHolder->GetComponent().is() ) @@ -1610,7 +1610,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" )) ); + PostEvent_Impl( ::rtl::OUString( "OnSaveDone" ) ); } //------------------------------------------------------ @@ -1625,7 +1625,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1657,7 +1657,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1665,7 +1665,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object must be in loaded state to be reloaded!\n" )), + ::rtl::OUString( "The object must be in loaded state to be reloaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1703,7 +1703,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( else { uno::Sequence< beans::PropertyValue > aArgs( 1 ); - aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); + aArgs[0].Name = ::rtl::OUString( "URL" ); aArgs[0].Value <<= m_aLinkURL; m_aLinkFilterName = aHelper.UpdateMediaDescriptorWithFilterName( aArgs, sal_False ); } @@ -1779,7 +1779,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), + ::rtl::OUString( "The object is not a valid linked object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } else @@ -1789,12 +1789,12 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt } if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1802,7 +1802,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), + ::rtl::OUString( "The object is not a valid linked object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1880,7 +1880,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a link object!\n" )), + ::rtl::OUString( "The object is not a link object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aLinkURL; diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index 19a53cb5d51c..c4e4e373109f 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -107,13 +107,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( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no model!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no model!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: return for the aspect of the document @@ -134,7 +134,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); maSize = aSize; @@ -153,11 +153,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no model!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no model!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -175,7 +175,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -204,7 +204,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( nVerbID == -7 ) diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 56cdc983f5d5..499507e07b7f 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -46,11 +46,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_bHasClonedSize = sal_False; @@ -86,7 +86,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); @@ -126,11 +126,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bHasClonedSize ) @@ -169,14 +169,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The own object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Bool bBackToLoaded = sal_False; @@ -206,7 +206,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe datatransfer::DataFlavor aDataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetaFile" )), + ::rtl::OUString( "GDIMetaFile" ), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); if( xTransferable->isDataFlavorSupported( aDataFlavor )) diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index adfd24552768..ba5af4a6ab69 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -40,15 +40,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoEmbeddedObjectFactory")); - aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoEmbeddedObjectFactory")); + aRet[0] = ::rtl::OUString("com.sun.star.embed.OOoEmbeddedObjectFactory"); + aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoEmbeddedObjectFactory")); + return ::rtl::OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); } //------------------------------------------------------------------------- @@ -73,12 +73,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -103,7 +103,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ::rtl::OUString aMediaType; try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString( "MediaType" ) ); aAny >>= aMediaType; } catch ( const uno::Exception& ) @@ -164,12 +164,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -231,12 +231,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -283,12 +283,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -352,7 +352,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No URL for the link is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -401,12 +401,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -418,7 +418,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No URL for the link is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -479,15 +479,15 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupported uno::Sequence< ::rtl::OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory")); - aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory")); + aRet[0] = ::rtl::OUString("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); + aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory")); + return ::rtl::OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); } //------------------------------------------------------------------------- diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index ed0f7adf7d90..f953509a3e60 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -164,11 +164,11 @@ DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& m_aOutplaceFrameProps.realloc( 3 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TopWindow")); + aArg.Name = ::rtl::OUString("TopWindow"); aArg.Value <<= sal_True; m_aOutplaceFrameProps[0] <<= aArg; - aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MakeVisible")); + aArg.Name = ::rtl::OUString("MakeVisible"); aArg.Value <<= sal_False; m_aOutplaceFrameProps[1] <<= aArg; @@ -183,7 +183,7 @@ DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& } m_refCount--; - aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); + aArg.Name = ::rtl::OUString("ParentFrame"); aArg.Value <<= xDesktop; //TODO/LATER: should use parent document frame m_aOutplaceFrameProps[2] <<= aArg; } @@ -366,7 +366,7 @@ sal_Bool DocumentHolder::SetFrameLMVisibility( const uno::Reference< frame::XFra { uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xLayoutManager; + xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )) >>= xLayoutManager; if ( xLayoutManager.is() ) { xLayoutManager->setVisible( bVisible ); @@ -434,7 +434,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& } awt::WindowDescriptor aOwnWinDescriptor( awt::WindowClass_TOP, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("dockingwindow") ), + ::rtl::OUString("dockingwindow"), xMyParent, 0, awt::Rectangle(),//aOwnRectangle, @@ -453,14 +453,14 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& uno::Sequence< uno::Any > aArgs( 2 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContainerWindow")); + aArg.Name = ::rtl::OUString("ContainerWindow"); aArg.Value <<= xOwnWindow; aArgs[0] <<= aArg; uno::Reference< frame::XFrame > xContFrame( xContDisp, uno::UNO_QUERY ); if ( xContFrame.is() ) { - aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); + aArg.Name = ::rtl::OUString("ParentFrame"); aArg.Value <<= xContFrame; aArgs[1] <<= aArg; } @@ -535,7 +535,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() if( xUIConfigManager.is()) { xResult = xUIConfigManager->getSettings( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ) ), + ::rtl::OUString( "private:resource/menubar/menubar" ), sal_False ); } } @@ -557,7 +557,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() xModConfSupplier->getUIConfigurationManager( aModuleIdent ), uno::UNO_QUERY_THROW ); xResult = xModUIConfMan->getSettings( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ) ), + ::rtl::OUString( "private:resource/menubar/menubar" ), sal_False ); } } @@ -656,7 +656,7 @@ sal_Bool DocumentHolder::MergeMenus_Impl( const uno::Reference< ::com::sun::star { uno::Reference< ::com::sun::star::ui::XUIElementSettings > xUISettings( xContLM->getElement( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/menubar/menubar" ) ) ), + ::rtl::OUString( "private:resource/menubar/menubar" ) ), uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xContMenu = xUISettings->getSettings( sal_True ); if ( !xContMenu.is() ) @@ -690,7 +690,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; + xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )) >>= xOwnLM; xDocAreaAcc = xContainerLM->getDockingAreaAcceptor(); } catch( const uno::Exception& ){} @@ -783,7 +783,7 @@ sal_Bool DocumentHolder::HideUI( const uno::Reference< ::com::sun::star::frame:: try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; + xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )) >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -860,7 +860,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() uno::Reference< ::com::sun::star::frame::XLayoutManager > xOwnLM; try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ))) >>= xOwnLM; + xPropSet->getPropertyValue( rtl::OUString( "LayoutManager" )) >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -972,18 +972,18 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) ::rtl::OUString sUrl; uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY); if ( xServiceInfo.is() - && xServiceInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.ReportDefinition"))) ) + && xServiceInfo->supportsService(::rtl::OUString("com.sun.star.report.ReportDefinition")) ) { - sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/ReportDesign")); + sUrl = ::rtl::OUString(".component:DB/ReportDesign"); } else if( xServiceInfo.is() - && xServiceInfo->supportsService( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")) )) - sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/schart")); + && xServiceInfo->supportsService( ::rtl::OUString("com.sun.star.chart2.ChartDocument") )) + sUrl = ::rtl::OUString("private:factory/schart"); else - sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:object")); + sUrl = ::rtl::OUString("private:object"); xComponentLoader->loadComponentFromURL( sUrl, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), + rtl::OUString( "_self" ), 0, aArgs.getPropertyValues() ); @@ -1173,7 +1173,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( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ) ); + m_pEmbedObj->PostEvent_Impl( ::rtl::OUString( "OnVisAreaChanged" ) ); } //--------------------------------------------------------------------------- diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 04795ffa5761..9d62ae63ce91 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -44,7 +44,7 @@ void ODummyEmbeddedObject::CheckInit() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -228,7 +228,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_nCachedAspect = nAspect; @@ -249,12 +249,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bHasCachedSize || m_nCachedAspect != nAspect ) throw embed::NoVisualAreaSizeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), + ::rtl::OUString( "No size available!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aCachedSize; @@ -271,7 +271,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!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -288,7 +288,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep CheckInit(); // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -310,12 +310,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -323,7 +323,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( && ( m_nObjectState == -1 || nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) ) { throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistent representation of activated object!\n" )), + ::rtl::OUString( "Can't change persistent representation of activated object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -348,13 +348,13 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( m_nObjectState = embed::EmbedStates::LOADED; } else - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong entry is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Wrong entry is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); } else - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Wrong connection mode is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -400,7 +400,7 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) ); + PostEvent_Impl( ::rtl::OUString( "OnSaveAs" ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -435,7 +435,7 @@ void SAL_CALL ODummyEmbeddedObject::saveCompleted( sal_Bool bUseNew ) m_xParentStorage = m_xNewParentStorage; m_aEntryName = m_aNewEntryName; - PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" )) ); + PostEvent_Impl( ::rtl::OUString( "OnSaveAsDone" ) ); } m_xNewParentStorage = uno::Reference< embed::XStorage >(); diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 88256898534e..a47ef9bed158 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -103,18 +103,12 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder ) m_pDisposeEventListeners(0), m_pStatCL(0) { - m_aInterceptedURL[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:Save")); - m_aInterceptedURL[1] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAll")); - m_aInterceptedURL[2] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc")); - m_aInterceptedURL[3] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseWin")); - m_aInterceptedURL[4] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseFrame")); - m_aInterceptedURL[5] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAs")); + m_aInterceptedURL[0] = rtl::OUString(".uno:Save"); + m_aInterceptedURL[1] = rtl::OUString(".uno:SaveAll"); + m_aInterceptedURL[2] = rtl::OUString(".uno:CloseDoc"); + m_aInterceptedURL[3] = rtl::OUString(".uno:CloseWin"); + m_aInterceptedURL[4] = rtl::OUString(".uno:CloseFrame"); + m_aInterceptedURL[5] = rtl::OUString(".uno:SaveAs"); } @@ -172,12 +166,12 @@ Interceptor::dispatch( if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); - aNewArgs[nInd].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SaveTo" )); + aNewArgs[nInd].Name = ::rtl::OUString( "SaveTo" ); aNewArgs[nInd].Value <<= sal_True; } uno::Reference< frame::XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( - URL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), 0 ); + URL, ::rtl::OUString( "_self" ), 0 ); if ( xDispatch.is() ) xDispatch->dispatch( URL, aNewArgs ); } @@ -200,8 +194,7 @@ Interceptor::addStatusListener( { // Save frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[0]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Update")); + aStateEvent.FeatureDescriptor = rtl::OUString("Update"); aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($1) ")) + m_pDocHolder->GetTitle() ); @@ -225,8 +218,7 @@ Interceptor::addStatusListener( { // Close and return frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Close and Return")); + aStateEvent.FeatureDescriptor = rtl::OUString("Close and Return"); aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($2) ")) + m_pDocHolder->GetTitle() ); @@ -248,8 +240,7 @@ Interceptor::addStatusListener( { // SaveAs frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[5]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("SaveCopyTo")); + aStateEvent.FeatureDescriptor = rtl::OUString("SaveCopyTo"); aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($3)"))); diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 2fdb868e0280..24f5bbd4c983 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -44,15 +44,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")); - aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.EmbeddedObjectCreator")); + aRet[0] = ::rtl::OUString("com.sun.star.embed.EmbeddedObjectCreator"); + aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.EmbeddedObjectCreator"); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.EmbeddedObjectCreator")); + return ::rtl::OUString("com.sun.star.comp.embed.EmbeddedObjectCreator"); } //------------------------------------------------------------------------- @@ -79,12 +79,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -93,7 +93,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta { // use system fallback // TODO: in future users factories can be tested - aEmbedFactory = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" )); + aEmbedFactory = ::rtl::OUString( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); } uno::Reference < uno::XInterface > xFact( m_xContext->getServiceManager()->createInstanceWithContext(aEmbedFactory, m_xContext) ); @@ -122,12 +122,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -152,7 +152,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString( "MediaType" )); aAny >>= aMediaType; } catch ( const uno::Exception& ) @@ -184,10 +184,10 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString( "MediaType" )); aAny >>= aMediaType; if ( aMediaType == "application/vnd.sun.star.oleobject" ) - aEmbedFactory = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ); + aEmbedFactory = ::rtl::OUString( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); } catch ( const uno::Exception& ) { @@ -243,12 +243,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // TODO: use lObjArgs if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -308,12 +308,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -357,7 +357,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No URL for the link is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -386,13 +386,13 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // was also extended. if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index a04dbb64fd6c..f6c801aa8a4b 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -131,7 +131,7 @@ public: rtl::OUString GetTitle() const { - return m_aContainerName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " - " )) + m_aDocumentNamePart; + return m_aContainerName + ::rtl::OUString( " - " ) + m_aDocumentNamePart; } rtl::OUString GetContainerName() const { return m_aContainerName; } diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index b1f69c4cdf6a..7d3855884836 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -54,7 +54,7 @@ sal_Bool ConvertBufferToFormat( void* pBuf, { uno::Reference < graphic::XGraphicProvider > xGraphicProvider( graphic::GraphicProvider::create(comphelper::getProcessComponentContext())); uno::Sequence< beans::PropertyValue > aMediaProperties( 1 ); - aMediaProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); + aMediaProperties[0].Name = ::rtl::OUString( "InputStream" ); aMediaProperties[0].Value <<= xIn; uno::Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties ) ); if( xGraphic.is() ) @@ -62,9 +62,9 @@ sal_Bool ConvertBufferToFormat( void* pBuf, SvMemoryStream aNewStream( 65535, 65535 ); uno::Reference < io::XStream > xOut = new utl::OStreamWrapper( aNewStream ); uno::Sequence< beans::PropertyValue > aOutMediaProperties( 2 ); - aOutMediaProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OutputStream" )); + aOutMediaProperties[0].Name = ::rtl::OUString( "OutputStream" ); aOutMediaProperties[0].Value <<= xOut; - aOutMediaProperties[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MimeType" )); + aOutMediaProperties[1].Name = ::rtl::OUString( "MimeType" ); aOutMediaProperties[1].Value <<= aMimeType; xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties ); diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index f7da74084f8c..4222d489ea19 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -190,27 +190,27 @@ struct OleComponentNative_Impl { m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Enhanced Metafile" )), + ::rtl::OUString( "Windows Enhanced Metafile" ), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[1] = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), + ::rtl::OUString( "Windows Metafile" ), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[2] = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), + ::rtl::OUString( "Bitmap" ), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[3] = datatransfer::DataFlavor( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "image/png" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PNG" )), + ::rtl::OUString( "image/png" ), + ::rtl::OUString( "PNG" ), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetafile" )), + ::rtl::OUString( "GDIMetafile" ), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); } @@ -246,11 +246,11 @@ DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) ::rtl::OUString aResult; if ( nAsp == DVASPECT_THUMBNAIL ) - aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=THUMBNAIL" )); + aResult = ::rtl::OUString( ";Aspect=THUMBNAIL" ); else if ( nAsp == DVASPECT_ICON ) - aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=ICON" )); + aResult = ::rtl::OUString( ";Aspect=ICON" ); else if ( nAsp == DVASPECT_DOCPRINT ) - aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=DOCPRINT" )); + aResult = ::rtl::OUString( ";Aspect=DOCPRINT" ); // no suffix for DVASPECT_CONTENT @@ -292,7 +292,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium if ( aMedium.tymed == TYMED_MFPICT ) // Win Metafile { - aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/x-wmf")); + aFormat = ::rtl::OUString("image/x-wmf"); METAFILEPICT* pMF = ( METAFILEPICT* )GlobalLock( aMedium.hMetaFilePict ); if ( pMF ) { @@ -323,7 +323,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_ENHMF ) // Enh Metafile { - aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/x-emf")); + aFormat = ::rtl::OUString("image/x-emf"); nBufSize = GetEnhMetaFileBits( aMedium.hEnhMetaFile, 0, NULL ); pBuf = new unsigned char[nBufSize]; if ( nBufSize && nBufSize == GetEnhMetaFileBits( aMedium.hEnhMetaFile, nBufSize, pBuf ) ) @@ -337,7 +337,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_GDI ) // Bitmap { - aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/x-MS-bmp")); + aFormat = ::rtl::OUString("image/x-MS-bmp"); nBufSize = GetBitmapBits( aMedium.hBitmap, 0, NULL ); pBuf = new unsigned char[nBufSize]; if ( nBufSize && nBufSize == sal::static_int_cast< ULONG >( GetBitmapBits( aMedium.hBitmap, nBufSize, pBuf ) ) ) @@ -408,7 +408,7 @@ sal_Bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > aSeq, CLSID& aRe { if ( *pStr == '&' ) { - aResult += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "~" )); + aResult += ::rtl::OUString( "~" ); while( *( ++pStr ) == '&' ); } else @@ -1405,7 +1405,7 @@ void OleComponent::OnViewChange_Impl( sal_uInt32 dwAspect ) { uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback") )), + ::rtl::OUString("com.sun.star.awt.AsyncCallback")), uno::UNO_QUERY ); xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONVIEWCHANGE, dwAspect ), uno::Any() ); } @@ -1426,7 +1426,7 @@ void OleComponent::OnClose_Impl() { uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback") )), + ::rtl::OUString("com.sun.star.awt.AsyncCallback")), uno::UNO_QUERY ); xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONCLOSE ), uno::Any() ); } diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 44f6585f419f..f4abfbf6a57c 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -209,7 +209,7 @@ uno::Reference< embed::XStorage > OleEmbeddedObject::CreateTemporarySubstorage( for ( sal_Int32 nInd = 0; nInd < 32000 && !xResult.is(); nInd++ ) { ::rtl::OUString aName = ::rtl::OUString::valueOf( nInd ); - aName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TMPSTOR" ) ); + aName += ::rtl::OUString( "TMPSTOR" ); aName += m_aEntryName; if ( !m_xParentStorage->hasByName( aName ) ) { @@ -234,7 +234,7 @@ uno::Reference< embed::XStorage > OleEmbeddedObject::CreateTemporarySubstorage( for ( sal_Int32 nInd = 0; nInd < 32000 && aResult.isEmpty(); nInd++ ) { ::rtl::OUString aName = ::rtl::OUString::valueOf( nInd ); - aName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TMPSTREAM" ) ); + aName += ::rtl::OUString( "TMPSTREAM" ); aName += m_aEntryName; if ( !m_xParentStorage->hasByName( aName ) ) { @@ -275,7 +275,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() && ( aFilterName == "Calc MS Excel 2007 XML" || aFilterName == "Impress MS PowerPoint 2007 XML" || aFilterName == "MS Word 2007 XML" ) ) { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) )), + m_xFactory->createInstance( ::rtl::OUString( "com.sun.star.document.FilterFactory" )), uno::UNO_QUERY_THROW ); ::rtl::OUString aDocServiceName; @@ -292,7 +292,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() { // create the model uno::Sequence< uno::Any > aArguments(1); - aArguments[0] <<= beans::NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EmbeddedObject" ) ), uno::makeAny( (sal_Bool)sal_True )); + aArguments[0] <<= beans::NamedValue( ::rtl::OUString( "EmbeddedObject" ), uno::makeAny( (sal_Bool)sal_True )); uno::Reference< util::XCloseable > xDocument( m_xFactory->createInstanceWithArguments( aDocServiceName, aArguments ), uno::UNO_QUERY_THROW ); uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY_THROW ); @@ -301,21 +301,21 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() // let the model behave as embedded one uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aSeq( 1 ); - aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SetEmbedded" )); + aSeq[0].Name = ::rtl::OUString( "SetEmbedded" ); aSeq[0].Value <<= sal_True; xModel->attachResource( ::rtl::OUString(), aSeq ); // load the model from the stream uno::Sequence< beans::PropertyValue > aArgs( 5 ); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); + aArgs[0].Name = ::rtl::OUString( "HierarchicalDocumentName" ); aArgs[0].Value <<= m_aEntryName; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); + aArgs[1].Name = ::rtl::OUString( "ReadOnly" ); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aArgs[2].Name = ::rtl::OUString( "FilterName" ); aArgs[2].Value <<= aFilterName; - aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); - aArgs[3].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "private:stream" )); - aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); + aArgs[3].Name = ::rtl::OUString( "URL" ); + aArgs[3].Value <<= ::rtl::OUString( "private:stream" ); + aArgs[4].Name = ::rtl::OUString( "InputStream" ); aArgs[4].Value <<= m_xObjectStream->getInputStream(); xSeekable->seek( 0 ); @@ -327,7 +327,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() xDocument->close( sal_True ); uno::Reference< beans::XPropertySet > xStorProps( xTmpStorage, uno::UNO_QUERY_THROW ); ::rtl::OUString aMediaType; - xStorProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ) >>= aMediaType; + xStorProps->getPropertyValue( ::rtl::OUString( "MediaType" ) ) >>= aMediaType; xTmpStorage->dispose(); // look for the related embedded object factory @@ -463,7 +463,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // in case the object is already in requested state @@ -619,7 +619,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -661,7 +661,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: Shouldn't we ask object? ( I guess no ) @@ -705,7 +705,7 @@ namespace aArgs[1] <<= (sal_Bool)sal_True; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")), + ::rtl::OUString("com.sun.star.embed.OLESimpleStorage"), aArgs ), uno::UNO_QUERY_THROW ); uno::Reference< io::XStream > xCONTENTS; @@ -729,9 +729,9 @@ namespace if (bCopied) { - xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), + xNativeTempFile->setPropertyValue(::rtl::OUString("RemoveFile"), uno::makeAny(sal_False)); - uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri"))); + uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString("Uri")); aUrl >>= sUrl; xNativeTempFile = uno::Reference<beans::XPropertySet>(); @@ -743,7 +743,7 @@ namespace } else { - xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), + xNativeTempFile->setPropertyValue(::rtl::OUString("RemoveFile"), uno::makeAny(sal_True)); } #else @@ -779,7 +779,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -914,7 +914,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT if ( m_pOleComponent ) @@ -959,7 +959,7 @@ void SAL_CALL OleEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), + ::rtl::OUString( "The client site can not be set currently!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -985,7 +985,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -1012,7 +1012,7 @@ void SAL_CALL OleEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) @@ -1046,7 +1046,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -1076,7 +1076,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object must be in running state!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object must be in running state!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int64 nResult = 0; diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index b0fddcaa3df2..a71944bd4cea 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -376,7 +376,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 embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not loaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 165f2dd2832e..4e56995221e7 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -86,8 +86,8 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: uno::UNO_QUERY_THROW ); try { - xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); + xTempFile->setPropertyValue( ::rtl::OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString( "Uri" )); aUrl >>= aResult; } catch ( const uno::Exception& ) @@ -166,8 +166,8 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: xParentStorage->copyStreamElementData( aEntryName, xTempStream ); - xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); + xTempFile->setPropertyValue( ::rtl::OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString( "Uri" )); aUrl >>= aResult; } catch( const uno::RuntimeException& ) @@ -191,7 +191,7 @@ void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStream, cons if ( !xPropSet.is() ) throw uno::RuntimeException(); // TODO: all the storage streams must support XPropertySet - xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )), uno::makeAny( aMediaType ) ); + xPropSet->setPropertyValue( ::rtl::OUString( "MediaType" ), uno::makeAny( aMediaType ) ); } #endif //------------------------------------------------------ @@ -201,7 +201,7 @@ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStre if ( !xPropSet.is() ) throw uno::RuntimeException(); // Only StorageStreams must be provided here, they must implement the interface - xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseCommonStoragePasswordEncryption" )), + xPropSet->setPropertyValue( ::rtl::OUString( "UseCommonStoragePasswordEncryption" ), uno::makeAny( (sal_Bool)sal_True ) ); } #ifdef WNT @@ -379,7 +379,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), + ::rtl::OUString( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY ); @@ -502,7 +502,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea throw io::IOException(); // TODO: // insert the result file as replacement image - ::rtl::OUString aCacheName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres000" )); + ::rtl::OUString aCacheName = ::rtl::OUString( "\002OlePres000" ); if ( xNameContainer->hasByName( aCacheName ) ) xNameContainer->replaceByName( aCacheName, uno::makeAny( xTempFile ) ); else @@ -528,7 +528,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea aArgs[1] <<= (sal_Bool)sal_True; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), + ::rtl::OUString( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY ); @@ -597,7 +597,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() aArgs[1] <<= (sal_Bool)sal_True; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), + ::rtl::OUString( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY ); @@ -644,7 +644,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres { xNameContainer = uno::Reference< container::XNameContainer >( m_xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), + ::rtl::OUString( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY ); } @@ -673,7 +673,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres if ( nInd == 0 ) { // to be compatible with the old versions Ole10Native is checked after OlePress000 - aStreamName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\001Ole10Native" ) ); + aStreamName = ::rtl::OUString( "\001Ole10Native" ); try { if ( ( xNameContainer->getByName( aStreamName ) >>= xCachedCopyStream ) && xCachedCopyStream.is() ) @@ -871,7 +871,7 @@ sal_Bool OleEmbeddedObject::OnShowWindow_Impl( sal_Bool bShow ) void OleEmbeddedObject::OnIconChanged_Impl() { // TODO/LATER: currently this notification seems to be impossible - // MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnIconChanged" )) ); + // MakeEventListenerNotification_Impl( ::rtl::OUString( "OnIconChanged" ) ); } //------------------------------------------------------ @@ -901,7 +901,7 @@ void OleEmbeddedObject::OnViewChanged_Impl() // The view is changed while the object is in running state, save the new object m_xCachedVisualRepresentation = uno::Reference< io::XStream >(); SaveObject_Impl(); - MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" )) ); + MakeEventListenerNotification_Impl( ::rtl::OUString( "OnVisAreaChanged" ) ); } // =============================================================== } @@ -1082,7 +1082,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1170,7 +1170,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( !xTargetStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); + SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString( "application/vnd.sun.star.oleobject" )); uno::Reference< io::XOutputStream > xOutStream = xTargetStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1317,12 +1317,12 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1337,7 +1337,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // it can switch persistent representation only without initialization throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistent representation of activated object!\n" )), + ::rtl::OUString( "Can't change persistent representation of activated object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1443,7 +1443,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( if ( aURL.isEmpty() ) throw lang::IllegalArgumentException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty URL is provided in the media descriptor!\n" )), + ::rtl::OUString( "Empty URL is provided in the media descriptor!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -1465,7 +1465,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Wrong connection mode is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1483,7 +1483,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // do nothing, the object has already switched it's persistence } else - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Wrong connection mode is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -1583,7 +1583,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1648,13 +1648,13 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) aGuard.clear(); if ( bUseNew ) { - MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) )); + MakeEventListenerNotification_Impl( ::rtl::OUString( "OnSaveAsDone" )); // the object can be changed only on windows // the notification should be done only if the object is not in loaded state if ( m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded ) { - MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); + MakeEventListenerNotification_Impl( ::rtl::OUString( "OnVisAreaChanged" )); } } } @@ -1709,7 +1709,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1754,7 +1754,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Can't store object without persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1780,7 +1780,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( !m_xObjectStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); + SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString( "application/vnd.sun.star.oleobject" )); uno::Reference< io::XOutputStream > xOutStream = m_xObjectStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1834,12 +1834,12 @@ void SAL_CALL OleEmbeddedObject::storeOwn() aGuard.clear(); - MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" ) )); + MakeEventListenerNotification_Impl( ::rtl::OUString( "OnSaveDone" )); // the object can be changed only on Windows // the notification should be done only if the object is not in loaded state if ( m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded ) - MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); + MakeEventListenerNotification_Impl( ::rtl::OUString( "OnVisAreaChanged" )); } //------------------------------------------------------ @@ -1863,7 +1863,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1904,7 +1904,7 @@ void SAL_CALL OleEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object persistence is not initialized!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1943,12 +1943,12 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1957,7 +1957,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), + ::rtl::OUString( "The object is not a valid linked object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -2086,7 +2086,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::isLink() if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a link object!\n" )), + ::rtl::OUString( "The object is not a link object!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: probably the link URL can be retrieved from OLE diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index c517a7445248..1628a36c853d 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -55,7 +55,7 @@ embed::VisualRepresentation OleEmbeddedObject::GetVisualRepresentationInNativeFo // it's a bitmap aVisualRepr.Flavor = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), + ::rtl::OUString( "Bitmap" ), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } else @@ -63,7 +63,7 @@ embed::VisualRepresentation OleEmbeddedObject::GetVisualRepresentationInNativeFo // it's a metafile aVisualRepr.Flavor = datatransfer::DataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), + ::rtl::OUString( "Windows Metafile" ), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } @@ -100,11 +100,11 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not loaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -180,11 +180,11 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not loaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -218,7 +218,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) catch( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), + ::rtl::OUString( "No size available!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -261,7 +261,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) if ( !bSuccess ) throw embed::NoVisualAreaSizeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), + ::rtl::OUString( "No size available!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); aGuard.reset(); @@ -280,7 +280,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) catch ( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), + ::rtl::OUString( "No size available!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -296,7 +296,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) else { throw embed::NoVisualAreaSizeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No size available!\n" ) ), + ::rtl::OUString( "No size available!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -328,13 +328,13 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: if the object has cached representation then it should be returned // TODO: if the object has no cached representation and is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not loaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); embed::VisualRepresentation aVisualRepr; @@ -362,7 +362,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres datatransfer::DataFlavor aDataFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), + ::rtl::OUString( "Windows Metafile" ), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aVisualRepr.Data = m_pOleComponent->getTransferData( aDataFlavor ); @@ -394,7 +394,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres if ( !m_xCachedVisualRepresentation.is() ) { // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -421,11 +421,11 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "Illegal call!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), + throw embed::WrongStateException( ::rtl::OUString( "The object is not loaded!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 8b4dbf8ca58f..1f5fb367b2fb 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -120,28 +120,28 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) uno::Sequence< beans::PropertyValue > aArgs( m_aFilterName.isEmpty() ? 4 : 5 ); - aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aArgs[0].Name = ::rtl::OUString( "URL" ); aArgs[0].Value <<= aFileURL; - aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); + aArgs[1].Name = ::rtl::OUString( "ReadOnly" ); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" )); + aArgs[2].Name = ::rtl::OUString( "InteractionHandler" ); aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >( static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY ); - aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DontEdit" )); + aArgs[3].Name = ::rtl::OUString( "DontEdit" ); aArgs[3].Value <<= sal_True; if ( !m_aFilterName.isEmpty() ) { - aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + aArgs[4].Name = ::rtl::OUString( "FilterName" ); aArgs[4].Value <<= m_aFilterName; } uno::Reference< frame::XModel > xModel( xDocumentLoader->loadComponentFromURL( aFileURL, - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_blank" )), + ::rtl::OUString( "_blank" ), 0, aArgs ), uno::UNO_QUERY ); @@ -202,7 +202,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) throw uno::RuntimeException(); uno::Reference< document::XTypeDetection > xTypeDetection( - xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ) )), + xFactory->createInstance( ::rtl::OUString( "com.sun.star.document.TypeDetection" )), uno::UNO_QUERY_THROW ); ::rtl::OUString aTypeName; @@ -210,18 +210,18 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) if ( !aNameWithExtention.isEmpty() ) { ::rtl::OUString aURLToAnalyze = - ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "file:///" ) ) + aNameWithExtention ); + ( ::rtl::OUString( "file:///" ) + aNameWithExtention ); aTypeName = xTypeDetection->queryTypeByURL( aURLToAnalyze ); } uno::Sequence< beans::PropertyValue > aArgs( aTypeName.isEmpty() ? 2 : 3 ); - aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); - aArgs[0].Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ); - aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" ) ); + aArgs[0].Name = ::rtl::OUString( "URL" ); + aArgs[0].Value <<= ::rtl::OUString( "private:stream" ); + aArgs[1].Name = ::rtl::OUString( "InputStream" ); aArgs[1].Value <<= xInputStream; if ( !aTypeName.isEmpty() ) { - aArgs[2].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TypeName" ) ); + aArgs[2].Name = ::rtl::OUString( "TypeName" ); aArgs[2].Value <<= aTypeName; } @@ -273,8 +273,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io throw uno::RuntimeException(); try { - xNativeTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); - uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); + xNativeTempFile->setPropertyValue( ::rtl::OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); + uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString( "Uri" )); aUrl >>= aNativeTempURL; } catch ( uno::Exception& ) @@ -421,11 +421,11 @@ void OwnView_Impl::CreateNative() aArgs[0] <<= xInStream; uno::Reference< container::XNameAccess > xNameAccess( m_xFactory->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), + ::rtl::OUString( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY_THROW ); - ::rtl::OUString aSubStreamName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\1Ole10Native" )); + ::rtl::OUString aSubStreamName = ::rtl::OUString( "\1Ole10Native" ); uno::Reference< embed::XClassifiedObject > xStor( xNameAccess, uno::UNO_QUERY_THROW ); uno::Sequence< sal_Int8 > aStorClassID = xStor->getClassID(); diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 3ec9206e82ac..ea7947a58a49 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -108,15 +108,15 @@ uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_In uno::Sequence< ::rtl::OUString > SAL_CALL MSOLEDialogObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.MSOLEObjectSystemCreator")); - aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.MSOLEObjectSystemCreator")); + aRet[0] = ::rtl::OUString("com.sun.star.embed.MSOLEObjectSystemCreator"); + aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MSOLEDialogObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.MSOLEObjectSystemCreator")); + return ::rtl::OUString("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); } //------------------------------------------------------------------------- @@ -142,12 +142,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -170,11 +170,11 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia ::osl::Module aOleDlgLib; - if( !aOleDlgLib.load( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "oledlg" ) ) )) + if( !aOleDlgLib.load( ::rtl::OUString( "oledlg" ) )) throw uno::RuntimeException(); OleUIInsertObjectA_Type * pInsertFct = (OleUIInsertObjectA_Type *) - aOleDlgLib.getSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OleUIInsertObjectA" ) )); + aOleDlgLib.getSymbol( ::rtl::OUString( "OleUIInsertObjectA" )); if( !pInsertFct ) throw uno::RuntimeException(); @@ -214,7 +214,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia throw uno::RuntimeException(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aMediaDescr[0].Name = ::rtl::OUString( "URL" ); aMediaDescr[0].Value <<= aFileURL; // TODO: use config helper for type detection @@ -253,13 +253,13 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia { datatransfer::DataFlavor aFlavor( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Image WMF" )), + ::rtl::OUString( "Image WMF" ), getCppuType( ( const uno::Sequence< sal_Int8 >* ) 0 ) ); aObjectInfo.Options.realloc( 2 ); - aObjectInfo.Options[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Icon" )); + aObjectInfo.Options[0].Name = ::rtl::OUString( "Icon" ); aObjectInfo.Options[0].Value <<= aMetafile; - aObjectInfo.Options[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IconFormat" )); + aObjectInfo.Options[1].Name = ::rtl::OUString( "IconFormat" ); aObjectInfo.Options[1].Value <<= aFlavor; } @@ -294,12 +294,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntryName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 2d5b35a0863f..558092573d71 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -39,15 +39,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLEEmbeddedObjectFactory")); - aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLEEmbeddedObjectFactory")); + aRet[0] = ::rtl::OUString("com.sun.star.embed.OLEEmbeddedObjectFactory"); + aRet[1] = ::rtl::OUString("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OleEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLEEmbeddedObjectFactory")); + return ::rtl::OUString("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); } //------------------------------------------------------------------------- @@ -72,12 +72,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -144,12 +144,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -186,12 +186,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitNew" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -227,13 +227,13 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceLink" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -274,12 +274,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "No parent storage is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), + throw lang::IllegalArgumentException( ::rtl::OUString( "Empty element name is provided!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); diff --git a/embeddedobj/test/MainThreadExecutor/register.cxx b/embeddedobj/test/MainThreadExecutor/register.cxx index ab21864711c6..d1d55a9ed520 100644 --- a/embeddedobj/test/MainThreadExecutor/register.cxx +++ b/embeddedobj/test/MainThreadExecutor/register.cxx @@ -62,9 +62,9 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK uno::Reference< registry::XRegistryKey > xNewKey; - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString("/") + UNOMainThreadExecutor::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); + ::rtl::OUString( "/UNO/SERVICES") ); uno::Sequence< ::rtl::OUString > &rServices = UNOMainThreadExecutor::impl_staticGetSupportedServiceNames(); for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ ) diff --git a/embeddedobj/test/mtexecutor/mteregister.cxx b/embeddedobj/test/mtexecutor/mteregister.cxx index 33f98dc272d7..7ef94d2cf6df 100644 --- a/embeddedobj/test/mtexecutor/mteregister.cxx +++ b/embeddedobj/test/mtexecutor/mteregister.cxx @@ -76,17 +76,17 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK uno::Sequence< ::rtl::OUString > rServices; sal_Int32 ind = 0; - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString("/") + MainThreadExecutor::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); + ::rtl::OUString( "/UNO/SERVICES") ); rServices = MainThreadExecutor::impl_staticGetSupportedServiceNames(); for( ind = 0; ind < rServices.getLength(); ind++ ) xNewKey->createKey( rServices.getConstArray()[ind] ); - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString("/") + VCLBitmapCreator::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); + ::rtl::OUString( "/UNO/SERVICES") ); rServices = VCLBitmapCreator::impl_staticGetSupportedServiceNames(); for( ind = 0; ind < rServices.getLength(); ind++ ) |