diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-20 23:37:30 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-20 23:37:30 +0100 |
commit | d3db2986597c3356fd50156e5eee778f8232e585 (patch) | |
tree | 7da19472483f1afb58d3aa058d86d96a2cb77852 /sfx2 | |
parent | 32f0a7a968b5195cdb972b6741204db1281dc38e (diff) |
TL_CONSTASCII_USTRINGPARAM in libs core 27
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/docfac.cxx | 34 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/docfilt.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docinf.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 26 |
10 files changed, 59 insertions, 59 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 1d6e7d164b..8cd3098296 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -2355,7 +2355,7 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand ) { ::com::sun::star::util::URL aURL; aURL.Complete = rCommand; - Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY ); + Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY ); xTrans->parseStrict( aURL ); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = pImp->xProv->queryDispatch( aURL, ::rtl::OUString(), 0 ); if ( xDisp.is() ) @@ -2365,7 +2365,7 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand ) ::rtl::OUString sAppName; try { - static ::rtl::OUString our_aModuleManagerName = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager"); + static ::rtl::OUString our_aModuleManagerName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")); ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager( @@ -2376,7 +2376,7 @@ BOOL SfxBindings::ExecuteCommand_Impl( const String& rCommand ) sAppName = xModuleManager->identify(xFrame); } catch(::com::sun::star::uno::Exception&) {} Sequence<beans::PropertyValue> source; - ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString::createFromAscii("SfxAsyncExec")); + ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SfxAsyncExec"))); ::comphelper::UiEventsLogger::logDispatch(aURL, source); } new SfxAsyncExec_Impl( aURL, xDisp ); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 50769e2b6e..60888fb194 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -248,7 +248,7 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest if ( xSet.is() ) { - com::sun::star::uno::Any aProp = xSet->getPropertyValue(::rtl::OUString::createFromAscii("DispatchRecorderSupplier")); + com::sun::star::uno::Any aProp = xSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DispatchRecorderSupplier"))); com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorderSupplier > xSupplier; com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder; aProp >>= xSupplier; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index c97e8e1101..4e816f6146 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno; using namespace ::rtl; -#define USERITEM_NAME OUString::createFromAscii( "UserItem" ) +#define USERITEM_NAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserItem")) class SfxModelessDialog_Impl : public SfxListener { diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index f91bfcbfaf..d645aa987b 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -384,7 +384,7 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl, throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("removeFile: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("removeFile: exception")), 0, uno::makeAny(e)); } } @@ -413,7 +413,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl) throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("getAllParts: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getAllParts: exception")), 0, uno::makeAny(e)); } } @@ -435,7 +435,7 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl, throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("isPartOfType: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("isPartOfType: exception")), 0, uno::makeAny(e)); } } @@ -452,10 +452,10 @@ mkException( ::rtl::OUString const & i_rMessage, iaioe.Classification = task::InteractionClassification_ERROR; iaioe.Code = i_ErrorCode; - const beans::PropertyValue uriProp(::rtl::OUString::createFromAscii("Uri"), + const beans::PropertyValue uriProp(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(i_rUri), static_cast<beans::PropertyState>(0)); const beans::PropertyValue rnProp( - ::rtl::OUString::createFromAscii("ResourceName"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")), -1, uno::makeAny(i_rResource), static_cast<beans::PropertyState>(0)); iaioe.Arguments = ::comphelper::makeSequence( uno::makeAny(uriProp), uno::makeAny(rnProp)); @@ -621,7 +621,7 @@ retry: throw; } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("importFile: exception"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("importFile: exception")), 0, uno::makeAny(e)); } } @@ -642,7 +642,7 @@ exportStream(struct DocumentMetadataAccess_Impl & i_rImpl, uno::UNO_QUERY); if (xStreamProps.is()) { // this is NOT supported in FileSystemStorage xStreamProps->setPropertyValue( - ::rtl::OUString::createFromAscii("MediaType"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(::rtl::OUString::createFromAscii(s_rdfxml))); } const uno::Reference<io::XOutputStream> xOutStream( @@ -788,7 +788,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl) getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get()); } catch (uno::Exception & e) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii("init: unexpected exception"), 0, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("init: unexpected exception")), 0, uno::makeAny(e)); } @@ -1135,7 +1135,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, std::set< ::rtl::OUString > StgFiles; collectFilesFromStorage(i_xStorage, - ::rtl::OUString::createFromAscii(""), StgFiles); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), StgFiles); std::vector< ::rtl::OUString > MfstMetadataFiles; diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index da29401ab7..cd10edbe8e 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -213,16 +213,16 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod ) void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName ) { static const int nMaxPathSize = 16000; - static ::rtl::OUString SERVICE_FILTER_FACTORY = ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ); - static ::rtl::OUString SERVICE_TYPE_DECTECTION = ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ); - static ::rtl::OUString SERVICE_SIMPLE_ACCESS = ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ); + static ::rtl::OUString SERVICE_FILTER_FACTORY(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")); + static ::rtl::OUString SERVICE_TYPE_DECTECTION(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")); + static ::rtl::OUString SERVICE_SIMPLE_ACCESS(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")); - static ::rtl::OUString CONF_ROOT = ::rtl::OUString::createFromAscii( "/org.openoffice.Setup"); - static ::rtl::OUString CONF_PATH = ::rtl::OUString::createFromAscii( "Office/Factories/" ) + ::rtl::OUString( rServiceName ); - static ::rtl::OUString PROP_DEF_TEMPL_CHANGED = ::rtl::OUString::createFromAscii( "ooSetupFactorySystemDefaultTemplateChanged" ); - static ::rtl::OUString PROP_ACTUAL_FILTER = ::rtl::OUString::createFromAscii( "ooSetupFactoryActualFilter" ); + static ::rtl::OUString CONF_ROOT(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")); + static ::rtl::OUString CONF_PATH = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Office/Factories/" )) + ::rtl::OUString( rServiceName ); + static ::rtl::OUString PROP_DEF_TEMPL_CHANGED(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactorySystemDefaultTemplateChanged")); + static ::rtl::OUString PROP_ACTUAL_FILTER(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryActualFilter")); - static ::rtl::OUString DEF_TPL_STR = ::rtl::OUString::createFromAscii("/soffice."); + static ::rtl::OUString DEF_TPL_STR(RTL_CONSTASCII_USTRINGPARAM("/soffice.")); String sURL; String sPath; @@ -258,7 +258,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri aActuralFilterData[nInd].Value >>= aActualFilterTypeName; ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) ); uno::Sequence< ::rtl::OUString > aAllExt = - aProps1.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Extensions" ), uno::Sequence< ::rtl::OUString >() ); + aProps1.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")), uno::Sequence< ::rtl::OUString >() ); //To-do: check if aAllExt is empty first ::rtl::OUString aExt = aAllExt[0]; @@ -270,7 +270,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri ::rtl::OUString aBackupURL; ::osl::Security().getConfigDir(aBackupURL); - aBackupURL += ::rtl::OUString::createFromAscii( "/temp" ); + aBackupURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/temp")); if ( !xSimpleFileAccess->exists( aBackupURL ) ) xSimpleFileAccess->createFolder( aBackupURL ); @@ -286,21 +286,21 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri uno::Reference< document::XTypeDetection > xTypeDetector( xTypeDetection, uno::UNO_QUERY ); ::comphelper::SequenceAsHashMap aProps2( xTypeDetection->getByName( xTypeDetector->queryTypeByURL( rTemplateName ) ) ); ::rtl::OUString aFilterName = - aProps2.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() ); + aProps2.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreferredFilter")), ::rtl::OUString() ); 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[1].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); aArgs[2].Value <<= ::rtl::OUString( rTemplateName ); uno::Reference< frame::XLoadable > xLoadable( xFactory->createInstance( ::rtl::OUString( rServiceName ) ), uno::UNO_QUERY ); xLoadable->load( aArgs ); aArgs.realloc( 2 ); - aArgs[1].Name = ::rtl::OUString::createFromAscii( "Overwrite" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Overwrite")); aArgs[1].Value <<= sal_True; uno::Reference< frame::XStorable > xStorable( xLoadable, uno::UNO_QUERY ); @@ -439,8 +439,8 @@ String SfxObjectFactory::GetFactoryURL() const String SfxObjectFactory::GetModuleName() const { - static ::rtl::OUString SERVICENAME_MODULEMANAGER = ::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager"); - static ::rtl::OUString PROP_MODULEUINAME = ::rtl::OUString::createFromAscii("ooSetupFactoryUIName"); + static ::rtl::OUString SERVICENAME_MODULEMANAGER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")); + static ::rtl::OUString PROP_MODULEUINAME (RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryUIName")); try { diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index f2e903e417..c8115923f5 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1265,9 +1265,9 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf new utl::ProgressHandlerWrap( xStatusIndicator ) ); uno::Sequence< beans::PropertyValue > aAddProps( 2 ); - aAddProps[0].Name = ::rtl::OUString::createFromAscii( "RepairPackage" ); + aAddProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")); aAddProps[0].Value <<= (sal_Bool)sal_True; - aAddProps[1].Name = ::rtl::OUString::createFromAscii( "StatusIndicator" ); + aAddProps[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator")); aAddProps[1].Value <<= xProgressHandler; // the first arguments will be filled later @@ -1649,7 +1649,7 @@ sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, { Reference< XInputStream > aTempInput = aTempCont.openStream(); bTransactStarted = sal_True; - aOriginalContent.setPropertyValue( ::rtl::OUString::createFromAscii( "Size" ), + aOriginalContent.setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")), uno::makeAny( (sal_Int64)0 ) ); aOriginalContent.writeStream( aTempInput, bOverWrite ); bResult = sal_True; @@ -3185,11 +3185,11 @@ SvKeyValueIterator* SfxMedium::GetHeaderAttributes_Impl() try { - Any aAny = pImp->aContent.getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + Any aAny = pImp->aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); ::rtl::OUString aContentType; aAny >>= aContentType; - pImp->xAttributes->Append( SvKeyValue( ::rtl::OUString::createFromAscii( "content-type" ), aContentType ) ); + pImp->xAttributes->Append( SvKeyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content-type")), aContentType ) ); } catch ( ::com::sun::star::uno::Exception& ) { @@ -3225,7 +3225,7 @@ const uno::Sequence < util::RevisionTag >& SfxMedium::GetVersionList( bool _bNoR ( aName.Len() || aLogicName.Len() ) && GetStorage().is() ) { uno::Reference < document::XDocumentRevisionListPersistence > xReader( comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.document.DocumentRevisionListPersistence") ), uno::UNO_QUERY ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentRevisionListPersistence")) ), uno::UNO_QUERY ); if ( xReader.is() ) { try @@ -3247,7 +3247,7 @@ const uno::Sequence < util::RevisionTag >& SfxMedium::GetVersionList( bool _bNoR uno::Sequence < util::RevisionTag > SfxMedium::GetVersionList( const uno::Reference < embed::XStorage >& xStorage ) { uno::Reference < document::XDocumentRevisionListPersistence > xReader( comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.document.DocumentRevisionListPersistence") ), uno::UNO_QUERY ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentRevisionListPersistence")) ), uno::UNO_QUERY ); if ( xReader.is() ) { try @@ -3335,7 +3335,7 @@ sal_Bool SfxMedium::SaveVersionList_Impl( sal_Bool /*bUseXML*/ ) return sal_True; uno::Reference < document::XDocumentRevisionListPersistence > xWriter( comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.document.DocumentRevisionListPersistence") ), uno::UNO_QUERY ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentRevisionListPersistence")) ), uno::UNO_QUERY ); if ( xWriter.is() ) { try @@ -3541,7 +3541,7 @@ void SfxMedium::CreateTempFileNoCopy() try { - Any aAny = pImp->aContent.getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + Any aAny = pImp->aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); ::rtl::OUString aField; aAny >>= aField; diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index 5479499fc4..76c87d5c44 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -197,7 +197,7 @@ String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com: if ( xProps.is() ) { ::rtl::OUString aMediaType; - xProps->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ) >>= aMediaType; + xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ) >>= aMediaType; if ( aMediaType.getLength() ) { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 3f6738c8ea..27100eb4b6 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -262,7 +262,7 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet( const sal_Int32 nPropId = rCustomSect.GetFreePropertyId(); rCustomSect.SetBlobValue( nPropId, *i_pGuid ); rCustomSect.SetPropertyName( nPropId, - ::rtl::OUString::createFromAscii("_PID_GUID") ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_GUID")) ); } // write hyperlinks @@ -270,7 +270,7 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet( const sal_Int32 nPropId = rCustomSect.GetFreePropertyId(); rCustomSect.SetBlobValue( nPropId, *i_pHyperlinks ); rCustomSect.SetPropertyName( nPropId, - ::rtl::OUString::createFromAscii("_PID_HLINKS") ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS")) ); } uno::Reference<beans::XPropertySet> xUserDefinedProps( diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 1b58a3981f..3f7141f8da 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1200,7 +1200,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom UNO_QUERY ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii("Hidden"); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden")); aArgs[0].Value <<= sal_True; INetURLObject aTemplURL( rName ); @@ -1210,7 +1210,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom { xStorable = uno::Reference< XStorable >( xDesktop->loadComponentFromURL( aTemplURL.GetMainURL(INetURLObject::NO_DECODE), - OUString::createFromAscii( "_blank" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, aArgs ), UNO_QUERY ); @@ -2430,7 +2430,7 @@ sal_Bool SfxDocTemplate_Impl::Construct( ) Sequence< Any > aCompareArg(1); *(aCompareArg.getArray()) <<= xLocalizable->getLocale();; m_rCompareFactory = uno::Reference< XAnyCompareFactory >( - xFactory->createInstanceWithArguments( OUString::createFromAscii( "com.sun.star.ucb.AnyCompareFactory" ), + xFactory->createInstanceWithArguments( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.AnyCompareFactory")), aCompareArg ), UNO_QUERY ); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 016ea959e5..d4a7d1ca6e 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -703,7 +703,7 @@ sal_Bool SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& uno::Reference< container::XNameAccess > xTypeDetection( mxType, uno::UNO_QUERY_THROW ); SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aDocType ) ); aType = aTypeProps.getUnpackedValueOrDefault( - ::rtl::OUString::createFromAscii( "MediaType" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), ::rtl::OUString() ); } catch( uno::Exception& ) @@ -1387,11 +1387,11 @@ sal_Bool SfxDocTplService_Impl::WriteUINamesForTemplateDir_Impl( const ::rtl::OU sal_Bool bResult = sal_False; try { uno::Reference< beans::XPropertySet > xTempFile( - mxFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + mxFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")) ), uno::UNO_QUERY_THROW ); ::rtl::OUString aTempURL; - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")) ); aUrl >>= aTempURL; uno::Reference< io::XStream > xStream( xTempFile, uno::UNO_QUERY_THROW ); @@ -1823,7 +1823,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // get document service name uno::Reference< frame::XModuleManager > xModuleManager( xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.frame.ModuleManager" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ), uno::UNO_QUERY_THROW ); sDocServiceName = xModuleManager->identify( uno::Reference< uno::XInterface >( rStorable, uno::UNO_QUERY ) ); if ( !sDocServiceName.getLength() ) @@ -1834,18 +1834,18 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, uno::Reference< lang::XMultiServiceFactory > xConfigProvider( xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ), uno::UNO_QUERY_THROW ); uno::Sequence< uno::Any > aArgs( 1 ); beans::PropertyValue aPathProp; - aPathProp.Name = ::rtl::OUString::createFromAscii( "nodepath" ); + aPathProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); aPathProp.Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Setup/Office/Factories/" ) ); aArgs[0] <<= aPathProp; uno::Reference< container::XNameAccess > xSOFConfig( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArgs ), uno::UNO_QUERY_THROW ); @@ -1861,7 +1861,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // find the related type name ::rtl::OUString aTypeName; uno::Reference< container::XNameAccess > xFilterFactory( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aFilterData; @@ -1878,16 +1878,16 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, mxType.is() ? uno::Reference< container::XNameAccess >( mxType, uno::UNO_QUERY_THROW ) : uno::Reference< container::XNameAccess >( - 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 ); SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aTypeName ) ); uno::Sequence< ::rtl::OUString > aAllExt = - aTypeProps.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Extensions" ), Sequence< ::rtl::OUString >() ); + aTypeProps.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")), Sequence< ::rtl::OUString >() ); if ( !aAllExt.getLength() ) throw uno::RuntimeException(); - ::rtl::OUString aMediaType = aTypeProps.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "MediaType" ), ::rtl::OUString() ); + ::rtl::OUString aMediaType = aTypeProps.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), ::rtl::OUString() ); ::rtl::OUString aExt = aAllExt[0]; if ( !aMediaType.getLength() || !aExt.getLength() ) @@ -1913,9 +1913,9 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, // store template uno::Sequence< PropertyValue > aStoreArgs( 2 ); - aStoreArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aStoreArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")); aStoreArgs[0].Value <<= aFilterName; - aStoreArgs[1].Name = ::rtl::OUString::createFromAscii( "DocumentTitle" ); + aStoreArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")); aStoreArgs[1].Value <<= rTemplateName; ::rtl::OUString aCurrentDocumentURL = rStorable->getLocation(); |