diff options
author | Xisco Fauli <anistenis@gmail.com> | 2017-06-12 18:05:27 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-07-07 18:36:16 +0200 |
commit | f44f65019a60b5bd70b08eb11db8d1baf4f6e229 (patch) | |
tree | 69d5939a37eb018a7e1b9de395ed1434f9f0f56e | |
parent | e2be5d28877a817ae302b3dca7af2f71597a912f (diff) |
tdf#104640, tdf#108469: Insert image where the cursor is
Partially revert 72a4987434368bfb0b15f5ebb70a52
Besides, add bDelta to the condition so the statement is false
if the image is resized
Change-Id: Ib07d328e040c38c63a30f6230ed9f6b605d76d9f
Reviewed-on: https://gerrit.libreoffice.org/38705
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
(cherry picked from commit 3919d87210ea12ed3166c649ac52730026db01a4)
Reviewed-on: https://gerrit.libreoffice.org/38772
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/core/text/frmform.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 5d25abac0b13..ee0469a929ce 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1085,7 +1085,13 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine, const SwTwips nDocPrtTop = Frame().Top() + Prt().Top(); const SwTwips nOldHeight = Prt().SSize().Height(); - const SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; + SwTwips nChg = rLine.CalcBottomLine() - nDocPrtTop - nOldHeight; + + //#i84870# - no shrink of text frame, if it only contains one as-character anchored object. + if ( nChg < 0 && !bDelta && bOnlyContainsAsCharAnchoredObj ) + { + nChg = 0; + } // Vertical Formatting: // The (rotated) repaint rectangle's x coordinate referes to the frame. |