summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-09-13 13:48:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-14 07:23:51 +0000
commitf1018190a8f791b7dca195f223b9c987a73a83af (patch)
tree180d64f8e79de8334d91a0ebb237a2c08066fafd
parent1e49e33c26950b606714c0dafb26cbcb2aeb3877 (diff)
tdf#88205 use list ctor for uno::Sequence a11y to canvas
Change-Id: Ib719c94c0488b8a48fdb013bc8fbd1a988595d18 Reviewed-on: https://gerrit.libreoffice.org/28866 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx8
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx8
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx8
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx10
-rw-r--r--basctl/source/basicide/basicrenderable.cxx15
-rw-r--r--basctl/source/basicide/baside2b.cxx6
-rw-r--r--basic/source/uno/dlgcont.cxx7
-rw-r--r--basic/source/uno/scriptcont.cxx7
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx9
11 files changed, 34 insertions, 60 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index aa9d9abc5754..7b4708c0ad57 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -146,11 +146,9 @@ namespace accessibility
Sequence< OUString > AccessibleIconChoiceCtrl::getSupportedServiceNames_Static() throw (RuntimeException)
{
- Sequence< OUString > aSupported(3);
- aSupported[0] = "com.sun.star.accessibility.AccessibleContext";
- aSupported[1] = "com.sun.star.accessibility.AccessibleComponent";
- aSupported[2] = "com.sun.star.awt.AccessibleIconChoiceControl";
- return aSupported;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.awt.AccessibleIconChoiceControl"};
}
OUString AccessibleIconChoiceCtrl::getImplementationName_Static() throw (RuntimeException)
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 119e603b4c7b..d60fe598557d 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -249,11 +249,9 @@ throw(RuntimeException, std::exception)
Sequence< OUString > AccessibleIconChoiceCtrlEntry::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString > aSupported(3);
- aSupported[0] = "com.sun.star.accessibility.AccessibleContext";
- aSupported[1] = "com.sun.star.accessibility.AccessibleComponent";
- aSupported[2] = "com.sun.star.awt.AccessibleIconChoiceControlEntry";
- return aSupported;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.awt.AccessibleIconChoiceControlEntry"};
}
OUString AccessibleIconChoiceCtrlEntry::getImplementationName_Static() throw( RuntimeException )
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 30bd2c76c822..4436500b83f5 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -337,11 +337,9 @@ namespace accessibility
Sequence< OUString > AccessibleListBox::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString > aSupported(3);
- aSupported[0] = "com.sun.star.accessibility.AccessibleContext";
- aSupported[1] = "com.sun.star.accessibility.AccessibleComponent";
- aSupported[2] = "com.sun.star.awt.AccessibleTreeListBox";
- return aSupported;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.awt.AccessibleTreeListBox"};
}
OUString AccessibleListBox::getImplementationName_Static() throw( RuntimeException )
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index a087d6f625bd..cd70de11a83d 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -274,11 +274,9 @@ namespace accessibility
Sequence< OUString > AccessibleListBoxEntry::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString > aSupported(3);
- aSupported[0] = "com.sun.star.accessibility.AccessibleContext";
- aSupported[1] = "com.sun.star.accessibility.AccessibleComponent";
- aSupported[2] = "com.sun.star.awt.AccessibleTreeListBoxEntry";
- return aSupported;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.awt.AccessibleTreeListBoxEntry"};
}
OUString AccessibleListBoxEntry::getImplementationName_Static() throw( RuntimeException )
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index 52724e647b1b..c21cee4a1951 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -198,11 +198,9 @@ sal_Bool VCLXAccessibleListItem::supportsService( const OUString& rServiceName )
Sequence< OUString > VCLXAccessibleListItem::getSupportedServiceNames() throw (RuntimeException, std::exception)
{
- Sequence< OUString > aNames(3);
- aNames[0] = "com.sun.star.accessibility.AccessibleContext";
- aNames[1] = "com.sun.star.accessibility.AccessibleComponent";
- aNames[2] = "com.sun.star.accessibility.AccessibleListItem";
- return aNames;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.accessibility.AccessibleListItem"};
}
// XAccessible
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index f772b7f11789..9d189001e403 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -305,12 +305,10 @@ sal_Bool VCLXAccessibleToolBoxItem::supportsService( const OUString& rServiceNam
Sequence< OUString > VCLXAccessibleToolBoxItem::getSupportedServiceNames() throw (RuntimeException, std::exception)
{
- Sequence< OUString > aNames(4);
- aNames[0] = "com.sun.star.accessibility.AccessibleContext";
- aNames[1] = "com.sun.star.accessibility.AccessibleComponent";
- aNames[2] = "com.sun.star.accessibility.AccessibleExtendedComponent";
- aNames[3] = "com.sun.star.accessibility.AccessibleToolBoxItem";
- return aNames;
+ return {"com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.accessibility.AccessibleComponent",
+ "com.sun.star.accessibility.AccessibleExtendedComponent",
+ "com.sun.star.accessibility.AccessibleToolBoxItem"};
}
// XAccessible
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 6983244adfd0..d30171c78a6e 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -48,15 +48,12 @@ Renderable::Renderable (BaseWindow* pWin)
// create a choice for the range to print
OUString aPrintContentName( "PrintContent" );
- Sequence< OUString > aChoices( 2 );
- Sequence< OUString > aHelpIds( 2 );
- Sequence< OUString > aWidgetIds( 2 );
- aChoices[0] = IDE_RESSTR( RID_STR_PRINTDLG_ALLPAGES );
- aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ;
- aChoices[1] = IDE_RESSTR( RID_STR_PRINTDLG_PAGES );
- aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
- aWidgetIds[0] = "printallpages" ;
- aWidgetIds[1] = "printpages" ;
+ const Sequence<OUString> aChoices{IDE_RESSTR(RID_STR_PRINTDLG_ALLPAGES),
+ IDE_RESSTR(RID_STR_PRINTDLG_PAGES)};
+ const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0",
+ ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"};
+ const Sequence<OUString> aWidgetIds{"printallpages",
+ "printpages"};
m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds, aPrintContentName,
aChoices, 0);
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b4beb58f36c3..e511f74ad77a 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -239,10 +239,8 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) :
osl::MutexGuard g(mutex_);
notifier_ = n;
}
- Sequence< OUString > s(2);
- s[0] = "FontHeight";
- s[1] = "FontName";
- n->addPropertiesChangeListener(s, listener_.get());
+ const Sequence<OUString> aPropertyNames{"FontHeight", "FontName"};
+ n->addPropertiesChangeListener(aPropertyNames, listener_.get());
}
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index ec6d3c6815d2..5d5b45054d4d 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -454,11 +454,8 @@ OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (Run
Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aServiceNames( 2 );
- aServiceNames[0] = "com.sun.star.script.DocumentDialogLibraryContainer";
- // plus, for compatibility:
- aServiceNames[1] = "com.sun.star.script.DialogLibraryContainer";
- return aServiceNames;
+ return {"com.sun.star.script.DocumentDialogLibraryContainer",
+ "com.sun.star.script.DialogLibraryContainer"}; // for compatibility
}
// Implementation class SfxDialogLibrary
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 38fff90a6b56..ff1b567b22f1 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -1172,11 +1172,8 @@ OUString SAL_CALL SfxScriptLibraryContainer::getImplementationName( )
Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceNames( )
throw (RuntimeException, std::exception)
{
- Sequence< OUString > aServiceNames( 2 );
- aServiceNames[0] = "com.sun.star.script.DocumentScriptLibraryContainer";
- // plus, for compatibility:
- aServiceNames[1] = "com.sun.star.script.ScriptLibraryContainer";
- return aServiceNames;
+ return {"com.sun.star.script.DocumentScriptLibraryContainer",
+ "com.sun.star.script.ScriptLibraryContainer"}; // for compatibility
}
// Implementation class SfxScriptLibrary
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index af9d6ec3ea4b..8e8c980bc8bd 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -40,12 +40,9 @@ namespace canvas
{
uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames()
{
- uno::Sequence<OUString> aRet(3);
- aRet[0] = "LinearGradient";
- aRet[1] = "EllipticalGradient";
- aRet[2] = "RectangularGradient";
-
- return aRet;
+ return {"LinearGradient",
+ "EllipticalGradient",
+ "RectangularGradient"};
}
ParametricPolyPolygon* ParametricPolyPolygon::create(