Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1747

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/47/1747/1

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)
---
M sw/source/core/layout/atrfrm.cxx
1 file changed, 5 insertions(+), 2 deletions(-)



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 @@
 
 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 &&

-- 
To view, visit https://gerrit.libreoffice.org/1747
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icac6c4e3932837ffaf170d9b18664e5b4ff579ff
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Stahl <mstahl@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.