[Libreoffice-commits] .: padmin/source sax/source sax/test sot/source

Gert Faller gfaller at kemper.freedesktop.org
Mon Nov 22 13:17:56 PST 2010


 padmin/source/adddlg.cxx                       |   16 +++---
 padmin/source/helper.cxx                       |    4 -
 sax/source/expatwrap/sax_expat.cxx             |   62 ++++++++++++-------------
 sax/source/expatwrap/saxwriter.cxx             |   12 ++--
 sax/test/sax/testsax.cxx                       |    2 
 sax/test/sax/testwriter.cxx                    |    2 
 sax/test/saxdemo.cxx                           |    8 +--
 sax/test/testcomponent.cxx                     |    6 +-
 sot/source/sdstor/stgelem.cxx                  |    8 +--
 sot/source/sdstor/storage.cxx                  |   10 ++--
 sot/source/sdstor/ucbstorage.cxx               |   44 ++++++++---------
 sot/source/sdstor/unostorageholder.cxx         |    6 +-
 sot/source/unoolestorage/xolesimplestorage.cxx |   12 ++--
 13 files changed, 96 insertions(+), 96 deletions(-)

New commits:
commit 7eca62cccd0638f4a5f8db0f43aa449354032846
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Mon Nov 22 22:17:17 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM in libs-gui 06

diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 1dbbfb4..bd2cf93 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -90,11 +90,11 @@ void APChooseDevicePage::fill( PrinterInfo& rInfo )
 {
     if( m_aPDFBtn.IsChecked() )
     {
-        rInfo.m_aFeatures = OUString::createFromAscii( "pdf=" );
+        rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("pdf="));
     }
     else if( m_aFaxBtn.IsChecked() )
     {
-        rInfo.m_aFeatures = OUString::createFromAscii( "fax" );
+        rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax"));
     }
     else
         rInfo.m_aFeatures = OUString();
@@ -694,7 +694,7 @@ void APFaxDriverPage::fill( PrinterInfo& rInfo )
 {
     if( isDefault() )
     {
-        rInfo.m_aDriverName = OUString::createFromAscii( "SGENPRT" );
+        rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT"));
     }
 }
 
@@ -727,9 +727,9 @@ bool APPdfDriverPage::check()
 void APPdfDriverPage::fill( PrinterInfo& rInfo )
 {
     if( isDefault() )
-        rInfo.m_aDriverName = OUString::createFromAscii( "SGENPRT" );
+        rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT"));
     else if( isDist() )
-        rInfo.m_aDriverName = OUString::createFromAscii( "ADISTILL" );
+        rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("ADISTILL"));
 }
 
 //--------------------------------------------------------------------
@@ -1015,13 +1015,13 @@ void AddPrinterDialog::addPrinter()
             }
             else if( m_pChooseDevicePage->isFax() )
             {
-                aInfo.m_aFeatures = OUString::createFromAscii( "fax=" );
+                aInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax="));
                 if( m_pFaxNamePage->isFaxSwallow() )
-                    aInfo.m_aFeatures += OUString::createFromAscii( "swallow" );
+                    aInfo.m_aFeatures += OUString(RTL_CONSTASCII_USTRINGPARAM("swallow"));
             }
             else if( m_pChooseDevicePage->isPDF() )
             {
-                OUString aPdf( OUString::createFromAscii( "pdf=" ) );
+                OUString aPdf( RTL_CONSTASCII_USTRINGPARAM("pdf=") );
                 aPdf += m_pPdfCommandPage->getPdfDir();
                 aInfo.m_aFeatures = aPdf;
             }
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 9e1fbba..f04e8cd 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -70,11 +70,11 @@ ResId padmin::PaResId( sal_uInt32 nId )
         utl::OConfigurationNode aNode =
             utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
                     vcl::unohelper::GetMultiServiceFactory(),
-                    OUString::createFromAscii( "org.openoffice.Setup/L10N" ) );
+                    OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/L10N")) );
         if ( aNode.isValid() )
         {
             rtl::OUString aLoc;
-            Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ooLocale" ) );
+            Any aValue = aNode.getNodeValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")) );
             if( aValue >>= aLoc )
             {
 //                LanguageType nTmpLang = MsLangId::convertIsoStringToLanguage( aLoc );
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index cb070ab..52d55a7 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -467,7 +467,7 @@ void SaxExpatParser::parseStream(	const InputSource& structSource)
 
     if( ! entity.structSource.aInputStream.is() )
     {
-        throw SAXException( OUString::createFromAscii( "No input source" ) ,
+        throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("No input source")) ,
                             Reference< XInterface > () , Any() );
     }
 
@@ -482,7 +482,7 @@ void SaxExpatParser::parseStream(	const InputSource& structSource)
     entity.pParser = XML_ParserCreate( 0 );
     if( ! entity.pParser )
     {
-        throw SAXException( OUString::createFromAscii( "Couldn't create parser" ) ,
+        throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("Couldn't create parser")) ,
                             Reference< XInterface > (), Any() );
     }
 
@@ -632,82 +632,82 @@ OUString getErrorMessage( XML_Error xmlE, OUString sSystemId , sal_Int32 nLine )
 {
     OUString Message;
     if( XML_ERROR_NONE == xmlE ) {
-        Message = OUString::createFromAscii( "No" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("No"));
     }
     else if( XML_ERROR_NO_MEMORY == xmlE ) {
-        Message = OUString::createFromAscii( "no memory" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no memory"));
     }
     else if( XML_ERROR_SYNTAX == xmlE ) {
-        Message = OUString::createFromAscii( "syntax" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("syntax"));
     }
     else if( XML_ERROR_NO_ELEMENTS == xmlE ) {
-        Message = OUString::createFromAscii( "no elements" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no elements"));
     }
     else if( XML_ERROR_INVALID_TOKEN == xmlE ) {
-        Message = OUString::createFromAscii( "invalid token" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("invalid token"));
     }
     else if( XML_ERROR_UNCLOSED_TOKEN == xmlE ) {
-        Message = OUString::createFromAscii( "unclosed token" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed token"));
     }
     else if( XML_ERROR_PARTIAL_CHAR == xmlE ) {
-        Message = OUString::createFromAscii( "partial char" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("partial char"));
     }
     else if( XML_ERROR_TAG_MISMATCH == xmlE ) {
-        Message = OUString::createFromAscii( "tag mismatch" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("tag mismatch"));
     }
     else if( XML_ERROR_DUPLICATE_ATTRIBUTE == xmlE ) {
-        Message = OUString::createFromAscii( "duplicate attribute" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("duplicate attribute"));
     }
     else if( XML_ERROR_JUNK_AFTER_DOC_ELEMENT == xmlE ) {
-        Message = OUString::createFromAscii( "junk after doc element" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("junk after doc element"));
     }
     else if( XML_ERROR_PARAM_ENTITY_REF == xmlE ) {
-        Message = OUString::createFromAscii( "parameter entity reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("parameter entity reference"));
     }
     else if( XML_ERROR_UNDEFINED_ENTITY == xmlE ) {
-        Message = OUString::createFromAscii( "undefined entity" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("undefined entity"));
     }
     else if( XML_ERROR_RECURSIVE_ENTITY_REF == xmlE ) {
-        Message = OUString::createFromAscii( "recursive entity reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("recursive entity reference"));
     }
     else if( XML_ERROR_ASYNC_ENTITY == xmlE ) {
-        Message = OUString::createFromAscii( "async entity" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("async entity"));
     }
     else if( XML_ERROR_BAD_CHAR_REF == xmlE ) {
-        Message = OUString::createFromAscii( "bad char reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("bad char reference"));
     }
     else if( XML_ERROR_BINARY_ENTITY_REF == xmlE ) {
-        Message = OUString::createFromAscii( "binary entity reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("binary entity reference"));
     }
     else if( XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF == xmlE ) {
-        Message = OUString::createFromAscii( "attribute external entity reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("attribute external entity reference"));
     }
     else if( XML_ERROR_MISPLACED_XML_PI == xmlE ) {
-        Message = OUString::createFromAscii( "misplaced xml processing instruction" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("misplaced xml processing instruction"));
     }
     else if( XML_ERROR_UNKNOWN_ENCODING == xmlE ) {
-        Message = OUString::createFromAscii( "unknown encoding" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown encoding"));
     }
     else if( XML_ERROR_INCORRECT_ENCODING == xmlE ) {
-        Message = OUString::createFromAscii( "incorrect encoding" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("incorrect encoding"));
     }
     else if( XML_ERROR_UNCLOSED_CDATA_SECTION == xmlE ) {
-        Message = OUString::createFromAscii( "unclosed cdata section" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed cdata section"));
     }
     else if( XML_ERROR_EXTERNAL_ENTITY_HANDLING == xmlE ) {
-        Message = OUString::createFromAscii( "external entity reference" );
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("external entity reference"));
     }
     else if( XML_ERROR_NOT_STANDALONE == xmlE ) {
-        Message = OUString::createFromAscii( "not standalone" );	
+        Message = OUString(RTL_CONSTASCII_USTRINGPARAM("not standalone"));
     }
 
-    OUString str = OUString::createFromAscii( "[" );
+    OUString str(RTL_CONSTASCII_USTRINGPARAM("["));
     str += sSystemId;
-    str += OUString::createFromAscii( " line " );
+    str += OUString(RTL_CONSTASCII_USTRINGPARAM(" line "));
     str += OUString::valueOf( nLine );
-    str += OUString::createFromAscii( "]: " );
+    str += OUString(RTL_CONSTASCII_USTRINGPARAM("]: "));
     str += Message;
-    str += OUString::createFromAscii( "error" );
+    str += OUString(RTL_CONSTASCII_USTRINGPARAM("error"));
 
     return str;
 }
@@ -1050,9 +1050,9 @@ sal_Bool SAL_CALL component_writeInfo(
                 OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) );
             xNewKey->createKey( OUString::createFromAscii( SERVICE_NAME ) );
     
-            xNewKey = xKey->createKey( OUString::createFromAscii("/") +
+            xNewKey = xKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) +
                                        SaxWriter_getImplementationName()+
-                                       OUString::createFromAscii( "/UNO/SERVICES" ) );
+                                       OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
             xNewKey->createKey( SaxWriter_getServiceName() );
             
             return sal_True;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index ad443e2..682cb25 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -245,7 +245,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
         Any a;
         a <<= e;
         throw SAXException(
-            OUString::createFromAscii( "io exception during writing" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("io exception during writing")),
             Reference< XInterface > (),
             a );
     }
@@ -1030,12 +1030,12 @@ Reference < XInterface > SAL_CALL SaxWriter_CreateInstance(
 
 OUString SaxWriter_getServiceName() throw()
 {
-    return OUString::createFromAscii( "com.sun.star.xml.sax.Writer" );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"));
 }
 
 OUString SaxWriter_getImplementationName() throw()
 {
-    return OUString::createFromAscii( "com.sun.star.extensions.xml.sax.Writer" );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.extensions.xml.sax.Writer"));
 }
 
 Sequence< OUString > 	SaxWriter_getSupportedServiceNames(void) throw()
@@ -1111,12 +1111,12 @@ void SAXWriter::endDocument(void) 					throw(SAXException, RuntimeException)
     if( ! m_bDocStarted )
     {
         throw SAXException(
-            OUString::createFromAscii( "endDocument called before startDocument" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("endDocument called before startDocument")),
             Reference< XInterface >() , Any() );
     }
     if( m_nLevel ) {
         throw SAXException(
-            OUString::createFromAscii( "unexpected end of document" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("unexpected end of document")),
             Reference< XInterface >() , Any() );
     }
     mp_SaxWriterHelper->endDocument();
@@ -1129,7 +1129,7 @@ void SAXWriter::endDocument(void) 					throw(SAXException, RuntimeException)
         Any a;
         a <<= e;
         throw SAXException(
-            OUString::createFromAscii( "IO exception during closing the IO Stream" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("IO exception during closing the IO Stream")),
             Reference< XInterface > (),
             a );
     }
diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx
index 4c9c224..808e5f2 100644
--- a/sax/test/sax/testsax.cxx
+++ b/sax/test/sax/testsax.cxx
@@ -237,7 +237,7 @@ Reference < XInputStream > createStreamFromSequence(
     const Reference < XMultiServiceFactory > &xSMgr )
 {
     Reference < XInterface > xOutStreamService =
-        xSMgr->createInstance( OUString::createFromAscii("com.sun.star.io.Pipe") );
+        xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) );
     OSL_ASSERT( xOutStreamService.is() );
     Reference< XOutputStream >  rOutStream( xOutStreamService , UNO_QUERY );
     OSL_ASSERT( rOutStream.is() );
diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx
index d702241..1cb71ab 100644
--- a/sax/test/sax/testwriter.cxx
+++ b/sax/test/sax/testwriter.cxx
@@ -348,7 +348,7 @@ void OSaxWriterTest::testInvariant( const OUString& TestName,
                                     const Reference < XInterface >& TestObject )
     throw  (	IllegalArgumentException, RuntimeException)
 {
-    if( OUString::createFromAscii("com.sun.star.xml.sax.Writer") == TestName ) {
+    if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) == TestName ) {
         Reference< XDocumentHandler > doc( TestObject , UNO_QUERY );
         Reference< XExtendedDocumentHandler > ext( TestObject , UNO_QUERY );
         Reference< XActiveDataSource > source( TestObject , UNO_QUERY );
diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx
index 43d3111..27d365c 100644
--- a/sax/test/saxdemo.cxx
+++ b/sax/test/saxdemo.cxx
@@ -509,7 +509,7 @@ int main (int argc, char **argv)
     {
         // Create registration service
         Reference < XInterface > x = xSMgr->createInstance(
-            OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) );
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
         xReg = Reference<  XImplementationRegistration > ( x , UNO_QUERY );
     }
     catch( Exception & ) {
@@ -524,7 +524,7 @@ int main (int argc, char **argv)
         OUString aDllName =
             OUString::createFromAscii( "sax.uno" SAL_DLLEXTENSION );
         xReg->registerImplementation(
-            OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
             aDllName,
             Reference< XSimpleRegistry > ()  );
     }
@@ -541,7 +541,7 @@ int main (int argc, char **argv)
     // read xml from a file and count elements
     //--------------------------------
     Reference< XInterface > x = xSMgr->createInstance(
-        OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) );
+        OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) );
     if( x.is() )
     {
         Reference< XParser > rParser( x , UNO_QUERY );
@@ -581,7 +581,7 @@ int main (int argc, char **argv)
     //----------------------
     // The SAX-Writer demo
     //----------------------
-    x= xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) );
+    x= xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) );
     if( x.is() )
     {
         printf( "start writing to %s\n" , argv[2] );
diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx
index 263dcb9..1141059 100644
--- a/sax/test/testcomponent.cxx
+++ b/sax/test/testcomponent.cxx
@@ -79,7 +79,7 @@ int main (int argc, char **argv)
     {
         // Create registration service
         Reference < XInterface > x = xSMgr->createInstance(
-            OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) );
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
         xReg = Reference<  XImplementationRegistration > ( x , UNO_QUERY );
     }
     catch( Exception & ) {
@@ -102,7 +102,7 @@ int main (int argc, char **argv)
             aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
 #endif
             xReg->registerImplementation(
-                OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
+                OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
                 aDllName,
                 xSimpleReg );
         }
@@ -130,7 +130,7 @@ int main (int argc, char **argv)
 #endif
 
         xReg->registerImplementation(
-            OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ) ,
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")) ,
             aDllName,
             xSimpleReg );
     }
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 014d87b..0bf244b 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 cab2834..09f8706 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 2eeda25..e65d576 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 199a131..746a9e5 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 086bb7c..7cad4a0 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 );
 


More information about the Libreoffice-commits mailing list