summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/paintfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r--sw/source/core/layout/paintfrm.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 92d8f087ec36..5ca89df04ba8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7331,6 +7331,28 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
const bool bFlys = pPage->GetSortedObjs() != nullptr;
const bool bCell = IsCellFrame();
+
+ if (!bCell && IsFlyFrame())
+ {
+ // particularly with images (but also plausible for any kind of frame),
+ // it is very disconcerting to see a fake border,
+ // so (just like the page boundary) only show fly "text boundaries"
+ // when "Show Formatting Marks" is turned on
+ if (!gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars())
+ return;
+
+ // if the frame is wrap none or wrap through, then text boundary lines have no meaning
+ // (unless the frame itself contains text)
+ const text::WrapTextMode aSurround = GetFormat()->GetSurround().GetSurround();
+ if (GetFormat()->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR
+ && (!Lower() || !Lower()->IsTextFrame())
+ && (aSurround == text::WrapTextMode::WrapTextMode_THROUGH
+ || aSurround == text::WrapTextMode::WrapTextMode_NONE))
+ {
+ return;
+ }
+ }
+
// #i3662# - use frame area for cells for section use also frame area
const bool bUseFrameArea = bCell || IsSctFrame();
SwRect aOriginal( bUseFrameArea ? getFrameArea() : getFramePrintArea() );