Kaydet (Commit) 6816994f authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Björn Michaelsen

(re)use proper message passing

Change-Id: Ie80dad279af4e3d1b72f89d266f10d2309ed2e96
Reviewed-on: https://gerrit.libreoffice.org/31612Tested-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@canonical.com>
üst 08f7304f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment