sw/source/uibase/utlui/content.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 1cdb645efc4f4db71c7727aed8c03e6ffb5cf005
Author:     Jim Raykowski <[email protected]>
AuthorDate: Sat Dec 20 00:01:50 2025 -0900
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Thu Jan 8 18:34:31 2026 +0100

    tdf#170041 SwNavigator: Fix floating tables aren't highlighted fully
    
    Specifically, split frames holding floating tables aren't highlighted
    fully. This patch uses SwIterator<SwFrame, SwFormat> as observed in
    SwFrameFormat::DelFrames. Here it is used to visit all frames to
    highlight.
    
    Change-Id: I7d713cd9bca14acddcd5049b5cf81a34e403af72
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195961
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>
    (cherry picked from commit 8415e4a92b1ef047090679a70a9ff2e580c19071)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196090
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 5d10a4472c66..d33349144c0a 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -7688,10 +7688,14 @@ void SwContentTree::BringFramesToAttention(const 
std::vector<const SwFrameFormat
     {
         if (!pFrameFormat)
             continue;
-        SwRect aFrameRect = pFrameFormat->FindLayoutRect();
-        if (!aFrameRect.IsEmpty())
-            aRanges.emplace_back(aFrameRect.Left(), aFrameRect.Top(), 
aFrameRect.Right(),
-                                 aFrameRect.Bottom());
+        SwIterator<SwFrame, SwFormat> aIter(*pFrameFormat);
+        for (const SwFrame* pFrame = aIter.First(); pFrame; pFrame = 
aIter.Next())
+        {
+            const SwRect& rFrameRect = pFrame->getFrameArea();
+            if (!rFrameRect.IsEmpty())
+                aRanges.emplace_back(rFrameRect.Left(), rFrameRect.Top(), 
rFrameRect.Right(),
+                                     rFrameRect.Bottom());
+        }
     }
     OverlayObject(std::move(aRanges));
 }

Reply via email to