diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-16 09:25:06 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-16 09:34:00 +0200 |
commit | 7f71e99e3f35e7b94aa426f588276d05bf86bf09 (patch) | |
tree | 2798c5ac5768d2417cccfd1543a36f849c8b5b15 | |
parent | bc9a5f00c60b07d600886b237db2ee4822f0f662 (diff) |
writerfilter: check for DEBUG_DOMAINMAPPER, not OSL_DEBUG_LEVEL explicitly
Previously code only built if DEBUG_DOMAINMAPPER was exactly defined
with OSL_DEBUG_LEVEL was > 1, as they these conditions were used for the
same purpose. Change all this dmapper XML dumping code to consistently
use DEBUG_DOMAINMAPPER, so later it'll be possible to change when it's
defined without breaking the build.
Change-Id: I32442cf098162c7d7c9eb7c454094685ab654b74
-rw-r--r-- | writerfilter/inc/resourcemodel/TagLogger.hxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMapHelper.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMapHelper.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLParserState.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLParserState.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/resourcemodel/TagLogger.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.cxx | 2 |
12 files changed, 16 insertions, 33 deletions
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index 94fc67a3dff0..37a90789761b 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -61,26 +61,20 @@ namespace writerfilter void setFileName(const std::string & filename); void startDocument(); void endDocument(); -#endif -#ifdef DEBUG_DOMAINMAPPER void element(const std::string & name); void unoPropertySet(css::uno::Reference<css::beans::XPropertySet> rPropSet); -#endif -#if OSL_DEBUG_LEVEL > 1 void startElement(const std::string & name); #endif void attribute(const std::string & name, const std::string & value); -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER void attribute(const std::string & name, const OUString & value); void attribute(const std::string & name, sal_uInt32 value); void attribute(const std::string & name, const css::uno::Any aAny); void chars(const std::string & chars); void chars(const OUString & chars); void endElement(); -#endif -#ifdef DEBUG_DOMAINMAPPER void propertySet(writerfilter::Reference<Properties>::Pointer_t props, IdToString::Pointer_t pIdToString); #endif diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 63c44e2dff37..eb420b7ab078 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -48,7 +48,7 @@ namespace dmapper { //--------------------------------------------------- Utility functions -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps ) { sal_Int32 nLen = aProps.getLength( ); @@ -578,7 +578,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, // Get the merged level properties uno::Sequence< beans::PropertyValue > aLvlProps = aProps[sal_Int32( nLevel )]; -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER lcl_printProperties( aLvlProps ); #endif diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 90c7fd0564b2..8f3594cb097c 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -293,7 +293,7 @@ bool PropertyMap::isSet( PropertyIds eId) const return m_vMap.find(eId)!=m_vMap.end(); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER void PropertyMap::dumpXml( const TagLogger::Pointer_t pLogger ) const { pLogger->startElement("PropertyMap"); diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 339f740d3f7c..c496f9788c78 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -172,9 +172,6 @@ public: #ifdef DEBUG_DOMAINMAPPER void printProperties(); -#endif - -#if OSL_DEBUG_LEVEL > 1 virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif static com::sun::star::table::ShadowFormat getShadowFromBorder(com::sun::star::table::BorderLine2 aBorder); diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index 5021922bd658..b35145b75865 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -21,7 +21,7 @@ #include <resourcemodel/TagLogger.hxx> #include "PropertyMapHelper.hxx" -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER namespace writerfilter { namespace dmapper @@ -112,6 +112,6 @@ void lcl_DumpPropertyValueSeqSeq(const TagLogger::Pointer_t pLogger, PropertyVal } } -#endif // OSL_DEBUG_LEVEL > 1 +#endif // DEBUG_DOMAINMAPPER /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index fb3b9857eff7..a92bc10c862f 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER #include "PropertyMap.hxx" #include <com/sun/star/beans/PropertyValues.hpp> @@ -43,7 +43,7 @@ void lcl_DumpPropertyValueSeqSeq(const TagLogger::Pointer_t pLogger, PropertyValueSeqSeq_t & rPropValSeqSeq); } } -#endif // OSL_DEBUG_LEVEL > 1 +#endif // DEBUG_DOMAINMAPPER #endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 634af433bd1f..2a381be889ac 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -57,9 +57,8 @@ using namespace ::com::sun::star; using namespace oox; using namespace ::std; -#if OSL_DEBUG_LEVEL > 1 -static string resourceToString -(OOXMLFastContextHandler::ResourceEnum_t eResource) +#ifdef DEBUG_DOMAINMAPPER +static string resourceToString(OOXMLFastContextHandler::ResourceEnum_t eResource) { string sResult; diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index ae21ac313a25..61d42cdf8daa 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -203,7 +203,7 @@ public: void sendPropertyToParent(); -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif @@ -306,7 +306,7 @@ public: virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) SAL_OVERRIDE; virtual OOXMLPropertySet::Pointer_t getPropertySet() const SAL_OVERRIDE; -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index eae35fabb456..88f0258678bc 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -264,7 +264,7 @@ void OOXMLParserState::endTxbxContent() inTxbxContent = false; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER void OOXMLParserState::dumpXml( const TagLogger::Pointer_t& pLogger ) { pLogger->startElement("parserstate"); diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 89da7888abf4..f3909a0dd82b 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -23,7 +23,7 @@ #include "OOXMLDocumentImpl.hxx" #include "OOXMLPropertySetImpl.hxx" -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER #include <resourcemodel/TagLogger.hxx> #endif @@ -115,7 +115,7 @@ public: void startTxbxContent(); void endTxbxContent(); -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER public: void dumpXml( const TagLogger::Pointer_t& pLogger ); #endif diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index cd3cc655a736..58a904ed6e9a 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -147,9 +147,6 @@ namespace writerfilter endElement( ); } -#endif - -#if OSL_DEBUG_LEVEL > 1 void TagLogger::startElement(const std::string & name) { xmlChar* xmlName = xmlCharStrdup( name.c_str() ); @@ -168,7 +165,7 @@ namespace writerfilter xmlFree( xmlName ); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER void TagLogger::attribute(const std::string & name, const OUString & value) { attribute( name, OUStringToOString( value, RTL_TEXTENCODING_ASCII_US ).getStr() ); @@ -226,9 +223,7 @@ namespace writerfilter { xmlTextWriterEndElement( pWriter ); } -#endif -#ifdef DEBUG_DOMAINMAPPER class PropertySetDumpHandler : public Properties { IdToString::Pointer_t mpIdToString; diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index 25735d9d0580..a2eae60845e9 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -287,10 +287,8 @@ int RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nParam) { if (m_rImport.getDestinationState() == DESTINATION_SKIP) return 0; -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": keyword '\\" << rKeyword.getStr() << "' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam ? nParam : 0) << "'"); -#endif RTFSymbol aSymbol; aSymbol.sKeyword = rKeyword.getStr(); std::vector<RTFSymbol>::iterator low = std::lower_bound(m_aRTFControlWords.begin(), m_aRTFControlWords.end(), aSymbol); |