Kaydet (Commit) f1018190 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

tdf#88205 use list ctor for uno::Sequence a11y to canvas

Change-Id: Ib719c94c0488b8a48fdb013bc8fbd1a988595d18
Reviewed-on: https://gerrit.libreoffice.org/28866Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1e49e33c
...@@ -146,11 +146,9 @@ namespace accessibility ...@@ -146,11 +146,9 @@ namespace accessibility
Sequence< OUString > AccessibleIconChoiceCtrl::getSupportedServiceNames_Static() throw (RuntimeException) Sequence< OUString > AccessibleIconChoiceCtrl::getSupportedServiceNames_Static() throw (RuntimeException)
{ {
Sequence< OUString > aSupported(3); return {"com.sun.star.accessibility.AccessibleContext",
aSupported[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aSupported[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.awt.AccessibleIconChoiceControl"};
aSupported[2] = "com.sun.star.awt.AccessibleIconChoiceControl";
return aSupported;
} }
OUString AccessibleIconChoiceCtrl::getImplementationName_Static() throw (RuntimeException) OUString AccessibleIconChoiceCtrl::getImplementationName_Static() throw (RuntimeException)
......
...@@ -249,11 +249,9 @@ throw(RuntimeException, std::exception) ...@@ -249,11 +249,9 @@ throw(RuntimeException, std::exception)
Sequence< OUString > AccessibleIconChoiceCtrlEntry::getSupportedServiceNames_Static() throw( RuntimeException ) Sequence< OUString > AccessibleIconChoiceCtrlEntry::getSupportedServiceNames_Static() throw( RuntimeException )
{ {
Sequence< OUString > aSupported(3); return {"com.sun.star.accessibility.AccessibleContext",
aSupported[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aSupported[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.awt.AccessibleIconChoiceControlEntry"};
aSupported[2] = "com.sun.star.awt.AccessibleIconChoiceControlEntry";
return aSupported;
} }
OUString AccessibleIconChoiceCtrlEntry::getImplementationName_Static() throw( RuntimeException ) OUString AccessibleIconChoiceCtrlEntry::getImplementationName_Static() throw( RuntimeException )
......
...@@ -337,11 +337,9 @@ namespace accessibility ...@@ -337,11 +337,9 @@ namespace accessibility
Sequence< OUString > AccessibleListBox::getSupportedServiceNames_Static() throw( RuntimeException ) Sequence< OUString > AccessibleListBox::getSupportedServiceNames_Static() throw( RuntimeException )
{ {
Sequence< OUString > aSupported(3); return {"com.sun.star.accessibility.AccessibleContext",
aSupported[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aSupported[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.awt.AccessibleTreeListBox"};
aSupported[2] = "com.sun.star.awt.AccessibleTreeListBox";
return aSupported;
} }
OUString AccessibleListBox::getImplementationName_Static() throw( RuntimeException ) OUString AccessibleListBox::getImplementationName_Static() throw( RuntimeException )
......
...@@ -274,11 +274,9 @@ namespace accessibility ...@@ -274,11 +274,9 @@ namespace accessibility
Sequence< OUString > AccessibleListBoxEntry::getSupportedServiceNames_Static() throw( RuntimeException ) Sequence< OUString > AccessibleListBoxEntry::getSupportedServiceNames_Static() throw( RuntimeException )
{ {
Sequence< OUString > aSupported(3); return {"com.sun.star.accessibility.AccessibleContext",
aSupported[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aSupported[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.awt.AccessibleTreeListBoxEntry"};
aSupported[2] = "com.sun.star.awt.AccessibleTreeListBoxEntry";
return aSupported;
} }
OUString AccessibleListBoxEntry::getImplementationName_Static() throw( RuntimeException ) OUString AccessibleListBoxEntry::getImplementationName_Static() throw( RuntimeException )
......
...@@ -198,11 +198,9 @@ sal_Bool VCLXAccessibleListItem::supportsService( const OUString& rServiceName ) ...@@ -198,11 +198,9 @@ sal_Bool VCLXAccessibleListItem::supportsService( const OUString& rServiceName )
Sequence< OUString > VCLXAccessibleListItem::getSupportedServiceNames() throw (RuntimeException, std::exception) Sequence< OUString > VCLXAccessibleListItem::getSupportedServiceNames() throw (RuntimeException, std::exception)
{ {
Sequence< OUString > aNames(3); return {"com.sun.star.accessibility.AccessibleContext",
aNames[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aNames[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.accessibility.AccessibleListItem"};
aNames[2] = "com.sun.star.accessibility.AccessibleListItem";
return aNames;
} }
// XAccessible // XAccessible
......
...@@ -305,12 +305,10 @@ sal_Bool VCLXAccessibleToolBoxItem::supportsService( const OUString& rServiceNam ...@@ -305,12 +305,10 @@ sal_Bool VCLXAccessibleToolBoxItem::supportsService( const OUString& rServiceNam
Sequence< OUString > VCLXAccessibleToolBoxItem::getSupportedServiceNames() throw (RuntimeException, std::exception) Sequence< OUString > VCLXAccessibleToolBoxItem::getSupportedServiceNames() throw (RuntimeException, std::exception)
{ {
Sequence< OUString > aNames(4); return {"com.sun.star.accessibility.AccessibleContext",
aNames[0] = "com.sun.star.accessibility.AccessibleContext"; "com.sun.star.accessibility.AccessibleComponent",
aNames[1] = "com.sun.star.accessibility.AccessibleComponent"; "com.sun.star.accessibility.AccessibleExtendedComponent",
aNames[2] = "com.sun.star.accessibility.AccessibleExtendedComponent"; "com.sun.star.accessibility.AccessibleToolBoxItem"};
aNames[3] = "com.sun.star.accessibility.AccessibleToolBoxItem";
return aNames;
} }
// XAccessible // XAccessible
......
...@@ -48,15 +48,12 @@ Renderable::Renderable (BaseWindow* pWin) ...@@ -48,15 +48,12 @@ Renderable::Renderable (BaseWindow* pWin)
// create a choice for the range to print // create a choice for the range to print
OUString aPrintContentName( "PrintContent" ); OUString aPrintContentName( "PrintContent" );
Sequence< OUString > aChoices( 2 ); const Sequence<OUString> aChoices{IDE_RESSTR(RID_STR_PRINTDLG_ALLPAGES),
Sequence< OUString > aHelpIds( 2 ); IDE_RESSTR(RID_STR_PRINTDLG_PAGES)};
Sequence< OUString > aWidgetIds( 2 ); const Sequence<OUString> aHelpIds{".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0",
aChoices[0] = IDE_RESSTR( RID_STR_PRINTDLG_ALLPAGES ); ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"};
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ; const Sequence<OUString> aWidgetIds{"printallpages",
aChoices[1] = IDE_RESSTR( RID_STR_PRINTDLG_PAGES ); "printpages"};
aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
aWidgetIds[0] = "printallpages" ;
aWidgetIds[1] = "printpages" ;
m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds, aPrintContentName, aHelpIds, aPrintContentName,
aChoices, 0); aChoices, 0);
......
...@@ -239,10 +239,8 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : ...@@ -239,10 +239,8 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) :
osl::MutexGuard g(mutex_); osl::MutexGuard g(mutex_);
notifier_ = n; notifier_ = n;
} }
Sequence< OUString > s(2); const Sequence<OUString> aPropertyNames{"FontHeight", "FontName"};
s[0] = "FontHeight"; n->addPropertiesChangeListener(aPropertyNames, listener_.get());
s[1] = "FontName";
n->addPropertiesChangeListener(s, listener_.get());
} }
......
...@@ -454,11 +454,8 @@ OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (Run ...@@ -454,11 +454,8 @@ OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (Run
Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException, std::exception) Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{ {
Sequence< OUString > aServiceNames( 2 ); return {"com.sun.star.script.DocumentDialogLibraryContainer",
aServiceNames[0] = "com.sun.star.script.DocumentDialogLibraryContainer"; "com.sun.star.script.DialogLibraryContainer"}; // for compatibility
// plus, for compatibility:
aServiceNames[1] = "com.sun.star.script.DialogLibraryContainer";
return aServiceNames;
} }
// Implementation class SfxDialogLibrary // Implementation class SfxDialogLibrary
......
...@@ -1172,11 +1172,8 @@ OUString SAL_CALL SfxScriptLibraryContainer::getImplementationName( ) ...@@ -1172,11 +1172,8 @@ OUString SAL_CALL SfxScriptLibraryContainer::getImplementationName( )
Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceNames( ) Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceNames( )
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
Sequence< OUString > aServiceNames( 2 ); return {"com.sun.star.script.DocumentScriptLibraryContainer",
aServiceNames[0] = "com.sun.star.script.DocumentScriptLibraryContainer"; "com.sun.star.script.ScriptLibraryContainer"}; // for compatibility
// plus, for compatibility:
aServiceNames[1] = "com.sun.star.script.ScriptLibraryContainer";
return aServiceNames;
} }
// Implementation class SfxScriptLibrary // Implementation class SfxScriptLibrary
......
...@@ -40,12 +40,9 @@ namespace canvas ...@@ -40,12 +40,9 @@ namespace canvas
{ {
uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames() uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames()
{ {
uno::Sequence<OUString> aRet(3); return {"LinearGradient",
aRet[0] = "LinearGradient"; "EllipticalGradient",
aRet[1] = "EllipticalGradient"; "RectangularGradient"};
aRet[2] = "RectangularGradient";
return aRet;
} }
ParametricPolyPolygon* ParametricPolyPolygon::create( ParametricPolyPolygon* ParametricPolyPolygon::create(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment