[Libreoffice-commits] .: 3 commits - sal/osl sal/qa svx/source svx/workben writerperfect/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Fri Jun 1 14:12:43 PDT 2012


 sal/osl/w32/procimpl.cxx                                               |    6 
 sal/qa/osl/file/osl_File.cxx                                           |   62 ++++-----
 sal/qa/osl/process/osl_process.cxx                                     |   28 ++--
 svx/source/form/dbtoolsclient.cxx                                      |    5 
 svx/source/gengal/gengal.cxx                                           |   10 -
 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx |   12 -
 svx/source/unodraw/unoshap4.cxx                                        |   27 +---
 svx/source/xml/xmlgrhlp.cxx                                            |   66 +++++-----
 svx/workben/msview/msview.cxx                                          |   22 +--
 writerperfect/source/draw/WPGImportFilter.cxx                          |   12 -
 writerperfect/source/writer/MSWorksImportFilter.cxx                    |   12 -
 writerperfect/source/writer/WordPerfectImportFilter.cxx                |   20 +--
 12 files changed, 140 insertions(+), 142 deletions(-)

New commits:
commit 159435291bb6e36f1525c4718dc2f8bec86c0545
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jun 1 15:46:46 2012 -0500

    targeted string re-work
    
    Change-Id: I2c166c63e9d2ab7d60bb404f643045678ef239a2

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 100f7ec..8e5fd66 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -6006,7 +6006,7 @@ namespace osl_Directory
     #   define PATH_BUFFER_SIZE PATH_MAX
     #endif
 
-    char TEST_PATH_POSTFIX[] = "hello/world";
+#define TEST_PATH_POSTFIX "hello/world"
 
     //########################################
     OUString get_test_path()
@@ -6113,8 +6113,8 @@ namespace osl_Directory
         //##########################################
         void with_relative_path()
         {
-            FileBase::RC rc = Directory::createPath(
-                OUString(TEST_PATH_POSTFIX));
+            FileBase::RC rc = Directory::createPath( OUString(TEST_PATH_POSTFIX));
+
 
             CPPUNIT_ASSERT_MESSAGE
             (
diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx
index 4c6586b..4ac1fd5 100644
--- a/writerperfect/source/draw/WPGImportFilter.cxx
+++ b/writerperfect/source/draw/WPGImportFilter.cxx
@@ -104,7 +104,7 @@ throw (RuntimeException)
     sFileName = OUStringToOString(sURL, RTL_TEXTENCODING_INFO_ASCII);
 
     // An XML import service: what we push sax messages to..
-    OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.XMLOasisImporter" ) );
+    OUString sXMLImportService (  "com.sun.star.comp.Draw.XMLOasisImporter"  );
     Reference < XDocumentHandler > xInternalHandler( comphelper::ComponentContext( mxContext ).createComponent( sXMLImportService ), UNO_QUERY );
 
     // The XImporter sets up an empty target document for XDocumentHandler to write to..
@@ -163,14 +163,14 @@ throw( com::sun::star::uno::RuntimeException )
     WPXSvInputStream input( xInputStream );
 
     if (libwpg::WPGraphics::isSupported(&input))
-        sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "draw_WordPerfect_Graphics" ) );
+        sTypeName = OUString(  "draw_WordPerfect_Graphics"  );
 
     if (!sTypeName.isEmpty())
     {
         if ( location == Descriptor.getLength() )
         {
             Descriptor.realloc(nLength+1);
-            Descriptor[location].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName"));
+            Descriptor[location].Name = ::rtl::OUString("TypeName");
         }
 
         Descriptor[location].Value <<=sTypeName;
@@ -208,7 +208,7 @@ throw (RuntimeException)
 #ifdef DEBUG
     std::cerr << "WPGImportFilter_getImplementationName" << std::endl;
 #endif
-    return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Draw.WPGImportFilter" ) );
+    return OUString (  "com.sun.star.comp.Draw.WPGImportFilter"  );
 }
 
 #define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
@@ -229,8 +229,8 @@ throw (RuntimeException)
 #endif
     Sequence < OUString > aRet(2);
     OUString *pArray = aRet.getArray();
-    pArray[0] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
-    pArray[1] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+    pArray[0] =  OUString (  SERVICE_NAME1  );
+    pArray[1] =  OUString (  SERVICE_NAME2  );
     return aRet;
 }
 #undef SERVICE_NAME2
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 5712703..5da9498 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -104,7 +104,7 @@ throw (RuntimeException)
     sFileName = OUStringToOString(sURL, RTL_TEXTENCODING_INFO_ASCII);
 
     // An XML import service: what we push sax messages to..
-    OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLOasisImporter" ) );
+    OUString sXMLImportService (  "com.sun.star.comp.Writer.XMLOasisImporter"  );
     Reference < XDocumentHandler > xInternalHandler( comphelper::ComponentContext( mxContext ).createComponent( sXMLImportService ), UNO_QUERY );
 
     // The XImporter sets up an empty target document for XDocumentHandler to write to..
@@ -191,14 +191,14 @@ throw( com::sun::star::uno::RuntimeException )
     confidence = WPSDocument::isFileFormatSupported(&input);
 
     if ((confidence == WPS_CONFIDENCE_EXCELLENT) || (confidence == WPS_CONFIDENCE_GOOD))
-        sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_MS_Works_Document" ) );
+        sTypeName = OUString(  "writer_MS_Works_Document"  );
 
     if (!sTypeName.isEmpty())
     {
         if ( location == Descriptor.getLength() )
         {
             Descriptor.realloc(nLength+1);
-            Descriptor[location].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName"));
+            Descriptor[location].Name = ::rtl::OUString("TypeName");
         }
 
         Descriptor[location].Value <<=sTypeName;
@@ -232,7 +232,7 @@ throw (Exception, RuntimeException)
 OUString MSWorksImportFilter_getImplementationName ()
 throw (RuntimeException)
 {
-    return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.MSWorksImportFilter" ) );
+    return OUString (  "com.sun.star.comp.Writer.MSWorksImportFilter"  );
 }
 
 #define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
@@ -247,8 +247,8 @@ throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
     OUString *pArray = aRet.getArray();
-    pArray[0] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
-    pArray[1] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+    pArray[0] =  OUString (  SERVICE_NAME1  );
+    pArray[1] =  OUString (  SERVICE_NAME2  );
     return aRet;
 }
 #undef SERVICE_NAME2
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index b0d33bd..bb9fb07 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -158,7 +158,7 @@ throw (RuntimeException)
     }
 
     // An XML import service: what we push sax messages to..
-    OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLOasisImporter" ) );
+    OUString sXMLImportService (  "com.sun.star.comp.Writer.XMLOasisImporter"  );
     Reference < XDocumentHandler > xInternalHandler( comphelper::ComponentContext( mxContext ).createComponent( sXMLImportService ), UNO_QUERY );
 
     // The XImporter sets up an empty target document for XDocumentHandler to write to..
@@ -245,14 +245,14 @@ throw( uno::RuntimeException )
     confidence = WPDocument::isFileFormatSupported(&input);
 
     if (confidence == WPD_CONFIDENCE_EXCELLENT || confidence == WPD_CONFIDENCE_SUPPORTED_ENCRYPTION)
-        sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_WordPerfect_Document" ) );
+        sTypeName = OUString(  "writer_WordPerfect_Document"  );
 
     if (!sTypeName.isEmpty())
     {
         if ( location == Descriptor.getLength() )
         {
             Descriptor.realloc(nLength+1);
-            Descriptor[location].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName"));
+            Descriptor[location].Name = ::rtl::OUString("TypeName");
         }
 
         Descriptor[location].Value <<=sTypeName;
@@ -286,7 +286,7 @@ throw (Exception, RuntimeException)
 OUString WordPerfectImportFilter_getImplementationName ()
 throw (RuntimeException)
 {
-    return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WordPerfectImportFilter" ) );
+    return OUString (  "com.sun.star.comp.Writer.WordPerfectImportFilter"  );
 }
 
 #define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
@@ -301,8 +301,8 @@ throw (RuntimeException)
 {
     Sequence < OUString > aRet(2);
     OUString *pArray = aRet.getArray();
-    pArray[0] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
-    pArray[1] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+    pArray[0] =  OUString (  SERVICE_NAME1  );
+    pArray[1] =  OUString (  SERVICE_NAME2  );
     return aRet;
 }
 #undef SERVICE_NAME2
@@ -380,7 +380,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getP
     uno::Sequence<beans::PropertyValue> aRet(1);
     beans::PropertyValue *pArray = aRet.getArray();
 
-    pArray[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Password") );
+    pArray[0].Name = rtl::OUString( "Password" );
     pArray[0].Value <<= msPassword;
 
     return aRet;
@@ -397,7 +397,7 @@ throw(beans::UnknownPropertyException, beans::PropertyVetoException,
         const beans::PropertyValue &rProp = pPropArray[i];
         ::rtl::OUString aPropName = rProp.Name;
 
-        if ( aPropName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")) )
+        if ( aPropName == ::rtl::OUString("Password") )
             rProp.Value >>= msPassword;
         else if ( aPropName == "InputStream" )
             rProp.Value >>= mxInputStream;
@@ -427,7 +427,7 @@ throw (RuntimeException)
 OUString WordPerfectImportFilterDialog_getImplementationName ()
 throw (RuntimeException)
 {
-    return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WordPerfectImportFilterDialog" ) );
+    return OUString (  "com.sun.star.comp.Writer.WordPerfectImportFilterDialog"  );
 }
 
 #define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog"
@@ -442,7 +442,7 @@ throw (RuntimeException)
 {
     Sequence < OUString > aRet(1);
     OUString *pArray = aRet.getArray();
-    pArray[0] =  OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
+    pArray[0] =  OUString (  SERVICE_NAME  );
     return aRet;
 }
 #undef SERVICE_NAME
commit 6d8cd969391c79dfbcff4a85c4c9869ba8a2bfab
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jun 1 15:29:51 2012 -0500

    targeted string re-work
    
    Change-Id: I91a8a1410fc9a3a48b77f980c01b51bdacf6b02b

diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index 78c0444..da1ef37 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -115,8 +115,7 @@ namespace svxform
             OSL_ENSURE(NULL == s_hDbtoolsModule, "ODbtoolsClient::registerClient: inconsistence: already have a module!");
             OSL_ENSURE(NULL == s_pFactoryCreationFunc, "ODbtoolsClient::registerClient: inconsistence: already have a factory function!");
 
-            const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(
-                SVLIBRARY( "dbtools" ))
+            const ::rtl::OUString sModuleName( SVLIBRARY( "dbtools" )
             );
 
             // load the dbtools library
@@ -126,7 +125,7 @@ namespace svxform
             if (NULL != s_hDbtoolsModule)
             {
                 // get the symbol for the method creating the factory
-                const ::rtl::OUString sFactoryCreationFunc( RTL_CONSTASCII_USTRINGPARAM("createDataAccessToolsFactory") );
+                const ::rtl::OUString sFactoryCreationFunc( "createDataAccessToolsFactory" );
                 //  reinterpret_cast<createDataAccessToolsFactoryFunction>
                 s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)(
                     osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData));
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index f91b42e..acbe3d9 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -203,9 +203,9 @@ void GalApp::Init()
             lastSlash = fileName.lastIndexOf( '\\' );
 #endif
         rtl::OUString baseBinDir = fileName.copy( 0, lastSlash );
-        rtl::OUString installPrefix = baseBinDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/../.."));
+        rtl::OUString installPrefix = baseBinDir + rtl::OUString("/../..");
 
-        rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("OOO_INSTALL_PREFIX"));
+        rtl::OUString envVar("OOO_INSTALL_PREFIX");
         osl_setEnvironment(envVar.pData, installPrefix.pData);
     }
     OSL_TRACE( "OOO_INSTALL_PREFIX=%s", getenv( "OOO_INSTALL_PREFIX" ) );
@@ -225,9 +225,9 @@ void GalApp::InitUCB()
 {
     Sequence< Any > aArgs(2);
     aArgs[0]
-        <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_LOCAL));
+        <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL);
     aArgs[1]
-        <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE));
+        <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE);
 
     if (! ::ucbhelper::ContentBroker::initialize( xMSF, aArgs ) )
         fprintf( stderr, "Failed to init content broker\n" );
@@ -237,7 +237,7 @@ int GalApp::Main()
 {
     bool bHelp = false;
     rtl::OUString aPath, aDestDir;
-    rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Default name"));
+    rtl::OUString aName("Default name");
     sal_uInt32 nNumFrom = 0;
     FileNameList aFiles;
 
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
index c694918..da7fa61 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
@@ -75,14 +75,14 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent )
 
     SvtLinguConfig  aLngCfg;
     sal_Bool bValue = sal_Bool();
-    Any aAny( aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )) ) );
+    Any aAny( aLngCfg.GetProperty( rtl::OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ) ) );
     aAny >>= bValue;
     if( bValue )
         m_aRB_To_Simplified.Check();
     else
         m_aRB_To_Traditional.Check();
 
-    aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )) );
+    aAny = aLngCfg.GetProperty( rtl::OUString( UPN_IS_USE_CHARACTER_VARIANTS ) );
     if( aAny >>= bValue )
         m_aCB_Use_Variants.Check( bValue );
 
@@ -94,7 +94,7 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent )
     m_aCB_Use_Variants.Enable( sal_False );
     m_aCB_Use_Variants.Show( sal_False );
 
-    aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )) );
+    aAny = aLngCfg.GetProperty( rtl::OUString( UPN_IS_TRANSLATE_COMMON_TERMS ) );
     if( aAny >>= bValue )
         m_aCB_Translate_Commonterms.Check( bValue );
 
@@ -152,11 +152,11 @@ IMPL_LINK_NOARG(ChineseTranslationDialog, OkHdl)
     SvtLinguConfig  aLngCfg;
     Any aAny;
     aAny <<= sal_Bool( !!m_aRB_To_Simplified.IsChecked() );
-    aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )), aAny );
+    aLngCfg.SetProperty( rtl::OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ), aAny );
     aAny <<= sal_Bool( !!m_aCB_Use_Variants.IsChecked() );
-    aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )), aAny );
+    aLngCfg.SetProperty( rtl::OUString( UPN_IS_USE_CHARACTER_VARIANTS ), aAny );
     aAny <<= sal_Bool( !!m_aCB_Translate_Commonterms.IsChecked() );
-    aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )), aAny );
+    aLngCfg.SetProperty( rtl::OUString( UPN_IS_TRANSLATE_COMMON_TERMS ), aAny );
 
     EndDialog( RET_OK );
     return 0;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 03b723a..3fe75fc 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -358,8 +358,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
             if( pGraphic )
             {
                 GraphicObject aObj( *pGraphic );
-                aURL = OUString(RTL_CONSTASCII_USTRINGPARAM(
-                    UNO_NAME_GRAPHOBJ_URLPREFIX));
+                aURL = OUString( UNO_NAME_GRAPHOBJ_URLPREFIX);
                 aURL += rtl::OStringToOUString(aObj.GetUniqueID(),
                     RTL_TEXTENCODING_ASCII_US);
             }
@@ -420,7 +419,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
     ::comphelper::IEmbeddedHelper*     pPersist = mpModel->GetPersist();
     ::rtl::OUString              aPersistName;
     OUString            aTmpStr;
-    if( getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )) ) >>= aTmpStr )
+    if( getPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ) ) >>= aTmpStr )
         aPersistName = aTmpStr;
 
     //TODO/LATER: how to cope with creation failure?!
@@ -451,7 +450,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
         }
 
         // connect the object after the visual area is set
-        setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), Any( aTmpStr = aPersistName ) );
+        setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), Any( aTmpStr = aPersistName ) );
 
         // the object is inserted during setting of PersistName property usually
         if( pOle2Obj->IsEmpty() )
@@ -474,14 +473,14 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL )
     ::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist();
 
     uno::Sequence< beans::PropertyValue > aMediaDescr( 1 );
-    aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
+    aMediaDescr[0].Name = ::rtl::OUString("URL");
     aMediaDescr[0].Value <<= aLinkURL;
 
     uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler();
     if ( xInteraction.is() )
     {
         aMediaDescr.realloc( 2 );
-        aMediaDescr[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
+        aMediaDescr[1].Name = ::rtl::OUString(  "InteractionHandler"  );
         aMediaDescr[1].Value <<= xInteraction;
     }
 
@@ -514,7 +513,7 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL )
         }
 
         // connect the object after the visual area is set
-        setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), uno::makeAny( aPersistName ) );
+        setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), uno::makeAny( aPersistName ) );
 
         // the object is inserted during setting of PersistName property usually
         if ( pOle2Obj->IsEmpty() )
@@ -584,7 +583,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(rtl::OUString& rHexCLSID)
 SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw()
 : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool())  )
 {
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.AppletShape"  ) );
 }
 
 SvxAppletShape::~SvxAppletShape() throw()
@@ -596,7 +595,7 @@ void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
     SvxShape::Create( pNewObj, pNewPage );
     const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID );
     createObject(aAppletClassId);
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.AppletShape"  ) );
 }
 
 void SAL_CALL SvxAppletShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
@@ -657,7 +656,7 @@ bool SvxAppletShape::getPropertyValueImpl( const ::rtl::OUString& rName, const S
 SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw()
 : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()) )
 {
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.PluginShape"  ) );
 }
 
 SvxPluginShape::~SvxPluginShape() throw()
@@ -669,7 +668,7 @@ void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
     SvxShape::Create( pNewObj, pNewPage );
     const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID );
     createObject(aPluginClassId);
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.PluginShape"  ) );
 }
 
 void SAL_CALL SvxPluginShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
@@ -730,7 +729,7 @@ bool SvxPluginShape::getPropertyValueImpl( const ::rtl::OUString& rName, const S
 SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw()
 : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool())  )
 {
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.FrameShape"  ) );
 }
 
 SvxFrameShape::~SvxFrameShape() throw()
@@ -742,7 +741,7 @@ void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw ()
     SvxShape::Create( pNewObj, pNewPage );
     const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID );
     createObject(aIFrameClassId);
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.FrameShape"  ) );
 }
 
 void SAL_CALL SvxFrameShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
@@ -805,7 +804,7 @@ bool SvxFrameShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf
 SvxMediaShape::SvxMediaShape( SdrObject* pObj ) throw()
 :   SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) )
 {
-    SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ) );
+    SetShapeType( rtl::OUString(  "com.sun.star.drawing.MediaShape"  ) );
 }
 
 //----------------------------------------------------------------------
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 68d9ede..bd4954a 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -143,9 +143,9 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi
                     String          aFormat;
 
                     if( aGraphic.IsAnimated() )
-                        aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) );
+                        aFormat = String(  "gif"  );
                     else
-                        aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) );
+                        aFormat = String(  "png"  );
 
                     bRet = ( rFilter.ExportGraphic( aGraphic, String(), *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
                 }
@@ -439,7 +439,7 @@ sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr,
 
         if( 1 == nTokenCount )
         {
-            rPictureStorageName = String( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICSTORAGE_NAME ) );
+            rPictureStorageName = String(  XML_GRAPHICSTORAGE_NAME  );
             rPictureStreamName = aURLStr;
         }
         else
@@ -508,7 +508,7 @@ SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const ::rt
         aRet.xStream = aRet.xStorage->openStreamElement( rPictureStreamName, nMode );
         if( aRet.xStream.is() && ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) )
         {
-            ::rtl::OUString aPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") );
+            ::rtl::OUString aPropName( "UseCommonStoragePasswordEncryption" );
             uno::Reference < beans::XPropertySet > xProps( aRet.xStream, uno::UNO_QUERY );
             xProps->setPropertyValue( aPropName, uno::makeAny( sal_True) );
         }
@@ -593,12 +593,12 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
             if( !aMimeType.isEmpty() )
             {
                 aAny <<= aMimeType;
-                xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), aAny );
+                xProps->setPropertyValue( String(  "MediaType"  ), aAny );
             }
 
             const sal_Bool bCompressed = aMimeType.isEmpty() || aMimeType == "image/tiff";
             aAny <<= bCompressed;
-            xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), aAny );
+            xProps->setPropertyValue( String(  "Compressed"  ), aAny );
 
             SvStream* pStream = utl::UcbStreamHelper::CreateStream( aStream.xStream );
             if( bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData() )
@@ -611,9 +611,9 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
                     String          aFormat;
 
                     if( aGraphic.IsAnimated() )
-                        aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) );
+                        aFormat = String(  "gif"  );
                     else
-                        aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) );
+                        aFormat = String(  "png"  );
 
                     bRet = ( rFilter.ExportGraphic( aGraphic, String(), *pStream,
                                                      rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
@@ -687,7 +687,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
             if( aObj.GetType() != GRAPHIC_NONE )
             {
                 maGrfObjs.push_back( aObj );
-                ::rtl::OUString aBaseURL( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE ) );
+                ::rtl::OUString aBaseURL(  XML_GRAPHICOBJECT_URL_BASE  );
 
                 rURLPair.second = aBaseURL;
                 rURLPair.second += rtl::OStringToOUString(aObj.GetUniqueID(),
@@ -713,14 +713,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                 {
                     switch( aGfxLink.GetType() )
                     {
-                        case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
-                        case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
+                        case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String(  ".eps"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String(  ".gif"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String(  ".jpg"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String(  ".png"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String(  ".tif"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String(  ".wmf"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String(  ".met"  ); break;
+                        case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String(  ".pct"  ); break;
                         case( GFX_LINK_TYPE_NATIVE_SVG ): 
                             // backward-compat kludge: since no released OOo
                             // version to date can handle svg properly, wrap it up
@@ -730,14 +730,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                             if( SvtSaveOptions().GetODFDefaultVersion() <= SvtSaveOptions::ODFVER_012 )
                             {
                                 bUseGfxLink = false;
-                                aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
+                                aExtension = String(  ".svm"  );
                             }
                             else
-                                aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svg" ) );
+                                aExtension = String(  ".svg"  );
                             break;
 
                         default:
-                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
+                            aExtension = String(  ".grf"  );
                         break;
                     }
                 }
@@ -746,23 +746,23 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
                     if( aGrfObject.GetType() == GRAPHIC_BITMAP )
                     {
                         if( aGrfObject.IsAnimated() )
-                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) );
+                            aExtension = String(  ".gif"  );
                         else
-                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) );
+                            aExtension = String(  ".png"  );
                     }
                     else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
                     {
                         // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm
                         GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() );
                         if ( ImplCheckForEPS( rMtf ) )
-                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) );
+                            aExtension = String(  ".eps"  );
                         else
-                            aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) );
+                            aExtension = String(  ".svm"  );
                     }
                 }
 
                 rtl::OUString aURLEntry;
-                const String sPictures( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) );
+                const String sPictures(  "Pictures/"  );
 
                 if ( !rRequestedFileName.isEmpty() )
                 {
@@ -885,7 +885,7 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper )
                 rtl::OUString aParam( aToken.copy( 0, n ) );
                 rtl::OUString aValue( aToken.copy( n + 1, aToken.getLength() - ( n + 1 ) ) );
 
-                const rtl::OUString sRequestedName( RTL_CONSTASCII_USTRINGPARAM("requestedName") );
+                const rtl::OUString sRequestedName( "requestedName" );
                 if ( aParam.match( sRequestedName ) )
                     aRequestedFileName = aValue;
             }
@@ -964,7 +964,7 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream()
 
                 if( !aId.isEmpty() )
                 {
-                    aRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE ));
+                    aRet = ::rtl::OUString( XML_GRAPHICOBJECT_URL_BASE );
                     aRet += aId;
                 }
             }
@@ -1135,15 +1135,15 @@ Reference< XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const R
 ::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName()
     throw()
 {
-    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.GraphicImportHelper" ));
+    return ::rtl::OUString(  "com.sun.star.comp.Svx.GraphicImportHelper" );
 }
 Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames()
     throw()
 {
     // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service
     Sequence< ::rtl::OUString > aSupportedServiceNames( 2 );
-    aSupportedServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.GraphicObjectResolver" ) );
-    aSupportedServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStreamResolver" ) );
+    aSupportedServiceNames[0] = ::rtl::OUString(  "com.sun.star.document.GraphicObjectResolver"  );
+    aSupportedServiceNames[1] = ::rtl::OUString(  "com.sun.star.document.BinaryStreamResolver"  );
     return aSupportedServiceNames;
 }
 
@@ -1156,15 +1156,15 @@ Reference< XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const R
 ::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName()
     throw()
 {
-    return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.GraphicExportHelper" ));
+    return ::rtl::OUString(  "com.sun.star.comp.Svx.GraphicExportHelper" );
 }
 Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames()
     throw()
 {
     // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service
     Sequence< ::rtl::OUString > aSupportedServiceNames( 2 );
-    aSupportedServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.GraphicObjectResolver" ) );
-    aSupportedServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStreamResolver" ) );
+    aSupportedServiceNames[0] = ::rtl::OUString(  "com.sun.star.document.GraphicObjectResolver"  );
+    aSupportedServiceNames[1] = ::rtl::OUString(  "com.sun.star.document.BinaryStreamResolver"  );
     return aSupportedServiceNames;
 }
 
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 3484176..122dcc1 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -755,7 +755,7 @@ void PPTDocument::Load( const rtl::OUString& rFilePath )
     maStorage = new SotStorage( rFilePath, STREAM_STD_READ );
     if( !maStorage->GetError() )
     {
-        mpDocStream = maStorage->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("PowerPoint Document") ), STREAM_STD_READ );
+        mpDocStream = maStorage->OpenSotStream( String( "PowerPoint Document" ), STREAM_STD_READ );
         if( mpDocStream )
         {
             DffRecordHeader aRecordHeader;
@@ -867,7 +867,7 @@ PPTDocumentPtr MSViewerWorkWindow::Load()
 {
     ::sfx2::FileDialogHelper aDlg(
         ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
-    String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.ppt" ) );
+    String aStrFilterType(  "*.ppt"  );
     aDlg.AddFilter( aStrFilterType, aStrFilterType );
 //  INetURLObject aFile( SvtPathOptions().GetPalettePath() );
 //  aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -888,19 +888,19 @@ MSViewerWorkWindow::MSViewerWorkWindow() :
 {
     Size aOutputSize( 400, 600 );
     SetOutputSizePixel( aOutputSize );
-    SetText( String( RTL_CONSTASCII_USTRINGPARAM( "MSViewer" ) ) );
+    SetText( String(  "MSViewer"  ) );
 
     Size aOutSize( GetOutputSizePixel() );
 
-    Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ), GetFont().GetSize() );
+    Font aFont( String(  "Courier"  ), GetFont().GetSize() );
 
     mpMenuBar = new MenuBar();
-    mpMenuBar->InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM("~File" ) ) );
+    mpMenuBar->InsertItem( 1, String( "~File"  ) );
     mpFileMenu = new PopupMenu();
-    mpFileMenu->InsertItem( 2, String( RTL_CONSTASCII_USTRINGPARAM("~View" ) ) );
-    mpFileMenu->InsertItem( 3, String( RTL_CONSTASCII_USTRINGPARAM("~Compare" ) ) );
+    mpFileMenu->InsertItem( 2, String( "~View"  ) );
+    mpFileMenu->InsertItem( 3, String( "~Compare"  ) );
     mpFileMenu->InsertSeparator();
-    mpFileMenu->InsertItem( 4, String( RTL_CONSTASCII_USTRINGPARAM("~Quit" ) ) );
+    mpFileMenu->InsertItem( 4, String( "~Quit"  ) );
     mpFileMenu->SetSelectHdl( LINK( this, MSViewerWorkWindow, implMenuHdl ) );
 
     mpMenuBar->SetPopupMenu( 1, mpFileMenu );
@@ -1116,8 +1116,8 @@ void MSViewerWorkWindow::Resize()
 
         // Init UCB
         uno::Sequence< uno::Any > aArgs( 2 );
-        aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL ));
-        aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE ));
+        aArgs[ 0 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY1_LOCAL );
+        aArgs[ 1 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY2_OFFICE );
         sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs );
         if ( !bSuccess )
         {
@@ -1142,7 +1142,7 @@ void MSViewerWorkWindow::Resize()
 
         aURL.removeSegment();
         aURL.removeFinalSlash();
-        aURL.Append( String(  RTL_CONSTASCII_USTRINGPARAM( "msview.xml" )  ) );
+        aURL.Append( String(   "msview.xml"   ) );
 
         load_config( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
     }
commit d9e22d35c3746957f8db84151ef047fd462654ef
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jun 1 15:25:30 2012 -0500

    targeted string re-work
    
    Change-Id: I368b9538e3c2e6242fcdcabb4f8c716e17b02d88

diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index 0cdfa58..9dc0959 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -60,8 +60,8 @@ extern "C" oslFileHandle SAL_CALL osl_createFileHandleFromOSHandle( HANDLE hFile
 //#################################################
 const sal_Unicode NAME_VALUE_SEPARATOR = TEXT('=');
 const sal_Char* SPACE = " ";
-const rtl::OUString ENV_COMSPEC (RTL_CONSTASCII_USTRINGPARAM("COMSPEC"));
-const rtl::OUString QUOTE(RTL_CONSTASCII_USTRINGPARAM("\""));
+const rtl::OUString ENV_COMSPEC ("COMSPEC");
+const rtl::OUString QUOTE("\"");
 
 namespace /* private */
 {
@@ -358,7 +358,7 @@ namespace /* private */
         if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(exe_url, exe_path))
             return rtl::OUString();
 
-        exe_path = getShortPath(exe_path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe")));
+        exe_path = getShortPath(exe_path, rtl::OUString(".exe"));
 
         if (exe_path.indexOf(' ') != -1)
             exe_path = quote_string(exe_path);
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index f2ad580..100f7ec 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -750,52 +750,52 @@ namespace osl_FileBase
 
   void getAbsoluteFileURL::getAbsoluteFileURL_001_1()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/relative/file1")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/relative/file1") );
     check_getAbsoluteFileURL( aUserDirectoryURL, "relative/file1",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_2()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/relative/file2")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/relative/file2") );
     check_getAbsoluteFileURL( aUserDirectoryURL, "relative/./file2",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_3()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/file3")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/file3") );
     check_getAbsoluteFileURL( aUserDirectoryURL, "relative/../file3",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_4()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/file4")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/file4") );
     check_getAbsoluteFileURL( aUserDirectoryURL, "././relative/../file4",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_5()
   {
     rtl::OUString suAssume;
 #if ( defined UNX )
-    suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/relative/")) );
+    suAssume = aUserDirectoryURL.concat( rtl::OUString("/relative/") );
 #else
-    suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/relative")) );
+    suAssume = aUserDirectoryURL.concat( rtl::OUString("/relative") );
 #endif
     check_getAbsoluteFileURL( aUserDirectoryURL, "././relative/.",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_6()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/.relative")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/.relative") );
     check_getAbsoluteFileURL( aUserDirectoryURL, "./.relative",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_7()
   {
     rtl::OUString suAssume;
 #if (defined UNX )
-    suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/.a/")) );
+    suAssume = aUserDirectoryURL.concat( rtl::OUString("/.a/") );
 #else //windows
-    suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/.a")) );
+    suAssume = aUserDirectoryURL.concat( rtl::OUString("/.a") );
 #endif
     check_getAbsoluteFileURL( aUserDirectoryURL, "./.a/mydir/..",::osl::FileBase::E_None, suAssume );
   }
   void getAbsoluteFileURL::getAbsoluteFileURL_001_8()
   {
-    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmp/ok")) );
+    rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/tmp/ok") );
 #if ( defined UNX )
     check_getAbsoluteFileURL( aUserDirectoryURL, "tmp//ok",::osl::FileBase::E_None, suAssume );
 #else
@@ -806,8 +806,8 @@ namespace osl_FileBase
   {
 #if ( defined UNX )     //Link is not defined in Windows
         ::rtl::OUString aUStr_AbsURL, aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
-        ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/link.file"));
-        ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/canonical.name"));
+        ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file");
+        ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/canonical.name");
 
                 rtl::OString strLinkFileName, strSrcFileName;
                 strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
@@ -817,7 +817,7 @@ namespace osl_FileBase
                 sal_Int32 fd = symlink( strSrcFileName.getStr(), strLinkFileName.getStr() );
         CPPUNIT_ASSERT( fd == 0 );
         rtl::OString sLnkURL = OUStringToOString( aLnkURL1, RTL_TEXTENCODING_ASCII_US );
-            rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/canonical.name")) );
+            rtl::OUString suAssume = aUserDirectoryURL.concat( rtl::OUString("/canonical.name") );
         check_getAbsoluteFileURL( aUserDirectoryURL, sLnkURL, ::osl::FileBase::E_None, suAssume );
         deleteTestFile( aCanURL1 );
                 fd = remove( strLinkFileName.getStr() );
@@ -831,12 +831,12 @@ namespace osl_FileBase
     void getAbsoluteFileURL::getAbsoluteFileURL_004()
     {
         //create two level directories under $Temp/PID/
-        ::rtl::OUString aUStrUpBase = aUserDirectoryURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/test1"));
+        ::rtl::OUString aUStrUpBase = aUserDirectoryURL + ::rtl::OUString("/test1");
         createTestDirectory( aUStrUpBase );
-        ::rtl::OUString aUStrBase = aUserDirectoryURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/test1/dir1"));
+        ::rtl::OUString aUStrBase = aUserDirectoryURL + ::rtl::OUString("/test1/dir1");
         createTestDirectory( aUStrBase );
 
-        ::rtl::OUString suAssume = aUserDirectoryURL.concat( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/mytestfile")) );
+        ::rtl::OUString suAssume = aUserDirectoryURL.concat( ::rtl::OUString("/mytestfile") );
         check_getAbsoluteFileURL( aUStrBase, "../../mytestfile" , ::osl::FileBase::E_None, suAssume );
         deleteTestDirectory( aUStrBase );
         deleteTestDirectory( aUStrUpBase );
@@ -2588,8 +2588,8 @@ namespace osl_FileStatus
             sal_Int32 fd;
 
             ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
-            ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpdir/link.file"));
-            ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpdir/tmpname"));
+            ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/link.file");
+            ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpdir/tmpname");
 
                 rtl::OString strLinkFileName;
                 rtl::OString strSrcFileName;
@@ -2603,7 +2603,7 @@ namespace osl_FileStatus
             // testDirectory is "/tmp/PID/tmpdir/"
             ::osl::Directory testDirectory( aTmpName3 );
                 ::osl::FileBase::RC nError1 = testDirectory.open();
-            ::rtl::OUString aFileName (RTL_CONSTASCII_USTRINGPARAM("link.file"));
+            ::rtl::OUString aFileName ("link.file");
             sal_Bool bOk = sal_False;
             while (1) {
                 nError1 = testDirectory.getNextItem( rItem_link, 4 );
@@ -2904,7 +2904,7 @@ namespace osl_FileStatus
 #else                                    //Windows version
         void getAttributes_004()
         {
-            ::rtl::OUString aUserHiddenFileURL (RTL_CONSTASCII_USTRINGPARAM("file:///c:/AUTOEXEC.BAT"));
+            ::rtl::OUString aUserHiddenFileURL ("file:///c:/AUTOEXEC.BAT");
             nError = ::osl::DirectoryItem::get( aUserHiddenFileURL, rItem_hidden );
             CPPUNIT_ASSERT_MESSAGE("get item fail", nError == FileBase::E_None );
               ::osl::FileStatus   rFileStatus( osl_FileStatus_Mask_Attributes );
@@ -3212,8 +3212,8 @@ namespace osl_FileStatus
         {
             //create a link file;
             ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
-            ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/link.file"));
-            ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpname"));
+            ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/link.file");
+            ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID() ) += ::rtl::OUString("/tmpname");
 
                 rtl::OString strLinkFileName, strSrcFileName;
                 strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
@@ -4400,9 +4400,9 @@ namespace osl_File
         //create directory $TEMP/tmpname/tmpdir
         createTestDirectory( aTmpName8 );
         //move directory $TEMP/tmpname to $TEMP/tmpname/tmpdir/tmpname
-        rtl::OUString newName = aTmpName8 + OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpname"));
+        rtl::OUString newName = aTmpName8 + OUString("/tmpname");
         nError1 = ::osl::File::move( aTmpName3, newName );
-        //deleteTestDirectory( newName + OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpname")) );
+        //deleteTestDirectory( newName + OUString("/tmpname") );
         //deleteTestDirectory( newName );
         deleteTestDirectory( aTmpName8 );
         deleteTestDirectory( aTmpName6 );
@@ -5595,8 +5595,8 @@ namespace osl_Directory
             sal_Bool bFoundOK = sal_False;
 
             ::rtl::OUString aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
-            ( aUStr_LnkFileSys += aSlashURL ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpdir/link.file"));
-            ( aUStr_SrcFileSys += aSlashURL ) += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmpdir/tmpname"));
+            ( aUStr_LnkFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/link.file");
+            ( aUStr_SrcFileSys += aSlashURL ) += ::rtl::OUString("/tmpdir/tmpname");
 
             ::rtl::OString strLinkFileName, strSrcFileName;
             strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
@@ -5610,7 +5610,7 @@ namespace osl_Directory
             //open a directory
             nError1 = testDirectory.open();
             CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-            ::rtl::OUString aFileName (RTL_CONSTASCII_USTRINGPARAM("link.file"));
+            ::rtl::OUString aFileName ("link.file");
 
             while (1) {
                 nError1 = testDirectory.getNextItem( rItem, 4 );
@@ -5871,7 +5871,7 @@ namespace osl_Directory
             osl_setFileAttributes(aTmpDir.pData, 0); //no access allowed now
 
             //Shouldn't be possible now to create a dir underneath it
-            rtl::OUString aTmpSubLevel = aTmpDir + OUString(RTL_CONSTASCII_USTRINGPARAM("/notallowedhere"));
+            rtl::OUString aTmpSubLevel = aTmpDir + OUString("/notallowedhere");
             nError1 = ::osl::Directory::create(aTmpSubLevel);
 
             //allow removal
@@ -6114,7 +6114,7 @@ namespace osl_Directory
         void with_relative_path()
         {
             FileBase::RC rc = Directory::createPath(
-                OUString(RTL_CONSTASCII_USTRINGPARAM(TEST_PATH_POSTFIX)));
+                OUString(TEST_PATH_POSTFIX));
 
             CPPUNIT_ASSERT_MESSAGE
             (
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 8580ab2..87bd664 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -75,9 +75,9 @@
 #endif
 
 #if defined(WNT)
-    const rtl::OUString EXECUTABLE_NAME (RTL_CONSTASCII_USTRINGPARAM("osl_process_child.exe"));
+    const rtl::OUString EXECUTABLE_NAME ("osl_process_child.exe");
 #else
-    const rtl::OUString EXECUTABLE_NAME (RTL_CONSTASCII_USTRINGPARAM("osl_process_child"));
+    const rtl::OUString EXECUTABLE_NAME ("osl_process_child");
 #endif
 
 //########################################
@@ -106,7 +106,7 @@ inline ::rtl::OUString getExecutablePath( void )
     osl::Module::getUrlFromAddress( ( void* ) &getExecutablePath, dirPath );
     dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
     dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
-    dirPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Executable"));
+    dirPath += rtl::OUString("Executable");
     return dirPath;
 }
 
@@ -126,15 +126,15 @@ class Test_osl_joinProcess : public CppUnit::TestFixture
 public:
 
     Test_osl_joinProcess() :
-        join_param_(OUString(RTL_CONSTASCII_USTRINGPARAM("-join"))),
-        wait_time_(OUString(RTL_CONSTASCII_USTRINGPARAM("1"))),
+        join_param_(OUString("-join")),
+        wait_time_(OUString("1")),
         parameters_count_(2)
     {
         parameters_[0] = join_param_.pData;
         parameters_[1] = wait_time_.pData;
         suCWD = getExecutablePath();
         suExecutableFileURL = suCWD;
-        suExecutableFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+        suExecutableFileURL += rtl::OUString("/");
         suExecutableFileURL += EXECUTABLE_NAME;
     }
 
@@ -424,13 +424,13 @@ public:
     //------------------------------------------------
     // ctor
     Test_osl_executeProcess() :
-        env_param_(OUString(RTL_CONSTASCII_USTRINGPARAM("-env"))),
+        env_param_(OUString("-env")),
         parameters_count_(2)
     {
         parameters_[0] = env_param_.pData;
         suCWD = getExecutablePath();
         suExecutableFileURL = suCWD;
-        suExecutableFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+        suExecutableFileURL += rtl::OUString("/");
         suExecutableFileURL += EXECUTABLE_NAME;
     }
 
@@ -616,10 +616,10 @@ public:
     void osl_execProc_merged_child_environment()
     {
         rtl_uString* child_env[4];
-        OUString env1(RTL_CONSTASCII_USTRINGPARAM(ENV1));
-        OUString env2(RTL_CONSTASCII_USTRINGPARAM(ENV2));
-        OUString env3(RTL_CONSTASCII_USTRINGPARAM(ENV3));
-        OUString env4(RTL_CONSTASCII_USTRINGPARAM(ENV4));
+        OUString env1(ENV1);
+        OUString env2(ENV2);
+        OUString env3(ENV3);
+        OUString env4(ENV4);
 
         child_env[0] = env1.pData;
         child_env[1] = env2.pData;
@@ -670,9 +670,9 @@ public:
     {
         oslProcess process;
 #if defined(WNT)
-        rtl::OUString suBatch = suCWD + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("batch.bat"));
+        rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.bat");
 #else
-        rtl::OUString suBatch = suCWD + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("batch.sh"));
+        rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.sh");
 #endif
         oslProcessError osl_error = osl_executeProcess(
             suBatch.pData,


More information about the Libreoffice-commits mailing list