summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorLei De Bin <leidb@apache.org>2012-07-04 05:46:06 +0000
committerXisco Fauli <anistenis@gmail.com>2013-04-01 23:04:36 +0200
commit638678893657aaf90a3b6e1a6c4d3fb3fc28e954 (patch)
treee14f6898bd125ba85ae50864078fcc6905c3820b /sw
parentReported by: Li Feng Wang (diff)
downloadcore-638678893657aaf90a3b6e1a6c4d3fb3fc28e954.tar.gz
core-638678893657aaf90a3b6e1a6c4d3fb3fc28e954.zip
Fix #119510# - fix some invalid FLY_AT_PARA case:
The width should be automatically re-sized, then for the horizontal alignment left is better than right. Found by: yan ji Patch by: Lei De Bin Review by: Chen Zuo Jun Conflicts: sw/source/filter/ww8/ww8par.cxx Change-Id: I584b81bf2f32e8ae41bd761f760672a33d1bfd73
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 621bdbb921b9..f78da7ba3128 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -57,6 +57,7 @@
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
#include <fmtcnct.hxx>
+#include <fmtanchr.hxx>
#include <fmtpdsc.hxx>
#include <ftninfo.hxx>
#include <fmtftn.hxx>
@@ -1892,9 +1893,17 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint());
- pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
+ SwFmtAnchor aAnch( pFrame->GetAnchor() );
+ aAnch.SetType( FLY_AT_PARA );
+ pFrame->SetFmtAttr( aAnch );
+ SwFmtFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY);
+ SwFrmSize eFrmSize = ATT_MIN_SIZE;
+ if( eFrmSize != aSz.GetWidthSizeType() )
+ aSz.SetWidthSizeType( eFrmSize );
+ pFrame->SetFmtAttr(aSz);
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
- pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::RIGHT)); //iFOO
+ pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO
+
// #i43427# - send frame for header/footer into background.
pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) );
SdrObject* pFrmObj = CreateContactObject( pFrame );