summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-03-07 19:42:54 +0530
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2016-03-08 14:06:04 +0000
commit6326d76101857e94f241dc671c3e3a2a7bf9b031 (patch)
tree176df057e17b065ebee33ddf980fab90c31501f1
parentea3151acb4915e56c702e4edfa92a9b571c3d104 (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>
-rw-r--r--unotools/source/config/fontcfg.cxx37
-rw-r--r--unotools/source/config/fontoptions.cxx6
-rw-r--r--unotools/source/config/localisationoptions.cxx8
-rw-r--r--unotools/source/config/securityoptions.cxx8
4 files changed, 18 insertions, 41 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;
}
diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx
index ad6fa0b8ff90..9214987a4506 100644
--- a/unotools/source/config/fontoptions.cxx
+++ b/unotools/source/config/fontoptions.cxx
@@ -182,9 +182,9 @@ void SvtFontOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtFontOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\Font\\View\\ShowFontBoxWYSIWYG\"?" );
seqValues[nProperty] >>= m_bFontWYSIWYG;
}
- #if OSL_DEBUG_LEVEL > 1
- else DBG_ASSERT( sal_False, "SvtFontOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n" );
- #endif
+#if OSL_DEBUG_LEVEL > 0
+ else assert(false && "SvtFontOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n");
+#endif
}
}
diff --git a/unotools/source/config/localisationoptions.cxx b/unotools/source/config/localisationoptions.cxx
index 1ca612afb753..609577af010e 100644
--- a/unotools/source/config/localisationoptions.cxx
+++ b/unotools/source/config/localisationoptions.cxx
@@ -166,10 +166,10 @@ void SvtLocalisationOptions_Impl::Notify( const Sequence< OUString >& seqPropert
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Localisation\\DialogScale\"?" );
seqValues[nProperty] >>= m_nDialogScale;
}
- #if OSL_DEBUG_LEVEL > 1
- else DBG_ASSERT( sal_False, "SvtLocalisationOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n" );
- #endif
- }
+#if OSL_DEBUG_LEVEL > 0
+ else assert(false && "SvtLocalisationOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n");
+#endif
+ }
NotifyListeners(0);
}
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 5660442b0d0e..59de838a005d 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -399,11 +399,11 @@ void SvtSecurityOptions_Impl::SetProperty( sal_Int32 nProperty, const Any& rValu
break;
// xmlsec05 deprecated
- #if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
default:
- DBG_ASSERT( false, "SvtSecurityOptions_Impl::SetProperty()\nUnknown property!\n" );
- #endif
- }
+ assert(false && "SvtSecurityOptions_Impl::SetProperty()\nUnknown property!\n");
+#endif
+ }
}
void SvtSecurityOptions_Impl::LoadAuthors()