diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-15 22:13:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-15 22:14:18 +0200 |
commit | cf1c3b5c5ae7f691cbd7330f49713d65822f1c1f (patch) | |
tree | facafa44aea6ecec85323ba4dc17ec1553a245d6 /writerfilter | |
parent | 0aa5a03af925276f011cd9de0b30b3760f656c8b (diff) |
writerfilter: call to SAL_WARN() is not expensive
So guards like '#if OSL_DEBUG_LEVEL > 0' around it can be dropped in
most cases. Also, dumping the hex value of token IDs no longer makes
sense, now that doctok is gone.
Change-Id: I2c0d466e4bdde63d271a83aa4e7eebb52294e363
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/inc/resourcemodel/TableManager.hxx | 7 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 16 |
5 files changed, 10 insertions, 49 deletions
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index bdb65040238c..02700d86362a 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -31,9 +31,7 @@ #include "util.hxx" #include "TagLogger.hxx" -#if OSL_DEBUG_LEVEL > 0 -# include <rtl/strbuf.hxx> -#endif +#include <rtl/strbuf.hxx> namespace writerfilter { @@ -1047,10 +1045,7 @@ void TableManager<T, PropertiesPointer>::resolveCurrentTable() } catch (css::uno::Exception const& e) { - (void) e; -#if OSL_DEBUG_LEVEL > 0 SAL_WARN("writerfilter", "resolving of current table failed with: " << e.Message); -#endif } } resetTableProps(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d1aec8544a8e..01101c2d6bed 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1022,19 +1022,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "val", sStringValue); break; default: - { -#if OSL_DEBUG_LEVEL > 0 - OString sMessage("DomainMapper::attribute() - Id: "); - sMessage += OString::number( nName, 10 ); - sMessage += " / 0x"; - sMessage += OString::number( nName, 16 ); - sMessage += " value: "; - sMessage += OString::number( nIntValue, 10 ); - sMessage += " / 0x"; - sMessage += OString::number( nIntValue, 16 ); - SAL_WARN("writerfilter", sMessage.getStr()); -#endif - } + SAL_WARN("writerfilter", "DomainMapper::lcl_attribute: unhandled token: " << nName); } } diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index c44ac4163c28..7562c01f7f19 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1122,13 +1122,7 @@ void GraphicImport::lcl_sprm(Sprm& rSprm) } break; default: -#if OSL_DEBUG_LEVEL > 0 - OString sMessage( "GraphicImport::sprm() - Id: "); - sMessage += OString::number( nSprmId, 10 ); - sMessage += " / 0x"; - sMessage += OString::number( nSprmId, 16 ); - SAL_WARN("writerfilter", sMessage.getStr()); -#endif + SAL_WARN("writerfilter", "GraphicImport::lcl_sprm: unhandled token: " << nSprmId); break; } } diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 2bafbb6c00e9..63c44e2dff37 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -809,19 +809,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal ) m_pCurrentNumPicBullet->SetId(rVal.getString().toInt32()); break; default: - { -#if OSL_DEBUG_LEVEL > 0 - OString sMessage( "ListTable::attribute() - Id: "); - sMessage += OString::number( nName, 10 ); - sMessage += " / 0x"; - sMessage += OString::number( nName, 16 ); - sMessage += " value: "; - sMessage += OString::number( nIntValue, 10 ); - sMessage += " / 0x"; - sMessage += OString::number( nIntValue, 16 ); - SAL_WARN("writerfilter", sMessage.getStr()); -#endif - } + SAL_WARN("writerfilter", "ListsManager::lcl_attribute: unhandled token: " << nName); } } diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index a8a8a8ddb57c..bd408146e11b 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1174,19 +1174,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) catch( const lang::WrappedTargetException& rWrapped) { (void) rWrapped; - OString aMessage("Some style properties could not be set"); -#if OSL_DEBUG_LEVEL > 0 +#ifdef DEBUG_DOMAINMAPPER + OUString aMessage("StyleSheetTable::ApplyStyleSheets: Some style properties could not be set"); beans::UnknownPropertyException aUnknownPropertyException; - if( rWrapped.TargetException >>= aUnknownPropertyException ) - { - aMessage += ": "; - OString sTemp; - aUnknownPropertyException.Message.convertToString(&sTemp, RTL_TEXTENCODING_ASCII_US, 0 ); - aMessage += sTemp; - } + if (rWrapped.TargetException >>= aUnknownPropertyException) + aMessage += ": " + aUnknownPropertyException.Message; + + SAL_WARN("writerfilter", aMessage); #endif - SAL_WARN("writerfilter", aMessage.getStr()); } catch( const uno::Exception& ) { |