From a74f0cd6a7dad15982bcdbc048cc2712ed8b976d Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Wed, 9 Apr 2014 19:55:35 -0400 Subject: Simplify the AttributeOutputBase::OutputFlyFrame method. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iac3b1b627728d5268ce7633904af9113e3127be2 Reviewed-on: https://gerrit.libreoffice.org/9006 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/filter/ww8/wrtw8nds.cxx | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 523a9ec8e199..50243332ae98 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2885,32 +2885,15 @@ void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFmt ) return; const SwCntntNode &rNode = *rFmt.GetCntntNode(); - Point aNdPos, aPgPos; - Point* pLayPos; - bool bValidNdPos = false, bValidPgPos = false; + Point aLayPos; + // get the Layout Node-Position if (FLY_AT_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId()) - { - // get the Layout Node-Position. - if ( !bValidPgPos ) - { - aPgPos = rNode.FindPageFrmRect(false, &aPgPos).Pos(); - bValidPgPos = true; - } - pLayPos = &aPgPos; - } + aLayPos = rNode.FindPageFrmRect().Pos(); else - { - // get the Layout Node-Position. - if ( !bValidNdPos ) - { - aNdPos = rNode.FindLayoutRect(false, &aNdPos).Pos(); - bValidNdPos = true; - } - pLayPos = &aNdPos; - } + aLayPos = rNode.FindLayoutRect().Pos(); - OutputFlyFrame_Impl( rFmt, *pLayPos ); + OutputFlyFrame_Impl( rFmt, aLayPos ); } // write data of any redline -- cgit