diff options
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 4d04857e7199..5c5811ee3934 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -668,9 +668,11 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) { aAnchor.SetType(RndStdIds::FLY_AS_CHAR); } - else if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId()) + else if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId() + && 0 == aAnchor.GetPageNum()) { aAnchor.SetAnchor(pInternalPam->Start()); + aAnchor.SetType(RndStdIds::FLY_AT_CHAR); // convert invalid at-page } } @@ -1141,6 +1143,8 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a SwFormatFlyCnt aFormat( pFormat ); pNd->InsertItem(aFormat, pInternalPam->GetPoint() ->nContent.GetIndex(), 0 ); + //Refetch in case SwTextNode::InsertItem causes it to be deleted + pFormat = GetFrameFormat(); } else { |