desktop/source/lib/init.cxx | 9 ++++++++- include/vcl/ITiledRenderable.hxx | 2 +- sd/inc/unomodel.hxx | 2 +- sd/source/ui/unoidl/unomodel.cxx | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit 24d7dfd11f1f9d4f6404cbc51e6ec5104e1503e8 Author: Henry Castro <[email protected]> AuthorDate: Tue Sep 9 08:09:05 2025 -0400 Commit: Henry Castro <[email protected]> CommitDate: Wed Oct 15 18:36:37 2025 +0200 sd: add "bAllyState" parameter to "getPresentationInfo" function To check if the user has enabled the accessibility feature flag, verify the corresponding setting. Change-Id: Iae44631ca4b2359f29f3aba6d5434789e29c1717 Signed-off-by: Henry Castro <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190705 Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192440 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fd181d521e02..ad6e20f69960 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5766,7 +5766,14 @@ static char* doc_getPresentationInfo(LibreOfficeKitDocument* pThis) return nullptr; } - return convertOString(pDoc->getPresentationInfo()); + bool bAllyState = false; + SfxViewShell* pViewShell = SfxViewShell::Current(); + if (pViewShell) + { + bAllyState = pViewShell->GetLOKAccessibilityState(); + } + + return convertOString(pDoc->getPresentationInfo(bAllyState)); } static bool doc_createSlideRenderer( diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index 3e02f1506a0a..1adcc3b2395d 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -395,7 +395,7 @@ public: virtual OString getViewRenderState(SfxViewShell* = nullptr) { return rtl::OString(); } /** Return JSON structure filled with the information about the presentation (Impress only function) */ - virtual OString getPresentationInfo() const + virtual OString getPresentationInfo(bool = false /*bAllyState*/) const { return {}; } diff --git a/sd/inc/unomodel.hxx b/sd/inc/unomodel.hxx index baeb20a0ff56..95cfafc10b02 100644 --- a/sd/inc/unomodel.hxx +++ b/sd/inc/unomodel.hxx @@ -299,7 +299,7 @@ public: SD_DLLPUBLIC virtual void getCommandValues(tools::JsonWriter& rJsonWriter, std::string_view rCommand) override; /// @see vcl::ITiledRenderable::getPresentationInfo(). - SD_DLLPUBLIC OString getPresentationInfo() const override; + SD_DLLPUBLIC OString getPresentationInfo(bool bAllyState = false) const override; /// @see vcl::ITiledRenderable::createSlideRenderer(). SD_DLLPUBLIC bool createSlideRenderer( const OString& rSlideHash, diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 1bd468942743..9acd1e342dbc 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4604,7 +4604,7 @@ void getShapeClickAction(const uno::Reference<drawing::XShape> &xShape, ::tools: } } -OString SdXImpressDocument::getPresentationInfo() const +OString SdXImpressDocument::getPresentationInfo(bool bAllyState) const { ::tools::JsonWriter aJsonWriter; @@ -4656,6 +4656,8 @@ OString SdXImpressDocument::getPresentationInfo() const { auto aName = SdDrawPage::getPageApiNameFromUiName(pPage->GetName()); aJsonWriter.put("name", aName); + + if (bAllyState) { OUStringBuffer aHtml; SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
