[ooo-build-commit] .: 6 commits - patches/dev300

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Sep 17 04:17:06 PDT 2010


 patches/dev300/apply                         |   14 
 patches/dev300/cws-vmiklos01.diff            | 8128 ---------------------------
 patches/dev300/docx-fixes02.diff             | 1114 ---
 patches/dev300/sal-strintern-speed.diff      |  250 
 patches/dev300/sw-ww8-field-fix.diff         |   27 
 patches/dev300/sw-ww8-ruby-export-fix.diff   |   93 
 patches/dev300/sw-ww8-styles-import-fix.diff |   20 
 7 files changed, 9646 deletions(-)

New commits:
commit d2c46938b1bba62464b93a16a7510f848a4ea86b
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 13:14:23 2010 +0200

    sal-strintern-speed.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index e4702dc..287d5e5 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -200,8 +200,6 @@ dbaccess-default-varchar-lenght.diff, i#62664, jianhua
 selection-crash-svx-svdmrkv.diff, i#76084, jianhua
 
 # accelerate intern by not using stl
-# The sal-strintern-speed-fix.diff has been merged with the original patch
-sal-strintern-speed.diff, i#78496, michael
 sal-strintern-speed-char-upper.diff, kohei
 
 # temporary hack to avoid the warning about missing return values in gcc4
diff --git a/patches/dev300/sal-strintern-speed.diff b/patches/dev300/sal-strintern-speed.diff
deleted file mode 100644
index 1dabdd3..0000000
--- a/patches/dev300/sal-strintern-speed.diff
+++ /dev/null
@@ -1,250 +0,0 @@
----
- sal/rtl/source/hash.cxx |  221 +++++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 221 insertions(+), 0 deletions(-)
-
-diff --git sal/rtl/source/hash.cxx sal/rtl/source/hash.cxx
-index 63de2b4..38eb5e8 100644
---- sal/rtl/source/hash.cxx
-+++ sal/rtl/source/hash.cxx
-@@ -26,12 +26,16 @@
-  ************************************************************************/
- 
- // MARKER(update_precomp.py): autogen include statement, do not remove
-+#if 0
- #include "precompiled_sal.hxx"
- #include "rtl/allocator.hxx"
-+#endif
- 
- #include "hash.h"
- #include "strimp.h"
-+#include <osl/diagnose.h>
- 
-+#if 0
- 
- #include <hash_set>
- 
-@@ -110,4 +114,221 @@ rtl_str_hash_remove (rtl_uString       *pString)
-     getHashTable()->erase(pString);
- }
- 
-+#endif
-+
-+// --------------------------- start here ---------------------------
-+
-+struct StringHashTableImpl {
-+    sal_uInt32    nEntries;
-+    sal_uInt32    nSize;
-+    rtl_uString **pData;
-+};
-+
-+typedef StringHashTableImpl StringHashTable;
-+
-+extern "C" {
-+
-+// Only for use in the implementation
-+StringHashTable *rtl_str_hash_new (sal_uInt32 nSize);
-+void rtl_str_hash_free (StringHashTable *pHash);
-+
-+}
-+
-+StringHashTable *
-+getHashTable ()
-+{
-+    static StringHashTable *pInternPool = NULL;
-+    if (pInternPool == NULL) {
-+        static StringHashTable* pHash = rtl_str_hash_new(1024);
-+        pInternPool = pHash;
-+    }
-+    return pInternPool;
-+}
-+
-+extern "C" {
-+
-+// Better / smaller / faster hash set ....
-+
-+// TODO: add bottom bit-set list terminator to string list
-+
-+static sal_uInt32
-+getNextSize (sal_uInt32 nSize)
-+{
-+    // Sedgewick - Algorithms in C P577.
-+    static const sal_uInt32 nPrimes[] = { 1021, 2039, 4093, 8191, 16381, 32749,
-+                                          65521, 131071,262139, 524287, 1048573,
-+                                          2097143, 4194301, 8388593, 16777213,
-+                                          33554393, 67108859, 134217689 };
-+    #define NUM_PRIMES (sizeof (nPrimes)/ sizeof (nPrimes[0]))
-+    for (sal_uInt32 i = 0; i < NUM_PRIMES; i++)
-+    {
-+        if (nPrimes[i] > nSize)
-+            return nPrimes[i];
-+    }
-+    return nSize * 2;
-+}
-+
-+static sal_uInt32
-+hashString (rtl_uString *pString)
-+{
-+    return (sal_uInt32) rtl_ustr_hashCode_WithLength (pString->buffer,
-+                                                      pString->length);
-+}
-+
-+StringHashTable *
-+rtl_str_hash_new (sal_uInt32 nSize)
-+{
-+    StringHashTable *pHash = (StringHashTable *)malloc (sizeof (StringHashTable));
-+
-+    pHash->nEntries = 0;
-+    pHash->nSize = getNextSize (nSize);
-+    pHash->pData = (rtl_uString **) calloc (sizeof (rtl_uString *), pHash->nSize);
-+
-+    return pHash;
-+}
-+
-+void
-+rtl_str_hash_free (StringHashTable *pHash)
-+{
-+    if (!pHash)
-+        return;
-+    if (pHash->pData)
-+        free (pHash->pData);
-+    free (pHash);
-+}
-+
-+static void
-+rtl_str_hash_insert_nonequal (StringHashTable   *pHash,
-+                              rtl_uString       *pString)
-+{
-+    sal_uInt32  nHash = hashString (pString);
-+    sal_uInt32  n;
-+    rtl_uString *pHashStr;
-+
-+    n = nHash % pHash->nSize;
-+    while ((pHashStr = pHash->pData[n]) != NULL) {
-+        n++;
-+        if (n >= pHash->nSize)
-+            n = 0;
-+    }
-+    pHash->pData[n] = pString;
-+}
-+
-+static void
-+rtl_str_hash_resize (sal_uInt32        nNewSize)
-+{
-+    sal_uInt32 i;
-+    StringHashTable *pNewHash;
-+    StringHashTable *pHash = getHashTable();
-+
-+    OSL_ASSERT (nNewSize > pHash->nEntries);
-+
-+    pNewHash = rtl_str_hash_new (nNewSize);
-+
-+    for (i = 0; i < pHash->nSize; i++)
-+    {
-+        if (pHash->pData[i] != NULL)
-+            rtl_str_hash_insert_nonequal (pNewHash, pHash->pData[i]);
-+    }
-+    pNewHash->nEntries = pHash->nEntries;
-+    free (pHash->pData);
-+    *pHash = *pNewHash;
-+    pNewHash->pData = NULL;
-+    rtl_str_hash_free (pNewHash);
-+}
-+
-+static int
-+compareEqual (rtl_uString *pStringA, rtl_uString *pStringB)
-+{
-+    if (pStringA == pStringB)
-+        return 1;
-+    if (pStringA->length != pStringB->length)
-+        return 0;
-+    return !rtl_ustr_compare_WithLength( pStringA->buffer, pStringA->length,
-+                                         pStringB->buffer, pStringB->length);
-+}
-+
-+
-+rtl_uString *
-+rtl_str_hash_intern (rtl_uString       *pString,
-+                     int                can_return)
-+{
-+    sal_uInt32  nHash = hashString (pString);
-+    sal_uInt32  n;
-+    rtl_uString *pHashStr;
-+    
-+    StringHashTable *pHash = getHashTable();
-+
-+    // Should we resize ?
-+    if (pHash->nEntries >= pHash->nSize/2)
-+        rtl_str_hash_resize (getNextSize(pHash->nSize));
-+
-+    n = nHash % pHash->nSize;
-+    while ((pHashStr = pHash->pData[n]) != NULL) {
-+        if (compareEqual (pHashStr, pString))
-+        {
-+            rtl_uString_acquire (pHashStr);
-+            return pHashStr;
-+        }
-+        n++;
-+        if (n >= pHash->nSize)
-+            n = 0;
-+    }
-+
-+    if (!can_return)
-+    {
-+        rtl_uString *pCopy = NULL;
-+        rtl_uString_newFromString( &pCopy, pString );
-+        pString = pCopy;
-+        if (!pString)
-+            return NULL;
-+    }
-+
-+    if (!SAL_STRING_IS_STATIC (pString))
-+        pString->refCount |= SAL_STRING_INTERN_FLAG;
-+    pHash->pData[n] = pString;
-+    pHash->nEntries++;
-+
-+    return pString;
-+}
-+
-+void
-+rtl_str_hash_remove (rtl_uString       *pString)
-+{
-+    sal_uInt32   n;
-+    sal_uInt32   nHash = hashString (pString);
-+    rtl_uString *pHashStr;
-+
-+    StringHashTable *pHash = getHashTable();
-+
-+    n = nHash % pHash->nSize;
-+    while ((pHashStr = pHash->pData[n]) != NULL) {
-+        if (compareEqual (pHashStr, pString))
-+            break;
-+        n++;
-+        if (n >= pHash->nSize)
-+            n = 0;
-+    }
-+    OSL_ASSERT (pHash->pData[n] != 0);
-+    if (pHash->pData[n] == NULL)
-+        return;
-+
-+    pHash->pData[n++] = NULL;
-+    pHash->nEntries--;
-+
-+    if (n >= pHash->nSize)
-+        n = 0;
-+
-+    while ((pHashStr = pHash->pData[n]) != NULL) {
-+        pHash->pData[n] = NULL;
-+        // FIXME: rather unsophisticated and N^2 in chain-length, but robust.
-+        rtl_str_hash_insert_nonequal (pHash, pHashStr);
-+        n++;
-+        if (n >= pHash->nSize)
-+            n = 0;
-+    }
-+    // FIXME: Should we down-size ?
-+}
-+
-+
- }
--- 
-1.7.0.1
-
commit b068b43846f85ca2831879059a24bcc6765b3c81
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 12:59:00 2010 +0200

    sw-ww8-ruby-export-fix.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index dea2720..e4702dc 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2527,7 +2527,6 @@ system-lpsolve-rpath.diff, rengelha
 
 [ Fixes ]
 ww8-image-position.diff
-sw-ww8-ruby-export-fix.diff, i#79246, cbosdo
 
 # add missing patch to upstreamed ppt gradient fix
 ppt-customshape-shading-fix.diff, i#102797, thorsten
diff --git a/patches/dev300/sw-ww8-ruby-export-fix.diff b/patches/dev300/sw-ww8-ruby-export-fix.diff
deleted file mode 100644
index 9ad4302..0000000
--- a/patches/dev300/sw-ww8-ruby-export-fix.diff
+++ /dev/null
@@ -1,93 +0,0 @@
----
- sw/source/filter/ww8/wrtw8nds.cxx |    9 ++++++++-
- sw/source/filter/ww8/ww8scan.cxx  |   15 +++++++++++++++
- sw/source/filter/ww8/ww8scan.hxx  |    4 ++++
- 3 files changed, 27 insertions(+), 1 deletions(-)
-
-diff --git sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8nds.cxx
-index d923bb5..da8ac07 100644
---- sw/source/filter/ww8/wrtw8nds.cxx
-+++ sw/source/filter/ww8/wrtw8nds.cxx
-@@ -801,7 +801,14 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRu
-     aStr += String::CreateFromInt32(nHeight);
-     aStr += '(';
-     aStr += rRuby.GetText();
--    aStr.APPEND_CONST_ASC( ");" );
-+    aStr.APPEND_CONST_ASC( ")" );
-+
-+    // The parameter separator depends on the FIB.lid
-+    if ( m_rWW8Export.pFib->getNumDecimalSep() == '.' )
-+        aStr.APPEND_CONST_ASC( "," );
-+    else
-+        aStr.APPEND_CONST_ASC( ";" );
-+
-     m_rWW8Export.OutputField( 0, ww::eEQ, aStr,
-             WRITEFIELD_START | WRITEFIELD_CMD_START );
- }
-diff --git sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.cxx
-index 8ca3f12..c5d1a17 100644
---- sw/source/filter/ww8/ww8scan.cxx
-+++ sw/source/filter/ww8/ww8scan.cxx
-@@ -47,8 +47,11 @@
- #include <swtypes.hxx>      // DELETEZ
- 
- #endif                      // dump
-+#include <comphelper/processfactory.hxx>
-+#include <unotools/localedatawrapper.hxx>
- #include <tools/debug.hxx>
- #include <i18npool/lang.h>
-+#include <editeng/unolingu.hxx>
- #include <vcl/svapp.hxx>    // Application  #i90932#
- 
- #include <stdio.h>
-@@ -58,6 +61,8 @@
-     if (!(aCon)) \
-         return aRet;
- 
-+using namespace ::com::sun::star::lang;
-+
- //-begin
- namespace SL
- {
-@@ -5649,6 +5654,16 @@ WW8Fib::WW8Fib(BYTE nVer)
-             break;
-     };
-     // <-- #i90932# 
-+    
-+    Locale aTempLocale;
-+    SvxLanguageToLocale( aTempLocale, lid );
-+    LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), aTempLocale );
-+    nNumDecimalSep = aLocaleWrapper.getNumDecimalSep().GetChar( 0 );
-+}
-+
-+sal_Unicode WW8Fib::getNumDecimalSep() const
-+{
-+    return nNumDecimalSep;
- }
- 
- bool WW8Fib::WriteHeader(SvStream& rStrm)
-diff --git sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8scan.hxx
-index f559543..7844860 100644
---- sw/source/filter/ww8/ww8scan.hxx
-+++ sw/source/filter/ww8/ww8scan.hxx
-@@ -988,6 +988,9 @@ public:
- */
- class WW8Fib
- {
-+private:
-+    sal_Unicode nNumDecimalSep;
-+
- public:
-     /**
-         Program-Version asked for by us:
-@@ -1445,6 +1448,7 @@ public:
-     static rtl_TextEncoding GetFIBCharset(UINT16 chs);
-     ww::WordVersion GetFIBVersion() const;
-     WW8_CP GetBaseCp(ManTypes nType) const;
-+    sal_Unicode getNumDecimalSep() const;
- };
- 
- class WW8Style
--- 
-1.7.0.1
-
commit d07d81991642ea2449700c69742cbaf32fe3898c
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 12:55:22 2010 +0200

    sw-ww8-styles-import-fix.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 852b9ba..dea2720 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -480,8 +480,6 @@ desktop-quickstart-option-enable-unx.diff, i#108918, n#575555, pmladek
 sfx2-qstartfixes.diff, i#108846, caolan
 
 [ WriterFixes ]
-# Upstreamed in cbosdo06
-sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 
 [ CalcFixes ]
 
diff --git a/patches/dev300/sw-ww8-styles-import-fix.diff b/patches/dev300/sw-ww8-styles-import-fix.diff
deleted file mode 100644
index 1a74469..0000000
--- a/patches/dev300/sw-ww8-styles-import-fix.diff
+++ /dev/null
@@ -1,20 +0,0 @@
----
- sw/source/filter/ww8/writerwordglue.cxx |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/writerwordglue.cxx
-index 2d07aba..078e2a7 100644
---- sw/source/filter/ww8/writerwordglue.cxx
-+++ sw/source/filter/ww8/writerwordglue.cxx
-@@ -162,7 +162,7 @@ namespace myImplHelpers
-             RES_NONE, RES_NONE, RES_NONE, RES_POOLCOLL_LISTS_BEGIN,
-             RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
-             RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
--            RES_NONE, RES_NONE, RES_POOLCOLL_DOC_TITEL, RES_NONE,
-+            RES_NONE, RES_NONE, RES_POOLCOLL_HEADLINE_BASE, RES_NONE,
-             RES_POOLCOLL_SIGNATURE, RES_NONE, RES_POOLCOLL_TEXT,
-             RES_POOLCOLL_TEXT_MOVE, RES_NONE, RES_NONE, RES_NONE, RES_NONE,
-             RES_NONE, RES_NONE, RES_POOLCOLL_DOC_SUBTITEL
--- 
-1.7.0.1
-
commit 1d38ace26823eb44f663d910f1977ae549cfba05
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 12:53:02 2010 +0200

    sw-ww8-field-fix.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 134f4c6..852b9ba 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -480,10 +480,6 @@ desktop-quickstart-option-enable-unx.diff, i#108918, n#575555, pmladek
 sfx2-qstartfixes.diff, i#108846, caolan
 
 [ WriterFixes ]
-# Some WW8 fields weren't imported at all
-# Upstreamed in cbosdo06
-sw-ww8-field-fix.diff, i#61075, i#89667, i#11684 cbosdo
-
 # Upstreamed in cbosdo06
 sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 
diff --git a/patches/dev300/sw-ww8-field-fix.diff b/patches/dev300/sw-ww8-field-fix.diff
deleted file mode 100644
index 753f5e4..0000000
--- a/patches/dev300/sw-ww8-field-fix.diff
+++ /dev/null
@@ -1,27 +0,0 @@
----
- sw/source/filter/ww8/ww8par5.cxx |    9 ++++++---
- 1 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par5.cxx
-index 692e1df..1fe4e37 100644
---- sw/source/filter/ww8/ww8par5.cxx
-+++ sw/source/filter/ww8/ww8par5.cxx
-@@ -985,9 +985,12 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
-         pStrm->Seek( nOldPos );
- 
-         //#124725# field codes which contain '/' or '.' are not displayed in WinWord
--        if (!aStr.EqualsAscii(" ADDIN", 0, 6) &&
--            (aStr.Search('.') != STRING_NOTFOUND ||
--             aStr.Search('/') != STRING_NOTFOUND))
-+        xub_StrLen nSpacePos = aStr.Search( ' ', 1 );
-+        if ( STRING_NOTFOUND == nSpacePos )
-+            nSpacePos = aStr.Len( );
-+        xub_StrLen nSearchPos = STRING_NOTFOUND;
-+        if ( ( ( nSearchPos = aStr.Search('.') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) ||
-+             ( ( nSearchPos = aStr.Search('/') ) != STRING_NOTFOUND && nSearchPos < nSpacePos ) )
-             return aF.nLen;
-         else
-             return aF.nLen - aF.nLRes - 1;  // so viele ueberlesen, das Resultfeld
--- 
-1.7.0.1
-
commit e30d2d2b8e67b08c3d5056317c9e57d0f7bdc079
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 12:36:14 2010 +0200

    docx-fixes02.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 9923d6c..134f4c6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2566,7 +2566,6 @@ gnome-screen-saver.diff, i#106372, cmc
 
 [ OOXMLExport ]
 oox-pptx-export-update-to-ooo320.diff, rodo
-docx-fixes02.diff, n#581604, cbosdo
 iso-ooxml-sw.diff, cbosdo
 
 [ OOXMLExportDevel ]
diff --git a/patches/dev300/docx-fixes02.diff b/patches/dev300/docx-fixes02.diff
deleted file mode 100644
index 6af40ff..0000000
--- a/patches/dev300/docx-fixes02.diff
+++ /dev/null
@@ -1,1114 +0,0 @@
-Docx fixes
-
-From: Cédric Bosdonnat <cedricbosdo at openoffice.org>
-
-
----
-
- sax/source/tools/fastserializer.cxx          |   45 +++
- sax/source/tools/fastserializer.hxx          |    7 +
- sw/source/filter/ww8/attributeoutputbase.hxx |    5 +-
- sw/source/filter/ww8/docxattributeoutput.cxx |  402 +++++++++++++++++++++++---
- sw/source/filter/ww8/docxattributeoutput.hxx |    8 +-
- sw/source/filter/ww8/makefile.mk             |    1 +
- sw/source/filter/ww8/rtfattributeoutput.cxx  |    4 +-
- sw/source/filter/ww8/rtfattributeoutput.hxx  |    5 +-
- sw/source/filter/ww8/wrtw8nds.cxx            |   88 +-----
- sw/source/filter/ww8/wrtw8sty.cxx            |   15 +-
- sw/source/filter/ww8/wrtww8.hxx              |   69 +++++
- sw/source/filter/ww8/ww8atr.cxx              |   21 +-
- sw/source/filter/ww8/ww8attributeoutput.hxx  |    5 +-
- 13 files changed, 528 insertions(+), 147 deletions(-)
-
-
-diff --git sax/source/tools/fastserializer.cxx sax/source/tools/fastserializer.cxx
-index 6b0736d..edff7cb 100644
---- sax/source/tools/fastserializer.cxx
-+++ sax/source/tools/fastserializer.cxx
-@@ -34,6 +34,10 @@
- 
- #include <string.h>
- 
-+#if DEBUG
-+#include <cstdio>
-+#endif
-+
- using ::rtl::OString;
- using ::rtl::OUString;
- using ::rtl::OUStringBuffer;
-@@ -321,6 +325,28 @@ namespace sax_fastparser {
-         maMarkStack.push( ForMerge() );
-     }
- 
-+#if DEBUG
-+    void FastSaxSerializer::printMarkStack( )
-+    {
-+        ::std::stack< ForMerge > aCopy( maMarkStack );
-+        int nSize = aCopy.size();
-+        int i = 0;
-+        while ( !aCopy.empty() )
-+        {
-+            fprintf( stderr, "%d\n", nSize - i );
-+
-+            ForMerge aMarks = aCopy.top( );
-+            aMarks.print();
-+
-+
-+            fprintf( stderr, "\n" );
-+
-+            aCopy.pop( );
-+            i++;
-+        }
-+    }
-+#endif
-+
-     void FastSaxSerializer::mergeTopMarks( sax_fastparser::MergeMarksEnum eMergeType )
-     {
-         if ( maMarkStack.empty() )
-@@ -360,6 +386,25 @@ namespace sax_fastparser {
-         return maData;
-     }
- 
-+#if DEBUG
-+    void FastSaxSerializer::ForMerge::print( )
-+    {
-+        fprintf( stderr, "Data: " );
-+        for ( sal_Int32 i=0, len=maData.getLength(); i < len; i++ )
-+        {
-+            fprintf( stderr, "%c", maData[i] );
-+        }
-+
-+        fprintf( stderr, "\nPostponed: " );
-+        for ( sal_Int32 i=0, len=maPostponed.getLength(); i < len; i++ )
-+        {
-+            fprintf( stderr, "%c", maPostponed[i] );
-+        }
-+
-+        fprintf( stderr, "\n" );
-+    }
-+#endif
-+
-     void FastSaxSerializer::ForMerge::prepend( const Int8Sequence &rWhat )
-     {
-         merge( maData, rWhat, false );
-diff --git sax/source/tools/fastserializer.hxx sax/source/tools/fastserializer.hxx
-index a616f69..0132306 100644
---- sax/source/tools/fastserializer.hxx
-+++ sax/source/tools/fastserializer.hxx
-@@ -134,6 +134,9 @@ private:
-         ForMerge() : maData(), maPostponed() {}
- 
-         Int8Sequence& getData();
-+#if DEBUG
-+        void print();
-+#endif
- 
-         void prepend( const Int8Sequence &rWhat );
-         void append( const Int8Sequence &rWhat );
-@@ -143,6 +146,10 @@ private:
-         static void merge( Int8Sequence &rTop, const Int8Sequence &rMerge, bool bAppend );
-     };
- 
-+#if DEBUG
-+        void printMarkStack( );
-+#endif
-+
-     ::std::stack< ForMerge > maMarkStack;
- 
-     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 e5f40b9..ff8c062 100644
---- sw/source/filter/ww8/attributeoutputbase.hxx
-+++ sw/source/filter/ww8/attributeoutputbase.hxx
-@@ -176,7 +176,7 @@ public:
-     virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) = 0;
- 
-     /// Output ruby start.
--    virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby ) = 0;
-+    virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby ) = 0;
- 
-     /// Output ruby end.
-     virtual void EndRuby() = 0;
-@@ -247,7 +247,8 @@ public:
- 
-     /// Start of a style in the styles table.
-     virtual void StartStyle( const String& rName, bool bPapFmt,
--            USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId ) = 0;
-+            USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId, 
-+            bool bAutoUpdate ) = 0;
- 
-     /// 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 4637f0d..684b1e6 100644
---- sw/source/filter/ww8/docxattributeoutput.cxx
-+++ sw/source/filter/ww8/docxattributeoutput.cxx
-@@ -31,6 +31,13 @@
- #include "writerwordglue.hxx"
- #include "wrtww8.hxx"
- #include "ww8par.hxx"
-+#include "fmtcntnt.hxx"
-+#include "fmtsrnd.hxx"
-+#include "fchrfmt.hxx"
-+#include "tgrditem.hxx"
-+#include "fmtruby.hxx"
-+#include "charfmt.hxx"
-+#include "breakit.hxx"
- 
- #include <oox/core/tokens.hxx>
- #include <oox/export/drawingml.hxx>
-@@ -207,6 +214,25 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
-     FinishTableRowCell( pTextNodeInfoInner );
- 
-     m_bParagraphOpened = false;
-+
-+    // Write the anchored frame if any
-+    if ( m_pParentFrame )
-+    {
-+        const SwFrmFmt& rFrmFmt = m_pParentFrame->GetFrmFmt( );
-+        const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
-+
-+        ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1                  : 0;
-+        ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
-+
-+        m_rExport.SaveData( nStt, nEnd );
-+
-+        m_rExport.mpParentFrame = m_pParentFrame;
-+        m_pParentFrame = NULL;
-+
-+        m_rExport.WriteText( );
-+        
-+        m_rExport.RestoreData();
-+    }
- }
- 
- void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph )
-@@ -286,6 +312,14 @@ void DocxAttributeOutput::InitCollectedParagraphProperties()
- 
- void DocxAttributeOutput::WriteCollectedParagraphProperties()
- {
-+    if ( m_pFlyAttrList )
-+    {
-+        XFastAttributeListRef xAttrList( m_pFlyAttrList );
-+        m_pFlyAttrList = NULL;
-+
-+        m_pSerializer->singleElementNS( XML_w, XML_framePr, xAttrList );
-+    }
-+
-     if ( m_pSpacingAttrList )
-     {
-         XFastAttributeListRef xAttrList( m_pSpacingAttrList );
-@@ -745,14 +779,75 @@ void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode
-     OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
- }
- 
--void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
-+void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby )
- {
-     OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
-+    m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND );
-+    m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND );
-+    // hps
-+    // hpsBaseText
-+    // hpsRaise
-+    // lid
-+    lang::Locale aLocale( SwBreakIt::Get()->GetLocale( 
-+                rNode.GetLang( nPos ) ) );
-+    OUString sLang( aLocale.Language );
-+    if ( aLocale.Country.getLength( ) > 0 )
-+        sLang += OUString::createFromAscii( "-" ) + OUString( aLocale.Country );
-+    m_pSerializer->singleElementNS( XML_w, XML_lid,
-+            FSNS( XML_w, XML_val ), 
-+            OUStringToOString( sLang, RTL_TEXTENCODING_UTF8 ).getStr( ), FSEND );
-+
-+
-+    OString sAlign ( "center" );
-+    switch ( rRuby.GetAdjustment( ) )
-+    {
-+        case 0:
-+            sAlign = OString( "left" );
-+            break;
-+        case 1:
-+            // Defaults to center
-+            break;
-+        case 2:
-+            sAlign = OString( "right" );
-+            break;
-+        case 3:
-+            sAlign = OString( "distributeLetter" );
-+            break;
-+        case 4:
-+            sAlign = OString( "distributeSpace" );
-+            break;
-+        default:
-+            break;
-+    }
-+    m_pSerializer->singleElementNS( XML_w, XML_rubyAlign, 
-+            FSNS( XML_w, XML_val ), sAlign.getStr(), FSEND );
-+    m_pSerializer->endElementNS( XML_w, XML_rubyPr );
-+
-+    m_pSerializer->startElementNS( XML_w, XML_rt, FSEND );
-+    StartRun( NULL );
-+    StartRunProperties( );
-+    SwAttrIter aAttrIt( m_rExport, rNode );
-+    aAttrIt.OutAttr( nPos, true );
-+    USHORT nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
-+    OString aStyleId( "style" );
-+    aStyleId += OString::valueOf( sal_Int32( nStyle ) );
-+    m_pSerializer->singleElementNS( XML_w, XML_rStyle,
-+            FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
-+    EndRunProperties( NULL );
-+    RunText( rRuby.GetText( ) );
-+    EndRun( );
-+    m_pSerializer->endElementNS( XML_w, XML_rt );
-+   
-+    m_pSerializer->startElementNS( XML_w, XML_rubyBase, FSEND );
-+    StartRun( NULL );
- }
- 
- void DocxAttributeOutput::EndRuby()
- {
-     OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" );
-+    EndRun( );
-+    m_pSerializer->endElementNS( XML_w, XML_rubyBase );
-+    m_pSerializer->endElementNS( XML_w, XML_ruby );
- }
- 
- bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark )
-@@ -1693,6 +1788,12 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
-                 }
-             }
-             break;
-+        case sw::Frame::eTxtBox:
-+            {
-+                // The frame output is postponed at the end of the anchor paragraph
-+                m_pParentFrame = &rFrame;
-+            }
-+            break;
-         default:
- #if OSL_DEBUG_LEVEL > 0
-             OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
-@@ -1707,7 +1808,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
- }
- 
- void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
--        USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId )
-+        USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool bAutoUpdate )
- {
-     OString aStyle( "style" );
- 
-@@ -1730,6 +1831,9 @@ void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
-     m_pSerializer->singleElementNS( XML_w, XML_next,
-             FSNS( XML_w, XML_val ), ( aStyle + OString::valueOf( sal_Int32( nNext ) ) ).getStr(),
-             FSEND );
-+
-+    if ( bAutoUpdate )
-+        m_pSerializer->singleElementNS( XML_w, XML_autoRedefine, FSEND );
- }
- 
- void DocxAttributeOutput::EndStyle()
-@@ -2247,11 +2351,43 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
-     }
- }
- 
--void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ )
--{
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" );
--#endif
-+void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
-+{ 
-+    OString sIss;
-+    short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
-+    if ( !nEsc )
-+    {
-+        sIss = OString( "baseline" );
-+        nEsc = 0;
-+        nProp = 100;
-+    }
-+    else if ( DFLT_ESC_PROP == nProp )
-+    {
-+        if ( DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
-+            sIss = OString( "subscript" );
-+        else if ( DFLT_ESC_SUPER == nEsc || DFLT_ESC_AUTO_SUPER == nEsc )
-+            sIss = OString( "superscript" );
-+    }
-+    
-+    if ( sIss.getLength( ) > 0 )
-+        m_pSerializer->singleElementNS( XML_w, XML_vertAlign, 
-+           FSNS( XML_w, XML_val ), sIss.getStr(), FSEND );
-+
-+    if ( sIss.getLength() == 0 || sIss.match( OString( "baseline" ) ) )
-+    {
-+        long nHeight = ((SvxFontHeightItem&)m_rExport.GetItem(
-+                                    RES_CHRATR_FONTSIZE )).GetHeight();
-+        OString sPos = OString::valueOf( ( nHeight * nEsc + 500 ) / 1000 );
-+        m_pSerializer->singleElementNS( XML_w, XML_position,
-+                FSNS( XML_w, XML_val ), sPos.getStr( ), FSEND );
-+
-+        if( 100 != nProp || sIss.match( OString( "baseline" ) ) )
-+        {
-+            OString sSize = OString::valueOf( ( nHeight * nProp + 500 ) / 1000 );
-+                m_pSerializer->singleElementNS( XML_w, XML_sz,
-+                    FSNS( XML_w, XML_val ), sSize.getStr( ), FSEND );
-+        }
-+    }
- }
- 
- void DocxAttributeOutput::CharFont( const SvxFontItem& rFont)
-@@ -2283,7 +2419,7 @@ void DocxAttributeOutput::CharFontSize( const SvxFontHeightItem& rFontSize)
- void DocxAttributeOutput::CharKerning( const SvxKerningItem& rKerning )
- {
-     OString aKerning = OString::valueOf( ( sal_Int32 ) rKerning.GetValue() );
--    m_pSerializer->singleElementNS( XML_w, XML_kern, FSNS(XML_w, XML_val), aKerning.getStr(), FSEND );
-+    m_pSerializer->singleElementNS( XML_w, XML_spacing, FSNS(XML_w, XML_val), aKerning.getStr(), FSEND );
- }
- 
- void DocxAttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
-@@ -2536,11 +2672,12 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
-     m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
- }
- 
--void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& )
-+void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
- {
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" );
--#endif
-+    OString aStyleId( "style" );
-+    aStyleId += OString::valueOf( sal_Int32( m_rExport.GetId( *rCharFmt.GetCharFmt() ) ) );
-+
-+    m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND );
- }
- 
- void DocxAttributeOutput::RefField( const SwField&  rFld, const String& rRef )
-@@ -2954,9 +3091,22 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
- {
-     if ( m_rExport.bOutFlyFrmAttrs )
-     {
-- #if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
-- #endif
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList( );
-+      
-+        if ( rSize.GetWidth() && rSize.GetWidthSizeType() == ATT_FIX_SIZE )
-+        {
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_w ), OString::valueOf( rSize.GetWidth( ) ) );
-+        }
-+
-+        if ( rSize.GetHeight() )
-+        {
-+            OString sRule( "exact" );
-+            if ( rSize.GetHeightSizeType() == ATT_MIN_SIZE )
-+                sRule = OString( "atLeast" );
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_hRule ), sRule );
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_h ), OString::valueOf( rSize.GetHeight( ) ) );
-+        }
-     }
-     else if ( m_rExport.bOutPageDescs ) 
-     {
-@@ -2986,9 +3136,12 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
- {
-     if ( m_rExport.bOutFlyFrmAttrs )
-     {
--#if OSL_DEBUG_LEVEL > 0
--        OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
--#endif
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList();
-+
-+        m_pFlyAttrList->add( FSNS( XML_w, XML_hSpace ), 
-+                OString::valueOf( 
-+                    sal_Int32( ( rLRSpace.GetLeft() + rLRSpace.GetRight() ) / 2 ) ) );
-     }
-     else if ( m_rExport.bOutPageDescs ) 
-     {
-@@ -3029,11 +3182,17 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
- 
- void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
- {
--    if (!m_pSpacingAttrList)
-+    if ( !m_pSpacingAttrList && !m_rExport.bOutFlyFrmAttrs )
-         m_pSpacingAttrList = m_pSerializer->createAttrList();
- 
-     if ( m_rExport.bOutFlyFrmAttrs )
-     {
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList();
-+
-+        m_pFlyAttrList->add( FSNS( XML_w, XML_vSpace ), 
-+                OString::valueOf( 
-+                    sal_Int32( ( rULSpace.GetLower() + rULSpace.GetUpper() ) / 2 ) ) );
-     } 
-     else if (m_rExport.bOutPageDescs )
-     {
-@@ -3075,32 +3234,150 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
-     }
- }
- 
--void DocxAttributeOutput::FormatSurround( const SwFmtSurround& )
-+void DocxAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
- {
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" );
--#endif
-+    if ( m_rExport.bOutFlyFrmAttrs )
-+    {
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList();
-+
-+        OString sWrap( "auto" );
-+        switch ( rSurround.GetSurround( ) )
-+        {
-+            case SURROUND_NONE:
-+                sWrap = OString( "none" );
-+                break;
-+            case SURROUND_THROUGHT:
-+                sWrap = OString( "through" );
-+                break;
-+            case SURROUND_IDEAL:
-+            case SURROUND_PARALLEL:
-+            case SURROUND_LEFT:
-+            case SURROUND_RIGHT:
-+            default:
-+                sWrap = OString( "around" );
-+        }
-+
-+        m_pFlyAttrList->add( FSNS( XML_w, XML_wrap ), sWrap );
-+    }
- }
- 
--void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& )
-+void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert )
- {
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
--#endif
-+    if ( m_rExport.bOutFlyFrmAttrs )
-+    {
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList();
-+        
-+        OString sAlign;
-+        switch( rFlyVert.GetVertOrient() )
-+        {
-+            case text::VertOrientation::NONE:
-+                break;
-+            case text::VertOrientation::CENTER:
-+            case text::VertOrientation::LINE_CENTER:
-+                sAlign = OString( "center" );
-+                break;
-+            case text::VertOrientation::BOTTOM:
-+            case text::VertOrientation::LINE_BOTTOM:
-+                sAlign = OString( "bottom" );
-+                break;
-+            case text::VertOrientation::TOP:
-+            case text::VertOrientation::LINE_TOP:
-+            default:
-+                sAlign = OString( "top" );
-+                break;
-+        }
-+
-+        if ( sAlign.getLength() > 0 )
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_yAlign ), sAlign );
-+        else
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_y ), 
-+                OString::valueOf( sal_Int32( rFlyVert.GetPos() ) ) );
-+        
-+        OString sVAnchor( "page" );
-+        switch ( rFlyVert.GetRelationOrient( ) )
-+        {
-+            case text::RelOrientation::CHAR:
-+            case text::RelOrientation::PRINT_AREA:
-+            case text::RelOrientation::TEXT_LINE:
-+                sVAnchor = OString( "column" );
-+                break;
-+            case text::RelOrientation::FRAME:
-+            case text::RelOrientation::PAGE_LEFT:
-+            case text::RelOrientation::PAGE_RIGHT:
-+            case text::RelOrientation::FRAME_LEFT:
-+            case text::RelOrientation::FRAME_RIGHT:
-+                sVAnchor = OString( "margin" );
-+                break;
-+            case text::RelOrientation::PAGE_FRAME:
-+            case text::RelOrientation::PAGE_PRINT_AREA:
-+            default:
-+                break;
-+        }
-+
-+        m_pFlyAttrList->add( FSNS( XML_w, XML_vAnchor ), sVAnchor );
-+    }
- }
- 
--void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& )
-+void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori )
- {
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
--#endif
-+    if ( m_rExport.bOutFlyFrmAttrs )
-+    {
-+        if ( !m_pFlyAttrList )
-+            m_pFlyAttrList = m_pSerializer->createAttrList();
-+        
-+        OString sAlign;
-+        switch( rFlyHori.GetHoriOrient() )
-+        {
-+            case text::HoriOrientation::NONE:
-+                break;
-+            case text::HoriOrientation::LEFT:
-+                sAlign = OString( rFlyHori.IsPosToggle( ) ? "inside" : "left" );
-+                break;
-+            case text::HoriOrientation::RIGHT:
-+                sAlign = OString( rFlyHori.IsPosToggle( ) ? "outside" : "right" );
-+                break;
-+            case text::HoriOrientation::CENTER:
-+            case text::HoriOrientation::FULL: // FULL only for tables
-+            default:
-+                sAlign = OString( "center" );
-+                break;
-+        }
-+
-+        if ( sAlign.getLength() > 0 )
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_xAlign ), sAlign );
-+        else 
-+            m_pFlyAttrList->add( FSNS( XML_w, XML_x ), 
-+                OString::valueOf( sal_Int32( rFlyHori.GetPos() ) ) );
-+
-+        OString sHAnchor( "page" );
-+        switch ( rFlyHori.GetRelationOrient( ) )
-+        {
-+            case text::RelOrientation::CHAR:
-+            case text::RelOrientation::PRINT_AREA:
-+                sHAnchor = OString( "text" );
-+                break;
-+            case text::RelOrientation::FRAME:
-+            case text::RelOrientation::PAGE_LEFT:
-+            case text::RelOrientation::PAGE_RIGHT:
-+            case text::RelOrientation::FRAME_LEFT:
-+            case text::RelOrientation::FRAME_RIGHT:
-+                sHAnchor = OString( "margin" );
-+                break;
-+            case text::RelOrientation::PAGE_FRAME:
-+            case text::RelOrientation::PAGE_PRINT_AREA:
-+            default:
-+                break;
-+        }
-+
-+        m_pFlyAttrList->add( FSNS( XML_w, XML_hAnchor ), sHAnchor );
-+    }
- }
- 
- void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& )
- {
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" );
--#endif
-+    // Fly frames: anchors here aren't matching the anchors in docx
- }
- 
- void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
-@@ -3112,10 +3389,6 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
-                 FSNS( XML_w, XML_fill ), sColor.getStr( ),
-                 FSEND );
-     }
--
--#if OSL_DEBUG_LEVEL > 0
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" );
--#endif
- }
- 
- void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
-@@ -3198,9 +3471,52 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& )
-     m_pSerializer->singleElementNS( XML_w, XML_keepNext, FSEND );
- }
- 
--void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& )
-+void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
- {
--    OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" );
-+    FastAttributeList *pGridAttrList = m_pSerializer->createAttrList();
-+
-+    OString sGridType;
-+    switch ( rGrid.GetGridType( ) )
-+    {
-+        default:
-+        case GRID_NONE:
-+            sGridType = OString( "default" );
-+            break;
-+        case GRID_LINES_ONLY:
-+            sGridType = OString( "lines" );
-+            break;
-+        case GRID_LINES_CHARS:
-+            if ( rGrid.IsSnapToChars( ) )
-+                sGridType = OString( "snapToChars" );
-+            else
-+                sGridType = OString( "linesAndChars" );
-+            break;
-+    }
-+    pGridAttrList->add( FSNS( XML_w, XML_type ), sGridType.getStr( ) );
-+        
-+    UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
-+    pGridAttrList->add( FSNS( XML_w, XML_linePitch ), 
-+            OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
-+        
-+    MSWordStyles * pStyles = m_rExport.pStyles;
-+    SwFmt * pSwFmt = pStyles->GetSwFmt();
-+
-+    sal_uInt32 nPageCharSize = 0;
-+
-+    if (pSwFmt != NULL)
-+    {
-+        nPageCharSize = ItemGet<SvxFontHeightItem>
-+        (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight();
-+    }
-+
-+    sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() : 
-+        rGrid.GetBaseWidth( );
-+    INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
-+
-+    pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
-+            OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
-+
-+    m_pSerializer->singleElementNS( XML_w, XML_docGrid, pGridAttrList );
- }
- 
- void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering )
-@@ -3258,6 +3574,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
-       m_pCharLangAttrList( NULL ),
-       m_pSpacingAttrList( NULL ),
-       m_pHyperlinkAttrList( NULL ),
-+      m_pFlyAttrList( NULL ),
-       m_pFootnotesList( new ::docx::FootnotesList() ),
-       m_pEndnotesList( new ::docx::FootnotesList() ),
-       m_pSectionInfo( NULL ),
-@@ -3270,7 +3587,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
-       m_bTableCellOpen( false ),
-       m_nTableDepth( 0 ),
-       m_bParagraphOpened( false ),
--      m_nColBreakStatus( COLBRK_NONE )
-+      m_nColBreakStatus( COLBRK_NONE ),
-+      m_pParentFrame( NULL )
- {
- }
- 
-@@ -3281,11 +3599,13 @@ DocxAttributeOutput::~DocxAttributeOutput()
-     delete m_pCharLangAttrList, m_pCharLangAttrList = NULL;
-     delete m_pSpacingAttrList, m_pSpacingAttrList = NULL;
-     delete m_pHyperlinkAttrList, m_pHyperlinkAttrList = NULL;
-+    delete m_pFlyAttrList, m_pFlyAttrList = NULL;
- 
-     delete m_pFootnotesList, m_pFootnotesList = NULL;
-     delete m_pEndnotesList, m_pEndnotesList = NULL;
- 
-     delete m_pTableWrt, m_pTableWrt = NULL;
-+    m_pParentFrame = NULL;
- }
- 
- MSWordExportBase& DocxAttributeOutput::GetExport()
-diff --git sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxattributeoutput.hxx
-index 2e94069..2625d6d 100644
---- sw/source/filter/ww8/docxattributeoutput.hxx
-+++ sw/source/filter/ww8/docxattributeoutput.hxx
-@@ -102,7 +102,7 @@ public:
-     virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
- 
-     /// Output ruby start.
--    virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
-+    virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
- 
-     /// Output ruby end.
-     virtual void EndRuby();
-@@ -175,7 +175,8 @@ public:
- 
-     /// Start of a style in the styles table.
-     virtual void StartStyle( const String& rName, bool bPapFmt,
--            USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId );
-+            USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
-+            bool bAutoUpdate );
- 
-     /// End of a style in the styles table.
-     virtual void EndStyle();
-@@ -541,6 +542,7 @@ private:
-     ::sax_fastparser::FastAttributeList *m_pCharLangAttrList;
-     ::sax_fastparser::FastAttributeList *m_pSpacingAttrList;
-     ::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
-+    ::sax_fastparser::FastAttributeList *m_pFlyAttrList;
- 
-     ::docx::FootnotesList *m_pFootnotesList;
-     ::docx::FootnotesList *m_pEndnotesList;
-@@ -583,6 +585,8 @@ private:
-     // beginning of the next paragraph
-     DocxColBreakStatus m_nColBreakStatus;
- 
-+    const sw::Frame *m_pParentFrame;
-+
- public:
-     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 efd0e64..730a67d 100644
---- sw/source/filter/ww8/makefile.mk
-+++ sw/source/filter/ww8/makefile.mk
-@@ -58,6 +58,7 @@ EXCEPTIONSFILES = \
-         $(SLO)$/wrtw8num.obj \
-         $(SLO)$/wrtw8sty.obj \
-         $(SLO)$/wrtww8.obj \
-+        $(SLO)$/docxattributeoutput.obj \
-         $(SLO)$/docxexportfilter.obj \
-         $(SLO)$/ww8atr.obj \
-         $(SLO)$/ww8par.obj \
-diff --git sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.cxx
-index 81cba2f..6265c14 100644
---- sw/source/filter/ww8/rtfattributeoutput.cxx
-+++ sw/source/filter/ww8/rtfattributeoutput.cxx
-@@ -433,7 +433,7 @@ void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, r
-     m_aRunText.append(m_rExport.OutString(rText, eCharSet));
- }
- 
--void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
-+void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, xub_StrLen /*nPos*/, const SwFmtRuby& /*rRuby*/ )
- {
-     OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
- }
-@@ -998,7 +998,7 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
- }
- 
- void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
--        USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId )
-+        USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ )
- {
-     OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
-             OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
-diff --git sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfattributeoutput.hxx
-index 4cb1b9c..24ee150 100644
---- sw/source/filter/ww8/rtfattributeoutput.hxx
-+++ sw/source/filter/ww8/rtfattributeoutput.hxx
-@@ -90,7 +90,7 @@ public:
-     virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
- 
-     /// Output ruby start.
--    virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
-+    virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
- 
-     /// Output ruby end.
-     virtual void EndRuby();
-@@ -152,7 +152,8 @@ public:
- 
-     /// Start of a style in the styles table.
-     virtual void StartStyle( const String& rName, bool bPapFmt,
--            USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId );
-+            USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
-+            bool bAutoUpdate );
- 
-     /// End of a style in the styles table.
-     virtual void EndStyle();
-diff --git sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8nds.cxx
-index 6fa4972..f632d0a 100644
---- sw/source/filter/ww8/wrtw8nds.cxx
-+++ sw/source/filter/ww8/wrtw8nds.cxx
-@@ -168,76 +168,6 @@ MSWordAttrIter::~MSWordAttrIter()
-     m_rExport.pChpIter = pOld;
- }
- 
--// Die Klasse SwAttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
--// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
--// diese Behandlung nicht.
--// Die Absatz- und Textattribute des Writers kommen rein, und es wird
--// mit Where() die naechste Position geliefert, an der sich die Attribute
--// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
--// ein Attribut ohne Ende und mit \xff im Text befindet.
--// Mit OutAttr() werden die Attribute an der angegebenen SwPos
--// ausgegeben.
--
--class SwAttrIter : public MSWordAttrIter
--{
--private:
--    const SwTxtNode& rNd;
--
--    CharRuns maCharRuns;
--    cCharRunIter maCharRunIter;
--
--    rtl_TextEncoding meChrSet;
--    sal_uInt16 mnScript;
--    bool mbCharIsRTL;
--
--    const SwRedline* pCurRedline;
--    xub_StrLen nAktSwPos;
--    USHORT nCurRedlinePos;
--
--    bool mbParaIsRTL;
--
--    const SwFmtDrop &mrSwFmtDrop;
--
--    sw::Frames maFlyFrms;     // #i2916#
--    sw::FrameIter maFlyIter;
--
--    xub_StrLen SearchNext( xub_StrLen nStartPos );
--    void FieldVanish( const String& rTxt );
--
--    void OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool bStart);
--
--    void IterToCurrent();
--
--    //No copying
--    SwAttrIter(const SwAttrIter&);
--    SwAttrIter& operator=(const SwAttrIter&);
--public:
--    SwAttrIter( MSWordExportBase& rWr, const SwTxtNode& rNd );
--
--    bool IsTxtAttr( xub_StrLen nSwPos );
--    bool IsRedlineAtEnd( xub_StrLen nPos ) const;
--    bool IsDropCap( int nSwPos );
--    bool RequiresImplicitBookmark();
--
--    void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
--
--    void OutAttr( xub_StrLen nSwPos );
--    virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
--    virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
--    int OutAttrWithRange(xub_StrLen nPos);
--    const SwRedlineData* GetRedline( xub_StrLen nPos );
--    void OutFlys(xub_StrLen nSwPos);
--
--    xub_StrLen WhereNext() const    { return nAktSwPos; }
--    sal_uInt16 GetScript() const { return mnScript; }
--    bool IsCharRTL() const { return mbCharIsRTL; }
--    bool IsParaRTL() const { return mbParaIsRTL; }
--    rtl_TextEncoding GetCharSet() const { return meChrSet; }
--    String GetSnippet(const String &rStr, xub_StrLen nAktPos,
--        xub_StrLen nLen) const;
--    const SwFmtDrop& GetSwFmtDrop() const { return mrSwFmtDrop; }
--};
--
- class sortswflys :
-     public std::binary_function<const sw::Frame&, const sw::Frame&, bool>
- {
-@@ -456,7 +386,14 @@ xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos )
-     return nMinPos;
- }
- 
--void SwAttrIter::OutAttr( xub_StrLen nSwPos )
-+bool lcl_isFontsizeItem( const SfxPoolItem& rItem )
-+{
-+    return ( rItem.Which( ) == RES_CHRATR_FONTSIZE ||
-+            rItem.Which( ) == RES_CHRATR_CJK_FONTSIZE ||
-+            rItem.Which( ) == RES_CHRATR_CTL_FONTSIZE );
-+}
-+
-+void SwAttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
- {
-     m_rExport.AttrOutput().RTLAndCJKState( IsCharRTL(), GetScript() );
- 
-@@ -544,7 +481,10 @@ void SwAttrIter::OutAttr( xub_StrLen nSwPos )
- 
-     sw::cPoolItemIter aEnd = aRangeItems.end();
-     for ( sw::cPoolItemIter aI = aRangeItems.begin(); aI != aEnd; ++aI )
--        aExportItems[aI->first] = aI->second;
-+    {
-+        if ( !bRuby || !lcl_isFontsizeItem( *aI->second ) )
-+            aExportItems[aI->first] = aI->second;
-+    }
- 
-     if ( !aExportItems.empty() )
-     {
-@@ -697,7 +637,7 @@ const SfxPoolItem& SwAttrIter::GetItem(USHORT nWhich) const
-     return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
- }
- 
--void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )
-+void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/, const SwFmtRuby& rRuby )
- {
-     String aStr( FieldString( ww::eEQ ) );
-     aStr.APPEND_CONST_ASC( "\\* jc" );
-@@ -1233,7 +1173,7 @@ int SwAttrIter::OutAttrWithRange(xub_StrLen nPos)
-                 case RES_TXTATR_CJK_RUBY:
-                     if ( nPos == *pHt->GetStart() )
-                     {
--                        m_rExport.AttrOutput().StartRuby( rNd, *static_cast< const SwFmtRuby* >( pItem ) );
-+                        m_rExport.AttrOutput().StartRuby( rNd, nPos, *static_cast< const SwFmtRuby* >( pItem ) );
-                         ++nRet;
-                     }
-                     if ( 0 != ( pEnd = pHt->GetEnd() ) && nPos == *pEnd )
-diff --git sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtw8sty.cxx
-index 2a6a204..4f4b60c 100644
---- sw/source/filter/ww8/wrtw8sty.cxx
-+++ sw/source/filter/ww8/wrtw8sty.cxx
-@@ -300,7 +300,7 @@ void WW8AttributeOutput::EndStyle()
- }
- 
- void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
--    USHORT nWwNext, USHORT nWwId, USHORT /*nId*/ )
-+    USHORT nWwNext, USHORT nWwId, USHORT /*nId*/, bool bAutoUpdate )
- {
-     BYTE aWW8_STD[ sizeof( WW8_STD ) ];
-     BYTE* pData = aWW8_STD;
-@@ -322,12 +322,12 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
- 
-     if( m_rWW8Export.bWrtWW8 )
-     {
-+        nBit16 = bAutoUpdate ? 1 : 0;  // fAutoRedef : 1
-+        Set_UInt16( pData, nBit16 );
-         //-------- jetzt neu:
-         // ab Ver8 gibts zwei Felder mehr:
--        //UINT16    fAutoRedef : 1;    /* auto redefine style when appropriate */
-         //UINT16    fHidden : 1;       /* hidden from UI? */
-         //UINT16    : 14;              /* unused bits */
--        pData += sizeof( UINT16 );
-     }
- 
- 
-@@ -525,8 +525,13 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
-         
-         GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
- 
--        m_rExport.AttrOutput().StartStyle( pFmt->GetName(), bFmtColl,
--                nBase, nWwNext, GetWWId( *pFmt ), nPos );
-+        String aName = pFmt->GetName();
-+        if ( aName.EqualsAscii( "Default" ) )
-+            aName = String::CreateFromAscii( "Normal" );
-+
-+        m_rExport.AttrOutput().StartStyle( aName, bFmtColl,
-+                nBase, nWwNext, GetWWId( *pFmt ), nPos, 
-+                pFmt->IsAutoUpdateFmt() );
-         
-         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 e09d463..d6f1041 100644
---- sw/source/filter/ww8/wrtww8.hxx
-+++ sw/source/filter/ww8/wrtww8.hxx
-@@ -1411,6 +1411,75 @@ public:
-     rtl_TextEncoding GetNodeCharSet() const     { return eNdChrSet; }
- };
- 
-+// Die Klasse SwAttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
-+// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
-+// diese Behandlung nicht.
-+// Die Absatz- und Textattribute des Writers kommen rein, und es wird
-+// mit Where() die naechste Position geliefert, an der sich die Attribute
-+// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
-+// ein Attribut ohne Ende und mit \xff im Text befindet.
-+// Mit OutAttr() werden die Attribute an der angegebenen SwPos
-+// ausgegeben.
-+class SwAttrIter : public MSWordAttrIter
-+{
-+private:
-+    const SwTxtNode& rNd;
-+
-+    sw::util::CharRuns maCharRuns;
-+    sw::util::cCharRunIter maCharRunIter;
-+
-+    rtl_TextEncoding meChrSet;
-+    sal_uInt16 mnScript;
-+    bool mbCharIsRTL;
-+
-+    const SwRedline* pCurRedline;
-+    xub_StrLen nAktSwPos;
-+    USHORT nCurRedlinePos;
-+
-+    bool mbParaIsRTL;
-+
-+    const SwFmtDrop &mrSwFmtDrop;
-+
-+    sw::Frames maFlyFrms;     // #i2916#
-+    sw::FrameIter maFlyIter;
-+
-+    xub_StrLen SearchNext( xub_StrLen nStartPos );
-+    void FieldVanish( const String& rTxt );
-+
-+    void OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool bStart);
-+
-+    void IterToCurrent();
-+
-+    //No copying
-+    SwAttrIter(const SwAttrIter&);
-+    SwAttrIter& operator=(const SwAttrIter&);
-+public:
-+    SwAttrIter( MSWordExportBase& rWr, const SwTxtNode& rNd );
-+
-+    bool IsTxtAttr( xub_StrLen nSwPos );
-+    bool IsRedlineAtEnd( xub_StrLen nPos ) const;
-+    bool IsDropCap( int nSwPos );
-+    bool RequiresImplicitBookmark();
-+
-+    void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
-+
-+    void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
-+    virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
-+    virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
-+    int OutAttrWithRange(xub_StrLen nPos);
-+    const SwRedlineData* GetRedline( xub_StrLen nPos );
-+    void OutFlys(xub_StrLen nSwPos);
-+
-+    xub_StrLen WhereNext() const    { return nAktSwPos; }
-+    sal_uInt16 GetScript() const { return mnScript; }
-+    bool IsCharRTL() const { return mbCharIsRTL; }
-+    bool IsParaRTL() const { return mbParaIsRTL; }
-+    rtl_TextEncoding GetCharSet() const { return meChrSet; }
-+    String GetSnippet(const String &rStr, xub_StrLen nAktPos,
-+        xub_StrLen nLen) const;
-+    const SwFmtDrop& GetSwFmtDrop() const { return mrSwFmtDrop; }
-+};
-+
- /// Class to collect and output the styles table.
- class MSWordStyles
- {
-diff --git sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8atr.cxx
-index cde7c02..96cc093 100644
---- sw/source/filter/ww8/ww8atr.cxx
-+++ sw/source/filter/ww8/ww8atr.cxx
-@@ -3774,25 +3774,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 );
-     }
-diff --git sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8attributeoutput.hxx
-index c064da2..cd0c986 100644
---- sw/source/filter/ww8/ww8attributeoutput.hxx
-+++ sw/source/filter/ww8/ww8attributeoutput.hxx
-@@ -74,7 +74,7 @@ public:
-     virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
- 
-     /// Output ruby start.
--    virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
-+    virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby );
- 
-     /// Output ruby end.
-     virtual void EndRuby();
-@@ -139,7 +139,8 @@ public:
- 
-     /// Start of a style in the styles table.
-     virtual void StartStyle( const String& rName, bool bPapFmt,
--            USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId );
-+            USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
-+            bool bAutoUpdate );
- 
-     /// End of a style in the styles table.
-     virtual void EndStyle();
commit 2aa32e7b2cb019423a3a135c926d43680ac88325
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Sep 17 12:24:14 2010 +0200

    cws-vmiklos01.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 8108dfe..9923d6c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -169,10 +169,6 @@ cws-koheichart02-xmloff.diff, kohei
 cws-koheicopyborder-sc.diff,  kohei
 cws-koheicopyborder-svx.diff, kohei
 
-[ CWSBackports ]
-# vmiklos01 cws (gsoc, rewrite rtf filter)
-cws-vmiklos01.diff, vmiklos
-
 [ LinuxOnly ]
 # add accelerator to the OK and Cancel buttons.
 ok-cancel-btn-add-accel.diff, kohei
diff --git a/patches/dev300/cws-vmiklos01.diff b/patches/dev300/cws-vmiklos01.diff
deleted file mode 100644
index 62057e3..0000000
--- a/patches/dev300/cws-vmiklos01.diff
+++ /dev/null
@@ -1,8128 +0,0 @@
-diff -r 004715ace8e7 -r d6b973424417 filter/source/config/fragments/filters/Rich_Text_Format.xcu
---- filter/source/config/fragments/filters/Rich_Text_Format.xcu	Mon Jul 19 17:09:02 2010 +0200
-+++ filter/source/config/fragments/filters/Rich_Text_Format.xcu	Thu Sep 09 01:20:35 2010 +0200
-@@ -1,7 +1,7 @@
- 	<node oor:name="Rich Text Format" oor:op="replace">
--		<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN PREFERRED</value></prop>
-+		<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
- 		<prop oor:name="UIComponent"/>
--		<prop oor:name="FilterService"/>
-+		<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.RtfFilter</value></prop>
- 		<prop oor:name="UserData"><value>RTF</value></prop>
- 		<prop oor:name="UIName">
- 			<value xml:lang="x-default">Rich Text Format</value>
-diff -r 004715ace8e7 -r d6b973424417 scp2/source/ooo/file_library_ooo.scp
---- scp2/source/ooo/file_library_ooo.scp	Mon Jul 19 17:09:02 2010 +0200
-+++ scp2/source/ooo/file_library_ooo.scp	Thu Sep 09 01:20:35 2010 +0200
-@@ -1393,7 +1393,7 @@
- STD_UNO_LIB_FILE( gid_File_Lib_Sw , sw)
- STD_LIB_FILE( gid_File_Lib_Swui, swui)
- 
--STD_LIB_FILE( gid_File_Lib_Msword, msword )
-+STD_UNO_LIB_FILE( gid_File_Lib_Msword, msword )
- 
- #if ! defined UNX
- File gid_File_Lib_Sysdtrans
-diff -r 004715ace8e7 -r d6b973424417 svtools/inc/rtfkeywd.hxx
---- svtools/inc/rtfkeywd.hxx	Mon Jul 19 17:09:02 2010 +0200
-+++ svtools/inc/rtfkeywd.hxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -39,6 +39,7 @@
- #define OOO_STRING_SVTOOLS_RTF_ALT "\\alt"
- #define OOO_STRING_SVTOOLS_RTF_ANNOTATION "\\annotation"
- #define OOO_STRING_SVTOOLS_RTF_ANSI "\\ansi"
-+#define OOO_STRING_SVTOOLS_RTF_ATNDATE "\\atndate"
- #define OOO_STRING_SVTOOLS_RTF_ATNID "\\atnid"
- #define OOO_STRING_SVTOOLS_RTF_AUTHOR "\\author"
- #define OOO_STRING_SVTOOLS_RTF_B "\\b"
-@@ -976,12 +977,15 @@
- #define OOO_STRING_SVTOOLS_RTF_SHPBXCOLUMN "\\shpbxcolumn"
- #define OOO_STRING_SVTOOLS_RTF_SHPBXMARGIN "\\shpbxmargin"
- #define OOO_STRING_SVTOOLS_RTF_SHPBXPAGE "\\shpbxpage"
-+#define OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE "\\shpbxignore"
- #define OOO_STRING_SVTOOLS_RTF_SHPBYMARGIN "\\shpbymargin"
- #define OOO_STRING_SVTOOLS_RTF_SHPBYPAGE "\\shpbypage"
- #define OOO_STRING_SVTOOLS_RTF_SHPBYPARA "\\shpbypara"
-+#define OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE "\\shpbyignore"
- #define OOO_STRING_SVTOOLS_RTF_SHPFBLWTXT "\\shpfblwtxt"
- #define OOO_STRING_SVTOOLS_RTF_SHPFHDR "\\shpfhdr"
- #define OOO_STRING_SVTOOLS_RTF_SHPGRP "\\shpgrp"
-+#define OOO_STRING_SVTOOLS_RTF_SHPINST "\\shpinst"
- #define OOO_STRING_SVTOOLS_RTF_SHPLEFT "\\shpleft"
- #define OOO_STRING_SVTOOLS_RTF_SHPLID "\\shplid"
- #define OOO_STRING_SVTOOLS_RTF_SHPLOCKANCHOR "\\shplockanchor"
-@@ -993,6 +997,7 @@
- #define OOO_STRING_SVTOOLS_RTF_SHPWRK "\\shpwrk"
- #define OOO_STRING_SVTOOLS_RTF_SHPWR "\\shpwr"
- #define OOO_STRING_SVTOOLS_RTF_SHPZ "\\shpz"
-+#define OOO_STRING_SVTOOLS_RTF_SP "\\sp"
- #define OOO_STRING_SVTOOLS_RTF_SPRSBSP "\\sprsbsp"
- #define OOO_STRING_SVTOOLS_RTF_SPRSLNSP "\\sprslnsp"
- #define OOO_STRING_SVTOOLS_RTF_SPRSTSM "\\sprstsm"
-@@ -1138,4 +1143,11 @@
- #define OOO_STRING_SVTOOLS_RTF_OLHWAVE "\\olhwave"
- #define OOO_STRING_SVTOOLS_RTF_OLOLDBWAVE "\\ololdbwave"
- 
-+// Support for nested tables
-+#define OOO_STRING_SVTOOLS_RTF_ITAP "\\itap"
-+#define OOO_STRING_SVTOOLS_RTF_NESTCELL "\\nestcell"
-+#define OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS "\\nesttableprops"
-+#define OOO_STRING_SVTOOLS_RTF_NESTROW "\\nestrow"
-+#define OOO_STRING_SVTOOLS_RTF_NONESTTABLES "\\nonesttables"
-+
- #endif // _RTFKEYWD_HXX
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/rtf/makefile.mk
---- sw/source/filter/rtf/makefile.mk	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/rtf/makefile.mk	Thu Sep 09 01:20:35 2010 +0200
-@@ -46,18 +46,15 @@
- EXCEPTIONSFILES=	\
-         $(SLO)$/rtffly.obj \
-         $(SLO)$/rtfnum.obj \
--		$(SLO)$/swparrtf.obj \
--		$(SLO)$/wrtrtf.obj
-+		$(SLO)$/swparrtf.obj
- 
- 
- SLOFILES =	\
--		$(SLO)$/rtfatr.obj \
- 		$(SLO)$/rtffld.obj \
- 		$(SLO)$/rtffly.obj \
- 		$(SLO)$/rtfnum.obj \
- 		$(SLO)$/rtftbl.obj \
--		$(SLO)$/swparrtf.obj \
--		$(SLO)$/wrtrtf.obj
-+		$(SLO)$/swparrtf.obj
- 
- # --- Tagets -------------------------------------------------------
- 
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/rtf/rtfnum.cxx
---- sw/source/filter/rtf/rtfnum.cxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/rtf/rtfnum.cxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -47,7 +47,6 @@
- #include <fltini.hxx>
- #include <swtypes.hxx>
- #include <swparrtf.hxx>
--#include <wrtrtf.hxx>
- #include <ndtxt.hxx>
- #include <doc.hxx>
- #include <docary.hxx>
-@@ -1130,6 +1130,7 @@
-     return nLvl != nEnd;
- }
- 
-+#if 0
- void SwRTFWriter::OutRTFListTab()
- {
-     ByteString sOverrideList;
-@@ -1458,3 +1459,4 @@
-     }
-     return bRet;
- }
-+#endif
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/rtf/swparrtf.cxx
---- sw/source/filter/rtf/swparrtf.cxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/rtf/swparrtf.cxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -179,6 +179,12 @@
-     return nRet;
- }
- 
-+ULONG RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
-+{
-+    pStrm = pStream;
-+    return Read(rDoc, rBaseURL, rPam, rBaseURL);
-+}
-+
- SwRTFParser::SwRTFParser(SwDoc* pD,
-         uno::Reference<document::XDocumentProperties> i_xDocProps,
-         const SwPaM& rCrsr, SvStream& rIn, const String& rBaseURL,
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/rtf/swparrtf.hxx
---- sw/source/filter/rtf/swparrtf.hxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/rtf/swparrtf.hxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -81,6 +81,8 @@
- class RtfReader: public Reader
- {
-     virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
-+public:
-+    virtual ULONG Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
- };
- 
- class SwNodeIdx : public SvxNodeIdx
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/README-rtf.txt
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ sw/source/filter/ww8/README-rtf.txt	Thu Sep 09 01:20:35 2010 +0200
-@@ -0,0 +1,227 @@
-+
-+---------------------------------------------------------------------
-+
-+Summary of new features in RtfExport
-+
-+---------------------------------------------------------------------
-+
-+Miklos Vajna
-+
-+<vmiklos at frugalware.org>
-+---------------------------------------------------------------------
-+
-+Table of Contents
-+
-+1. Introduction
-+
-+    1.1. Terminology
-+    1.2. General
-+
-+2. List if fixed bugs
-+3. List of new features
-+
-+    3.1. Nested tables
-+    3.2. Character properties
-+    3.3. Sections
-+    3.4. Graphics
-+    3.5. Bookmarks
-+    3.6. Fields
-+    3.7. Drawing
-+    3.8. Form fields
-+    3.9. OLE objects
-+
-+4. Changes in the source code outside RTF
-+
-+
-+---------------------------------------------------------------------
-+
-+1. Introduction
-+
-+---------------------------------------------------------------------
-+
-+The biggest difference is that the new exporter is an UNO component,
-+and it?s based on the MSWord base classes, the vision here is that
-+this way much less code can achieve the same set of features,
-+reducing the amount of duplicated code.
-+
-+
-+1.1. Terminology
-+
-+--------------
-+
-+  * The "MSO OK, OOo KO" and similar abbreviations describe if the
-+    given new feature is supported by the OOo RTF importer or it can
-+    be tested using Microsoft Office.
-+  * RtfExport refers to the new UNO-based exporter, RtfWriter refers
-+    to the old built-in one.
-+
-+
-+1.2. General
-+
-+--------------
-+
-+RtfWriter sometimes created documents where the first { is closed in
-+the middle of the document. MSO ignores this problem, but OOo stops
-+parsing the rest of the document if this happens, in other words
-+everything after such a bug is ignored. This can be reproduced by for
-+example parprops.odt, but it?s triggered in several other cases as
-+well. RtfExport has no automatic prevention for this, either - but
-+during development I primarily test the output with OOo, so hopefully
-+the bug will pop up less frequently.
-+
-+
-+---------------------------------------------------------------------
-+
-+2. List if fixed bugs
-+
-+---------------------------------------------------------------------
-+
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=51469 postit
-+    fields
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=66619 page
-+    margins
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=69856 page
-+    numbers
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=81569 { and } in
-+    document title
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=84703 redlines
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=91166 russian
-+    chars
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=92673 bookmarks
-+    across tables
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=100507 ole
-+    object export
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=103993 same as #
-+    81569 just for doc comments
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=106677
-+    listoverride index starts at zero
-+  * http://www.openoffice.org/issues/show_bug.cgi?id=38344 enhanced
-+    character space
-+
-+
-+---------------------------------------------------------------------
-+
-+3. List of new features
-+
-+---------------------------------------------------------------------
-+
-+
-+3.1. Nested tables
-+
-+--------------
-+
-+This was new in Word2000 and it?s now supported by RtfExport (MSO OK,
-+OOo KO)
-+
-+
-+3.2. Character properties
-+
-+--------------
-+
-+The followings are now supported:
-+
-+  * blinking (MSO OK, OOo KO)
-+  * expanded spacing (MSO OK, OOo OK)
-+  * pair kerning (MSO OK, OOo OK)
-+
-+
-+3.3. Sections
-+
-+--------------
-+
-+RtfExport writes:
-+
-+  * column breaks (MSO OK, OOo OK)
-+  * special breaks (when the next page should be an odd or an even
-+    page; MSO OK, OOo KO)
-+  * the write-protected property of sections is experted properly
-+    (MSO OK, OOo KO)
-+  * better page numbers (inherited type from page styles, restarts;
-+    MSO OK, OOo KO)
-+  * line numbering (MSO OK, OOo KO)
-+
-+
-+3.4. Graphics
-+
-+--------------
-+
-+PNG graphics are exported in WMF format as well, so that not only MSO
-+and OOo can display graphics from the output document, but Wordpad as
-+well.
-+
-+
-+3.5. Bookmarks
-+
-+--------------
-+
-+Implicit bookmarks like reference to a footnote did not work in OOo
-+(one got an Error: Reference source not found message when opening
-+the result), this now works as expected. (MSO OK - the importer
-+previously autocorrected this as well, OO OK)
-+
-+
-+3.6. Fields
-+
-+--------------
-+
-+  * Table of contents is now written as a field, so it?s properly
-+    read-only (MSO OK, OOo KO)
-+  * Postit comments are now exported. (MSO OK, OOo KO)
-+
-+
-+3.7. Drawing
-+
-+--------------
-+
-+Drawing objects for Word 97 through Word 2007 (shapes) are now
-+implemented:
-+
-+  * basic shapes (rectangle, ellipse, etc.)
-+  * lines, including free-form ones
-+  * texts, including vertical ones and their (paragraph and
-+    character) formatting
-+
-+(MSO OK, OOo KO)
-+
-+
-+3.8. Form fields
-+
-+--------------
-+
-+All types supported by the RTF format are exported, namely:
-+
-+  * text boxes
-+  * check boxes
-+  * list boxes
-+
-+(MSO OK, OOo KO)
-+
-+
-+3.9. OLE objects
-+
-+--------------
-+
-+Their result is exported as a picture - RtfWriter did not export
-+anything. (MSO OK, OOo OK)
-+
-+For math, the native data is written as well, so you can edit the
-+object, too. (MSO OK, OOo KO)
-+
-+
-+---------------------------------------------------------------------
-+
-+4. Changes in the source code outside RTF
-+
-+---------------------------------------------------------------------
-+
-+These are refactorings I needed for RTF. To my best knowledge they do
-+not change the output of other filters from a user?s point of view.
-+
-+  * The code that splits runs according to bookmarks is moved from
-+    DocxExport to MSWordExportBase
-+  * WW8_SdrAttrIter has been refactored to MSWord_SdrAttrIter
-+  * MSWordExportBase::SubstituteBullet can avoid replacing bullets
-+  * wwFontHelper::InitFontTable can really load all fonts
-+  * An obvious typo in WW8AttributeOutput::CharTwoLines has been
-+    fixed
-+
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/docxexport.cxx
---- sw/source/filter/ww8/docxexport.cxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/ww8/docxexport.cxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -116,131 +116,6 @@
-     return true;
- }
- 
--bool DocxExport::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
--                    xub_StrLen nEnd, IMarkVector& rArr )
--{
--    IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
--    ULONG nNd = rNd.GetIndex( );
--
--    const sal_Int32 nMarks = pMarkAccess->getMarksCount();
--    for ( sal_Int32 i = 0; i < nMarks; i++ )
--    {
--        IMark* pMark = ( pMarkAccess->getMarksBegin() + i )->get();
--
--        // Only keep the bookmarks starting or ending in this node
--        if ( pMark->GetMarkStart().nNode == nNd ||
--             pMark->GetMarkEnd().nNode == nNd )
--        {
--            xub_StrLen nBStart = pMark->GetMarkStart().nContent.GetIndex();
--            xub_StrLen nBEnd = pMark->GetMarkEnd().nContent.GetIndex();
--
--            // Keep only the bookmars starting or ending in the snippet
--            bool bIsStartOk = ( nBStart >= nStt ) && ( nBStart <= nEnd );
--            bool bIsEndOk = ( nBEnd >= nStt ) && ( nBEnd <= nEnd );
--
--            if ( bIsStartOk || bIsEndOk )
--                rArr.push_back( pMark );
--        }
--    }
--    return ( rArr.size() > 0 );
--}
--
--class CompareMarksEnd : public std::binary_function < const IMark *, const IMark *, bool >
--{
--public:
--    inline bool operator() ( const IMark * pOneB, const IMark * pTwoB ) const
--    {
--        xub_StrLen nOEnd = pOneB->GetMarkEnd().nContent.GetIndex();
--        xub_StrLen nTEnd = pTwoB->GetMarkEnd().nContent.GetIndex();
--
--        return nOEnd < nTEnd;
--    }
--};
--
--bool DocxExport::NearestBookmark( xub_StrLen& rNearest )
--{
--    bool bHasBookmark = false;
--
--    if ( m_rSortedMarksStart.size( ) > 0 )
--    {
--        IMark* pMarkStart = m_rSortedMarksStart.front();
--        rNearest = pMarkStart->GetMarkStart().nContent.GetIndex();
--        bHasBookmark = true;
--    }        
--
--    if ( m_rSortedMarksEnd.size( ) > 0 )
--    {
--        IMark* pMarkEnd = m_rSortedMarksEnd[0];
--        if ( !bHasBookmark )
--            rNearest = pMarkEnd->GetMarkEnd().nContent.GetIndex();
--        else
--            rNearest = std::min( rNearest, pMarkEnd->GetMarkEnd().nContent.GetIndex() );
--        bHasBookmark = true;
--    }
--
--    return bHasBookmark;
--}
--
--xub_StrLen DocxExport::GetNextPos( SwAttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos )
--{
--    // Get the bookmarks for the normal run
--    xub_StrLen nNextPos = MSWordExportBase::GetNextPos( pAttrIter, rNode, nAktPos );
--
--    GetSortedBookmarks( rNode, nAktPos, nNextPos - nAktPos );
--
--    xub_StrLen nNextBookmark = nNextPos;
--    NearestBookmark( nNextPos );
--    
--    return std::min( nNextPos, nNextBookmark );
--}
--
--void DocxExport::UpdatePosition( SwAttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd )
--{
--    xub_StrLen nNextPos;
--
--    // either no bookmark, or it is not at the current position
--    if ( !NearestBookmark( nNextPos ) || nNextPos > nAktPos )
--    {
--        MSWordExportBase::UpdatePosition( pAttrIter, nAktPos, nEnd );
--    }
--}
--
--void DocxExport::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen )
--{
--    IMarkVector aMarksStart;
--    if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) 
--    {
--        IMarkVector aSortedEnd;
--        IMarkVector aSortedStart;
--        for ( IMarkVector::const_iterator it = aMarksStart.begin(), end = aMarksStart.end();
--              it < end; ++it )
--        {
--            IMark* pMark = (*it);
--
--            // Remove the positions egals to the current pos
--            xub_StrLen nStart = pMark->GetMarkStart().nContent.GetIndex();
--            xub_StrLen nEnd = pMark->GetMarkEnd().nContent.GetIndex();
--
--            if ( nStart > nAktPos )
--                aSortedStart.push_back( pMark );
--
--            if ( nEnd > nAktPos )
--                aSortedEnd.push_back( pMark );
--        }
--
--        // Sort the bookmarks by end position
--        std::sort( aSortedEnd.begin(), aSortedEnd.end(), CompareMarksEnd() );
--    
--        m_rSortedMarksStart.swap( aSortedStart );
--        m_rSortedMarksEnd.swap( aSortedEnd );
--    }
--    else
--    {
--        m_rSortedMarksStart.clear( );
--        m_rSortedMarksEnd.clear( );
--    }
--}
--
- void DocxExport::AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen )
- {
-     std::vector< OUString > aStarts;
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/docxexport.hxx
---- sw/source/filter/ww8/docxexport.hxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/ww8/docxexport.hxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -76,11 +76,6 @@
-     /// Footer counter.
-     sal_Int32 m_nFooters;
- 
--    /// Used to split the runs according to the bookmarks start and ends
--    typedef std::vector< ::sw::mark::IMark* > IMarkVector;
--    IMarkVector m_rSortedMarksStart;
--    IMarkVector m_rSortedMarksEnd;
--
-     /// Exporter of the VML shapes.
-     oox::vml::VMLExport *m_pVMLExport;
- 
-@@ -162,24 +157,7 @@
-                                      const SwFmtPageDesc* pNewPgDescFmt = 0,
-                                      const SwPageDesc* pNewPgDesc = 0 );
- 
--    /// Get the next position in the text node to output
--    virtual xub_StrLen GetNextPos( SwAttrIter* pAttrIter, const SwTxtNode& rNode, xub_StrLen nAktPos );
--
--    /// Update the information for GetNextPos().
--    virtual void UpdatePosition( SwAttrIter* pAttrIter, xub_StrLen nAktPos, xub_StrLen nEnd );
--
- private:
--    /// Find the nearest bookmark from the current position.
--    ///
--    /// Returns false when there is no bookmark.
--    bool NearestBookmark( xub_StrLen& rNearest );
--    
--    void GetSortedBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, 
--                xub_StrLen nLen );
--
--    bool GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt, xub_StrLen nEnd,
--            IMarkVector& rArr );
--
-     /// Setup pStyles and write styles.xml 
-     void InitStyles();
- 
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/docxexportfilter.cxx
---- sw/source/filter/ww8/docxexportfilter.cxx	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/ww8/docxexportfilter.cxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -26,6 +26,8 @@
-  ************************************************************************/
- 
- #include "docxexportfilter.hxx"
-+#include "rtfexportfilter.hxx"
-+#include "rtfimportfilter.hxx"
- #include "docxexport.hxx"
- 
- #include <docsh.hxx>
-@@ -144,7 +146,35 @@
-         }
-         catch( registry::InvalidRegistryException& )
-         {
--            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-+            OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" );
-+        }
-+
-+        try
-+        {
-+            uno::Reference< registry::XRegistryKey > xNewKey1(
-+                    static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(                                
-+                        OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) );
-+            xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-+
-+            bRet = sal_True;
-+        }
-+        catch( registry::InvalidRegistryException& )
-+        {
-+            OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" );
-+        }
-+
-+        try
-+        {
-+            uno::Reference< registry::XRegistryKey > xNewKey1(
-+                    static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(                                
-+                        OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) );
-+            xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-+
-+            bRet = sal_True;
-+        }
-+        catch( registry::InvalidRegistryException& )
-+        {
-+            OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" );
-         }
-     }
- 
-@@ -157,6 +187,7 @@
- 
- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
- {
-+    OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName);
-     uno::Reference< lang::XSingleServiceFactory > xFactory;
-     void* pRet = 0;
- 
-@@ -169,6 +200,22 @@
-                     DocxExport_getImplementationName(),
-                     DocxExport_createInstance,
-                     DocxExport_getSupportedServiceNames() ) );
-+    } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) {
-+        const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFEXPORT ) );
-+
-+        xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
-+                    reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
-+                    RtfExport_getImplementationName(),
-+                    RtfExport_createInstance,
-+                    RtfExport_getSupportedServiceNames() ) );
-+    } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) {
-+        const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) );
-+
-+        xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
-+                    reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
-+                    RtfImport_getImplementationName(),
-+                    RtfImport_createInstance,
-+                    RtfImport_getSupportedServiceNames() ) );
-     }
- 
-     if ( xFactory.is() )
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/makefile.mk
---- sw/source/filter/ww8/makefile.mk	Mon Jul 19 17:09:02 2010 +0200
-+++ sw/source/filter/ww8/makefile.mk	Thu Sep 09 01:20:35 2010 +0200
-@@ -67,7 +67,12 @@
-         $(SLO)$/WW8TableInfo.obj \
-         $(SLO)$/WW8FFData.obj \
-         $(SLO)$/WW8Sttbf.obj \
--		$(SLO)$/WW8FibData.obj
-+		$(SLO)$/WW8FibData.obj \
-+		$(SLO)$/rtfexportfilter.obj \
-+		$(SLO)$/rtfimportfilter.obj \
-+		$(SLO)$/rtfattributeoutput.obj \
-+		$(SLO)$/rtfsdrexport.obj \
-+		$(SLO)$/rtfexport.obj
- 
- 
- SLOFILES =	\
-@@ -96,7 +101,12 @@
-         $(SLO)$/WW8TableInfo.obj \
-         $(SLO)$/WW8FFData.obj \
-         $(SLO)$/WW8Sttbf.obj \
--		$(SLO)$/WW8FibData.obj
-+		$(SLO)$/WW8FibData.obj \
-+		$(SLO)$/rtfexportfilter.obj \
-+		$(SLO)$/rtfimportfilter.obj \
-+		$(SLO)$/rtfattributeoutput.obj \
-+		$(SLO)$/rtfsdrexport.obj \
-+		$(SLO)$/rtfexport.obj
- 
- 
- # --- Tagets -------------------------------------------------------
-diff -r 004715ace8e7 -r d6b973424417 sw/source/filter/ww8/rtfattributeoutput.cxx
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ sw/source/filter/ww8/rtfattributeoutput.cxx	Thu Sep 09 01:20:35 2010 +0200
-@@ -0,0 +1,3357 @@
-+/*************************************************************************
-+ *
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * Copyright 2000, 2010 Oracle and/or its affiliates.
-+ * Copyright 2010 Miklos Vajna.
-+ *
-+ * 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.
-+ *
-+ ************************************************************************/
-+
-+#include "rtfattributeoutput.hxx"
-+#include "rtfexport.hxx"
-+#include "rtfsdrexport.hxx"
-+#include "writerwordglue.hxx"
-+#include "wrtww8.hxx"
-+#include "ww8par.hxx"
-+#include "fmtcntnt.hxx"
-+#include "fmtsrnd.hxx"
-+#include "fchrfmt.hxx"
-+#include "tgrditem.hxx"
-+#include "fmtruby.hxx"
-+#include "charfmt.hxx"
-+#include "breakit.hxx"
-+
-+#include <i18npool/mslangid.hxx>
-+
-+#include <hintids.hxx>
-+
-+#include <svl/poolitem.hxx>
-+#include <svtools/rtfkeywd.hxx>
-+
-+#include <editeng/fontitem.hxx>
-+#include <editeng/tstpitem.hxx>
-+#include <editeng/adjitem.hxx>
-+#include <editeng/spltitem.hxx>
-+#include <editeng/widwitem.hxx>
-+#include <editeng/lspcitem.hxx>
-+#include <editeng/keepitem.hxx>
-+#include <editeng/shaditem.hxx>
-+#include <editeng/brshitem.hxx>
-+#include <editeng/postitem.hxx>
-+#include <editeng/wghtitem.hxx>
-+#include <editeng/kernitem.hxx>
-+#include <editeng/crsditem.hxx>
-+#include <editeng/cmapitem.hxx>
-+#include <editeng/wrlmitem.hxx>
-+#include <editeng/udlnitem.hxx>
-+#include <editeng/langitem.hxx>
-+#include <editeng/escpitem.hxx>
-+#include <editeng/fhgtitem.hxx>
-+#include <editeng/colritem.hxx>
-+#include <editeng/hyznitem.hxx>
-+#include <editeng/brkitem.hxx>
-+#include <editeng/lrspitem.hxx>
-+#include <editeng/ulspitem.hxx>
-+#include <editeng/boxitem.hxx>
-+#include <editeng/cntritem.hxx>
-+#include <editeng/shdditem.hxx>
-+#include <editeng/akrnitem.hxx>
-+#include <editeng/pbinitem.hxx>
-+#include <editeng/emphitem.hxx>
-+#include <editeng/twolinesitem.hxx>
-+#include <editeng/charscaleitem.hxx>
-+#include <editeng/charrotateitem.hxx>
-+#include <editeng/charreliefitem.hxx>
-+#include <editeng/paravertalignitem.hxx>
-+#include <editeng/pgrditem.hxx>
-+#include <editeng/frmdiritem.hxx>
-+#include <editeng/blnkitem.hxx>
-+#include <editeng/charhiddenitem.hxx>
-+#include <svx/svdmodel.hxx>
-+#include <svx/svdobj.hxx>
-+#include <svx/fmglob.hxx>
-+#include <svx/svdouno.hxx>
-+#include <filter/msfilter/msoleexp.hxx>
-+
-+#include <docufld.hxx>
-+#include <flddropdown.hxx>
-+#include <format.hxx>
-+#include <fmtclds.hxx>
-+#include <fmtinfmt.hxx>
-+#include <fmtfld.hxx>
-+#include <fmtfsize.hxx>
-+#include <fmtftn.hxx>
-+#include <fmtrowsplt.hxx>
-+#include <fmtline.hxx>
-+#include <fmtanchr.hxx>
-+#include <frmfmt.hxx>
-+#include <frmatr.hxx>
-+#include <ftninfo.hxx>
-+#include <htmltbl.hxx>
-+#include <ndgrf.hxx>
-+#include <ndtxt.hxx>
-+#include <node.hxx>
-+#include <pagedesc.hxx>
-+#include <paratr.hxx>
-+#include <swmodule.hxx>
-+#include <swtable.hxx>
-+#include <txtftn.hxx>
-+#include <txtinet.hxx>
-+#include <numrule.hxx>
-+#include <grfatr.hxx>
-+#include <ndole.hxx>
-+#include <lineinfo.hxx>
-+#include <rtf.hxx>
-+
-+#include <rtl/strbuf.hxx>
-+#include <rtl/ustrbuf.hxx>
-+#include <rtl/ustring.hxx>
-+
-+#include <tools/color.hxx>
-+
-+#include <vcl/cvtgrf.hxx>
-+
-+#include <com/sun/star/i18n/ScriptType.hdl>
-+#include <com/sun/star/drawing/XShape.hpp>
-+#include <com/sun/star/frame/XModel.hpp>
-+#include <com/sun/star/chart2/XChartDocument.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <com/sun/star/container/XNamed.hpp>
-+
-+#include <osl/diagnose.h>
-+
-+using rtl::OString;
-+using rtl::OStringBuffer;
-+using rtl::OUString;
-+using rtl::OUStringBuffer;
-+using rtl::OUStringToOString;
-+
-+using namespace nsSwDocInfoSubType;
-+using namespace nsFieldFlags;
-+using namespace sw::util;
-+using namespace ::com::sun::star;
-+
-+static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine, const sal_Char* pStr)
-+{
-+    OStringBuffer aRet;
-+    aRet.append(pStr);
-+    if( pLine->GetInWidth() )
-+    {
-+        // double line
-+        aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDB);
-+        switch( pLine->GetInWidth() )
-+        {
-+            case DEF_LINE_WIDTH_0:
-+                aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "15");
-+                break;
-+            case DEF_LINE_WIDTH_1:
-+                aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "30");
-+                break;
-+            case DEF_LINE_WIDTH_2:
-+            case DEF_LINE_WIDTH_3:
-+                aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW "45");
-+                break;
-+        }
-+    }
-+    else
-+    {
-+        // single line
-+        if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() )
-+            aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth());
-+        else
-+            aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth() / 2);
-+    }
-+
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF);
-+    aRet.append((sal_Int32)rExport.GetColor(pLine->GetColor()));
-+    return aRet.makeStringAndClear();
-+}
-+
-+static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
-+    const sal_Char* pStr, USHORT nDist)
-+{
-+    OStringBuffer aRet;
-+    aRet.append(OutTBLBorderLine(rExport, pLine, pStr));
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP);
-+    aRet.append((sal_Int32)nDist);
-+    return aRet.makeStringAndClear();
-+}
-+
-+static OString OutBorderLine( RtfExport &rExport, const SvxBorderLine* pLine,
-+                            const char* pStr )
-+{
-+    OStringBuffer aRet;
-+    aRet.append(pStr);
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNCOL);
-+    aRet.append((sal_Int32)rExport.GetColor( pLine->GetColor() ) );
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNIN);
-+    aRet.append((sal_Int32)pLine->GetInWidth());
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNOUT);
-+    aRet.append((sal_Int32)pLine->GetOutWidth());
-+    aRet.append(OOO_STRING_SVTOOLS_RTF_BRDLNDIST);
-+    aRet.append((sal_Int32)pLine->GetDistance());
-+    return aRet.makeStringAndClear();
-+}
-+
-+void RtfAttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    /*
-+       You would have thought that
-+       m_rExport.Strm() << (bIsRTL ? OOO_STRING_SVTOOLS_RTF_RTLCH : OOO_STRING_SVTOOLS_RTF_LTRCH); would be sufficent here ,
-+       but looks like word needs to see the other directional token to be
-+       satisified that all is kosher, otherwise it seems in ver 2003 to go and
-+       semi-randomlyly stick strike through about the place. Perhaps
-+       strikethrough is some ms developers "something is wrong signal" debugging
-+       code that we're triggering ?
-+       */
-+    if (bIsRTL) {
-+        m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LTRCH);
-+        m_aStylesEnd.append(' ');
-+        m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_RTLCH);
-+    } else {
-+        m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_RTLCH);
-+        m_aStylesEnd.append(' ');
-+        m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LTRCH);
-+    }
-+
-+    switch (nScript) {
-+        case i18n::ScriptType::LATIN:
-+            m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_LOCH);
-+            break;
-+        case i18n::ScriptType::ASIAN:
-+            m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_DBCH);
-+            break;
-+        case i18n::ScriptType::COMPLEX:
-+            /* noop */
-+            break;
-+        default:
-+            /* should not happen? */
-+            break;
-+    }
-+}
-+
-+void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    // Output table/table row/table cell starts if needed
-+    if ( pTextNodeInfo.get() )
-+    {
-+        sal_uInt32 nRow = pTextNodeInfo->getRow();
-+        sal_uInt32 nCell = pTextNodeInfo->getCell();
-+
-+        // New cell/row?
-+        if ( m_nTableDepth > 0 && !m_bTableCellOpen )
-+        {
-+            ww8::WW8TableNodeInfoInner::Pointer_t pDeepInner( pTextNodeInfo->getInnerForDepth( m_nTableDepth ) );
-+            if ( pDeepInner->getCell() == 0 )
-+                StartTableRow( pDeepInner );
-+
-+            StartTableCell( pDeepInner );
-+        }
-+
-+        if ( nRow == 0 && nCell == 0 )
-+        {
-+            // Do we have to start the table?
-+            // [If we are at the rigth depth already, it means that we
-+            // continue the table cell]
-+            sal_uInt32 nCurrentDepth = pTextNodeInfo->getDepth();
-+
-+            if ( nCurrentDepth > m_nTableDepth )
-+            {
-+                // Start all the tables that begin here
-+                for ( sal_uInt32 nDepth = m_nTableDepth + 1; nDepth <= pTextNodeInfo->getDepth(); ++nDepth )
-+                {
-+                    ww8::WW8TableNodeInfoInner::Pointer_t pInner( pTextNodeInfo->getInnerForDepth( nDepth ) );
-+
-+                    StartTable( pInner );
-+                    StartTableRow( pInner );
-+                    StartTableCell( pInner );
-+                }
-+
-+                m_nTableDepth = nCurrentDepth;
-+            }
-+        }
-+    }
-+
-+    OSL_ENSURE(m_aRun.getLength() == 0, "m_aRun is not empty");
-+}
-+
-+void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    FinishTableRowCell( pTextNodeInfoInner );
-+
-+    OStringBuffer aParagraph;
-+
-+    aParagraph.append(m_aRun.makeStringAndClear());
-+    aParagraph.append(m_aAfterRuns.makeStringAndClear());
-+    if (m_bTblAfterCell)
-+        m_bTblAfterCell = false;
-+    else
-+    {
-+        aParagraph.append(m_rExport.sNewLine);
-+        aParagraph.append(OOO_STRING_SVTOOLS_RTF_PAR);
-+        aParagraph.append(' ');
-+    }
-+    if (m_nColBreakNeeded)
-+    {
-+        aParagraph.append(OOO_STRING_SVTOOLS_RTF_COLUMN);
-+        m_nColBreakNeeded = false;
-+    }
-+
-+    if (!m_bBufferSectionHeaders)
-+        m_rExport.Strm() << aParagraph.makeStringAndClear();
-+    else
-+        m_aSectionHeaders.append(aParagraph.makeStringAndClear());
-+}
-+
-+void RtfAttributeOutput::EmptyParagraph()
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    m_rExport.Strm() << m_rExport.sNewLine << OOO_STRING_SVTOOLS_RTF_PAR << ' ';
-+}
-+
-+void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty");
-+
-+    // output page/section breaks
-+    SwNodeIndex aNextIndex( rNode, 1 );
-+    m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
-+    m_bBufferSectionBreaks = true;
-+
-+    // output section headers / footers
-+    if (!m_bBufferSectionHeaders)
-+        m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear();
-+
-+    if ( aNextIndex.GetNode().IsTxtNode() )
-+    {
-+        const SwTxtNode* pTxtNode = static_cast< SwTxtNode* >( &aNextIndex.GetNode() );
-+        m_rExport.OutputSectionBreaks( pTxtNode->GetpSwAttrSet(), *pTxtNode );
-+    }
-+    else if ( aNextIndex.GetNode().IsTableNode() )
-+    {
-+        const SwTableNode* pTableNode = static_cast< SwTableNode* >( &aNextIndex.GetNode() );
-+        const SwFrmFmt *pFmt = pTableNode->GetTable().GetFrmFmt();
-+        m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode );
-+    }
-+    m_bBufferSectionBreaks = false;
-+
-+    OStringBuffer aPar;
-+    if (!m_rExport.bRTFFlySyntax)
-+    {
-+        aPar.append(OOO_STRING_SVTOOLS_RTF_PARD);
-+        aPar.append(OOO_STRING_SVTOOLS_RTF_PLAIN);
-+        aPar.append(' ');
-+    }
-+    if (!m_bBufferSectionHeaders)
-+        m_rExport.Strm() << aPar.makeStringAndClear();
-+    else
-+        m_aSectionHeaders.append(aPar.makeStringAndClear());
-+}
-+
-+void RtfAttributeOutput::EndParagraphProperties()
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    m_aStyles.append(m_aStylesEnd.makeStringAndClear());
-+    m_rExport.Strm() << m_aStyles.makeStringAndClear();
-+}
-+
-+void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    m_aRun.append('{');
-+
-+    // if there is some redlining in the document, output it
-+    Redline( pRedlineData );
-+
-+    OSL_ENSURE(m_aRunText.getLength() == 0, "m_aRunText is not empty");
-+}
-+
-+void RtfAttributeOutput::EndRun()
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    m_aRun.append(m_rExport.sNewLine);
-+    m_aRun.append(m_aRunText.makeStringAndClear());
-+    m_aRun.append('}');
-+}
-+
-+void RtfAttributeOutput::StartRunProperties()
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty");
-+}
-+
-+void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/ )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    m_aStyles.append(m_aStylesEnd.makeStringAndClear());
-+    m_aRun.append(m_aStyles.makeStringAndClear());
-+}
-+
-+void RtfAttributeOutput::RunText( const String& rText, rtl_TextEncoding eCharSet )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    RawText( rText, 0, eCharSet );
-+}
-+
-+OStringBuffer& RtfAttributeOutput::RunText()
-+{
-+    return m_aRunText;
-+}
-+
-+OStringBuffer& RtfAttributeOutput::Styles()
-+{
-+    return m_aStyles;
-+}
-+
-+void RtfAttributeOutput::RawText( const String& rText, bool /*bForceUnicode*/, rtl_TextEncoding eCharSet )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+    m_aRunText.append(m_rExport.OutString(rText, eCharSet));
-+}
-+
-+void RtfAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
-+{
-+    OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
-+}
-+
-+void RtfAttributeOutput::EndRuby()
-+{
-+    OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
-+}
-+
-+bool RtfAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    m_aStyles.append('{');
-+    m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FIELD);
-+    m_aStyles.append('{');
-+    m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE);
-+    m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FLDINST);
-+    m_aStyles.append(" HYPERLINK ");
-+
-+    String sURL( rUrl );
-+    if( sURL.Len() )
-+    {
-+        m_aStyles.append("\"");
-+        m_aStyles.append(m_rExport.OutString( sURL, m_rExport.eCurrentEncoding));
-+        m_aStyles.append("\" ");
-+    }
-+
-+    if( rTarget.Len() )
-+    {
-+        m_aStyles.append("\\\\t \"");
-+        m_aStyles.append(m_rExport.OutString( rTarget, m_rExport.eCurrentEncoding));
-+        m_aStyles.append("\" ");
-+    }
-+
-+    m_aStyles.append("}");
-+    return true;
-+}
-+
-+bool RtfAttributeOutput::EndURL()
-+{
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    // close the fldrslt group
-+    m_aRunText.append('}');
-+    // close the field group
-+    m_aRunText.append('}');
-+    return true;
-+}
-+
-+void RtfAttributeOutput::FieldVanish( const String& /*rTxt*/, ww::eField /*eType*/ )
-+{
-+    OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
-+}
-+
-+void RtfAttributeOutput::Redline( const SwRedlineData* pRedline )
-+{
-+    if (!pRedline)
-+        return;
-+
-+    OSL_TRACE("%s", OSL_THIS_FUNC);
-+
-+    if (pRedline->GetType() == nsRedlineType_t::REDLINE_INSERT)
-+    {
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVISED);
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVAUTH);
-+        m_aRun.append((sal_Int32)m_rExport.GetRedline(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor())));
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVDTTM);
-+    }
-+    else if(pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
-+    {
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_DELETED);
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVAUTHDEL);
-+        m_aRun.append((sal_Int32)m_rExport.GetRedline(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor())));
-+        m_aRun.append(OOO_STRING_SVTOOLS_RTF_REVDTTMDEL);
-+    }
-+    m_aRun.append((sal_Int32)sw::ms::DateTime2DTTM(pRedline->GetTimeStamp()));
-+    m_aRun.append(' ');
-+}
-+
-+void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
-+{
-+    OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
-+}
-+

... etc. - the rest is truncated


More information about the ooo-build-commit mailing list