You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/11/14 22:54:15 UTC

svn commit: r1409454 - in /incubator/ooo/branches/gbuild/main/writerfilter/source: dmapper/ doctok/ ooxml/ resourcemodel/

Author: arist
Date: Wed Nov 14 21:54:13 2012
New Revision: 1409454

URL: http://svn.apache.org/viewvc?rev=1409454&view=rev
Log:
writerfilter10_20_9467e7f6cd60.patch
# HG changeset patch
# User Henning Brinkmann <hb...@openoffice.org>
# Date 1298385007 -3600
# Node ID 9467e7f6cd608a5372a56fe57c2e454b8ba62ca4
# Parent  3fe69983f7beb8556ef0b27467127035da5372ce
removed output to stderr


Modified:
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/FontTable.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/GraphicImport.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/OLEHandler.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyMap.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/SettingsTable.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/StyleSheetTable.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/ThemeTable.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8DocumentImpl.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/RefAndPointer.hxx
    incubator/ooo/branches/gbuild/main/writerfilter/source/resourcemodel/LoggedResources.cxx

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper.cxx Wed Nov 14 21:54:13 2012
@@ -194,7 +194,6 @@ void DomainMapper::lcl_attribute(Id nNam
     
     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) )
@@ -2207,7 +2206,6 @@ void DomainMapper::sprmWithProps( Sprm& 
     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)
@@ -4458,7 +4456,12 @@ void DomainMapper::lcl_text(const sal_uI
     }
     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---------------------------------------------------
@@ -4548,7 +4551,6 @@ void DomainMapper::lcl_props(writerfilte
 -----------------------------------------------------------------------*/
 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)

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx Wed Nov 14 21:54:13 2012
@@ -54,8 +54,9 @@ static void  lcl_printProperties( Proper
         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; 
@@ -825,7 +826,6 @@ void DomainMapperTableHandler::endCell(c
     dmapper_logger->chars(toString(end));
     dmapper_logger->endElement("table.cell.end");
     dmapper_logger->endElement("table.cell");
-    clog << "</table.cell>" << endl;
 #endif
 
     if (!end.get()) 

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx Wed Nov 14 21:54:13 2012
@@ -1498,9 +1498,7 @@ void DomainMapper_Impl::PushShapeContext
     {
         (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
     }
 }

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/FontTable.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/FontTable.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/FontTable.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/FontTable.cxx Wed Nov 14 21:54:13 2012
@@ -68,7 +68,6 @@ void FontTable::lcl_attribute(Id Name, V
         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)
     {
@@ -547,8 +546,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:

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/GraphicImport.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/GraphicImport.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/GraphicImport.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/GraphicImport.cxx Wed Nov 14 21:54:13 2012
@@ -1743,8 +1743,15 @@ uno::Reference< text::XTextContent > Gra
     }
     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;
 }

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/NumberingManager.cxx Wed Nov 14 21:54:13 2012
@@ -59,26 +59,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;

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/OLEHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/OLEHandler.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/OLEHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/OLEHandler.cxx Wed Nov 14 21:54:13 2012
@@ -127,8 +127,9 @@ void OLEHandler::lcl_attribute(Id rName,
                 {
                     (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
                 }    
             }
@@ -178,8 +179,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
                 } 
             }

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyMap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyMap.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyMap.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/PropertyMap.cxx Wed Nov 14 21:54:13 2012
@@ -659,8 +659,8 @@ bool SectionPropertyMap::HasFooter(bool 
 
 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 )
@@ -715,9 +715,10 @@ void SectionPropertyMap::CopyLastHeaderF
 
                 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(
@@ -733,14 +734,15 @@ void SectionPropertyMap::CopyLastHeaderF
         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
 }
 

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/SettingsTable.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/SettingsTable.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/SettingsTable.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/SettingsTable.cxx Wed Nov 14 21:54:13 2012
@@ -95,7 +95,6 @@ SettingsTable::SettingsTable(DomainMappe
 , LoggedTable(dmapper_logger, "SettingsTable")
 , m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) )
 {
-    // printf("SettingsTable::SettingsTable()\n");
 }
         
 SettingsTable::~SettingsTable()
@@ -110,7 +109,6 @@ void SettingsTable::lcl_attribute(Id nNa
     (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   
             
@@ -135,8 +133,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)
     {
@@ -225,7 +221,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

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/StyleSheetTable.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/StyleSheetTable.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/StyleSheetTable.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/StyleSheetTable.cxx Wed Nov 14 21:54:13 2012
@@ -397,7 +397,6 @@ void StyleSheetTable::lcl_attribute(Id N
     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)
     {
@@ -523,7 +522,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rS
     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)
@@ -682,7 +680,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rS
 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;

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/ThemeTable.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/ThemeTable.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/ThemeTable.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/dmapper/ThemeTable.cxx Wed Nov 14 21:54:13 2012
@@ -50,7 +50,6 @@ ThemeTable::ThemeTable()
 , LoggedTable(dmapper_logger, "ThemeTable")
 , m_pImpl( new ThemeTable_Impl )
 {
-    // printf("ThemeTable::ThemeTable()\n");
 }
 
 ThemeTable::~ThemeTable()
@@ -67,7 +66,6 @@ void ThemeTable::lcl_attribute(Id Name, 
 #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)
     {
@@ -103,8 +101,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)
     {

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8DocumentImpl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8DocumentImpl.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8DocumentImpl.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8DocumentImpl.cxx Wed Nov 14 21:54:13 2012
@@ -295,8 +295,6 @@ mbInSection(false), mbInParagraphGroup(f
                                 mpFib->get_fcPlcfbtePapx(), 
                                 mpFib->get_lcbPlcfbtePapx()));
 
-    //clog << "BinTable(PAP):" << mpBinTablePAPX->toString();
-
     parseBinTableCpAndFcs(*mpBinTablePAPX, PROP_PAP);
 
     mpBinTableCHPX =
@@ -305,8 +303,6 @@ mbInSection(false), mbInParagraphGroup(f
                                 mpFib->get_fcPlcfbteChpx(), 
                                 mpFib->get_lcbPlcfbteChpx()));
 
-    //clog << "BinTable(CHP):" << mpBinTableCHPX->toString();
-
     parseBinTableCpAndFcs(*mpBinTableCHPX, PROP_CHP);
 
     mpSEDs = PLCF<WW8SED>::Pointer_t(new PLCF<WW8SED>
@@ -314,8 +310,6 @@ mbInSection(false), mbInParagraphGroup(f
                                       mpFib->get_fcPlcfsed(), 
                                       mpFib->get_lcbPlcfsed()));
 
-    //mpSEDs->dump(clog);
-
     {
         PLCFHelper<WW8SED>::processPLCFCpAndFcs
             (*this, mpPieceTable, mpSEDs, PROP_SEC, 0);
@@ -587,7 +581,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
@@ -604,8 +597,6 @@ void WW8DocumentImpl::parseBinTableCpAnd
         bool bComplex = mpPieceTable->isComplex(aFcFromTable);
         aFcFromTable.setComplex(bComplex);
 
-        //clog << "<entry fc=\"" << aFcFromTable.toString() << "\">" << endl;
-
         try
         {
             Cp aCpFromTable(mpPieceTable->fc2cp(aFcFromTable));
@@ -642,8 +633,6 @@ void WW8DocumentImpl::parseBinTableCpAnd
                 bool bComplexFKP = mpPieceTable->isComplex(aFc);
                 aFc.setComplex(bComplexFKP);
 
-                //clog << "<fkpentry fc=\"" << aFc.toString() << "\"/>" << endl;
-
                 try
                 {
                     Cp aCp = mpPieceTable->fc2cp(aFc);
@@ -651,24 +640,18 @@ void WW8DocumentImpl::parseBinTableCpAnd
                     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
@@ -1040,7 +1023,7 @@ writerfilter::Reference<Table>::Pointer_
         }
         catch (Exception e)
         {
-            clog << e.getText() << endl;
+            (void) e;
         }
     }
 
@@ -1660,16 +1643,6 @@ void WW8DocumentImpl::resolve(Stream & r
 {
     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>");
@@ -1683,7 +1656,6 @@ void WW8DocumentImpl::resolve(Stream & r
         {
             mpSummaryInformationStream->dump(output);
         }
-#endif
 
         writerfilter::Reference<Properties>::Pointer_t pFib
             (new WW8Fib(*mpFib));
@@ -1696,30 +1668,16 @@ void WW8DocumentImpl::resolve(Stream & r
             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);
 
@@ -1735,33 +1693,6 @@ void WW8DocumentImpl::resolve(Stream & r
             }
             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();
         
@@ -1782,7 +1713,7 @@ void WW8DocumentImpl::resolve(Stream & r
         }
         catch (Exception e)
         {
-            clog << e.getText() << endl;
+            (void) e;
         }
 
         writerfilter::Reference<Table>::Pointer_t pAssocTable = getAssocTable();
@@ -2231,7 +2162,7 @@ BookmarkHelper::getBookmark(const CpAndF
     }
     catch (ExceptionNotFound e)
     {
-        clog << e.getText() << endl;
+        (void) e;
     }
 
     return pResult;

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx Wed Nov 14 21:54:13 2012
@@ -164,8 +164,6 @@ void WW8PropertiesReference::resolve(Pro
 {
     if (mpPropSet != NULL)
     {
-        //mpPropSet->dump(clog);
-
         if (mpPropSet->isPap())
         {
             WW8IntValue aValue(mpPropSet->get_istd());

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx Wed Nov 14 21:54:13 2012
@@ -1860,7 +1860,7 @@ OOXMLFastContextHandlerShape::OOXMLFastC
             mrShapeContext->setRelationFragmentPath
                 (mpParserState->getTarget());
         }
-#ifdef DEBUG_CONTEXT_STACK
+#ifdef DEBUG_CONTEXT_HANDLER
         else
         {
             debug_logger->startElement("error");

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx Wed Nov 14 21:54:13 2012
@@ -48,75 +48,27 @@ OOXMLFastDocumentHandler::OOXMLFastDocum
 
 // ::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 
@@ -141,37 +93,16 @@ uno::Reference< xml::sax::XFastContextHa
  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));
 }

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx Wed Nov 14 21:54:13 2012
@@ -27,6 +27,10 @@
 #include "OOXMLFastTokenHandler.hxx"
 #include "gperffasttoken.hxx"
 
+#ifdef DEBUG_TOKEN
+#include "ooxmlLoggers.hxx"
+#endif
+
 namespace writerfilter {
 namespace ooxml
 {
@@ -53,10 +57,10 @@ OOXMLFastTokenHandler::OOXMLFastTokenHan
         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;
@@ -114,11 +118,13 @@ css::uno::Sequence< ::sal_Int8 > SAL_CAL
         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;

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/RefAndPointer.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/RefAndPointer.hxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/RefAndPointer.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/RefAndPointer.hxx Wed Nov 14 21:54:13 2012
@@ -43,44 +43,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)

Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/resourcemodel/LoggedResources.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/resourcemodel/LoggedResources.cxx?rev=1409454&r1=1409453&r2=1409454&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/resourcemodel/LoggedResources.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/resourcemodel/LoggedResources.cxx Wed Nov 14 21:54:13 2012
@@ -22,6 +22,7 @@
 
 
 #include <rtl/ustrbuf.hxx>
+#include <resourcemodel/WW8ResourceModel.hxx>
 #include <resourcemodel/LoggedResources.hxx>
 #include <resourcemodel/QNameToString.hxx>
 
@@ -282,7 +283,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);