[ooo-build-commit] .: 2 commits - patches/dev300
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu May 27 08:31:13 PDT 2010
patches/dev300/apply | 4
patches/dev300/docx-fixes02.diff | 54 +++------
patches/dev300/sw-rtf-num-fix.diff | 221 +++++++++++++++++++++++++++++++++++++
3 files changed, 242 insertions(+), 37 deletions(-)
New commits:
commit bde37bd3b928b66def4edd488ce3aaac6442507f
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Thu May 27 17:30:01 2010 +0200
Fixed n#569266: RTF numbering rountripping issues
* patches/dev300/apply:
* patches/dev300/sw-rtf-num-fix.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 153b7fb..a02a36a 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -625,6 +625,8 @@ sfx2-qstartfixes.diff, i#108846, caolan
sw-ww8-field-fix.diff, i#61075, i#89667, i#11684 cbosdo
sw-ww8font-fix.diff, cbosdo
+sw-rtf-num-fix.diff, n#569266, cbosdo
+
# Upstreamed in cbosdo06
sw-ww8-styles-import-fix.diff, i#21939, cbosdo
diff --git a/patches/dev300/sw-rtf-num-fix.diff b/patches/dev300/sw-rtf-num-fix.diff
new file mode 100644
index 0000000..aff9dac
--- /dev/null
+++ b/patches/dev300/sw-rtf-num-fix.diff
@@ -0,0 +1,221 @@
+diff --git sw/source/filter/rtf/rtfatr.cxx sw/source/filter/rtf/rtfatr.cxx
+index e9ec695..344174b 100644
+--- sw/source/filter/rtf/rtfatr.cxx
++++ sw/source/filter/rtf/rtfatr.cxx
+@@ -438,15 +438,15 @@ bool SwFmtToSet(SwRTFWriter& rWrt, const SwFmt& rFmt, SfxItemSet &rSet)
+ }
+
+ const SwNumFmt* pNFmt = &rWrt.pDoc->GetOutlineNumRule()->Get( static_cast<USHORT>(nLvl) );
+- if( pNFmt->GetAbsLSpace() )
++ if( pNFmt->GetIndentAt() )
+ {
+ SfxItemSet aSet( *rFmt.GetAttrSet().GetPool(),
+ rFmt.GetAttrSet().GetRanges() );
+ aSet.SetParent( &rFmt.GetAttrSet() );
+ SvxLRSpaceItem aLR( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) );
+
+- aLR.SetTxtLeft( aLR.GetTxtLeft() + pNFmt->GetAbsLSpace() );
+- aLR.SetTxtFirstLineOfst( pNFmt->GetFirstLineOffset() );
++ aLR.SetTxtLeft( aLR.GetTxtLeft() + pNFmt->GetIndentAt() );
++ aLR.SetTxtFirstLineOfst( pNFmt->GetFirstLineIndent() );
+
+ aSet.Put(aLR);
+ rSet.Put(aSet);
+@@ -1210,7 +1210,7 @@ static Writer& OutRTF_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
+ }
+
+ // gibt es harte Attributierung ?
+- if( bNewFmts && pNd->HasSwAttrSet())
++ if( pNd->HasSwAttrSet() )
+ {
+ rRTFWrt.pFlyFmt = 0;
+
+@@ -1233,9 +1233,9 @@ static Writer& OutRTF_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
+ SfxItemSet aSet( rNdSet );
+ SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) );
+
+- aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() );
++ aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
+ if( MAXLEVEL > pNd->GetActualListLevel() )
+- aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
++ aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineIndent() );
+ else
+ aSet.ClearItem( RES_PARATR_NUMRULE );
+ aSet.Put( aLR );
+diff --git sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtfnum.cxx
+index 3d77f13..59eac8e 100644
+--- sw/source/filter/rtf/rtfnum.cxx
++++ sw/source/filter/rtf/rtfnum.cxx
+@@ -1,29 +1,3 @@
+-/*************************************************************************
+- *
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * Copyright 2000, 2010 Oracle and/or its affiliates.
+- *
+- * OpenOffice.org - a multi-platform office productivity suite
+- *
+- * This file is part of OpenOffice.org.
+- *
+- * OpenOffice.org is free software: you can redistribute it and/or modify
+- * it under the terms of the GNU Lesser General Public License version 3
+- * only, as published by the Free Software Foundation.
+- *
+- * OpenOffice.org is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU Lesser General Public License version 3 for more details
+- * (a copy is included in the LICENSE file that accompanied this code).
+- *
+- * You should have received a copy of the GNU Lesser General Public License
+- * version 3 along with OpenOffice.org. If not, see
+- * <http://www.openoffice.org/license.html>
+- * for a copy of the LGPLv3 License.
+- *
+- ************************************************************************/
+
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sw.hxx"
+@@ -43,6 +17,7 @@
+ #include <editeng/colritem.hxx>
+ #include <editeng/udlnitem.hxx>
+ #include <editeng/wrlmitem.hxx>
++#include <editeng/numitem.hxx>
+ #include <shellio.hxx>
+ #include <fltini.hxx>
+ #include <swtypes.hxx>
+@@ -72,7 +47,7 @@ void lcl_ExpandNumFmts( SwNumRule& rRule )
+ if( !rRule.GetNumFmt( n ) )
+ {
+ SwNumFmt aNumFmt( rRule.Get( 0 ));
+- aNumFmt.SetAbsLSpace( aNumFmt.GetAbsLSpace() * ( n + 1 ) );
++ aNumFmt.SetIndentAt( aNumFmt.GetIndentAt() * ( n + 1 ) );
+ rRule.Set( n, aNumFmt );
+ }
+ }
+@@ -99,13 +74,13 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+ int nLvlTxtLevel = 0, nLvlNumberLevel = 0;
+ String sLvlText, sLvlNumber;
+ SwNumFmt* pCurNumFmt;
+- String aStringFollow = aEmptyStr;
++ SvxNumberFormat::SvxNumLabelFollowedBy eFollowedBy = SvxNumberFormat::NOTHING;
+
+ if( MAXLEVEL >= nNumLvl )
+ {
+ pCurNumFmt = (SwNumFmt*)rRule.GetNumFmt( nNumLvl );
+- pCurNumFmt->SetAbsLSpace( 0 );
+- pCurNumFmt->SetFirstLineOffset( 0 );
++ pCurNumFmt->SetIndentAt( 0 );
++ pCurNumFmt->SetFirstLineIndent( 0 );
+ }
+ else
+ pCurNumFmt = 0;
+@@ -210,17 +185,16 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+ break;
+
+ case RTF_LEVELFOLLOW:
+- /* removed; waiting for swnum02 to be integrated!
++ /* removed; waiting for swnum02 to be integrated! */
+ switch (nTokenValue)
+ {
+ case 0:
+- aStringFollow=String('\t');
++ eFollowedBy = SvxNumberFormat::LISTTAB;
+ break;
+ case 1:
+- aStringFollow=String(' ');
++ eFollowedBy = SvxNumberFormat::SPACE;
+ break;
+ }
+- */
+ break;
+
+ case RTF_LEVELOLD:
+@@ -244,8 +218,8 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+ // and put the current "LRSpace" into the set
+ {
+ SvxLRSpaceItem aLR( RES_LR_SPACE );
+- aLR.SetTxtLeft( pCurNumFmt->GetAbsLSpace() );
+- aLR.SetTxtFirstLineOfst(pCurNumFmt->GetFirstLineOffset());
++ aLR.SetTxtLeft( pCurNumFmt->GetIndentAt() );
++ aLR.SetTxtFirstLineOfst(pCurNumFmt->GetFirstLineIndent());
+ aSet.Put( aLR );
+ }
+
+@@ -264,8 +238,9 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+ FALSE, &pItem ))
+ {
+ const SvxLRSpaceItem& rLR = *(SvxLRSpaceItem*)pItem;
+- pCurNumFmt->SetAbsLSpace( static_cast< short >(rLR.GetTxtLeft()) );
+- pCurNumFmt->SetFirstLineOffset( rLR.GetTxtFirstLineOfst());
++ pCurNumFmt->SetListtabPos( rLR.GetTxtLeft( ) );
++ pCurNumFmt->SetIndentAt( rLR.GetTxtLeft() );
++ pCurNumFmt->SetFirstLineIndent( rLR.GetTxtFirstLineOfst());
+ }
+
+ // dann aus der Vorlage den Font holen
+@@ -306,16 +281,13 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+ pCurNumFmt->SetSuffix( sLvlText );
+ }
+
+- String newSuffix=pCurNumFmt->GetSuffix();
+- newSuffix+=aStringFollow;
+- pCurNumFmt->SetSuffix(newSuffix);
+- /* removed; waiting for swnum02 to be integrated!
+- if (aStringFollow.GetChar(0)=='\t' && !pCurNumFmt->IsItemize())
++ /* removed; waiting for swnum02 to be integrated!*/
++ pCurNumFmt->SetLabelFollowedBy( eFollowedBy );
++ if (eFollowedBy == SvxNumberFormat::LISTTAB && !pCurNumFmt->IsItemize())
+ {
+- pCurNumFmt->SetAbsLSpace(0);
+- pCurNumFmt->SetFirstLineOffset(0);
++ pCurNumFmt->SetIndentAt(0);
++ pCurNumFmt->SetFirstLineIndent(0);
+ }
+- */
+ }
+
+ SkipToken( -1 );
+@@ -380,7 +352,7 @@ void SwRTFParser::ReadListTable()
+
+ String sTmp( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
+- aEntry.nListDocPos = pDoc->MakeNumRule( sTmp );
++ aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, FALSE, SvxNumberFormat::LABEL_ALIGNMENT );
+ pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
+ // --> OD 2008-07-08 #i91400#
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+@@ -1011,8 +983,8 @@ NUMATTR_SETUNDERLINE:
+ case RTF_PNINDENT:
+ if( 0 > short( nTokenValue ) )
+ nTokenValue = - (short)nTokenValue;
+- pCurNumFmt->SetFirstLineOffset( - short( nTokenValue ));
+- pCurNumFmt->SetAbsLSpace( (nLevel + 1 ) * USHORT( nTokenValue ));
++ pCurNumFmt->SetFirstLineIndent( - nTokenValue );
++ pCurNumFmt->SetIndentAt( (nLevel + 1 ) * nTokenValue );
+ break;
+ case RTF_PNSP:
+ pCurNumFmt->SetCharTextDistance( USHORT( nTokenValue ));
+@@ -1288,8 +1260,8 @@ void SwRTFWriter::OutRTFListTab()
+ }
+
+ Strm() << OOO_STRING_SVTOOLS_RTF_FI;
+- OutLong( rFmt.GetFirstLineOffset() ) << OOO_STRING_SVTOOLS_RTF_LI;
+- OutLong( rFmt.GetAbsLSpace() );
++ OutLong( rFmt.GetFirstLineIndent() ) << OOO_STRING_SVTOOLS_RTF_LI;
++ OutLong( rFmt.GetIndentAt() );
+
+ Strm() << '}';
+
+@@ -1401,9 +1373,9 @@ BOOL SwRTFWriter::OutListNum( const SwTxtNode& rNd )
+ SfxItemSet aSet( *rNdSet.GetPool(), rNdSet.GetRanges() );
+ aSet.SetParent( &rNdSet );
+ SvxLRSpaceItem aLR( (SvxLRSpaceItem&)rNdSet.Get( RES_LR_SPACE ) );
+- aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() );
++ aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
+
+- aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
++ aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineIndent() );
+ if ( bExportNumRule )
+ Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTTEXT << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << ' ';
+
commit c717e120627f19938a186ac62778f908cfeff503
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Thu May 27 16:35:56 2010 +0200
Updated the docx-fixes02.diff patch to DEV300
* patches/dev300/apply:
* patches/dev300/docx-fixes02.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2ed3f62..153b7fb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3349,7 +3349,7 @@ gnome-screen-saver.diff, i#106372, cmc
[ OOXMLExport ]
oox-pptx-export-update-to-ooo320.diff, rodo
-# FIXME dev300-m77 docx-fixes02.diff, n#581604, cbosdo
+docx-fixes02.diff, n#581604, cbosdo
[ OOXMLExport321 and not OOXMLExportDevel ]
# FIXME dev300-m77 oox-chart-export-part1.diff, Fong
diff --git a/patches/dev300/docx-fixes02.diff b/patches/dev300/docx-fixes02.diff
index 271606d..14aa6bc 100644
--- a/patches/dev300/docx-fixes02.diff
+++ b/patches/dev300/docx-fixes02.diff
@@ -1,5 +1,5 @@
diff --git sax/source/tools/fastserializer.cxx sax/source/tools/fastserializer.cxx
-index b270d15..95c1621 100644
+index 6b0736d..edff7cb 100644
--- sax/source/tools/fastserializer.cxx
+++ sax/source/tools/fastserializer.cxx
@@ -34,6 +34,10 @@
@@ -69,7 +69,7 @@ index b270d15..95c1621 100644
{
merge( maData, rWhat, false );
diff --git sax/source/tools/fastserializer.hxx sax/source/tools/fastserializer.hxx
-index 94cf7c4..f07094d 100644
+index a616f69..0132306 100644
--- sax/source/tools/fastserializer.hxx
+++ sax/source/tools/fastserializer.hxx
@@ -134,6 +134,9 @@ private:
@@ -94,7 +94,7 @@ index 94cf7c4..f07094d 100644
void writeFastAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
diff --git sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/attributeoutputbase.hxx
-index c005746..1ec45f6 100644
+index 47a42b2..9def7ac 100644
--- sw/source/filter/ww8/attributeoutputbase.hxx
+++ sw/source/filter/ww8/attributeoutputbase.hxx
@@ -176,7 +176,7 @@ public:
@@ -117,7 +117,7 @@ index c005746..1ec45f6 100644
/// End of a style in the styles table.
virtual void EndStyle() = 0;
diff --git sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.cxx
-index 2e1daeb..db40c20 100644
+index 76eea38..a691c29 100644
--- sw/source/filter/ww8/docxattributeoutput.cxx
+++ sw/source/filter/ww8/docxattributeoutput.cxx
@@ -31,6 +31,13 @@
@@ -691,7 +691,7 @@ index 2e1daeb..db40c20 100644
MSWordExportBase& DocxAttributeOutput::GetExport()
diff --git sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxattributeoutput.hxx
-index 446a2fe..52d991a 100644
+index e1edbd6..e585401 100644
--- sw/source/filter/ww8/docxattributeoutput.hxx
+++ sw/source/filter/ww8/docxattributeoutput.hxx
@@ -102,7 +102,7 @@ public:
@@ -731,7 +731,7 @@ index 446a2fe..52d991a 100644
DocxAttributeOutput( DocxExport &rExport, ::sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML );
diff --git sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/makefile.mk
-index c682fea..6aa8213 100644
+index 653c36f..e5a0998 100644
--- sw/source/filter/ww8/makefile.mk
+++ sw/source/filter/ww8/makefile.mk
@@ -58,6 +58,7 @@ EXCEPTIONSFILES = \
@@ -743,7 +743,7 @@ index c682fea..6aa8213 100644
$(SLO)$/ww8atr.obj \
$(SLO)$/ww8par.obj \
diff --git sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8nds.cxx
-index d0a5094..d2c16ff 100644
+index 2a40e6a..f207dd8 100644
--- sw/source/filter/ww8/wrtw8nds.cxx
+++ sw/source/filter/ww8/wrtw8nds.cxx
@@ -166,76 +166,6 @@ MSWordAttrIter::~MSWordAttrIter()
@@ -870,10 +870,10 @@ index d0a5094..d2c16ff 100644
}
if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
diff --git sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtw8sty.cxx
-index cd5b8f3..2279184 100644
+index a9478be..2dc02f9 100644
--- sw/source/filter/ww8/wrtw8sty.cxx
+++ sw/source/filter/ww8/wrtw8sty.cxx
-@@ -298,7 +298,7 @@ void WW8AttributeOutput::EndStyle()
+@@ -299,7 +299,7 @@ void WW8AttributeOutput::EndStyle()
}
void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
@@ -882,7 +882,7 @@ index cd5b8f3..2279184 100644
{
BYTE aWW8_STD[ sizeof( WW8_STD ) ];
BYTE* pData = aWW8_STD;
-@@ -320,12 +320,12 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
+@@ -321,12 +321,12 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
if( m_rWW8Export.bWrtWW8 )
{
@@ -897,7 +897,7 @@ index cd5b8f3..2279184 100644
}
-@@ -522,8 +522,13 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+@@ -523,8 +523,13 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
@@ -914,10 +914,10 @@ index cd5b8f3..2279184 100644
if ( bFmtColl )
WriteProperties( pFmt, true, nPos, nBase==0xfff ); // UPX.papx
diff --git sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8.hxx
-index 8e9ba8c..fe2e7f0 100644
+index fafe06b..a8d536c 100644
--- sw/source/filter/ww8/wrtww8.hxx
+++ sw/source/filter/ww8/wrtww8.hxx
-@@ -1329,6 +1329,75 @@ public:
+@@ -1343,6 +1343,75 @@ public:
virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0;
};
@@ -994,10 +994,10 @@ index 8e9ba8c..fe2e7f0 100644
class MSWordStyles
{
diff --git sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8atr.cxx
-index 7159041..70bac42 100644
+index 61e8d60..6736075 100644
--- sw/source/filter/ww8/ww8atr.cxx
+++ sw/source/filter/ww8/ww8atr.cxx
-@@ -3758,25 +3758,12 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
+@@ -3774,25 +3774,12 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
if (pSwFmt != NULL)
{
nPageCharSize = ItemGet<SvxFontHeightItem>
@@ -1027,29 +1027,11 @@ index 7159041..70bac42 100644
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
}
-@@ -4067,7 +4054,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
- switch ( rAnchor.GetAnchorId() )
- {
- case FLY_PAGE:
-- // Vert: Page | Horz: Page
-+ // Horz: Page | Vert: Page
- nP |= (1 << 4) | (2 << 6);
- break;
- // Im Fall eine Flys als Zeichen: Absatz-gebunden setzen!!!
-@@ -4075,7 +4062,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
- case FLY_AUTO_CNTNT:
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
-- // Vert: Page | Horz: Page
-+ // Horz: Text | Vert: Column
- nP |= (2 << 4) | (0 << 6);
- break;
- default:
diff --git sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8attributeoutput.hxx
-index a54de86..48dc1b4 100644
+index c8b3926..201cd8c 100644
--- sw/source/filter/ww8/ww8attributeoutput.hxx
+++ sw/source/filter/ww8/ww8attributeoutput.hxx
-@@ -75,7 +75,7 @@ public:
+@@ -74,7 +74,7 @@ public:
virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
/// Output ruby start.
@@ -1058,7 +1040,7 @@ index a54de86..48dc1b4 100644
/// Output ruby end.
virtual void EndRuby();
-@@ -138,7 +138,8 @@ public:
+@@ -137,7 +137,8 @@ public:
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
More information about the ooo-build-commit
mailing list