sw/source/core/access/acccell.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit 19182801fcb67fde8b4bdd4715c2a5388681eca6 Author: Michael Weghorn <[email protected]> AuthorDate: Mon Jan 19 17:46:09 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Jan 20 10:41:04 2026 +0100 tdf#170338 sw a11y: Use cell names in formula For the "Formula" extended/object attribute reported for Writer table cells that have a formula, make sure to use readable cell references like "<A1>" in the formula reported on the a11y level instead of internal pointers like "<94789629766128>". Change-Id: I12519d6babd6e48cc632cf138b7b926c3fc51139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197604 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx index c8111426bec2..fcf9c0ecc58c 100644 --- a/sw/source/core/access/acccell.cxx +++ b/sw/source/core/access/acccell.cxx @@ -313,6 +313,17 @@ OUString SAL_CALL SwAccessibleCell::getExtendedAttributes() if (sFormula.isEmpty()) return OUString(); + // ensure the use of readable cell references (like "<A1>") instead of internal pointers + if (const SwTabFrame* pTabFrame = m_pAccTable ? m_pAccTable->GetTabFrame() : nullptr) + { + if (const SwTable* pTable = pTabFrame->GetTable()) + { + SwTableBoxFormula aFormulaCopy(tbl_formula); + aFormulaCopy.PtrToBoxNm(pTable); + sFormula = aFormulaCopy.GetFormula(); + } + } + sFormula = sFormula.replaceAll(u"\", u"\\") .replaceAll(u";", u"\;") .replaceAll(u"=", u"\=")
