[Libreoffice-commits] .: sc/qa sc/source

David Tardon dtardon at kemper.freedesktop.org
Tue Nov 2 01:19:58 PDT 2010


 sc/qa/unit/ucalc.cxx               |    4 +-
 sc/source/core/data/dpoutput.cxx   |   30 +++++++++----------
 sc/source/ui/docshell/docsh3.cxx   |    4 +-
 sc/source/ui/vba/service.cxx       |   28 ++++++++---------
 sc/source/ui/vba/vbafilesearch.cxx |   12 +++----
 sc/source/ui/vba/vbaglobals.cxx    |    6 +--
 sc/source/ui/vba/vbahelper.cxx     |    6 +--
 sc/source/ui/vba/vbapagesetup.cxx  |    2 -
 sc/source/ui/vba/vbapropvalue.hxx  |    2 -
 sc/source/ui/vba/vbarange.cxx      |   58 ++++++++++++++++++-------------------
 sc/source/ui/view/cellsh1.cxx      |   12 +++----
 sc/source/ui/view/cellsh2.cxx      |    2 -
 sc/source/ui/view/formatsh.cxx     |    2 -
 sc/source/ui/view/gridwin2.cxx     |    2 -
 sc/source/ui/view/prevwsh.cxx      |    2 -
 sc/source/ui/view/tabvwsh4.cxx     |    2 -
 sc/source/ui/view/tabvwshg.cxx     |    8 ++---
 17 files changed, 90 insertions(+), 92 deletions(-)

New commits:
commit cab7e33c4ff6067486b745ebfc0b37ed1d6d18b7
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Tue Nov 2 09:18:15 2010 +0100

    replace use RTL_CONSTASCII_USTRINGPARAM

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f024881..4fbdbdd 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -80,13 +80,13 @@ void Test::createDocument()
 {
     ScDocument *doc = new ScDocument();
     
-    rtl::OUString aTabName = rtl::OUString::createFromAscii ("foo");
+    rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM( ("foo") );
     CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
                             doc->InsertTab (0, aTabName));
     double val = 1;
     doc->SetValue (0, 0, 0, val);
     doc->SetValue (0, 1, 0, val);
-    doc->SetString (0, 2, 0, rtl::OUString::createFromAscii ("=SUM(A1:A2)"));
+    doc->SetString (0, 2, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=SUM(A1:A2)")));
     doc->CalcAll();
     double result;
     doc->GetValue (0, 2, 0, result);
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 3d22355..9cf9ce2 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -215,14 +215,14 @@ void lcl_FillNumberFormats( UINT32*& rFormats, long& rCount,
             {
                 sheet::DataPilotFieldOrientation eDimOrient =
                     (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
-                        xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+                        xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
                         sheet::DataPilotFieldOrientation_HIDDEN );
                 if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
                 {
                     aDataNames[nDataCount] = String( xDimName->getName() );
                     long nFormat = ScUnoHelpFunctions::GetLongProperty(
                                             xDimProp,
-                                            rtl::OUString::createFromAscii(DP_PROP_NUMBERFORMAT) );
+                                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_NUMBERFORMAT)) );
                     nDataFormats[nDataCount] = nFormat;
                     if ( nFormat != 0 )
                         bAnySet = TRUE;
@@ -282,13 +282,13 @@ UINT32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAccess>&
         {
             sheet::DataPilotFieldOrientation eDimOrient =
                 (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
-                    xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+                    xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
                     sheet::DataPilotFieldOrientation_HIDDEN );
             if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
             {
                 long nFormat = ScUnoHelpFunctions::GetLongProperty(
                                         xDimProp,
-                                        rtl::OUString::createFromAscii(DP_PROP_NUMBERFORMAT) );
+                                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_NUMBERFORMAT)) );
 
                 return nFormat;     // use format from first found data dimension
             }
@@ -330,7 +330,7 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer
         {
             //! merge with ScDPDimension::setPropertyValue?
 
-            uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString::createFromAscii(DP_PROP_FILTER) );
+            uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FILTER)) );
 
             uno::Sequence<sheet::TableFilterField> aSeq;
             if (aValue >>= aSeq)
@@ -402,13 +402,13 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
             {
                 sheet::DataPilotFieldOrientation eDimOrient =
                     (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
-                        xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+                        xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
                         sheet::DataPilotFieldOrientation_HIDDEN );
                 long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp,
-                        rtl::OUString::createFromAscii(DP_PROP_POSITION) );
+                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_POSITION)) );
                 BOOL bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
                                                 xDimProp,
-                                                rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) );
+                                                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) );
                 bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty(
                     xDimProp, OUString::createFromAscii(SC_UNO_HAS_HIDDEN_MEMBER));
 
@@ -418,7 +418,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                             new ScNameToIndexAccess( xDimSupp->getHierarchies() );
                     long nHierarchy = ScUnoHelpFunctions::GetLongProperty(
                                             xDimProp,
-                                            rtl::OUString::createFromAscii(DP_PROP_USEDHIERARCHY) );
+                                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_USEDHIERARCHY)) );
                     if ( nHierarchy >= xHiers->getCount() )
                         nHierarchy = 0;
 
@@ -1101,12 +1101,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
 
     uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
     BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
-                                         rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) );
+                                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_COLUMNGRAND)) );
     if ( bColGrand )
         rGrandTotalCols = 1;    // default if data layout not in columns
 
     BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
-                                         rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) );
+                                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ROWGRAND)) );
     if ( bRowGrand )
         rGrandTotalRows = 1;    // default if data layout not in rows
 
@@ -1127,10 +1127,10 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
             {
                 sheet::DataPilotFieldOrientation eDimOrient =
                     (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
-                        xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+                        xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ORIENTATION)),
                         sheet::DataPilotFieldOrientation_HIDDEN );
                 if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp,
-                                         rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ) )
+                                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_ISDATALAYOUT)) ) )
                 {
                     rDataLayoutIndex = nDim;
                     rDataOrient = eDimOrient;
@@ -1450,7 +1450,7 @@ uno::Sequence<sheet::GeneralFunction> lcl_GetSubTotals(
     {
         try
         {
-            uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString::createFromAscii(DP_PROP_SUBTOTALS) );
+            uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_SUBTOTALS)) );
             aValue >>= aSubTotals;
         }
         catch(uno::Exception&)
@@ -1707,7 +1707,7 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName,
         //! Should use a stored name when available
 
         sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
-                                xDimProp, rtl::OUString::createFromAscii(DP_PROP_FUNCTION),
+                                xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(DP_PROP_FUNCTION)),
                                 sheet::GeneralFunction_NONE );
         rGivenName = lcl_GetDataFieldName( rSourceName, eFunc );
     }
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 9af5d77..543e4c9 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1221,7 +1221,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
     }
 
 #if DEBUG_CHANGETRACK
-    ::rtl::OUString aMessage = ::rtl::OUString::createFromAscii( "\nbefore merge:\n" );
+    ::rtl::OUString aMessage(RTL_CONSTASCII_USTRINGPARAM( "\nbefore merge:\n" ));
     aMessage += pThisTrack->ToString();
     ::rtl::OString aMsg = ::rtl::OUStringToOString( aMessage, RTL_TEXTENCODING_UTF8 );
     OSL_ENSURE( false, aMsg.getStr() );
@@ -1398,7 +1398,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
     }
 
 #if DEBUG_CHANGETRACK
-    aMessage = ::rtl::OUString::createFromAscii( "\nafter merge:\n" );
+    aMessage = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\nafter merge:\n" ));
     aMessage += pThisTrack->ToString();
     aMsg = ::rtl::OUStringToOString( aMessage, RTL_TEXTENCODING_UTF8 );
     OSL_ENSURE( false, aMsg.getStr() );
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 875424f..036f0d3 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ namespace  worksheet
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
-namespace window 
+namespace window
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
@@ -59,11 +59,11 @@ namespace globals
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
-namespace hyperlink 
+namespace hyperlink
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
-namespace application 
+namespace application
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
@@ -71,27 +71,27 @@ namespace vbaeventshelper
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
-namespace textframe 
+namespace textframe
 {
 extern sdecl::ServiceDecl const serviceDecl;
 }
 
 extern "C"
 {
-    SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( 
+    SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
         const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
     {
         OSL_TRACE("In component_getImplementationEnv");
         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
     }
 
-    SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( 
+    SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
         lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
     {
         OSL_TRACE("In component_writeInfo");
 #if 0
     // Component registration
-        if ( component_writeInfoHelper( pServiceManager, pRegistryKey, 
+        if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
         range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) )
         {
             // Singleton registration
@@ -101,9 +101,9 @@ extern "C"
                     reinterpret_cast< registry::XRegistryKey * >(pRegistryKey);
 
                 Reference< registry::XRegistryKey >xKey = pKey->createKey(
-                    rtl::OUString::createFromAscii( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") ) );
-                xKey->setStringValue( ::rtl::OUString::createFromAscii( 
-                    ("ooo.vba.Globals") ) );
+                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") )) );
+                xKey->setStringValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                    ("ooo.vba.Globals") )) );
                 return sal_True;
             }
             catch( uno::Exception& /*e*/ )
@@ -114,13 +114,13 @@ extern "C"
         return sal_False;
 #else
     // Component registration
-        return component_writeInfoHelper( pServiceManager, pRegistryKey, 
+        return component_writeInfoHelper( pServiceManager, pRegistryKey,
         range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl );
 #endif
-    
+
     }
 
-    SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( 
+    SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
         const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
         registry::XRegistryKey * pRegistryKey )
     {
diff --git a/sc/source/ui/vba/vbafilesearch.cxx b/sc/source/ui/vba/vbafilesearch.cxx
index 6df035c..761058b 100644
--- a/sc/source/ui/vba/vbafilesearch.cxx
+++ b/sc/source/ui/vba/vbafilesearch.cxx
@@ -56,7 +56,7 @@ static Reference< XSimpleFileAccess3 > getFileAccess( void )
         if( xSMgr.is() )
         {
             xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
-                ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+                ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY );
         }
     }
     return xSFI;
@@ -171,7 +171,7 @@ sal_Int32 SAL_CALL ScVbaFileSearch::Execute( )  throw (css::uno::RuntimeExceptio
         return 0;
     }
 
-    if ( m_sFileName == ::rtl::OUString::createFromAscii( "" ) )
+    if ( m_sFileName == ::rtl::OUString() )
     {
         return 1;
     }
@@ -180,15 +180,15 @@ sal_Int32 SAL_CALL ScVbaFileSearch::Execute( )  throw (css::uno::RuntimeExceptio
     if ( IsWildCard( aTempFileName ) )
     {
         bool bEndWithAsterisk = aTempFileName.endsWithAsciiL("*", 1);
-        bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString::createFromAscii("*")) == 0);
+        bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"))) == 0);
         if ( !bEndWithAsterisk && !bStartWithAsterisk )
         {
-            aTempFileName = ::rtl::OUString::createFromAscii("*") + aTempFileName + ::rtl::OUString::createFromAscii("*");
+            aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
         }
     }
     else
     {
-        aTempFileName = ::rtl::OUString::createFromAscii("*") + aTempFileName + ::rtl::OUString::createFromAscii("*");
+        aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
     }
     WildCard wildCard( aTempFileName );
     SearchWildCard( wildCard, m_sLookIn, m_bSearchSubFolders, m_aSearchedFiles );
@@ -211,7 +211,7 @@ sal_Int32 SAL_CALL ScVbaFileSearch::Execute( )  throw (css::uno::RuntimeExceptio
 
 void SAL_CALL ScVbaFileSearch::NewSearch( )  throw (css::uno::RuntimeException)
 {
-    m_sFileName = ::rtl::OUString::createFromAscii( "" );
+    m_sFileName = ::rtl::OUString();
     m_sLookIn = getInitPath();
     m_bSearchSubFolders = false;
     m_bMatchTextExactly = false;
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index b3e56cd..89443ad 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -57,7 +57,7 @@ ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Referen
     OSL_TRACE("ScVbaGlobals::ScVbaGlobals()");
 
         uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
-        aInitArgs[ 0 ].Name = rtl::OUString::createFromAscii("Application");
+        aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application"));
         aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
         aInitArgs[ 1 ].Name = sDocCtxName;
         aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
@@ -101,8 +101,8 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
         return xWorkbook;
     }
 // FIXME check if this is correct/desired behavior
-    throw uno::RuntimeException( rtl::OUString::createFromAscii(
-        "No activeWorkbook available" ), Reference< uno::XInterface >() );
+    throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        "No activeWorkbook available" )), Reference< uno::XInterface >() );
 }
 
 
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index bc1b07d..4600bca 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -82,7 +82,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
     if( !xIntrospection.is() )
     {
         uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
-        xIntrospection.set( xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection") ), uno::UNO_QUERY_THROW );
+        xIntrospection.set( xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("com.sun.star.beans.Introspection")) ), uno::UNO_QUERY_THROW );
     }
     return xIntrospection->inspect( aObject );
 }
@@ -279,7 +279,7 @@ getCurrentDocument() throw (uno::RuntimeException)
             // test if vba service is present
             uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
             uno::Reference<lang::XMultiComponentFactory > xSMgr( xCtx->getServiceManager(), uno::UNO_QUERY_THROW );
-            uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx), uno::UNO_QUERY_THROW );
+            uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(("com.sun.star.frame.Desktop")), xCtx), uno::UNO_QUERY_THROW );
             xModel.set( xDesktop->getCurrentComponent(), uno::UNO_QUERY );
             if ( !xModel.is() )
             {
@@ -531,7 +531,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
                 break;
             }
         default:
-                   throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid type, can't convert" ), uno::Reference< uno::XInterface >() );
+                   throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(( "Invalid type, can't convert" )), uno::Reference< uno::XInterface >() );
     }
     return sString;
 }
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index c80e407..0e2ae31 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -101,7 +101,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw
 {
     uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
     if( rAreas.getLength() == 0 ||
-        rAreas.equalsIgnoreAsciiCase ( rtl::OUString::createFromAscii("FALSE") ) )
+        rAreas.equalsIgnoreAsciiCase ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FALSE")) ) )
     {
         // print the whole sheet
         uno::Sequence< table::CellRangeAddress > aSeq;
diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx
index 51608e8..b699861 100644
--- a/sc/source/ui/vba/vbapropvalue.hxx
+++ b/sc/source/ui/vba/vbapropvalue.hxx
@@ -52,7 +52,7 @@ public:
     virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
     virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
 
-    rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+    rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
 
 };
 #endif //SC_VBA_PROPVALULE_HXX
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index c9dce62..84949a3 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -263,7 +263,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException
         return ScCellRangesBase::getImplementation( mxRanges );
     if( mxRange.is() )
         return ScCellRangesBase::getImplementation( mxRange );
-    throw uno::RuntimeException( rtl::OUString::createFromAscii("General Error creating range - Unknown" ), uno::Reference< uno::XInterface >() );
+    throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("General Error creating range - Unknown" )), uno::Reference< uno::XInterface >() );
 }
 
 ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
@@ -510,7 +510,7 @@ public:
     {
         uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
         sal_Int16 nType = ::comphelper::getINT16(
-            xNumberProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Type" ) ) );
+            xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Type" )) ) );
         return nType;
     }
 
@@ -518,7 +518,7 @@ public:
     {
         lang::Locale aLocale;
         uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
-        xNumProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Locale" ) ) >>= aLocale;
+        xNumProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
         sal_Int32 nNewIndex = mxFormats->queryKey(rFormat, aLocale, false );
         if ( nNewIndex == -1 ) // format not defined
         {
@@ -532,7 +532,7 @@ public:
     {
         uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
         lang::Locale aLocale;
-        xNumberProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Locale" ) ) >>= aLocale;
+        xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
         uno::Reference<util::XNumberFormatTypes> xTypes( mxFormats, uno::UNO_QUERY );
         if ( xTypes.is() )
         {
@@ -919,7 +919,7 @@ public:
 
 };
 
-const static rtl::OUString sNA = rtl::OUString::createFromAscii("#N/A");
+const static rtl::OUString sNA(RTL_CONSTASCII_USTRINGPARAM("#N/A"));
 
 class Dim1ArrayValueSetter : public ArrayVisitor
 {
@@ -1482,10 +1482,10 @@ uno::Any SAL_CALL ScVbaRange::getName() throw (uno::RuntimeException)
     uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
     if ( !xModel.is() )
     {
-        throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid document" ), uno::Reference< uno::XInterface >() );
+        throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid document" )), uno::Reference< uno::XInterface >() );
     }
     uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
-    uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
+    uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRanges"))) , uno::UNO_QUERY_THROW );
 
     uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
     sal_Int32 nCount = xNames->getCount();
@@ -2408,7 +2408,7 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
             throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
 
         if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
         // return a normal range ( even for multi-selection
         uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
         return new ScVbaRange( mxParent, mxContext, xRange, true  );
@@ -2455,7 +2455,7 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
             throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
 
         if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
     }
     // Columns() - no params
     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
@@ -3224,7 +3224,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
                         throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookIn." )) , uno::Reference< uno::XInterface >() );
                 }
                 newOptions.SetCellType( nSearchType );
-                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchType" ), uno::makeAny( nSearchType ) );
+                xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchType" )), uno::makeAny( nSearchType ) );
             }
         }
 
@@ -3273,7 +3273,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
                 else
                     throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchDirection" )) , uno::Reference< uno::XInterface >() );
                 newOptions.SetBackward( bSearchBackwards );
-                xDescriptor->setPropertyValue( rtl::OUString::createFromAscii( "SearchBackwards" ), uno::makeAny( bSearchBackwards ) );
+                xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchBackwards" )), uno::makeAny( bSearchBackwards ) );
             }
         }
 
@@ -4789,7 +4789,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( Destination.hasValue() )
     {
         if( !( Destination >>= xRange ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Destination parameter should be a range" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Destination parameter should be a range" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set range\n");
     }
@@ -4804,7 +4804,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if ( DataType.hasValue() )
     {
         if( !( DataType >>= xlTextParsingType ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "DataType parameter should be a short" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataType parameter should be a short" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set Datatype\n" );
     }
@@ -4814,7 +4814,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( TextQualifier.hasValue() )
     {
         if( !( TextQualifier >>= xlTextQualifier ))
-             throw uno::RuntimeException( rtl::OUString::createFromAscii( "TextQualifier parameter should be a short" ),
+             throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TextQualifier parameter should be a short" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set TextQualifier\n");
     }
@@ -4823,7 +4823,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( ConsecutiveDelimiter.hasValue() )
     {
         if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "ConsecutiveDelimiter parameter should be a boolean" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ConsecutiveDelimiter parameter should be a boolean" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set ConsecutiveDelimiter\n");
     }
@@ -4832,7 +4832,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( Tab.hasValue() && bDilimited )
     {
         if( !( Tab >>= bTab ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Tab parameter should be a boolean" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Tab parameter should be a boolean" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set Tab\n");
     }
@@ -4841,7 +4841,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( Semicolon.hasValue() && bDilimited )
     {
         if( !( Semicolon >>= bSemicolon ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Semicolon parameter should be a boolean" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Semicolon parameter should be a boolean" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set Semicolon\n");
     }
@@ -4849,7 +4849,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( Comma.hasValue() && bDilimited )
     {
         if( !( Comma >>= bComma ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Comma parameter should be a boolean" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Comma parameter should be a boolean" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set Comma\n");
     }
@@ -4857,7 +4857,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( Space.hasValue() && bDilimited )
     {
         if( !( Space >>= bSpace ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Space parameter should be a boolean" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Space parameter should be a boolean" )),
                     uno::Reference< uno::XInterface >() );
         OSL_TRACE("set Space\n");
     }
@@ -4869,12 +4869,12 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
         {
             if( OtherChar.hasValue() )
                 if( !( OtherChar >>= sOtherChar ) )
-                    throw uno::RuntimeException( rtl::OUString::createFromAscii( "OtherChar parameter should be a String" ),
+                    throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OtherChar parameter should be a String" )),
                         uno::Reference< uno::XInterface >() );
         OSL_TRACE("set OtherChar\n" );
         }
      else if( bOther )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "Other parameter should be a True" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Other parameter should be a True" )),
                     uno::Reference< uno::XInterface >() );
     }
     // FieldInfo, Optional Variant. An array containing parse information for the individual columns of data.
@@ -4889,7 +4889,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( DecimalSeparator.hasValue() )
     {
         if( !( DecimalSeparator >>= sDecimalSeparator ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "DecimalSeparator parameter should be a String" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DecimalSeparator parameter should be a String" )),
                 uno::Reference< uno::XInterface >() );
         OSL_TRACE("set DecimalSeparator\n" );
     }
@@ -4897,7 +4897,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
     if( ThousandsSeparator.hasValue() )
     {
         if( !( ThousandsSeparator >>= sThousandsSeparator ) )
-            throw uno::RuntimeException( rtl::OUString::createFromAscii( "ThousandsSeparator parameter should be a String" ),
+            throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ThousandsSeparator parameter should be a String" )),
                 uno::Reference< uno::XInterface >() );
         OSL_TRACE("set ThousandsSpeparator\n" );
     }
@@ -5289,9 +5289,9 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
 
     Data >>= xIntRes;
     uno::Reference< script::XInvocation > xInvRes(xIntRes, uno::UNO_QUERY_THROW);
-    rtl::OUString oMoveNext = rtl::OUString::createFromAscii("MoveNext") ;
-    rtl::OUString oEof  = rtl::OUString::createFromAscii("EOF") ;
-    rtl::OUString oFields  = rtl::OUString::createFromAscii("Fields") ;
+    rtl::OUString oMoveNext(RTL_CONSTASCII_USTRINGPARAM("MoveNext")) ;
+    rtl::OUString oEof(RTL_CONSTASCII_USTRINGPARAM("EOF")) ;
+    rtl::OUString oFields(RTL_CONSTASCII_USTRINGPARAM("Fields")) ;
 
     if( !xInvRes->hasMethod(oMoveNext))
     {
@@ -5302,7 +5302,7 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
     aRet = xInvRes->getValue(oFields);
     aRet >>= xIntFields;
     uno::Reference< script::XInvocation > xInvFields(xIntFields, uno::UNO_QUERY_THROW);
-    aRet = xInvFields->getValue( rtl::OUString::createFromAscii("Count")) ;
+    aRet = xInvFields->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Count"))) ;
     aRet >>= lColCnt;
 
     //Set the assign column number
@@ -5330,12 +5330,12 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
             nCol = l;
             aPar <<= nCol;
             //get every field
-            aRet = xInvFields->invoke( rtl::OUString::createFromAscii("Item"), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
+            aRet = xInvFields->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Item")), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
             aRet >>= xIntFld;
             uno::Reference< script::XInvocation > xInvFld(xIntFld, uno::UNO_QUERY_THROW); //Get the Field obj
 
             //set the field value
-            aRet = xInvFld->getValue( rtl::OUString::createFromAscii("Value") );
+            aRet = xInvFld->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")) );
             uno::Reference< excel::XRange > xRngToFill = xRngPos->Offset(aCrrRow,aCrrCol );
 
             xRngToFill->setValue(aRet);
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index bd139fa..ba01b1f 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -103,8 +103,6 @@
 #define IS_AVAILABLE(WhichId,ppItem) \
     (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
 
-#define C2U(cChar)  rtl::OUString::createFromAscii(cChar)
-
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
@@ -1567,7 +1565,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     {
                         Reference< ui::dialogs::XExecutableDialog > xDialog(
                                 xMCF->createInstanceWithContext(
-                                    rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog")
+                                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
                                     , xContext), UNO_QUERY);
                         Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
                         if( xInit.is() )
@@ -1577,7 +1575,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                             Sequence<Any> aSeq(1);
                             Any* pArray = aSeq.getArray();
                             PropertyValue aParam;
-                            aParam.Name = rtl::OUString::createFromAscii("ParentWindow");
+                            aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
                             aParam.Value <<= makeAny(xDialogParentWindow);
                             pArray[0] <<= makeAny(aParam);
                             xInit->initialize( aSeq );
@@ -1595,9 +1593,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                                 {
                                     try
                                     {
-                                        xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified;
-                                        xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants;
-                                        xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms;
+                                        xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDirectionToSimplified")) ) >>= bToSimplified;
+                                        xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUseCharacterVariants")) ) >>= bUseVariants;
+                                        xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsTranslateCommonTerms")) ) >>= bCommonTerms;
                                     }
                                     catch( Exception& )
                                     {
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1695948..806ccbd 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -234,7 +234,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                 {
                     uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
                     uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
-                                                        rtl::OUString::createFromAscii("_beamer"),
+                                                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
                                                         frame::FrameSearchFlag::CHILDREN);
                     if ( xBeamerFrame.is() )
                         bWasOpen = TRUE;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 599e800..c81c28c 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -373,7 +373,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                         com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xInfo;
                         xStyles->getByName( pNameItem->GetValue() ) >>= xInfo;
                         ::rtl::OUString aUIName;
-                        xInfo->getPropertyValue( ::rtl::OUString::createFromAscii("DisplayName") ) >>= aUIName;
+                        xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName;
                         if ( aUIName.getLength() )
                             rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
                     }
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 6f9f306..75a0b1e 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -471,7 +471,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
     const ScDPLabelData& rLabelData = *pDPData->maDPParam.maLabelArray[pDPData->mnDim];
 
     mpDPFieldPopup.reset(new ScDPFieldPopupWindow(this, pViewData->GetDocument()));
-    mpDPFieldPopup->setName(OUString::createFromAscii("DataPilot field member popup"));
+    mpDPFieldPopup->setName(OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot field member popup")));
     mpDPFieldPopup->setExtendedData(pDPData.release());
     mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this));
     {
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index ca75165..93b23be 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -575,7 +575,7 @@ USHORT __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, Prin
     }
 
     uno::Sequence < beans::PropertyValue > aProps(1);
-    aProps[0].Name = ::rtl::OUString::createFromAscii( "PrintSheets" );
+    aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PrintSheets" ));
     aProps[0].Value <<= aSheets;
     SetAdditionalPrintOptions( aProps );
 
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index e6d047e..80cdd8d 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1212,7 +1212,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter,
             }
 
         uno::Sequence < beans::PropertyValue > aProps(1);
-        aProps[0].Name=::rtl::OUString::createFromAscii("PrintSheets");
+        aProps[0].Name=::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PrintSheets"));
         aProps[0].Value <<= aSheets;
         SetAdditionalPrintOptions( aProps );
 
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index c937109..ebb4032 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -91,21 +91,21 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
     uno::Any aAny;
 
     aAny <<= rtl::OUString(rName);
-    xPropSet->setPropertyValue( rtl::OUString::createFromAscii( "Label" ), aAny );
+    xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Label" )), aAny );
 
     ::rtl::OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL );
     aAny <<= aTmp;
-    xPropSet->setPropertyValue( rtl::OUString::createFromAscii( "TargetURL" ), aAny );
+    xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )), aAny );
 
     if( rTarget.Len() )
     {
         aAny <<= rtl::OUString(rTarget);
-        xPropSet->setPropertyValue( rtl::OUString::createFromAscii( "TargetFrame" ), aAny );
+        xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetFrame" )), aAny );
     }
 
     form::FormButtonType eButtonType = form::FormButtonType_URL;
     aAny <<= eButtonType;
-    xPropSet->setPropertyValue( rtl::OUString::createFromAscii( "ButtonType" ), aAny );
+    xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )), aAny );
 
         if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
     {


More information about the Libreoffice-commits mailing list