sd/source/ui/unoidl/unomodel.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit f019739e886e3d97dcd97f1488c8011247bae8b8 Author: Henry Castro <[email protected]> AuthorDate: Thu Sep 18 09:46:33 2025 -0400 Commit: Henry Castro <[email protected]> CommitDate: Wed Oct 22 14:46:14 2025 +0200 sd: add transitionLabel JSON property Add transition label for a11y screen reader announcements. Change-Id: I2b6396fff748e3422a7a8fc83821aae4c94cd4e9 Signed-off-by: Henry Castro <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191126 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192833 Tested-by: Jenkins diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 6fca2e1fc915..35877fc697d2 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -120,6 +120,7 @@ #include <rtl/math.hxx> #include <tools/helpers.hxx> #include <tools/json_writer.hxx> +#include <TransitionPreset.hxx> // Support creation of GraphicStorageHandler and EmbeddedObjectResolver #include <svx/xmleohlp.hxx> @@ -4809,6 +4810,22 @@ OString SdXImpressDocument::getPresentationInfo(bool bAllyState) const SAL_WARN("sd", "Transition sub-type unknown: " << nTransitionSubtype); } + if (bAllyState) + { + const TransitionPresetList& rList = TransitionPreset::getTransitionPresetList(); + auto aTransition = std::find_if(rList.begin(), rList.end(), + [nTransitionType, + nTransitionSubtype](const TransitionPresetPtr& rxPreset) { + return (rxPreset->getTransition() == nTransitionType) + && (rxPreset->getSubtype() == nTransitionSubtype); + }); + + if (aTransition != rList.end()) + { + aJsonWriter.put("transitionLabel", (*aTransition)->getSetLabel()); + } + } + bool nTransitionDirection = false; pSlide->getPropertyValue("TransitionDirection") >>= nTransitionDirection; aJsonWriter.put("transitionDirection", nTransitionDirection);
