basctl/source/basicide/textwindowaccessibility.cxx |   17 ++++++-----------
 basctl/source/basicide/textwindowaccessibility.hxx |    2 +-
 2 files changed, 7 insertions(+), 12 deletions(-)

New commits:
commit 9b3f618747d704491877084bc3b1a0b39105d393
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Jun 26 13:37:30 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Jun 26 18:12:40 2025 +0200

    retrieveParagraphBounds always has false for bAbsolute param
    
    ever since
        commit 9ed4a07ceeafe09447431a8e2b8ce93a65cd2145
        Author: Michael Weghorn <[email protected]>
        Date:   Tue Jan 28 17:14:05 2025 +0100
        a11y: Use OAccessibleComponentHelper for text window Paragraph
    
    Change-Id: I2aa56a76ed4d8804d6bfcf93c45d9a8e83a16dfc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187042
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/textwindowaccessibility.cxx 
b/basctl/source/basicide/textwindowaccessibility.cxx
index 424f1993773f..d4a3f0f22c05 100644
--- a/basctl/source/basicide/textwindowaccessibility.cxx
+++ b/basctl/source/basicide/textwindowaccessibility.cxx
@@ -210,7 +210,7 @@ Paragraph::getAccessibleAtPoint(css::awt::Point const &)
 
 css::awt::Rectangle Paragraph::implGetBounds()
 {
-    return m_xDocument->retrieveParagraphBounds(this, false);
+    return m_xDocument->retrieveParagraphBounds(this);
 }
 
 // virtual
@@ -280,7 +280,7 @@ Paragraph::getCharacterBounds(::sal_Int32 nIndex)
 {
     ensureAlive();
     css::awt::Rectangle aBounds(m_xDocument->retrieveCharacterBounds(this, 
nIndex));
-    css::awt::Rectangle aParaBounds(m_xDocument->retrieveParagraphBounds(this, 
false));
+    css::awt::Rectangle 
aParaBounds(m_xDocument->retrieveParagraphBounds(this));
     aBounds.X -= aParaBounds.X;
     aBounds.Y -= aParaBounds.Y;
     return aBounds;
@@ -299,7 +299,7 @@ Paragraph::getIndexAtPoint(css::awt::Point const & rPoint)
 {
     ensureAlive();
     css::awt::Point aPoint(rPoint);
-    css::awt::Rectangle aParaBounds(m_xDocument->retrieveParagraphBounds(this, 
false));
+    css::awt::Rectangle 
aParaBounds(m_xDocument->retrieveParagraphBounds(this));
     aPoint.X += aParaBounds.X;
     aPoint.Y += aParaBounds.Y;
     return m_xDocument->retrieveCharacterIndex(this, aPoint);
@@ -652,8 +652,7 @@ css::lang::Locale Document::retrieveLocale()
 };
 
 css::awt::Rectangle
-Document::retrieveParagraphBounds(Paragraph const * pParagraph,
-                                  bool bAbsolute)
+Document::retrieveParagraphBounds(Paragraph const * pParagraph)
 {
     SolarMutexGuard aGuard;
     ::osl::MutexGuard aInternalGuard(GetMutex());
@@ -672,13 +671,9 @@ Document::retrieveParagraphBounds(Paragraph const * 
pParagraph,
     else
         nPos = std::accumulate(visibleBegin(), getIter(nPara), m_nViewOffset - 
m_nVisibleBeginOffset, lAddHeight);
 
-    Point aOrig(0, 0);
-    if (bAbsolute)
-        aOrig = Point(m_rView.GetWindow()->OutputToAbsoluteScreenPixel(aOrig));
-
     return css::awt::Rectangle(
-        static_cast< ::sal_Int32 >(aOrig.X()),
-        static_cast< ::sal_Int32 >(aOrig.Y()) + nPos - m_nViewOffset,
+        0,
+        nPos - m_nViewOffset,
         m_rView.GetWindow()->GetOutputSizePixel().Width(), 
getIter(nPara)->getHeight());
         // XXX  numeric overflow (3x)
 }
diff --git a/basctl/source/basicide/textwindowaccessibility.hxx 
b/basctl/source/basicide/textwindowaccessibility.hxx
index 77c63511f7bf..bdd3fb7aad2c 100644
--- a/basctl/source/basicide/textwindowaccessibility.hxx
+++ b/basctl/source/basicide/textwindowaccessibility.hxx
@@ -304,7 +304,7 @@ public:
     // still zero), pass a "Paragraph const &" instead of a
     // "::rtl::Reference< Paragraph > const &".
     css::awt::Rectangle
-    retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute);
+    retrieveParagraphBounds(Paragraph const * pParagraph);
 
     // To make it possible for this method to be (indirectly) called from
     // within Paragraph's constructor (i.e., when the Paragraph's ref count is

Reply via email to