writerfilter/inc/resourcemodel/TagLogger.hxx | 8 +------- writerfilter/source/dmapper/NumberingManager.cxx | 4 ++-- writerfilter/source/dmapper/PropertyMap.cxx | 2 +- writerfilter/source/dmapper/PropertyMap.hxx | 3 --- writerfilter/source/dmapper/PropertyMapHelper.cxx | 4 ++-- writerfilter/source/dmapper/PropertyMapHelper.hxx | 4 ++-- writerfilter/source/dmapper/WrapPolygonHandler.cxx | 8 ++------ writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 5 ++--- writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 4 ++-- writerfilter/source/ooxml/OOXMLParserState.cxx | 2 +- writerfilter/source/ooxml/OOXMLParserState.hxx | 4 ++-- writerfilter/source/ooxml/factoryinc.py | 6 +++--- writerfilter/source/resourcemodel/TagLogger.cxx | 7 +------ writerfilter/source/rtftok/rtftokenizer.cxx | 2 -- 14 files changed, 21 insertions(+), 42 deletions(-)
New commits: commit 7f71e99e3f35e7b94aa426f588276d05bf86bf09 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Oct 16 09:25:06 2014 +0200 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 diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index 94fc67a..37a9078 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 63c44e2..eb420b7 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 90c7fd0..8f3594c 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 339f740..c496f97 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 5021922..b35145b 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 fb3b985..a92bc10 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 634af43..2a381be 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 ae21ac3..61d42cd 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 eae35fa..88f0258 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 89da788..f3909a0 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 cd3cc65..58a904e 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 25735d9..a2eae60 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); commit bc9a5f00c60b07d600886b237db2ee4822f0f662 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Oct 16 09:14:39 2014 +0200 writerfilter: fix include guard Change-Id: I8c5c8a4e8fbb6e6a2e955c4f544786a2256e6342 diff --git a/writerfilter/source/ooxml/factoryinc.py b/writerfilter/source/ooxml/factoryinc.py index f29462d..e4300b2 100644 --- a/writerfilter/source/ooxml/factoryinc.py +++ b/writerfilter/source/ooxml/factoryinc.py @@ -14,8 +14,8 @@ import sys def createInclude(model): print(""" -#ifndef OOXML_FACTORY_GENERATED_HXX -#define OOXML_FACTORY_GENERATED_HXX +#ifndef INCLUDED_OOXML_FACTORY_GENERATED_HXX +#define INCLUDED_OOXML_FACTORY_GENERATED_HXX namespace writerfilter { namespace ooxml { @@ -40,7 +40,7 @@ namespace ooxml { print("""/// @endcond }} -#endif // OOXML_FACTORY_GENERATED_HXX""") +#endif // INCLUDED_OOXML_FACTORY_GENERATED_HXX""") modelPath = sys.argv[1] commit 12389025b5a7bb6e1ee572e05fd258cd8e8efddb Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Oct 16 09:11:49 2014 +0200 DEBUG_WRAP_POLYGON_HANDLER would be never defined Change-Id: I24e1379d136122906deddd298e456728b3be0956 diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx index 73989b6..2cc86dc 100644 --- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx +++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx @@ -155,9 +155,7 @@ void WrapPolygonHandler::lcl_attribute(Id Name, Value & val) mnY = nIntValue; break; default: -#ifdef DEBUG_WRAP_POLYGON_HANDLER - dmapper_logger->element("unhandled"); -#endif + SAL_WARN("writerfilter", "WrapPolygonHandler::lcl_attribute: unhandled token: " << Name); break; } } @@ -176,9 +174,7 @@ void WrapPolygonHandler::lcl_sprm(Sprm & _sprm) } break; default: -#ifdef DEBUG_WRAP_POLYGON_HANDLER - dmapper_logger->element("unhandled"); -#endif + SAL_WARN("writerfilter", "WrapPolygonHandler::lcl_sprm: unhandled token: " << _sprm.getId()); break; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits