[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at suse.cz
Mon Mar 4 00:54:16 PST 2013
sw/source/core/layout/atrfrm.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 474c8b8b631c116e3b80a17e9d0a910bb25df6c4
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Mon Mar 4 09:45:15 2013 +0100
SwFmtAnchor::SetAnchor: fix assert to still allow table -> frame conversion
Change-Id: I2dda82b675ebdd434656332d328b02ee3fc04528
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 1291056..8a4aef8 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1515,9 +1515,11 @@ SwFmtAnchor::~SwFmtAnchor()
void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
{
// anchor only to paragraphs, or start nodes in case of FLY_AT_FLY
+ // also allow table node, this is used when a table is selected and is converted to a frame by the UI
assert(!pPos
|| ((FLY_AT_FLY == nAnchorId) &&
dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
+ || (FLY_AT_PARA == nAnchorId && dynamic_cast<SwTableNode*>(&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
More information about the Libreoffice-commits
mailing list