From 622db59048fbcc04a9ff950c2a2bcdd458c7df87 Mon Sep 17 00:00:00 2001 From: Jacek Wolszczak Date: Tue, 10 May 2011 09:56:23 +0200 Subject: Replace #ifdef DEBUG with #if OSL_DEBUG_LEVEL > 1 --- 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 +--- 17 files changed, 77 insertions(+), 82 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index 4444a713ea78..a5cd9a50a343 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 #include diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 85a90d2565e3..e38602d62035 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 eb7da4af366c..075d106e71b0 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 9c734a153190..34fc1954f6a2 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 c307692b0b1e..570b3c6f19c9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -78,7 +78,7 @@ #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 #include #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 > 1 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 5b580a91ffff..5efd90f1c0d9 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 54d494565e57..b9dde8e57ef0 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 ea953c0e21ca..236d67ca4808 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 8c9a05b5a9d6..b6583d01b143 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 3b411a9b4cc9..7d56e22b66c6 100644 --- a/sw/source/filter/ww8/WW8Sttbf.cxx +++ b/sw/source/filter/ww8/WW8Sttbf.cxx @@ -31,7 +31,7 @@ #include "WW8Sttbf.hxx" #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 #include #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 c4170b74dbc6..fbce5dc2fb63 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 += ""; @@ -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 << "" << toString() << "" << ::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 << "" << toString() << "" << ::std::endl; #endif @@ -409,7 +409,7 @@ void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable) pInner->setFirstInTable(bFirstInTable); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << toString() << "" << ::std::endl; #endif @@ -422,7 +422,7 @@ void WW8TableNodeInfo::setVertMerge(bool bVertMerge) pInner->setVertMerge(bVertMerge); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << toString() << "" << ::std::endl; #endif @@ -442,7 +442,7 @@ void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext) { mpNext = pNext; -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << toString() << "" << pNext->toString() << "" << ::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 << "" << ::std::endl; @@ -627,7 +627,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable) while (!bDone); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::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 << "" << ::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 << "" << ::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 << "" << ::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 << "" << ::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 << "" << ::std::endl; #endif @@ -757,7 +757,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, } } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::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 << "" << ::std::endl; #endif @@ -852,7 +852,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable, } } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::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 << "" << ::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 << "" << ::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 << "" << rCellInfo.toString() << "" diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 453c0a724d4b..ba3be68d8237 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 1f02450dd00d..58b347cac24c 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 << "" << ::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 @@ -2328,7 +2326,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) AttrOutput().EndParagraph( pTextNodeInfoInner ); -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::std::endl; #endif } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 892b2d45bfe1..92c0d16024f2 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 << "" << ::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 << "" << ::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 << "" << m_rWW8Export.pO->Count() - npOCount << "" << ::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(pNode); } @@ -2530,14 +2530,14 @@ void MSWordExportBase::WriteText() ::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() ); } -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::std::endl; #endif } void WW8Export::WriteMainText() { -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 ::std::clog << "" << ::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 << "" << ::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 << "" << 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 << "" << ::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 << "" << ::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 << "" << ::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 << "" << ::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 << "" << 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 << "" << ::std::endl; #endif } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index bd398803523c..7ea4c0d9092a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -143,7 +143,7 @@ #include -#ifdef DEBUG +#if OSL_DEBUG_LEVEL > 1 #include #include #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 715d7c2f1851..1eddd5a149ac 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 e01ecfdfb9ec..550b706e2ee6 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 ) ) -- cgit