diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-06 22:59:40 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-07 14:46:07 +0100 |
commit | 689cead9e0837dc932e3a4cd765f7d319b529018 (patch) | |
tree | cd6cdcd77f017ef1e60ec11556617da5b1c39721 /svx/source/sdr/contact/displayinfo.cxx | |
parent | b346439637b7d03a3eb1d6e67dfb585b357567f4 (diff) |
tdf#91260 svx, sw: don't paint off-page part of drawing object
Since commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1 Writer no
longer forces drawing objects to be entirely on one page. However since
there is only one SdrPage for the entire document, a drawing object
dangleing off the bottom of one page will be painted again on the next
page, which is clearly undesirable since Word doesn't do that
(and it also destroys the nice invariant that a fly on page N never
overlaps a fly on page N+1).
So force the SdrPageView code to ignore the drawing object on the next
page, by passing in the area of the page frame so that
ViewObjectContactOfSdrObj::isPrimitiveVisible() can verify that the
anchor position of the SdrObject is actually on the painted page.
This requires passing in another parameter; in the usual case the
DisplayInfo::maRedrawArea already contains the page frame since
commit 8af09bf33291df2fb2bfbbd6e42f9bf074fcc4fc, but there are special
cases in SwFrame::Retouch() and SwFlyFrameFormat::MakeGraphic() where
some sub-area is passed in, which cannot be used to check the anchor.
Change-Id: Ia0476216ca41dbdaa3de1063fa18cb94fe2e5ae8
Diffstat (limited to 'svx/source/sdr/contact/displayinfo.cxx')
-rw-r--r-- | svx/source/sdr/contact/displayinfo.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/svx/source/sdr/contact/displayinfo.cxx b/svx/source/sdr/contact/displayinfo.cxx index fd6fc102ae61..7904fa11a7bf 100644 --- a/svx/source/sdr/contact/displayinfo.cxx +++ b/svx/source/sdr/contact/displayinfo.cxx @@ -50,6 +50,11 @@ namespace sdr maRedrawArea = rRegion; } + void DisplayInfo::SetWriterPageFrame(basegfx::B2IRectangle const& rPageFrame) + { + m_WriterPageFrame = rPageFrame; + } + void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess) { if((bool)mbControlLayerProcessingActive != bDoProcess) |