From 394a1ee9a0f5438bda41cbf4ecf065b9b278b4c4 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Tue, 19 Nov 2013 12:36:33 +0100 Subject: Writer : Fix fdo#71694 by clearing old anchor frame before setting new MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed as otherwise AnchoredObjects can be in more than one SwLayoutFrm. See also 7eae50f9ff5877ef880be9a85d3f7e52b1fec49f ( Access by AnchoredObject of a deleted SwLayoutFrm ). Change-Id: I54582d6f9fb8b6f853352af27706faabe610874b Reviewed-on: https://gerrit.libreoffice.org/6720 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 7726339a648ac94bb7c365950f23dabec5aa52e7) Reviewed-on: https://gerrit.libreoffice.org/6732 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- sw/source/core/layout/anchoredobject.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index 77cf548f6428..9e6dc5e351d4 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -246,8 +246,9 @@ void SwAnchoredObject::ResetLastCharRectHeight() // ============================================================================= void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm ) { - mpVertPosOrientFrm = &_rVertPosOrientFrm; + ClearVertPosOrientFrm(); + mpVertPosOrientFrm = &_rVertPosOrientFrm; const_cast(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this); // #i28701# - take over functionality of deleted method -- cgit v1.2.3