diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-22 22:17:17 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-11-22 22:17:17 +0100 |
commit | bd80ff75a216d6494a1de64896856f4bbccc52ff (patch) | |
tree | ab515c5c4c5932f75676eac95914fb64a4fc83b8 /sot | |
parent | 6cf3645e7d2c2c0c6e3be09361a29e54f41849a4 (diff) |
RTL_CONSTASCII_USTRINGPARAM in libs-gui 06
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgelem.cxx | 8 | ||||
-rw-r--r-- | sot/source/sdstor/storage.cxx | 10 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 44 | ||||
-rw-r--r-- | sot/source/sdstor/unostorageholder.cxx | 6 | ||||
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.cxx | 12 |
5 files changed, 40 insertions, 40 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index df373898e219..e6b318da7148 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -269,11 +269,11 @@ static String ToUpperUnicode( const String & rStr ) // I don't know the locale, so en_US is hopefully fine /* com.sun.star.lang.Locale aLocale; - aLocale.Language = OUString::createFromAscii( "en" ); - aLocale.Country = OUString::createFromAscii( "US" ); + aLocale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("en")); + aLocale.Country = OUString(RTL_CONSTASCII_USTRINGPARAM("US")); */ - static rtl::OUString aEN=rtl::OUString::createFromAscii( "en" ); - static rtl::OUString aUS=rtl::OUString::createFromAscii( "US" ); + static rtl::OUString aEN(RTL_CONSTASCII_USTRINGPARAM("en")); + static rtl::OUString aUS(RTL_CONSTASCII_USTRINGPARAM("US")); static CharClass aCC( com::sun::star::lang::Locale( aEN, aUS, rtl::OUString() ) ); return aCC.toUpper( rStr, 0, rStr.Len() ); } diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 2ee6c6f78361..4503c8506c27 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -807,8 +807,8 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String& uno::Any aMediaType; if ( pChildUCBStg->GetProperty( - ::rtl::OUString::createFromAscii( "MediaType" ), aMediaType ) ) - pTempStorage->SetProperty( ::rtl::OUString::createFromAscii( "MediaType" ), aMediaType ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType ) ) + pTempStorage->SetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType ); bStorageReady = !pChildUCBStg->GetError() && !pTempStorage->GetError() && pTempStorage->Commit(); @@ -826,7 +826,7 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String& try { uno::Reference< lang::XSingleServiceFactory > xStorageFactory( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory")) ), uno::UNO_QUERY ); OSL_ENSURE( xStorageFactory.is(), "Can't create storage factory!\n" ); @@ -1466,7 +1466,7 @@ void SotStorage::SetKey( const ByteString& rKey ) ::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 ); ::com::sun::star::uno::Any aAny; aAny <<= aSequ; - SetProperty( ::rtl::OUString::createFromAscii("EncryptionKey"), aAny ); + SetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), aAny ); } } } @@ -1515,7 +1515,7 @@ sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::s return 0; ::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/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 487b5421ddd7..bf374ba55279 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -701,7 +701,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM { xComEnv = new ::ucbhelper::CommandEnvironment( Reference< ::com::sun::star::task::XInteractionHandler >(), xProgress ); - aTemp += rtl::OUString::createFromAscii("?repairpackage"); + aTemp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?repairpackage")); } m_pContent = new ::ucbhelper::Content( aTemp, xComEnv ); @@ -719,7 +719,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM ::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 ); ::com::sun::star::uno::Any aAny; aAny <<= aSequ; - m_pContent->setPropertyValue( ::rtl::OUString::createFromAscii("EncryptionKey"), aAny ); + m_pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), aAny ); } } } @@ -1220,7 +1220,7 @@ sal_Int16 UCBStorageStream_Impl::Commit() aArg.Data = xStream; aArg.ReplaceExisting = sal_True; aAny <<= aArg; - m_pContent->executeCommand( ::rtl::OUString::createFromAscii("insert"), aAny ); + m_pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), aAny ); // wrapper now controls lifetime of temporary file m_aTempURL.Erase(); @@ -1862,7 +1862,7 @@ void UCBStorage_Impl::Init() Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader = Reference< ::com::sun::star::packages::manifest::XManifestReader > ( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.packages.manifest.ManifestReader" )), UNO_QUERY) ; + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.manifest.ManifestReader"))), UNO_QUERY) ; Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream ); // cleanup @@ -1882,7 +1882,7 @@ void UCBStorage_Impl::Init() { // get the manifest information from the package try { - Any aAny = m_pContent->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + Any aAny = m_pContent->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); rtl::OUString aTmp; if ( ( aAny >>= aTmp ) && aTmp.getLength() ) m_aContentType = m_aOriginalContentType = aTmp; @@ -1927,7 +1927,7 @@ void UCBStorage_Impl::CreateContent() { xComEnv = new ::ucbhelper::CommandEnvironment( Reference< ::com::sun::star::task::XInteractionHandler >(), m_xProgressHandler ); - aTemp += rtl::OUString::createFromAscii("?repairpackage"); + aTemp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?repairpackage")); } m_pContent = new ::ucbhelper::Content( aTemp, xComEnv ); @@ -1954,10 +1954,10 @@ void UCBStorage_Impl::ReadContent() // create cursor for access to children Sequence< ::rtl::OUString > aProps(4); ::rtl::OUString* pProps = aProps.getArray(); - pProps[0] = ::rtl::OUString::createFromAscii( "Title" ); - pProps[1] = ::rtl::OUString::createFromAscii( "IsFolder" ); - pProps[2] = ::rtl::OUString::createFromAscii( "MediaType" ); - pProps[3] = ::rtl::OUString::createFromAscii( "Size" ); + pProps[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + pProps[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); + pProps[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); + pProps[3] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")); ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; try @@ -2018,7 +2018,7 @@ void UCBStorage_Impl::ReadContent() ::ucbhelper::Content aContent( aName, xComEnv ); ::rtl::OUString aMediaType; - Any aAny = aContent.getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + Any aAny = aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) ) pElement->m_bIsStorage = TRUE; else if ( !aMediaType.getLength() ) @@ -2181,9 +2181,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert if ( !m_bIsRoot ) aPath += m_aName; aPath += '/'; - aProps[0].Name = ::rtl::OUString::createFromAscii("MediaType"); + aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); aProps[0].Value <<= (::rtl::OUString ) m_aContentType; - aProps[1].Name = ::rtl::OUString::createFromAscii("FullPath"); + aProps[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPath")); aProps[1].Value <<= (::rtl::OUString ) aPath; rSequence[ nProps++ ] = aProps; @@ -2204,9 +2204,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert // properties of streams String aElementPath( aPath ); aElementPath += pElement->m_aName; - aProps[0].Name = ::rtl::OUString::createFromAscii("MediaType"); + aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); aProps[0].Value <<= (::rtl::OUString ) pElement->GetContentType(); - aProps[1].Name = ::rtl::OUString::createFromAscii("FullPath"); + aProps[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPath")); aProps[1].Value <<= (::rtl::OUString ) aElementPath; rSequence[ nProps++ ] = aProps; } @@ -2344,7 +2344,7 @@ sal_Int16 UCBStorage_Impl::Commit() // first remove all open stream handles if( !pElement->m_xStream.Is() || pElement->m_xStream->Clear() ) { - pContent->executeCommand( ::rtl::OUString::createFromAscii("delete"), makeAny( sal_Bool( sal_True ) ) ); + pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) ); nRet = COMMIT_RESULT_SUCCESS; } else @@ -2390,7 +2390,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (rtl::OUString) pElement->m_aName; - pContent->setPropertyValue( ::rtl::OUString::createFromAscii("Title"), aAny ); + pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), aAny ); } if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() ) @@ -2399,7 +2399,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (rtl::OUString) pElement->GetContentType(); - pContent->setPropertyValue( ::rtl::OUString::createFromAscii("MediaType"), aAny ); + pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aAny ); } if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO ) @@ -2452,7 +2452,7 @@ sal_Int16 UCBStorage_Impl::Commit() // clipboard format and ClassId will be retrieved from the media type when the file is loaded again Any aType; aType <<= (rtl::OUString) m_aContentType; - m_pContent->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), aType ); + m_pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aType ); if ( m_bIsLinked ) { @@ -2475,7 +2475,7 @@ sal_Int16 UCBStorage_Impl::Commit() Reference < ::com::sun::star::packages::manifest::XManifestWriter > xWriter = Reference< ::com::sun::star::packages::manifest::XManifestWriter > ( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.packages.manifest.ManifestWriter" )), UNO_QUERY) ; + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.manifest.ManifestWriter"))), UNO_QUERY) ; sal_Int32 nCount = GetObjectCount() + 1; Sequence < Sequence < PropertyValue > > aProps( nCount ); sal_Int32 nProps = 0; @@ -2487,7 +2487,7 @@ sal_Int16 UCBStorage_Impl::Commit() xWriter = NULL; xOutputStream = NULL; DELETEZ( pTempFile ); - aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, ::rtl::OUString::createFromAscii("manifest.xml"), NameClash::OVERWRITE ); + aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("manifest.xml")), NameClash::OVERWRITE ); } } else @@ -2498,7 +2498,7 @@ sal_Int16 UCBStorage_Impl::Commit() #endif // force writing Any aAny; - m_pContent->executeCommand( ::rtl::OUString::createFromAscii("flush"), aAny ); + m_pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), aAny ); if ( m_pSource != 0 ) { SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( m_pTempFile->GetURL(), STREAM_STD_READ ); diff --git a/sot/source/sdstor/unostorageholder.cxx b/sot/source/sdstor/unostorageholder.cxx index 55e3e2db4105..4e593a066d83 100644 --- a/sot/source/sdstor/unostorageholder.cxx +++ b/sot/source/sdstor/unostorageholder.cxx @@ -110,7 +110,7 @@ void SAL_CALL UNOStorageHolder::commited( const lang::EventObject& /*aEvent*/ ) uno::Reference< lang::XSingleServiceFactory > xStorageFactory( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory")) ), uno::UNO_QUERY ); OSL_ENSURE( xStorageFactory.is(), "Can't create storage factory!\n" ); @@ -155,8 +155,8 @@ void SAL_CALL UNOStorageHolder::commited( const lang::EventObject& /*aEvent*/ ) // CopyTo does not transport unknown media type // just workaround it uno::Any aMediaType; - if ( rTempStorage->GetProperty( ::rtl::OUString::createFromAscii( "MediaType" ), aMediaType ) ) - m_rSotStorage->SetProperty( ::rtl::OUString::createFromAscii( "MediaType" ), aMediaType ); + if ( rTempStorage->GetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType ) ) + m_rSotStorage->SetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType ); m_rSotStorage->Commit(); } diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index 6851bfc8f5f4..059857be6e5d 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -84,14 +84,14 @@ OLESimpleStorage::~OLESimpleStorage() uno::Sequence< ::rtl::OUString > SAL_CALL OLESimpleStorage::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(1); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.OLESimpleStorage"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OLESimpleStorage::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLESimpleStorage"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLESimpleStorage")); } //------------------------------------------------------------------------- @@ -267,7 +267,7 @@ void SAL_CALL OLESimpleStorage::initialize( const uno::Sequence< uno::Any >& aAr else { 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 ); uno::Reference< io::XOutputStream > xTempOut = xTempFile->getOutputStream(); @@ -426,7 +426,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const ::rtl::OUString& aName, con { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( ::rtl::OUString::createFromAscii( "Can't copy raw stream" ), + throw lang::WrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't copy raw stream")), uno::Reference< uno::XInterface >(), aCaught ); } @@ -452,7 +452,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName ) uno::Any aResult; 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 ); uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream(); @@ -488,7 +488,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName ) uno::Reference< container::XNameContainer > xResultNameContainer( 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 ); |