tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I replaced OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 in most of the files as suggested in easy hack Change-Id: I2c46dfd9de2ae965680494146120ea3c7530cc98 Reviewed-on: https://gerrit.libreoffice.org/23012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
committed by
Björn Michaelsen
parent
5c1234eac2
commit
ea3151acb4
@@ -468,7 +468,7 @@ bool checkDocChecksum( const OUString& rInPDFFileURL,
|
|||||||
|
|
||||||
// compare the contents
|
// compare the contents
|
||||||
bRet = (0 == memcmp( nActualChecksum, nTestChecksum, sizeof( nActualChecksum ) ));
|
bRet = (0 == memcmp( nActualChecksum, nTestChecksum, sizeof( nActualChecksum ) ));
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
OSL_TRACE( "test checksum: " );
|
OSL_TRACE( "test checksum: " );
|
||||||
for( unsigned int i = 0; i < sizeof(nTestChecksum); i++ )
|
for( unsigned int i = 0; i < sizeof(nTestChecksum); i++ )
|
||||||
OSL_TRACE( "%.2X", int(nTestChecksum[i]) );
|
OSL_TRACE( "%.2X", int(nTestChecksum[i]) );
|
||||||
|
@@ -1302,7 +1302,7 @@ PDFFileImplData* PDFFile::impl_getData() const
|
|||||||
PDFString* pStr = dynamic_cast<PDFString*>(pArr->m_aSubElements[0]);
|
PDFString* pStr = dynamic_cast<PDFString*>(pArr->m_aSubElements[0]);
|
||||||
if( pStr )
|
if( pStr )
|
||||||
m_pData->m_aDocID = pStr->getFilteredString();
|
m_pData->m_aDocID = pStr->getFilteredString();
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
OUString aTmp;
|
OUString aTmp;
|
||||||
for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ )
|
for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ )
|
||||||
aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16);
|
aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16);
|
||||||
@@ -1364,7 +1364,7 @@ PDFFileImplData* PDFFile::impl_getData() const
|
|||||||
OString aEnt = pString->getFilteredString();
|
OString aEnt = pString->getFilteredString();
|
||||||
if( aEnt.getLength() == 32 )
|
if( aEnt.getLength() == 32 )
|
||||||
memcpy( m_pData->m_aOEntry, aEnt.getStr(), 32 );
|
memcpy( m_pData->m_aOEntry, aEnt.getStr(), 32 );
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OUString aTmp;
|
OUString aTmp;
|
||||||
@@ -1384,7 +1384,7 @@ PDFFileImplData* PDFFile::impl_getData() const
|
|||||||
OString aEnt = pString->getFilteredString();
|
OString aEnt = pString->getFilteredString();
|
||||||
if( aEnt.getLength() == 32 )
|
if( aEnt.getLength() == 32 )
|
||||||
memcpy( m_pData->m_aUEntry, aEnt.getStr(), 32 );
|
memcpy( m_pData->m_aUEntry, aEnt.getStr(), 32 );
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OUString aTmp;
|
OUString aTmp;
|
||||||
|
@@ -547,20 +547,20 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
boost::spirit::parse_info<const char*> aInfo =
|
boost::spirit::parse_info<const char*> aInfo =
|
||||||
#endif
|
#endif
|
||||||
boost::spirit::parse( pBuffer,
|
boost::spirit::parse( pBuffer,
|
||||||
pBuffer+nLen,
|
pBuffer+nLen,
|
||||||
aGrammar,
|
aGrammar,
|
||||||
boost::spirit::space_p );
|
boost::spirit::space_p );
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop = " << aInfo.stop << " (buff=" << pBuffer << ", offset = " << aInfo.stop - pBuffer << "), hit = " << (aInfo.hit ? OUString("true") : OUString("false")) << ", full = " << (aInfo.full ? OUString("true") : OUString("false")) << ", length = " << (int)aInfo.length );
|
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop = " << aInfo.stop << " (buff=" << pBuffer << ", offset = " << aInfo.stop - pBuffer << "), hit = " << (aInfo.hit ? OUString("true") : OUString("false")) << ", full = " << (aInfo.full ? OUString("true") : OUString("false")) << ", length = " << (int)aInfo.length );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
catch( const parser_error<const char*, const char*>& rError )
|
catch( const parser_error<const char*, const char*>& rError )
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
OString aTmp;
|
OString aTmp;
|
||||||
unsigned int nElem = aGrammar.m_aObjectStack.size();
|
unsigned int nElem = aGrammar.m_aObjectStack.size();
|
||||||
for( unsigned int i = 0; i < nElem; i++ )
|
for( unsigned int i = 0; i < nElem; i++ )
|
||||||
@@ -577,7 +577,7 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
|
|||||||
pRet = aGrammar.m_aObjectStack.back();
|
pRet = aGrammar.m_aObjectStack.back();
|
||||||
aGrammar.m_aObjectStack.pop_back();
|
aGrammar.m_aObjectStack.pop_back();
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
else if( nEntries > 1 )
|
else if( nEntries > 1 )
|
||||||
SAL_WARN("sdext.pdfimport.pdfparse", "error got " << nEntries << " stack objects in parse" );
|
SAL_WARN("sdext.pdfimport.pdfparse", "error got " << nEntries << " stack objects in parse" );
|
||||||
#endif
|
#endif
|
||||||
@@ -623,21 +623,21 @@ PDFEntry* PDFReader::read( const char* pFileName )
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
boost::spirit::parse_info< file_iterator<> > aInfo =
|
boost::spirit::parse_info< file_iterator<> > aInfo =
|
||||||
#endif
|
#endif
|
||||||
boost::spirit::parse( file_start,
|
boost::spirit::parse( file_start,
|
||||||
file_end,
|
file_end,
|
||||||
aGrammar,
|
aGrammar,
|
||||||
boost::spirit::space_p );
|
boost::spirit::space_p );
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop at offset = " << aInfo.stop - file_start << ", hit = " << (aInfo.hit ? "true" : "false") << ", full = " << (aInfo.full ? "true" : "false") << ", length = " << aInfo.length);
|
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop at offset = " << aInfo.stop - file_start << ", hit = " << (aInfo.hit ? "true" : "false") << ", full = " << (aInfo.full ? "true" : "false") << ", length = " << aInfo.length);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
catch( const parser_error< const char*, file_iterator<> >& rError )
|
catch( const parser_error< const char*, file_iterator<> >& rError )
|
||||||
{
|
{
|
||||||
SAL_WARN("sdext.pdfimport.pdfparse", "parse error: " << rError.descriptor << " at buffer pos " << rError.where - file_start);
|
SAL_WARN("sdext.pdfimport.pdfparse", "parse error: " << rError.descriptor << " at buffer pos " << rError.where - file_start);
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
OUString aTmp;
|
OUString aTmp;
|
||||||
unsigned int nElem = aGrammar.m_aObjectStack.size();
|
unsigned int nElem = aGrammar.m_aObjectStack.size();
|
||||||
for( unsigned int i = 0; i < nElem; i++ )
|
for( unsigned int i = 0; i < nElem; i++ )
|
||||||
@@ -658,7 +658,7 @@ PDFEntry* PDFReader::read( const char* pFileName )
|
|||||||
pRet = aGrammar.m_aObjectStack.back();
|
pRet = aGrammar.m_aObjectStack.back();
|
||||||
aGrammar.m_aObjectStack.pop_back();
|
aGrammar.m_aObjectStack.pop_back();
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
else if( nEntries > 1 )
|
else if( nEntries > 1 )
|
||||||
{
|
{
|
||||||
SAL_WARN("sdext.pdfimport.pdfparse", "error got " << nEntries << " stack objects in parse");
|
SAL_WARN("sdext.pdfimport.pdfparse", "error got " << nEntries << " stack objects in parse");
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <cppuhelper/exc_hlp.hxx>
|
#include <cppuhelper/exc_hlp.hxx>
|
||||||
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
|
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
#include <osl/file.hxx>
|
#include <osl/file.hxx>
|
||||||
static osl::File* pStream = NULL;
|
static osl::File* pStream = NULL;
|
||||||
static int nIndent = 0;
|
static int nIndent = 0;
|
||||||
@@ -49,7 +49,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
|
|||||||
catch( xml::sax::SAXException& )
|
catch( xml::sax::SAXException& )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
static const char* pDir = getenv( "DBG_PDFIMPORT_DIR" );
|
static const char* pDir = getenv( "DBG_PDFIMPORT_DIR" );
|
||||||
if( pDir )
|
if( pDir )
|
||||||
{
|
{
|
||||||
@@ -80,7 +80,7 @@ SaxEmitter::~SaxEmitter()
|
|||||||
catch( xml::sax::SAXException& )
|
catch( xml::sax::SAXException& )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
if( pStream )
|
if( pStream )
|
||||||
{
|
{
|
||||||
pStream->close();
|
pStream->close();
|
||||||
@@ -102,7 +102,7 @@ void SaxEmitter::beginTag( const char* pTag, const PropertyMap& rProperties )
|
|||||||
catch( xml::sax::SAXException& )
|
catch( xml::sax::SAXException& )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
if( pStream )
|
if( pStream )
|
||||||
{
|
{
|
||||||
sal_uInt64 nWritten = 0;
|
sal_uInt64 nWritten = 0;
|
||||||
@@ -136,7 +136,7 @@ void SaxEmitter::write( const OUString& rText )
|
|||||||
catch( xml::sax::SAXException& )
|
catch( xml::sax::SAXException& )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
if( pStream )
|
if( pStream )
|
||||||
{
|
{
|
||||||
OString aStr( OUStringToOString( rText, RTL_TEXTENCODING_UTF8 ) );
|
OString aStr( OUStringToOString( rText, RTL_TEXTENCODING_UTF8 ) );
|
||||||
@@ -156,7 +156,7 @@ void SaxEmitter::endTag( const char* pTag )
|
|||||||
catch( xml::sax::SAXException& )
|
catch( xml::sax::SAXException& )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
if( pStream )
|
if( pStream )
|
||||||
{
|
{
|
||||||
sal_uInt64 nWritten = 0;
|
sal_uInt64 nWritten = 0;
|
||||||
|
@@ -90,7 +90,7 @@ void Element::updateGeometryWith( const Element* pMergeFrom )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
void Element::emitStructure( int nLevel)
|
void Element::emitStructure( int nLevel)
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ void PolyPolyElement::visitedBy( ElementTreeVisitor& rV
|
|||||||
rVisitor.visit( *this, rParentIt);
|
rVisitor.visit( *this, rParentIt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
void PolyPolyElement::emitStructure( int nLevel)
|
void PolyPolyElement::emitStructure( int nLevel)
|
||||||
{
|
{
|
||||||
OSL_TRACE( "%*s<%s %p>", nLevel, "", typeid( *this ).name(), this );
|
OSL_TRACE( "%*s<%s %p>", nLevel, "", typeid( *this ).name(), this );
|
||||||
|
@@ -93,7 +93,7 @@ namespace pdfi
|
|||||||
/// Union element geometry with given element
|
/// Union element geometry with given element
|
||||||
void updateGeometryWith( const Element* pMergeFrom );
|
void updateGeometryWith( const Element* pMergeFrom );
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
// xxx refac TODO: move code to visitor
|
// xxx refac TODO: move code to visitor
|
||||||
virtual void emitStructure( int nLevel );
|
virtual void emitStructure( int nLevel );
|
||||||
#endif
|
#endif
|
||||||
@@ -217,7 +217,7 @@ namespace pdfi
|
|||||||
|
|
||||||
void updateGeometry();
|
void updateGeometry();
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
virtual void emitStructure( int nLevel );
|
virtual void emitStructure( int nLevel );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -542,7 +542,7 @@ void PDFIProcessor::startPage( const geometry::RealSize2D& rSize )
|
|||||||
void PDFIProcessor::emit( XmlEmitter& rEmitter,
|
void PDFIProcessor::emit( XmlEmitter& rEmitter,
|
||||||
const TreeVisitorFactory& rVisitorFactory )
|
const TreeVisitorFactory& rVisitorFactory )
|
||||||
{
|
{
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
m_pDocument->emitStructure( 0 );
|
m_pDocument->emitStructure( 0 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter,
|
|||||||
startIndicator( " " );
|
startIndicator( " " );
|
||||||
m_pDocument->visitedBy( *optimizingVisitor, std::list<Element*>::const_iterator());
|
m_pDocument->visitedBy( *optimizingVisitor, std::list<Element*>::const_iterator());
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
m_pDocument->emitStructure( 0 );
|
m_pDocument->emitStructure( 0 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1568,7 +1568,7 @@ Sequence<css::beans::PropertyValue> SAL_CALL
|
|||||||
{
|
{
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 0
|
||||||
OSL_TRACE("PresenterAccessible::AccessibleParagraph::getCharacterAttributes at %p,%d returns empty set\r",
|
OSL_TRACE("PresenterAccessible::AccessibleParagraph::getCharacterAttributes at %p,%d returns empty set\r",
|
||||||
this,nIndex);
|
this,nIndex);
|
||||||
for (sal_Int32 nAttributeIndex(0),nAttributeCount(rRequestedAttributes.getLength());
|
for (sal_Int32 nAttributeIndex(0),nAttributeCount(rRequestedAttributes.getLength());
|
||||||
|
Reference in New Issue
Block a user