tdf#91794 OSL_DEBUG_LEVEL > 1 removed in libo/filter module

I replaced the occurences of OSL_DEBUG_LEVEL > 1 with the debug
macro DEBUG_{module}_{area}.

Change-Id: Ibbf7345d3dc43354ff80a8ceafb4a812749513c7
Reviewed-on: https://gerrit.libreoffice.org/22355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
Rohan Kumar
2016-03-03 16:19:27 +05:30
committed by Björn Michaelsen
parent 931d003ade
commit bc504b08f0
5 changed files with 31 additions and 32 deletions

View File

@@ -6373,7 +6373,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
pGrStream = xOut.get(); pGrStream = xOut.get();
} }
#if OSL_DEBUG_LEVEL > 2 #ifdef DEBUG_FILTER_MSDFFIMP
// extract graphics from ole storage into "dbggfxNNN.*" // extract graphics from ole storage into "dbggfxNNN.*"
static sal_Int32 nGrfCount; static sal_Int32 nGrfCount;
@@ -6417,7 +6417,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
sal_Int32 nDbgLen = nLength - nSkip; sal_Int32 nDbgLen = nLength - nSkip;
if ( nDbgLen ) if ( nDbgLen )
{ {
std::std::unique_ptr<sal_Char[]> xDat(new sal_Char[ nDbgLen ]); std::unique_ptr<sal_Char[]> xDat(new sal_Char[ nDbgLen ]);
pGrStream->Read( xDat.get(), nDbgLen ); pGrStream->Read( xDat.get(), nDbgLen );
pDbgOut->Write( xDat.get(), nDbgLen ); pDbgOut->Write( xDat.get(), nDbgLen );
pGrStream->SeekRel( -nDbgLen ); pGrStream->SeekRel( -nDbgLen );
@@ -6936,7 +6936,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
pFilter = aMatch.GetFilter4EA( aType ); pFilter = aMatch.GetFilter4EA( aType );
} }
#if OSL_DEBUG_LEVEL > 2 #ifdef DEBUG_FILTER_MSFILTER
// extract embedded ole streams into "/tmp/embedded_stream_NNN" // extract embedded ole streams into "/tmp/embedded_stream_NNN"
static sal_Int32 nOleCount(0); static sal_Int32 nOleCount(0);
OUString aTmpName("/tmp/embedded_stream_"); OUString aTmpName("/tmp/embedded_stream_");

View File

@@ -160,9 +160,8 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen
return bRes; return bRes;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void void TBBase::indent_printf( FILE* fp, const char* format, ... )
TBBase::indent_printf( FILE* fp, const char* format, ... )
{ {
va_list ap; va_list ap;
va_start ( ap, format ); va_start ( ap, format );
@@ -206,7 +205,7 @@ bool TBCHeader::Read( SvStream &rS )
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void TBCHeader::Print( FILE* fp ) void TBCHeader::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -356,7 +355,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
return true; // just ignore return true; // just ignore
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void TBCData::Print( FILE* fp ) void TBCData::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -407,7 +406,7 @@ TBCExtraInfo::Read( SvStream &rS )
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void void
TBCExtraInfo::Print( FILE* fp ) TBCExtraInfo::Print( FILE* fp )
{ {
@@ -452,7 +451,7 @@ bool TBCGeneralInfo::Read( SvStream &rS )
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSFILTER
void void
TBCGeneralInfo::Print( FILE* fp ) TBCGeneralInfo::Print( FILE* fp )
{ {
@@ -531,7 +530,7 @@ TBCMenuSpecific::Read( SvStream &rS)
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSFILTER
void void
TBCMenuSpecific::Print( FILE* fp ) TBCMenuSpecific::Print( FILE* fp )
{ {
@@ -586,7 +585,7 @@ bool TBCBSpecific::Read( SvStream &rS)
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSFILTER
void TBCBSpecific::Print( FILE* fp ) void TBCBSpecific::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -643,7 +642,7 @@ bool TBCComboDropdownSpecific::Read( SvStream &rS)
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSFILTER
void TBCComboDropdownSpecific::Print( FILE* fp) void TBCComboDropdownSpecific::Print( FILE* fp)
{ {
Indent a; Indent a;
@@ -690,7 +689,7 @@ bool TBCCDData::Read( SvStream &rS)
return wstrEdit.Read( rS ); return wstrEdit.Read( rS );
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSFILTER
void TBCCDData::Print( FILE* fp) void TBCCDData::Print( FILE* fp)
{ {
Indent a; Indent a;
@@ -726,7 +725,7 @@ bool TBCBitMap::Read( SvStream& rS)
return ReadDIB(mBitMap, rS, false, true); return ReadDIB(mBitMap, rS, false, true);
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void TBCBitMap::Print( FILE* fp ) void TBCBitMap::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -760,7 +759,7 @@ bool TB::IsEnabled()
return ( bFlags & 0x01 ) != 0x01; return ( bFlags & 0x01 ) != 0x01;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void TB::Print( FILE* fp ) void TB::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -790,7 +789,7 @@ bool TBVisualData::Read( SvStream& rS )
return true; return true;
} }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void SRECT::Print( FILE* fp ) void SRECT::Print( FILE* fp )
{ {
Indent a; Indent a;
@@ -801,7 +800,7 @@ void SRECT::Print( FILE* fp )
} }
#endif #endif
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
void TBVisualData::Print( FILE* fp ) void TBVisualData::Print( FILE* fp )
{ {
Indent a; Indent a;

View File

@@ -2076,7 +2076,7 @@ static void writeOfficeStyles( StateMap&
} }
#if OSL_DEBUG_LEVEL > 2 #ifdef DEBUG_FILTER_SVGREADER
struct DumpingVisitor struct DumpingVisitor
{ {
void operator()( const uno::Reference<xml::dom::XElement>& xElem ) void operator()( const uno::Reference<xml::dom::XElement>& xElem )
@@ -2114,7 +2114,7 @@ struct DumpingVisitor
static void dumpTree( const uno::Reference<xml::dom::XElement> xElem ) static void dumpTree( const uno::Reference<xml::dom::XElement> xElem )
{ {
DumpingVisitor aVisitor; DumpingVisitor aVisitor;
visitElements(aVisitor, xElem); visitElements(aVisitor, xElem, STYLE_ANNOTATOR);
} }
#endif #endif
@@ -2284,7 +2284,7 @@ bool SVGReader::parseAndConvert()
annotateStyles(aStatePool,aStateMap,aInitialState, annotateStyles(aStatePool,aStateMap,aInitialState,
xDocElem,m_xDocumentHandler,maUseElementVector); xDocElem,m_xDocumentHandler,maUseElementVector);
#if OSL_DEBUG_LEVEL > 2 #ifdef DEBUG_FILTER_SVGREADER
dumpTree(xDocElem); dumpTree(xDocElem);
#endif #endif

View File

@@ -294,7 +294,7 @@ namespace XSLT
xsltTransformContextPtr tcontext = nullptr; xsltTransformContextPtr tcontext = nullptr;
exsltRegisterAll(); exsltRegisterAll();
registerExtensionModule(); registerExtensionModule();
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_LIBXSLTTRANSFORMER
xsltSetGenericDebugFunc(stderr, NULL); xsltSetGenericDebugFunc(stderr, NULL);
xsltDebugDumpExtensions(NULL); xsltDebugDumpExtensions(NULL);
#endif #endif

View File

@@ -21,8 +21,8 @@
#include <tools/stream.hxx> #include <tools/stream.hxx>
#include <vcl/bitmap.hxx> #include <vcl/bitmap.hxx>
class TBCHeader;
class TBCHeader;
class MSOCommandConvertor class MSOCommandConvertor
{ {
@@ -70,7 +70,7 @@ class MSFILTER_DLLPUBLIC TBBase
friend class Indent; friend class Indent;
static int nIndent; // num spaces to indent before printing static int nIndent; // num spaces to indent before printing
protected: protected:
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
static void indent_printf(FILE* fp, const char* format, ... ); static void indent_printf(FILE* fp, const char* format, ... );
#endif #endif
sal_uInt32 nOffSet; // usually for debug we can store the offset in the stream to this record sal_uInt32 nOffSet; // usually for debug we can store the offset in the stream to this record
@@ -79,7 +79,7 @@ public:
virtual ~TBBase(){} virtual ~TBBase(){}
virtual bool Read(SvStream &rS) = 0; virtual bool Read(SvStream &rS) = 0;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output
#endif #endif
sal_uInt32 GetOffset() { return nOffSet; } sal_uInt32 GetOffset() { return nOffSet; }
@@ -127,7 +127,7 @@ public:
TBCExtraInfo(); TBCExtraInfo();
virtual ~TBCExtraInfo(){} virtual ~TBCExtraInfo(){}
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
OUString getOnAction(); OUString getOnAction();
@@ -161,7 +161,7 @@ public:
TBCBitMap(); TBCBitMap();
virtual ~TBCBitMap(); virtual ~TBCBitMap();
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
// #FIXME Const-ness // #FIXME Const-ness
@@ -275,7 +275,7 @@ public:
bool isVisible() { return !( bFlagsTCR & 0x1 ); } bool isVisible() { return !( bFlagsTCR & 0x1 ); }
bool isBeginGroup() { return ( bFlagsTCR & 0x2 ) != 0; } bool isBeginGroup() { return ( bFlagsTCR & 0x2 ) != 0; }
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
sal_uInt32 getTbct() { return tbct; }; sal_uInt32 getTbct() { return tbct; };
@@ -292,7 +292,7 @@ public:
TBCData( const TBCHeader& Header ); TBCData( const TBCHeader& Header );
virtual ~TBCData(){} virtual ~TBCData(){}
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar ); bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
@@ -314,7 +314,7 @@ public:
TB(); TB();
virtual ~TB(){} virtual ~TB(){}
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
sal_Int16 getcCL(){ return cCL; } sal_Int16 getcCL(){ return cCL; }
@@ -332,7 +332,7 @@ public:
sal_Int16 right; sal_Int16 right;
sal_Int16 bottom; sal_Int16 bottom;
bool Read( SvStream &rS ) override { rS.ReadInt16( left ).ReadInt16( top ).ReadInt16( right ).ReadInt16( bottom ); return true; } bool Read( SvStream &rS ) override { rS.ReadInt16( left ).ReadInt16( top ).ReadInt16( right ).ReadInt16( bottom ); return true; }
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* fo ) override; virtual void Print( FILE* fo ) override;
#endif #endif
}; };
@@ -352,7 +352,7 @@ public:
TBVisualData(); TBVisualData();
virtual ~TBVisualData(){} virtual ~TBVisualData(){}
bool Read(SvStream &rS) override; bool Read(SvStream &rS) override;
#if OSL_DEBUG_LEVEL > 1 #ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override; virtual void Print( FILE* ) override;
#endif #endif
}; };