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 | |
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')
-rw-r--r-- | svx/source/form/xfm_addcondition.cxx | 3 | ||||
-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 | ||||
-rw-r--r-- | svx/source/unodraw/UnoNamespaceMap.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unobtabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unoctabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unodtabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unogtabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unohtabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unomtabl.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unottabl.cxx | 3 |
16 files changed, 26 insertions, 52 deletions
diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx index b9727fc950c1..d65eff71b535 100644 --- a/svx/source/form/xfm_addcondition.cxx +++ b/svx/source/form/xfm_addcondition.cxx @@ -53,8 +53,7 @@ namespace svxform Sequence< OUString > SAL_CALL OAddConditionDialog_GetSupportedServiceNames() { - css::uno::Sequence<OUString> aSupported( 1 ); - aSupported.getArray()[0] = "com.sun.star.xforms.ui.dialogs.AddCondition"; + css::uno::Sequence<OUString> aSupported { "com.sun.star.xforms.ui.dialogs.AddCondition" }; return aSupported; } 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; } diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx index 0db90fa6ad40..066c1df4e02c 100644 --- a/svx/source/unodraw/UnoNamespaceMap.cxx +++ b/svx/source/unodraw/UnoNamespaceMap.cxx @@ -79,8 +79,7 @@ namespace svx Sequence< OUString > SAL_CALL NamespaceMap_getSupportedServiceNames() throw() { - Sequence< OUString > aSupportedServiceNames( 1 ); - aSupportedServiceNames[0] = "com.sun.star.xml.NamespaceMap"; + Sequence<OUString> aSupportedServiceNames { "com.sun.star.xml.NamespaceMap" }; return aSupportedServiceNames; } diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index 7b0c9ba1d6ac..342b08282ea7 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -85,8 +85,7 @@ OUString SAL_CALL SvxUnoBitmapTable::getImplementationName() throw( uno::Runtime uno::Sequence< OUString > SAL_CALL SvxUnoBitmapTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.drawing.BitmapTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.BitmapTable" }; return aSNS; } diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index aca0ca617884..bda46f67def5 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -82,8 +82,7 @@ OUString SAL_CALL SvxUnoColorTable::getImplementationName() throw( uno::RuntimeE uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.ColorTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.ColorTable" }; return aSNS; } diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx index 952369390aaf..cc7ce2f0e6fc 100644 --- a/svx/source/unodraw/unodtabl.cxx +++ b/svx/source/unodraw/unodtabl.cxx @@ -66,8 +66,7 @@ OUString SAL_CALL SvxUnoDashTable::getImplementationName() throw( uno::RuntimeEx uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.DashTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.DashTable" }; return aSNS; } diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx index 13f11ac93dbf..fc1b394851c8 100644 --- a/svx/source/unodraw/unogtabl.cxx +++ b/svx/source/unodraw/unogtabl.cxx @@ -65,8 +65,7 @@ OUString SAL_CALL SvxUnoGradientTable::getImplementationName() throw( uno::Runti uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.GradientTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.GradientTable" }; return aSNS; } diff --git a/svx/source/unodraw/unohtabl.cxx b/svx/source/unodraw/unohtabl.cxx index e510e186d39f..4d182766ea31 100644 --- a/svx/source/unodraw/unohtabl.cxx +++ b/svx/source/unodraw/unohtabl.cxx @@ -65,8 +65,7 @@ OUString SAL_CALL SvxUnoHatchTable::getImplementationName() throw( uno::RuntimeE uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.HatchTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.HatchTable" }; return aSNS; } diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index 0b200a17a80f..23723cb68247 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -141,8 +141,7 @@ OUString SAL_CALL SvxUnoMarkerTable::getImplementationName() throw( uno::Runtime uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.MarkerTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.MarkerTable" }; return aSNS; } diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 0cee1fef5c2a..7376b8e8172e 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -865,8 +865,7 @@ sal_Bool SAL_CALL SvxDrawPage::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[0] = "com.sun.star.drawing.ShapeCollection"; + uno::Sequence<OUString> aSeq { "com.sun.star.drawing.ShapeCollection" }; return aSeq; } diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index aae498f1cd9d..3d63ff953bc1 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -404,8 +404,7 @@ OUString SAL_CALL SvxUnoDrawPool::getImplementationName() throw( uno::RuntimeExc uno::Sequence< OUString > SAL_CALL SvxUnoDrawPool::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.Defaults"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.Defaults" }; return aSNS; } diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx index e380d51f63b8..0986195da6ad 100644 --- a/svx/source/unodraw/unottabl.cxx +++ b/svx/source/unodraw/unottabl.cxx @@ -65,8 +65,7 @@ OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() throw( uno:: uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames( ) throw( uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = "com.sun.star.drawing.TransparencyGradientTable"; + uno::Sequence<OUString> aSNS { "com.sun.star.drawing.TransparencyGradientTable" }; return aSNS; } |