[Libreoffice-commits] core.git: sw/source

Arnaud Versini arnaud.versini at libreoffice.org
Wed Nov 20 01:14:44 PST 2013


 sw/source/core/layout/anchoredobject.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7726339a648ac94bb7c365950f23dabec5aa52e7
Author: Arnaud Versini <arnaud.versini at libreoffice.org>
Date:   Tue Nov 19 12:36:33 2013 +0100

    Writer : Fix fdo#71694 by clearing old anchor frame before setting new
    
    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 <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 157c346..e111823 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -237,8 +237,9 @@ void SwAnchoredObject::ResetLastCharRectHeight()
 // =============================================================================
 void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm )
 {
-    mpVertPosOrientFrm = &_rVertPosOrientFrm;
+    ClearVertPosOrientFrm();
 
+    mpVertPosOrientFrm = &_rVertPosOrientFrm;
     const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this);
 
     // #i28701# - take over functionality of deleted method


More information about the Libreoffice-commits mailing list