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 <raykowj@gmail.com>
This commit is contained in:
@@ -7666,10 +7666,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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user