Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi David,

You recently had this dbglevel change. Here is a patch that brings the
ww8 codebase in sync with this:

- #if OSL_DEBUG_LEVEL > 0 -> #if OSL_DEBUG_LEVEL > 1
- OSL_TRACE() is already guarded with #if OSL_DEBUG_LEVEL > 1, so remove
  the ifdefs around it.

OK to push?

Thanks.
From ac84757e41a9636be8e55637b900371553b4e27a Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@frugalware.org>
Date: Thu, 27 Jan 2011 12:59:40 +0100
Subject: [PATCH] ww8: silence debug output with dbglevel=1

dbglevel=2 is meant to produce debug output, 1 is just about getting
debug symbols, but the same output.
---
 sw/source/filter/ww8/docxattributeoutput.cxx |   26 ++++----------------------
 sw/source/filter/ww8/docxexport.cxx          |    4 ++--
 sw/source/filter/ww8/wrtw8nds.cxx            |    4 +---
 sw/source/filter/ww8/wrtww8gr.cxx            |    4 ++--
 4 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9079877..b437376 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -134,7 +134,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNamed.hpp>
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
 #endif
 
@@ -1676,7 +1676,7 @@ void DocxAttributeOutput::TableOrientation( 
ww8::WW8TableNodeInfoInner::Pointer_
 
 void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t 
/*pTableTextNodeInfoInner*/ )
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
     fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
 #endif
 }
@@ -1701,7 +1701,7 @@ void DocxAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
 void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
 {
     // are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
     OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
 #else
     (void) nStyle; // to quiet the warning
@@ -1710,9 +1710,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
 
 void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize )
 {
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& 
rSize ) - some stuff still missing\n" );
-#endif
     // create the relation ID
     OString aRelId;
     sal_Int32 nImageType;
@@ -2076,12 +2074,10 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, 
const Po
             }
             break;
         default:
-#if OSL_DEBUG_LEVEL > 0
             OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, 
const Point& rNdTopLeft ) - frame type '%s'\n",
                     rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox":
                     ( rFrame.GetWriterType() == sw::Frame::eOle? "eOle":
                       ( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) 
) );
-#endif
             break;
     }
 
@@ -2208,9 +2204,7 @@ void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* 
pSectionInfo
             }
             break;
         default:
-#if OSL_DEBUG_LEVEL > 0
             OSL_TRACE( "Unknown section break to write: %d\n", nC );
-#endif
             break;
     }
 }
@@ -2287,9 +2281,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
 void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& 
/*rLnNumInfo*/ )
 {
     // see 2.6.8 lnNumType (Line Numbering Settings)
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
-#endif
 }
 
 void DocxAttributeOutput::SectionTitlePage()
@@ -2372,9 +2364,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT 
nPageRes
     m_pSerializer->singleElementNS( XML_w, XML_pgNumType, xAttrs );
 
     // see 2.6.12 pgNumType (Page Numbering Settings)
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
-#endif
 }
 
 void DocxAttributeOutput::SectionType( BYTE nBreakCode )
@@ -2478,7 +2468,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule 
&rRul
             FSNS( XML_w, XML_val ), aId.getStr(),
             FSEND );
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
     // TODO ww8 version writes this, anything to do about it here?
     if ( rRule.IsContinusNum() )
         OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" );
@@ -2833,9 +2823,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
 
 void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& )
 {
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" );
-#endif
 }
 
 void DocxAttributeOutput::CharAnimatedText( const SvxBlinkItem& rBlink )
@@ -3031,16 +3019,12 @@ void DocxAttributeOutput::RefField( const SwField&  rFld, const String& 
rRef )
 
 void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ )
 {
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" );
-#endif
 }
 
 void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ )
 {
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" );
-#endif
 }
 
 bool DocxAttributeOutput::DropdownField( const SwField* pFld )
@@ -3487,9 +3471,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
 
 void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& )
 {
-#if OSL_DEBUG_LEVEL > 0
     OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" );
-#endif
 }
 
 void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index c8bd1c8..48ffe71 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -213,7 +213,7 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
     if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST )
         WriteHeaderFooter( rFirstPageFmt, false, "first" );
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
     fprintf( stderr, "DocxExport::WriteHeadersFooters() - nBreakCode introduced, but ignored\n" );
 #endif
 }
@@ -230,7 +230,7 @@ void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
 
 void DocxExport::WriteHyperlinkData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
     fprintf( stderr, "TODO DocxExport::WriteHyperlinkData()\n" );
 #endif
 }
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 26df9cb..f18c125 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -35,7 +35,7 @@
 #include <algorithm>
 #include <functional>
 #include <iostream>
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
 #   include <cstdio>
 #endif
 
@@ -2740,9 +2740,7 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode )
             OutputOLENode( *rNode.GetOLENode() );
             break;
         default:
-#if OSL_DEBUG_LEVEL > 0
             OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() );
-#endif
             break;
     }
 }
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index af58ad1..afd27c6 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -29,7 +29,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
 #   include <cstdio>
 #endif
 
@@ -78,7 +78,7 @@
 #include "docsh.hxx"
 #include <cstdio>
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
 #endif
 
-- 
1.7.3.4

Attachment: pgpY6J2BdTRth.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.