diff options
author | Chris Laplante <mostthingsweb@gmail.com> | 2014-04-09 19:55:35 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-18 10:01:50 +0000 |
commit | a74f0cd6a7dad15982bcdbc048cc2712ed8b976d (patch) | |
tree | 516c72c1985806809d1de201ca244edb22d32db9 | |
parent | d7ae4dfdf0c254361d012aefed203a59638c3e3c (diff) |
Simplify the AttributeOutputBase::OutputFlyFrame method.
Change-Id: Iac3b1b627728d5268ce7633904af9113e3127be2
Reviewed-on: https://gerrit.libreoffice.org/9006
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 27 |
1 files 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 |