[PATCH 1/3] Replace #ifdef DEBUG with #if OSL_DEBUG_LEVEL > 1

Jacek Wolszczak shutdownrunner at gmail.com
Tue May 10 00:56:23 PDT 2011


---
 sw/inc/dbgoutsw.hxx                    |    4 +-
 sw/source/core/doc/dbgoutsw.cxx        |    2 +-
 sw/source/core/doc/docbm.cxx           |    2 +-
 sw/source/core/doc/docredln.cxx        |    4 +-
 sw/source/core/edit/edlingu.cxx        |    2 +-
 sw/source/core/text/inftxt.cxx         |    4 +-
 sw/source/core/txtnode/txtedt.cxx      |    2 +-
 sw/source/core/undo/SwUndoPageDesc.cxx |   12 ++++----
 sw/source/core/unocore/unotext.cxx     |    4 +-
 sw/source/core/view/printdata.cxx      |    2 +-
 sw/source/filter/ww8/WW8Sttbf.cxx      |    6 ++--
 sw/source/filter/ww8/WW8TableInfo.cxx  |   46 ++++++++++++++++----------------
 sw/source/filter/ww8/rtfexport.cxx     |    4 +-
 sw/source/filter/ww8/wrtw8nds.cxx      |   10 +++----
 sw/source/filter/ww8/wrtww8.cxx        |   40 ++++++++++++++--------------
 sw/source/filter/ww8/ww8par.cxx        |    4 +-
 sw/source/ui/lingu/hhcwrp.cxx          |   10 +++---
 sw/source/ui/lingu/olmenu.cxx          |    5 +---
 18 files changed, 79 insertions(+), 84 deletions(-)

diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index dad9e50..b111808 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -28,7 +28,7 @@
 #ifndef __DBGOUTSW_HXX
 #define __DBGOUTSW_HXX
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 
 #include <boost/unordered_map.hpp>
 #include <tox.hxx>
@@ -124,7 +124,7 @@ const char * dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> &
 }
 SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
 SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
-#endif // DEBUG
+#endif // OSL_DEBUG_LEVEL > 1
 #endif // __DBGOUTSW_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 9b83b52..2ca96f6 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -28,7 +28,7 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 
 #include <tools/string.hxx>
 #include <svl/poolitem.hxx>
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 5a3cf3e..7c03f51 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -750,7 +750,7 @@ namespace sw { namespace mark
     {
         m_vFieldmarks.clear();
         m_vBookmarks.clear();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         for(iterator_t pBkmk = m_vMarks.begin();
             pBkmk != m_vMarks.end();
             ++pBkmk)
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 5d5ffd1..e0f6c31 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -254,7 +254,7 @@ inline bool IsPrevPos( const SwPosition rPos1, const SwPosition rPos2 )
                 : false;
 }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
 {
     int nError = 0;
@@ -2733,7 +2733,7 @@ sal_Bool SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsP
             }
             else
                 aNewStt = *pNew->GetPoint();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
             CheckPosition( pNew->GetPoint(), pNew->GetMark() );
 #endif
             if( *pNew->GetPoint() != *pNew->GetMark() &&
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index dcdc438..2464deb 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1330,7 +1330,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
                     }
                     else
                     {
-                        OSL_ENSURE( 0, "ApplyChangedSentence: iterator positions broken" );
+                        OSL_FAIL("ApplyChangedSentence: iterator positions broken" );
                         break;
                     }
                 }
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ba19cec..32a35a2 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -78,7 +78,7 @@
 
 #include <unomid.h>
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
 #endif
 
@@ -1192,7 +1192,7 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
             bool bIsStartMark=(1==GetLen() && CH_TXT_ATR_FIELDSTART==GetTxt().GetChar(GetIdx()));
             if(pFieldmark) {
                 OSL_TRACE("Found Fieldmark");
-#if DEBUG
+#if OSL_DEBUG_LEVEL
                 rtl::OUString str = pFieldmark->ToString( );
                 fprintf( stderr, "%s\n", rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr( ) );
 #endif
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 29c6260..f37efa8 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -636,7 +636,7 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
     {
         sal_Int16 nWordType = WordType::DICTIONARY_WORD;
         lang::Locale aLocale( pBreakIt->GetLocale( GetLang( nPos ) ) );
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         sal_Bool bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
         sal_Bool bEnd   = rxBreak->isEndWord  ( m_Text, nPos, aLocale, nWordType );
         (void)bBegin;
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index cb79448..4ebb679 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -116,7 +116,7 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
 {
     OSL_ENSURE(0 != pDoc, "no document?");
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     DebugHeaderFooterContent( (SwPageDesc&)aOld );
     DebugHeaderFooterContent( (SwPageDesc&)aNew );
 #endif
@@ -179,7 +179,7 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
         // After this exchange method the old page description will point to zero,
         // the new one will point to the node position of the original content nodes.
         ExchangeContentNodes( (SwPageDesc&)aOld, (SwPageDesc&)aNew );
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         DebugHeaderFooterContent( (SwPageDesc&)aOld );
         DebugHeaderFooterContent( (SwPageDesc&)aNew );
 #endif
@@ -204,7 +204,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
         rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
         SfxPoolItem *pNewItem = pItem->Clone();
         SwFrmFmt* pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         const SwFmtCntnt& rSourceCntnt = rSourceHead.GetHeaderFmt()->GetCntnt();
         (void)rSourceCntnt;
         const SwFmtCntnt& rDestCntnt = rDestHead.GetHeaderFmt()->GetCntnt();
@@ -228,7 +228,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
             rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
             pNewItem = pItem->Clone();
             pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
             const SwFmtCntnt& rSourceCntnt1 = rSourceLeftHead.GetHeaderFmt()->GetCntnt();
             (void)rSourceCntnt1;
             const SwFmtCntnt& rDestCntnt1 = rDest.GetLeft().GetHeader().GetHeaderFmt()->GetCntnt();
@@ -255,7 +255,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
         pNewFmt->SetFmtAttr( rSourceFoot.GetFooterFmt()->GetCntnt() );
         delete pNewItem;
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         const SwFmtCntnt& rFooterSourceCntnt = rSourceFoot.GetFooterFmt()->GetCntnt();
         (void)rFooterSourceCntnt;
         const SwFmtCntnt& rFooterDestCntnt = rDestFoot.GetFooterFmt()->GetCntnt();
@@ -270,7 +270,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
         if( !rDest.IsFooterShared() )
         {
             const SwFmtFooter& rSourceLeftFoot = rSource.GetLeft().GetFooter();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
             const SwFmtCntnt& rFooterSourceCntnt2 = rSourceLeftFoot.GetFooterFmt()->GetCntnt();
             const SwFmtCntnt& rFooterDestCntnt2 =
                 rDest.GetLeft().GetFooter().GetFooterFmt()->GetCntnt();
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index a1a6bdf..7f08cbc 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1968,7 +1968,7 @@ lcl_ApplyRowProperties(
     }
 }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 //-->debug cell properties of all rows
 static void
 lcl_DebugCellProperties(
@@ -2249,7 +2249,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
                 xRows->getByIndex(nRow), aRowSeparators[nRow]);
         }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         lcl_DebugCellProperties(rCellProperties);
 #endif
 
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 846b6e1..b594109 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -118,7 +118,7 @@ void SwRenderData::ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rV
 {
     if (m_pViewOptionAdjust)
     {
-        OSL_ENSURE( 0, "error: there should be no ViewOptionAdjust active when calling this function" );
+        OSL_FAIL("error: there should be no ViewOptionAdjust active when calling this function" );
     }
     m_pViewOptionAdjust = new SwViewOptionAdjust_Impl( rSh, rViewOptions );
 }
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index c7c2c1b..c8f8b24 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -31,7 +31,7 @@
 #include "WW8Sttbf.hxx"
 #include <cstdio>
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
 #endif
 
@@ -83,7 +83,7 @@ namespace ww8
             aResult = rtl::OUString(pNew);
         }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         char sBuffer[256];
         snprintf(sBuffer, sizeof(sBuffer), "offset=\"%" SAL_PRIuUINT32 "\" count=\"%" SAL_PRIuUINT32 "\"", 
                  nOffset, nCount);
@@ -109,7 +109,7 @@ namespace ww8
             aResult = rtl::OUString(aOUStr);
         }
         
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         char sBuffer[256];
         snprintf(sBuffer, sizeof(sBuffer), "offset=\"%" SAL_PRIuUINT32 "\" count=\"%" SAL_PRIuUINT32 "\"", 
                  nOffset, nCount);
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index b711e56..ac459c4 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -362,7 +362,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo()
     
         aIt++;
     }
-#ifdef DEBUG                
+#if OSL_DEBUG_LEVEL > 1
     sResult += dbg_out(*mpNode);
 #endif
     sResult += "</tableNodeInfo>";
@@ -386,7 +386,7 @@ void WW8TableNodeInfo::setEndOfLine(bool bEndOfLine)
     WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
     pInner->setEndOfLine(bEndOfLine);
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<endOfLine depth=\"" << mnDepth << "\">" 
     << toString() << "</endOfLine>" << ::std::endl;
 #endif
@@ -397,7 +397,7 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell)
     WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
     pInner->setEndOfCell(bEndOfCell);
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<endOfCell depth=\"" << mnDepth << "\">" 
     << toString() << "</endOfCell>" << ::std::endl;
 #endif
@@ -409,7 +409,7 @@ void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable)
 
     pInner->setFirstInTable(bFirstInTable);
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<firstInTable depth=\"" << mnDepth << "\">" 
     << toString() << "</firstInTable>" << ::std::endl;
 #endif    
@@ -422,7 +422,7 @@ void WW8TableNodeInfo::setVertMerge(bool bVertMerge)
     pInner->setVertMerge(bVertMerge);
     
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<vertMerge depth=\"" << mnDepth << "\">" 
     << toString() << "</vertMerge>" << ::std::endl;
 #endif
@@ -442,7 +442,7 @@ void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext)
 {
     mpNext = pNext;
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<setnext><from>" << toString() << "</from><to>" 
                 << pNext->toString() << "</to></setnext>" 
                 << ::std::endl;
@@ -590,7 +590,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable)
     {
         SwRect aRect = aTableCellInfo.getRect();
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         static char sBuffer[1024];        
         ::std::clog << "<CellFrm>" << ::std::endl;
 
@@ -627,7 +627,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable)
             while (!bDone);
         }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << "</CellFrm>" << ::std::endl;
 #endif
     }
@@ -639,7 +639,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable)
 
 void WW8TableInfo::processSwTable(const SwTable * pTable)
 {
-#ifdef DEBUG 
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<processSwTable>" << ::std::endl;
 #endif
 
@@ -650,7 +650,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
     {
         pPrev = processSwTableByLayout(pTable);
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         WW8TableCellGrid::Pointer_t pCellGrid(getCellGridForTable(pTable));
         ::std::clog << pCellGrid->toString() << ::std::endl;
 #endif
@@ -675,7 +675,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
         
         pPrev->setNextNode(pEndNode);
     }
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</processSwTable>" << ::std::endl;
 #endif
 }
@@ -686,7 +686,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
                                sal_uInt32 nRow,
                                sal_uInt32 nDepth, WW8TableNodeInfo * pPrev)
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<processTableLine row=\"" << nRow << "\" depth=\"" 
     << nDepth << "\">" << ::std::endl;
 #endif
@@ -702,7 +702,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
         pPrev = processTableBox(pTable, pBox, nRow, n, nDepth, n == rBoxes.Count() - 1, pPrev);
     } 
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</processTableLine>" << ::std::endl;
 #endif
 
@@ -717,7 +717,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
                                    sal_uInt32 nCell,
                                    sal_uInt32 nDepth)
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<processTableBoxLines depth=\"" << nDepth 
     << "\" row=\"" << nRow << "\" cell=\"" << nCell << "\">" << ::std::endl;
 #endif
@@ -757,7 +757,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
         }
     }
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</processTableBoxLines>" << ::std::endl;
 #endif
 
@@ -773,7 +773,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable,
                               bool bEndOfLine,
                               WW8TableNodeInfo * pPrev)
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<processTableBox row=\"" << nRow << "\" cell=\"" << nCell
     << "\" depth=\"" << nDepth << "\">" << ::std::endl;
 #endif
@@ -852,7 +852,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable,
         }
     }                   
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</processTableBox>" << ::std::endl;
 #endif
 
@@ -903,7 +903,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
         pNodeInfo->setRect(*pRect);
     }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << pNodeInfo->toString() << ::std::endl;
 #endif
 
@@ -1047,7 +1047,7 @@ WW8TableNodeInfo * WW8TableInfo::reorderByLayout(const SwTable * pTable)
     WW8TableNodeInfo * pPrev = NULL;
     WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable);
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << pCellGrid->toString() << ::std::endl;
 #endif
 
@@ -1121,7 +1121,7 @@ void WW8TableCellGrid::insert(const SwRect & rRect,
 
 void WW8TableCellGrid::addShadowCells()
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<addShadowCells>" << ::std::endl;
 #endif
 
@@ -1129,7 +1129,7 @@ void WW8TableCellGrid::addShadowCells()
 
     while (aTopsIt != getRowTopsEnd())
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         long nTop = *aTopsIt;
         (void) nTop;
 #endif
@@ -1194,7 +1194,7 @@ void WW8TableCellGrid::addShadowCells()
 
         ++aTopsIt;
     }
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</addShadowCells>" << ::std::endl;
 #endif
 }
@@ -1448,7 +1448,7 @@ void WW8TableCellGridRow::insert(const CellInfo & rCellInfo)
 {
     m_pCellInfos->insert(rCellInfo);
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<gridRowInsert>" 
                 << rCellInfo.toString() 
                 << "</gridRowInsert>"
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 511b4b1..9ff330a 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -491,7 +491,7 @@ void RtfExport::WritePageDescTable()
 
 void RtfExport::ExportDocument_Impl()
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     // MSWordExportBase::WriteText and others write debug messages to std::clog
     // which is not interesting while debugging RtfExport
     std::ostringstream aOss;
@@ -698,7 +698,7 @@ void RtfExport::ExportDocument_Impl()
 
     Strm() << '}';
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     std::clog.rdbuf(pOldBuf);
 #endif
 }
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 59b8e0a..9b6a23e 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -157,8 +157,6 @@ ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) {
     }
 }
 
-/*  */
-
 MSWordAttrIter::MSWordAttrIter( MSWordExportBase& rExport )
     : pOld( rExport.pChpIter ), m_rExport( rExport )
 {
@@ -1557,7 +1555,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
 
     if ( pTextNodeInfo.get() != NULL )
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << pTextNodeInfo->toString() << ::std::endl;
 #endif
 
@@ -1740,7 +1738,7 @@ void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, xub_StrLen nA
 
 void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<OutWW8_SwTxtNode>" << ::std::endl;
 #endif
 
@@ -2026,7 +2024,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
 
     if ( pTextNodeInfo.get() != NULL )
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << pTextNodeInfo->toString() << ::std::endl;
 #endif
 
@@ -2333,7 +2331,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
 
     AttrOutput().EndParagraph( pTextNodeInfoInner );
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</OutWW8_SwTxtNode>" << ::std::endl;
 #endif
 }
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 8cd8c64..1dea8ba 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1699,7 +1699,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt,
     xub_StrLen nLen, bool bUnicode, rtl_TextEncoding eChrSet)
 
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<OutSwString>" << ::std::endl;
 #endif
 
@@ -1712,7 +1712,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt,
         {
             String sOut( rStr.Copy( nStt, nLen ) );
             
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
             ::std::clog << ::rtl::OUStringToOString(sOut, RTL_TEXTENCODING_ASCII_US).getStr() << ::std::endl;
 #endif
 
@@ -1723,7 +1723,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt,
         }
         else 
         {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
             ::std::clog << ::rtl::OUStringToOString(rStr, RTL_TEXTENCODING_ASCII_US).getStr() << ::std::endl;
 #endif
 
@@ -1734,7 +1734,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt,
         }
     }
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</OutSwString>" << ::std::endl;    
 #endif
 }
@@ -2206,7 +2206,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
     ww8::TableBoxVector::const_iterator aIt;
     ww8::TableBoxVector::const_iterator aItEnd = pTableBoxes->end();
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     size_t nRowSpans = pRowSpans->size();
     size_t nTableBoxes = pTableBoxes->size();
     (void) nRowSpans;
@@ -2215,7 +2215,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
     
     for( aIt = pTableBoxes->begin(); aIt != aItEnd; ++aIt, ++aItRowSpans)
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         sal_uInt16 npOCount = m_rWW8Export.pO->Count();
 #endif
         
@@ -2243,7 +2243,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
         else
             m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte
         
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << "<tclength>" << m_rWW8Export.pO->Count() - npOCount << "</tclength>" 
                     << ::std::endl;
 #endif
@@ -2436,7 +2436,7 @@ void WW8Export::SectionBreaksAndFrames( const SwTxtNode& rNode )
         OutWW6FlyFrmsInCntnt( rNode );
 }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 struct SwNodeHash
 {
     size_t operator()(SwNode * pNode) const { return reinterpret_cast<size_t>(pNode); }
@@ -2530,14 +2530,14 @@ void MSWordExportBase::WriteText()
         ::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() );
     }
     
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</WriteText>" << ::std::endl;
 #endif
 }
 
 void WW8Export::WriteMainText()
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<WriteMainText>" << ::std::endl;
 #endif
 
@@ -2562,7 +2562,7 @@ void WW8Export::WriteMainText()
     if( pLastNd )
         nLastFmtId = GetId( (SwTxtFmtColl&)pLastNd->GetAnyFmtColl() );
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</WriteMainText>" << ::std::endl;
 #endif
 }
@@ -3681,7 +3681,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
     SVBT16 nStyle;
     ShortToSVBT16( m_rWW8Export.nStyleBeforeFly, nStyle );
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "<OutWW8_TableNodeInfoInner>" << pNodeInfoInner->toString();
 #endif
 
@@ -3713,7 +3713,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
 
     if (pNodeInfoInner->isEndOfCell())
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << "<endOfCell/>" << ::std::endl;
 #endif
         m_rWW8Export.WriteCR(pNodeInfoInner);
@@ -3750,7 +3750,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
 
     if (pNodeInfoInner->isEndOfLine())
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << "<endOfLine/>" << ::std::endl;
 #endif
         TableRowEnd(pNodeInfoInner->getDepth());
@@ -3763,7 +3763,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
         
         m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() );                       // leeren
     }
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</OutWW8_TableNodeInfoInner>" << ::std::endl;
 #endif
 }
@@ -3776,7 +3776,7 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
 
     if (pNodeInfo.get() != NULL)
     {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << pNodeInfo->toString() << ::std::endl;
 #endif
         
@@ -3791,14 +3791,14 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
             ++aIt;
         }
     }
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</OutWW8_SwStartNode>" << ::std::endl;
 #endif
 }
 
 void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 // whoever has need of the missing function should go and implement it!
 // This piece of code always breaks builds...
 //    ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
@@ -3808,7 +3808,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
     
     if (pNodeInfo.get() != NULL)
      {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         ::std::clog << pNodeInfo->toString() << ::std::endl;
 #endif
         
@@ -3822,7 +3822,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
             ++aIt;
          }
      }
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
     ::std::clog << "</OutWW8_SwEndNode>" << ::std::endl;
 #endif
 }
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index adafb3e..2d5eca7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -143,7 +143,7 @@
 
 #include <breakit.hxx>
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
 #include <iostream>
 #include <dbgoutsw.hxx>
 #endif
@@ -2876,7 +2876,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const String& rAddString)
     if (!rAddString.Len())
         return;
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         {
             rtl::OString sText(rtl::OUStringToOString(rAddString, RTL_TEXTENCODING_UTF8));
             ::std::clog <<
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 0d2fefb..8739fe3 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -304,7 +304,7 @@ void SwHHCWrapper::ChangeText( const String &rNewText,
                 {
                     nChgLen = nIndex - nChgPos;
                     nConvChgLen = nPos - nConvChgPos;
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
                     String aInOrig( rOrigText.copy( nChgPos, nChgLen ) );
 #endif
                     String aInNew( rNewText.Copy( nConvChgPos, nConvChgLen ) );
@@ -314,7 +314,7 @@ void SwHHCWrapper::ChangeText( const String &rNewText,
                     OSL_ENSURE( rWrtShell.GetCrsr()->HasMark(), "cursor misplaced (nothing selected)" );
                     rWrtShell.GetCrsr()->GetMark()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex );
                     rWrtShell.GetCrsr()->GetPoint()->nContent.Assign( pStartTxtNode, nChgInNodeStartIndex + nChgLen );
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
                     String aSelTxt1( rWrtShell.GetSelTxt() );
 #endif
 
@@ -369,7 +369,7 @@ void SwHHCWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttrib
         // restore those for the new text
         rWrtShell.GetCurAttr( aItemSet );
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         String aSelTxt1( rWrtShell.GetSelTxt() );
 #endif
         rWrtShell.Delete();
@@ -380,7 +380,7 @@ void SwHHCWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttrib
             rWrtShell.GetCrsr()->SetMark();
         SwPosition *pMark = rWrtShell.GetCrsr()->GetMark();
         pMark->nContent = pMark->nContent.GetIndex() - rNewText.Len();
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         String aSelTxt2( rWrtShell.GetSelTxt() );
 #endif
 
@@ -497,7 +497,7 @@ void SwHHCWrapper::ReplaceUnit(
         pRuby->SetPosition( bRubyBelow );
         pRuby->SetAdjustment( RubyAdjust_CENTER );
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         SwPaM *pPaM = rWrtShell.GetCrsr();
         (void)pPaM;
 #endif
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index f2269e8..d64ecf9 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -166,7 +166,7 @@ LanguageType lcl_CheckLanguage(
         aLangList[2] = rSettings.GetLanguage();
         // en-US
         aLangList[3] = LANGUAGE_ENGLISH_US;
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
         lang::Locale a0( SvxCreateLocale( aLangList[0] ) );
         lang::Locale a1( SvxCreateLocale( aLangList[1] ) );
         lang::Locale a2( SvxCreateLocale( aLangList[2] ) );
@@ -327,9 +327,6 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
     Image aRes;
     OUString aTmp;
     osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
-#if defined(WNT)
-
-#endif
     Graphic aGraphic;
     const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
     if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
-- 
1.7.3.4


--=-iAvezBWnKLi+OT9bpiLr
Content-Disposition: attachment; filename="0002-Remove-unused-debug-function-from-acccontext.cxx.patch"
Content-Type: text/x-patch; name="0002-Remove-unused-debug-function-from-acccontext.cxx.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the LibreOffice mailing list