summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx26
-rw-r--r--embeddedobj/source/commonembedding/inplaceobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx7
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx122
-rw-r--r--embeddedobj/source/commonembedding/specialobject.cxx18
-rw-r--r--embeddedobj/source/commonembedding/visobj.cxx18
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx38
7 files changed, 106 insertions, 125 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"));
}
//-------------------------------------------------------------------------