diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2010-11-20 17:21:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-20 17:21:10 +0000 |
commit | 250fe869c1a20faa133cc99decfbb895739f7963 (patch) | |
tree | b2e03b4f9b1f2b83d90c5c3c888c24517a786faa /embeddedobj | |
parent | 88118c8a4e3d62a1c5ff2c8f4acc91d99e0ce357 (diff) |
RTL_CONSTASCII_USTRINGPARAM improvements
Diffstat (limited to 'embeddedobj')
21 files changed, 323 insertions, 389 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 33c6f5012814..c53ffb377ab0 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -113,7 +113,7 @@ void OCommonEmbeddedObject::Deactivate() catch( uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString::createFromAscii( "The client could not store the object!" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client could not store the object!" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), uno::makeAny( e ) ); } @@ -397,7 +397,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } } else - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -410,7 +410,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ break; if ( nCurInd == m_aAcceptedStates.getLength() ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nDestInd = 0; @@ -420,7 +420,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nDestInd == m_aAcceptedStates.getLength() ) throw embed::UnreachableStateException( - ::rtl::OUString::createFromAscii( "The state either not reachable, or the object allows the state only as an intermediate one!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 ); @@ -444,7 +444,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nOldState = m_nObjectState; @@ -507,7 +507,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aAcceptedStates; @@ -523,7 +523,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_nObjectState; @@ -544,7 +544,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 @@ -575,7 +575,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aObjectVerbs; @@ -595,7 +595,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The client site can not be set currently!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -612,7 +612,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -629,7 +629,7 @@ void SAL_CALL OCommonEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ), @@ -646,7 +646,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 7a70663f440f..6ca80ce1c2d6 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -57,7 +57,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::createFromAscii( "The object is not activated inplace!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 f71c4ce2cda8..75241b933486 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -508,15 +508,10 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw uno::RuntimeException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); } diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 48776dc36edb..dba384690bd8 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -125,7 +125,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: if ( !bAsTemplateSet ) { aResult.realloc( nLength + 1 ); - aResult[nLength].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aResult[nLength].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); aResult[nLength].Value <<= sal_True; } @@ -148,7 +148,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( if ( xTempStream.is() ) { uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArgs( 2 ); @@ -165,7 +165,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( } catch( uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString::createFromAscii( "Can't copy storage!" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't copy storage!" )), uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -245,7 +245,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::createFromAscii( "SetEmbedded" ); + aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SetEmbedded" )); aSeq[0].Value <<= sal_True; xDocument->attachResource( ::rtl::OUString(), aSeq ); @@ -403,9 +403,9 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() sal_Int32 nLen = 2; uno::Sequence< beans::PropertyValue > aArgs( nLen ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aArgs[0].Value <<= m_aLinkURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[1].Value <<= m_aLinkFilterName; if ( m_bLinkHasPassword ) { @@ -540,7 +540,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::createFromAscii( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } catch( uno::Exception& ) { @@ -598,7 +598,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr const ::rtl::OUString& aHierarchName ) { uno::Reference < io::XOutputStream > xTempOut( - m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" )) ), uno::UNO_QUERY ); uno::Reference< io::XInputStream > aResult( xTempOut, uno::UNO_QUERY ); @@ -622,16 +622,16 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[0].Value <<= aFilterName; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "OutputStream" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OutputStream" )); aArgs[1].Value <<= xTempOut; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "DocumentBaseURL" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); aArgs[2].Value <<= aBaseURL; - aArgs[3].Name = ::rtl::OUString::createFromAscii( "HierarchicalDocumentName" ); + aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[3].Value <<= aHierarchName; - xStorable->storeToURL( ::rtl::OUString::createFromAscii( "private:stream" ), aArgs ); + xStorable->storeToURL( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aArgs ); try { xTempOut->closeOutput(); @@ -784,11 +784,11 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 3 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[0].Value <<= aFilterName; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "DocumentBaseURL" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); aArgs[2].Value <<= aBaseURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "HierarchicalDocumentName" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[1].Value <<= aHierarchName; xDoc->storeToStorage( xStorage, aArgs ); @@ -805,7 +805,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: // open storage based on document temporary file for reading uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + m_xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArgs(1); @@ -894,7 +894,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::createFromAscii( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } catch( uno::Exception& ) { @@ -902,24 +902,22 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ OSL_ENSURE( aTempFileURL.getLength(), "Coudn't retrieve temporary file URL!\n" ); - aTempMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aTempMediaDescr[0].Value <<= aTempFileURL; - aTempMediaDescr[1].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); aTempMediaDescr[1].Value <<= xTempStream; - aTempMediaDescr[2].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aTempMediaDescr[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aTempMediaDescr[2].Value <<= GetFilterName( nStorageFormat ); - aTempMediaDescr[3].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aTempMediaDescr[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); aTempMediaDescr[3].Value <<= sal_True; } else { aTempMediaDescr.realloc( 2 ); - aTempMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aTempMediaDescr[0].Value <<= m_aLinkURL; - aTempMediaDescr[1].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aTempMediaDescr[1].Value <<= m_aLinkFilterName; - // aTempMediaDescr[2].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); - // aTempMediaDescr[2].Value <<= sal_True; } xResult = CreateDocFromMediaDescr_Impl( aTempMediaDescr ); @@ -950,12 +948,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -970,7 +968,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // it can switch persistant representation only without initialization throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -980,7 +978,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1137,7 +1135,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1163,13 +1161,13 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1291,13 +1289,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1338,7 +1336,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" ); } - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAs" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) ); sal_Bool bTryOptimization = sal_False; for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) @@ -1426,7 +1424,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1462,7 +1460,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) )); } else { @@ -1505,7 +1503,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStorage.is() ) @@ -1526,13 +1524,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1558,13 +1556,13 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1574,7 +1572,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == embed::EmbedStates::LOADED ) return; - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSave" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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() ) @@ -1623,7 +1621,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveDone" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" )) ); } //------------------------------------------------------ @@ -1638,13 +1636,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -1670,7 +1668,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1678,13 +1676,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object must be in loaded state to be reloaded!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object must be in loaded state to be reloaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bIsLink ) @@ -1792,7 +1790,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } else @@ -1802,12 +1800,12 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt } if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1815,13 +1813,13 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); @@ -1879,12 +1877,6 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() if ( m_bDisposed ) throw lang::DisposedException(); // TODO - // Actually this information is clear even in case object is wayting for saveCompleted - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - return m_bIsLink; } @@ -1898,15 +1890,9 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() if ( m_bDisposed ) throw lang::DisposedException(); // TODO - // Actually this information is clear even in case object is wayting for saveCompleted - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a link object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 6234f339e232..802056b72af7 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -118,13 +118,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::createFromAscii( "The own object has no model!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: return for the aspect of the document @@ -136,8 +136,8 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR throw uno::RuntimeException(); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetaFile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetaFile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aVisualRepresentation.Data = xTransferable->getTransferData( aDataFlavor ); @@ -158,7 +158,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); maSize = aSize; @@ -177,11 +177,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no model!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no model!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -199,7 +199,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -228,7 +228,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 206e57804bdb..7be21d75f92b 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -57,11 +57,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_bHasClonedSize = sal_False; @@ -97,7 +97,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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" ); @@ -137,11 +137,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bHasClonedSize ) @@ -180,14 +180,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Bool bBackToLoaded = sal_False; @@ -216,8 +216,8 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw uno::RuntimeException(); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetaFile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 dfa7464a3dbf..72aecfe07d15 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -50,15 +50,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::createFromAscii("com.sun.star.embed.OOoEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); + 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")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoEmbeddedObjectFactory")); } //------------------------------------------------------------------------- @@ -83,12 +83,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -113,7 +113,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ::rtl::OUString aMediaType; try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ); aAny >>= aMediaType; } catch ( uno::Exception& ) @@ -174,12 +174,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -241,12 +241,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -293,12 +293,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -362,7 +362,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -411,12 +411,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -428,7 +428,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -489,15 +489,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::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); + 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")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory")); } //------------------------------------------------------------------------- diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 93e152db1e73..c87bff4cd597 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -175,11 +175,11 @@ DocumentHolder::DocumentHolder( const uno::Reference< lang::XMultiServiceFactory m_aOutplaceFrameProps.realloc( 3 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString::createFromAscii("TopWindow"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TopWindow")); aArg.Value <<= sal_True; m_aOutplaceFrameProps[0] <<= aArg; - aArg.Name = ::rtl::OUString::createFromAscii("MakeVisible"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MakeVisible")); aArg.Value <<= sal_False; m_aOutplaceFrameProps[1] <<= aArg; @@ -197,7 +197,7 @@ DocumentHolder::DocumentHolder( const uno::Reference< lang::XMultiServiceFactory } m_refCount--; - aArg.Name = ::rtl::OUString::createFromAscii("ParentFrame"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); aArg.Value <<= xDesktop; //TODO/LATER: should use parent document frame m_aOutplaceFrameProps[2] <<= aArg; } @@ -433,7 +433,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& uno::Reference< embed::XHatchWindowFactory > xHatchFactory( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.HatchWindowFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.HatchWindowFactory" )) ), uno::UNO_QUERY ); if ( !xHatchFactory.is() ) @@ -468,7 +468,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& awt::WindowAttribute::SHOW | awt::VclWindowPeerAttribute::CLIPCHILDREN ); uno::Reference< awt::XToolkit > xToolkit( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.awt.Toolkit" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" )) ), uno::UNO_QUERY ); if ( !xToolkit.is() ) throw uno::RuntimeException(); @@ -480,20 +480,20 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& // create a frame based on the specified window uno::Reference< lang::XSingleServiceFactory > xFrameFact( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.TaskCreator" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.TaskCreator" )) ), uno::UNO_QUERY_THROW ); uno::Sequence< uno::Any > aArgs( 2 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString::createFromAscii("ContainerWindow"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContainerWindow")); aArg.Value <<= xOwnWindow; aArgs[0] <<= aArg; uno::Reference< frame::XFrame > xContFrame( xContDisp, uno::UNO_QUERY ); if ( xContFrame.is() ) { - aArg.Name = ::rtl::OUString::createFromAscii("ParentFrame"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); aArg.Value <<= xContFrame; aArgs[1] <<= aArg; } @@ -871,7 +871,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() if ( !m_xFrame.is() ) { uno::Reference< lang::XSingleServiceFactory > xFrameFact( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.TaskCreator" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.TaskCreator" ) )), uno::UNO_QUERY_THROW ); m_xFrame.set(xFrameFact->createInstanceWithArguments( m_aOutplaceFrameProps ), uno::UNO_QUERY_THROW); @@ -1033,13 +1033,13 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/ReportDesign")); } else if( xServiceInfo.is() - && xServiceInfo->supportsService( ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument")) ) + && xServiceInfo->supportsService( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")) )) sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/schart")); else sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:object")); xComponentLoader->loadComponentFromURL( sUrl, - rtl::OUString::createFromAscii( "_self" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), 0, aArgs.getPropertyValues() ); diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 3079edc21aff..c459ffc1fb90 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -55,7 +55,7 @@ void ODummyEmbeddedObject::CheckInit() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -240,7 +240,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_nCachedAspect = nAspect; @@ -261,7 +261,7 @@ 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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bHasCachedSize || m_nCachedAspect != nAspect ) @@ -283,7 +283,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -300,7 +300,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep CheckInit(); // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -322,12 +322,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -335,7 +335,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( && ( m_nObjectState == -1 || nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) ) { throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -345,7 +345,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -360,13 +360,13 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( m_nObjectState = embed::EmbedStates::LOADED; } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong entry is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong entry is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -387,7 +387,7 @@ void SAL_CALL ODummyEmbeddedObject::storeToEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -409,10 +409,10 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::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::createFromAscii( "OnSaveAs" ), + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )), uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -448,7 +448,7 @@ void SAL_CALL ODummyEmbeddedObject::saveCompleted( sal_Bool bUseNew ) m_xParentStorage = m_xNewParentStorage; m_aEntryName = m_aNewEntryName; - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ), + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" )), uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) ); } @@ -467,7 +467,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_aEntryName.getLength() ) @@ -486,7 +486,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -504,7 +504,7 @@ void SAL_CALL ODummyEmbeddedObject::storeOwn() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // the object can not be activated or changed @@ -521,7 +521,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // this object can not be changed @@ -543,7 +543,7 @@ void SAL_CALL ODummyEmbeddedObject::reload( if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // nothing to reload diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index ec919a957f47..db8d735ce11a 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -184,12 +184,12 @@ Interceptor::dispatch( if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); - aNewArgs[nInd].Name = ::rtl::OUString::createFromAscii( "SaveTo" ); + aNewArgs[nInd].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SaveTo" )); aNewArgs[nInd].Value <<= sal_True; } uno::Reference< frame::XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( - URL, ::rtl::OUString::createFromAscii( "_self" ), 0 ); + URL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), 0 ); if ( xDispatch.is() ) xDispatch->dispatch( URL, aNewArgs ); } diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 46846f778541..84804d41b7de 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -52,15 +52,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::createFromAscii("com.sun.star.embed.EmbeddedObjectCreator"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.EmbeddedObjectCreator"); + 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")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.EmbeddedObjectCreator"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.EmbeddedObjectCreator")); } //------------------------------------------------------------------------- @@ -87,12 +87,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -101,7 +101,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta { // use system fallback // TODO: in future users factories can be tested - aEmbedFactory = ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); + aEmbedFactory = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" )); } uno::Reference < uno::XInterface > xFact( m_xFactory->createInstance( aEmbedFactory ) ); @@ -130,12 +130,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -160,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; } catch ( uno::Exception& ) @@ -192,7 +192,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; if ( aMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) ) ) ) aEmbedFactory = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ); @@ -251,12 +251,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // TODO: use lObjArgs if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -271,7 +271,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // the object can be loaded by one of the office application uno::Reference< embed::XEmbedObjectCreator > xOOoEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOOoEmbCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -294,7 +294,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< embed::XEmbedObjectCreator > xOleEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOleEmbCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -324,12 +324,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -373,7 +373,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -384,7 +384,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // the object can be loaded by one of the office application uno::Reference< embed::XLinkCreator > xOOoLinkCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOOoLinkCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -406,20 +406,20 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // was also extended. if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); uno::Reference< embed::XLinkCreator > xLinkCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xLinkCreator.is() ) throw uno::RuntimeException(); // TODO: diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index cb4637bdc286..e82136d5a37b 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -139,7 +139,7 @@ public: rtl::OUString GetTitle() const { - return m_aContainerName + ::rtl::OUString::createFromAscii( " - " ) + m_aDocumentNamePart; + return m_aContainerName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " - " )) + m_aDocumentNamePart; } rtl::OUString GetContainerName() const { return m_aContainerName; } diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index 0642d66f383d..f177f19be449 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -63,11 +63,11 @@ sal_Bool ConvertBufferToFormat( void* pBuf, uno::Reference < io::XInputStream > xIn = new comphelper::SequenceInputStream( aData ); try { - uno::Reference < graphic::XGraphicProvider > xGraphicProvider( comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.graphic.GraphicProvider") ), uno::UNO_QUERY ); + uno::Reference < graphic::XGraphicProvider > xGraphicProvider( comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")) ), uno::UNO_QUERY ); if( xGraphicProvider.is() ) { uno::Sequence< beans::PropertyValue > aMediaProperties( 1 ); - aMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + aMediaProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); aMediaProperties[0].Value <<= xIn; uno::Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties ) ); if( xGraphic.is() ) @@ -76,9 +76,9 @@ sal_Bool ConvertBufferToFormat( void* pBuf, // uno::Reference < io::XOutputStream > xOut = new utl::OOutputStreamHelper( aNewStream.GetLockBytes() ); uno::Reference < io::XStream > xOut = new utl::OStreamWrapper( aNewStream ); uno::Sequence< beans::PropertyValue > aOutMediaProperties( 2 ); - aOutMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" ); + aOutMediaProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OutputStream" )); aOutMediaProperties[0].Value <<= xOut; - aOutMediaProperties[1].Name = ::rtl::OUString::createFromAscii( "MimeType" ); + aOutMediaProperties[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MimeType" )); aOutMediaProperties[1].Value <<= aMimeType; xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties ); diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index ac0b05fd96fa..616e3fc17d36 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -198,28 +198,28 @@ struct OleComponentNative_Impl { m_aSupportedGraphFormats.realloc( 5 ); m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Enhanced Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Enhanced Metafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[1] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[2] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ), - ::rtl::OUString::createFromAscii( "Bitmap" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[3] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "image/png" ), - ::rtl::OUString::createFromAscii( "PNG" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "image/png" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PNG" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); } @@ -239,11 +239,11 @@ struct OleComponentNative_Impl { //---------------------------------------------- DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) { - if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=THUMBNAIL" ) ) != -1 ) + if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=THUMBNAIL" )) ) != -1 ) return DVASPECT_THUMBNAIL; - else if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=ICON" ) ) != -1 ) + else if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=ICON" )) ) != -1 ) return DVASPECT_ICON; - else if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=DOCPRINT" ) ) != -1 ) + else if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=DOCPRINT" )) ) != -1 ) return DVASPECT_DOCPRINT; else return DVASPECT_CONTENT; @@ -255,11 +255,11 @@ DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) ::rtl::OUString aResult; if ( nAsp == DVASPECT_THUMBNAIL ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=THUMBNAIL" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=THUMBNAIL" )); else if ( nAsp == DVASPECT_ICON ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=ICON" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=ICON" )); else if ( nAsp == DVASPECT_DOCPRINT ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=DOCPRINT" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=DOCPRINT" )); // no suffix for DVASPECT_CONTENT @@ -301,7 +301,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium if ( aMedium.tymed == TYMED_MFPICT ) // Win Metafile { - aFormat = ::rtl::OUString::createFromAscii("image/x-wmf"); + aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/x-wmf")); METAFILEPICT* pMF = ( METAFILEPICT* )GlobalLock( aMedium.hMetaFilePict ); if ( pMF ) { @@ -332,7 +332,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_ENHMF ) // Enh Metafile { - aFormat = ::rtl::OUString::createFromAscii("image/x-emf"); + aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/x-emf")); nBufSize = GetEnhMetaFileBits( aMedium.hEnhMetaFile, 0, NULL ); pBuf = new unsigned char[nBufSize]; if ( nBufSize && nBufSize == GetEnhMetaFileBits( aMedium.hEnhMetaFile, nBufSize, pBuf ) ) @@ -346,7 +346,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_GDI ) // Bitmap { - aFormat = ::rtl::OUString::createFromAscii("image/x-MS-bmp"); + aFormat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 ) ) ) @@ -417,7 +417,7 @@ sal_Bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > aSeq, CLSID& aRe { if ( *pStr == '&' ) { - aResult += ::rtl::OUString::createFromAscii( "~" ); + aResult += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "~" )); while( *( ++pStr ) == '&' ); } else @@ -1420,7 +1420,7 @@ void OleComponent::OnViewChange_Impl( sal_uInt32 dwAspect ) { uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback") ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback") )), uno::UNO_QUERY ); xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONVIEWCHANGE, dwAspect ), uno::Any() ); } @@ -1441,7 +1441,7 @@ void OleComponent::OnClose_Impl() { uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback") ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback") )), uno::UNO_QUERY ); xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONCLOSE ), uno::Any() ); } @@ -1604,7 +1604,7 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor& // allow to retrieve stream-representation of the object persistence bSupportedFlavor = sal_True; uno::Reference < io::XStream > xTempFileStream( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); if ( !xTempFileStream.is() ) diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2f077a44f3af..c441693f4917 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -287,7 +287,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() || aFilterName.equals( ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "MS Word 2007 XML" ) ) ) ) ) { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) )), uno::UNO_QUERY_THROW ); ::rtl::OUString aDocServiceName; @@ -313,21 +313,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::createFromAscii( "SetEmbedded" ); + aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "HierarchicalDocumentName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[0].Value <<= m_aEntryName; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[2].Value <<= aFilterName; - aArgs[3].Name = ::rtl::OUString::createFromAscii( "URL" ); - aArgs[3].Value <<= ::rtl::OUString::createFromAscii( "private:stream" ); - aArgs[4].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + 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[4].Value <<= m_xObjectStream->getInputStream(); xSeekable->seek( 0 ); @@ -339,7 +339,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::createFromAscii( "MediaType" ) ) >>= aMediaType; + xStorProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ) >>= aMediaType; xTmpStorage->dispose(); // look for the related embedded object factory @@ -475,7 +475,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // in case the object is already in requested state @@ -632,7 +632,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -674,7 +674,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: Shouldn't we ask object? ( I guess no ) @@ -785,7 +785,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -921,7 +921,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT if ( m_pOleComponent ) @@ -966,7 +966,7 @@ void SAL_CALL OleEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The client site can not be set currently!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -992,7 +992,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -1019,7 +1019,7 @@ void SAL_CALL OleEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) @@ -1053,7 +1053,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -1083,7 +1083,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object must be in running state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 1fb2e8977d4c..016115fd45fe 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -387,15 +387,10 @@ 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::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - if ( !m_pOleComponent ) { // TODO/LATER: Is it correct??? diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 68a3a057edc4..14e670acd06e 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -73,7 +73,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: { uno::Reference < ucb::XSimpleFileAccess > xAccess( xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( xAccess.is() ) @@ -97,15 +97,15 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: ::rtl::OUString aResult; uno::Reference < beans::XPropertySet > xTempFile( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); if ( !xTempFile.is() ) throw uno::RuntimeException(); // TODO try { - xTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } catch ( uno::Exception& ) @@ -133,7 +133,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { uno::Reference < ucb::XSimpleFileAccess > xTempAccess( xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -183,14 +183,14 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { uno::Reference < beans::XPropertySet > xTempFile( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); uno::Reference < io::XStream > xTempStream( xTempFile, uno::UNO_QUERY_THROW ); xParentStorage->copyStreamElementData( aEntryName, xTempStream ); - xTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } catch( uno::RuntimeException& ) @@ -214,7 +214,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::createFromAscii( "MediaType" ), uno::makeAny( aMediaType ) ); + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )), uno::makeAny( aMediaType ) ); } #endif //------------------------------------------------------ @@ -224,7 +224,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::createFromAscii( "UseCommonStoragePasswordEncryption" ), + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseCommonStoragePasswordEncryption" )), uno::makeAny( (sal_Bool)sal_True ) ); } #ifdef WNT @@ -289,7 +289,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::GetNewFilledTempStream_Impl( co OSL_ENSURE( xInStream.is(), "Wrong parameter is provided!\n" ); uno::Reference < io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xTempOutStream = xTempFile->getOutputStream(); @@ -381,7 +381,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( { // this is either a bitmap or a metafile clipboard format, retrieve the pure stream uno::Reference < io::XStream > xResult( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference < io::XSeekable > xResultSeek( xResult, uno::UNO_QUERY_THROW ); uno::Reference < io::XOutputStream > xResultOut = xResult->getOutputStream(); @@ -389,48 +389,6 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( if ( !xResultOut.is() || !xResultIn.is() ) throw uno::RuntimeException(); - // if it is windows metafile the size must be provided - // the solution is not used currently -// if ( bSetSizeToRepl && abs( aSizeToSet.Width ) < 0xFFFF && abs( aSizeToSet.Height ) < 0xFFFF ) -// { -// uno::Sequence< sal_Int8 > aHeader(22); -// sal_uInt8* pBuffer = (sal_uInt8*)aHeader.getArray(); -// -// // write 0x9ac6cdd7L -// pBuffer[0] = 0xd7; -// pBuffer[1] = 0xcd; -// pBuffer[2] = 0xc6; -// pBuffer[3] = 0x9a; -// -// // following data seems to have no value -// pBuffer[4] = 0; -// pBuffer[5] = 0; -// -// // must be set to 0 -// pBuffer[6] = 0; -// pBuffer[7] = 0; -// pBuffer[8] = 0; -// pBuffer[9] = 0; -// -// // width of the picture -// pBuffer[10] = abs( aSizeToSet.Width ) % 0x100; -// pBuffer[11] = ( abs( aSizeToSet.Width ) / 0x100 ) % 0x100; -// -// // height of the picture -// pBuffer[12] = abs( aSizeToSet.Height ) % 0x100; -// pBuffer[13] = ( abs( aSizeToSet.Height ) / 0x100 ) % 0x100; -// -// // write 2540 -// pBuffer[14] = 0x6c; //0xec; -// pBuffer[15] = 0x01; //0x09; -// -// // fill with 0 -// for ( sal_Int32 nInd = 16; nInd < 22; nInd++ ) -// pBuffer[nInd] = 0; -// -// xResultOut->writeBytes( aHeader ); -// } - xSeek->seek( nHeaderOffset ); // header size for these formats ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xResultOut ); xResultOut->closeOutput(); @@ -459,7 +417,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -471,7 +429,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea xCachedSeek->seek( 0 ); uno::Reference < io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW ); @@ -582,7 +540,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::createFromAscii( "\002OlePres000" ); + ::rtl::OUString aCacheName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres000" )); if ( xNameContainer->hasByName( aCacheName ) ) xNameContainer->replaceByName( aCacheName, uno::makeAny( xTempFile ) ); else @@ -608,7 +566,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::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -617,7 +575,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea for ( sal_uInt8 nInd = 0; nInd < 10; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); if ( xNameContainer->hasByName( aStreamName ) ) xNameContainer->removeByName( aStreamName ); @@ -658,7 +616,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() // open temporary file for reading uno::Reference < ucb::XSimpleFileAccess > xTempAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -682,7 +640,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::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -690,7 +648,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() { for ( sal_uInt8 nInd = 0; nInd < 10 && !bExists; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); try { @@ -729,7 +687,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres { xNameContainer = uno::Reference< container::XNameContainer >( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); } @@ -740,7 +698,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres { for ( sal_uInt8 nInd = 0; nInd < 10; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); uno::Reference< io::XStream > xCachedCopyStream; try @@ -956,7 +914,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::createFromAscii( "OnIconChanged" ) ); + // MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnIconChanged" )) ); } //------------------------------------------------------ @@ -986,7 +944,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::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" )) ); } // =============================================================== } @@ -1129,7 +1087,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > // open temporary file for reading uno::Reference < ucb::XSimpleFileAccess > xTempAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -1173,13 +1131,13 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( m_xParentStorage.is() && m_xObjectStream.is(), "The object has no valid persistence!\n" ); @@ -1261,7 +1219,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( !xTargetStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString::createFromAscii( "application/vnd.sun.star.oleobject" ) ); + SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); uno::Reference< io::XOutputStream > xOutStream = xTargetStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1408,12 +1366,12 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1428,7 +1386,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // it can switch persistant representation only without initialization throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1438,7 +1396,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1535,7 +1493,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( if ( !aURL.getLength() ) throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii( "Empty URL is provided in the media descriptor!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty URL is provided in the media descriptor!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -1557,7 +1515,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1575,7 +1533,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // do nothing, the object has already switched it's persistence } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -1675,7 +1633,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1740,13 +1698,13 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) aGuard.clear(); if ( bUseNew ) { - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); } } } @@ -1771,7 +1729,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStream.is() ) @@ -1801,13 +1759,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1846,13 +1804,13 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1872,7 +1830,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( !m_xObjectStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString::createFromAscii( "application/vnd.sun.star.oleobject" ) ); + SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); uno::Reference< io::XOutputStream > xOutStream = m_xObjectStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1940,12 +1898,12 @@ void SAL_CALL OleEmbeddedObject::storeOwn() aGuard.clear(); - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnSaveDone" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); } //------------------------------------------------------ @@ -1969,13 +1927,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -2010,13 +1968,13 @@ void SAL_CALL OleEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: @@ -2049,12 +2007,12 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -2063,7 +2021,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -2072,7 +2030,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); @@ -2187,12 +2145,12 @@ sal_Bool SAL_CALL OleEmbeddedObject::isLink() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a link object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 31be74774e69..cafafec515ba 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -65,16 +65,16 @@ embed::VisualRepresentation OleEmbeddedObject::GetVisualRepresentationInNativeFo { // it's a bitmap aVisualRepr.Flavor = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ), - ::rtl::OUString::createFromAscii( "Bitmap" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } else { // it's a metafile aVisualRepr.Flavor = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } @@ -111,11 +111,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -191,11 +191,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -339,13 +339,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); embed::VisualRepresentation aVisualRepr; @@ -372,8 +372,8 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres changeState( embed::EmbedStates::RUNNING ); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aVisualRepr.Data = m_pOleComponent->getTransferData( aDataFlavor ); @@ -405,7 +405,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres if ( !m_xCachedVisualRepresentation.is() ) { // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -432,11 +432,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::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 92f233dd2a29..5e158fef6e91 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -126,35 +126,35 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) try { uno::Reference < frame::XComponentLoader > xDocumentLoader( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) )), uno::UNO_QUERY ); if ( xDocumentLoader.is() ) { uno::Sequence< beans::PropertyValue > aArgs( m_aFilterName.getLength() ? 5 : 4 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aArgs[0].Value <<= aFileURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "InteractionHandler" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" )); aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >( static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY ); - aArgs[3].Name = ::rtl::OUString::createFromAscii( "DontEdit" ); + aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DontEdit" )); aArgs[3].Value <<= sal_True; if ( m_aFilterName.getLength() ) { - aArgs[4].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[4].Value <<= m_aFilterName; } uno::Reference< frame::XModel > xModel( xDocumentLoader->loadComponentFromURL( aFileURL, - ::rtl::OUString::createFromAscii( "_blank" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0, aArgs ), uno::UNO_QUERY ); @@ -214,7 +214,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) throw uno::RuntimeException(); uno::Reference< document::XTypeDetection > xTypeDetection( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ) )), uno::UNO_QUERY_THROW ); ::rtl::OUString aTypeName; @@ -276,7 +276,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io // create m_aNativeTempURL ::rtl::OUString aNativeTempURL; uno::Reference < beans::XPropertySet > xNativeTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference < io::XStream > xNativeTempStream( xNativeTempFile, uno::UNO_QUERY_THROW ); uno::Reference < io::XOutputStream > xNativeOutTemp = xNativeTempStream->getOutputStream(); @@ -285,8 +285,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io throw uno::RuntimeException(); try { - xNativeTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xNativeTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aNativeTempURL; } catch ( uno::Exception& ) @@ -430,7 +430,7 @@ void OwnView_Impl::CreateNative() { uno::Reference < ucb::XSimpleFileAccess > xAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XInputStream > xInStream = xAccess->openFileRead( m_aTempFileURL ); @@ -441,11 +441,11 @@ void OwnView_Impl::CreateNative() aArgs[0] <<= xInStream; uno::Reference< container::XNameAccess > xNameAccess( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY_THROW ); - ::rtl::OUString aSubStreamName = ::rtl::OUString::createFromAscii( "\1Ole10Native" ); + ::rtl::OUString aSubStreamName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\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 efaad69d11c7..5305771a1d9b 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -118,15 +118,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::createFromAscii("com.sun.star.embed.MSOLEObjectSystemCreator"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); + 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")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MSOLEDialogObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.MSOLEObjectSystemCreator")); } //------------------------------------------------------------------------- @@ -152,12 +152,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -180,11 +180,11 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia ::osl::Module aOleDlgLib; - if( !aOleDlgLib.load( ::rtl::OUString::createFromAscii( "oledlg" ) ) ) + if( !aOleDlgLib.load( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "oledlg" ) ) )) throw uno::RuntimeException(); OleUIInsertObjectA_Type * pInsertFct = (OleUIInsertObjectA_Type *) - aOleDlgLib.getSymbol( ::rtl::OUString::createFromAscii( "OleUIInsertObjectA" ) ); + aOleDlgLib.getSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OleUIInsertObjectA" ) )); if( !pInsertFct ) throw uno::RuntimeException(); @@ -196,7 +196,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia { uno::Reference< embed::XEmbedObjectCreator > xEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.EmbeddedObjectCreator" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.EmbeddedObjectCreator" ) )), uno::UNO_QUERY ); if ( !xEmbCreator.is() ) throw uno::RuntimeException(); @@ -229,7 +229,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia throw uno::RuntimeException(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aMediaDescr[0].Value <<= aFileURL; // TODO: use config helper for type detection @@ -239,12 +239,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( aHelper.AddFilterNameCheckOwnFile( aMediaDescr ) ) xEmbCreator = uno::Reference< embed::XEmbedObjectCreator >( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.EmbeddedObjectCreator" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.EmbeddedObjectCreator" ) )), uno::UNO_QUERY ); else xEmbCreator = uno::Reference< embed::XEmbedObjectCreator >( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xEmbCreator.is() ) @@ -273,14 +273,14 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( nBufSize && nBufSize == GetMetaFileBitsEx( pMF->hMF, nBufSize, pBuf+22 ) ) { datatransfer::DataFlavor aFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Image WMF" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Image WMF" )), getCppuType( ( const uno::Sequence< sal_Int8 >* ) 0 ) ); aObjectInfo.Options.realloc( 2 ); - aObjectInfo.Options[0].Name = ::rtl::OUString::createFromAscii( "Icon" ); + aObjectInfo.Options[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Icon" )); aObjectInfo.Options[0].Value <<= aMetafile; - aObjectInfo.Options[1].Name = ::rtl::OUString::createFromAscii( "IconFormat" ); + aObjectInfo.Options[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IconFormat" )); aObjectInfo.Options[1].Value <<= aFlavor; } @@ -317,12 +317,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntryName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 ee2212636ad7..0b1ea1e2542b 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -50,15 +50,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::createFromAscii("com.sun.star.embed.OLEEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); + 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")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OleEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLEEmbeddedObjectFactory")); } //------------------------------------------------------------------------- @@ -83,12 +83,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -155,12 +155,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -197,12 +197,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -238,13 +238,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::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -285,12 +285,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); |