[Libreoffice-commits] core.git: accessibility/source basctl/source basic/source canvas/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Wed Sep 14 07:24:36 UTC 2016
accessibility/source/extended/accessibleiconchoicectrl.cxx | 8 ++---
accessibility/source/extended/accessibleiconchoicectrlentry.cxx | 8 ++---
accessibility/source/extended/accessiblelistbox.cxx | 8 ++---
accessibility/source/extended/accessiblelistboxentry.cxx | 8 ++---
accessibility/source/standard/vclxaccessiblelistitem.cxx | 8 ++---
accessibility/source/standard/vclxaccessibletoolboxitem.cxx | 10 ++----
basctl/source/basicide/basicrenderable.cxx | 15 ++++------
basctl/source/basicide/baside2b.cxx | 6 +---
basic/source/uno/dlgcont.cxx | 7 +---
basic/source/uno/scriptcont.cxx | 7 +---
canvas/source/tools/parametricpolypolygon.cxx | 9 ++----
11 files changed, 34 insertions(+), 60 deletions(-)
New commits:
commit f1018190a8f791b7dca195f223b9c987a73a83af
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Tue Sep 13 13:48:00 2016 +0200
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 at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index aa9d9ab..7b4708c 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 119e603..d60fe59 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 30bd2c7..4436500 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 a087d6f..cd70de1 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 52724e64..c21cee4 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 f772b7f..9d18900 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 6983244..d30171c 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 b4beb58..e511f74 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 ec6d3c6..5d5b450 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 38fff90..ff1b567 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 af9d6ec..8e8c980 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(
More information about the Libreoffice-commits
mailing list