diff options
author | László Németh <laszlo.nemeth@collabora.com> | 2015-11-06 14:54:02 +0100 |
---|---|---|
committer | László Németh <laszlo.nemeth@collabora.com> | 2015-11-06 19:33:14 +0100 |
commit | 16331514fd10d444bec89f892a106cbbba9e16c0 (patch) | |
tree | b0919a26a502304bfce6fefe387fb5cc676887b5 /sw | |
parent | 63d2d50ecb3f3a83374a1a01713edce14ba378ed (diff) |
tdf#92648 fix DOCX import regression (textbox shrinking in footers)
caused by the fix for tdf#91260
Change-Id: I4a5a27b51c4cb1304647b5432c06ca9c5a96590d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/objectpositioning/anchoredobjectposition.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 19939199df34..a82498976db4 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -484,8 +484,10 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc SwFrameFormat* pFrameFormat = ::FindFrameFormat(&GetObject()); SwFormatFrmSize aSize(pFormat->GetFrmSize()); SwTwips nShrinked = aSize.GetHeight() - (nProposedRelPosY - nAdjustedRelPosY); - aSize.SetHeight( nShrinked > 0 ? nShrinked : 0 ); - pFrameFormat->SetFormatAttr(aSize); + if (nShrinked >= 0) { + aSize.SetHeight( nShrinked ); + pFrameFormat->SetFormatAttr(aSize); + } nAdjustedRelPosY = nProposedRelPosY; } else if ( SwTextBoxHelper::findTextBox(pFormat) ) // when the shape has a textbox, use only the proposed vertical position |