[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Mon Dec 5 18:19:56 UTC 2016
sw/source/core/doc/DocumentLayoutManager.cxx | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
New commits:
commit 6816994ffb0b8776605d1ce87889f3d54c8aaf57
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Mon Dec 5 00:33:23 2016 +0100
(re)use proper message passing
Change-Id: Ie80dad279af4e3d1b72f89d266f10d2309ed2e96
Reviewed-on: https://gerrit.libreoffice.org/31612
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index cb84403..8134c6f 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -347,20 +347,15 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
// 2) anchored in a header/footer
// 3) anchored (to paragraph?)
bool bMayNotCopy = false;
- if( bDraw )
+ if(bDraw)
{
- const SwDrawContact* pDrawContact =
- static_cast<const SwDrawContact*>( rSource.FindContactObj() );
-
+ const auto pCAnchor = rNewAnchor.GetContentAnchor();
+ bool bCheckControlLayer = false;
+ rSource.CallSwClientNotify(sw::CheckDrawFrameFormatLayerHint(&bCheckControlLayer));
bMayNotCopy =
- ((FLY_AT_PARA == rNewAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == rNewAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
- rNewAnchor.GetContentAnchor() &&
- m_rDoc.IsInHeaderFooter( rNewAnchor.GetContentAnchor()->nNode ) &&
- pDrawContact != nullptr &&
- pDrawContact->GetMaster() != nullptr &&
- CheckControlLayer( pDrawContact->GetMaster() );
+ bCheckControlLayer &&
+ ((FLY_AT_PARA == rNewAnchor.GetAnchorId()) || (FLY_AT_FLY == rNewAnchor.GetAnchorId()) || (FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
+ pCAnchor && m_rDoc.IsInHeaderFooter(pCAnchor->nNode);
}
// just return if we can't copy this
More information about the Libreoffice-commits
mailing list