summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 22:27:46 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 22:27:46 -0500
commit56f3f3e9dae673266d42149de4fc36a4161de923 (patch)
tree8172475534420e2ede56b228bea1f4988ee5d7c2 /sfx2
parent7bf761e85d65c66dc12c49de187ef2952d3f43a4 (diff)
targeted string re-work
Change-Id: I20867f9ef04297f27523b63dc1e18a2e31da5d42
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx4
-rw-r--r--sfx2/source/dialog/mailmodel.cxx52
-rw-r--r--sfx2/source/doc/objmisc.cxx26
-rw-r--r--sfx2/source/doc/objstor.cxx192
-rw-r--r--sfx2/source/doc/objuno.cxx36
-rw-r--r--sfx2/source/doc/objxtor.cxx26
-rw-r--r--sfx2/source/doc/ownsubfilterservice.cxx6
-rw-r--r--sfx2/source/menu/mnumgr.cxx6
8 files changed, 174 insertions, 174 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d1f066ef0995..bc7900f29488 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -388,7 +388,7 @@ void ContentListBox_Impl::RequestingChildren( SvLBoxEntry* pParent )
else
{
pEntry = InsertEntry( aTitle, aDocumentImage, aDocumentImage, pParent );
- Any aAny( ::utl::UCBContentHelper::GetProperty( aURL, String(RTL_CONSTASCII_USTRINGPARAM("TargetURL" ) ) ) );
+ Any aAny( ::utl::UCBContentHelper::GetProperty( aURL, String("TargetURL" ) ) );
rtl::OUString aTargetURL;
if ( aAny >>= aTargetURL )
pEntry->SetUserData( new ContentEntry_Impl( aTargetURL, sal_False ) );
@@ -3058,7 +3058,7 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl)
::rtl::OUString sHelpURL;
- bool bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.help")),0);
+ bool bComplete = rtl::OUString(aEntry).toAsciiLowerCase().match(rtl::OUString("vnd.sun.star.help"),0);
if (bComplete)
sHelpURL = ::rtl::OUString(aEntry);
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 5e2e869429f0..a6362bdb6cd8 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -166,7 +166,7 @@ sal_Bool HasDocumentValidSignature( const css::uno::Reference< css::frame::XMode
css::uno::Reference< css::beans::XPropertySet > xPropSet( xModel, css::uno::UNO_QUERY );
if ( xPropSet.is() )
{
- Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasValidSignatures" )));
+ Any a = xPropSet->getPropertyValue( rtl::OUString( "HasValidSignatures" ));
sal_Bool bReturn = sal_Bool();
if ( a >>= bReturn )
return bReturn;
@@ -200,7 +200,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFilterCFG =
uno::Reference< container::XNameAccess >(
xSMGR->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ), uno::UNO_QUERY );
+ ::rtl::OUString("com.sun.star.document.FilterFactory") ), uno::UNO_QUERY );
css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY );
if ( !xFilterCFG.is() )
@@ -237,11 +237,11 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
String aOkSendText( SfxResId( STR_PDF_EXPORT_SEND ));
uno::Sequence< beans::PropertyValue > aFilterDataValue(1);
- aFilterDataValue[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_OkButtonString" ));
+ aFilterDataValue[0].Name = ::rtl::OUString( "_OkButtonString" );
aFilterDataValue[0].Value = css::uno::makeAny( ::rtl::OUString( aOkSendText ));
//add to the filterdata property, the only one the PDF export filter dialog will care for
- aPropsForDialog[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ));
+ aPropsForDialog[0].Name = ::rtl::OUString( "FilterData" );
aPropsForDialog[0].Value = css::uno::makeAny( aFilterDataValue );
//when executing the dialog will merge the persistent FilterData properties
@@ -325,7 +325,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if (!xSMGR.is())
return eRet;
- const rtl::OUString aModuleManager( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ));
+ const rtl::OUString aModuleManager( "com.sun.star.frame.ModuleManager" );
css::uno::Reference< css::frame::XModuleManager > xModuleManager( xSMGR->createInstance( aModuleManager ), css::uno::UNO_QUERY_THROW );
if ( !xModuleManager.is() )
return eRet;
@@ -386,16 +386,16 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
css::uno::Reference< css::container::XContainerQuery > xContainerQuery(
xSMGR->createInstance( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ))),
+ "com.sun.star.document.FilterFactory" )),
css::uno::UNO_QUERY );
if ( bStoreTo )
{
// Retrieve filter from type
css::uno::Sequence< css::beans::NamedValue > aQuery( bSendAsPDF ? 3 : 2 );
- aQuery[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ));
+ aQuery[0].Name = rtl::OUString( "Type" );
aQuery[0].Value = css::uno::makeAny( aTypeName );
- aQuery[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentService" ));
+ aQuery[1].Name = rtl::OUString( "DocumentService" );
aQuery[1].Value = css::uno::makeAny( aModule );
if( bSendAsPDF )
{
@@ -404,7 +404,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// exact flag value as detailed in the filter configuration to get it
// this seems to be a bug
// without flags we get an import filter here, which is also unwanted
- aQuery[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flags" ));
+ aQuery[2].Name = rtl::OUString( "Flags" );
aQuery[2].Value = css::uno::makeAny( sal_Int32(0x80042) ); // EXPORT ALIEN 3RDPARTY
}
@@ -415,7 +415,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() );
aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
+ ::rtl::OUString("Name"),
::rtl::OUString() );
}
@@ -424,7 +424,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// Retrieve filter from media descriptor
::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() );
rtl::OUString aOrgFilterName = aMediaDescrPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )),
+ ::rtl::OUString( "FilterName" ),
::rtl::OUString() );
if ( aOrgFilterName == aFilterName )
{
@@ -442,7 +442,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// Retrieve filter from media descriptor
::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() );
aFilterName = aMediaDescrPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )),
+ ::rtl::OUString( "FilterName" ),
::rtl::OUString() );
}
@@ -454,7 +454,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xNameAccess->getByName( aModule ) );
aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDefaultFilter")),
+ ::rtl::OUString("ooSetupFactoryDefaultFilter"),
::rtl::OUString() );
css::uno::Reference< css::container::XNameAccess > xNameAccess2(
xContainerQuery, css::uno::UNO_QUERY );
@@ -462,7 +462,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM2( xNameAccess2->getByName( aFilterName ) );
aTypeName = aFilterPropsHM2.getUnpackedValueOrDefault(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")),
+ ::rtl::OUString("Type"),
::rtl::OUString() );
}
}
@@ -491,7 +491,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
css::uno::Reference< container::XNameAccess > xTypeDetection(
xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ))),
+ "com.sun.star.document.TypeDetection" )),
css::uno::UNO_QUERY );
@@ -501,7 +501,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aTypeNamePropsHM( xTypeDetection->getByName( aTypeName ) );
uno::Sequence< ::rtl::OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")),
+ ::rtl::OUString("Extensions"),
::uno::Sequence< ::rtl::OUString >() );
if ( aExtensions.getLength() )
aExtension = aExtensions[0];
@@ -519,7 +519,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( !bHasLocation )
{
// Create a noname file name with the correct extension
- const rtl::OUString aNoNameFileName( RTL_CONSTASCII_USTRINGPARAM( "noname" ));
+ const rtl::OUString aNoNameFileName( "noname" );
aFileName = aNoNameFileName;
}
else
@@ -550,9 +550,9 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
rtl::OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE );
sal_Int32 nNumArgs(0);
- const rtl::OUString aPasswordPropName( RTL_CONSTASCII_USTRINGPARAM( "Password" ));
+ const rtl::OUString aPasswordPropName( "Password" );
css::uno::Sequence< css::beans::PropertyValue > aArgs( ++nNumArgs );
- aArgs[nNumArgs-1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
+ aArgs[nNumArgs-1].Name = rtl::OUString( "FilterName" );
aArgs[nNumArgs-1].Value = css::uno::makeAny( aFilterName );
::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() );
@@ -571,7 +571,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
css::uno::Reference< css::frame::XDispatch > xPrepareDispatch;
css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY );
css::uno::Reference< css::util::XURLTransformer > xURLTransformer(
- xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
+ xSMGR->createInstance( rtl::OUString( "com.sun.star.util.URLTransformer" )),
css::uno::UNO_QUERY );
if( !bSendAsPDF )
{
@@ -581,7 +581,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( xURLTransformer.is() )
{
- aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" ));
+ aPrepareURL.Complete = rtl::OUString( ".uno:PrepareMailExport" );
xURLTransformer->parseStrict( aPrepareURL );
}
@@ -653,7 +653,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// #i30432# notify that export is finished - the Writer may want to restore removed content
if ( xURLTransformer.is() )
{
- aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MailExportFinished" ));
+ aURL.Complete = rtl::OUString( ".uno:MailExportFinished" );
xURLTransformer->parseStrict( aURL );
}
@@ -701,7 +701,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
// We need 1:1 copy of the document to preserve an added signature.
aArgs.realloc( ++nNumArgs );
- aArgs[nNumArgs-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyStreamIfPossible" ) );
+ aArgs[nNumArgs-1].Name = ::rtl::OUString( "CopyStreamIfPossible" );
aArgs[nNumArgs-1].Value = css::uno::makeAny( (sal_Bool)sal_True );
try
@@ -807,13 +807,13 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
// Prefer the SimpleSystemMail service if available
xSimpleMailClientSupplier = css::uno::Reference< XSimpleMailClientSupplier >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))),
+ xMgr->createInstance( OUString( "com.sun.star.system.SimpleSystemMail" )),
UNO_QUERY );
if ( ! xSimpleMailClientSupplier.is() )
{
xSimpleMailClientSupplier = css::uno::Reference< XSimpleMailClientSupplier >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))),
+ xMgr->createInstance( OUString( "com.sun.star.system.SimpleCommandMail" )),
UNO_QUERY );
}
@@ -895,7 +895,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
OUString baseName( maAttachedDocuments[0].copy( maAttachedDocuments[0].lastIndexOf( '/' ) + 1 ) );
OUString subject( baseName );
if ( maAttachedDocuments.size() > 1 )
- subject += OUString(RTL_CONSTASCII_USTRINGPARAM(", ..."));
+ subject += OUString(", ...");
xSimpleMailMessage->setSubject( subject );
}
xSimpleMailMessage->setAttachement( aAttachmentSeq );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4c05bdb7ffed..3bcc77e5ced3 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -262,7 +262,7 @@ sal_uInt32 SfxObjectShell::GetErrorCode() const
void SfxObjectShell::ResetError()
{
if( pImp->lErr != ERRCODE_NONE )
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Resetting Error." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Resetting Error." ) );
pImp->lErr=0;
SfxMedium * pMed = GetMedium();
@@ -1134,9 +1134,9 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract
try
{
uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW );
- xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) >>= aVersion;
- xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasEncryptedEntries" ) ) ) >>= bIsEncrypted;
- xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasNonEncryptedEntries" ) ) ) >>= bHasNonEncrypted;
+ xPropSet->getPropertyValue( ::rtl::OUString( "Version" ) ) >>= aVersion;
+ xPropSet->getPropertyValue( ::rtl::OUString( "HasEncryptedEntries" ) ) >>= bIsEncrypted;
+ xPropSet->getPropertyValue( ::rtl::OUString( "HasNonEncryptedEntries" ) ) >>= bHasNonEncrypted;
}
catch( uno::Exception& )
{
@@ -1381,7 +1381,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
ForgetMedium();
if( !DoSaveCompleted( pTmpMedium ) )
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
else
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False );
@@ -1588,7 +1588,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
{
Sequence< uno::Any > aArgs( 1 );
aArgs[ 0 ] = *pCaller;
- xProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Caller")), uno::makeAny( aArgs ) );
+ xProps->setPropertyValue( rtl::OUString("Caller"), uno::makeAny( aArgs ) );
}
}
aRet = xScript->invoke( aParams, aOutParamIndex, aOutParam );
@@ -2002,7 +2002,7 @@ sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToA
try
{
uno::Reference < beans::XPropertySet > xPropSet( rDocShell.GetStorage(), uno::UNO_QUERY_THROW );
- xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) >>= aVersion;
+ xPropSet->getPropertyValue( ::rtl::OUString( "Version" ) ) >>= aVersion;
}
catch( uno::Exception& )
{
@@ -2010,7 +2010,7 @@ sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToA
uno::Sequence< uno::Any > aArgs( 1 );
aArgs[0] <<= aVersion;
- uno::Reference< security::XDocumentDigitalSignatures > xSigner( comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ), aArgs ), uno::UNO_QUERY_THROW );
+ uno::Reference< security::XDocumentDigitalSignatures > xSigner( comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( "com.sun.star.security.DocumentDigitalSignatures" ), aArgs ), uno::UNO_QUERY_THROW );
if ( nScriptingSignatureState == SIGNATURESTATE_UNKNOWN
|| nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_OK
@@ -2120,24 +2120,24 @@ void SfxObjectShell::StoreLog()
if ( pImp->m_xLogRing.is() )
{
#ifdef WNT
- ::rtl::OUString aFileURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}" ) );
+ ::rtl::OUString aFileURL = ::rtl::OUString( "${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}" );
#else
- ::rtl::OUString aFileURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}" ) );
+ ::rtl::OUString aFileURL = ::rtl::OUString( "${$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}" );
#endif
::rtl::Bootstrap::expandMacros( aFileURL );
#ifdef WNT
- ::rtl::OUString aBuildID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/setup.ini:buildid}" ) );
+ ::rtl::OUString aBuildID = ::rtl::OUString( "${$BRAND_BASE_DIR/program/setup.ini:buildid}" );
#else
- ::rtl::OUString aBuildID = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "${$BRAND_BASE_DIR/program/setuprc:buildid}" ) );
+ ::rtl::OUString aBuildID = ::rtl::OUString( "${$BRAND_BASE_DIR/program/setuprc:buildid}" );
#endif
::rtl::Bootstrap::expandMacros( aBuildID );
if ( !aFileURL.isEmpty() )
{
- aFileURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/temp/document_io_logring.txt" ) );
+ aFileURL += ::rtl::OUString( "/user/temp/document_io_logring.txt" );
try
{
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 341821cbc960..5b07fad8183d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -154,7 +154,7 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >&
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
css::uno::Reference< css::container::XSet > xModelCollection(
- xSMGR->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster"))),
+ xSMGR->createInstance(::rtl::OUString("com.sun.star.frame.GlobalEventBroadcaster")),
css::uno::UNO_QUERY);
if (xModelCollection.is())
{
@@ -228,7 +228,7 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
try
{
uno::Reference< embed::XStorage > xVersion = xDocStorage->openStorageElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Versions")),
+ ::rtl::OUString("Versions"),
embed::ElementModes::READWRITE );
DBG_ASSERT( xVersion.is(),
@@ -270,7 +270,7 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
catch( uno::Exception& )
{
// TODO/LATER: handle the error depending on exception
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
return bResult;
@@ -302,7 +302,7 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
aTempURL = ::rtl::OUString();
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
}
@@ -340,20 +340,20 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
{
try
{
- xProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( aDataFlavor.MimeType ) );
+ xProps->setPropertyValue( ::rtl::OUString("MediaType"), uno::makeAny( aDataFlavor.MimeType ) );
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
SvtSaveOptions aSaveOpt;
SvtSaveOptions::ODFDefaultVersion nDefVersion = aSaveOpt.GetODFDefaultVersion();
uno::Sequence< beans::NamedValue > aEncryptionAlgs( 3 );
- aEncryptionAlgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StartKeyGenerationAlgorithm" ) );
- aEncryptionAlgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptionAlgorithm" ) );
- aEncryptionAlgs[2].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ChecksumAlgorithm" ) );
+ aEncryptionAlgs[0].Name = ::rtl::OUString( "StartKeyGenerationAlgorithm" );
+ aEncryptionAlgs[1].Name = ::rtl::OUString( "EncryptionAlgorithm" );
+ aEncryptionAlgs[2].Name = ::rtl::OUString( "ChecksumAlgorithm" );
// the default values, that should be used for ODF1.1 and older formats
aEncryptionAlgs[0].Value <<= xml::crypto::DigestID::SHA1;
aEncryptionAlgs[1].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8;
@@ -364,7 +364,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
try
{
// older versions can not have this property set, it exists only starting from ODF1.2
- xProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Version" )), uno::makeAny( ODFVER_012_TEXT ) );
+ xProps->setPropertyValue( ::rtl::OUString("Version" ), uno::makeAny( ODFVER_012_TEXT ) );
}
catch( uno::Exception& )
{
@@ -389,7 +389,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
}
@@ -421,13 +421,13 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage
try {
uno::Reference < beans::XPropertySet > xPropSet( xStorage, uno::UNO_QUERY_THROW );
- Any a = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) );
+ Any a = xPropSet->getPropertyValue( ::rtl::OUString("MediaType" ) );
::rtl::OUString aMediaType;
if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
{
if ( bTypeMustBeSetAlready )
{
- SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( OSL_LOG_PREFIX ) );
return sal_False;
}
@@ -628,7 +628,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
sal_uInt32 nError = HandleFilter( pMedium, this );
if ( nError != ERRCODE_NONE )
- SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( nError, ::rtl::OUString( OSL_LOG_PREFIX ) );
if (pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_STARTPRESENTATION)
pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, sal_True) );
@@ -654,7 +654,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
// treat the package as broken if the mediatype was retrieved as a fallback
uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW );
- xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaTypeFallbackUsed" ) ) )
+ xStorProps->getPropertyValue( ::rtl::OUString( "MediaTypeFallbackUsed" ) )
>>= bWarnMediaTypeFallback;
if ( pRepairPackageItem && pRepairPackageItem->GetValue() )
@@ -668,12 +668,12 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() )
- SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
catch( uno::Exception& )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
// Load
@@ -690,11 +690,11 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bHasName = sal_True;
}
else
- SetError( ERRCODE_ABORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_ABORT, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
}
else
- SetError( pMed->GetLastStorageCreationState(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pMed->GetLastStorageCreationState(), ::rtl::OUString( OSL_LOG_PREFIX ) );
}
else if ( GetError() == ERRCODE_NONE && InitNew(0) )
{
@@ -714,7 +714,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
{
uno::Reference < beans::XPropertySet > xSet( GetModel(), uno::UNO_QUERY );
- ::rtl::OUString sLockUpdates(RTL_CONSTASCII_USTRINGPARAM("LockUpdates"));
+ ::rtl::OUString sLockUpdates("LockUpdates");
bool bSetProperty = true;
try
{
@@ -756,9 +756,9 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
com::sun::star::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties();
if ( xProps.is() )
{
- ::rtl::OUString aAuthor( RTL_CONSTASCII_USTRINGPARAM("Author") );
- ::rtl::OUString aKeywords( RTL_CONSTASCII_USTRINGPARAM("Keywords") );
- ::rtl::OUString aSubject( RTL_CONSTASCII_USTRINGPARAM("Subject") );
+ ::rtl::OUString aAuthor( "Author" );
+ ::rtl::OUString aKeywords( "Keywords" );
+ ::rtl::OUString aSubject( "Subject" );
Any aAny;
::rtl::OUString aValue;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -848,7 +848,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo
if( xServiceManager.is() )
{
xFilterCFG = com::sun::star::uno::Reference< XNameAccess >(
- xServiceManager->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ),
+ xServiceManager->createInstance( ::rtl::OUString("com.sun.star.document.FilterFactory") ),
UNO_QUERY );
}
@@ -988,7 +988,7 @@ sal_Bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
DBG_ASSERT( bOk, "The root storage must allow to set common password!\n" );
@@ -1008,8 +1008,8 @@ sal_Bool SfxObjectShell::DoSave()
if ( !xTmpStorage.is() )
throw uno::RuntimeException();
- ::rtl::OUString aBasicStorageName( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) );
- ::rtl::OUString aDialogsStorageName( RTL_CONSTASCII_USTRINGPARAM( "Dialogs" ) );
+ ::rtl::OUString aBasicStorageName( "Basic" );
+ ::rtl::OUString aDialogsStorageName( "Dialogs" );
if ( GetMedium()->GetStorage()->hasByName( aBasicStorageName ) )
GetMedium()->GetStorage()->copyElementTo( aBasicStorageName, xTmpStorage, aBasicStorageName );
if ( GetMedium()->GetStorage()->hasByName( aDialogsStorageName ) )
@@ -1028,7 +1028,7 @@ sal_Bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
bOk = sal_False;
}
}
@@ -1082,7 +1082,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "saving \"%s\"", aString.getStr());
}
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Begin" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Begin" ) );
ModifyBlocker_Impl aMod(this);
@@ -1105,7 +1105,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// protected libraries exceed the size we can handler
if ( bOwnTarget && !QuerySaveSizeExceededModules_Impl( rMedium.GetInteractionHandler() ) )
{
- SetError( ERRCODE_IO_ABORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_ABORT, ::rtl::OUString( OSL_LOG_PREFIX ) );
return sal_False;
}
@@ -1122,7 +1122,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
|| pImp->nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED
|| pImp->nScriptingSignatureState == SIGNATURESTATE_SIGNATURES_INVALID ) )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "MacroSignaturePreserving" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "MacroSignaturePreserving" ) );
// the checking of the library modified state iterates over the libraries, should be done only when required
// currently the check is commented out since it is broken, we have to check the signature every time we save
@@ -1138,7 +1138,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
try
{
uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW );
- xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) >>= aODFVersion;
+ xPropSet->getPropertyValue( ::rtl::OUString( "Version" ) ) >>= aODFVersion;
}
catch( uno::Exception& )
{}
@@ -1169,7 +1169,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
&& ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) )
{
bStoreToSameLocation = sal_True;
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save" ) );
if ( pMedium->DocNeedsFileDateCheck() )
rMedium.CheckFileDate( pMedium->GetInitFileDate( sal_False ) );
@@ -1177,7 +1177,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
// export to the same location is forbidden
- SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
else
{
@@ -1186,11 +1186,11 @@ sal_Bool SfxObjectShell::SaveTo_Impl
const sal_Bool bDoBackup = SvtSaveOptions().IsBackup();
if ( bDoBackup )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "DoBackup" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "DoBackup" ) );
rMedium.DoBackup_Impl();
if ( rMedium.GetError() )
{
- SetError( rMedium.GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( rMedium.GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
rMedium.ResetError();
}
}
@@ -1214,7 +1214,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// if the last step is failed the stream should stay to be transacted and should be commited on any flush
// so we can forget the stream in any way and the next storage commit will flush it
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save: Own to Own" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save: Own to Own" ) );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1237,7 +1237,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// just disconnect the stream from the source format
// so that the target medium can use it
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save: Alien to Alien" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save: Alien to Alien" ) );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1250,7 +1250,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// format is an own one so just disconnect the source
// medium
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save: Alien to Own" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save: Alien to Own" ) );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1262,7 +1262,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// an alien format, just connect the source to temporary
// storage
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save: Own to Alien" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save: Own to Alien" ) );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1284,7 +1284,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// but for now the framework has to be ready for it
// TODO/LATER: let the medium be prepared for alien formats as well
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "SaveAs/Export" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "SaveAs/Export" ) );
rMedium.CloseAndRelease();
if ( bStorageBasedTarget )
@@ -1297,7 +1297,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
return sal_False;
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Locking" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Locking" ) );
rMedium.LockOrigFileOnDemand( sal_False, sal_False );
@@ -1326,7 +1326,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( !xProps.is() )
throw uno::RuntimeException();
- xProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")),
+ xProps->setPropertyValue( ::rtl::OUString("MediaType"),
uno::makeAny( aDataFlavor.MimeType ) );
}
catch( uno::Exception& )
@@ -1351,14 +1351,14 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if( bOwnTarget && !( pFilter->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing in own format." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Storing in own format." ) );
uno::Reference< embed::XStorage > xMedStorage = rMedium.GetStorage();
if ( !xMedStorage.is() )
{
// no saving without storage, unlock UI and return
Lock_Impl( this, sal_False );
pImp->bForbidReload = bOldStat;
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing failed, still no error set." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Storing failed, still no error set." ) );
return sal_False;
}
@@ -1375,7 +1375,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
catch( uno::Exception& )
{
OSL_FAIL( "Setting of common encryption key failed!" );
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
}
else
@@ -1394,18 +1394,18 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( xMedStorage == GetStorage() )
{
OSL_ENSURE( !pVersionItem, "This scenario is impossible currently!\n" );
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Should be impossible." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Should be impossible." ) );
// usual save procedure
bOk = Save();
}
else
{
// save to target
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save as own format." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Save as own format." ) );
bOk = SaveAsOwnFormat( rMedium );
if ( bOk && pVersionItem )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "pVersionItem != NULL" ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "pVersionItem != NULL" ) );
aTmpVersionURL = CreateTempCopyOfStorage_Impl( xMedStorage );
bOk = !aTmpVersionURL.isEmpty();
}
@@ -1417,7 +1417,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
// store the thumbnail representation image
// the thumbnail is not stored in case of encrypted document
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Thumbnail creation." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Thumbnail creation." ) );
if ( !GenerateAndStoreThumbnail( bPasswdProvided,
sal_False,
pFilter->IsOwnTemplateFormat(),
@@ -1432,14 +1432,14 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
if ( pImp->bIsSaving || pImp->bPreserveVersions )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Preserve versions." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Preserve versions." ) );
try
{
Sequence < util::RevisionTag > aVersions = rMedium.GetVersionList();
if ( aVersions.getLength() )
{
// copy the version streams
- ::rtl::OUString aVersionsName( RTL_CONSTASCII_USTRINGPARAM( "Versions" ) );
+ ::rtl::OUString aVersionsName( "Versions" );
uno::Reference< embed::XStorage > xNewVerStor = xMedStorage->openStorageElement(
aVersionsName,
embed::ElementModes::READWRITE );
@@ -1462,7 +1462,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
catch( uno::Exception& )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Preserve versions has failed." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Preserve versions has failed." ) );
OSL_FAIL( "Couldn't copy versions!\n" );
bOk = sal_False;
// TODO/LATER: a specific error could be set
@@ -1515,7 +1515,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing in alien format." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Storing in alien format." ) );
// it's a "SaveAs" in an alien format
if ( rMedium.GetFilter() && ( rMedium.GetFilter()->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
bOk = ExportTo( rMedium );
@@ -1544,7 +1544,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
uno::Reference< security::XDocumentDigitalSignatures > xDDSigns;
if ( bOk && bTryToPreserveScriptSignature )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Copying scripting signature." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Copying scripting signature." ) );
// if the scripting code was not changed and it is signed the signature should be preserved
// unfortunately at this point we have only information whether the basic code has changed or not
@@ -1557,7 +1557,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
try
{
uno::Reference < beans::XPropertySet > xPropSet( rMedium.GetStorage(), uno::UNO_QUERY_THROW );
- aArgs[0] = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) );
+ aArgs[0] = xPropSet->getPropertyValue( ::rtl::OUString( "Version" ) );
}
catch( uno::Exception& )
{
@@ -1566,7 +1566,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
xDDSigns = uno::Reference< security::XDocumentDigitalSignatures >(
comphelper::getProcessServiceFactory()->createInstanceWithArguments(
rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ),
+ "com.sun.star.security.DocumentDigitalSignatures" ),
aArgs ),
uno::UNO_QUERY_THROW );
@@ -1585,14 +1585,14 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( !xReadOrig.is() )
throw uno::RuntimeException();
uno::Reference< embed::XStorage > xMetaInf = xReadOrig->openStorageElement(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ),
+ ::rtl::OUString( "META-INF" ),
embed::ElementModes::READ );
uno::Reference< embed::XStorage > xTarget = rMedium.GetZipStorageToSign_Impl( sal_False );
if ( !xTarget.is() )
throw uno::RuntimeException();
uno::Reference< embed::XStorage > xTargetMetaInf = xTarget->openStorageElement(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ),
+ ::rtl::OUString( "META-INF" ),
embed::ElementModes::READWRITE );
if ( xMetaInf.is() && xTargetMetaInf.is() )
@@ -1637,7 +1637,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
rMedium.CloseZipStorage_Impl();
}
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Medium commit." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Medium commit." ) );
// transfer data to its destinated location
// the medium commits the storage or the stream it is based on
@@ -1646,7 +1646,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( bOk )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing is successful." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Storing is successful." ) );
// if the target medium is an alien format and the "old" medium was an own format and the "old" medium
// has a name, the object storage must be exchanged, because now we need a new temporary storage
@@ -1667,7 +1667,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// copy storage of old medium to new temporary storage and take this over
if( !ConnectTmpStorage_Impl( pMedium->GetStorage(), pMedium ) )
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Process after storing has failed." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Process after storing has failed." ) );
bOk = sal_False;
}
}
@@ -1675,7 +1675,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Storing has failed." ) ) );
+ AddLog( ::rtl::OUString( OSL_LOG_PREFIX "Storing has failed." ) );
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
@@ -1695,9 +1695,9 @@ sal_Bool SfxObjectShell::SaveTo_Impl
com::sun::star::uno::Reference < XPropertySetInfo > xProps = aContent.getProperties();
if ( xProps.is() )
{
- ::rtl::OUString aAuthor( RTL_CONSTASCII_USTRINGPARAM("Author") );
- ::rtl::OUString aKeywords( RTL_CONSTASCII_USTRINGPARAM("Keywords") );
- ::rtl::OUString aSubject( RTL_CONSTASCII_USTRINGPARAM("Subject") );
+ ::rtl::OUString aAuthor( "Author" );
+ ::rtl::OUString aKeywords( "Keywords" );
+ ::rtl::OUString aSubject( "Subject" );
Any aAny;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -1857,7 +1857,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
if ( !bResult )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( OSL_LOG_PREFIX ) );
}
}
@@ -1879,7 +1879,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
uno::Reference < beans::XPropertySet > xPropSet( xNewStor, uno::UNO_QUERY );
if ( xPropSet.is() )
{
- Any a = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ) );
+ Any a = xPropSet->getPropertyValue( ::rtl::OUString("MediaType" ) );
::rtl::OUString aMediaType;
if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
{
@@ -1913,7 +1913,7 @@ sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
{
// here only root storages are included, which are stored via temp file
rMedium.CreateTempFileNoCopy();
- SetError(rMedium.GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError(rMedium.GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
if ( GetError() )
return sal_False;
@@ -1923,7 +1923,7 @@ sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
sal_Bool bRet = SaveTo_Impl( rMedium, NULL );
if ( !bRet )
- SetError(rMedium.GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError(rMedium.GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
return bRet;
}
@@ -2199,7 +2199,7 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert )
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aArgs ( lDescriptor.getLength() );
com::sun::star::beans::PropertyValue * pNewValue = aArgs.getArray();
const com::sun::star::beans::PropertyValue * pOldValue = lDescriptor.getConstArray();
- const OUString sInputStream ( RTL_CONSTASCII_USTRINGPARAM ( "InputStream" ) );
+ const OUString sInputStream ( "InputStream" );
sal_Bool bHasInputStream = sal_False;
sal_Bool bHasBaseURL = sal_False;
@@ -2225,13 +2225,13 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert )
if ( !bHasBaseURL )
{
aArgs.realloc ( ++nEnd );
- aArgs[nEnd-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "DocumentBaseURL" ) );
+ aArgs[nEnd-1].Name = ::rtl::OUString( "DocumentBaseURL" );
aArgs[nEnd-1].Value <<= rMedium.GetBaseURL();
}
if ( bInsert ) {
aArgs.realloc( ++nEnd );
- aArgs[nEnd-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "InsertMode" ) );
+ aArgs[nEnd-1].Name = ::rtl::OUString( "InsertMode" );
aArgs[nEnd-1].Value <<= (sal_Bool) sal_True;
}
@@ -2297,8 +2297,8 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
com::sun::star::beans::PropertyValue * pNewValue = aArgs.getArray();
// put in the REAL file name, and copy all PropertyValues
- const OUString sOutputStream ( RTL_CONSTASCII_USTRINGPARAM ( "OutputStream" ) );
- const OUString sStream ( RTL_CONSTASCII_USTRINGPARAM ( "StreamForOutput" ) );
+ const OUString sOutputStream ( "OutputStream" );
+ const OUString sStream ( "StreamForOutput" );
sal_Bool bHasOutputStream = sal_False;
sal_Bool bHasStream = sal_False;
sal_Bool bHasBaseURL = sal_False;
@@ -2336,7 +2336,7 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
if ( !bHasBaseURL )
{
aArgs.realloc ( ++nEnd );
- aArgs[nEnd-1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "DocumentBaseURL" ) );
+ aArgs[nEnd-1].Name = ::rtl::OUString( "DocumentBaseURL" );
aArgs[nEnd-1].Value <<= rMedium.GetBaseURL( sal_True );
}
@@ -2425,7 +2425,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->SetLongName( pRetrMedium->GetLongName() );
if ( pMediumTmp->GetErrorCode() != ERRCODE_NONE )
{
- SetError( pMediumTmp->GetError(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pMediumTmp->GetError(), ::rtl::OUString( OSL_LOG_PREFIX ) );
delete pMediumTmp;
return sal_False;
}
@@ -2451,7 +2451,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
}
- SetError(pMediumTmp->GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError(pMediumTmp->GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
sal_Bool bOpen( sal_False );
bOpen = DoSaveCompleted( pMediumTmp );
@@ -2462,7 +2462,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
else
{
// transfer error code from medium to objectshell
- SetError( pMediumTmp->GetError(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pMediumTmp->GetError(), ::rtl::OUString( OSL_LOG_PREFIX ) );
// reconnect to object storage
DoSaveCompleted( 0 );
@@ -2486,7 +2486,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
{
if ( IsReadOnly() )
{
- SetError( ERRCODE_SFX_DOCUMENTREADONLY, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_SFX_DOCUMENTREADONLY, ::rtl::OUString( OSL_LOG_PREFIX ) );
return sal_False;
}
@@ -2532,11 +2532,11 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
{
if( aURL.HasError() )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, ::rtl::OUString( OSL_LOG_PREFIX ) );
return sal_False;
}
- if ( aURL != INetURLObject( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ) ) )
+ if ( aURL != INetURLObject( ::rtl::OUString( "private:stream" ) ) )
{
// Is there already a Document with this name?
SfxObjectShell* pDoc = 0;
@@ -2554,7 +2554,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
if ( pDoc )
{
// Then error message: "already opened"
- SetError(ERRCODE_SFX_ALREADYOPEN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError(ERRCODE_SFX_ALREADYOPEN, ::rtl::OUString( OSL_LOG_PREFIX ));
return sal_False;
}
}
@@ -2570,7 +2570,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
|| !pFilter->CanExport()
|| (!bSaveTo && !pFilter->CanImport()) )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, ::rtl::OUString( OSL_LOG_PREFIX ) );
return sal_False;
}
@@ -2589,10 +2589,10 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
sal_Bool bWasReadonly = IsReadOnly();
- if ( aURL == aActName && aURL != INetURLObject( OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")) )
+ if ( aURL == aActName && aURL != INetURLObject( OUString("private:stream") )
&& IsReadOnly() )
{
- SetError(ERRCODE_SFX_DOCUMENTREADONLY, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError(ERRCODE_SFX_DOCUMENTREADONLY, ::rtl::OUString( OSL_LOG_PREFIX ));
return sal_False;
}
@@ -2721,7 +2721,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
if ( pNewFile->GetErrorCode() != ERRCODE_NONE )
{
// creating temporary file failed ( f.e. floppy disk not inserted! )
- SetError( pNewFile->GetError(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pNewFile->GetError(), ::rtl::OUString( OSL_LOG_PREFIX ) );
delete pNewFile;
return sal_False;
}
@@ -2744,7 +2744,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
bOk = sal_True;
// transfer a possible error from the medium to the document
- SetError( pNewFile->GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pNewFile->GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
// notify the document that saving was done successfully
if ( !bCopyTo )
@@ -2765,7 +2765,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
// and the DoSaveCompleted call should not be able to fail in general
DBG_ASSERT( !bCopyTo, "Error while reconnecting to medium, can't be handled!");
- SetError( pNewFile->GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pNewFile->GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
if ( !bCopyTo )
{
@@ -2784,7 +2784,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
}
else
{
- SetError( pNewFile->GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ SetError( pNewFile->GetErrorCode(), ::rtl::OUString( OSL_LOG_PREFIX ) );
// reconnect to the old storage
DoSaveCompleted( 0 );
@@ -3215,7 +3215,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
if ( xSource->isStorageElement( aSubElements[nInd] ) )
{
::rtl::OUString aMediaType;
- ::rtl::OUString aMediaTypePropName( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
+ ::rtl::OUString aMediaTypePropName( "MediaType" );
sal_Bool bGotMediaType = sal_False;
try
@@ -3354,7 +3354,7 @@ sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< e
else if ( xSource->isStorageElement( aSubElements[nInd] ) )
{
::rtl::OUString aMediaType;
- ::rtl::OUString aMediaTypePropName( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
+ ::rtl::OUString aMediaTypePropName( "MediaType" );
sal_Bool bGotMediaType = sal_False;
try
@@ -3451,12 +3451,12 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted,
try {
uno::Reference< embed::XStorage > xThumbnailStor =
- xStor->openStorageElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Thumbnails")),
+ xStor->openStorageElement( ::rtl::OUString("Thumbnails"),
embed::ElementModes::READWRITE );
if ( xThumbnailStor.is() )
{
uno::Reference< io::XStream > xStream = xThumbnailStor->openStreamElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("thumbnail.png")),
+ ::rtl::OUString("thumbnail.png"),
embed::ElementModes::READWRITE );
if ( xStream.is() && WriteThumbnail( bEncrypted, bSigned, bIsTemplate, xStream ) )
@@ -3489,8 +3489,8 @@ sal_Bool SfxObjectShell::WriteThumbnail( sal_Bool bEncrypted,
uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
if ( xSet.is() )
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")),
- uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/png")) ) );
+ xSet->setPropertyValue( ::rtl::OUString("MediaType"),
+ uno::makeAny( ::rtl::OUString("image/png") ) );
if ( bEncrypted )
{
sal_uInt16 nResID = GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl(
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index f95a8b9a8e39..64574a117202 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -391,13 +391,13 @@ void SfxDocumentInfoObject_Impl::Reset(uno::Reference<document::XDocumentPropert
: sName + ::rtl::OUString::valueOf(i+1);
while (std::find(names.begin(), names.end(), name)
!= names.end()) {
- name += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'"));
+ name += ::rtl::OUString("'");
}
// FIXME there is a race condition here
try {
xPropContainer->addProperty(name,
beans::PropertyAttribute::REMOVEABLE,
- uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))));
+ uno::makeAny(::rtl::OUString("")));
} catch (const uno::RuntimeException&) {
throw;
} catch (const uno::Exception&) {
@@ -440,14 +440,14 @@ SfxDocumentInfoObject::initialize(const uno::Sequence< uno::Any > & aArguments)
uno::Any any = aArguments[0];
uno::Reference<document::XDocumentProperties> xDoc;
if (!(any >>= xDoc) || !xDoc.is()) throw lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SfxDocumentInfoObject::initialize: no XDocumentProperties given")),
+ ::rtl::OUString(
+ "SfxDocumentInfoObject::initialize: no XDocumentProperties given"),
*this, 0);
_pImp->Reset(xDoc);
} else {
throw lang::IllegalArgumentException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SfxDocumentInfoObject::initialize: no argument given")),
+ ::rtl::OUString(
+ "SfxDocumentInfoObject::initialize: no argument given"),
*this, 0);
}
}
@@ -866,7 +866,7 @@ void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, co
_pImp->m_xDocProps->setAutoloadSecs(60); // default
} else if ( !bBoolVal && (0 != _pImp->m_xDocProps->getAutoloadSecs()) ) {
_pImp->m_xDocProps->setAutoloadSecs(0);
- _pImp->m_xDocProps->setAutoloadURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")));
+ _pImp->m_xDocProps->setAutoloadURL(::rtl::OUString(""));
}
break;
default:
@@ -1116,7 +1116,7 @@ void SAL_CALL SfxDocumentInfoObject::setUserFieldName(sal_Int16 nIndex, const :
try {
xPropContainer->addProperty(aName,
beans::PropertyAttribute::REMOVEABLE,
- uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(""))));
+ uno::makeAny(::rtl::OUString("")));
_pImp->m_UserDefined[nIndex] = aName;
} catch (const beans::PropertyExistException&) {
_pImp->m_UserDefined[nIndex] = aName;
@@ -1192,8 +1192,8 @@ SfxStandaloneDocumentInfoObject::SfxStandaloneDocumentInfoObject( const ::com::s
, _xFactory( xFactory )
{
uno::Reference< lang::XInitialization > xDocProps(
- _xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.document.DocumentProperties"))), uno::UNO_QUERY_THROW);
+ _xFactory->createInstance( ::rtl::OUString(
+ "com.sun.star.document.DocumentProperties")), uno::UNO_QUERY_THROW);
uno::Any a;
a <<= xDocProps;
uno::Sequence<uno::Any> args(1);
@@ -1271,8 +1271,8 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUStrin
::osl::ClearableMutexGuard aGuard( _pImp->_aMutex );
uno::Reference< document::XDocumentProperties > xDocProps(
- _xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.document.DocumentProperties"))), uno::UNO_QUERY_THROW);
+ _xFactory->createInstance( ::rtl::OUString(
+ "com.sun.star.document.DocumentProperties")), uno::UNO_QUERY_THROW);
_pImp->Reset(xDocProps);
aGuard.clear();
@@ -1282,9 +1282,9 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUStrin
try
{
uno::Sequence<beans::PropertyValue> medium(2);
- medium[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentBaseURL"));
+ medium[0].Name = ::rtl::OUString("DocumentBaseURL");
medium[0].Value <<= aURL;
- medium[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
+ medium[1].Name = ::rtl::OUString("URL");
medium[1].Value <<= aURL;
_pImp->m_xDocProps->loadFromStorage(xStorage, medium);
_pImp->Reset(_pImp->m_xDocProps);
@@ -1297,7 +1297,7 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUStrin
else
{
uno::Reference < document::XStandaloneDocumentInfo > xBinary( _xFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStandaloneDocumentInfo" ) ) ), uno::UNO_QUERY );
+ ::rtl::OUString("com.sun.star.document.BinaryStandaloneDocumentInfo" ) ), uno::UNO_QUERY );
if ( xBinary.is() )
{
xBinary->loadFromURL( aURL );
@@ -1322,9 +1322,9 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::storeIntoURL(const ::rtl::OUStri
try
{
uno::Sequence<beans::PropertyValue> medium(2);
- medium[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentBaseURL"));
+ medium[0].Name = ::rtl::OUString("DocumentBaseURL");
medium[0].Value <<= aURL;
- medium[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
+ medium[1].Name = ::rtl::OUString("URL");
medium[1].Value <<= aURL;
_pImp->m_xDocProps->storeToStorage(xStorage, medium);
@@ -1345,7 +1345,7 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::storeIntoURL(const ::rtl::OUStri
else
{
uno::Reference < document::XStandaloneDocumentInfo > xBinary( _xFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStandaloneDocumentInfo" ) ) ), uno::UNO_QUERY );
+ ::rtl::OUString("com.sun.star.document.BinaryStandaloneDocumentInfo" ) ), uno::UNO_QUERY );
if ( xBinary.is() )
{
Copy( this, xBinary );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index dd1dbc18ec1f..3d090104d9de 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -144,7 +144,7 @@ static VBAConstantNameMap s_aRegisteredVBAConstants;
if( xProps.is() ) try
{
::rtl::OUString aConstName;
- xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobalConstantName" ) ) ) >>= aConstName;
+ xProps->getPropertyValue( ::rtl::OUString( "VBAGlobalConstantName" ) ) >>= aConstName;
return ::rtl::OUStringToOString( aConstName, RTL_TEXTENCODING_ASCII_US );
}
catch (const uno::Exception&) // not supported
@@ -1021,46 +1021,46 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact )
if ( aFact.EqualsAscii("swriter") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.text.TextDocument");
}
else if ( aFact.EqualsAscii("sweb") || aFact.EqualsAscii("swriter/web") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.text.WebDocument");
}
else if ( aFact.EqualsAscii("sglobal") || aFact.EqualsAscii("swriter/globaldocument") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.text.GlobalDocument");
}
else if ( aFact.EqualsAscii("scalc") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.sheet.SpreadsheetDocument");
}
else if ( aFact.EqualsAscii("sdraw") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.drawing.DrawingDocument");
}
else if ( aFact.EqualsAscii("simpress") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.presentation.PresentationDocument");
}
else if ( aFact.EqualsAscii("schart") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.ChartDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.chart.ChartDocument");
}
else if ( aFact.EqualsAscii("smath") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.formula.FormulaProperties"));
+ aServiceName = ::rtl::OUString("com.sun.star.formula.FormulaProperties");
}
#ifndef DISABLE_SCRIPTING
else if ( aFact.EqualsAscii("sbasic") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.BasicIDE"));
+ aServiceName = ::rtl::OUString("com.sun.star.script.BasicIDE");
}
#endif
#ifndef DISABLE_DBCONNECTIVITY
else if ( aFact.EqualsAscii("sdatabase") )
{
- aServiceName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument"));
+ aServiceName = ::rtl::OUString("com.sun.star.sdb.OfficeDatabaseDocument");
}
#endif
@@ -1103,7 +1103,7 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte
SFX_ITEMSET_ARG(&rSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
SFX_ITEMSET_ARG(&rSet, pTargetItem, SfxStringItem, SID_TARGETNAME, sal_False);
::rtl::OUString aURL;
- ::rtl::OUString aTarget(RTL_CONSTASCII_USTRINGPARAM("_blank"));
+ ::rtl::OUString aTarget("_blank");
if ( pFileNameItem )
aURL = pFileNameItem->GetValue();
if ( pTargetItem )
@@ -1116,7 +1116,7 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte
}
else
xLoader = uno::Reference < frame::XComponentLoader >( comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), uno::UNO_QUERY );
+ ::rtl::OUString("com.sun.star.frame.Desktop") ), uno::UNO_QUERY );
Reference <lang::XComponent> xComp;
try
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index 9556ab7b14e2..ad4d83af1c59 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -52,15 +52,15 @@ OwnSubFilterService::~OwnSubFilterService()
uno::Sequence< ::rtl::OUString > SAL_CALL OwnSubFilterService::impl_getStaticSupportedServiceNames()
{
uno::Sequence< ::rtl::OUString > aRet(2);
- aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.OwnSubFilter"));
- aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.document.OwnSubFilter"));
+ aRet[0] = ::rtl::OUString("com.sun.star.document.OwnSubFilter");
+ aRet[1] = ::rtl::OUString("com.sun.star.comp.document.OwnSubFilter");
return aRet;
}
//-------------------------------------------------------------------------
::rtl::OUString SAL_CALL OwnSubFilterService::impl_getStaticImplementationName()
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.document.OwnSubFilter"));
+ return ::rtl::OUString("com.sun.star.comp.document.OwnSubFilter");
}
//-------------------------------------------------------------------------
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index b453f892fd5c..c9a66e748084 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -152,7 +152,7 @@ static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl )
osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
Graphic aGraphic;
- const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
+ const String aFilterName( IMP_PNG );
if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
{
aRes = Image( aGraphic.GetBitmapEx() );
@@ -208,7 +208,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
String aItemText( linguistic::GetThesaurusReplaceText( aSynonyms[i] ) );
pThesSubMenu->InsertItem( nId, aItemText );
- ::rtl::OUString aCmd(RTL_CONSTASCII_USTRINGPARAM(".uno:ThesaurusFromContext?WordReplace:string=") );
+ ::rtl::OUString aCmd(".uno:ThesaurusFromContext?WordReplace:string=" );
aCmd += aItemText;
pThesSubMenu->SetItemCommand( nId, aCmd );
@@ -224,7 +224,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
pThesSubMenu->InsertSeparator();
const String sThesaurus( SfxResId( STR_MENU_THESAURUS ) );
pThesSubMenu->InsertItem( 100, sThesaurus );
- pThesSubMenu->SetItemCommand( 100, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ThesaurusDialog")) );
+ pThesSubMenu->SetItemCommand( 100, ::rtl::OUString(".uno:ThesaurusDialog") );
pSVMenu->InsertSeparator();
const String sSynonyms( SfxResId( STR_MENU_SYNONYMS ) );