diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:18:55 +0000 |
commit | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch) | |
tree | 846cce228d7ff120abc40b7767b251c2e04b2a30 /svx/source/tbxctrls | |
parent | 35f5833ca35dc170b67ed9f8e288302eb06eb972 (diff) |
use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"
Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/bulletsnumbering.cxx | 3 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.cxx | 12 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 6 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunocontroller.cxx | 3 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 21 |
5 files changed, 15 insertions, 30 deletions
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 305f3a3af5ed..92896cc74081 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -262,8 +262,7 @@ OUString SAL_CALL NumberingToolBoxControl::getImplementationName() css::uno::Sequence< OUString > SAL_CALL NumberingToolBoxControl::getSupportedServiceNames() throw ( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aRet( 1 ); - aRet[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" }; return aRet; } diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 0d68e606dba5..80bda78901aa 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -274,8 +274,7 @@ OUString SAL_CALL ExtrusionDirectionControl_getImplementationName() Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -518,8 +517,7 @@ OUString SAL_CALL ExtrusionDepthController_getImplementationName() Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -791,8 +789,7 @@ OUString SAL_CALL ExtrusionLightingControl_getImplementationName() Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -935,8 +932,7 @@ OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName() Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 23ebb5aee81f..d92e3e57f65d 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -395,8 +395,7 @@ OUString SAL_CALL FontworkAlignmentControl_getImplementationName() Sequence< OUString > SAL_CALL FontworkAlignmentControl_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -631,8 +630,7 @@ OUString SAL_CALL FontworkCharacterSpacingControl_getImplementationName() Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException ) { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 0aba9071d61c..0ccfbd692ebf 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -322,8 +322,7 @@ throw( uno::RuntimeException, std::exception ) uno::Sequence< OUString > SAL_CALL FontHeightToolBoxControl::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.frame.ToolbarController"; + uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 72a523e222cf..4912f328b433 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -415,8 +415,7 @@ sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& Se css::uno::Sequence< OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -570,8 +569,7 @@ sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString css::uno::Sequence< OUString > SAL_CALL UpDownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -660,8 +658,7 @@ sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& S css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -754,8 +751,7 @@ sal_Bool SAL_CALL SearchFormattedToolboxController::supportsService( const OUStr css::uno::Sequence< OUString > SAL_CALL SearchFormattedToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -848,8 +844,7 @@ sal_Bool SAL_CALL FindAllToolboxController::supportsService( const OUString& Ser css::uno::Sequence< OUString > SAL_CALL FindAllToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -932,8 +927,7 @@ sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL ExitSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } @@ -1027,8 +1021,7 @@ sal_Bool SAL_CALL SearchLabelToolboxController::supportsService( const OUString& css::uno::Sequence< OUString > SAL_CALL SearchLabelToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - css::uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.frame.ToolbarController"; + css::uno::Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" }; return aSNS; } |