diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-14 13:13:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:30 +0200 |
commit | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (patch) | |
tree | fb31b64880b06b0e2bd867aa6216ae0259c7c091 /fpicker | |
parent | -Werror,-Wunused-private-field (diff) | |
download | core-2c35fff7eca3a143d28dc75e6a73fe1101d2af77.tar.gz core-2c35fff7eca3a143d28dc75e6a73fe1101d2af77.zip |
remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString
Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/aqua/FPentry.mm | 6 | ||||
-rw-r--r-- | fpicker/source/aqua/SalAquaFilePicker.mm | 10 | ||||
-rw-r--r-- | fpicker/source/aqua/SalAquaFolderPicker.mm | 10 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/FPentry.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/FilePicker.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/VistaFilePicker.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/workbench/Test_fps.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/win32/folderpicker/FolderPicker.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/folderpicker/workbench/Test_fops.cxx | 4 |
9 files changed, 21 insertions, 23 deletions
diff --git a/fpicker/source/aqua/FPentry.mm b/fpicker/source/aqua/FPentry.mm index 78d9ff65cf06..58f347931799 100644 --- a/fpicker/source/aqua/FPentry.mm +++ b/fpicker/source/aqua/FPentry.mm @@ -65,8 +65,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL fps_aqua_component_getFactory( if (0 == rtl_str_compare(pImplName, FILE_PICKER_IMPL_NAME)) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = - OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_SERVICE_NAME)); + aSNS.getArray( )[0] = FILE_PICKER_SERVICE_NAME; xFactory = createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), @@ -77,8 +76,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL fps_aqua_component_getFactory( else if (0 == rtl_str_compare(pImplName, FOLDER_PICKER_IMPL_NAME)) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = - OUString(RTL_CONSTASCII_USTRINGPARAM(FOLDER_PICKER_SERVICE_NAME)); + aSNS.getArray( )[0] = FOLDER_PICKER_SERVICE_NAME; xFactory = createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm index 3366753b3da3..75f57fc863f8 100644 --- a/fpicker/source/aqua/SalAquaFilePicker.mm +++ b/fpicker/source/aqua/SalAquaFilePicker.mm @@ -79,9 +79,9 @@ namespace uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames() { uno::Sequence<rtl::OUString> aRet(3); - aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" )); - aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" )); - aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.AquaFilePicker" )); + aRet[0] = "com.sun.star.ui.dialogs.FilePicker"; + aRet[1] = "com.sun.star.ui.dialogs.SystemFilePicker"; + aRet[2] = "com.sun.star.ui.dialogs.AquaFilePicker"; return aRet; } } @@ -188,7 +188,7 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException ) rtl::OUString ouName = [windowTitle OUString]; //a window title will typically be something like "Untitled1 - OpenOffice.org Writer" //but we only want the "Untitled1" part of it - sal_Int32 indexOfDash = ouName.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "))); + sal_Int32 indexOfDash = ouName.indexOf(" - "); if (indexOfDash > -1) { m_sSaveFileName = ouName.copy(0,indexOfDash); if (m_sSaveFileName.getLength() > 0) { @@ -649,7 +649,7 @@ throw( uno::RuntimeException ) { DBG_PRINT_ENTRY(CLASS_NAME, __func__); - rtl::OUString retVal(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME )); + rtl::OUString retVal( FILE_PICKER_IMPL_NAME ); DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal); diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm index 3eb590b5cfc6..1b147d1fc514 100644 --- a/fpicker/source/aqua/SalAquaFolderPicker.mm +++ b/fpicker/source/aqua/SalAquaFolderPicker.mm @@ -65,8 +65,8 @@ namespace uno::Sequence<rtl::OUString> SAL_CALL FolderPicker_getSupportedServiceNames() { uno::Sequence<rtl::OUString> aRet(2); - aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" )); - aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.AquaFolderPicker" )); + aRet[0] = "com.sun.star.ui.dialogs.SystemFolderPicker"; + aRet[1] = "com.sun.star.ui.dialogs.AquaFolderPicker"; return aRet; } } @@ -122,7 +122,7 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException ) break; default: - throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The dialog returned with an unknown result!")), static_cast< cppu::OWeakObject * >( this )); + throw uno::RuntimeException(OUString("The dialog returned with an unknown result!"), static_cast< cppu::OWeakObject * >( this )); break; } @@ -174,7 +174,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx OSL_TRACE("# of items: %d", nFiles); if (nFiles < 1) { - throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no directory selected")), static_cast< cppu::OWeakObject * >( this )); + throw uno::RuntimeException(OUString("no directory selected"), static_cast< cppu::OWeakObject * >( this )); } rtl::OUString aDirectory; @@ -211,7 +211,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName() { DBG_PRINT_ENTRY(CLASS_NAME, __func__); - rtl::OUString retVal(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_IMPL_NAME )); + rtl::OUString retVal( FOLDER_PICKER_IMPL_NAME ); DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal); diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index 5c26204a5d27..f314a5f19b22 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -96,7 +96,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL fps_win32_component_getFactory( if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) ) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME )); + aSNS.getArray( )[0] = FILE_PICKER_SERVICE_NAME; Reference< XSingleServiceFactory > xFactory ( createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), @@ -113,7 +113,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL fps_win32_component_getFactory( if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FOLDER_PICKER_IMPL_NAME ) ) ) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) ); + aSNS.getArray( )[0] = FOLDER_PICKER_SERVICE_NAME; Reference< XSingleServiceFactory > xFactory ( createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index fa344ef5a19a..b78bacbb774f 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -711,7 +711,7 @@ void SAL_CALL CFilePicker::cancel() OUString SAL_CALL CFilePicker::getImplementationName() throw(uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_IMPL_NAME)); + return OUString(FILE_PICKER_IMPL_NAME); } // XServiceInfo diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index 2909d7ad43a1..e1a29dcd8cee 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -478,7 +478,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An { if (lArguments.getLength() < 1) throw css::lang::IllegalArgumentException( - OUString(RTL_CONSTASCII_USTRINGPARAM( "XInitialization::initialize() called without arguments." )), + OUString( "XInitialization::initialize() called without arguments." ), static_cast< css::ui::dialogs::XFilePicker2* >( this ), 1); diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index cfff74feff01..9fa5112a8b6d 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -244,7 +244,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) //------------------------------------------------- // Get global factory for uno services. - OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); + OUString rdbName = OUString( RDB_SYSPATH ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); // Print a message if an error occurred. @@ -263,7 +263,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) Reference< XFilePicker > xFilePicker = Reference< XFilePicker >( g_xFactory->createInstanceWithArguments( - OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME )), arguments ), UNO_QUERY ); + OUString( FILE_PICKER_SERVICE_NAME ), arguments ), UNO_QUERY ); // install a FilePicker notifier Reference< XFilePickerListener > xFPListener( diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx index 7f963221d348..7619e0d99d1b 100644 --- a/fpicker/source/win32/folderpicker/FolderPicker.cxx +++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx @@ -147,7 +147,7 @@ sal_Int16 SAL_CALL CFolderPicker::execute( ) OUString SAL_CALL CFolderPicker::getImplementationName( ) throw( RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDERPICKER_IMPL_NAME )); + return OUString( FOLDERPICKER_IMPL_NAME ); } // XServiceInfo diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx index e0497d25a688..fddb157d4058 100644 --- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx +++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx @@ -77,7 +77,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) //------------------------------------------------- // Get global factory for uno services. - OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); + OUString rdbName = OUString( RDB_SYSPATH ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); // Print a message if an error occurred. @@ -96,7 +96,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ ) Reference< XFolderPicker2 > xFolderPicker; xFolderPicker = Reference< XFolderPicker2 >( - g_xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM ( FOLDER_PICKER_SERVICE_NAME ) ) ), UNO_QUERY ); + g_xFactory->createInstance( OUString( FOLDER_PICKER_SERVICE_NAME ) ), UNO_QUERY ); if ( xFolderPicker.is() == sal_False ) { |