Hello,

Here's a patch for calc
I think it's the last one for "calc" since i haven't seen other "createFromAscii" to remove which concerned litterals.

In datefunc, i tried to use the syntax :

rtl::OUString foo(RTL_CONSTASCII_STRINGPARAM("foo"));

-            OUString aImpl = OUString::createFromAscii( "/" );
+            OUString aImpl(RTL_CONSTASCII_USTRINGPARAM( "/" ));

Hope it's ok and there wasn't other i missed.

Julien.
(LGPLv3+ / MPL)
diff --git a/scaddins/source/analysis/analysishelper.cxx 
b/scaddins/source/analysis/analysishelper.cxx
index bfebe6d..bf3c0f4 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2850,7 +2850,7 @@ ScaAnyConverter::ScaAnyConverter( const uno::Reference< 
lang::XMultiServiceFacto
     if( xServiceFact.is() )
     {
         uno::Reference< uno::XInterface > xInstance = 
xServiceFact->createInstance(
-            OUString::createFromAscii( "com.sun.star.util.NumberFormatter" ) );
+            OUString(RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.util.NumberFormatter" )) );
         xFormatter = uno::Reference< util::XNumberFormatter >( xInstance, 
uno::UNO_QUERY );
     }
 }
diff --git a/scaddins/source/datefunc/datefunc.cxx 
b/scaddins/source/datefunc/datefunc.cxx
index 8a4f6a9..e350bc2 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -250,9 +250,9 @@ sal_Bool SAL_CALL component_writeInfo(
     {
         try
         {
-            OUString aImpl = OUString::createFromAscii( "/" );
+            OUString aImpl(RTL_CONSTASCII_USTRINGPARAM( "/" ));
             aImpl += ScaDateAddIn::getImplementationName_Static();
-            aImpl += OUString::createFromAscii( "/UNO/SERVICES" );
+            aImpl += OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ));
 
             uno::Reference< registry::XRegistryKey > xNewKey(
                 reinterpret_cast< registry::XRegistryKey* >( pRegistryKey 
)->createKey( aImpl ) );
@@ -401,15 +401,15 @@ OUString ScaDateAddIn::GetFuncDescrStr( sal_uInt16 
nResId, sal_uInt16 nStrIndex
 
 OUString ScaDateAddIn::getImplementationName_Static()
 {
-    return OUString::createFromAscii( MY_IMPLNAME );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( MY_IMPLNAME ));
 }
 
 uno::Sequence< OUString > ScaDateAddIn::getSupportedServiceNames_Static()
 {
     uno::Sequence< OUString > aRet( 2 );
     OUString* pArray = aRet.getArray();
-    pArray[0] = OUString::createFromAscii( ADDIN_SERVICE );
-    pArray[1] = OUString::createFromAscii( MY_SERVICE );
+    pArray[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( ADDIN_SERVICE ));
+    pArray[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( MY_SERVICE ));
     return aRet;
 }
 
@@ -418,7 +418,7 @@ uno::Sequence< OUString > 
ScaDateAddIn::getSupportedServiceNames_Static()
 OUString SAL_CALL ScaDateAddIn::getServiceName() throw( uno::RuntimeException )
 {
     // name of specific AddIn service
-    return OUString::createFromAscii( MY_SERVICE );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( MY_SERVICE ));
 }
 
 // XServiceInfo
@@ -711,7 +711,7 @@ sal_Int32 GetNullDate( const uno::Reference< 
beans::XPropertySet >& xOptions )
         try
         {
             uno::Any aAny = xOptions->getPropertyValue(
-                                        OUString::createFromAscii( "NullDate" 
) );
+                                        OUString(RTL_CONSTASCII_USTRINGPARAM( 
"NullDate" )) );
             util::Date aDate;
             if ( aAny >>= aDate )
                 return DateToDays( aDate.Day, aDate.Month, aDate.Year );
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index 380728e..fff803e 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -559,13 +559,13 @@ void SAL_CALL SolverComponent::solve() 
throw(uno::RuntimeException)
 uno::Sequence< OUString > SolverComponent_getSupportedServiceNames()
 {
     uno::Sequence< OUString > aServiceNames( 1 );
-    aServiceNames[ 0 ] = OUString::createFromAscii( 
"com.sun.star.sheet.Solver" );
+    aServiceNames[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.sheet.Solver" ));
     return aServiceNames;
 }
 
 OUString SolverComponent_getImplementationName()
 {
-    return OUString::createFromAscii( "com.sun.star.comp.Calc.Solver" );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( 
"com.sun.star.comp.Calc.Solver" ));
 }
 
 OUString SAL_CALL SolverComponent::getImplementationName() 
throw(uno::RuntimeException)
@@ -614,7 +614,7 @@ extern "C"
                 sal_Int32                              nPos;
 
                 xNewKey = reinterpret_cast< registry::XRegistryKey * >( 
pRegistryKey )->createKey( SolverComponent_getImplementationName() );
-                xNewKey = xNewKey->createKey( OUString::createFromAscii( 
"/UNO/SERVICES" ) );
+                xNewKey = xNewKey->createKey( 
OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )) );
                 const uno::Sequence< OUString > & rSNL1 = 
SolverComponent_getSupportedServiceNames();
                 const OUString * pArray1 = rSNL1.getConstArray();
                 for ( nPos = rSNL1.getLength(); nPos--; )
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to