diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2016-03-07 19:42:54 +0530 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-03-08 14:06:04 +0000 |
commit | 6326d76101857e94f241dc671c3e3a2a7bf9b031 (patch) | |
tree | 176df057e17b065ebee33ddf980fab90c31501f1 /unotools/source/config/fontcfg.cxx | |
parent | ea3151acb4915e56c702e4edfa92a9b571c3d104 (diff) |
tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals
Updates pointed by Sweet5hark
Change-Id: I747e92ca9ee39a027b1e9b27b131f249a33b77db
Reviewed-on: https://gerrit.libreoffice.org/22980
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'unotools/source/config/fontcfg.cxx')
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index e310b6ae5f88..62913d19785e 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -32,10 +32,6 @@ #include <osl/diagnose.h> #include <sal/macros.h> -#if OSL_DEBUG_LEVEL > 1 -#include <stdio.h> -#endif - #include <string.h> #include <list> #include <algorithm> @@ -143,12 +139,8 @@ DefaultFontConfiguration::DefaultFontConfiguration() catch (const WrappedTargetException&) { } - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "config provider: %s, config access: %s\n", - m_xConfigProvider.is() ? "true" : "false", - m_xConfigAccess.is() ? "true" : "false" - ); - #endif + SAL_INFO("unotools.config", "config provider: " << static_cast<bool>(m_xConfigProvider.is()) + << ", config access: " << static_cast<bool>(m_xConfigAccess.is())); } DefaultFontConfiguration::~DefaultFontConfiguration() @@ -400,12 +392,8 @@ FontSubstConfiguration::FontSubstConfiguration() : m_xConfigProvider.clear(); m_xConfigAccess.clear(); } - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "config provider: %s, config access: %s\n", - m_xConfigProvider.is() ? "true" : "false", - m_xConfigAccess.is() ? "true" : "false" - ); - #endif + SAL_WARN("unotools.config", "config provider: " << static_cast<bool>(m_xConfigProvider.is()) + << ", config access: " << static_cast<bool>(m_xConfigAccess.is())); } /* @@ -937,11 +925,7 @@ FontWeight FontSubstConfiguration::getSubstWeight( const css::uno::Reference< XN if( pLine->equalsIgnoreAsciiCaseAscii( pWeightNames[weight].pName ) ) break; } -#if OSL_DEBUG_LEVEL > 1 - if( weight < 0 ) - fprintf( stderr, "Error: invalid weight %s\n", - OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif + SAL_WARN_IF(weight < 0, "unotools.config", "Error: invalid weight " << *pLine); } } catch (const NoSuchElementException&) @@ -969,11 +953,7 @@ FontWidth FontSubstConfiguration::getSubstWidth( const css::uno::Reference< XNam if( pLine->equalsIgnoreAsciiCaseAscii( pWidthNames[width].pName ) ) break; } -#if OSL_DEBUG_LEVEL > 1 - if( width < 0 ) - fprintf( stderr, "Error: invalid width %s\n", - OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif + SAL_WARN_IF( width < 0, "unotools.config", "Error: invalid width " << *pLine); } } catch (const NoSuchElementException&) @@ -1072,10 +1052,7 @@ void FontSubstConfiguration::readLocaleSubst( const OUString& rBcp47 ) const } if( ! xFont.is() ) { - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "did not get font attributes for %s\n", - OUStringToOString( pFontNames[i], RTL_TEXTENCODING_UTF8 ).getStr() ); - #endif + SAL_WARN("unotools.config", "did not get font attributes for " << pFontNames[i]); continue; } |