[Libreoffice-commits] .: sfx2/source

Gert Faller gfaller at kemper.freedesktop.org
Sat Nov 20 15:43:34 PST 2010


 sfx2/source/appl/app.cxx                   |    4 
 sfx2/source/doc/DocumentMetadataAccess.cxx |  160 ++++++++++++++---------------
 sfx2/source/doc/applet.cxx                 |    8 -
 sfx2/source/doc/doctempl.cxx               |    8 -
 sfx2/source/doc/doctemplates.cxx           |   14 +-
 5 files changed, 97 insertions(+), 97 deletions(-)

New commits:
commit 18af92b3582a6525877183d617c05a4926ce45f4
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Sun Nov 21 00:43:01 2010 +0100

    TL_CONSTASCII_USTRINGPARAM in libs core 33

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 474d1a5..fee36d1 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -757,8 +757,8 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
     ::com::sun::star::uno::Reference
         < ::com::sun::star::uri::XUriReferenceFactory >
             xFactory( xSMgr->createInstance(
-                ::rtl::OUString::createFromAscii(
-                    "com.sun.star.uri.UriReferenceFactory" ) ),
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                    "com.sun.star.uri.UriReferenceFactory" )) ),
                 ::com::sun::star::uno::UNO_QUERY );
 
     if ( xFactory.is() )
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index d645aa9..76f53d0 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -161,8 +161,8 @@ uno::Reference<rdf::XURI> createBaseURI(
         i_xContext->getServiceManager(), uno::UNO_SET_THROW);
     const uno::Reference<uri::XUriReferenceFactory> xUriFactory(
         xServiceFactory->createInstanceWithContext(
-            ::rtl::OUString::createFromAscii(
-                "com.sun.star.uri.UriReferenceFactory"), i_xContext),
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "com.sun.star.uri.UriReferenceFactory")), i_xContext),
         uno::UNO_QUERY_THROW);
     uno::Reference< uri::XUriReference > xBaseURI;
 
@@ -335,8 +335,8 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
         throw;
     } catch (uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
-                "addFile: exception"), /*this*/0, uno::makeAny(e));
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "addFile: exception")), /*this*/0, uno::makeAny(e));
     }
 }
 
@@ -475,8 +475,8 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
     const uno::Reference<task::XInteractionHandler> & i_xHandler)
 {
     if (!i_xHandler.is()) {
-        throw lang::WrappedTargetException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::loadMetadataFromStorage: exception"),
+        throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::loadMetadataFromStorage: exception")),
             /* *this*/ 0, uno::makeAny(i_rException));
     }
 
@@ -503,8 +503,8 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
         return false;
     } else {
         OSL_ENSURE(pAbort->wasSelected(), "no continuation selected?");
-        throw lang::WrappedTargetException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::loadMetadataFromStorage: exception"),
+        throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::loadMetadataFromStorage: exception")),
             /* *this*/ 0, uno::makeAny(i_rException));
     }
 }
@@ -560,8 +560,8 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                 i_rImpl.m_xRepository->importGraph(rdf::FileFormat::RDF_XML,
                     xInStream, xURI, xBaseURI);
             } else {
-                throw mkException(::rtl::OUString::createFromAscii(
-                    "readStream: is not a stream"),
+                throw mkException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                    "readStream: is not a stream")),
                     ucb::IOErrorCode_NO_FILE, i_rBaseURI + i_rPath, i_rPath);
             }
         } else {
@@ -587,8 +587,8 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl,
                 buf.append(dir).append(static_cast<sal_Unicode>('/'));
                 readStream(i_rImpl, xDir, rest, buf.makeStringAndClear() );
             } else {
-                throw mkException(::rtl::OUString::createFromAscii(
-                    "readStream: is not a directory"),
+                throw mkException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                    "readStream: is not a directory")),
                     ucb::IOErrorCode_NO_DIRECTORY, i_rBaseURI + dir, dir);
             }
         }
@@ -762,9 +762,9 @@ retry:
 
     if (rterr.hasValue()) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::loadMetadataFromStorage: "
-                "exception"), 0, rterr);
+                "exception")), 0, rterr);
     }
 
     if (err) {
@@ -877,8 +877,8 @@ throw (uno::RuntimeException)
     const IXmlIdRegistry * pReg(
         m_pImpl->m_rXmlIdRegistrySupplier.GetXmlIdRegistry() );
     if (!pReg) {
-        throw uno::RuntimeException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::getElementByXmlId: no registry"), *this);
+        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::getElementByXmlId: no registry")), *this);
     }
     return pReg->GetElementByMetadataReference(i_rReference);
 }
@@ -889,8 +889,8 @@ DocumentMetadataAccess::getElementByURI(
 throw (uno::RuntimeException, lang::IllegalArgumentException)
 {
     if (!i_xURI.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::getElementByURI: URI is null"), *this, 0);
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::getElementByURI: URI is null")), *this, 0);
     }
 
     const ::rtl::OUString baseURI( m_pImpl->m_xBaseURI->getStringValue() );
@@ -915,9 +915,9 @@ DocumentMetadataAccess::getMetadataGraphsWithType(
 throw (uno::RuntimeException, lang::IllegalArgumentException)
 {
     if (!i_xType.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::getMetadataGraphsWithType: "
-            "type is null"), *this, 0);
+            "type is null")), *this, 0);
     }
 
     ::comphelper::SequenceAsVector< uno::Reference< rdf::XURI > > ret;
@@ -938,21 +938,21 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     container::ElementExistException)
 {
     if (!isFileNameValid(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::addMetadataFile: invalid FileName"),
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::addMetadataFile: invalid FileName")),
             *this, 0);
     }
     if (isReservedFile(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::addMetadataFile:"
-            "invalid FileName: reserved"), *this, 0);
+            "invalid FileName: reserved")), *this, 0);
     }
     for (sal_Int32 i = 0; i < i_rTypes.getLength(); ++i) {
         if (!i_rTypes[i].is()) {
             throw lang::IllegalArgumentException(
-                ::rtl::OUString::createFromAscii(
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "DocumentMetadataAccess::addMetadataFile: "
-                    "null type"), *this, 2);
+                    "null type")), *this, 2);
         }
     }
 
@@ -963,8 +963,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         m_pImpl->m_xRepository->createGraph(xGraphName);
     } catch (rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
-                "DocumentMetadataAccess::addMetadataFile: exception"),
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "DocumentMetadataAccess::addMetadataFile: exception")),
             *this, uno::makeAny(e));
         // note: all other exceptions are propagated
     }
@@ -984,20 +984,20 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     container::ElementExistException, rdf::ParseException, io::IOException)
 {
     if (!isFileNameValid(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
-            "DocumentMetadataAccess::importMetadataFile: invalid FileName"),
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "DocumentMetadataAccess::importMetadataFile: invalid FileName")),
             *this, 0);
     }
     if (isReservedFile(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::importMetadataFile:"
-            "invalid FileName: reserved"), *this, 0);
+            "invalid FileName: reserved")), *this, 0);
     }
     for (sal_Int32 i = 0; i < i_rTypes.getLength(); ++i) {
         if (!i_rTypes[i].is()) {
             throw lang::IllegalArgumentException(
-                ::rtl::OUString::createFromAscii(
-                    "DocumentMetadataAccess::importMetadataFile: null type"),
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                    "DocumentMetadataAccess::importMetadataFile: null type")),
                 *this, 5);
         }
     }
@@ -1010,9 +1010,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             i_Format, i_xInStream, xGraphName, i_xBaseURI);
     } catch (rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::importMetadataFile: "
-                "RepositoryException"), *this, uno::makeAny(e));
+                "RepositoryException")), *this, uno::makeAny(e));
         // note: all other exceptions are propagated
     }
 
@@ -1031,9 +1031,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         m_pImpl->m_xRepository->destroyGraph(i_xGraphName);
     } catch (rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::removeMetadataFile: "
-                "RepositoryException"), *this, uno::makeAny(e));
+                "RepositoryException")), *this, uno::makeAny(e));
         // note: all other exceptions are propagated
     }
 
@@ -1048,15 +1048,15 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     container::ElementExistException)
 {
     if (!isFileNameValid(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::addContentOrStylesFile: "
-            "invalid FileName"), *this, 0);
+            "invalid FileName")), *this, 0);
     }
 
     if (!addContentOrStylesFileImpl(*m_pImpl, i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::addContentOrStylesFile: "
-            "invalid FileName: must end with content.xml or styles.xml"),
+            "invalid FileName: must end with content.xml or styles.xml")),
             *this, 0);
     }
 }
@@ -1068,9 +1068,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     container::NoSuchElementException)
 {
     if (!isFileNameValid(i_rFileName)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::removeContentOrStylesFile: "
-            "invalid FileName"), *this, 0);
+            "invalid FileName")), *this, 0);
     }
 
     try {
@@ -1083,9 +1083,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             uno::UNO_SET_THROW);
         if (!xEnum->hasMoreElements()) {
             throw container::NoSuchElementException(
-                ::rtl::OUString::createFromAscii(
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "DocumentMetadataAccess::removeContentOrStylesFile: "
-                    "cannot find stream in manifest graph: ") + i_rFileName,
+                    "cannot find stream in manifest graph: ")) + i_rFileName,
                 *this);
         }
 
@@ -1096,8 +1096,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         throw;
     } catch (uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
-                "DocumentMetadataAccess::removeContentOrStylesFile: exception"),
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "DocumentMetadataAccess::removeContentOrStylesFile: exception")),
             *this, uno::makeAny(e));
     }
 }
@@ -1110,25 +1110,25 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     lang::WrappedTargetException)
 {
     if (!i_xStorage.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromStorage: "
-            "storage is null"), *this, 0);
+            "storage is null")), *this, 0);
     }
     if (!i_xBaseURI.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromStorage: "
-            "base URI is null"), *this, 1);
+            "base URI is null")), *this, 1);
     }
     const ::rtl::OUString baseURI( i_xBaseURI->getStringValue());
     if (baseURI.indexOf('#') >= 0) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromStorage: "
-            "base URI not absolute"), *this, 1);
+            "base URI not absolute")), *this, 1);
     }
     if (!baseURI.getLength() || !baseURI.endsWithAsciiL("/", 1)) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromStorage: "
-            "base URI does not end with slash"), *this, 1);
+            "base URI does not end with slash")), *this, 1);
     }
 
     initLoading(*m_pImpl, i_xStorage, i_xBaseURI, i_xHandler);
@@ -1202,9 +1202,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         throw;
     } catch (uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "DocumentMetadataAccess::loadMetadataFromStorage: "
-                "exception"), *this, uno::makeAny(e));
+                "exception")), *this, uno::makeAny(e));
     }
 
     std::for_each(StgFiles.begin(), StgFiles.end(),
@@ -1221,9 +1221,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     lang::WrappedTargetException)
 {
     if (!i_xStorage.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::storeMetadataToStorage: "
-            "storage is null"), *this, 0);
+            "storage is null")), *this, 0);
     }
 
     // export manifest
@@ -1237,12 +1237,12 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     } catch (uno::RuntimeException &) {
         throw;
     } catch (io::IOException & e) {
-        throw lang::WrappedTargetException( ::rtl::OUString::createFromAscii(
-            "storeMetadataToStorage: IO exception"), *this, uno::makeAny(e));
+        throw lang::WrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            "storeMetadataToStorage: IO exception")), *this, uno::makeAny(e));
     } catch (uno::Exception & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
-                "storeMetadataToStorage: exception"), *this, uno::makeAny(e));
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "storeMetadataToStorage: exception")), *this, uno::makeAny(e));
     }
 
     // export metadata streams
@@ -1275,20 +1275,20 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
                 throw;
             } catch (io::IOException & e) {
                 throw lang::WrappedTargetException(
-                    ::rtl::OUString::createFromAscii(
-                        "storeMetadataToStorage: IO exception"),
+                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                        "storeMetadataToStorage: IO exception")),
                     *this, uno::makeAny(e));
             } catch (uno::Exception & e) {
                 throw lang::WrappedTargetRuntimeException(
-                    ::rtl::OUString::createFromAscii(
-                        "storeMetadataToStorage: exception"),
+                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                        "storeMetadataToStorage: exception")),
                     *this, uno::makeAny(e));
             }
         }
     } catch (rdf::RepositoryException & e) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString::createFromAscii(
-                "storeMetadataToStorage: exception"), *this, uno::makeAny(e));
+            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "storeMetadataToStorage: exception")), *this, uno::makeAny(e));
     }
 }
 
@@ -1308,9 +1308,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         md[ ::comphelper::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn;
     }
     if (!xIn.is() && URL.equalsAscii("")) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromMedium: "
-            "inalid medium: no URL, no input stream"), *this, 0);
+            "inalid medium: no URL, no input stream")), *this, 0);
     }
     uno::Reference<embed::XStorage> xStorage;
     try {
@@ -1329,14 +1329,14 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         throw;
     } catch (uno::Exception & e) {
         throw lang::WrappedTargetException(
-                ::rtl::OUString::createFromAscii(
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "DocumentMetadataAccess::loadMetadataFromMedium: "
-                    "exception"), *this, uno::makeAny(e));
+                    "exception")), *this, uno::makeAny(e));
     }
     if (!xStorage.is()) {
-        throw uno::RuntimeException(::rtl::OUString::createFromAscii(
+        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::loadMetadataFromMedium: "
-            "cannot get Storage"), *this);
+            "cannot get Storage")), *this);
     }
     uno::Reference<rdf::XURI> xBaseURI;
     try {
@@ -1364,9 +1364,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     ::rtl::OUString URL;
     md[ ::comphelper::MediaDescriptor::PROP_URL() ] >>= URL;
     if (URL.equalsAscii("")) {
-        throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii(
+        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::storeMetadataToMedium: "
-            "invalid medium: no URL"), *this, 0);
+            "invalid medium: no URL")), *this, 0);
     }
 
     SfxMedium aMedium(i_rMedium);
@@ -1383,9 +1383,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     }
 
     if (!xStorage.is()) {
-        throw uno::RuntimeException(::rtl::OUString::createFromAscii(
+        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
             "DocumentMetadataAccess::storeMetadataToMedium: "
-            "cannot get Storage"), *this);
+            "cannot get Storage")), *this);
     }
     // set MIME type of the storage
     ::comphelper::MediaDescriptor::const_iterator iter
diff --git a/sfx2/source/doc/applet.cxx b/sfx2/source/doc/applet.cxx
index 54aa44e..56b8072 100644
--- a/sfx2/source/doc/applet.cxx
+++ b/sfx2/source/doc/applet.cxx
@@ -138,8 +138,8 @@ AppletObject::getSupportedServiceNames()
 AppletObject::impl_getStaticSupportedServiceNames()
 {
     ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [0] = ::rtl::OUString::createFromAscii(
-        "com.sun.star.embed.SpecialEmbeddedObject" );
+    seqServiceNames.getArray() [0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        "com.sun.star.embed.SpecialEmbeddedObject" ));
     return seqServiceNames ;
 }
 
@@ -154,8 +154,8 @@ AppletObject::impl_createInstance(
 
 ::rtl::OUString AppletObject::impl_getStaticImplementationName()
 {
-    return ::rtl::OUString::createFromAscii(
-        "com.sun.star.comp.sfx2.AppletObject" );
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        "com.sun.star.comp.sfx2.AppletObject" ));
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 3f7141f..34a0d37 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -2331,8 +2331,8 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle,
     // now get the content of the region
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString > aProps(2);
-    aProps[0] = OUString::createFromAscii( TITLE );
-    aProps[1] = OUString::createFromAscii( TARGET_URL );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
+    aProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( TARGET_URL ));
 
     try
     {
@@ -2368,7 +2368,7 @@ void SfxDocTemplate_Impl::CreateFromHierarchy( Content &rTemplRoot )
 {
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString > aProps(1);
-    aProps[0] = OUString::createFromAscii( TITLE );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
 
     try
     {
@@ -2476,7 +2476,7 @@ void SfxDocTemplate_Impl::GetTemplates( Content& rTargetFolder,
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString >    aProps(1);
 
-    aProps[0] = OUString::createFromAscii( TITLE );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
 
     try
     {
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index d4a7d1c..ea9f3c9 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1600,7 +1600,7 @@ sal_Bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
         uno::Reference< XResultSet > xResultSet;
         Sequence< OUString > aProps( 1 );
 
-        aProps[0] = OUString::createFromAscii( TARGET_URL );
+        aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TARGET_URL ));
 
         try
         {
@@ -1717,7 +1717,7 @@ sal_Bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
         uno::Reference< XResultSet > xResultSet;
         Sequence< OUString > aProps( 1 );
 
-        aProps[0] = OUString::createFromAscii( TARGET_URL );
+        aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TARGET_URL ));
         ResultSetInclude eInclude = INCLUDE_DOCUMENTS_ONLY;
         xResultSet = aGroup.createCursor( aProps, eInclude );
 
@@ -2432,9 +2432,9 @@ void SfxDocTplService_Impl::addHierGroup( GroupList_Impl& rList,
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString >    aProps(3);
 
-    aProps[0] = OUString::createFromAscii( TITLE );
-    aProps[1] = OUString::createFromAscii( TARGET_URL );
-    aProps[2] = OUString::createFromAscii( PROPERTY_TYPE );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
+    aProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( TARGET_URL ));
+    aProps[2] = OUString(RTL_CONSTASCII_USTRINGPARAM( PROPERTY_TYPE ));
 
     try
     {
@@ -2538,7 +2538,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
     Content                 aContent;
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString >    aProps(1);
-    aProps[0] = OUString::createFromAscii( TITLE );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
 
     try
     {
@@ -2606,7 +2606,7 @@ void SfxDocTplService_Impl::createFromContent( GroupList_Impl& rList,
 
     uno::Reference< XResultSet > xResultSet;
     Sequence< OUString > aProps(1);
-    aProps[0] = OUString::createFromAscii( TITLE );
+    aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
 
     try
     {


More information about the Libreoffice-commits mailing list