Kaydet (Commit) 474c8b8b authored tarafından Miklos Vajna's avatar Miklos Vajna

SwFmtAnchor::SetAnchor: fix assert to still allow table -> frame conversion

Change-Id: I2dda82b675ebdd434656332d328b02ee3fc04528
üst b313e37a
...@@ -1515,9 +1515,11 @@ SwFmtAnchor::~SwFmtAnchor() ...@@ -1515,9 +1515,11 @@ SwFmtAnchor::~SwFmtAnchor()
void SwFmtAnchor::SetAnchor( const SwPosition *pPos ) void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
{ {
// anchor only to paragraphs, or start nodes in case of FLY_AT_FLY // 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 assert(!pPos
|| ((FLY_AT_FLY == nAnchorId) && || ((FLY_AT_FLY == nAnchorId) &&
dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode())) dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
|| (FLY_AT_PARA == nAnchorId && dynamic_cast<SwTableNode*>(&pPos->nNode.GetNode()))
|| dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode())); || dynamic_cast<SwTxtNode*>(&pPos->nNode.GetNode()));
m_pCntntAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 ); m_pCntntAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 );
// Flys anchored AT paragraph should not point into the paragraph content // Flys anchored AT paragraph should not point into the paragraph content
......
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