Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


With this patch I think there are no more misuses of createFromAscii in the
base repository.

It is released under MPL 1.1 / GPLv3+ / LGPLv3+

-- 
Santiago Alessandri
From 23bf6c3ca93c68e50c0a1f5e08ddd05c38db64b5 Mon Sep 17 00:00:00 2001
From: Santiago Alessandri <salessandri@nasel.com.ar>
Date: Sat, 13 Nov 2010 12:48:57 -0300
Subject: [PATCH] Replaced all createFromAscii with macro RTL_CONSTASCII_USTRINGPARAM in base

---
 reportdesign/source/core/api/ReportDefinition.cxx |    6 +++---
 reportdesign/source/filter/xml/dbloader2.cxx      |    2 +-
 reportdesign/source/filter/xml/xmlExport.cxx      |   20 ++++++++++----------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 0a1e08b..1cbe0ef 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2283,7 +2283,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( 
co
     ::osl::MutexGuard aGuard(m_aMutex);
     ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
     uno::Reference< drawing::XShape > xShape;
-    if ( aServiceSpecifier.indexOf( ::rtl::OUString::createFromAscii("com.sun.star.report.") ) == 
0 )
+    if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.")) ) == 0 )
     {
         if ( aServiceSpecifier == SERVICE_SHAPE )
             xShape.set(SvxUnoDrawMSFactory::createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")) 
),uno::UNO_QUERY_THROW);
@@ -2295,7 +2295,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( 
co
         else
             xShape.set(SvxUnoDrawMSFactory::createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) 
),uno::UNO_QUERY_THROW);
     }
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.form.component.") ) == 0 )
+    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) ) == 0 )
     {
         
xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY);
     }
@@ -2761,7 +2761,7 @@ uno::Reference< frame::XUntitledNumbers > 
OReportDefinition::impl_getUntitledHel
         m_pImpl->m_xNumberedControllers = uno::Reference< frame::XUntitledNumbers >(static_cast< 
::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
 
         pHelper->setOwner          (xThis);
-        pHelper->setUntitledPrefix (::rtl::OUString::createFromAscii(" : "));
+        pHelper->setUntitledPrefix (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : ")));
     }
 
     return m_pImpl->m_xNumberedControllers;
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx 
b/reportdesign/source/filter/xml/dbloader2.cxx
index b029a0d..8cfac9f 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -116,7 +116,7 @@ Sequence< ::rtl::OUString > SAL_CALL ORptTypeDetection::getSupportedServiceNames
 Sequence< ::rtl::OUString > ORptTypeDetection::getSupportedServiceNames_Static(void) throw( 
RuntimeException )
 {
     Sequence< ::rtl::OUString > aSNS( 1 );
-    aSNS.getArray()[0] = 
::rtl::OUString::createFromAscii("com.sun.star.document.ExtendedTypeDetection");
+    aSNS.getArray()[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExtendedTypeDetection"));
     return aSNS;
 }
 // -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index a99de7c..8c49955 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -88,13 +88,13 @@ namespace rptxml
     //---------------------------------------------------------------------
     ::rtl::OUString ORptExportHelper::getImplementationName_Static(  ) throw (RuntimeException)
     {
-        return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLSettingsExporter");
+        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLSettingsExporter"));
     }
     //---------------------------------------------------------------------
     Sequence< ::rtl::OUString > ORptExportHelper::getSupportedServiceNames_Static(  ) 
throw(RuntimeException)
     {
         Sequence< ::rtl::OUString > aSupported(1);
-        aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+        aSupported[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
         return aSupported;
     }
     //---------------------------------------------------------------------
@@ -105,13 +105,13 @@ namespace rptxml
     //---------------------------------------------------------------------
     ::rtl::OUString ORptContentExportHelper::getImplementationName_Static(  ) throw 
(RuntimeException)
     {
-        return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLContentExporter");
+        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLContentExporter"));
     }
     //---------------------------------------------------------------------
     Sequence< ::rtl::OUString > ORptContentExportHelper::getSupportedServiceNames_Static(  ) 
throw(RuntimeException)
     {
         Sequence< ::rtl::OUString > aSupported(1);
-        aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+        aSupported[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
         return aSupported;
     }
 
@@ -124,13 +124,13 @@ namespace rptxml
     //---------------------------------------------------------------------
     ::rtl::OUString ORptStylesExportHelper::getImplementationName_Static(  ) throw 
(RuntimeException)
     {
-        return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLStylesExporter");
+        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLStylesExporter"));
     }
     //---------------------------------------------------------------------
     Sequence< ::rtl::OUString > ORptStylesExportHelper::getSupportedServiceNames_Static(  ) 
throw(RuntimeException)
     {
         Sequence< ::rtl::OUString > aSupported(1);
-        aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+        aSupported[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
         return aSupported;
     }
 
@@ -142,13 +142,13 @@ namespace rptxml
     //---------------------------------------------------------------------
     ::rtl::OUString ORptMetaExportHelper::getImplementationName_Static(  ) throw (RuntimeException)
     {
-        return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLMetaExporter");
+        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLMetaExporter"));
     }
     //---------------------------------------------------------------------
     Sequence< ::rtl::OUString > ORptMetaExportHelper::getSupportedServiceNames_Static(  ) 
throw(RuntimeException)
     {
         Sequence< ::rtl::OUString > aSupported(1);
-        aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+        aSupported[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
         return aSupported;
     }
     
@@ -160,13 +160,13 @@ namespace rptxml
     //---------------------------------------------------------------------
     ::rtl::OUString ODBFullExportHelper::getImplementationName_Static(  ) throw (RuntimeException)
     {
-        return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.XMLFullExporter");
+        return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLFullExporter"));
     }
     //---------------------------------------------------------------------
     Sequence< ::rtl::OUString > ODBFullExportHelper::getSupportedServiceNames_Static(  ) 
throw(RuntimeException)
     {
         Sequence< ::rtl::OUString > aSupported(1);
-        aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.document.ExportFilter");
+        aSupported[0] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter"));
         return aSupported;
     }
     
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.