officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu | 6 - sd/inc/strings.hrc | 4 sd/source/console/AccessibleObject.cxx | 2 sd/source/console/PresenterAccessibility.cxx | 52 ++-------- 4 files changed, 19 insertions(+), 45 deletions(-)
New commits: commit e896bbbd55af7eac5d4f60af56b134f85afcbd78 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 15:31:30 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:01:26 2025 +0100 sd presenter a11y: No longer read a11y names from config Instead of reading strings for the a11y names to use for the Impress Presenter Console objects, use the usual approach for translatable strings. This is simpler and I see no reason to have those accessible names configurable. Maybe the previous approach was somehow related to the fact that Presenter Console used to be an extension before commit ea91c7d90d74e1ca039ba669b5d3e14fa359c0fa Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Nov 21 17:19:28 2012 +0100 Turn presenter screen from bundled extension to plain code Change-Id: I55b5e525913f429ec60a1c21b7bf162870d79af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182325 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu b/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu index b21e67fd9e47..520bcaaa456b 100644 --- a/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu +++ b/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu @@ -2088,17 +2088,17 @@ <node oor:name="Accessibility"> <node oor:name="Console" oor:op="replace"> <prop oor:name="String"> - <value xml:lang="en-US">Presenter Console</value> + <value xml:lang="en-US">DUMMY_NO_MORE_USED</value> </prop> </node> <node oor:name="Preview" oor:op="replace"> <prop oor:name="String"> - <value xml:lang="en-US">Current Slide Info</value> + <value xml:lang="en-US">DUMMY_NO_MORE_USED</value> </prop> </node> <node oor:name="Notes" oor:op="replace"> <prop oor:name="String"> - <value xml:lang="en-US">Presenter Notes</value> + <value xml:lang="en-US">DUMMY_NO_MORE_USED</value> </prop> </node> </node> diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc index f408b5a01cc6..ccdd4b53c16e 100644 --- a/sd/inc/strings.hrc +++ b/sd/inc/strings.hrc @@ -476,4 +476,8 @@ #define STR_MANY_MASTER_PAGES NC_("STR_MANY_MASTER_PAGES", "%n Master Slides") #define STR_MANY_MASTER_PAGES_DETAIL NC_("STR_MANY_MASTER_PAGES_DETAIL", "Large amounts of Master Slides degrade loading performance") +#define STR_A11Y_PRESENTER_CONSOLE NC_("STR_A11Y_PRESENTER_CONSOLE", "Presenter Console") +#define STR_A11Y_PRESENTER_PREVIEW NC_("STR_A11Y_PRESENTER_PREVIEW", "Current Slide Info") +#define STR_A11Y_PRESENTER_NOTES NC_("STR_A11Y_PRESENTER_NOTES", "Presenter Notes") + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/console/PresenterAccessibility.cxx b/sd/source/console/PresenterAccessibility.cxx index abc593f5b268..aade4827ad06 100644 --- a/sd/source/console/PresenterAccessibility.cxx +++ b/sd/source/console/PresenterAccessibility.cxx @@ -20,12 +20,14 @@ #include "AccessibleFocusManager.hxx" #include "PresenterAccessibility.hxx" #include "PresenterTextView.hxx" -#include "PresenterConfigurationAccess.hxx" #include "PresenterNotesView.hxx" #include "PresenterPaneBase.hxx" #include "PresenterPaneContainer.hxx" #include "PresenterPaneFactory.hxx" +#include <strings.hrc> +#include <sdresid.hxx> + #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleRelationType.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -59,17 +61,9 @@ namespace { class AccessibleConsole { public: - static rtl::Reference<AccessibleObject> Create ( - const css::uno::Reference<css::uno::XComponentContext>& rxContext) + static rtl::Reference<AccessibleObject> Create() { - OUString sName (u"Presenter Console"_ustr); - PresenterConfigurationAccess aConfiguration ( - rxContext, - u"/org.openoffice.Office.PresenterScreen/"_ustr, - PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Console/String"_ustr) - >>= sName; - + const OUString sName = SdResId(STR_A11Y_PRESENTER_CONSOLE); rtl::Reference<AccessibleObject> pObject ( new AccessibleObject(AccessibleRole::PANEL, sName)); pObject->LateInitialization(); @@ -84,21 +78,11 @@ public: class AccessiblePreview { public: - static rtl::Reference<AccessibleObject> Create ( - const Reference<css::uno::XComponentContext>& rxContext, + static rtl::Reference<AccessibleObject> Create( const Reference<awt::XWindow>& rxContentWindow, const Reference<awt::XWindow>& rxBorderWindow) { - OUString sName (u"Presenter Notes Window"_ustr); - { - PresenterConfigurationAccess aConfiguration ( - rxContext, - u"/org.openoffice.Office.PresenterScreen/"_ustr, - PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Preview/String"_ustr) - >>= sName; - } - + const OUString sName = SdResId(STR_A11Y_PRESENTER_PREVIEW); rtl::Reference<AccessibleObject> pObject ( new AccessibleObject( AccessibleRole::LABEL, @@ -118,8 +102,7 @@ class AccessibleNotes : public AccessibleObject public: AccessibleNotes(const OUString& rsName); - static rtl::Reference<AccessibleObject> Create ( - const css::uno::Reference<css::uno::XComponentContext>& rxContext, + static rtl::Reference<AccessibleObject> Create( const Reference<awt::XWindow>& rxContentWindow, const Reference<awt::XWindow>& rxBorderWindow, const std::shared_ptr<PresenterTextView>& rpTextView); @@ -258,7 +241,6 @@ void PresenterAccessible::UpdateAccessibilityHierarchy ( if (mxPreviewContentWindow.is()) { mpAccessiblePreview = AccessiblePreview::Create( - mxComponentContext, mxPreviewContentWindow, mxPreviewBorderWindow); mpAccessibleConsole->AddChild(mpAccessiblePreview); @@ -281,7 +263,6 @@ void PresenterAccessible::UpdateAccessibilityHierarchy ( if (mxNotesContentWindow.is()) { mpAccessibleNotes = AccessibleNotes::Create( - mxComponentContext, mxNotesContentWindow, mxNotesBorderWindow, rpNotesTextView); @@ -340,8 +321,7 @@ Reference<XAccessibleContext> SAL_CALL PresenterAccessible::getAccessibleContext mxMainWindow = xMainPane->getWindow(); mxMainWindow->addFocusListener(this); } - mpAccessibleConsole = AccessibleConsole::Create( - mxComponentContext); + mpAccessibleConsole = AccessibleConsole::Create(); mpAccessibleConsole->SetWindow(mxMainWindow, nullptr); mpAccessibleConsole->SetAccessibleParent(mxAccessibleParent); UpdateAccessibilityHierarchy(); @@ -393,22 +373,12 @@ AccessibleNotes::AccessibleNotes(const OUString& rsName) { } -rtl::Reference<AccessibleObject> AccessibleNotes::Create ( - const css::uno::Reference<css::uno::XComponentContext>& rxContext, +rtl::Reference<AccessibleObject> AccessibleNotes::Create( const Reference<awt::XWindow>& rxContentWindow, const Reference<awt::XWindow>& rxBorderWindow, const std::shared_ptr<PresenterTextView>& rpTextView) { - OUString sName (u"Presenter Notes Text"_ustr); - { - PresenterConfigurationAccess aConfiguration ( - rxContext, - u"/org.openoffice.Office.PresenterScreen/"_ustr, - PresenterConfigurationAccess::READ_ONLY); - aConfiguration.GetConfigurationNode(u"Presenter/Accessibility/Notes/String"_ustr) - >>= sName; - } - + const OUString sName = SdResId(STR_A11Y_PRESENTER_NOTES); rtl::Reference<AccessibleNotes> pObject ( new AccessibleNotes(sName)); pObject->LateInitialization(); commit 6e433b1aa65a661fbea8a64ed5eff8e336e452c1 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Feb 27 15:08:24 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Feb 27 23:01:18 2025 +0100 sd presenter a11y: Don't report a11y name also as description AccessibleObject::msName already gets returned in AccessiblePresenterObject::getAccessibleName, so don't use it for the accessible description in addition, but return an empty string instead. Change-Id: I7a9fe978fff4704927a7456830235268b2c8f67c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182324 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/sd/source/console/AccessibleObject.cxx b/sd/source/console/AccessibleObject.cxx index a77712f63596..28667cfaa631 100644 --- a/sd/source/console/AccessibleObject.cxx +++ b/sd/source/console/AccessibleObject.cxx @@ -151,7 +151,7 @@ OUString SAL_CALL { ThrowIfDisposed(); - return msName; + return OUString(); } OUString SAL_CALL