[Libreoffice-commits] core.git: filter/source include/filter
Rohan Kumar
rohankanojia420 at gmail.com
Tue Apr 5 12:10:05 UTC 2016
filter/source/msfilter/msdffimp.cxx | 6 ++--
filter/source/msfilter/mstoolbar.cxx | 29 +++++++++++-------------
filter/source/svg/svgreader.cxx | 6 ++--
filter/source/xsltfilter/LibXSLTTransformer.cxx | 2 -
include/filter/msfilter/mstoolbar.hxx | 20 ++++++++--------
5 files changed, 31 insertions(+), 32 deletions(-)
New commits:
commit bc504b08f008b1813a29bb90c226340407c2077b
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date: Thu Mar 3 16:19:27 2016 +0530
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 at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 85955a4..c8fd4dc 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6373,7 +6373,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
pGrStream = xOut.get();
}
-#if OSL_DEBUG_LEVEL > 2
+#ifdef DEBUG_FILTER_MSDFFIMP
// extract graphics from ole storage into "dbggfxNNN.*"
static sal_Int32 nGrfCount;
@@ -6417,7 +6417,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
sal_Int32 nDbgLen = nLength - nSkip;
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 );
pDbgOut->Write( xDat.get(), nDbgLen );
pGrStream->SeekRel( -nDbgLen );
@@ -6936,7 +6936,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
pFilter = aMatch.GetFilter4EA( aType );
}
-#if OSL_DEBUG_LEVEL > 2
+#ifdef DEBUG_FILTER_MSFILTER
// extract embedded ole streams into "/tmp/embedded_stream_NNN"
static sal_Int32 nOleCount(0);
OUString aTmpName("/tmp/embedded_stream_");
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 1a7df47..9367e78 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -160,9 +160,8 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen
return bRes;
}
-#if OSL_DEBUG_LEVEL > 1
-void
-TBBase::indent_printf( FILE* fp, const char* format, ... )
+#ifdef DEBUG_FILTER_MSTOOLBAR
+void TBBase::indent_printf( FILE* fp, const char* format, ... )
{
va_list ap;
va_start ( ap, format );
@@ -206,7 +205,7 @@ bool TBCHeader::Read( SvStream &rS )
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void TBCHeader::Print( FILE* fp )
{
Indent a;
@@ -356,7 +355,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
return true; // just ignore
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void TBCData::Print( FILE* fp )
{
Indent a;
@@ -407,7 +406,7 @@ TBCExtraInfo::Read( SvStream &rS )
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void
TBCExtraInfo::Print( FILE* fp )
{
@@ -452,7 +451,7 @@ bool TBCGeneralInfo::Read( SvStream &rS )
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSFILTER
void
TBCGeneralInfo::Print( FILE* fp )
{
@@ -531,7 +530,7 @@ TBCMenuSpecific::Read( SvStream &rS)
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSFILTER
void
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 )
{
Indent a;
@@ -643,7 +642,7 @@ bool TBCComboDropdownSpecific::Read( SvStream &rS)
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSFILTER
void TBCComboDropdownSpecific::Print( FILE* fp)
{
Indent a;
@@ -690,7 +689,7 @@ bool TBCCDData::Read( SvStream &rS)
return wstrEdit.Read( rS );
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSFILTER
void TBCCDData::Print( FILE* fp)
{
Indent a;
@@ -726,7 +725,7 @@ bool TBCBitMap::Read( SvStream& rS)
return ReadDIB(mBitMap, rS, false, true);
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void TBCBitMap::Print( FILE* fp )
{
Indent a;
@@ -760,7 +759,7 @@ bool TB::IsEnabled()
return ( bFlags & 0x01 ) != 0x01;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void TB::Print( FILE* fp )
{
Indent a;
@@ -790,7 +789,7 @@ bool TBVisualData::Read( SvStream& rS )
return true;
}
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void SRECT::Print( FILE* fp )
{
Indent a;
@@ -801,7 +800,7 @@ void SRECT::Print( FILE* fp )
}
#endif
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
void TBVisualData::Print( FILE* fp )
{
Indent a;
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 8feb4bf..4dcde82 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -2076,7 +2076,7 @@ static void writeOfficeStyles( StateMap&
}
-#if OSL_DEBUG_LEVEL > 2
+#ifdef DEBUG_FILTER_SVGREADER
struct DumpingVisitor
{
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 )
{
DumpingVisitor aVisitor;
- visitElements(aVisitor, xElem);
+ visitElements(aVisitor, xElem, STYLE_ANNOTATOR);
}
#endif
@@ -2284,7 +2284,7 @@ bool SVGReader::parseAndConvert()
annotateStyles(aStatePool,aStateMap,aInitialState,
xDocElem,m_xDocumentHandler,maUseElementVector);
-#if OSL_DEBUG_LEVEL > 2
+#ifdef DEBUG_FILTER_SVGREADER
dumpTree(xDocElem);
#endif
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 1cb6fa7..4ec2c2a 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -294,7 +294,7 @@ namespace XSLT
xsltTransformContextPtr tcontext = nullptr;
exsltRegisterAll();
registerExtensionModule();
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_LIBXSLTTRANSFORMER
xsltSetGenericDebugFunc(stderr, NULL);
xsltDebugDumpExtensions(NULL);
#endif
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 9daa89b..c6b3920 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -21,8 +21,8 @@
#include <tools/stream.hxx>
#include <vcl/bitmap.hxx>
-class TBCHeader;
+class TBCHeader;
class MSOCommandConvertor
{
@@ -70,7 +70,7 @@ class MSFILTER_DLLPUBLIC TBBase
friend class Indent;
static int nIndent; // num spaces to indent before printing
protected:
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
static void indent_printf(FILE* fp, const char* format, ... );
#endif
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 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
#endif
sal_uInt32 GetOffset() { return nOffSet; }
@@ -127,7 +127,7 @@ public:
TBCExtraInfo();
virtual ~TBCExtraInfo(){}
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
OUString getOnAction();
@@ -161,7 +161,7 @@ public:
TBCBitMap();
virtual ~TBCBitMap();
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
// #FIXME Const-ness
@@ -275,7 +275,7 @@ public:
bool isVisible() { return !( bFlagsTCR & 0x1 ); }
bool isBeginGroup() { return ( bFlagsTCR & 0x2 ) != 0; }
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
sal_uInt32 getTbct() { return tbct; };
@@ -292,7 +292,7 @@ public:
TBCData( const TBCHeader& Header );
virtual ~TBCData(){}
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
@@ -314,7 +314,7 @@ public:
TB();
virtual ~TB(){}
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
sal_Int16 getcCL(){ return cCL; }
@@ -332,7 +332,7 @@ public:
sal_Int16 right;
sal_Int16 bottom;
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;
#endif
};
@@ -352,7 +352,7 @@ public:
TBVisualData();
virtual ~TBVisualData(){}
bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_FILTER_MSTOOLBAR
virtual void Print( FILE* ) override;
#endif
};
More information about the Libreoffice-commits
mailing list