sw/source/core/access/accpara.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5899f2d6794a02112f8b4e2983fb1d41527bf2d4
Author:     Colomban Wendling <cwendl...@hypra.fr>
AuthorDate: Thu Jun 8 17:43:49 2023 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Sun Jun 11 21:39:04 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>
    (cherry picked from commit 235b0a4d30598631218dcc289a9efa85cd52ed3a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152766
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

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) );
 

Reply via email to