diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-04 09:45:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-04 09:53:56 +0100 |
commit | 474c8b8b631c116e3b80a17e9d0a910bb25df6c4 (patch) | |
tree | 34ca95bfd8ce0ec230f476d284d870856e0c59e9 | |
parent | b313e37a92a18bc663ea5eb97ea0a569c6b0a962 (diff) |
SwFmtAnchor::SetAnchor: fix assert to still allow table -> frame conversion
Change-Id: I2dda82b675ebdd434656332d328b02ee3fc04528
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 129105614f32..8a4aef86e7cb 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 |