include/svx/AccessibleOLEShape.hxx                                  |    2 -
 include/svx/AccessibleShape.hxx                                     |    2 -
 offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl |    2 -
 sc/source/ui/Accessibility/AccessibleCell.cxx                       |    4 +-
 sc/source/ui/Accessibility/AccessibleDocument.cxx                   |    9 
+----
 sc/source/ui/inc/AccessibleCell.hxx                                 |    2 -
 sc/source/ui/inc/AccessibleDocument.hxx                             |    2 -
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx           |    8 +---
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx                     |    2 -
 svx/source/accessibility/AccessibleOLEShape.cxx                     |    6 +--
 svx/source/accessibility/AccessibleShape.cxx                        |   10 
++---
 sw/source/core/access/acccell.cxx                                   |    8 +---
 sw/source/core/access/acccell.hxx                                   |    2 -
 sw/source/core/access/accdoc.cxx                                    |   17 
++++------
 sw/source/core/access/accdoc.hxx                                    |    2 -
 sw/source/core/access/accembedded.cxx                               |    6 +--
 sw/source/core/access/accembedded.hxx                               |    2 -
 sw/source/core/access/accpara.cxx                                   |    4 +-
 sw/source/core/access/accpara.hxx                                   |    2 -
 vcl/qa/cppunit/a11y/atspi2/atspi2.cxx                               |    4 --
 vcl/qt5/QtAccessibleWidget.cxx                                      |    3 -
 vcl/unx/gtk3/a11y/atktextattributes.cxx                             |    4 --
 vcl/unx/gtk4/a11y.cxx                                               |    3 -
 winaccessibility/source/UAccCOM/MAccessible.cxx                     |    4 --
 24 files changed, 43 insertions(+), 67 deletions(-)

New commits:
commit 894ff7b2df09221195399a750afd6ff464637097
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 23 16:15:15 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Apr 24 07:56:31 2025 +0200

    [API CHANGE] a11y: Return string for XAccessibleExtendedAttributes
    
    All XAccessibleExtendedAttributes::getExtendedAttributes
    implementations return a OUString wrapped in an Any (or
    an empty Any), and all consumers also expect that.
    
    Therefore, change the return type from Any to OUString
    to make that clearer and simpler.
    
    Change-Id: Ic6af692f72fd072c4039996f31208ac2098d2750
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184514
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/svx/AccessibleOLEShape.hxx 
b/include/svx/AccessibleOLEShape.hxx
index 3f34e78cec03..24c1b0795e15 100644
--- a/include/svx/AccessibleOLEShape.hxx
+++ b/include/svx/AccessibleOLEShape.hxx
@@ -89,7 +89,7 @@ public:
     virtual css::uno::Sequence< css::uno::Type> SAL_CALL
         getTypes() override;
 // ====== XAccessibleExtendedAttributes =====================================
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
 protected:
     /// Create a name string that contains the accessible name.
     virtual OUString
diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx
index 80f0830eb912..4a54a8466559 100644
--- a/include/svx/AccessibleShape.hxx
+++ b/include/svx/AccessibleShape.hxx
@@ -139,7 +139,7 @@ public:
         sal_Int64 nSelectedChildIndex ) override;
 
     // ====== XAccessibleExtendedAttributes 
=====================================
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
     /// Return this object's role.
     virtual sal_Int16 SAL_CALL getAccessibleRole() override;
     //=====  XAccessibleGroupPosition  
=========================================
diff --git 
a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl 
b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
index 3ba748f9f574..15bcc94170c9 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
@@ -22,7 +22,7 @@ module com { module sun { module star { module accessibility {
 interface XAccessibleExtendedAttributes : ::com::sun::star::uno::XInterface
 {
     /** Returns the attributes specific to this object, like a cell's formula. 
*/
-    any getExtendedAttributes() raises 
(::com::sun::star::lang::IndexOutOfBoundsException);
+    string getExtendedAttributes() raises 
(::com::sun::star::lang::IndexOutOfBoundsException);
 };
 
 }; }; }; };
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx 
b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 9beedb8af7c4..35288daa99fc 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -484,7 +484,7 @@ static OUString ReplaceFourChar(const OUString& oldOUString)
         .replaceAll(u":", u"\:");
 }
 
-uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
+OUString SAL_CALL ScAccessibleCell::getExtendedAttributes()
 {
     SolarMutexGuard aGuard;
 
@@ -522,7 +522,7 @@ uno::Any SAL_CALL ScAccessibleCell::getExtendedAttributes()
         sAttributes += strFor ;
     }
 
-    return uno::Any(sAttributes);
+    return sAttributes;
 }
 
 // cell has its own ParaIndent property, so when calling character attributes 
on cell, the ParaIndent should replace the ParaLeftMargin if its value is not 
zero.
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 0764572bd251..d1bd67a7686e 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2135,23 +2135,20 @@ ScAddress   ScAccessibleDocument::GetCurCellAddress() 
const
     return mpViewShell ? mpViewShell->GetViewData().GetCurPos() : ScAddress();
 }
 
-uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
+OUString SAL_CALL ScAccessibleDocument::getExtendedAttributes()
 {
     SolarMutexGuard g;
 
-    uno::Any anyAttribute;
-
     sal_uInt16 sheetIndex;
     OUString sSheetName;
     sheetIndex = getVisibleTable();
     if(GetDocument()==nullptr)
-        return anyAttribute;
+        return OUString();
     GetDocument()->GetName(sheetIndex,sSheetName);
     OUString sValue = "page-name:" + sSheetName +
         ";page-number:" + OUString::number(sheetIndex+1) +
         ";total-pages:" + OUString::number(GetDocument()->GetTableCount()) + 
";";
-    anyAttribute <<= sValue;
-    return anyAttribute;
+    return sValue;
 }
 
 sal_Int32 SAL_CALL ScAccessibleDocument::getForeground(  )
diff --git a/sc/source/ui/inc/AccessibleCell.hxx 
b/sc/source/ui/inc/AccessibleCell.hxx
index aa8edcf12278..0cb04e127db3 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -130,7 +130,7 @@ public:
     virtual css::uno::Sequence< OUString> SAL_CALL
         getSupportedServiceNames() override;
 
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
 
     // Override this method to handle cell's ParaIndent attribute specially.
     virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL 
getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& 
aRequestedAttributes ) override;
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx 
b/sc/source/ui/inc/AccessibleDocument.hxx
index eec10141a7bd..7ef7882efa79 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -112,7 +112,7 @@ public:
     virtual OUString SAL_CALL
         getAccessibleName() override;
 
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    virtual OUString SAL_CALL getExtendedAttributes() override ;
     ///=====  XAccessibleSelection  ===========================================
 
     virtual void SAL_CALL
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx 
b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 39ce21249ab3..2a93a8e4cda2 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -588,11 +588,10 @@ void
 {
 }
 
-uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
+OUString SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
 {
     ::osl::MutexGuard aGuard (m_aMutex);
 
-    uno::Any anyAttribute;
     OUStringBuffer sValue;
     if (auto pDrViewSh = dynamic_cast<::sd::DrawViewShell* > (mpViewShell))
     {
@@ -696,9 +695,8 @@ uno::Any SAL_CALL 
AccessibleDocumentViewBase::getExtendedAttributes()
                 + ";";
         }
     }
-    if (sValue.getLength())
-        anyAttribute <<= sValue.makeStringAndClear();
-    return anyAttribute;
+
+    return sValue.makeStringAndClear();
 }
 
 sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground(  )
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx 
b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index a3df91a41fc7..40c47d142f2e 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -206,7 +206,7 @@ public:
     virtual void SAL_CALL focusGained (const css::awt::FocusEvent& e) override;
     virtual void SAL_CALL focusLost (const css::awt::FocusEvent& e) override;
     //----------------------------xAttribute----------------------------
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
      ::sd::ViewShell* mpViewShell;
 private:
 
diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx 
b/svx/source/accessibility/AccessibleOLEShape.cxx
index ed7329decd1f..156de8e723b4 100644
--- a/svx/source/accessibility/AccessibleOLEShape.cxx
+++ b/svx/source/accessibility/AccessibleOLEShape.cxx
@@ -124,17 +124,15 @@ uno::Sequence<uno::Type> SAL_CALL 
AccessibleOLEShape::getTypes()
 }
 
 // XAccessibleExtendedAttributes
-uno::Any SAL_CALL AccessibleOLEShape::getExtendedAttributes()
+OUString SAL_CALL AccessibleOLEShape::getExtendedAttributes()
 {
-    uno::Any strRet;
     OUString style;
     if( m_pShape )
     {
         style = "style:" + 
static_cast<SdrOle2Obj*>(m_pShape)->GetStyleString();
     }
     style += ";";
-    strRet <<= style;
-    return strRet;
+    return style;
 }
 
 /// Set this object's name if is different to the current name.
diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 4b8a33c481ad..b9f27ae8864e 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -767,18 +767,18 @@ void SAL_CALL AccessibleShape::deselectAccessibleChild( 
sal_Int64 )
 }
 
 // XAccessibleExtendedAttributes
-uno::Any SAL_CALL AccessibleShape::getExtendedAttributes()
+OUString SAL_CALL AccessibleShape::getExtendedAttributes()
 {
-    uno::Any strRet;
     OUString style;
-    if( getAccessibleRole() != AccessibleRole::SHAPE ) return strRet;
+    if (getAccessibleRole() != AccessibleRole::SHAPE)
+        return OUString();
+
     if( m_pShape )
     {
         style = "style:" + GetStyle();
     }
     style += ";";
-    strRet <<= style;
-    return strRet;
+    return style;
 }
 
 // XServiceInfo
diff --git a/sw/source/core/access/acccell.cxx 
b/sw/source/core/access/acccell.cxx
index d826c2083843..2512c62031bb 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -316,11 +316,10 @@ uno::Any SwAccessibleCell::getMinimumIncrement(  )
     return uno::Any();
 }
 
-css::uno::Any SAL_CALL SwAccessibleCell::getExtendedAttributes()
+OUString SAL_CALL SwAccessibleCell::getExtendedAttributes()
 {
     SolarMutexGuard g;
 
-    css::uno::Any strRet;
     SwFrameFormat *pFrameFormat = GetTableBoxFormat();
     assert(pFrameFormat);
 
@@ -332,10 +331,7 @@ css::uno::Any SAL_CALL 
SwAccessibleCell::getExtendedAttributes()
                               .replaceAll(u"=", u"\=")
                               .replaceAll(u",", u"\,")
                               .replaceAll(u":", u"\:");
-    OUString strFor = "Formula:" + strFormula + ";";
-    strRet <<= strFor;
-
-    return strRet;
+    return "Formula:" + strFormula + ";";
 }
 
 sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
diff --git a/sw/source/core/access/acccell.hxx 
b/sw/source/core/access/acccell.hxx
index 3b5b503fd029..c45cbae98483 100644
--- a/sw/source/core/access/acccell.hxx
+++ b/sw/source/core/access/acccell.hxx
@@ -85,7 +85,7 @@ public:
     virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
 
     // XAccessibleExtendedAttributes
-    css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    OUString SAL_CALL getExtendedAttributes() override;
 private:
     SwFrameFormat* GetTableBoxFormat() const;
 
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index f9ee9aee9797..d6241a78183d 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -416,22 +416,21 @@ void SwAccessibleDocument::deselectAccessibleChild(
     maSelectionHelper.deselectAccessibleChild( nChildIndex );
 }
 
-uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
+OUString SAL_CALL SwAccessibleDocument::getExtendedAttributes()
 {
     SolarMutexGuard g;
 
-    uno::Any anyAttribute;
     SwDoc* pDoc = GetMap() ? GetShell().GetDoc() : nullptr;
 
     if (!pDoc)
-        return anyAttribute;
+        return OUString();
     SwCursorShell* pCursorShell = GetCursorShell();
     if( !pCursorShell )
-        return anyAttribute;
+        return OUString();
 
     SwFEShell* pFEShell = dynamic_cast<SwFEShell*>(pCursorShell);
     if (!pFEShell)
-        return anyAttribute;
+        return OUString();
 
     OUString sDisplay;
     sal_uInt16 nPage, nLogPage;
@@ -614,8 +613,7 @@ uno::Any SAL_CALL 
SwAccessibleDocument::getExtendedAttributes()
             OUString::number( nSctColCount ) + ";";
     }
 
-    anyAttribute <<= sValue;
-    return anyAttribute;
+    return sValue;
 }
 
 sal_Int32 SAL_CALL SwAccessibleDocument::getBackground()
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index 38ae588dbbdb..ba555547fea7 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -134,7 +134,7 @@ public:
     virtual void SAL_CALL deselectAccessibleChild(
         sal_Int64 nChildIndex ) override;
 
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
 
     // thread safe C++ interface
 
diff --git a/sw/source/core/access/accembedded.cxx 
b/sw/source/core/access/accembedded.cxx
index fae346d301df..41b46a28274a 100644
--- a/sw/source/core/access/accembedded.cxx
+++ b/sw/source/core/access/accembedded.cxx
@@ -88,11 +88,10 @@ uno::Sequence< sal_Int8 > SAL_CALL 
SwAccessibleEmbeddedObject::getImplementation
 }
 
 // XAccessibleExtendedAttributes
-css::uno::Any SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes()
+OUString SAL_CALL SwAccessibleEmbeddedObject::getExtendedAttributes()
 {
     SolarMutexGuard g;
 
-    css::uno::Any strRet;
     OUString style;
     SwFlyFrame* pFFrame = getFlyFrame();
 
@@ -112,8 +111,7 @@ css::uno::Any SAL_CALL 
SwAccessibleEmbeddedObject::getExtendedAttributes()
         }
         style += ";";
     }
-    strRet <<= style;
-    return strRet;
+    return style;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accembedded.hxx 
b/sw/source/core/access/accembedded.hxx
index ce82af9e2bbe..35a17ce5c62b 100644
--- a/sw/source/core/access/accembedded.hxx
+++ b/sw/source/core/access/accembedded.hxx
@@ -66,7 +66,7 @@ public:
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) 
override;
 
     // XAccessibleExtendedAttributes
-        virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 15451f44b90a..8434c667b02c 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3370,7 +3370,7 @@ bool SwAccessibleParagraph::IsBlockQuote()
     return false;
 }
 
-uno::Any SAL_CALL SwAccessibleParagraph::getExtendedAttributes()
+OUString SAL_CALL SwAccessibleParagraph::getExtendedAttributes()
 {
     SolarMutexGuard g;
 
@@ -3383,7 +3383,7 @@ uno::Any SAL_CALL 
SwAccessibleParagraph::getExtendedAttributes()
         strHeading = "level:" + OUString::number(m_nHeadingLevel) + ";";
     }
 
-    return uno::Any(strHeading);
+    return strHeading;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accpara.hxx 
b/sw/source/core/access/accpara.hxx
index 38612a586ae8..1399837f62c5 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -342,7 +342,7 @@ public:
     virtual sal_Bool SAL_CALL removeSelection( sal_Int32 selectionIndex ) 
override;
     virtual sal_Int32 SAL_CALL  addSelection( sal_Int32 selectionIndex, 
sal_Int32 startOffset, sal_Int32 endOffset) override;
     // XAccessibleExtendedAttributes
-    virtual css::uno::Any SAL_CALL getExtendedAttributes() override ;
+    virtual OUString SAL_CALL getExtendedAttributes() override;
     sal_Int32 GetRealHeadingLevel();
     bool IsBlockQuote();
 
diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx 
b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
index 97bb9bee61bc..643d7813d4b1 100644
--- a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
+++ b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
@@ -325,9 +325,7 @@ void Atspi2TestTree::compareObjects(const 
uno::Reference<accessibility::XAccessi
         = 
uno::Reference<accessibility::XAccessibleExtendedAttributes>(xLOContext, 
uno::UNO_QUERY))
     {
         // see atktextattributes.cxx:attribute_set_new_from_extended_attributes
-        const uno::Any anyVal = xLOAttrs->getExtendedAttributes();
-        OUString sExtendedAttrs;
-        anyVal >>= sExtendedAttrs;
+        const OUString sExtendedAttrs = xLOAttrs->getExtendedAttributes();
         sal_Int32 nIndex = 0;
 
         const auto atspiAttrs = pAtspiAccessible.getAttributes();
diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx
index 7438c5e368d1..03feffda5794 100644
--- a/vcl/qt5/QtAccessibleWidget.cxx
+++ b/vcl/qt5/QtAccessibleWidget.cxx
@@ -923,8 +923,7 @@ QHash<QAccessible::Attribute, QVariant> 
QtAccessibleWidget::attributes() const
     if (!xAttributes.is())
         return {};
 
-    OUString sAttrs;
-    xAttributes->getExtendedAttributes() >>= sAttrs;
+    const OUString sAttrs = xAttributes->getExtendedAttributes();
 
     QHash<QAccessible::Attribute, QVariant> aQtAttrs;
     sal_Int32 nIndex = 0;
diff --git a/vcl/unx/gtk3/a11y/atktextattributes.cxx 
b/vcl/unx/gtk3/a11y/atktextattributes.cxx
index 29b6acb515d6..d3d4d86bc9d2 100644
--- a/vcl/unx/gtk3/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk3/a11y/atktextattributes.cxx
@@ -1223,9 +1223,7 @@ attribute_set_new_from_extended_attributes(
 
     // extended attributes is a string of colon-separated pairs of property 
and value,
     // with pairs separated by semicolons. Example: 
"heading-level:2;weight:bold;"
-    uno::Any anyVal = rExtendedAttributes->getExtendedAttributes();
-    OUString sExtendedAttrs;
-    anyVal >>= sExtendedAttrs;
+    const OUString sExtendedAttrs = 
rExtendedAttributes->getExtendedAttributes();
     sal_Int32 nIndex = 0;
     do
     {
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index 9b1ba0193d3a..4f4222c9eeb3 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -374,8 +374,7 @@ applyObjectAttributes(GtkAccessible* pGtkAccessible,
     if (!xAttributes.is())
         return;
 
-    OUString sAttrs;
-    xAttributes->getExtendedAttributes() >>= sAttrs;
+    const OUString sAttrs = xAttributes->getExtendedAttributes();
 
     sal_Int32 nIndex = 0;
     do
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index f1a8a9b548b2..9d0c9485dfc5 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -2662,10 +2662,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP 
CMAccessible::get_attributes(/*[out]*/ BSTR *p
         {
             
css::uno::Reference<css::accessibility::XAccessibleExtendedAttributes> pRXAttr;
             pRXAttr = pRXI.get();
-            css::uno::Any  anyVal = pRXAttr->getExtendedAttributes();
 
-            OUString val;
-            anyVal >>= val;
+            const OUString val = pRXAttr->getExtendedAttributes();
             sAttributes += val;
         }
 
commit 40c86e05866fcb2f006898d0fc9b7893c151dab8
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 23 16:22:37 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Apr 24 07:56:25 2025 +0200

    sw a11y: Drop unnecessary cast
    
    SwContentFrame subclasses SwFrame, so there's no
    need to explicitly cast to the latter.
    
    Change-Id: Ib38dfdc8d05d77e2986c658e91ac31ad06f3e82d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184513
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index f7f4ceaf2ec4..f9ee9aee9797 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -449,7 +449,7 @@ uno::Any SAL_CALL 
SwAccessibleDocument::getExtendedAttributes()
             + ";cursor-position-in-page-vertical:" + 
OUString::number(aCursorPagePos.getY()) + ";";
 
     SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
-    SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
+    SwPageFrame* pCurrPage = pCurrFrame->FindPageFrame();
     sal_Int32 nLineNum = 0;
     SwTextFrame* pCurrTextFrame = nullptr;
     SwTextFrame* pTextFrame = 
static_cast<SwTextFrame*>(pCurrPage->ContainsContent());
commit 17c68a6e7405b2d563f7b56503b3596520ce07f1
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 23 16:21:13 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Apr 24 07:56:19 2025 +0200

    sw a11y: Assign variable value right away
    
    Change-Id: Ia80fceccbe8e1a3a743f1a95de88c5fba8653dfe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184512
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 95798872349c..f7f4ceaf2ec4 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -451,9 +451,8 @@ uno::Any SAL_CALL 
SwAccessibleDocument::getExtendedAttributes()
     SwContentFrame* pCurrFrame = pCursorShell->GetCurrFrame();
     SwPageFrame* pCurrPage=static_cast<SwFrame*>(pCurrFrame)->FindPageFrame();
     sal_Int32 nLineNum = 0;
-    SwTextFrame* pTextFrame = nullptr;
     SwTextFrame* pCurrTextFrame = nullptr;
-    pTextFrame = static_cast< SwTextFrame* >(pCurrPage->ContainsContent());
+    SwTextFrame* pTextFrame = 
static_cast<SwTextFrame*>(pCurrPage->ContainsContent());
     if (pCurrFrame->IsInFly())//such as, graphic,chart
     {
         SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame();

Reply via email to