From 474c8b8b631c116e3b80a17e9d0a910bb25df6c4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 4 Mar 2013 09:45:15 +0100 Subject: SwFmtAnchor::SetAnchor: fix assert to still allow table -> frame conversion Change-Id: I2dda82b675ebdd434656332d328b02ee3fc04528 --- sw/source/core/layout/atrfrm.cxx | 2 ++ 1 file changed, 2 insertions(+) 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(&pPos->nNode.GetNode())) + || (FLY_AT_PARA == nAnchorId && dynamic_cast(&pPos->nNode.GetNode())) || dynamic_cast(&pPos->nNode.GetNode())); m_pCntntAnchor .reset( (pPos) ? new SwPosition( *pPos ) : 0 ); // Flys anchored AT paragraph should not point into the paragraph content -- cgit