Kaydet (Commit) 90a0116c authored tarafından Michael Stahl's avatar Michael Stahl

SwFmtAnchor::SetAnchor(): assert that position is on SwTxtNode

Change-Id: I1c2a1cc2de4984cdcf1e5b8d0eafbd1471538e4a
üst 2fc4af31
......@@ -98,6 +98,9 @@
#include <svl/cjkoptions.hxx>
#include <switerator.hxx>
#include <pagedeschint.hxx>
#ifndef NDEBUG
#include <ndtxt.hxx>
#endif
using namespace ::com::sun::star;
using ::rtl::OUString;
......@@ -1511,6 +1514,8 @@ SwFmtAnchor::~SwFmtAnchor()
void SwFmtAnchor::SetAnchor( const SwPosition *pPos )
{
// anchor only to paragraphs
assert(!pPos || 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 &&
......
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