incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1357108 - /incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx
Date Wed, 04 Jul 2012 06:46:07 GMT
Author: leidb
Date: Wed Jul  4 06:46:06 2012
New Revision: 1357108

URL: http://svn.apache.org/viewvc?rev=1357108&view=rev
Log:
#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

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx?rev=1357108&r1=1357107&r2=1357108&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx Wed Jul  4 06:46:06 2012
@@ -76,6 +76,7 @@
 #include <fmthdft.hxx>
 #include <fmtcntnt.hxx>
 #include <fmtcnct.hxx>
+#include <fmtanchr.hxx>
 #include <fmtpdsc.hxx>
 #include <ftninfo.hxx>
 #include <fmtftn.hxx>
@@ -1687,9 +1688,17 @@ void SwWW8ImplReader::Read_HdFtTextAsHac
 
     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
+ 
     // --> OD 2005-02-28 #i43427# - send frame for header/footer into background.
     pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) );
     SdrObject* pFrmObj = CreateContactObject( pFrame );



Mime
View raw message