[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/source

László Németh laszlo.nemeth at collabora.com
Tue Jun 9 11:47:10 PDT 2015


 sw/source/core/objectpositioning/anchoredobjectposition.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 062256ba6810fb1cbed54246dde7570ed5430aa4
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Thu Jun 4 18:15:12 2015 +0200

    tdf#91260: cleanup - textboxes extending beyond the page
    
    Storing Undo data is unnecessary here, because shrinking is applied
    only on the  text frame of the textbox. The shape component of the
    textbox isn't modified.
    
    (cherry-picked from 2f779fc046c9afec04b4a4500b213e77aee51ae1)
    
    Change-Id: Iaff64ff4953adbfa830832da146343cef2734547
    Reviewed-on: https://gerrit.libreoffice.org/16088
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 2957aa0..b4e63e3 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -482,13 +482,10 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnc
             {
                 // shrink textboxes to extend beyond the page bottom
                 SwFrameFormat* pFrameFormat = ::FindFrameFormat(&GetObject());
-                SfxItemSet aTextBoxSet(pFrameFormat->GetDoc()->GetAttrPool(), aFrameFormatSetRange);
                 SwFormatFrmSize aSize(pFormat->GetFrmSize());
                 SwTwips nShrinked = aSize.GetHeight() - (nProposedRelPosY - nAdjustedRelPosY);
                 aSize.SetHeight( nShrinked > 0 ? nShrinked : 0 );
-                aTextBoxSet.Put(aSize);
-                if (aTextBoxSet.Count())
-                    pFrameFormat->GetDoc()->SetFlyFrmAttr(*pFrameFormat, aTextBoxSet);
+                pFrameFormat->SetFormatAttr(aSize);
                 nAdjustedRelPosY = nProposedRelPosY;
             } else if ( SwTextBoxHelper::findTextBox(pFormat) )
                 // when the shape has a textbox, use only the proposed vertical position


More information about the Libreoffice-commits mailing list