summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2010-11-20 17:21:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-20 17:21:10 +0000
commit4ce299887132f9aa01e30d431cf9c3592f62a595 (patch)
tree0bda1b73b9a411890d78a6faa453f643e63f3f0b
parentf4ed7a32c6d58e1dd0e666aaea7c121ef364f725 (diff)
RTL_CONSTASCII_USTRINGPARAM improvements
-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
-rw-r--r--embeddedobj/source/general/docholder.cxx22
-rw-r--r--embeddedobj/source/general/dummyobject.cxx40
-rw-r--r--embeddedobj/source/general/intercept.cxx4
-rw-r--r--embeddedobj/source/general/xcreator.cxx42
-rw-r--r--embeddedobj/source/inc/docholder.hxx2
-rw-r--r--embeddedobj/source/msole/graphconvert.cxx8
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx46
-rw-r--r--embeddedobj/source/msole/oleembed.cxx38
-rw-r--r--embeddedobj/source/msole/olemisc.cxx7
-rw-r--r--embeddedobj/source/msole/olepersist.cxx154
-rw-r--r--embeddedobj/source/msole/olevisual.cxx30
-rw-r--r--embeddedobj/source/msole/ownview.cxx28
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx34
-rw-r--r--embeddedobj/source/msole/xolefactory.cxx26
-rw-r--r--fpicker/source/aqua/FPentry.cxx8
-rw-r--r--fpicker/source/aqua/FilterHelper.cxx4
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.cxx19
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.cxx10
-rw-r--r--fpicker/source/odma/ODMAFilePicker.cxx12
-rw-r--r--fpicker/source/odma/ODMAFolderPicker.cxx6
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx4
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx4
-rw-r--r--fpicker/source/office/commonpicker.cxx4
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx8
-rw-r--r--fpicker/source/unx/gnome/FPentry.cxx8
-rw-r--r--fpicker/source/unx/gnome/SalGtkFilePicker.cxx26
-rw-r--r--fpicker/source/unx/gnome/SalGtkFolderPicker.cxx8
-rw-r--r--fpicker/source/unx/gnome/SalGtkPicker.cxx8
-rw-r--r--fpicker/source/unx/kde4/KDE4FPEntry.cxx4
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx14
-rw-r--r--fpicker/source/unx/kde_unx/UnxFPentry.cxx4
-rw-r--r--fpicker/source/unx/kde_unx/UnxFilePicker.cxx36
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx6
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx18
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx16
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx6
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx34
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.cxx8
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.cxx6
-rw-r--r--fpicker/source/win32/filepicker/previewbase.cxx4
-rw-r--r--fpicker/source/win32/filepicker/shared.hxx6
-rw-r--r--fpicker/source/win32/filepicker/workbench/Test_fps.cxx8
-rw-r--r--fpicker/source/win32/folderpicker/FolderPicker.cxx4
-rw-r--r--fpicker/source/win32/folderpicker/WinFOPImpl.cxx4
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx20
53 files changed, 483 insertions, 558 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 94aad2c32d..34cdad312f 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 a9e4b4eb21..bec36d34a0 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 160f867561..a74ec8c959 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 88e537f578..edb1c8fbff 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 08454d3339..cb54cc48b9 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 60f3094f9d..3403c81614 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 a6b80ec729..dcc24a3e91 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 1659fadf3e..c7d4104ecc 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 8f82a0a955..e2a5fbde0e 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 3839cedb9b..52cc9ee2d1 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 cd05297810..2f9c3a2c1d 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 9a1e6ee37c..8d26ef29bf 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 d9cab95ba8..e8a6e99201 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 62b509e143..4ff0bd44dc 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 54b3f104b4..4802b3109b 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 66c7323b54..bf53a25c4f 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 b67159bf1d..805f3821ba 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 4eaf03b9b3..2e7c796a88 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 1585860234..7a7d19b915 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 953daaf7d8..4bcc7836c3 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 48114adbd2..f35af3a53b 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 );
diff --git a/fpicker/source/aqua/FPentry.cxx b/fpicker/source/aqua/FPentry.cxx
index f25037a8a3..213ef9f513 100644
--- a/fpicker/source/aqua/FPentry.cxx
+++ b/fpicker/source/aqua/FPentry.cxx
@@ -89,8 +89,8 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
try
{
Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
- pXNewKey->createKey( OUString::createFromAscii( FOLDER_PICKER_REGKEY_NAME ) );
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) ));
}
catch( InvalidRegistryException& )
{
@@ -122,7 +122,7 @@ void* SAL_CALL component_getFactory(
{
Sequence< OUString > aSNS( 1 );
aSNS.getArray( )[0] =
- OUString::createFromAscii(FILE_PICKER_SERVICE_NAME);
+ OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_SERVICE_NAME));
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -134,7 +134,7 @@ void* SAL_CALL component_getFactory(
{
Sequence< OUString > aSNS( 1 );
aSNS.getArray( )[0] =
- OUString::createFromAscii(FOLDER_PICKER_SERVICE_NAME);
+ OUString(RTL_CONSTASCII_USTRINGPARAM(FOLDER_PICKER_SERVICE_NAME));
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/fpicker/source/aqua/FilterHelper.cxx b/fpicker/source/aqua/FilterHelper.cxx
index 33d0769ca7..c67d1e8565 100644
--- a/fpicker/source/aqua/FilterHelper.cxx
+++ b/fpicker/source/aqua/FilterHelper.cxx
@@ -372,7 +372,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::
// append the filter
if (bPrependSeparator) {
- rtl::OUString dash = rtl::OUString::createFromAscii("-");
+ rtl::OUString dash(RTL_CONSTASCII_USTRINGPARAM("-"));
OUStringList emptyList;
m_pFilterList->push_back(FilterEntry(dash, emptyList));
}
@@ -419,7 +419,7 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
{
rtl::OUString aName = [sFilename OUString];
- rtl::OUString allMatcher = rtl::OUString::createFromAscii(".*");
+ rtl::OUString allMatcher(RTL_CONSTASCII_USTRINGPARAM(".*"));
for(OUStringList::iterator iter = suffixList.begin(); iter != suffixList.end(); iter++) {
if (aName.matchIgnoreAsciiCase(*iter, aName.getLength() - (*iter).getLength()) || ((*iter).equals(allMatcher))) {
return sal_True;
diff --git a/fpicker/source/aqua/SalAquaFilePicker.cxx b/fpicker/source/aqua/SalAquaFilePicker.cxx
index f48f174c74..ea798295c7 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.cxx
+++ b/fpicker/source/aqua/SalAquaFilePicker.cxx
@@ -94,9 +94,9 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
- aRet[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
- aRet[1] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" );
- aRet[2] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.AquaFilePicker" );
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" ));
+ aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.AquaFilePicker" ));
return aRet;
}
}
@@ -187,7 +187,6 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
// if m_pDialog is nil after initialization, something must have gone wrong before
// or there was no initialization (see issue http://www.openoffice.org/issues/show_bug.cgi?id=100214)
if (m_pDialog == nil) {
- //throw uno::RuntimeException(rtl::OUString::createFromAscii("The dialog was not properly initialized!"), static_cast< XFilePicker* >( this ));
m_nDialogType = NAVIGATIONSERVICES_OPEN;
}
@@ -206,7 +205,7 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
rtl::OUString ouName = [windowTitle OUString];
//a window title will typically be something like "Untitled1 - OpenOffice.org Writer"
//but we only want the "Untitled1" part of it
- sal_Int32 indexOfDash = ouName.indexOf(rtl::OUString::createFromAscii(" - "));
+ sal_Int32 indexOfDash = ouName.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")));
if (indexOfDash > -1) {
m_sSaveFileName = ouName.copy(0,indexOfDash);
if (m_sSaveFileName.getLength() > 0) {
@@ -244,7 +243,7 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
break;
default:
- throw uno::RuntimeException(rtl::OUString::createFromAscii("The dialog returned with an unknown result!"), static_cast< XFilePicker* >( this ));
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The dialog returned with an unknown result!")), static_cast< XFilePicker* >( this ));
break;
}
@@ -506,14 +505,14 @@ throw( uno::Exception, uno::RuntimeException )
// parameter checking
uno::Any aAny;
if( 0 == aArguments.getLength() )
- throw lang::IllegalArgumentException(rtl::OUString::createFromAscii( "no arguments" ),
+ throw lang::IllegalArgumentException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
static_cast<XFilePicker*>( this ), 1 );
aAny = aArguments[0];
if( ( aAny.getValueType() != ::getCppuType( ( sal_Int16* )0 ) ) &&
(aAny.getValueType() != ::getCppuType( ( sal_Int8* )0 ) ) )
- throw lang::IllegalArgumentException(rtl::OUString::createFromAscii( "invalid argument type" ),
+ throw lang::IllegalArgumentException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid argument type" )),
static_cast<XFilePicker*>( this ), 1 );
sal_Int16 templateId = -1;
@@ -566,7 +565,7 @@ throw( uno::Exception, uno::RuntimeException )
OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION" );
break;
default:
- throw lang::IllegalArgumentException(rtl::OUString::createFromAscii( "Unknown template" ),
+ throw lang::IllegalArgumentException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
static_cast< XFilePicker* >( this ),
1 );
}
@@ -625,7 +624,7 @@ throw( uno::RuntimeException )
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
- rtl::OUString retVal = rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
+ rtl::OUString retVal(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME ));
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.cxx b/fpicker/source/aqua/SalAquaFolderPicker.cxx
index de229cd3bd..bad373aec8 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.cxx
+++ b/fpicker/source/aqua/SalAquaFolderPicker.cxx
@@ -80,8 +80,8 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FolderPicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(2);
- aRet[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFolderPicker" );
- aRet[1] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.AquaFolderPicker" );
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" ));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.AquaFolderPicker" ));
return aRet;
}
}
@@ -137,7 +137,7 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
break;
default:
- throw uno::RuntimeException(rtl::OUString::createFromAscii("The dialog returned with an unknown result!"), static_cast< XFolderPicker* >( this ));
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The dialog returned with an unknown result!")), static_cast< XFolderPicker* >( this ));
break;
}
@@ -189,7 +189,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx
OSL_TRACE("# of items: %d", nFiles);
if (nFiles < 1) {
- throw uno::RuntimeException(rtl::OUString::createFromAscii("no directory selected"), static_cast< XFolderPicker* >( this ));
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no directory selected")), static_cast< XFolderPicker* >( this ));
}
rtl::OUString aDirectory;
@@ -226,7 +226,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
- rtl::OUString retVal = rtl::OUString::createFromAscii( FOLDER_PICKER_IMPL_NAME );
+ rtl::OUString retVal(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_IMPL_NAME ));
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
diff --git a/fpicker/source/odma/ODMAFilePicker.cxx b/fpicker/source/odma/ODMAFilePicker.cxx
index 39153b631f..685da9f377 100644
--- a/fpicker/source/odma/ODMAFilePicker.cxx
+++ b/fpicker/source/odma/ODMAFilePicker.cxx
@@ -85,7 +85,7 @@ ODMAFilePicker::ODMAFilePicker( const Reference < XMultiServiceFactory >& xFacto
{
m_bUseDMS = ::odma::DMSsAvailable();
m_xSystemFilePicker = xFactory->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.Win32FilePicker" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.Win32FilePicker" ) ));
}
// XExecutableDialog functions
@@ -163,7 +163,7 @@ sal_Int16 SAL_CALL ODMAFilePicker::execute( )
// Insane API... the first element is a full URI, the rest
// are just the "basenames" in the same "directory".
if (i == 0)
- strings[0] = rtl::OUString::createFromAscii( "vnd.sun.star.odma:/" ) + rtl::OUString::createFromAscii( p );
+ strings[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.odma:/" )) + rtl::OUString::createFromAscii( p );
else
strings[i] = rtl::OUString::createFromAscii( p );
p += strlen( p );
@@ -198,7 +198,7 @@ sal_Int16 SAL_CALL ODMAFilePicker::execute( )
NODMUnRegisterApp( handle );
if (status == ODM_SUCCESS)
{
- rtl::OUString s( rtl::OUString::createFromAscii( "vnd.sun.star.odma:/" ) +
+ rtl::OUString s( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.odma:/" )) +
rtl::OUString::createFromAscii( newdocid ) );
// Create a Content for the odma URL so that
// odma::ContentProvider will learn about the DOCID we
@@ -520,7 +520,7 @@ Sequence< rtl::OUString > ODMAFilePicker::impl_getStaticSupportedServiceNames( )
{
Sequence< rtl::OUString > seqServiceNames( 2 );
rtl::OUString* pArray = seqServiceNames.getArray();
- pArray[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.ODMAFilePicker" );
+ pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.ODMAFilePicker" ));
// Super-ugly, but check the function sal_Bool
// lcl_isSystemFilePicker( const Reference< XFilePicker >& ) in
@@ -530,13 +530,13 @@ Sequence< rtl::OUString > ODMAFilePicker::impl_getStaticSupportedServiceNames( )
// isn't it? If we don't claim to implement this "service" (which
// is not defined in any IDL file, btw), we get hangs.
- pArray[1] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" );
+ pArray[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" ));
return seqServiceNames ;
}
rtl::OUString ODMAFilePicker::impl_getStaticImplementationName( )
{
- return rtl::OUString::createFromAscii( "com.sun.star.svtools.ODMAFilePicker" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.ODMAFilePicker" ));
}
Reference< XInterface > SAL_CALL ODMAFilePicker::impl_createInstance(
diff --git a/fpicker/source/odma/ODMAFolderPicker.cxx b/fpicker/source/odma/ODMAFolderPicker.cxx
index 82e83a918b..5c9536ac32 100644
--- a/fpicker/source/odma/ODMAFolderPicker.cxx
+++ b/fpicker/source/odma/ODMAFolderPicker.cxx
@@ -67,7 +67,7 @@ ODMAFolderPicker::ODMAFolderPicker( const Reference < XMultiServiceFactory >& xF
m_bUseDMS( sal_False )
{
m_xInterface = xFactory->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFolderPicker" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" ) ));
}
// XExecutableDialog functions
@@ -166,13 +166,13 @@ Sequence< ::rtl::OUString > ODMAFolderPicker::impl_getStaticSupportedServiceName
{
Sequence< ::rtl::OUString > seqServiceNames( 1 );
::rtl::OUString* pArray = seqServiceNames.getArray();
- pArray[0] = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.ODMAFolderPicker" );
+ pArray[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.ODMAFolderPicker" ));
return seqServiceNames ;
}
::rtl::OUString ODMAFolderPicker::impl_getStaticImplementationName( )
{
- return ::rtl::OUString::createFromAscii( "com.sun.star.svtools.ODMAFolderPicker" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.ODMAFolderPicker" ));
}
Reference< XInterface > SAL_CALL ODMAFolderPicker::impl_createInstance( const Reference< XComponentContext >& rxContext )
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index c75245b845..e5ab24f920 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -1166,14 +1166,14 @@ Sequence< rtl::OUString > SvtFilePicker::impl_getStaticSupportedServiceNames()
{
Sequence< rtl::OUString > seqServiceNames( 1 );
rtl::OUString* pArray = seqServiceNames.getArray();
- pArray[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.OfficeFilePicker" );
+ pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.OfficeFilePicker" ));
return seqServiceNames ;
}
/* Helper for XServiceInfo */
rtl::OUString SvtFilePicker::impl_getStaticImplementationName()
{
- return rtl::OUString::createFromAscii( "com.sun.star.svtools.OfficeFilePicker" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.OfficeFilePicker" ));
}
/* Helper for registry */
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index f6133f5e99..f158a89092 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -246,14 +246,14 @@ Sequence< ::rtl::OUString > SAL_CALL SvtFolderPicker::getSupportedServiceNames()
Sequence< ::rtl::OUString > SvtFolderPicker::impl_getStaticSupportedServiceNames()
{
Sequence< ::rtl::OUString > seqServiceNames(1);
- seqServiceNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.OfficeFolderPicker" );
+ seqServiceNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.OfficeFolderPicker" ));
return seqServiceNames ;
}
/* Helper for XServiceInfo */
::rtl::OUString SvtFolderPicker::impl_getStaticImplementationName()
{
- return ::rtl::OUString::createFromAscii( "com.sun.star.svtools.OfficeFolderPicker" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.OfficeFolderPicker" ));
}
/* Helper for registry */
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index 73a915203e..77dfac0c14 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -67,13 +67,13 @@ namespace svt
{
// the two properties we have
registerProperty(
- ::rtl::OUString::createFromAscii( "HelpURL" ), PROPERTY_ID_HELPURL,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HelpURL" )), PROPERTY_ID_HELPURL,
PropertyAttribute::TRANSIENT,
&m_sHelpURL, ::getCppuType( &m_sHelpURL )
);
registerProperty(
- ::rtl::OUString::createFromAscii( "Window" ), PROPERTY_ID_WINDOW,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Window" )), PROPERTY_ID_WINDOW,
PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY,
&m_xWindow, ::getCppuType( &m_xWindow )
);
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 630cadec48..5b8bb254e9 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -226,7 +226,7 @@ namespace svt
try
{
::rtl::OUString sTitle;
- m_pContent->getPropertyValue( ::rtl::OUString::createFromAscii( "Title" ) ) >>= sTitle;
+ m_pContent->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) >>= sTitle;
_rTitle = sTitle;
// from here on, we definately know that the content is valid
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index d8873f1079..f69dbcf980 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -521,7 +521,7 @@ SvtFileDialog::~SvtFileDialog()
SvtViewOptions aDlgOpt( E_DIALOG, _pImp->_aIniKey );
aDlgOpt.SetWindowState( String( GetWindowState(), osl_getThreadTextEncoding() ) );
String sUserData = _pFileView->GetConfigString();
- aDlgOpt.SetUserItem( ::rtl::OUString::createFromAscii( "UserData" ),
+ aDlgOpt.SetUserItem( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UserData" )),
makeAny( ::rtl::OUString( sUserData ) ) );
}
@@ -2071,8 +2071,8 @@ short SvtFileDialog::PrepareExecute()
INetURLObject::NO_DECODE ) ),
Reference< XCommandEnvironment >() );
Sequence< rtl::OUString > aProps(2);
- aProps[0] = rtl::OUString::createFromAscii( "IsVolume" );
- aProps[1] = rtl::OUString::createFromAscii( "IsRemoveable" );
+ aProps[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsVolume" ));
+ aProps[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRemoveable" ));
Reference< XResultSet > xResultSet
= aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY );
@@ -2502,7 +2502,7 @@ void SvtFileDialog::InitSize()
{
SetWindowState( ByteString( String( aDlgOpt.GetWindowState() ), osl_getThreadTextEncoding() ) );
- Any aUserData = aDlgOpt.GetUserItem( ::rtl::OUString::createFromAscii( "UserData" ) );
+ Any aUserData = aDlgOpt.GetUserItem( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UserData" ) ));
::rtl::OUString sCfgStr;
if ( aUserData >>= sCfgStr )
_pFileView->SetConfigString( String( sCfgStr ) );
diff --git a/fpicker/source/unx/gnome/FPentry.cxx b/fpicker/source/unx/gnome/FPentry.cxx
index 1a5708890a..83601a0623 100644
--- a/fpicker/source/unx/gnome/FPentry.cxx
+++ b/fpicker/source/unx/gnome/FPentry.cxx
@@ -115,8 +115,8 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
try
{
Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
- pXNewKey->createKey( OUString::createFromAscii( FOLDER_PICKER_REGKEY_NAME ) );
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) ));
}
catch( InvalidRegistryException& )
{
@@ -153,7 +153,7 @@ void* SAL_CALL component_getFactory(
{
Sequence< OUString > aSNS( 1 );
aSNS.getArray( )[0] =
- OUString::createFromAscii(FILE_PICKER_SERVICE_NAME);
+ OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_SERVICE_NAME));
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -165,7 +165,7 @@ void* SAL_CALL component_getFactory(
{
Sequence< OUString > aSNS( 1 );
aSNS.getArray( )[0] =
- OUString::createFromAscii(FOLDER_PICKER_SERVICE_NAME);
+ OUString(RTL_CONSTASCII_USTRINGPARAM(FOLDER_PICKER_SERVICE_NAME));
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index a417f81cc1..585888d5e8 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -89,9 +89,9 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
- aRet[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
- aRet[1] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" );
- aRet[2] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.GtkFilePicker" );
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" ));
+ aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.GtkFilePicker" ));
return aRet;
}
}
@@ -907,7 +907,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
if( sExtension.getLength() >= 3 ) // 3 = typical/minimum extension length
{
- static const OUString aStarDot = OUString::createFromAscii( "*." );
+ static const OUString aStarDot(RTL_CONSTASCII_USTRINGPARAM( "*." ));
::rtl::OUString aNewFilter;
::rtl::OUString aOldFilter = getCurrentFilter();
@@ -977,7 +977,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
if( !bExtensionTypedIn && ( !sToken.equalsAscii( "*" ) ) )
{
//if the filename does not already have the auto extension, stick it on
- OUString sExtension = OUString::createFromAscii( "." ) + sToken;
+ OUString sExtension = OUString(RTL_CONSTASCII_USTRINGPARAM( "." )) + sToken;
OUString &rBase = aSelectedFiles[nIndex];
sal_Int32 nExtensionIdx = rBase.getLength() - sExtension.getLength();
OSL_TRACE( "idx are %d %d\n", rBase.lastIndexOf( sExtension ), nExtensionIdx );
@@ -1028,7 +1028,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
int btn = GTK_RESPONSE_NO;
uno::Reference< awt::XExtendedToolkit > xToolkit(
- m_xServiceMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.Toolkit") ), uno::UNO_QUERY);
+ m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), uno::UNO_QUERY);
RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit);
uno::Reference < awt::XTopWindowListener > xLifeCycle(pRunDialog);
@@ -1505,7 +1505,7 @@ void SalGtkFilePicker::implChangeType( GtkTreeSelection *selection )
{
gchar *title;
gtk_tree_model_get (model, &iter, 2, &title, -1);
- aLabel += rtl::OUString::createFromAscii( ": " );
+ aLabel += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ": " ));
aLabel += rtl::OUString( title, strlen(title), RTL_TEXTENCODING_UTF8 );
g_free (title);
}
@@ -1640,7 +1640,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
uno::Any aAny;
if( 0 == aArguments.getLength() )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "no arguments" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
static_cast<XFilePicker2*>( this ), 1 );
aAny = aArguments[0];
@@ -1648,7 +1648,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
if( ( aAny.getValueType() != ::getCppuType( ( sal_Int16* )0 ) ) &&
(aAny.getValueType() != ::getCppuType( ( sal_Int8* )0 ) ) )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "invalid argument type" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid argument type" )),
static_cast<XFilePicker2*>( this ), 1 );
sal_Int16 templateId = -1;
@@ -1736,7 +1736,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
break;
default:
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "Unknown template" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
static_cast< XFilePicker2* >( this ),
1 );
}
@@ -1815,7 +1815,7 @@ void SAL_CALL SalGtkFilePicker::cancel() throw( uno::RuntimeException )
rtl::OUString SAL_CALL SalGtkFilePicker::getImplementationName()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME ));
}
// -------------------------------------------------
@@ -1915,7 +1915,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
OString aFilterName = rtl::OUStringToOString( aShrunkName, RTL_TEXTENCODING_UTF8 );
gtk_file_filter_set_name( filter, aFilterName );
- static const OUString aStarDot = OUString::createFromAscii( "*." );
+ static const OUString aStarDot(RTL_CONSTASCII_USTRINGPARAM( "*." ));
OUString aTokens;
bool bAllGlob = !rType.compareToAscii( "*.*" ) || !rType.compareToAscii( "*" );
@@ -1933,7 +1933,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
if (aToken.getLength())
{
if (aTokens.getLength())
- aTokens += OUString::createFromAscii(",");
+ aTokens += OUString(RTL_CONSTASCII_USTRINGPARAM(","));
aTokens = aTokens += aToken;
gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_URI,
case_insensitive_filter,
diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
index caeb1e8c36..249a5446eb 100644
--- a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
@@ -79,8 +79,8 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FolderPicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(2);
- aRet[0] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFolderPicker" );
- aRet[1] = rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.GtkFolderPicker" );
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" ));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.GtkFolderPicker" ));
return aRet;
}
}
@@ -182,7 +182,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException )
sal_Int16 retVal = 0;
uno::Reference< awt::XExtendedToolkit > xToolkit(
- m_xServiceMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.Toolkit") ), uno::UNO_QUERY);
+ m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), uno::UNO_QUERY);
RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit);
uno::Reference < awt::XTopWindowListener > xLifeCycle(pRunDialog);
@@ -221,7 +221,7 @@ void SAL_CALL SalGtkFolderPicker::cancel() throw( uno::RuntimeException )
rtl::OUString SAL_CALL SalGtkFolderPicker::getImplementationName()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( FOLDER_PICKER_IMPL_NAME );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_IMPL_NAME ));
}
// -------------------------------------------------
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx
index ceea7444ce..6dbaa032ad 100644
--- a/fpicker/source/unx/gnome/SalGtkPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx
@@ -221,19 +221,19 @@ static void lcl_setGTKLanguage(const uno::Reference<lang::XMultiServiceFactory>&
{
uno::Reference<lang::XMultiServiceFactory> xConfigMgr =
uno::Reference<lang::XMultiServiceFactory>(xServiceMgr->createInstance(
- OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))),
UNO_QUERY_THROW );
Sequence< Any > theArgs(1);
- theArgs[ 0 ] <<= OUString::createFromAscii("org.openoffice.Office.Linguistic/General");
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Linguistic/General"));
uno::Reference< container::XNameAccess > xNameAccess =
uno::Reference< container::XNameAccess >(xConfigMgr->createInstanceWithArguments(
- OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), theArgs ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), theArgs ),
UNO_QUERY_THROW );
if (xNameAccess.is())
- xNameAccess->getByName(OUString::createFromAscii("UILocale")) >>= sUILocale;
+ xNameAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= sUILocale;
} catch (...) {}
if (sUILocale.getLength())
diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
index a51502c7ea..d0d5299b1f 100644
--- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx
+++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
@@ -65,7 +65,7 @@ extern "C"
try
{
Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
}
catch( InvalidRegistryException& )
{
@@ -84,7 +84,7 @@ extern "C"
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
+ aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME ));
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 3c2bdd8929..8594f7e430 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -99,9 +99,9 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
- aRet[0] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.FilePicker");
- aRet[1] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.SystemFilePicker");
- aRet[2] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.KDE4FilePicker");
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilePicker"));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker"));
+ aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.KDE4FilePicker"));
return aRet;
}
}
@@ -615,7 +615,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
if (args.getLength() == 0)
{
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "no arguments" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
static_cast< XFilePicker* >( this ), 1 );
}
@@ -625,7 +625,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
( arg.getValueType() != ::getCppuType((sal_Int8*)0)))
{
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "invalid argument type" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid argument type" )),
static_cast< XFilePicker* >( this ), 1 );
}
@@ -697,7 +697,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
default:
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "Unknown template" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
static_cast< XFilePicker* >( this ),
1 );
}
@@ -726,7 +726,7 @@ void SAL_CALL KDE4FilePicker::disposing( const lang::EventObject &rEvent )
rtl::OUString SAL_CALL KDE4FilePicker::getImplementationName()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME ));
}
sal_Bool SAL_CALL KDE4FilePicker::supportsService( const rtl::OUString& ServiceName )
diff --git a/fpicker/source/unx/kde_unx/UnxFPentry.cxx b/fpicker/source/unx/kde_unx/UnxFPentry.cxx
index ac011348ea..c577440cde 100644
--- a/fpicker/source/unx/kde_unx/UnxFPentry.cxx
+++ b/fpicker/source/unx/kde_unx/UnxFPentry.cxx
@@ -82,7 +82,7 @@ sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey
try
{
Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
}
catch( InvalidRegistryException& )
{
@@ -105,7 +105,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
+ aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME ));
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx b/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
index 21e32dc7f9..e280d837fc 100644
--- a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
+++ b/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
@@ -77,9 +77,9 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
- aRet[0] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.FilePicker");
- aRet[1] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.SystemFilePicker");
- aRet[2] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.KDEFilePicker");
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilePicker"));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker"));
+ aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.KDEFilePicker"));
return aRet;
}
}
@@ -113,7 +113,7 @@ UnxFilePicker::~UnxFilePicker()
{
if ( m_nFilePickerPid > 0 )
{
- sendCommand( ::rtl::OUString::createFromAscii( "exit" ) );
+ sendCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "exit" )) );
waitpid( m_nFilePickerPid, NULL, 0 );
}
@@ -182,7 +182,7 @@ sal_Int16 SAL_CALL UnxFilePicker::execute()
// this is _not_ an osl::Condition, see i#93366
m_pCommandThread->execCondition().reset();
- sendCommand( ::rtl::OUString::createFromAscii( "exec" ) );
+ sendCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "exec" ) ));
m_pCommandThread->execCondition().wait();
@@ -196,8 +196,8 @@ void SAL_CALL UnxFilePicker::setMultiSelectionMode( sal_Bool bMode )
::osl::MutexGuard aGuard( m_aMutex );
::rtl::OUString aString = bMode?
- ::rtl::OUString::createFromAscii( "setMultiSelection true" ):
- ::rtl::OUString::createFromAscii( "setMultiSelection false" );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "setMultiSelection true" )):
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "setMultiSelection false" ));
sendCommand( aString );
}
@@ -236,7 +236,7 @@ rtl::OUString SAL_CALL UnxFilePicker::getDisplayDirectory()
checkFilePicker();
::osl::MutexGuard aGuard( m_aMutex );
- sendCommand( ::rtl::OUString::createFromAscii( "getDirectory" ),
+ sendCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getDirectory" )),
m_pCommandThread->getDirectoryCondition() );
return m_pCommandThread->getDirectory();
@@ -248,7 +248,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL UnxFilePicker::getFiles()
checkFilePicker();
::osl::MutexGuard aGuard( m_aMutex );
- sendCommand( ::rtl::OUString::createFromAscii( "getFiles" ),
+ sendCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getFiles" )),
m_pCommandThread->getFilesCondition() );
return m_pCommandThread->getFiles();
@@ -290,7 +290,7 @@ rtl::OUString SAL_CALL UnxFilePicker::getCurrentFilter()
checkFilePicker();
::osl::MutexGuard aGuard( m_aMutex );
- sendCommand( ::rtl::OUString::createFromAscii( "getCurrentFilter" ),
+ sendCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getCurrentFilter" )),
m_pCommandThread->getCurrentFilterCondition() );
return m_pCommandThread->getCurrentFilter();
@@ -543,21 +543,21 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen
uno::Any aAny;
if ( 0 == rArguments.getLength( ) )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "no arguments" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
static_cast< XFilePicker* >( this ), 1 );
aAny = rArguments[0];
if ( ( aAny.getValueType() != ::getCppuType( (sal_Int16*)0 ) ) && ( aAny.getValueType() != ::getCppuType( (sal_Int8*)0 ) ) )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "invalid argument type" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid argument type" )),
static_cast< XFilePicker* >( this ), 1 );
sal_Int16 templateId = -1;
aAny >>= templateId;
- ::rtl::OUString aTypeOpen = ::rtl::OUString::createFromAscii( "setType \"open\"" );
- ::rtl::OUString aTypeSaveAs = ::rtl::OUString::createFromAscii( "setType \"save\"" );
+ ::rtl::OUString aTypeOpen(RTL_CONSTASCII_USTRINGPARAM( "setType \"open\"" ));
+ ::rtl::OUString aTypeSaveAs(RTL_CONSTASCII_USTRINGPARAM( "setType \"save\"" ));
switch ( templateId )
{
@@ -634,7 +634,7 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen
default:
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "Unknown template" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
static_cast< XFilePicker* >( this ),
1 );
}
@@ -662,7 +662,7 @@ void SAL_CALL UnxFilePicker::disposing( const lang::EventObject &rEvent )
rtl::OUString SAL_CALL UnxFilePicker::getImplementationName()
throw( uno::RuntimeException )
{
- return rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME ));
}
sal_Bool SAL_CALL UnxFilePicker::supportsService( const rtl::OUString& ServiceName )
@@ -773,7 +773,7 @@ void UnxFilePicker::checkFilePicker() throw( ::com::sun::star::uno::RuntimeExcep
else
{
throw uno::RuntimeException(
- ::rtl::OUString::createFromAscii( "the external file picker does not run" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "the external file picker does not run" )),
*this );
}
}
@@ -783,7 +783,7 @@ void UnxFilePicker::sendCommand( const ::rtl::OUString &rCommand )
if ( m_nFilePickerWrite < 0 )
return;
- ::rtl::OString aUtfString = OUStringToOString( rCommand + ::rtl::OUString::createFromAscii( "\n" ), RTL_TEXTENCODING_UTF8 );
+ ::rtl::OString aUtfString = OUStringToOString( rCommand + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\n" )), RTL_TEXTENCODING_UTF8 );
#if OSL_DEBUG_LEVEL > 0
::std::cerr << "UnxFilePicker sent: \"" << aUtfString.getStr() << "\"" << ::std::endl;
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index 68d367a9e0..91c9632d40 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -113,8 +113,8 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
}
catch( InvalidRegistryException& )
{
@@ -138,7 +138,7 @@ void* SAL_CALL component_getFactory(
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
+ aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME ));
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 322c4ae2f2..04b5e7388e 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -76,8 +76,8 @@ namespace
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(2);
- aRet[0] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.FilePicker");
- aRet[1] = rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.SystemFilePicker");
+ aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilePicker"));
+ aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker"));
return aRet;
}
}
@@ -123,7 +123,7 @@ void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePicke
{
if ( rBHelper.bDisposed )
throw lang::DisposedException(
- rtl::OUString::createFromAscii( "object is already disposed" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "object is already disposed" )),
static_cast< XFilePicker2* >( this ) );
if ( !rBHelper.bInDispose && !rBHelper.bDisposed )
@@ -139,7 +139,7 @@ void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePi
{
if ( rBHelper.bDisposed )
throw lang::DisposedException(
- rtl::OUString::createFromAscii( "object is already disposed" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "object is already disposed" )),
static_cast< XFilePicker2* >( this ) );
rBHelper.aLC.removeInterface( getCppuType( &xListener ), xListener );
@@ -462,7 +462,7 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
OSL_ENSURE(sal_False, "Could not start event notifier thread!");
throw uno::RuntimeException(
- rtl::OUString::createFromAscii("Error executing dialog"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error executing dialog")),
static_cast<XFilePicker2*>(this));
}
@@ -630,7 +630,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
uno::Any aAny;
if ( 0 == aArguments.getLength( ) )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "no arguments" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
static_cast<XFilePicker2*>(this), 1);
aAny = aArguments[0];
@@ -638,7 +638,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
if ( (aAny.getValueType() != ::getCppuType((sal_Int16*)0)) &&
(aAny.getValueType() != ::getCppuType((sal_Int8*)0)) )
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii("invalid argument type"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("invalid argument type")),
static_cast<XFilePicker2*>(this), 1);
sal_Int16 templateId = -1;
@@ -728,7 +728,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
default:
throw lang::IllegalArgumentException(
- rtl::OUString::createFromAscii( "Unknown template" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
static_cast< XFilePicker2* >( this ),
1 );
}
@@ -768,7 +768,7 @@ void SAL_CALL CFilePicker::cancel()
rtl::OUString SAL_CALL CFilePicker::getImplementationName()
throw(uno::RuntimeException)
{
- return rtl::OUString::createFromAscii(FILE_PICKER_IMPL_NAME);
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_IMPL_NAME));
}
// -------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 397fac4f14..ce38abf435 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -92,8 +92,8 @@ namespace
css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > aRet(2);
- aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.FilePicker");
- aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.SystemFilePicker");
+ aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FilePicker"));
+ aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker"));
return aRet;
}
}
@@ -552,17 +552,9 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
- /*
- // called twice ?
- if (m_pDlg)
- throw css::uno::Exception(
- ::rtl::OUString::createFromAscii( "XInitialization::initialize() called twice." ),
- static_cast< css::ui::dialogs::XFilePicker* >( this ));
- */
-
if (lArguments.getLength() < 1)
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii( "XInitialization::initialize() called without arguments." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "XInitialization::initialize() called without arguments." )),
static_cast< css::ui::dialogs::XFilePicker2* >( this ),
1);
@@ -692,7 +684,7 @@ void SAL_CALL VistaFilePicker::cancel()
::rtl::OUString SAL_CALL VistaFilePicker::getImplementationName()
throw(css::uno::RuntimeException)
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.fpicker.VistaFileDialog");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.fpicker.VistaFileDialog"));
}
// -------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index 48dbfcaa37..14cefe36f7 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -164,7 +164,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* /*pDialog*
//-----------------------------------------------------------------------------------------
void lcl_updateVersionListDirectly(IFileDialog* pDialog)
{
- static const ::rtl::OUString SERVICENAME_REVISIONPERSISTENCE = ::rtl::OUString::createFromAscii("com.sun.star.document.DocumentRevisionListPersistence");
+ static const ::rtl::OUString SERVICENAME_REVISIONPERSISTENCE(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentRevisionListPersistence"));
static const ::sal_Int16 CONTROL_VERSIONLIST = css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_VERSION;
TFileDialog iDialog (pDialog);
@@ -405,8 +405,8 @@ void VistaFilePickerEventHandler::stopListening()
}
}
-static const ::rtl::OUString PROP_CONTROL_ID = ::rtl::OUString::createFromAscii("control_id");
-static const ::rtl::OUString PROP_PICKER_LISTENER = ::rtl::OUString::createFromAscii("picker_listener");
+static const ::rtl::OUString PROP_CONTROL_ID(RTL_CONSTASCII_USTRINGPARAM("control_id"));
+static const ::rtl::OUString PROP_PICKER_LISTENER(RTL_CONSTASCII_USTRINGPARAM("picker_listener"));
//-----------------------------------------------------------------------------------------
class AsyncPickerEvents : public RequestHandler
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index c902cf9f2d..823141d3b8 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -93,24 +93,24 @@ static const ::sal_Int32 FEATURE_PLAY = 256;
static const ::sal_Int32 FEATURE_READONLY = 512;
static const ::sal_Int32 FEATURE_VERSION = 1024;
-static const ::rtl::OUString PROP_PICKER_LISTENER = ::rtl::OUString::createFromAscii("picker_listener" ); // [XFilePickerListenert]
-static const ::rtl::OUString PROP_DIALOG_SHOW_RESULT = ::rtl::OUString::createFromAscii("dialog_show_result" ); // [sal_Bool] true=OK, false=CANCEL
-static const ::rtl::OUString PROP_SELECTED_FILES = ::rtl::OUString::createFromAscii("selected_files" ); // [seq< OUString >] contains all user selected files (can be empty!)
-static const ::rtl::OUString PROP_MULTISELECTION_MODE = ::rtl::OUString::createFromAscii("multiselection_mode"); // [sal_Bool] true=ON, false=OFF
-static const ::rtl::OUString PROP_TITLE = ::rtl::OUString::createFromAscii("title" ); // [OUString]
-static const ::rtl::OUString PROP_FILENAME = ::rtl::OUString::createFromAscii("filename" ); // [OUString]
-static const ::rtl::OUString PROP_DIRECTORY = ::rtl::OUString::createFromAscii("directory" ); // [OUString]
-static const ::rtl::OUString PROP_FEATURES = ::rtl::OUString::createFromAscii("features" ); // [sal_Int32]
-static const ::rtl::OUString PROP_TEMPLATE_DESCR = ::rtl::OUString::createFromAscii("templatedescription"); // [sal_Int32]
-static const ::rtl::OUString PROP_FILTER_TITLE = ::rtl::OUString::createFromAscii("filter_title" ); // [OUString]
-static const ::rtl::OUString PROP_FILTER_VALUE = ::rtl::OUString::createFromAscii("filter_value" ); // [OUString]
-static const ::rtl::OUString PROP_FORCE = ::rtl::OUString::createFromAscii("force" ); // [sal_Bool]
+static const ::rtl::OUString PROP_PICKER_LISTENER(RTL_CONSTASCII_USTRINGPARAM("picker_listener" ) ); // [XFilePickerListenert]
+static const ::rtl::OUString PROP_DIALOG_SHOW_RESULT(RTL_CONSTASCII_USTRINGPARAM("dialog_show_result" )); // [sal_Bool] true=OK, false=CANCEL
+static const ::rtl::OUString PROP_SELECTED_FILES(RTL_CONSTASCII_USTRINGPARAM("selected_files" )); // [seq< OUString >] contains all user selected files (can be empty!)
+static const ::rtl::OUString PROP_MULTISELECTION_MODE(RTL_CONSTASCII_USTRINGPARAM("multiselection_mode")); // [sal_Bool] true=ON, false=OFF
+static const ::rtl::OUString PROP_TITLE(RTL_CONSTASCII_USTRINGPARAM("title" )); // [OUString]
+static const ::rtl::OUString PROP_FILENAME(RTL_CONSTASCII_USTRINGPARAM("filename" ) ); // [OUString]
+static const ::rtl::OUString PROP_DIRECTORY(RTL_CONSTASCII_USTRINGPARAM("directory" )); // [OUString]
+static const ::rtl::OUString PROP_FEATURES(RTL_CONSTASCII_USTRINGPARAM("features" )); // [sal_Int32]
+static const ::rtl::OUString PROP_TEMPLATE_DESCR(RTL_CONSTASCII_USTRINGPARAM("templatedescription")); // [sal_Int32]
+static const ::rtl::OUString PROP_FILTER_TITLE(RTL_CONSTASCII_USTRINGPARAM("filter_title" )); // [OUString]
+static const ::rtl::OUString PROP_FILTER_VALUE(RTL_CONSTASCII_USTRINGPARAM("filter_value" )); // [OUString]
+static const ::rtl::OUString PROP_FORCE(RTL_CONSTASCII_USTRINGPARAM("force" )); // [sal_Bool]
-static const ::rtl::OUString PROP_CONTROL_ID = ::rtl::OUString::createFromAscii("control_id" ); // [sal_Int16]
-static const ::rtl::OUString PROP_CONTROL_ACTION = ::rtl::OUString::createFromAscii("control_action" ); // [sal_Int16]
-static const ::rtl::OUString PROP_CONTROL_VALUE = ::rtl::OUString::createFromAscii("control_value" ); // [Any]
-static const ::rtl::OUString PROP_CONTROL_LABEL = ::rtl::OUString::createFromAscii("control_label" ); // [OUString]
-static const ::rtl::OUString PROP_CONTROL_ENABLE = ::rtl::OUString::createFromAscii("control_enable" ); // [sal_Bool] true=ON, false=OFF
+static const ::rtl::OUString PROP_CONTROL_ID(RTL_CONSTASCII_USTRINGPARAM("control_id" )); // [sal_Int16]
+static const ::rtl::OUString PROP_CONTROL_ACTION(RTL_CONSTASCII_USTRINGPARAM("control_action" )); // [sal_Int16]
+static const ::rtl::OUString PROP_CONTROL_VALUE(RTL_CONSTASCII_USTRINGPARAM("control_value" )); // [Any]
+static const ::rtl::OUString PROP_CONTROL_LABEL(RTL_CONSTASCII_USTRINGPARAM("control_label" )); // [OUString]
+static const ::rtl::OUString PROP_CONTROL_ENABLE(RTL_CONSTASCII_USTRINGPARAM("control_enable" )); // [sal_Bool] true=ON, false=OFF
//-----------------------------------------------------------------------------
/** native implementation of the file picker on Vista and upcoming windows versions.
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index 9a0cb5b7b1..45f05861f2 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -134,7 +134,7 @@ void CWinFileOpenImpl::setDisplayDirectory(const rtl::OUString& aDirectory)
if ( ::osl::FileBase::E_None !=
::osl::FileBase::getSystemPathFromFileURL(aDirectory,aSysDirectory))
throw IllegalArgumentException(
- rtl::OUString::createFromAscii("Invalid directory"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid directory")),
static_cast<XFilePicker2*>(m_FilePicker), 1);
// we ensure that there is a trailing '/' at the end of
@@ -205,7 +205,7 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException)
rc = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
else
throw uno::RuntimeException(
- rtl::OUString::createFromAscii("Error executing dialog"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error executing dialog")),
static_cast<XFilePicker2*>(m_FilePicker));
return rc;
@@ -224,7 +224,7 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const rtl::OUString& aTitle, const
if (!bRet)
throw IllegalArgumentException(
- rtl::OUString::createFromAscii("filter already exists"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("filter already exists")),
static_cast<XFilePicker2*>(m_FilePicker), 1);
// #95345# see MSDN OPENFILENAME
@@ -249,7 +249,7 @@ void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const rtl::OUString& aTitle)
if (filterPos < 0)
throw IllegalArgumentException(
- rtl::OUString::createFromAscii("filter doesn't exist"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("filter doesn't exist")),
static_cast<XFilePicker2*>(m_FilePicker), 1);
// filter index of the base class starts with 1
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index d69746fd07..3f1f6eb30a 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -94,12 +94,12 @@ void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type&
{
if ( m_rBroadcastHelper.bDisposed )
throw lang::DisposedException(
- ::rtl::OUString::createFromAscii( "FilePicker is already disposed" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilePicker is already disposed" )),
uno::Reference< uno::XInterface >() );
if ( m_rBroadcastHelper.bInDispose )
throw lang::DisposedException(
- ::rtl::OUString::createFromAscii( "FilePicker will be disposed now." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilePicker will be disposed now." )),
uno::Reference< uno::XInterface >() );
m_rBroadcastHelper.aLC.addInterface( aType, xListener );
@@ -114,7 +114,7 @@ void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type&
{
if ( m_rBroadcastHelper.bDisposed )
throw lang::DisposedException(
- ::rtl::OUString::createFromAscii( "FilePicker is already disposed." ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilePicker is already disposed." )),
uno::Reference< uno::XInterface >() );
m_rBroadcastHelper.aLC.removeInterface( aType, xListener );
diff --git a/fpicker/source/win32/filepicker/previewbase.cxx b/fpicker/source/win32/filepicker/previewbase.cxx
index ae505af164..54fe996316 100644
--- a/fpicker/source/win32/filepicker/previewbase.cxx
+++ b/fpicker/source/win32/filepicker/previewbase.cxx
@@ -90,11 +90,11 @@ void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::s
{
if (aImageFormat != ::com::sun::star::ui::dialogs::FilePreviewImageFormats::BITMAP)
throw IllegalArgumentException(
- OUString::createFromAscii("unsupported image format"), 0, 1);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("unsupported image format")), 0, 1);
if (aImage.hasValue() && (aImage.getValueType() != getCppuType((Sequence<sal_Int8>*)0)))
throw IllegalArgumentException(
- OUString::createFromAscii("invalid image data"), 0, 2);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("invalid image data")), 0, 2);
// save the new image data and force a redraw
m_ImageData = aImage;
diff --git a/fpicker/source/win32/filepicker/shared.hxx b/fpicker/source/win32/filepicker/shared.hxx
index cfec9032f3..34e27b615c 100644
--- a/fpicker/source/win32/filepicker/shared.hxx
+++ b/fpicker/source/win32/filepicker/shared.hxx
@@ -31,9 +31,9 @@
#include <rtl/ustring.hxx>
-const ::rtl::OUString BACKSLASH = ::rtl::OUString::createFromAscii( "\\" );
-const ::rtl::OUString FILTER_SEPARATOR = ::rtl::OUString::createFromAscii( "------------------------------------------" );
-const ::rtl::OUString ALL_FILES_WILDCARD = ::rtl::OUString::createFromAscii( "*.*" );
+const ::rtl::OUString BACKSLASH(RTL_CONSTASCII_USTRINGPARAM( "\\" ));
+const ::rtl::OUString FILTER_SEPARATOR(RTL_CONSTASCII_USTRINGPARAM( "------------------------------------------" ));
+const ::rtl::OUString ALL_FILES_WILDCARD(RTL_CONSTASCII_USTRINGPARAM( "*.*" ));
const ::sal_Bool ALLOW_DUPLICATES = sal_True;
#endif
diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
index ada72efb6e..f057c99620 100644
--- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
+++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
@@ -98,7 +98,7 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker );
Reference< XMultiServiceFactory > g_xFactory;
-const OUString BMP_EXTENSION = OUString::createFromAscii( "bmp" );
+const OUString BMP_EXTENSION(RTL_CONSTASCII_USTRINGPARAM( "bmp" ));
//-------------------------------------------------------------------------------------------------------------------------
// a test client
@@ -294,7 +294,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
Reference< XFilePicker > xFilePicker = Reference< XFilePicker >(
g_xFactory->createInstanceWithArguments(
- OUString::createFromAscii( FILE_PICKER_SERVICE_NAME ), arguments ), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME )), arguments ), UNO_QUERY );
// install a FilePicker notifier
Reference< XFilePickerListener > xFPListener(
@@ -304,9 +304,9 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
if ( xFPNotifier.is( ) )
xFPNotifier->addFilePickerListener( xFPListener );
- xFilePicker->setTitle( OUString::createFromAscii("FileOpen Simple..."));
+ xFilePicker->setTitle( OUString(RTL_CONSTASCII_USTRINGPARAM("FileOpen Simple...")));
xFilePicker->setMultiSelectionMode( sal_True );
- xFilePicker->setDefaultName( OUString::createFromAscii("d:\\test2.sxw"));
+ xFilePicker->setDefaultName( OUString(RTL_CONSTASCII_USTRINGPARAM("d:\\test2.sxw")));
OUString aDirURL;
OUString aSysPath = OStringToOUString( "d:\\ueaeoe", osl_getThreadTextEncoding( ) );
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx
index f75f98f33e..cae36a0f70 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.cxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx
@@ -71,7 +71,7 @@ namespace
Sequence< OUString > SAL_CALL FolderPicker_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.ui.dialogs.SystemFolderPicker");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFolderPicker"));
return aRet;
}
}
@@ -166,7 +166,7 @@ sal_Int16 SAL_CALL CFolderPicker::execute( )
OUString SAL_CALL CFolderPicker::getImplementationName( )
throw( RuntimeException )
{
- return OUString::createFromAscii( FOLDERPICKER_IMPL_NAME );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDERPICKER_IMPL_NAME ));
}
// -------------------------------------------------
diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
index f03251f5fc..ea8f35dcd5 100644
--- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
+++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
@@ -58,7 +58,7 @@ using osl::FileBase;
//
//------------------------------------------------------------------------
-const OUString BACKSLASH = OUString::createFromAscii( "\\" );
+const OUString BACKSLASH(RTL_CONSTASCII_USTRINGPARAM( "\\" ));
//------------------------------------------------------------------------
// ctor
@@ -94,7 +94,7 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect
if ( ::osl::FileBase::E_None != rc )
throw IllegalArgumentException(
- OUString::createFromAscii( "directory is not a valid file url" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "directory is not a valid file url" )),
static_cast< XFolderPicker* >( m_pFolderPicker ),
1 );
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index b7f8076f21..cdcd45d523 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -54,9 +54,9 @@ using ::com::sun::star::uno::Sequence;
//
//------------------------------------------------------------
-const rtl::OUString TILDE = OUString::createFromAscii( "~" );
+const rtl::OUString TILDE(RTL_CONSTASCII_USTRINGPARAM( "~" ));
const sal_Unicode TILDE_SIGN = L'~';
-const rtl::OUString AMPERSAND = OUString::createFromAscii( "&" );
+const rtl::OUString AMPERSAND(RTL_CONSTASCII_USTRINGPARAM( "&" ));
const sal_Unicode AMPERSAND_SIGN = L'&';
//------------------------------------------------------------
@@ -248,7 +248,7 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt
if ( !aItem.hasValue( ) ||
aItem.getValueType( ) != getCppuType((OUString*)0) )
throw IllegalArgumentException(
- OUString::createFromAscii( "invalid value type or any has no value" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )),
rXInterface,
aArgPos );
@@ -270,7 +270,7 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference<
if ( !aItemList.hasValue( ) ||
aItemList.getValueType( ) != getCppuType((Sequence<OUString>*)0) )
throw IllegalArgumentException(
- OUString::createFromAscii( "invalid value type or any has no value" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )),
rXInterface,
aArgPos );
@@ -298,7 +298,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
(aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) )
throw IllegalArgumentException(
- OUString::createFromAscii( "invalid value type or any has no value" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )),
rXInterface,
aArgPos );
@@ -311,7 +311,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
// index was not correct
if ( CB_ERR == lRet )
throw IllegalArgumentException(
- OUString::createFromAscii( "inavlid item position" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid item position" )),
rXInterface,
aArgPos );
}
@@ -350,7 +350,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
(aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) )
throw IllegalArgumentException(
- OUString::createFromAscii( "invalid value type or any has no value" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )),
rXInterface,
aArgPos );
@@ -359,7 +359,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
if ( nPos < -1 )
throw IllegalArgumentException(
- OUString::createFromAscii("invalid index"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("invalid index")),
rXInterface,
aArgPos );
@@ -367,7 +367,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
if ( (CB_ERR == lRet) && (-1 != nPos) )
throw IllegalArgumentException(
- OUString::createFromAscii("invalid index"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("invalid index")),
rXInterface,
aArgPos );
}
@@ -460,7 +460,7 @@ void SAL_CALL CheckboxSetState(
if ( !aState.hasValue( ) ||
aState.getValueType( ) != getCppuType((sal_Bool*)0) )
throw IllegalArgumentException(
- OUString::createFromAscii( "invalid value type or any has no value" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )),
rXInterface,
aArgPos );