[Libreoffice-commits] .: Branch 'feature/gnumake4' - 18 commits - writerfilter/CppunitTest_writerfilter_doctok.mk writerfilter/inc writerfilter/JunitTest_writerfilter_complex.mk writerfilter/Library_writerfilter_debug.mk writerfilter/Library_writerfilter.mk writerfilter/Makefile writerfilter/Module_writerfilter.mk writerfilter/Package_inc.mk writerfilter/Package_writerfilter_generated.mk writerfilter/prj writerfilter/qa writerfilter/source writerfilter/unocomponent writerfilter/util

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Fri Jun 17 07:00:49 PDT 2011


 writerfilter/CppunitTest_writerfilter_doctok.mk                       |   50 
 writerfilter/JunitTest_writerfilter_complex.mk                        |   52 
 writerfilter/Library_writerfilter.mk                                  |  157 ++
 writerfilter/Library_writerfilter_debug.mk                            |   62 
 writerfilter/Makefile                                                 |   38 
 writerfilter/Module_writerfilter.mk                                   |   46 
 writerfilter/Package_inc.mk                                           |   35 
 writerfilter/Package_writerfilter_generated.mk                        |   81 +
 writerfilter/inc/resourcemodel/TagLogger.hxx                          |    3 
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx                   |   50 
 writerfilter/inc/writerfilter.mk                                      |   29 
 writerfilter/prj/build.lst                                            |   11 
 writerfilter/prj/d.lst                                                |    8 
 writerfilter/prj/makefile.mk                                          |   40 
 writerfilter/qa/complex/ooxml/LoadDocuments.java                      |   82 -
 writerfilter/qa/complex/ooxml/TestDocument.java                       |   40 
 writerfilter/qa/complex/ooxml/makefile.mk                             |   90 -
 writerfilter/qa/cppunittests/doctok/makefile.mk                       |   71 -
 writerfilter/qa/cppunittests/doctok/testdoctok.cxx                    |  297 +---
 writerfilter/qa/cppunittests/xxml/testXXML.cxx                        |   42 
 writerfilter/source/Makefile                                          |  233 +++
 writerfilter/source/dmapper/DomainMapper.cxx                          |   21 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx              |    8 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx              |   32 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                     |  486 ++++---
 writerfilter/source/dmapper/FFDataHandler.cxx                         |    4 
 writerfilter/source/dmapper/FontTable.cxx                             |    3 
 writerfilter/source/dmapper/FormControlHelper.cxx                     |    1 
 writerfilter/source/dmapper/GraphicHelpers.cxx                        |    4 
 writerfilter/source/dmapper/GraphicImport.cxx                         |   19 
 writerfilter/source/dmapper/ModelEventListener.cxx                    |    3 
 writerfilter/source/dmapper/NumberingManager.cxx                      |   23 
 writerfilter/source/dmapper/NumberingManager.hxx                      |    4 
 writerfilter/source/dmapper/OLEHandler.cxx                            |   12 
 writerfilter/source/dmapper/PropertyIds.cxx                           |  689 +++++-----
 writerfilter/source/dmapper/PropertyIds.hxx                           |   50 
 writerfilter/source/dmapper/PropertyMap.cxx                           |   34 
 writerfilter/source/dmapper/PropertyMapHelper.cxx                     |    1 
 writerfilter/source/dmapper/SettingsTable.cxx                         |    9 
 writerfilter/source/dmapper/StyleSheetTable.cxx                       |    8 
 writerfilter/source/dmapper/TablePropertiesHandler.cxx                |    6 
 writerfilter/source/dmapper/TblStylePrHandler.cxx                     |    8 
 writerfilter/source/dmapper/ThemeTable.cxx                            |   25 
 writerfilter/source/dmapper/WrapPolygonHandler.cxx                    |    4 
 writerfilter/source/dmapper/makefile.mk                               |   78 -
 writerfilter/source/doctok/WW8DocumentImpl.cxx                        |   88 -
 writerfilter/source/doctok/WW8ResourceModelImpl.cxx                   |    3 
 writerfilter/source/doctok/WW8StreamImpl.cxx                          |    3 
 writerfilter/source/doctok/makefile.mk                                |  155 --
 writerfilter/source/doctok/resourcesimpl.xsl                          |    3 
 writerfilter/source/filter/ImportFilter.cxx                           |    3 
 writerfilter/source/filter/WriterFilter.cxx                           |    6 
 writerfilter/source/filter/makefile.mk                                |   52 
 writerfilter/source/generated.mk                                      |   55 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx                       |    8 
 writerfilter/source/ooxml/OOXMLFactory.cxx                            |   16 
 writerfilter/source/ooxml/OOXMLFactory.hxx                            |   18 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx                 |   90 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx                 |   58 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx                |   87 -
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx                |    2 
 writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx                   |   24 
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx                         |   38 
 writerfilter/source/ooxml/RefAndPointer.hxx                           |   23 
 writerfilter/source/ooxml/analyzemodel.xsl                            |    1 
 writerfilter/source/ooxml/factory_ns.xsl                              |    2 
 writerfilter/source/ooxml/factoryimpl.xsl                             |    6 
 writerfilter/source/ooxml/factoryimpl_ns.xsl                          |    4 
 writerfilter/source/ooxml/fasttokens.xsl                              |    7 
 writerfilter/source/ooxml/gperffasttokenhandler.xsl                   |    2 
 writerfilter/source/ooxml/makefile.mk                                 |  256 ---
 writerfilter/source/ooxml/model.xml                                   |    4 
 writerfilter/source/ooxml/stage1.sh                                   |   20 
 writerfilter/source/ooxml/status.sh                                   |   24 
 writerfilter/source/ooxml/todo.xsl                                    |   37 
 writerfilter/source/resourcemodel/LoggedResources.cxx                 |    3 
 writerfilter/source/resourcemodel/TagLogger.cxx                       |   69 +
 writerfilter/source/resourcemodel/Token.cxx                           |   82 +
 writerfilter/source/resourcemodel/makefile.mk                         |  207 ---
 writerfilter/source/resourcemodel/resourcemodel.cxx                   |    3 
 writerfilter/source/rtftok/makefile.mk                                |   82 -
 writerfilter/unocomponent/component.cxx                               |   15 
 writerfilter/unocomponent/debugservices/doctok/makefile.mk            |   44 
 writerfilter/unocomponent/debugservices/ooxml/makefile.mk             |   58 
 writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx |    2 
 writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx         |    2 
 writerfilter/unocomponent/debugservices/rtftok/makefile.mk            |   45 
 writerfilter/unocomponent/makefile.mk                                 |   90 -
 writerfilter/util/makefile.mk                                         |   84 -
 89 files changed, 2428 insertions(+), 2502 deletions(-)

New commits:
commit 6c01efdd73f01345e4169679c778ecb659c7ba83
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Tue Feb 22 15:30:07 2011 +0100

    TagLogger: new method toTree [hg:b4a56c7574da]

diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index 1ec93df..32c31e0 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -82,7 +82,8 @@ namespace writerfilter
         void chars(const string & rChars);
         void chars(const ::rtl::OUString & rChars);
         const string & getTag() const;
-        string toString() const; 
+        string toString() const;
+        string toTree(const string & sIndent = "") const;
         
         ostream & output(ostream & o, const string & sIndent = "") const;
     };
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index b6f4510..6a02e76 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -175,6 +175,75 @@ string XMLTag::toString() const
     return sResult;
 }
 
+string XMLTag::toTree(const string & sIndent) const
+{
+    if (mChars.length() > 0)
+        return sIndent + mChars;
+
+    string sResult;
+    
+    size_t nSize = sIndent.size();
+    if (nSize > 1)
+    {
+        sResult += sIndent.substr(0, nSize - 2) + "+-\\" + mTag;
+    }
+    else
+    {
+        sResult += "\\" + mTag;
+    }
+        
+    XMLAttributes_t::const_iterator aIt = mAttrs.begin();
+    while (aIt != mAttrs.end())
+    {
+        if (aIt == mAttrs.begin())
+        {
+            sResult += "(";
+        }
+        else
+        {
+            sResult += sIndent + ", ";
+        }
+
+        sResult += aIt->mName;
+        sResult += "=";
+        sResult += aIt->mValue;
+
+        aIt++;
+
+        if (aIt == mAttrs.end())
+        {
+            sResult += ")";
+        }
+    }
+
+    sResult += "\n";
+
+    if (mTags.size() > 0)
+    {
+        XMLTags_t::const_iterator aItTags = mTags.begin();
+        size_t nSize = mTags.size();
+        while (aItTags != mTags.end())
+        {
+            if ((*aItTags).get() != NULL)
+            {
+                if (nSize == 1)
+                {
+                    sResult += (*aItTags)->toTree(sIndent + "  ");
+                }
+                else
+                {
+                    sResult += (*aItTags)->toTree(sIndent + "| ");
+                }                    
+            }
+
+            aItTags++;
+            nSize--;
+        }
+    }
+
+    return sResult;
+}
+
 ostream & XMLTag::output(ostream & o, const string & sIndent) const
 {
     bool bHasContent = mChars.size() > 0 || mTags.size() > 0;
commit 2b114fc2896b610041652de8442cd0a2676ee4d2
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Tue Feb 22 15:30:07 2011 +0100

    removed output to stderr [hg:9467e7f6cd60]

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index a998b1b..fbf7271 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -198,7 +198,6 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
     
     SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
     
-    // printf ( "DomainMapper::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nName, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR )
         m_pImpl->GetFIB().SetData( nName, nIntValue );
     else //if( !m_pImpl->getTableManager().attribute( nName, val) )
@@ -2211,7 +2210,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
     Value::Pointer_t pValue = rSprm.getValue();
     sal_Int32 nIntValue = pValue->getInt();
     rtl::OUString sStringValue = pValue->getString();
-    // printf ( "DomainMapper::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     /* WRITERFILTERSTATUS: table: sprmdata */
 
     switch(nSprmId)
@@ -4447,7 +4445,12 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
     }
     catch( const uno::RuntimeException& )
     {
-        std::clog << __FILE__ << "(l" << __LINE__ << ")" << std::endl;
+#ifdef DEBUG_DOMAINMAPPER
+        dmapper_logger->startElement("exception");
+        dmapper_logger->attribute("file", __FILE__);
+        dmapper_logger->attribute("line", __LINE__);
+        dmapper_logger->endElement("exception");
+#endif
     }
 }
 /*-- 09.06.2006 09:52:15---------------------------------------------------
@@ -4537,7 +4540,6 @@ void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)
 -----------------------------------------------------------------------*/
 void DomainMapper::lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
 {
-    // printf ( "DomainMapper::table(0x%.4x)\n", (unsigned int)name);
     m_pImpl->SetAnyTableImport(true);
     /* WRITERFILTERSTATUS: table: attributedata */
     switch(name)
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 19ff7d1..7887b1e 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -58,8 +58,9 @@ static void  lcl_printProperties( PropertyMapPtr pProps )
         for( ; aMapIter != aEndIter; ++aMapIter )
         {
             rtl::OUString aOUStr = rPropSupplier.GetName( aMapIter->first.eId );
-            rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(),  RTL_TEXTENCODING_ASCII_US );
-            clog << aOStr.getStr();
+            dmapper_logger->startElement("entry");
+            dmapper_logger->chars(aOUStr);
+            dmapper_logger->endElement("entry");
 
             table::BorderLine aLine;
             sal_Int32 nColor; 
@@ -822,7 +823,6 @@ void DomainMapperTableHandler::endCell(const Handle_t & end)
     dmapper_logger->chars(toString(end));
     dmapper_logger->endElement("table.cell.end");
     dmapper_logger->endElement("table.cell");
-    clog << "</table.cell>" << endl;
 #endif
 
     if (!end.get()) 
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1e42b75..480d9be 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1499,9 +1499,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
     {
         (void) e;
 #if DEBUG
-        clog << "Exception when adding shape: ";
-        clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( );
-        clog << endl;
+        dmapper_logger->element("exception");
 #endif
     }
 }
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index c2fde85..86380d6 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -72,7 +72,6 @@ void FontTable::lcl_attribute(Id Name, Value & val)
         return ;
     int nIntValue = val.getInt();
     ::rtl::OUString sValue = val.getString();
-    //printf ( "FontTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     /* WRITERFILTERSTATUS: table: FontTable_attributedata */
     switch(Name)
     {
@@ -551,8 +550,6 @@ void FontTable::lcl_sprm(Sprm& rSprm)
     (void)nIntValue;
     rtl::OUString sStringValue = pValue->getString();
 
-    //printf ( "FontTable::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
-
 /*    switch(nSprmId)
     {
     default:
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 39e16e4..ff19897 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1747,8 +1747,15 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
     }
     catch( const uno::Exception& e )
     {
-        clog << __FILE__ << ":" << __LINE__ << " failed. Message :" ;
-        clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( )  << endl;
+        (void) e;
+
+#ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT
+        dmapper_logger->startElement("exception");
+        dmapper_logger->attribute("file", __FILE__);
+        dmapper_logger->attribute("line", __LINE__);
+        dmapper_logger->chars(e.Message);
+        dmapper_logger->endElement("exceptiion");
+#endif
     }
     return xGraphicObject;
 }
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 60ed4ff..af14225 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -63,26 +63,6 @@ namespace dmapper {
 
 //---------------------------------------------------  Utility functions
     
-void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps )
-{
-    sal_Int32 nLen = aProps.getLength( );
-    for ( sal_Int32 i = 0; i < nLen; i++ )
-    {
-        uno::Any aValue = aProps[i].Value;
-        sal_Int32 nValue = 0;
-        OUString sValue;
-
-        if ( !( aValue >>= sValue ) && ( aValue >>= nValue ) )
-            sValue = OUString::valueOf( nValue );
-
-#if DEBUG
-        fprintf( stderr, "Property %s: %s\n", 
-                OUSTR_TO_C( aProps[i].Name ),
-                OUSTR_TO_C( sValue ) );
-#endif
-    }
-}
-
 sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, OUString sName )
 {
     sal_Int32 i = 0;
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index dba349a..1d7b41e 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -131,8 +131,9 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
                 {
                     (void) e;
 #if DEBUG
-                    clog << "Exception in OLE Handler: ";
-                    clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
+                    dmapper_logger->startElement("exception");
+                    dmapper_logger->chars(e.Message);
+                    dmapper_logger->endElement("exception");
 #endif
                 }    
             }
@@ -182,8 +183,9 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
                 {
                     (void) e;
 #if DEBUG
-                    clog << "Exception in OLE Handler: ";
-                    clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
+                    dmapper_logger->startElement("exception");
+                    dmapper_logger->chars(e.Message);
+                    dmapper_logger->endElement("exception");
 #endif
                 } 
             }
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 723d679..cd8cf86 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -663,8 +663,8 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
 
 void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl )
 {
-#if DEBUG
-    clog << "START>>> SectionPropertyMap::CopyLastHeaderFooter()" << endl;
+#if DEBUG_DMAPPER_PROPERTY_MAP
+    dmapper_logger->startElement(__FUNCTION__);
 #endif
     SectionPropertyMap* pLastContext = rDM_Impl.GetLastSectionContext( );
     if ( pLastContext )
@@ -719,9 +719,10 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
 
                 if ( ( bIsHeader && bCopyHeader ) || ( !bIsHeader && bCopyFooter ) )
                 {
-#if DEBUG
-                    clog << "Copying ";
-                    clog << rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
+#if DEBUG_DMAPPER_PROPERTY_MAP
+                    dmapper_logger->startElement("copy");
+                    dmapper_logger->chars(sName);
+                    dmapper_logger->endElement("copy");
 #endif
                     // TODO has to be copied
                     uno::Reference< text::XTextCopy > xTxt(
@@ -737,14 +738,15 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
         catch ( const uno::Exception& e )
         {
             (void) e;
-#if DEBUG
-            clog << "An exception occured in SectionPropertyMap::CopyLastHeaderFooter( ) - ";
-            clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
+#if DEBUG_DMAPPER_PROPERTY_MAP
+            dmapper_logger->startElement("exception");
+            dmapper_logger->chars(e.Message);
+            dmapper_logger->endElement("exception");
 #endif
         }
     }
-#if DEBUG
-    clog << "END>>> SectionPropertyMap::CopyLastHeaderFooter()" << endl;
+#if DEBUG_DMAPPER_PROPERTY_MAP
+    dmapper_logger->endElement(__FUNCTION__);
 #endif
 }
 
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 5fe3638..1e0a5b5 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -102,7 +102,6 @@ SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang:
 , LoggedTable(dmapper_logger, "SettingsTable")
 , m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) )
 {
-    // printf("SettingsTable::SettingsTable()\n");
 }
         
 SettingsTable::~SettingsTable()
@@ -117,7 +116,6 @@ void SettingsTable::lcl_attribute(Id nName, Value & val)
     (void)nIntValue;
     ::rtl::OUString sValue = val.getString();
     (void)sValue;
-    //printf ( "SettingsTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     /* WRITERFILTERSTATUS: table: SettingsTable_attributedata */
 #if 0 //no values known, yet   
             
@@ -142,8 +140,6 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
     (void)nIntValue;
     rtl::OUString sStringValue = pValue->getString();
             
-    //printf ( "SettingsTable::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
-            
     /* WRITERFILTERSTATUS: table: SettingsTable_sprm */
     switch(nSprmId)
     {
@@ -232,7 +228,6 @@ void SettingsTable::lcl_sprm(Sprm& rSprm)
         
 void SettingsTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
 {
-    // printf ( "SettingsTable::entry\n");
     ref->resolve(*this);
 }
 //returns default TabStop in 1/100th mm
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 99231c9..626974e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -385,7 +385,6 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
     int nIntValue = val.getInt();
     (void)nIntValue;
     ::rtl::OUString sValue = val.getString();
-//    printf ( "StyleSheetTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     /* WRITERFILTERSTATUS: table: StyleSheetTable_attributedata */
     switch(Name)
     {
@@ -511,7 +510,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
     sal_Int32 nIntValue = pValue.get() ? pValue->getInt() : 0;
     (void)nIntValue;
     rtl::OUString sStringValue = pValue.get() ? pValue->getString() : rtl::OUString();
-    //printf ( "StyleSheetTable::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
    
     /* WRITERFILTERSTATUS: table: StyleSheetTable_sprm */
     switch(nSprmId)
@@ -666,7 +664,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
 void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref)
 {
     //create a new style entry
-    // printf("StyleSheetTable::entry(...)\n");
     OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL here");
     StyleSheetEntryPtr pNewEntry( new StyleSheetEntry );
     m_pImpl->m_pCurrentEntry = pNewEntry;
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index d9aaaea..0f855e3 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -54,7 +54,6 @@ ThemeTable::ThemeTable()
 , LoggedTable(dmapper_logger, "ThemeTable")
 , m_pImpl( new ThemeTable_Impl )
 {
-    // printf("ThemeTable::ThemeTable()\n");
 }
 
 ThemeTable::~ThemeTable()
@@ -71,7 +70,6 @@ void ThemeTable::lcl_attribute(Id Name, Value & val)
 #endif
     // int nIntValue = val.getInt();
     ::rtl::OUString sValue = val.getString();
-    // printf ( "ThemeTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr());
     /* WRITERFILTERSTATUS: table: ThemeTable_attributedata */
     switch(Name)
     {
@@ -107,8 +105,6 @@ void ThemeTable::lcl_sprm(Sprm& rSprm)
     (void)nIntValue;
     rtl::OUString sStringValue = pValue->getString();
 
-    // printf ( "ThemeTable::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr());
-
     /* WRITERFILTERSTATUS: table: ThemeTable_sprm */
     switch(nSprmId)
     {
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index e9ea53f..a28518d 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -299,8 +299,6 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
                                 mpFib->get_fcPlcfbtePapx(), 
                                 mpFib->get_lcbPlcfbtePapx()));
 
-    //clog << "BinTable(PAP):" << mpBinTablePAPX->toString();
-
     parseBinTableCpAndFcs(*mpBinTablePAPX, PROP_PAP);
 
     mpBinTableCHPX =
@@ -309,8 +307,6 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
                                 mpFib->get_fcPlcfbteChpx(), 
                                 mpFib->get_lcbPlcfbteChpx()));
 
-    //clog << "BinTable(CHP):" << mpBinTableCHPX->toString();
-
     parseBinTableCpAndFcs(*mpBinTableCHPX, PROP_CHP);
 
     mpSEDs = PLCF<WW8SED>::Pointer_t(new PLCF<WW8SED>
@@ -318,8 +314,6 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false)
                                       mpFib->get_fcPlcfsed(), 
                                       mpFib->get_lcbPlcfsed()));
 
-    //mpSEDs->dump(clog);
-
     {
         PLCFHelper<WW8SED>::processPLCFCpAndFcs
             (*this, mpPieceTable, mpSEDs, PROP_SEC, 0);
@@ -591,7 +585,6 @@ string WW8DocumentImpl::getType() const
 void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable, 
                                             PropertyType eType_)
 {
-    //clog << "<bintable type=\"" << propertyTypeToString(eType_) << "\">" << endl;
     for (sal_uInt32 i = 0; i < rTable.getEntryCount(); i++)
     {
 #if 0
@@ -608,8 +601,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
         bool bComplex = mpPieceTable->isComplex(aFcFromTable);
         aFcFromTable.setComplex(bComplex);
 
-        //clog << "<entry fc=\"" << aFcFromTable.toString() << "\">" << endl;
-
         try
         {
             Cp aCpFromTable(mpPieceTable->fc2cp(aFcFromTable));
@@ -646,8 +637,6 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
                 bool bComplexFKP = mpPieceTable->isComplex(aFc);
                 aFc.setComplex(bComplexFKP);
 
-                //clog << "<fkpentry fc=\"" << aFc.toString() << "\"/>" << endl;
-
                 try
                 {
                     Cp aCp = mpPieceTable->fc2cp(aFc);
@@ -655,24 +644,18 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable,
                     CpAndFc aCpAndFc(aCp, aFc, eType_);
 
                     mCpAndFcs.insert(aCpAndFc);
-
-                    //clog << aCpAndFc << endl;
                 }
                 catch (ExceptionNotFound e)
                 {
-                    clog << e.getText() << endl;
+                    (void) e;
                 }
             }
         }
         catch (ExceptionNotFound e)
         {
-            clog << e.getText() << endl;
+            (void) e;
         }
-
-        //clog << "</entry>" << endl;
     }
-
-    //clog << "</bintable>" << endl;
 }
 
 WW8Stream::Pointer_t WW8DocumentImpl::getSubStream
@@ -1044,7 +1027,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getLFOTable() const
         }
         catch (Exception e)
         {
-            clog << e.getText() << endl;
+            (void) e;
         }
     }
 
@@ -1664,16 +1647,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
 {
     if (! bSubDocument)
     {
-
-        //mpPieceTable->dump(clog);
-        
-        //copy(mCpAndFcs.begin(), mCpAndFcs.end(), ostream_iterator<CpAndFc>(clog, ", "));
-
-        //mpDocStream->dump(output);
-
-        //output.addItem(mTextboxHeaderEndCpAndFc.toString());
-
-#if 1
         output.addItem("<substream-names>");
         output.addItem(mpStream->getSubStreamNames());
         output.addItem("</substream-names>");
@@ -1687,7 +1660,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
         {
             mpSummaryInformationStream->dump(output);
         }
-#endif
 
         writerfilter::Reference<Properties>::Pointer_t pFib
             (new WW8Fib(*mpFib));
@@ -1700,30 +1672,16 @@ void WW8DocumentImpl::resolve(Stream & rStream)
             rStream.props(pFibRgFcLcb2000);
         }
 
-#if 0
-        if (mpTextBoxStories.get() != NULL)
-        {
-            output.addItem("<textbox.boxes>");
-            mpTextBoxStories->dump(output);
-            output.addItem("</textbox.boxes>");
-        }
-#endif
         if (mpFib->get_lcbPlcftxbxBkd() > 0)
         {
             PLCF<WW8BKD> aPLCF(*mpTableStream, 
                                mpFib->get_fcPlcftxbxBkd(),
                                mpFib->get_lcbPlcftxbxBkd());
-#if 0
-            output.addItem("<textbox.breaks>");
-            aPLCF.dump(output);
-            output.addItem("</textbox.breaks>");
-#endif
         }
 
         if (mpDffBlock.get() != NULL)
         {
             DffBlock * pTmp = new DffBlock(*mpDffBlock);
-            //pTmp->dump(clog);
             writerfilter::Reference<Properties>::Pointer_t pDffBlock =
                 writerfilter::Reference<Properties>::Pointer_t(pTmp);
 
@@ -1739,33 +1697,6 @@ void WW8DocumentImpl::resolve(Stream & rStream)
             }
             rStream.info("/headers");
         }
-
-#if 0        
-        {
-            sal_uInt32 nFootnoteCount = getFootnoteCount();
-            for (sal_uInt32 n = 0; n < nFootnoteCount; ++n)
-            {
-                //clog << "<footnote num=\"" << n << "\"/>" << endl;
-
-                writerfilter::Reference<Stream>::Pointer_t pFootnote(getFootnote(n));
-                
-                if (pFootnote.get() != NULL)
-                    rStream.substream(NS_rtf::LN_footnote, pFootnote);
-            }
-        }
-        {
-            sal_uInt32 nEndnoteCount = getEndnoteCount();
-            for (sal_uInt32 n = 0; n < nEndnoteCount; ++n)
-            {
-                //clog << "<endnote num=\"" << n << "\"/>" << endl;
-
-                writerfilter::Reference<Stream>::Pointer_t pEndnote(getEndnote(n));
-                
-                if (pEndnote.get() != NULL)
-                    rStream.substream(NS_rtf::LN_endnote, pEndnote);
-            }
-        }
-#endif
    
         writerfilter::Reference<Table>::Pointer_t pSttbRgtplc = getListTplcs();
         
@@ -1786,7 +1717,7 @@ void WW8DocumentImpl::resolve(Stream & rStream)
         }
         catch (Exception e)
         {
-            clog << e.getText() << endl;
+            (void) e;
         }
 
         writerfilter::Reference<Table>::Pointer_t pAssocTable = getAssocTable();
@@ -2235,7 +2166,7 @@ BookmarkHelper::getBookmark(const CpAndFc & rCpAndFc)
     }
     catch (ExceptionNotFound e)
     {
-        clog << e.getText() << endl;
+        (void) e;
     }
 
     return pResult;
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index c008d96..4e3fc2d 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -168,8 +168,6 @@ void WW8PropertiesReference::resolve(Properties & rHandler)
 {
     if (mpPropSet != NULL)
     {
-        //mpPropSet->dump(clog);
-
         if (mpPropSet->isPap())
         {
             WW8IntValue aValue(mpPropSet->get_istd());
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 3489440..87ef41f 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1864,7 +1864,7 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
             mrShapeContext->setRelationFragmentPath
                 (mpParserState->getTarget());
         }
-#ifdef DEBUG_CONTEXT_STACK
+#ifdef DEBUG_CONTEXT_HANDLER
         else
         {
             debug_logger->startElement("error");
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 583f2c1..407c3a7 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -52,75 +52,27 @@ OOXMLFastDocumentHandler::OOXMLFastDocumentHandler
 
 // ::com::sun::star::xml::sax::XFastContextHandler:
 void SAL_CALL OOXMLFastDocumentHandler::startFastElement
-(::sal_Int32 
-#ifdef DEBUG_CONTEXT_STACK
-Element
-#endif
-, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
+(::sal_Int32 /*Element*/, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":start element:" 
-         << fastTokenToId(Element)
-         << endl;
-#endif
 }
 
 void SAL_CALL OOXMLFastDocumentHandler::startUnknownElement
-(const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Namespace
-#endif
-, const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Name
-#endif
-, 
+(const ::rtl::OUString & /*Namespace*/, const ::rtl::OUString & /*Name*/, 
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":start unknown element:" 
-         << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
-         << ":"
-         << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
-         << endl;
-#endif
 }
 
-void SAL_CALL OOXMLFastDocumentHandler::endFastElement(::sal_Int32 
-#ifdef DEBUG_CONTEXT_STACK
-Element
-#endif
-) 
+void SAL_CALL OOXMLFastDocumentHandler::endFastElement(::sal_Int32 /*Element*/) 
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":end element:" 
-         << fastTokenToId(Element)
-         << endl;
-#endif
 }
 
 void SAL_CALL OOXMLFastDocumentHandler::endUnknownElement
-(const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Namespace
-#endif
-, const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Name
-#endif
-) 
+(const ::rtl::OUString & /*Namespace*/, const ::rtl::OUString &  /*Name*/) 
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":end unknown element:" 
-         << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
-         << ":"
-         << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
-         << endl;
-#endif
 }
 
 OOXMLFastContextHandler::Pointer_t 
@@ -145,37 +97,16 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":createFastChildContext:" 
-         << fastTokenToId(Element)
-         << endl;
-#endif
-    
     return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element);
 }
     
 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
 OOXMLFastDocumentHandler::createUnknownChildContext
-(const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Namespace
-#endif
-, 
- const ::rtl::OUString & 
-#ifdef DEBUG_CONTEXT_STACK
-Name
-#endif
-, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
+(const ::rtl::OUString & /*Namespace*/, 
+ const ::rtl::OUString & /*Name*/, 
+ const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) 
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
-#ifdef DEBUG_CONTEXT_STACK
-    clog << this << ":createUnknownChildContext:" 
-         << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
-         << ":"
-         << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
-         << endl;
-#endif
-
     return uno::Reference< xml::sax::XFastContextHandler >
         (new OOXMLFastDocumentHandler(m_xContext));
 }
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
index e68b763..c041219 100644
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
@@ -31,6 +31,10 @@
 #include "OOXMLFastTokenHandler.hxx"
 #include "gperffasttoken.hxx"
 
+#ifdef DEBUG_TOKEN
+#include "ooxmlLoggers.hxx"
+#endif
+
 namespace writerfilter {
 namespace ooxml
 {
@@ -57,10 +61,10 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler
         nResult = pToken->nToken;
 
 #ifdef DEBUG_TOKEN
-    clog << "getToken: " 
-         << OUStringToOString(Identifier, RTL_TEXTENCODING_ASCII_US).getStr() 
-         << ", " << nResult
-         << endl;
+    debug_logger->startElement(__FUNCTION__);
+    debug_logger->attribute("identifier", Identifier);
+    debug_logger->attribute("result", nResult);
+    debug_logger->endElement(__FUNCTION__);
 #endif
 
     return nResult;
@@ -106,11 +110,13 @@ css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifi
         nResult = pToken->nToken;
 
 #ifdef DEBUG_TOKEN
-    clog << "getTokenFromUTF8: " 
-         << string(reinterpret_cast<const char *>
-                   (Identifier.getConstArray()), Identifier.getLength())
-         << ", " << nResult
-         << (pToken == NULL ? ", failed" : "") << endl;
+    debug_logger->startElement(__FUNCTION__);
+    debug_logger->attribute
+        ("utf8", string(reinterpret_cast<const char *>
+                        (Identifier.getConstArray()), 
+                        Identifier.getLength()));
+    debug_logger->attribute("result", nResult);
+    debug_logger->endElement(__FUNCTION__);
 #endif
 
     return nResult;
diff --git a/writerfilter/source/ooxml/RefAndPointer.hxx b/writerfilter/source/ooxml/RefAndPointer.hxx
index 902a642..9a12e45 100644
--- a/writerfilter/source/ooxml/RefAndPointer.hxx
+++ b/writerfilter/source/ooxml/RefAndPointer.hxx
@@ -47,44 +47,21 @@ public:
     RefAndPointer()
     : mpHandler(NULL)
     {
-#ifdef DEBUG_MEMORY
-        clog << "MEMORY:" << mpHandler->getInstanceNumber() << ":RefAndPointer"
-             << endl;
-#endif
     }
 
     RefAndPointer(ChildClass * pHandler)
     : mpHandler(pHandler), mRef(pHandler)
     {
-#ifdef DEBUG_MEMORY
-        clog << "MEMORY:" << mpHandler->getInstanceNumber() << ":RefAndPointer"
-             << endl;
-#endif
     }
 
     RefAndPointer(uno::Reference<Interface> xRef)
     : mRef(xRef)
     {
-#if 0
-        uno::Reference<lang::XUnoTunnel> xTunnel( xRef, uno::UNO_QUERY);
-        
-        if (xTunnel.is())
-            mpHandler = reinterpret_cast<ChildClass *>(xTunnel->getSomething(ChildClass::getUnoTunnelId()));
-#else
         mpHandler = dynamic_cast<ChildClass *>(xRef.get());
-#endif
-        if (mpHandler != NULL)
-            clog << "MEMORY:" << mpHandler->getInstanceNumber() 
-                 << ":RefAndPointer" << endl;
     }
     
     virtual ~RefAndPointer() 
     {
-#ifdef DEBUG_MEMORY
-        if (mpHandler != NULL)
-            clog << "MEMORY:" << mpHandler->getInstanceNumber() 
-                 << ":~RefAndPointer" << endl;
-#endif
     }
 
     void set(ChildClass * pHandler)
diff --git a/writerfilter/source/resourcemodel/LoggedResources.cxx b/writerfilter/source/resourcemodel/LoggedResources.cxx
index 753797e..e1002bc 100644
--- a/writerfilter/source/resourcemodel/LoggedResources.cxx
+++ b/writerfilter/source/resourcemodel/LoggedResources.cxx
@@ -26,6 +26,7 @@
  ************************************************************************/
 
 #include <rtl/ustrbuf.hxx>
+#include <resourcemodel/WW8ResourceModel.hxx>
 #include <resourcemodel/LoggedResources.hxx>
 #include <resourcemodel/QNameToString.hxx>
 
@@ -286,7 +287,7 @@ void LoggedProperties::sprm(Sprm & _sprm)
 #ifdef DEBUG_LOGGING
     mHelper.startElement("sprm");
     mHelper.attribute("name", (*QNameToString::Instance())(_sprm.getId()));
-    mHelper.chars(sprm.toString());
+    mHelper.chars(_sprm.toString());
 #endif
 
     lcl_sprm(_sprm);
diff --git a/writerfilter/source/resourcemodel/Token.cxx b/writerfilter/source/resourcemodel/Token.cxx
index 6b4b098..1e6ea5a 100644
--- a/writerfilter/source/resourcemodel/Token.cxx
+++ b/writerfilter/source/resourcemodel/Token.cxx
@@ -50,11 +50,6 @@ Token_t::Token_t(sal_Int32 nId)
 void Token_t::assign(sal_Int32 nId)
 {
     m_nId = nId;
-
-#ifdef DEBUG
-    m_string = ooxml::fastTokenToId(nId);
-    ::std::clog << m_string << ::std::endl;
-#endif
 }
 
 Token_t::~Token_t()
commit 77c2da07468768ceb59e0c849b30f3609ef8ebfd
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Tue Feb 22 15:30:06 2011 +0100

    redefined Token_t, used sal_Int32 where old definition was needed [hg:3fe69983f7be]

diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 16311fb..bdcf78d 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -133,6 +133,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
 	writerfilter/source/resourcemodel/Protocol \
 	writerfilter/source/resourcemodel/ResourceModelHelper \
 	writerfilter/source/resourcemodel/TagLogger \
+	writerfilter/source/resourcemodel/Token \
 	writerfilter/source/resourcemodel/WW8Analyzer \
 	writerfilter/source/resourcemodel/XPathLogger \
 	writerfilter/source/resourcemodel/resourcemodel \
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index 95b6262..9d44ffc 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -384,17 +384,45 @@ public:
 */
 Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
 
-    void WRITERFILTER_DLLPUBLIC analyzerIds();
-    Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
-    
-    void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
-    
-    void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
-    void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
-    void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/, 
-                                     const rtl::OUString & /*str*/); 
-    void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
-    
+void WRITERFILTER_DLLPUBLIC analyzerIds();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+
+void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/, 
+                                 const rtl::OUString & /*str*/); 
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+
+class Token_t
+{
+    sal_Int32 m_nId;
+#ifdef DEBUG
+    ::std::string m_string;
+#endif
+
+    void assign(sal_Int32 nId);
+
+public:
+    Token_t();
+    Token_t(sal_Int32 nId);
+    virtual ~Token_t();
+
+    sal_Int32 getId() const;
+    operator sal_Int32() const;
+    Token_t & operator = (sal_Int32 n);
+ 
+#ifdef DEBUG
+    ::std::string toString() const;
+#endif
+};
+
+struct TokenHash
+{
+    size_t operator()(const Token_t & rToken) const;
+};
+
 }
 
 
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 5d5392b..4c59e8f 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -259,7 +259,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
 
 uno::Reference< xml::sax::XFastContextHandler> 
 OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler,
-                                     Token_t Element)
+                                     sal_Int32 Element)
 {
 #ifdef DEBUG_FACTORY
     debug_logger->startElement("factory.createFastChildContext");
@@ -304,7 +304,7 @@ void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler,
 #endif
 }
 
-void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/)
+void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, sal_Int32 /*nToken*/)
 {
     Id nDefine = pHandler->getDefine();
     OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine);
@@ -321,7 +321,7 @@ void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nTo
     }
 }
     
-void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/)
+void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, sal_Int32 /*nToken*/)
 {
     Id nDefine = pHandler->getDefine();
     OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine);
@@ -350,7 +350,7 @@ void OOXMLFactory_ns::charactersAction(OOXMLFastContextHandler *, const ::rtl::O
 {
 }
 
-void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
+void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, sal_Int32, OOXMLValue::Pointer_t)
 {
 }
 
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index 581fee3..f1d9267 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -78,7 +78,7 @@ struct AttributeInfo
     AttributeInfo();
 };
 
-typedef hash_map<Token_t, AttributeInfo> AttributeToResourceMap;
+typedef hash_map<sal_Int32, AttributeInfo, TokenHash> AttributeToResourceMap;
 typedef boost::shared_ptr<AttributeToResourceMap> AttributeToResourceMapPointer;
 typedef hash_map<Id, AttributeToResourceMapPointer> AttributesMap;
 
@@ -95,13 +95,13 @@ struct CreateElement
     CreateElement();
 };
 
-typedef hash_map<Token_t, CreateElement> CreateElementMap;
+typedef hash_map<sal_Int32, CreateElement, TokenHash> CreateElementMap;
 typedef boost::shared_ptr<CreateElementMap> CreateElementMapPointer;
 typedef hash_map<Id, CreateElementMapPointer> CreateElementsMap;
 typedef hash_map<Id, string> IdToStringMap;
 typedef boost::shared_ptr<IdToStringMap> IdToStringMapPointer;
 
-typedef hash_map<Id, Token_t> TokenToIdMap;
+typedef hash_map<Id, sal_Int32> TokenToIdMap;
 typedef boost::shared_ptr<TokenToIdMap> TokenToIdMapPointer;
 typedef hash_map<Id, TokenToIdMapPointer> TokenToIdsMap;
 
@@ -112,7 +112,7 @@ public:
     virtual void startAction(OOXMLFastContextHandler * pHandler);
     virtual void charactersAction(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString);
     virtual void endAction(OOXMLFastContextHandler * pHandler);
-    virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue);
+    virtual void attributeAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue);
     virtual string getDefineName(Id nId) const;
 #ifdef DEBUG_FACTORY
     virtual string getName() const;
@@ -145,10 +145,10 @@ public:
     static Pointer_t getInstance();
     
     uno::Reference< xml::sax::XFastContextHandler> createFastChildContext
-    (OOXMLFastContextHandler * pHandler, Token_t Element);
+    (OOXMLFastContextHandler * pHandler, sal_Int32 Element);
     
     uno::Reference< xml::sax::XFastContextHandler> createFastChildContextFromStart
-    (OOXMLFastContextHandler * pHandler, Token_t Element);
+    (OOXMLFastContextHandler * pHandler, sal_Int32 Element);
 
     void attributes(OOXMLFastContextHandler * pHandler, 
                     const uno::Reference< xml::sax::XFastAttributeList > & Attribs);
@@ -156,8 +156,8 @@ public:
     void characters(OOXMLFastContextHandler * pHandler,
                     const ::rtl::OUString & rString);
                     
-    void startAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
-    void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
+    void startAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken);
+    void endAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken);
     
     virtual ~OOXMLFactory();
     
@@ -170,7 +170,7 @@ private:
     uno::Reference< xml::sax::XFastContextHandler> 
     createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler,
                                       OOXMLFactory_ns::Pointer_t pFactory, 
-                                      Token_t Element);
+                                      sal_Int32 Element);
 };
 
 }
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 84622ab..3489440 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -185,7 +185,7 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler()
 
 // ::com::sun::star::xml::sax::XFastContextHandler:
 void SAL_CALL OOXMLFastContextHandler::startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -220,7 +220,7 @@ throw (uno::RuntimeException, xml::sax::SAXException)
 #endif
 }
 
-void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element)
+void SAL_CALL OOXMLFastContextHandler::endFastElement(sal_Int32 Element)
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
 #ifdef DEBUG_CONTEXT_HANDLER
@@ -240,7 +240,7 @@ throw (uno::RuntimeException, xml::sax::SAXException)
 }
 
 void OOXMLFastContextHandler::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -248,7 +248,7 @@ void OOXMLFastContextHandler::lcl_startFastElement
 }
 
 void OOXMLFastContextHandler::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     OOXMLFactory::getInstance()->endAction(this, Element);
@@ -266,7 +266,7 @@ throw (uno::RuntimeException, xml::sax::SAXException)
 
 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
  OOXMLFastContextHandler::createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -288,7 +288,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
 
 uno::Reference< xml::sax::XFastContextHandler >
  OOXMLFastContextHandler::lcl_createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -367,7 +367,7 @@ void OOXMLFastContextHandler::attributes
     OOXMLFactory::getInstance()->attributes(this, Attribs);
 }
 
-void OOXMLFastContextHandler::startAction(Token_t Element)
+void OOXMLFastContextHandler::startAction(sal_Int32 Element)
 {
 #ifdef DEBUG_CONTEXT_HANDLER
     debug_logger->startElement("contexthandler.startAction");
@@ -378,12 +378,12 @@ void OOXMLFastContextHandler::startAction(Token_t Element)
 #endif
 }
 
-void OOXMLFastContextHandler::lcl_startAction(Token_t Element)
+void OOXMLFastContextHandler::lcl_startAction(sal_Int32 Element)
 {
     OOXMLFactory::getInstance()->startAction(this, Element);
 }
 
-void OOXMLFastContextHandler::endAction(Token_t Element)
+void OOXMLFastContextHandler::endAction(sal_Int32 Element)
 {
 #ifdef DEBUG_CONTEXT_HANDLER
     debug_logger->startElement("contexthandler.endAction");
@@ -394,7 +394,7 @@ void OOXMLFastContextHandler::endAction(Token_t Element)
 #endif
 }
 
-void OOXMLFastContextHandler::lcl_endAction(Token_t Element)
+void OOXMLFastContextHandler::lcl_endAction(sal_Int32 Element)
 {
     OOXMLFactory::getInstance()->endAction(this, Element);
 }
@@ -495,10 +495,6 @@ OOXMLParserState::Pointer_t OOXMLFastContextHandler::getParserState() const
 void OOXMLFastContextHandler::setToken(Token_t nToken)
 {
     mnToken = nToken;
-
-#ifdef DEBUG_CONTEXT_HANDLER
-    msTokenString = fastTokenToId(mnToken);
-#endif
 }
 
 Token_t OOXMLFastContextHandler::getToken() const
@@ -1260,7 +1256,7 @@ OOXMLFastContextHandlerProperties::~OOXMLFastContextHandlerProperties()
 }
 
 void OOXMLFastContextHandlerProperties::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     endAction(Element);
@@ -1430,7 +1426,7 @@ OOXMLFastContextHandlerPropertyTable::~OOXMLFastContextHandlerPropertyTable()
 }
 
 void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone());
@@ -1486,7 +1482,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const
 }
 
 void OOXMLFastContextHandlerValue::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
     sendPropertyToParent();
@@ -1561,7 +1557,7 @@ OOXMLFastContextHandlerTable::~OOXMLFastContextHandlerTable()
 
 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
 OOXMLFastContextHandlerTable::createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -1574,7 +1570,7 @@ OOXMLFastContextHandlerTable::createFastChildContext
 }
 
 void OOXMLFastContextHandlerTable::lcl_endFastElement
-(Token_t /*Element*/)
+(sal_Int32 /*Element*/)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     addCurrentChild();
@@ -1629,7 +1625,7 @@ OOXMLFastContextHandlerXNote::~OOXMLFastContextHandlerXNote()
 }
 
 void OOXMLFastContextHandlerXNote::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -1644,7 +1640,7 @@ void OOXMLFastContextHandlerXNote::lcl_startFastElement
 }
 
 void OOXMLFastContextHandlerXNote::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     endAction(Element);
@@ -1801,7 +1797,7 @@ OOXMLFastContextHandlerTextTable::~OOXMLFastContextHandlerTextTable()
 }
 
 void OOXMLFastContextHandlerTextTable::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -1822,7 +1818,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement
 }
 
 void OOXMLFastContextHandlerTextTable::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     endAction(Element);
@@ -1884,7 +1880,7 @@ OOXMLFastContextHandlerShape::~OOXMLFastContextHandlerShape()
 }
 
 void OOXMLFastContextHandlerShape::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -1939,7 +1935,7 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element )
 }
 
 void OOXMLFastContextHandlerShape::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     if (mrShapeContext.is())
@@ -1967,7 +1963,7 @@ void SAL_CALL OOXMLFastContextHandlerShape::endUnknownElement
 
 uno::Reference< xml::sax::XFastContextHandler >
 OOXMLFastContextHandlerShape::lcl_createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -2118,7 +2114,7 @@ void OOXMLFastContextHandlerWrapper::addToken( Token_t Token )
 }
 
 void OOXMLFastContextHandlerWrapper::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
@@ -2127,7 +2123,7 @@ void OOXMLFastContextHandlerWrapper::lcl_startFastElement
 }
 
 void OOXMLFastContextHandlerWrapper::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
     if (mxContext.is())
@@ -2136,7 +2132,7 @@ void OOXMLFastContextHandlerWrapper::lcl_endFastElement
 
 uno::Reference< xml::sax::XFastContextHandler >
 OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
     throw (uno::RuntimeException, xml::sax::SAXException)
 {
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 87aa0c6..62e7968 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -73,7 +73,7 @@ public:
 
     // ::com::sun::star::xml::sax::XFastContextHandler:
     virtual void SAL_CALL startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
@@ -83,7 +83,7 @@ public:
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void SAL_CALL endFastElement(Token_t Element) 
+    virtual void SAL_CALL endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual void SAL_CALL endUnknownElement
@@ -92,7 +92,7 @@ public:
 
     virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
     createFastChildContext
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
@@ -159,7 +159,7 @@ public:
 
     uno::Reference < xml::sax::XFastContextHandler > 
     createFromStart
-    (Token_t Element, 
+    (sal_uInt32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs);
 
     void setDocument(OOXMLDocument * pDocument);
@@ -236,10 +236,6 @@ protected:
     Id mnDefine;
     Token_t mnToken;
     
-#ifdef DEBUG_CONTEXT_HANDLER
-    string msTokenString;
-#endif
-    
     // the stream to send the stream events to.
     Stream * mpStream;
 
@@ -250,26 +246,26 @@ protected:
     unsigned int mnTableDepth;
 
     virtual void lcl_startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual uno::Reference< xml::sax::XFastContextHandler > 
     lcl_createFastChildContext
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual void lcl_characters(const ::rtl::OUString & aChars)         
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    void startAction(Token_t Element);
-    virtual void lcl_startAction(Token_t Element);
-    void endAction(Token_t Element);    
-    virtual void lcl_endAction(Token_t Element);
+    void startAction(sal_Int32 Element);
+    virtual void lcl_startAction(sal_Int32 Element);
+    void endAction(sal_Int32 Element);    
+    virtual void lcl_endAction(sal_Int32 Element);
 
 
     // Returns string for resource of this context. (debug)
@@ -344,7 +340,7 @@ protected:
     /// the properties
     OOXMLPropertySet::Pointer_t mpPropertySet;
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
     virtual void setParent(OOXMLFastContextHandler * pParent);
 
@@ -363,7 +359,7 @@ public:
 protected:
     OOXMLTableImpl mTable;
 
-    virtual void lcl_endFastElement(Token_t Element)
+    virtual void lcl_endFastElement(sal_Int32 Element)
         throw (uno::RuntimeException, xml::sax::SAXException);
  };
  
@@ -378,7 +374,7 @@ public:
     virtual void setValue(OOXMLValue::Pointer_t pValue);
     virtual OOXMLValue::Pointer_t getValue() const;
     
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
     throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual string getType() const { return "Value"; }
@@ -400,7 +396,7 @@ public:
 
     virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
     createFastChildContext
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
@@ -410,7 +406,7 @@ protected:
 
     RefAndPointer_t mCurrentChild;
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual ResourceEnum_t getResource() const { return TABLE; }
@@ -435,11 +431,11 @@ private:
     ::rtl::OUString msMyXNoteId;
 
     virtual void lcl_startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual ResourceEnum_t getResource() const { return STREAM; }
@@ -483,11 +479,11 @@ public:
 
 protected:
     virtual void lcl_startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 };
 
@@ -534,16 +530,16 @@ protected:
     ShapeContextRef mrShapeContext;
 
     virtual void lcl_startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual uno::Reference< xml::sax::XFastContextHandler > 
     lcl_createFastChildContext
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
@@ -603,16 +599,16 @@ public:
 
 protected:
     virtual void lcl_startFastElement
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
-    virtual void lcl_endFastElement(Token_t Element) 
+    virtual void lcl_endFastElement(sal_Int32 Element) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
     virtual uno::Reference< xml::sax::XFastContextHandler > 
     lcl_createFastChildContext
-    (Token_t Element, 
+    (sal_Int32 Element, 
      const uno::Reference< xml::sax::XFastAttributeList > & Attribs) 
         throw (uno::RuntimeException, xml::sax::SAXException);
 
diff --git a/writerfilter/source/ooxml/factory_ns.xsl b/writerfilter/source/ooxml/factory_ns.xsl
index 0349d83..a65d512 100644
--- a/writerfilter/source/ooxml/factory_ns.xsl
+++ b/writerfilter/source/ooxml/factory_ns.xsl
@@ -104,7 +104,7 @@ public:
     virtual TokenToIdMapPointer createTokenToIdMap(Id nId);
     virtual string getDefineName(Id nId) const;</xsl:text>
     <xsl:call-template name="factoryactiondecls"/>
-    virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue);
+    virtual void attributeAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue);
 
 #ifdef DEBUG_FACTORY
     virtual string getName() const;
diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl
index 781883b..61ca828 100644
--- a/writerfilter/source/ooxml/factoryimpl.xsl
+++ b/writerfilter/source/ooxml/factoryimpl.xsl
@@ -73,7 +73,7 @@
 <xsl:template name="factorycreatecontextfromfactory">
     <xsl:text>
 uno::Reference&lt; xml::sax::XFastContextHandler &gt; OOXMLFactory::createFastChildContextFromFactory
-(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element)
+(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, sal_Int32 Element)
 {
     uno::Reference &lt; xml::sax::XFastContextHandler &gt; aResult;
     Id nDefine = pHandler->getDefine();
@@ -182,7 +182,7 @@ OOXMLFactory_ns::Pointer_t OOXMLFactory::getFactoryForNamespace(Id nId)
 <xsl:template name="factorycreatefromstart">
     <xsl:text>
 uno::Reference&lt; xml::sax::XFastContextHandler &gt; OOXMLFactory::createFastChildContextFromStart
-(OOXMLFastContextHandler * pHandler, Token_t Element)
+(OOXMLFastContextHandler * pHandler, sal_Int32 Element)
 {
 #ifdef DEBUG_FACTORY
     debug_logger->startElement("factory.createFastChildContextFromStart");
@@ -215,7 +215,7 @@ uno::Reference&lt; xml::sax::XFastContextHandler &gt; OOXMLFactory::createFastCh
 <xsl:template name="fasttokentoid">
   <xsl:text>
 namespace tokenmap {
-struct token { const char * name; Token_t nToken; };
+struct token { const char * name; sal_Int32 nToken; };
 class Perfect_Hash
 {
 private:
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl
index adc4c97..1c2af9b 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.xsl
+++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl
@@ -863,7 +863,7 @@ TokenToIdMapPointer </xsl:text>
       <xsl:text>
 void </xsl:text>
 <xsl:call-template name="factoryclassname"/>
-<xsl:text>::attributeAction(OOXMLFastContextHandler * _pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue)
+<xsl:text>::attributeAction(OOXMLFastContextHandler * _pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue)
 {
     switch(_pHandler->getDefine())
     {</xsl:text>
@@ -879,7 +879,7 @@ void </xsl:text>
       <xsl:text>
 void </xsl:text>
 <xsl:call-template name="factoryclassname"/>
-<xsl:text>::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
+<xsl:text>::attributeAction(OOXMLFastContextHandler *, sal_Int32, OOXMLValue::Pointer_t)
 {
 }
 </xsl:text>
diff --git a/writerfilter/source/ooxml/fasttokens.xsl b/writerfilter/source/ooxml/fasttokens.xsl
index 4014df0..f8621a6 100644
--- a/writerfilter/source/ooxml/fasttokens.xsl
+++ b/writerfilter/source/ooxml/fasttokens.xsl
@@ -64,19 +64,16 @@
   <xsl:include href="factorytools.xsl"/>
 
   <xsl:template name="fasttokens">
-    <xsl:text>
-typedef sal_Int32 Token_t;
-    </xsl:text>
     <xsl:for-each select="/model/fasttoken">
       <xsl:text>
-const Token_t OOXML_</xsl:text>
+const sal_Int32 OOXML_</xsl:text>
 <xsl:value-of select="translate(., '-', '_')"/>
 <xsl:text> = </xsl:text>
 <xsl:value-of select="position() - 1"/>
 <xsl:text>;</xsl:text>
     </xsl:for-each>
     <xsl:text>
-const Token_t OOXML_FAST_TOKENS_END =</xsl:text>
+const sal_Int32 OOXML_FAST_TOKENS_END = </xsl:text>
 <xsl:value-of select="count(/model/fasttoken)"/>
 <xsl:text>;&#xa;</xsl:text>
   </xsl:template>
diff --git a/writerfilter/source/ooxml/gperffasttokenhandler.xsl b/writerfilter/source/ooxml/gperffasttokenhandler.xsl
index d14db04..f6a987e 100644
--- a/writerfilter/source/ooxml/gperffasttokenhandler.xsl
+++ b/writerfilter/source/ooxml/gperffasttokenhandler.xsl
@@ -75,7 +75,7 @@
 
 namespace writerfilter { namespace ooxml { namespace tokenmap {
 %}
-struct token { const char * name; Token_t nToken; };
+struct token { const char * name; sal_Int32 nToken; };
 %%</xsl:text>
     <xsl:for-each select=".//rng:element|.//rng:attribute">
       <xsl:if test="generate-id(.) = generate-id(key('same-token-name', @localname)[1])">
diff --git a/writerfilter/source/resourcemodel/Token.cxx b/writerfilter/source/resourcemodel/Token.cxx
new file mode 100644
index 0000000..6b4b098
--- /dev/null
+++ b/writerfilter/source/resourcemodel/Token.cxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <iostream>
+#include "resourcemodel/WW8ResourceModel.hxx"
+#include "ooxml/OOXMLFastTokens.hxx"
+
+namespace writerfilter 
+{
+
+size_t TokenHash::operator()(const Token_t & rToken) const
+{
+    return rToken.getId();
+}
+
+Token_t::Token_t()
+{
+    assign(ooxml::OOXML_FAST_TOKENS_END);
+}
+
+Token_t::Token_t(sal_Int32 nId)
+{
+    assign(nId);
+}
+
+void Token_t::assign(sal_Int32 nId)
+{
+    m_nId = nId;
+
+#ifdef DEBUG
+    m_string = ooxml::fastTokenToId(nId);
+    ::std::clog << m_string << ::std::endl;
+#endif
+}
+
+Token_t::~Token_t()
+{
+}
+
+sal_Int32 Token_t::getId() const
+{
+    return m_nId;
+}
+
+Token_t::operator sal_Int32() const
+{
+    return getId();
+}
+
+Token_t & Token_t::operator = (sal_Int32 nId)
+{
+    assign(nId);
+
+    return *this;
+}
+
+#ifdef DEBUG
+::std::string Token_t::toString() const
+{
+    return m_string;
+}
+#endif
+}
commit eb0427b2dcbd0ee728493267d5859b8394a1813b
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Wed Feb 16 12:43:18 2011 +0100

    Only pass on characters, when ordered so in model.xml [hg:da333da977c6]

diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 73d654a..84622ab 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -341,7 +341,7 @@ sal_Int64 SAL_CALL OOXMLFastContextHandler::getSomething( const uno::Sequence< s
 {
     if( rId.getLength() == 16
         && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
-                                        rId.getConstArray(), 16 ) )
+                                   rId.getConstArray(), 16 ) )
     {
         return sal::static_int_cast<sal_Int64>
             (reinterpret_cast<sal_IntPtr>(this));
@@ -839,6 +839,7 @@ void OOXMLFastContextHandler::text(const ::rtl::OUString & sText)
     debug_logger->chars(sText);
     debug_logger->endElement("contexthandler.text");
 #endif
+
     if (isForwardEvents())
         mpStream->utext(reinterpret_cast < const sal_uInt8 * >
                         (sText.getStr()),
@@ -1242,13 +1243,6 @@ void OOXMLFastContextHandlerStream::handleHyperlink()
     getPropertySetAttrs()->resolve(aHyperlinkHandler);
 }
 
-void OOXMLFastContextHandlerStream::lcl_characters
-(const ::rtl::OUString & rChars)
-throw (uno::RuntimeException, xml::sax::SAXException)
-{
-    text(rChars);
-}
-
 /*
   class OOXMLFastContextHandlerProperties
  */
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 6300d31..87aa0c6 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -310,8 +310,6 @@ public:
 
 protected:
     virtual void resolvePropertySetAttrs();
-    virtual void lcl_characters(const ::rtl::OUString & aChars)
-                throw (uno::RuntimeException, xml::sax::SAXException);
 
 private:
     mutable OOXMLPropertySet::Pointer_t mpPropertySetAttrs;
commit 0ac54766877eba95982e2364b8b2b25ff7382534
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Wed Feb 16 12:43:17 2011 +0100

    #i116755# handle absolute paths in _rel [hg:fb7e1780f025]

diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 386442c..e5019d6 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -94,6 +94,42 @@ const ::rtl::OUString & OOXMLStreamImpl::getTarget() const
     return msTarget;
 }
 
+::rtl::OUString lcl_normalizeTarget(const ::rtl::OUString & s)
+{
+    const int nStringsToCut = 2;
+    const ::rtl::OUString aStringToCut[] = {
+        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("./")),
+        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) 
+    };
+
+    bool bDone = false;
+    sal_Int32 nIndex = 0;
+    while (!bDone)
+    {
+        for (int n = 0; n <= nStringsToCut; n++)
+        {
+            if (n == nStringsToCut)
+            {
+                bDone = true;
+            }
+            else
+            {
+                sal_Int32 nNewIndex = s.indexOf(aStringToCut[n], nIndex);
+
+                if (nIndex == nNewIndex)
+                {
+                    sal_Int32 nLength = aStringToCut[n].getLength();
+                    nIndex += nLength;
+
+                    break;
+                }
+            }
+        }
+    }
+
+    return s.copy(nIndex);
+}
+
 bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess> 
                                     xRelationshipAccess,
                                     StreamType_t nStreamType, 
@@ -188,7 +224,7 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
                 else
                 {
                     rDocumentTarget = msPath;
-                    rDocumentTarget += sMyTarget;
+                    rDocumentTarget += lcl_normalizeTarget(sMyTarget);
                 }
                 
                 break;
commit 3cb4e72d58885c93d8ce3d6e54e07f64c7edc6d3
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Fri Feb 11 15:00:41 2011 +0100

    create effort estimation while compiling [hg:f248c5f07cdf]

diff --git a/writerfilter/source/Makefile b/writerfilter/source/Makefile
index a5611ad..d8724d7 100644
--- a/writerfilter/source/Makefile
+++ b/writerfilter/source/Makefile
@@ -72,6 +72,12 @@ wf_SRC_ooxml_FactoryValues_xsl=$(WFDIR)ooxml/factory_values.xsl
 wf_SRC_ooxml_FactoryValuesImpl_xsl=$(WFDIR)ooxml/factoryimpl_values.xsl
 wf_SRC_ooxml_ResourceIds_xsl=$(WFDIR)ooxml/resourceids.xsl
 wf_SRC_ooxml_GperfFastTokenHandler_xsl=$(WFDIR)ooxml/gperffasttokenhandler.xsl
+wf_SRC_ooxml_Analyze_model_xsl=$(WFDIR)ooxml/analyzemodel.xsl
+wf_SRC_ooxml_Status_stage1_sh=$(WFDIR)ooxml/stage1.sh
+wf_SRC_ooxml_Status_stage2_xsl=$(WFDIR)ooxml/analyzestage2.xsl
+wf_SRC_ooxml_Status_stage3_xsl=$(WFDIR)ooxml/analyzestage3.xsl
+wf_SRC_ooxml_Status_todo_xsl=$(WFDIR)ooxml/todo.xsl
+wf_SRC_ooxml_Status_efforts_xsl=$(WFDIR)ooxml/effort.xsl
 
 wf_GEN_ooxml_ResourceIds_hxx=ooxml/resourceids.hxx
 
@@ -86,6 +92,12 @@ wf_GEN_ooxml_FactoryValues_hxx=OOXMLFactory_values.hxx
 wf_GEN_ooxml_FactoryValues_cxx=OOXMLFactory_values.cxx
 wf_GEN_ooxml_GperfFastToken_hxx=gperffasttoken.hxx
 wf_GEN_ooxml_Model_processed=model_preprocessed.xml
+wf_GEN_ooxml_Model_analyzed=ooxml/model_analyzed.xml
+wf_GEN_ooxml_Status_stage1=ooxml/status_stage1.xml
+wf_GEN_ooxml_Status_stage2=ooxml/status_stage2.xml
+wf_GEN_ooxml_Status_stage3=ooxml/status_stage3.xml
+wf_GEN_ooxml_Status_todo=ooxml/todo.xml
+wf_GEN_ooxml_Status_efforts=ooxml/efforts.csv
 
 $(wf_GEN_ooxml_token_tmp) : $(SOLARVER)/$(INPATH)/inc$(UPDMINOREXT)/oox/token.txt
 	cat $(SOLARVER)/$(INPATH)/inc$(UPDMINOREXT)/oox/token.txt \
@@ -125,6 +137,24 @@ $(wf_GEN_ooxml_GperfFastToken_hxx) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $
 	$(gb_XSLTPROC) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed) \
 	| tr -d '\r' | gperf -I -t -E -S1 -c -G -LC++ > $@
 
+$(wf_GEN_ooxml_Model_analyzed): $(wf_SRC_ooxml_Analyze_model_xsl) $(wf_SRC_ooxml_Model)
+	$(gb_XSLTPROC) $^ > $@
+
+$(wf_GEN_ooxml_Status_stage1) : $(wf_GEN_ooxml_Model_analyzed) $(wf_SRC_ooxml_stage1_sh)
+	$(wf_SRC_ooxml_Status_stage1_sh) $(wf_GEN_ooxml_Model_analyzed) $(WFDIR)dmapper > $@
+
+$(wf_GEN_ooxml_Status_stage2) : $(wf_SRC_ooxml_Status_stage2_xsl) $(wf_GEN_ooxml_Status_stage1)
+	$(gb_XSLTPROC) $^ > $@
+
+$(wf_GEN_ooxml_Status_stage3) : $(wf_SRC_ooxml_Status_stage3_xsl) $(wf_GEN_ooxml_Status_stage2)
+	$(gb_XSLTPROC) $^ > $@
+
+$(wf_GEN_ooxml_Status_todo) : $(wf_SRC_ooxml_Status_todo_xsl) $(wf_GEN_ooxml_Status_stage3)
+	$(gb_XSLTPROC) $^ > $@
+
+$(wf_GEN_ooxml_Status_efforts) : $(wf_SRC_ooxml_Status_efforts_xsl) $(wf_GEN_ooxml_Status_todo)
+	$(gb_XSLTPROC) $^ > $@
+
 # rtftok
 
 wf_SRC_rtftok_scanner_lex=$(WFDIR)rtftok/RTFScanner.lex
@@ -192,6 +222,7 @@ all : \
 	$(wf_GEN_ooxml_FastTokens_hxx) \
 	$(wf_GEN_ooxml_GperfFastToken_hxx) \
 	$(wf_GEN_ooxml_NamespaceIds_hxx) \
+	$(wf_GEN_ooxml_Status_efforts) \
 	$(wf_GEN_model_QNameToStr_cxx) \
 	$(wf_GEN_model_SprmCodeToStr_cxx) \
 	$(patsubst %,OOXMLFactory_%.hxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 89efc2b..1e42b75 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1017,10 +1017,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
 
                 lcl_CorrectIndents(*pPropSeq);
 
-                ::std::string sTmp(pPropSeq->toString());
-
-                ::std::clog << sTmp << ::std::endl;
-
                 uno::Reference< text::XTextRange > xTextRange =
                     xTextAppend->finishParagraph( pPropSeq->getSequence() );
                 getTableManager( ).handle(xTextRange);
diff --git a/writerfilter/source/ooxml/analyzemodel.xsl b/writerfilter/source/ooxml/analyzemodel.xsl
index 3cce979..326e438 100644
--- a/writerfilter/source/ooxml/analyzemodel.xsl
+++ b/writerfilter/source/ooxml/analyzemodel.xsl
@@ -99,6 +99,7 @@
 			</xsl:when>
 		</xsl:choose>
         <xsl:copy-of select="@tag"/>
+        <xsl:copy-of select="@supported"/>
 	</xsl:for-each>
 </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index be23966..73f1577 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -21469,7 +21469,7 @@
       <attribute name="val" tokenid="ooxml:CT_VerticalAlignRun_val" action="setValue"/>
       <action name="start" action="setDefaultStringValue"/>
     </resource>
-    <resource name="CT_FitText" resource="Properties" tag="paragraph">
+    <resource name="CT_FitText" resource="Properties" tag="paragraph" supported="no">
       <attribute name="val" tokenid="ooxml:CT_FitText_val"/>
       <attribute name="id" tokenid="ooxml:CT_FitText_id"/>
     </resource>
@@ -21590,7 +21590,7 @@
       <value name="exact" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_exact">exact</value>
       <value name="atLeast" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_atLeast">atLeast</value>
     </resource>
-    <resource name="CT_Spacing" resource="Properties" tag="paragraüh">
+    <resource name="CT_Spacing" resource="Properties" tag="paragraph">
       <attribute name="before" tokenid="ooxml:CT_Spacing_before"/>
       <attribute name="beforeLines" tokenid="ooxml:CT_Spacing_beforeLines"/>
       <attribute name="beforeAutospacing" tokenid="ooxml:CT_Spacing_beforeAutospacing"/>
diff --git a/writerfilter/source/ooxml/stage1.sh b/writerfilter/source/ooxml/stage1.sh
new file mode 100644
index 0000000..b94cc40
--- /dev/null
+++ b/writerfilter/source/ooxml/stage1.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+SEARCHIN=$2
+
+echo '<?xml version="1.0"?>'
+echo "<stage1>"
+
+cat $1 | tail -n +2
+
+find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; | 
+grep -v "//.*case NS_" |
+sed 's#'$SEARCHIN'##' |
+sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
+sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' |
+sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' |
+sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' |
+sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' |
+grep -v "^--"
+
+echo "</stage1>"
diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh
deleted file mode 100644
index 61b02bd..0000000
--- a/writerfilter/source/ooxml/status.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-SEARCHIN=$SRC_ROOT/writerfilter/source/dmapper
-
-(
-echo '<?xml version="1.0"?>'
-echo "<stage1>"
-
-xsltproc analyzemodel.xsl model.xml | tail -n +2
-
-find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; | 
-grep -v "//.*case NS_" |
-sed 's#'$SEARCHIN'##' |
-sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
-sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' |
-sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' |
-sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' |
-sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' |
-grep -v "^--"
-
-echo "</stage1>"
-) |
-xsltproc analyzestage2.xsl - |
-xsltproc analyzestage3.xsl -
diff --git a/writerfilter/source/ooxml/todo.xsl b/writerfilter/source/ooxml/todo.xsl
index 80431ea..0c76229 100644
--- a/writerfilter/source/ooxml/todo.xsl
+++ b/writerfilter/source/ooxml/todo.xsl
@@ -1,29 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <xsl:stylesheet version="1.0" 
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-	xmlns:rng="http://relaxng.org/ns/structure/1.0">
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+                xmlns:rng="http://relaxng.org/ns/structure/1.0">
 
-<xsl:output method="xml" indent="yes"/>
+  <xsl:output method="xml" indent="yes"/>
 
-<xsl:template match="/">
+  <xsl:template match="/">
     <todo>
-    <xsl:for-each select="/stage3">
+      <xsl:for-each select="/stage3">
         <xsl:for-each select="attribute|element">
-            <xsl:choose>
-                <xsl:when test="@qname and @resource='Properties' and not(file)">
-                    <xsl:copy-of select="."/>
-                </xsl:when>
-                <xsl:when test="@qname and file/status[number(@done) &lt; 100 and number(@planned) &gt; 0]">
-                    <xsl:copy>
-                        <xsl:copy-of select="@*"/>
-                        <xsl:copy-of select="file[status[number(@done) &lt; 100 and number(@planned) &gt; 0]]"/>
-                    </xsl:copy>
-                </xsl:when>
-            </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="@supported = 'no'"/>            
+            <xsl:when test="@qname and @resource='Properties' and not(file)">
+              <xsl:copy-of select="."/>
+            </xsl:when>
+            <xsl:when test="@qname and file/status[number(@done) &lt; 100 and number(@planned) &gt; 0]">
+              <xsl:copy>
+                <xsl:copy-of select="@*"/>
+                <xsl:copy-of select="file[status[number(@done) &lt; 100 and number(@planned) &gt; 0]]"/>
+              </xsl:copy>
+            </xsl:when>
+          </xsl:choose>
         </xsl:for-each>
-    </xsl:for-each>
+      </xsl:for-each>
     </todo>
-</xsl:template>
+  </xsl:template>
 
 </xsl:stylesheet>
\ No newline at end of file
commit de5b5bb0a5e576fb89297b71095bc00fbb2993c0
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Thu Feb 10 14:11:59 2011 +0100

    writerfilter10: #i116880# take outline border into account for correcting left/right margin of paragraphs [hg:59fc6a13300d]

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fc94d62..89efc2b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -606,11 +606,14 @@ void lcl_CorrectIndents(PropertySequence & aPropSeq)
 {
     try
     {
-        ::rtl::OUString str(RTL_CONSTASCII_USTRINGPARAM(__FUNCTION__));
-
         uno::Any aAny;
 
         sal_Int32 nLeftMargin = 0;
+	
+#ifdef DEBUG        
+        ::std::string aStr(aPropSeq.toString());
+#endif
+	
         aAny = aPropSeq.get(PROP_PARA_LEFT_MARGIN);
         if (aAny.hasValue())
             aAny >>= nLeftMargin;
@@ -621,9 +624,17 @@ void lcl_CorrectIndents(PropertySequence & aPropSeq)
         {
             sal_Int32 nLeftBorderDistance = 0;
             aAny >>= nLeftBorderDistance;
-
             nLeftMargin -= nLeftBorderDistance;
+            aPropSeq.set(PROP_PARA_LEFT_MARGIN, nLeftMargin);
+        }
 
+        aAny = aPropSeq.get(PROP_LEFT_BORDER);
+        
+        if (aAny.hasValue())
+        {
+            table::BorderLine aBorderLine;
+            aAny >>= aBorderLine;
+            nLeftMargin -= aBorderLine.OuterLineWidth;
             aPropSeq.set(PROP_PARA_LEFT_MARGIN, nLeftMargin);
         }
 
@@ -638,9 +649,17 @@ void lcl_CorrectIndents(PropertySequence & aPropSeq)
         {
             sal_Int32 nRightBorderDistance = 0;
             aAny >>= nRightBorderDistance;
-
             nRightMargin -= nRightBorderDistance;
+            aPropSeq.set(PROP_PARA_RIGHT_MARGIN, nRightMargin);
+        }
 
+        aAny = aPropSeq.get(PROP_RIGHT_BORDER);
+        
+        if (aAny.hasValue())
+        {
+            table::BorderLine aBorderLine;
+            aAny >>= aBorderLine;
+            nRightMargin -= aBorderLine.OuterLineWidth;
             aPropSeq.set(PROP_PARA_RIGHT_MARGIN, nRightMargin);
         }
     }
@@ -998,6 +1017,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
 
                 lcl_CorrectIndents(*pPropSeq);
 
+                ::std::string sTmp(pPropSeq->toString());
+
+                ::std::clog << sTmp << ::std::endl;
+
                 uno::Reference< text::XTextRange > xTextRange =
                     xTextAppend->finishParagraph( pPropSeq->getSequence() );
                 getTableManager( ).handle(xTextRange);
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 10693f3..14141c0 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -376,7 +376,7 @@ uno::Any PropertySequence::get(PropertyIds aPropId)
     return uno::Any();
 }
 
-void PropertySequence::set(PropertyIds aPropId, const uno::Any & rValue)
+int PropertySequence::getOrCreateIndex(PropertyIds aPropId)
 {
     Map_t::const_iterator aIt = m_indexMap.find(aPropId);
 
@@ -385,22 +385,29 @@ void PropertySequence::set(PropertyIds aPropId, const uno::Any & rValue)
     {
         sal_uInt32 nCount = m_sequence.getLength() + 1;
         m_sequence.realloc(nCount);
-        m_indexMap[aPropId] = nCount;
         nIndex = nCount - 1;
+        m_indexMap[aPropId] = nIndex;
     }
     else
     {
         nIndex = aIt->second;
     }
-    
+
+    return nIndex;
+}
+
+void PropertySequence::set(PropertyIds aPropId, const uno::Any & rValue)
+{
+    sal_Int32 nIndex = getOrCreateIndex(aPropId);
+
     m_sequence[nIndex].Name = m_rPropNameSupplier.GetName(aPropId);
-    m_sequence[nIndex].Value <<= rValue;
+    m_sequence[nIndex].Value = rValue;
 }
 
 void PropertySequence::set(PropertyIds aPropId, sal_uInt32 nValue)
 {
     uno::Any aAny;
-
+    
     aAny <<= nValue;
     set(aPropId, aAny);
 }
@@ -408,7 +415,7 @@ void PropertySequence::set(PropertyIds aPropId, sal_uInt32 nValue)
 void PropertySequence::set(PropertyIds aPropId, sal_Int32 nValue)
 {
     uno::Any aAny;
-
+    
     aAny <<= nValue;
     set(aPropId, aAny);
 }
@@ -416,7 +423,7 @@ void PropertySequence::set(PropertyIds aPropId, sal_Int32 nValue)
 void PropertySequence::set(PropertyIds aPropId, sal_uInt16 nValue)
 {
     uno::Any aAny;
-
+    
     aAny <<= nValue;
     set(aPropId, aAny);
 }
@@ -424,7 +431,7 @@ void PropertySequence::set(PropertyIds aPropId, sal_uInt16 nValue)
 void PropertySequence::set(PropertyIds aPropId, sal_Int16 nValue)
 {
     uno::Any aAny;
-
+    
     aAny <<= nValue;
     set(aPropId, aAny);
 }
@@ -449,6 +456,16 @@ uno::Sequence<beans::PropertyValue> & PropertySequence::getSequence()
         ::std::string sTmp = ::rtl::OUStringToOString(m_sequence[n].Name, RTL_TEXTENCODING_ASCII_US).getStr();
 
         sResult += sTmp;
+
+        if (m_sequence[n].Value.hasValue())
+        {
+            sal_Int32 nValue = 0;
+            m_sequence[n].Value >>= nValue;
+
+            static char buffer[256];
+            snprintf(buffer, sizeof(buffer), " = %" SAL_PRIdINT32, nValue);
+            sResult += buffer;
+        }
     }
 
     return sResult;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index fa094b9..5fa4779 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -322,6 +322,8 @@ class PropertySequence
     uno::Sequence<beans::PropertyValue>m_sequence;
     PropertyNameSupplier & m_rPropNameSupplier;
 
+    int getOrCreateIndex(PropertyIds aId);
+
 public:
     typedef boost::shared_ptr<PropertySequence> Pointer_t;
 
commit 904e4d96920ebd0044e20f569613da95895e46d9
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Tue Feb 8 17:03:47 2011 +0100

    imported patch correctindents [hg:5208b08c61dd]

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1f3415b..fc94d62 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -602,6 +602,59 @@ void lcl_MoveBorderPropertiesToFrame(PropertySequence & aPropSequence,
    }
 }
 
+void lcl_CorrectIndents(PropertySequence & aPropSeq)
+{
+    try
+    {
+        ::rtl::OUString str(RTL_CONSTASCII_USTRINGPARAM(__FUNCTION__));
+
+        uno::Any aAny;
+
+        sal_Int32 nLeftMargin = 0;
+        aAny = aPropSeq.get(PROP_PARA_LEFT_MARGIN);
+        if (aAny.hasValue())
+            aAny >>= nLeftMargin;
+
+        aAny = aPropSeq.get(PROP_LEFT_BORDER_DISTANCE);
+
+        if (aAny.hasValue())
+        {
+            sal_Int32 nLeftBorderDistance = 0;
+            aAny >>= nLeftBorderDistance;
+
+            nLeftMargin -= nLeftBorderDistance;
+
+            aPropSeq.set(PROP_PARA_LEFT_MARGIN, nLeftMargin);
+        }
+
+        sal_Int32 nRightMargin = 0;
+        aAny = aPropSeq.get(PROP_PARA_RIGHT_MARGIN);
+        if (aAny.hasValue())
+            aAny >>= nRightMargin;
+
+        aAny = aPropSeq.get(PROP_RIGHT_BORDER_DISTANCE);
+        
+        if (aAny.hasValue())
+        {
+            sal_Int32 nRightBorderDistance = 0;
+            aAny >>= nRightBorderDistance;
+
+            nRightMargin -= nRightBorderDistance;
+
+            aPropSeq.set(PROP_PARA_RIGHT_MARGIN, nRightMargin);
+        }
+    }
+    catch (const uno::Exception& rEx)
+    {
+        (void) rEx;
+    }
+    catch (const dmapper::Exception & rEx)
+    {
+        (void) rEx;
+    }
+
+}
+
 /*-- 04.01.2008 10:59:19---------------------------------------------------
 
   -----------------------------------------------------------------------*/
@@ -896,6 +949,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
                             lcl_MoveBorderPropertiesToFrame(aPropSequence,
                                                             rAppendContext.pLastParagraphProperties->GetStartingRange(),
                                                             rAppendContext.pLastParagraphProperties->GetEndingRange());
+                            lcl_CorrectIndents(aPropSequence);                            
                         }
                         //frame conversion has to be executed after table conversion
                         RegisterFrameConversion(rAppendContext.pLastParagraphProperties->GetStartingRange(),
@@ -942,6 +996,8 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
                     pPropSeq->set(PROP_DROP_CAP_FORMAT, aAny);
                 }
 
+                lcl_CorrectIndents(*pPropSeq);
+
                 uno::Reference< text::XTextRange > xTextRange =
                     xTextAppend->finishParagraph( pPropSeq->getSequence() );
                 getTableManager( ).handle(xTextRange);
commit caa91c4e482e13bfaab683a5ccec500771015cd2
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Tue Feb 8 17:03:46 2011 +0100

    imported patch PropertySequence [hg:746438bb8917]

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 456b2d2..1f3415b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -90,6 +90,16 @@ using namespace ::com::sun::star;
 using namespace ::rtl;
 namespace writerfilter {
 namespace dmapper{
+
+class Exception
+{
+    ::std::string m_message;
+
+public:
+    Exception(const ::std::string & message = "") : m_message(message) {}
+    virtual ~Exception() {}
+};
+
 struct FieldConversion
 {
     ::rtl::OUString     sWordCommand;
@@ -550,7 +560,7 @@ void DomainMapper_Impl::clearDeferredBreaks()
 /*-------------------------------------------------------------------------
 
   -----------------------------------------------------------------------*/
-void lcl_MoveBorderPropertiesToFrame(uno::Sequence<beans::PropertyValue>& rFrameProperties,
+void lcl_MoveBorderPropertiesToFrame(PropertySequence & aPropSequence,
     uno::Reference<text::XTextRange> xStartTextRange,
     uno::Reference<text::XTextRange> xEndTextRange )
 {
@@ -575,28 +585,23 @@ void lcl_MoveBorderPropertiesToFrame(uno::Sequence<beans::PropertyValue>& rFrame
             PROP_BOTTOM_BORDER_DISTANCE
         };
 
-        sal_uInt32 nStart = rFrameProperties.getLength();
         sal_uInt32 nBorderPropertyCount = sizeof( aBorderProperties ) / sizeof(PropertyIds);
-        rFrameProperties.realloc(nStart + nBorderPropertyCount);
 
-        beans::PropertyValue* pFrameProperties = rFrameProperties.getArray();
         PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
         for( sal_uInt32 nProperty = 0; nProperty < nBorderPropertyCount; ++nProperty)
         {
             ::rtl::OUString sPropertyName = rPropNameSupplier.GetName(aBorderProperties[nProperty]);
-            pFrameProperties[nStart].Name = sPropertyName;
-            pFrameProperties[nStart].Value = xTextRangeProperties->getPropertyValue(sPropertyName);
+            aPropSequence.set(aBorderProperties[nProperty], xTextRangeProperties->getPropertyValue(sPropertyName));
             if( nProperty < 4 )
                 xTextRangeProperties->setPropertyValue( sPropertyName, uno::makeAny(table::BorderLine()));
-            ++nStart;
         }
-        rFrameProperties.realloc(nStart);
     }
     catch( const uno::Exception& rEx )
    {
         (void)rEx;
    }
 }
+
 /*-- 04.01.2008 10:59:19---------------------------------------------------
 
   -----------------------------------------------------------------------*/
@@ -707,120 +712,206 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
                 {
                     //handles (8)(9) and completes (6)
                     try
-                       {
-                            //
-                            StyleSheetEntryPtr pParaStyle =
-                                m_pStyleSheetTable->FindStyleSheetByConvertedStyleName(rAppendContext.pLastParagraphProperties->GetParaStyleName());
+                    {
+                        //
+                        StyleSheetEntryPtr pParaStyle =
+                            m_pStyleSheetTable->FindStyleSheetByConvertedStyleName(rAppendContext.pLastParagraphProperties->GetParaStyleName());
+                        
+                        PropertySequence aPropSequence;
+                        if ( pParaStyle.get( ) )
+                        {
+                            const ParagraphProperties* pStyleProperties = dynamic_cast<const ParagraphProperties*>( pParaStyle->pProperties.get() );
+                            sal_Int32 nWidth =
+                                rAppendContext.pLastParagraphProperties->Getw() > 0 ?
+                                rAppendContext.pLastParagraphProperties->Getw() :
+                                pStyleProperties->Getw();
+                            bool bAutoWidth = nWidth < 1;
+                            if( bAutoWidth )
+                                nWidth = DEFAULT_FRAME_MIN_WIDTH;
+                            aPropSequence.set(PROP_WIDTH, nWidth);
+                            
+                            if (rAppendContext.pLastParagraphProperties->Geth())
+                            {
+                                aPropSequence.set(PROP_HEIGHT, rAppendContext.pLastParagraphProperties->Geth());
+                            }
+                            else
+                            {
+                                aPropSequence.set(PROP_HEIGHT, pStyleProperties->Geth());
+                            }
+                            
+                            if (rAppendContext.pLastParagraphProperties->GethRule() >= 0)
+                            {
+                                aPropSequence.set(PROP_SIZE_TYPE, rAppendContext.pLastParagraphProperties->GethRule());
+                            }
+                            else if (pStyleProperties->GethRule() >=0)
+                            {
+                                aPropSequence.set(PROP_SIZE_TYPE, pStyleProperties->GethRule());
+                            }
+                            else
+                            {
+                                aPropSequence.set(PROP_SIZE_TYPE, text::SizeType::VARIABLE);
+                            }
+                            
+                            if (bAutoWidth)
+                            {
+                                aPropSequence.set(PROP_WIDTH_TYPE,  text::SizeType::MIN);
+                            }                                     
+                            else
+                            {
+                                aPropSequence.set(PROP_WIDTH_TYPE,  text::SizeType::FIX);
+                            }
+                            
+                            sal_Int16 nHoriOrient = text::HoriOrientation::NONE;
+                            if ( rAppendContext.pLastParagraphProperties->GetxAlign() >= 0)
+                            {
+                                nHoriOrient = static_cast<sal_Int16>(rAppendContext.pLastParagraphProperties->GetxAlign());
+                            }
+                            else if (pStyleProperties->GetxAlign() >= 0)
+                            {
+                                nHoriOrient = static_cast<sal_Int16>(pStyleProperties->GetxAlign());
+                            }
+
+                            aPropSequence.set(PROP_HORI_ORIENT, nHoriOrient);
+
+                            if (rAppendContext.pLastParagraphProperties->IsxValid())
+                            {
+                                aPropSequence.set(PROP_HORI_ORIENT_POSITION, 
+                                                  rAppendContext.pLastParagraphProperties->Getx());
+                            }
+                            else
+                            {
+                                aPropSequence.set(PROP_HORI_ORIENT_POSITION, 
+                                                  pStyleProperties->Getx());
+                            }
+                            
+                            if (rAppendContext.pLastParagraphProperties->GethAnchor() >= 0)
+                            {
+                                aPropSequence.set(PROP_HORI_ORIENT_RELATION, 
+                                                  rAppendContext.pLastParagraphProperties->GethAnchor());
+                            }
+                            else
+                            {
+                                aPropSequence.set(PROP_HORI_ORIENT_RELATION, pStyleProperties->GethAnchor());
+                            }
+                            
+                            sal_Int16 nVertOrient =  text::VertOrientation::NONE;
+                            if ( rAppendContext.pLastParagraphProperties->GetyAlign() >= 0)
+                            {
+                                nVertOrient = static_cast<sal_Int16>(rAppendContext.pLastParagraphProperties->GetyAlign());
+                            }
+                            else if ( pStyleProperties->GetyAlign() >= 0)
+                            {
+                                nVertOrient =  static_cast<sal_Int16>(pStyleProperties->GetyAlign());
+                            }
 
-                            uno::Sequence< beans::PropertyValue > aFrameProperties(pParaStyle ? 15: 0);
-                            if ( pParaStyle.get( ) )
+                            aPropSequence.set(PROP_VERT_ORIENT, nVertOrient);
+                            
+                            if ( rAppendContext.pLastParagraphProperties->IsyValid())
+                            {
+                                aPropSequence.set(PROP_VERT_ORIENT_POSITION, rAppendContext.pLastParagraphProperties->Gety());                                   }
+                            else
                             {
-                                const ParagraphProperties* pStyleProperties = dynamic_cast<const ParagraphProperties*>( pParaStyle->pProperties.get() );
-                                beans::PropertyValue* pFrameProperties = aFrameProperties.getArray();
-                                pFrameProperties[0].Name = rPropNameSupplier.GetName(PROP_WIDTH);
-                                pFrameProperties[1].Name = rPropNameSupplier.GetName(PROP_HEIGHT);
-                                pFrameProperties[2].Name = rPropNameSupplier.GetName(PROP_SIZE_TYPE);
-                                pFrameProperties[3].Name = rPropNameSupplier.GetName(PROP_WIDTH_TYPE);
-                                pFrameProperties[4].Name = rPropNameSupplier.GetName(PROP_HORI_ORIENT);
-                                pFrameProperties[5].Name = rPropNameSupplier.GetName(PROP_HORI_ORIENT_POSITION);
-                                pFrameProperties[6].Name = rPropNameSupplier.GetName(PROP_HORI_ORIENT_RELATION);
-                                pFrameProperties[7].Name = rPropNameSupplier.GetName(PROP_VERT_ORIENT);
-                                pFrameProperties[8].Name = rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION);
-                                pFrameProperties[9].Name = rPropNameSupplier.GetName(PROP_VERT_ORIENT_RELATION);
-                                pFrameProperties[10].Name = rPropNameSupplier.GetName(PROP_SURROUND);
-                                pFrameProperties[11].Name = rPropNameSupplier.GetName(PROP_LEFT_MARGIN);
-                                pFrameProperties[12].Name = rPropNameSupplier.GetName(PROP_RIGHT_MARGIN);
-                                pFrameProperties[13].Name = rPropNameSupplier.GetName(PROP_TOP_MARGIN);
-                                pFrameProperties[14].Name = rPropNameSupplier.GetName(PROP_BOTTOM_MARGIN);
-                                sal_Int32 nWidth =
-                                    rAppendContext.pLastParagraphProperties->Getw() > 0 ?
-                                        rAppendContext.pLastParagraphProperties->Getw() :
-                                        pStyleProperties->Getw();
-                                bool bAutoWidth = nWidth < 1;
-                                if( bAutoWidth )
-                                    nWidth = DEFAULT_FRAME_MIN_WIDTH;
-                                pFrameProperties[0].Value <<= nWidth;
-                                pFrameProperties[1].Value <<=
-                                    rAppendContext.pLastParagraphProperties->Geth() > 0 ?

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list