[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 18 06:38:50 PST 2013
sw/source/core/layout/atrfrm.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 9bde6f8a0c5fed9d30cd0e296ec9258937376bdf
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jan 17 21:45:09 2013 +0100
fdo#59437: SwFmtAnchor::SetAnchor: Anchors may be on StartNodes
Assertion added in 90a0116ccb48388d91b21128fcac2e4609838581 wasn't quite
right.
Change-Id: Icac6c4e3932837ffaf170d9b18664e5b4ff579ff
(cherry picked from commit 0ed73a0817ad0ff0107cb297208252c0afe3b4a9)
Reviewed-on: https://gerrit.libreoffice.org/1747
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index f5d7798..180b145 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1514,8 +1514,11 @@ SwFmtAnchor::~SwFmtAnchor()
void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
{
- // anchor only to paragraphs
- assert(!pPos || dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode()));
+ // anchor only to paragraphs, or start nodes in case of FLY_AT_FLY
+ assert(!pPos
+ || ((FLY_AT_FLY == nAnchorId) &&
+ dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
+ || dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode()));
m_pCntntAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 );
// Flys anchored AT paragraph should not point into the paragraph content
if (m_pCntntAnchor &&
More information about the Libreoffice-commits
mailing list