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


Hi,

Attached hereto are 3 patches:
- 0001 replaces #ifdef DEBUG with #if OSL_DEBUG_LEVEL > 1
- 0002 removes unused (most probably) debug function from acccontext.cxx
- 0003 removes debug.hxx includes from several files in writer/sw. There
are stil a few debug.hxx left as there are some macros from other repos
used therein that contain DBG_ASSERT.

Hope you'll find it useful. As always LGPL3+/MPL.

Jacek
From 14c35419426a941b96eed4890f6e2e6f37af6382 Mon Sep 17 00:00:00 2001
From: Jacek Wolszczak <shutdownrunner@gmail.com>
Date: Tue, 10 May 2011 09:56:23 +0200
Subject: [PATCH 1/3] Replace #ifdef DEBUG with #if OSL_DEBUG_LEVEL > 1

---
 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

From f549260cedb9cc718884de3a22501f277a672db5 Mon Sep 17 00:00:00 2001
From: Jacek Wolszczak <shutdownrunner@gmail.com>
Date: Tue, 10 May 2011 10:00:52 +0200
Subject: [PATCH 2/3] Remove unused debug function from acccontext.cxx

---
 sw/source/core/access/acccontext.cxx |  104 ----------------------------------
 1 files changed, 0 insertions(+), 104 deletions(-)

diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index d3b1a90..6f7eb82 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -28,15 +28,6 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
-#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
-    #ifndef _STRING_HXX
-    #include <tools/string.hxx>
-    #endif
-
-    #ifndef _STREAM_HXX
-    #include <tools/stream.hxx>
-    #endif
-#endif // #if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
 #include <tools/debug.hxx>
 #include <vcl/window.hxx>
 #include <swtypes.hxx>
@@ -67,28 +58,6 @@
 #include <PostItMgr.hxx>
 
 using namespace sw::access;
-
-#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
-#define DBG_MSG( _msg ) \
-    lcl_SwAccessibleContext_DbgMsg( this, _msg, 0, sal_False );
-#define DBG_MSG_CD( _msg ) \
-    lcl_SwAccessibleContext_DbgMsg( this, _msg, 0, sal_True );
-#define DBG_MSG_PARAM( _msg, _param ) \
-    lcl_SwAccessibleContext_DbgMsg( this, _msg, _param, sal_False );
-#define DBG_MSG_THIS_PARAM( _msg, _this, _param ) \
-    lcl_SwAccessibleContext_DbgMsg( _this, _msg, _param, sal_False );
-
-void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
-                                     const char *pMsg,
-                                     SwAccessibleContext *pChildAcc,
-                                       sal_Bool bConstrDestr );
-#else
-#define DBG_MSG( _msg )
-#define DBG_MSG_PARAM( _msg, _param )
-#define DBG_MSG_THIS_PARAM( _msg, _this, _param )
-#define DBG_MSG_CD( _msg )
-#endif
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 using ::rtl::OUString;
@@ -363,7 +332,6 @@ void SwAccessibleContext::ScrolledIn()
         aEvent.NewValue <<= xThis;
 
         xParentImpl->FireAccessibleEvent( aEvent );
-        DBG_MSG_PARAM( "AccessibleChild (added)", xChildImpl.get() );
 
         if( HasCursor() )
         {
@@ -501,7 +469,6 @@ void SwAccessibleContext::FireVisibleDataEvent()
     aEvent.EventId = AccessibleEventId::VISIBLE_DATA_CHANGED;
 
     FireAccessibleEvent( aEvent );
-    DBG_MSG( "AccessibleVisibleData" )
 }
 
 void SwAccessibleContext::FireStateChangedEvent( sal_Int16 nState,
@@ -516,7 +483,6 @@ void SwAccessibleContext::FireStateChangedEvent( sal_Int16 nState,
         aEvent.OldValue <<= nState;
 
     FireAccessibleEvent( aEvent );
-    DBG_MSG( "StateChanged" )
 }
 
 void SwAccessibleContext::GetStates(
@@ -569,14 +535,11 @@ SwAccessibleContext::SwAccessibleContext( SwAccessibleMap *pM,
     , bRegisteredAtAccessibleMap( true )
 {
     InitStates();
-    DBG_MSG_CD( "constructed" )
 }
 
 SwAccessibleContext::~SwAccessibleContext()
 {
     SolarMutexGuard aGuard;
-
-    DBG_MSG_CD( "destructed" )
     RemoveFrmFromAccessibleMap();
 }
 
@@ -749,8 +712,6 @@ void SAL_CALL SwAccessibleContext::addEventListener(
             const uno::Reference< XAccessibleEventListener >& xListener )
         throw (uno::RuntimeException)
 {
-    DBG_MSG( "accessible event listener added" )
-
     if (xListener.is())
     {
         SolarMutexGuard aGuard;
@@ -764,8 +725,6 @@ void SAL_CALL SwAccessibleContext::removeEventListener(
             const uno::Reference< XAccessibleEventListener >& xListener )
         throw (uno::RuntimeException)
 {
-    DBG_MSG( "accessible event listener removed" )
-
     if (xListener.is())
     {
         SolarMutexGuard aGuard;
@@ -1102,7 +1061,6 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive )
         aEvent.EventId = AccessibleEventId::CHILD;
         aEvent.OldValue <<= xThis;
         pAcc->FireAccessibleEvent( aEvent );
-        DBG_MSG_THIS_PARAM( "AccessibleChild (removed)", pAcc, this )
     }
 
     // set defunc state (its not required to broadcast a state changed
@@ -1117,7 +1075,6 @@ void SwAccessibleContext::Dispose( sal_Bool bRecursive )
     {
         comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( nClientId, *this );
         nClientId =  0;
-        DBG_MSG_CD( "dispose" )
     }
 
     RemoveFrmFromAccessibleMap();
@@ -1517,65 +1474,4 @@ void SwAccessibleContext::GetAdditionalAccessibleChildren( std::vector< 
Window*
     }
 }
 
-#if (OSL_DEBUG_LEVEL > 1) && defined TEST_MIB
-void lcl_SwAccessibleContext_DbgMsg( SwAccessibleContext *pThisAcc,
-                                     const char *pMsg,
-                                     SwAccessibleContext *pChildAcc,
-                                       sal_Bool bConstrDestr )
-{
-    static SvFileStream aStrm( String::CreateFromAscii("j:\\acc.log"),
-                    STREAM_WRITE|STREAM_TRUNC|STREAM_SHARE_DENYNONE    );
-    ByteString aName( String(pThisAcc->GetName()),
-                      RTL_TEXTENCODING_ISO_8859_1 );
-    if( aName.Len() )
-    {
-        aStrm << aName.GetBuffer()
-              << ": ";
-    }
-    aStrm << pMsg;
-    if( pChildAcc )
-    {
-        ByteString aChild( String(pChildAcc->GetName()),
-                           RTL_TEXTENCODING_ISO_8859_1 );
-        aStrm << ": "
-              << aChild.GetBuffer();
-    }
-    aStrm << "\r\n    (";
-
-    if( !bConstrDestr )
-    {
-        ByteString aDesc( String(pThisAcc->getAccessibleDescription()),
-                           RTL_TEXTENCODING_ISO_8859_1 );
-        aStrm << aDesc.GetBuffer()
-              << ", ";
-    }
-
-    Rectangle aVisArea( pThisAcc->GetVisArea() );
-    aStrm << "VA: "
-          << ByteString::CreateFromInt32( aVisArea.Left() ).GetBuffer()
-          << ","
-          << ByteString::CreateFromInt32( aVisArea.Top() ).GetBuffer()
-          << ","
-          << ByteString::CreateFromInt32( aVisArea.GetWidth() ).GetBuffer()
-          << ","
-          << ByteString::CreateFromInt32( aVisArea.GetHeight() ).GetBuffer();
-
-    if( pThisAcc->GetFrm() )
-    {
-        Rectangle aBounds( pThisAcc->GetBounds( pThisAcc->GetFrm() ) );
-        aStrm << ", BB: "
-              << ByteString::CreateFromInt32( aBounds.Left() ).GetBuffer()
-              << ","
-              << ByteString::CreateFromInt32( aBounds.Top() ).GetBuffer()
-              << ","
-              << ByteString::CreateFromInt32( aBounds.GetWidth() ).GetBuffer()
-              << ","
-              << ByteString::CreateFromInt32( aBounds.GetHeight() ).GetBuffer()
-              << ")\r\n";
-    }
-
-    aStrm.Flush();
-}
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.3.4

From d6314ef8294769ffc953e75a5e95f16516e6c9f8 Mon Sep 17 00:00:00 2001
From: Jacek Wolszczak <shutdownrunner@gmail.com>
Date: Tue, 10 May 2011 12:18:03 +0200
Subject: [PATCH 3/3] Remove #include <tools/debug.hxx> in writer/sw

---
 sw/inc/PostItMgr.hxx                         |    1 -
 sw/inc/accmap.hxx                            |    1 -
 sw/inc/fldbas.hxx                            |    2 --
 sw/inc/pch/precompiled_sw.hxx                |    1 -
 sw/qa/core/bigpointerarray-new.hxx           |    2 --
 sw/source/core/access/acccontext.cxx         |    1 -
 sw/source/core/access/accmap.cxx             |    2 --
 sw/source/core/access/accportions.cxx        |    1 -
 sw/source/core/access/accselectionhelper.cxx |    1 -
 sw/source/core/doc/SwStyleNameMapper.cxx     |    1 -
 sw/source/core/text/wrong.cxx                |    1 -
 sw/source/core/tox/toxhlp.cxx                |    1 -
 sw/source/core/unocore/swunohelper.cxx       |    1 -
 sw/source/core/unocore/unoidx.cxx            |    1 -
 sw/source/core/unocore/unoprnms.cxx          |    1 -
 sw/source/core/unocore/unoredlines.cxx       |    1 -
 sw/source/core/view/printdata.cxx            |    1 -
 sw/source/core/view/vprint.cxx               |    1 -
 sw/source/filter/html/parcss1.cxx            |    1 -
 sw/source/filter/writer/wrtswtbl.cxx         |    1 -
 sw/source/filter/ww1/w1class.hxx             |    1 -
 sw/source/filter/ww8/hash_wrap.hxx           |    1 -
 sw/source/filter/ww8/needed_cast.hxx         |    1 -
 sw/source/filter/ww8/sortedarray.hxx         |    1 -
 sw/source/filter/ww8/styles.cxx              |    1 -
 sw/source/filter/ww8/ww8scan.cxx             |    1 -
 sw/source/filter/xml/xmlbrsh.cxx             |    1 -
 sw/source/filter/xml/xmlitem.cxx             |    1 -
 28 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 905dc4f..e459581 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -34,7 +34,6 @@
 #include <editeng/outlobj.hxx>
 #include <tools/string.hxx>
 #include <tools/link.hxx>
-#include <tools/debug.hxx>
 #include <swrect.hxx>
 #include <unotools/configitem.hxx>
 #include <unotools/options.hxx>
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 0bffbcb..315ba24 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -34,7 +34,6 @@
 #include <osl/mutex.hxx>
 #include <svx/IAccessibleViewForwarder.hxx>
 #include <svx/IAccessibleParent.hxx>
-#include <tools/debug.hxx>
 #include <tools/fract.hxx>
 
 #include <vector>
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 23ce783..baa1bc0 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -29,7 +29,6 @@
 #define SW_FLDBAS_HXX
 
 #include <i18npool/lang.h>
-#include <tools/debug.hxx>
 #include <tools/string.hxx>
 #include "swdllapi.h"
 #include <calbck.hxx>
@@ -237,7 +236,6 @@ String  FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat);
 // Instances of SwFields and those derived from it occur 0 to n times.
 // For each class there is one instance of the associated type class.
 // Base class of all field types is SwFieldType.
-DBG_NAMEEX(SwFieldType)
 
 class SW_DLLPUBLIC SwFieldType : public SwModify
 {
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 63fef81..a976f6d 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -844,7 +844,6 @@
 #include "tools/color.hxx"
 #include "tools/date.hxx"
 #include "tools/datetime.hxx"
-#include "tools/debug.hxx"
 #include "tools/errcode.hxx"
 #include "tools/errinf.hxx"
 #include "tools/fract.hxx"
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
index 0c835a0..b48a815 100644
--- a/sw/qa/core/bigpointerarray-new.hxx
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -30,8 +30,6 @@
 #define _BPARR_HXX
 
 #include <tools/solar.h>
-#include <tools/debug.hxx>
-
 #include <deque>
 
 class BigPtrArray;
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 6f7eb82..bbb07c6 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -28,7 +28,6 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
 #include <vcl/window.hxx>
 #include <swtypes.hxx>
 
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index c552e67..2a6c725 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -35,8 +35,6 @@
 #include <vcl/window.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/unomod.hxx>
-#include <tools/debug.hxx>
-
 #include <map>
 #include <list>
 #include <accmap.hxx>
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index efd6c67..4bc211f 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -29,7 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #include "accportions.hxx"
-#include <tools/debug.hxx>
 #include <rtl/ustring.hxx>
 #include <com/sun/star/i18n/Boundary.hpp>
 #include <txttypes.hxx>
diff --git a/sw/source/core/access/accselectionhelper.cxx 
b/sw/source/core/access/accselectionhelper.cxx
index 85cfd2c..799560c 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -39,7 +39,6 @@
 #include <viewsh.hxx>
 #include <fesh.hxx>
 #include <vcl/svapp.hxx>        // for SolarMutex
-#include <tools/debug.hxx>
 #include <flyfrm.hxx>
 
 
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index e27a6ba..ac79022 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -36,7 +36,6 @@
 #include <tools/resmgr.hxx>
 #include <poolfmt.hxx>
 #include <rcid.hrc>
-#include <tools/debug.hxx>
 #ifdef _NEED_TO_DEBUG_MAPPING
 #include <stdlib.h>
 #endif
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 9bc25b2..1599fec 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -31,7 +31,6 @@
 
 
 #include <tools/string.hxx>
-#include <tools/debug.hxx>
 #include "swtypes.hxx"
 #include "txttypes.hxx"
 
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 0dd7661..6af7312 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -34,7 +34,6 @@
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
 #include <tools/string.hxx>
-#include <tools/debug.hxx>
 #include <toxwrap.hxx>
 
 using namespace ::com::sun::star;
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 162716d..498541f 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -44,7 +44,6 @@
 #include <comphelper/types.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/datetime.hxx>
-#include <tools/debug.hxx>
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/contentbroker.hxx>
 #include <ucbhelper/content.hxx>
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 25b84ca..dabc4ec 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -37,7 +37,6 @@
 #include <com/sun/star/text/BibliographyDataField.hpp>
 #include <com/sun/star/text/XTextDocument.hpp>
 
-#include <tools/debug.hxx>
 #include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 #include <editeng/unolingu.hxx>
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 493c2d0..8001606 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -28,7 +28,6 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
 #include <svl/itemprop.hxx>
 #include <unoprnms.hxx>
 
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index d977f2f..e2f4c75 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -31,7 +31,6 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 
-#include <tools/debug.hxx>
 #include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index b594109..35a979f 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -42,7 +42,6 @@
 #include <svl/languageoptions.hxx>
 #include <toolkit/awt/vclxdevice.hxx>
 #include <tools/string.hxx>
-#include <tools/debug.hxx>
 #include <tools/resary.hxx>
 #include <unotools/moduleoptions.hxx>
 #include <vcl/outdev.hxx>
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index f1a3794..ad9251a 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -44,7 +44,6 @@
 #include <editeng/pbinitem.hxx>
 #include <svx/svdview.hxx>
 #include <toolkit/awt/vclxdevice.hxx>
-#include <tools/debug.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <unotools/moduleoptions.hxx>
 #include <unotools/syslocale.hxx>
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 2472562..6dc1138 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -34,7 +34,6 @@
 #include <stdio.h>
 #include <limits.h>
 #include <rtl/ustrbuf.hxx>
-#include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
 #include <svtools/htmltokn.h>
 
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 6cdc136..b1333fa 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -29,7 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #include <hintids.hxx>
-#include <tools/debug.hxx>
 #include <editeng/boxitem.hxx>
 #include <editeng/brshitem.hxx>
 #include <tools/fract.hxx>
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index 073ec06..87a057b 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -26,7 +26,6 @@
  *
  ************************************************************************/
 #include <tools/string.hxx>
-#include <tools/debug.hxx>
 
 // local
 #include <w1struct.hxx>
diff --git a/sw/source/filter/ww8/hash_wrap.hxx b/sw/source/filter/ww8/hash_wrap.hxx
index 348d2ef..52be41a 100644
--- a/sw/source/filter/ww8/hash_wrap.hxx
+++ b/sw/source/filter/ww8/hash_wrap.hxx
@@ -32,7 +32,6 @@
 #define WW_HASH_WRAP_HXX
 
 #include <boost/unordered_set.hpp>
-#include <tools/debug.hxx>
 
 //simple wrapper around boost::unordered_set to behave like sorted array
 namespace ww
diff --git a/sw/source/filter/ww8/needed_cast.hxx b/sw/source/filter/ww8/needed_cast.hxx
index 4a8c23c..462e6d0 100644
--- a/sw/source/filter/ww8/needed_cast.hxx
+++ b/sw/source/filter/ww8/needed_cast.hxx
@@ -29,7 +29,6 @@
 #ifndef WW_NEEDED_CAST_HXX
 #define WW_NEEDED_CAST_HXX
 
-#include <tools/debug.hxx>
 #include "staticassert.hxx"
 
 namespace ww
diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx
index 6fccf66..f76646c 100644
--- a/sw/source/filter/ww8/sortedarray.hxx
+++ b/sw/source/filter/ww8/sortedarray.hxx
@@ -30,7 +30,6 @@
 #define WW_SORTEDARRAY_HXX
 
 #include <algorithm>
-#include <tools/debug.hxx>
 
 //simple template that manages a static [] array by sorting at construction
 
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index 1dde32e..ff11be6 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -35,7 +35,6 @@
 #include <algorithm>                //std::find_if
 #include <tools/string.hxx>         //do we have to...
 
-#include <tools/debug.hxx>
 #include "staticassert.hxx"      //StaticAssert
 
 namespace
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index a99e489..baa2ee1 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -49,7 +49,6 @@
 #endif                      // dump
 #include <comphelper/processfactory.hxx>
 #include <unotools/localedatawrapper.hxx>
-#include <tools/debug.hxx>
 #include <i18npool/lang.h>
 #include <editeng/unolingu.hxx>
 #include <vcl/svapp.hxx>    // Application  #i90932#
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index cfe911e..fc9be6b 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -32,7 +32,6 @@
 
 
 #include "hintids.hxx"
-#include <tools/debug.hxx>
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <editeng/memberids.hrc>
 
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index 6f5cf67..c94f27f 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -28,7 +28,6 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
-#include <tools/debug.hxx>
 #include <xmloff/xmlimp.hxx>
 #include "xmlimpit.hxx"
 #include "xmlitem.hxx"
-- 
1.7.3.4


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.