sw/source/core/access/accpara.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 235b0a4d30598631218dcc289a9efa85cd52ed3a Author: Colomban Wendling <cwendl...@hypra.fr> AuthorDate: Thu Jun 8 17:43:49 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jun 8 22:44:26 2023 +0200 sw: Fix crash accessing default accessible attributes Fix crash accessing the name of the MMToPixelRatio item in the sequence returned by SwAccessibleParagraph::getDefaultAttributes(), because a temporary local was used as the property name, but got destroyed when the method returns. This was introduced in 46ce0d28b4c765076c7871358375c4e85e44534b, probably by inadvertently removing the `static` qualifier. Change-Id: I1d5004b0b0fdf9651781b9c71b67afeba61c284c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152748 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index bf88bda18bc4..c0599dbe3695 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1598,7 +1598,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes( _getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq ); // #i92233# - constexpr OUStringLiteral sMMToPixelRatio = u"MMToPixelRatio"; + static constexpr OUStringLiteral sMMToPixelRatio = u"MMToPixelRatio"; bool bProvideMMToPixelRatio( !aRequestedAttributes.hasElements() || (comphelper::findValue(aRequestedAttributes, sMMToPixelRatio) != -1) );