From b4f775daf031d7d28505825ed0e7b4e1d19f0e1b Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 8 Aug 2014 16:39:24 +0200 Subject: fix image dragging inside a document Testcase is a document with a table and a wrap-through anchored-to-character image below it. Dragging the image up to be anchored to a place in a cell and positioned partially on top of the table does not actually change the image position if the image was below the table before the drag, but changes when the table was above. In the faulty case, SwToCntntAnchoredObjectPosition::CalcPosition() returns prematurely because of paragraph portion information not existing at that point (interestingly, the problem is also fixed simply by commenting out the return). This basically reverts 9b87346bf4a1d32abfa781aa66d4d5b627133edf . I'm unable to check the original problem as the bugreport references a web page that no longer exists. So if that one still exists, it'll need to be handled whenever somebody runs into a way of reproducing it. Change-Id: Id354237dace3179b94768146ec1a599cc3d49146 --- sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 96643ba82f88..be59ead0a1f2 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -204,11 +204,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition() !GetAnchoredObj().GetLastCharRect().Width() ) || !GetAnchoredObj().GetLastTopOfLine() ) { - // #i111886# - // Check existence of paragraph portion information in order - // to avoid formatting which could cause deletion of follow frames. - GetAnchoredObj().CheckCharRectAndTopOfLine(); - + GetAnchoredObj().CheckCharRectAndTopOfLine( false ); // Due to table break algorithm the character // rectangle can have no height. Thus, check also the width if ( ( !GetAnchoredObj().GetLastCharRect().Height() && -- cgit v1.2.3