[ooo-build-commit] .: patches/dev300
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu Apr 29 02:48:46 PDT 2010
patches/dev300/docx-fixes02.diff | 57 +++++++++++++++++++++++++++++++++++----
1 file changed, 52 insertions(+), 5 deletions(-)
New commits:
commit af67fec822f56dbf8f46f0dadb66ef793d6fea8f
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Thu Apr 29 11:46:04 2010 +0200
docx export: wrong default style name
The name of the "Default" style is changed to "Normal" when exporting to
WW8 or DOCX: otherwise Word doesn't takes the correct default values for
the document.
This helped to fix the Asian grid char spacing: fixed in both WW8 and
DOCX exports as well
* patches/dev300/docx-fixes02.diff:
diff --git a/patches/dev300/docx-fixes02.diff b/patches/dev300/docx-fixes02.diff
index f576724..02d39cf 100644
--- a/patches/dev300/docx-fixes02.diff
+++ b/patches/dev300/docx-fixes02.diff
@@ -94,7 +94,7 @@ index fe986f1..d66d83c 100644
void writeFastAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
diff --git sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.cxx
-index d82f2c8..66d189b 100644
+index d82f2c8..2db0e80 100644
--- sw/source/filter/ww8/docxattributeoutput.cxx
+++ sw/source/filter/ww8/docxattributeoutput.cxx
@@ -34,6 +34,10 @@
@@ -518,7 +518,7 @@ index d82f2c8..66d189b 100644
+ if (pSwFmt != NULL)
+ {
+ nPageCharSize = ItemGet<SvxFontHeightItem>
-+ (*pSwFmt, RES_CHRATR_CJK_FONTSIZE).GetHeight();
++ (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
+ }
+
+ sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
@@ -597,11 +597,58 @@ index c5613f9..28c8b45 100644
$(SLO)$/docxexportfilter.obj \
$(SLO)$/ww8atr.obj \
$(SLO)$/ww8par.obj \
+diff --git sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtw8sty.cxx
+index 2619c65..5fb973f 100644
+--- sw/source/filter/ww8/wrtw8sty.cxx
++++ sw/source/filter/ww8/wrtw8sty.cxx
+@@ -525,7 +525,11 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+
+ GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
+
+- m_rExport.AttrOutput().StartStyle( pFmt->GetName(), bFmtColl,
++ String aName = pFmt->GetName();
++ if ( aName.EqualsAscii( "Default" ) )
++ aName = String::CreateFromAscii( "Normal" );
++
++ m_rExport.AttrOutput().StartStyle( aName, bFmtColl,
+ nBase, nWwNext, GetWWId( *pFmt ), nPos );
+
+ if ( bFmtColl )
diff --git sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8atr.cxx
-index 075a79e..a9b6f8d 100644
+index 075a79e..99ba954 100644
--- sw/source/filter/ww8/ww8atr.cxx
+++ sw/source/filter/ww8/ww8atr.cxx
-@@ -4070,7 +4070,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
+@@ -3761,25 +3761,12 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
+ if (pSwFmt != NULL)
+ {
+ nPageCharSize = ItemGet<SvxFontHeightItem>
+- (*pSwFmt, RES_CHRATR_CJK_FONTSIZE).GetHeight();
++ (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
+ }
++ sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
++ rGrid.GetBaseWidth( );
++ INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+
+- INT32 nCharWidth = rGrid.GetBaseWidth() - nPageCharSize;
+- INT32 nFraction = 0;
+- nFraction = nCharWidth % 20;
+- if ( nCharWidth < 0 )
+- nFraction = 20 + nFraction;
+- nFraction = ( nFraction * 0xFFF ) / 20;
+- nFraction = ( nFraction & 0x00000FFF );
+-
+- INT32 nMain = 0;
+- nMain = nCharWidth / 20;
+- if ( nCharWidth < 0 )
+- nMain -= 1;
+- nMain = nMain * 0x1000;
+- nMain = ( nMain & 0xFFFFF000 );
+-
+- UINT32 nCharSpace = nFraction + nMain;
+ m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
+ m_rWW8Export.InsUInt32( nCharSpace );
+ }
+@@ -4070,7 +4057,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
switch ( rAnchor.GetAnchorId() )
{
case FLY_PAGE:
@@ -610,7 +657,7 @@ index 075a79e..a9b6f8d 100644
nP |= (1 << 4) | (2 << 6);
break;
// Im Fall eine Flys als Zeichen: Absatz-gebunden setzen!!!
-@@ -4078,7 +4078,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
+@@ -4078,7 +4065,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
case FLY_AUTO_CNTNT:
case FLY_AT_CNTNT:
case FLY_IN_CNTNT:
More information about the ooo-build-commit
mailing list