diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-02-14 20:27:32 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-02-14 21:21:29 +0200 |
commit | f6afad4c7bc0e77ec374a7bf1cd4b97a66921b1c (patch) | |
tree | dc85e7d90bdbfeb94d80d6327de55e85991c10bd /svx | |
parent | 1d171331cd65017f0a4de167a1e3e9a56304dac1 (diff) |
No need to have SAL_INFOs inside OSL_DEBUG_LEVEL checks
Also, use the operator<< functionality added in
3f5392c19676a7274a9c9f6e4406c6ab98eab7ad.
Change-Id: I4ae24d2c45e818d9a1b04f2d8e5660c39c71bcdd
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 8 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 32 |
2 files changed, 1 insertions, 39 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 011a4ac5952c..e4254fb5a245 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -854,15 +854,11 @@ double EnhancedCustomShape2d::GetAdjustValueAsDouble( const sal_Int32 nIndex ) c double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) const { double fNumber = 0.0; -#if OSL_DEBUG_LEVEL > 0 static sal_uInt32 nLevel = 0; -#endif if ( nIndex < (sal_Int32)vNodesSharedPtr.size() ) { if ( vNodesSharedPtr[ nIndex ].get() ) { -#if OSL_DEBUG_LEVEL > 0 nLevel ++; -#endif try { if ( vEquationResults[ nIndex ].bReady ) @@ -877,19 +873,15 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) if ( !rtl::math::isFinite( fNumber ) ) fNumber = 0.0; -#if OSL_DEBUG_LEVEL > 0 SAL_INFO("svx", "equation " << nLevel << " (level: " << seqEquations[nIndex] << "): " << fNumber << " --> " << 180.0*fNumber/10800000.0); -#endif } } catch ( ... ) { SAL_WARN("svx", "EnhancedCustomShape2d::GetEquationValueAsDouble failed"); } -#if OSL_DEBUG_LEVEL > 0 nLevel --; -#endif } SAL_INFO( "svx", diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 8c5fa8ae806a..0fff90ae9392 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -29,14 +29,10 @@ #define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE #if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL) -#include <typeinfo> #define BOOST_SPIRIT_DEBUG #endif #include <boost/spirit/include/classic_core.hpp> -#if (OSL_DEBUG_LEVEL > 0) -#include <iostream> -#endif #include <functional> #include <algorithm> #include <stack> @@ -224,29 +220,8 @@ public: } virtual double operator()() const override { -#if OSL_DEBUG_LEVEL > 0 - const char *funcName; - - switch (meFunct) { - case ExpressionFunct::EnumPi : funcName = "pi"; break; - case ExpressionFunct::EnumLeft : funcName = "left"; break; - case ExpressionFunct::EnumTop : funcName = "top"; break; - case ExpressionFunct::EnumRight : funcName = "right"; break; - case ExpressionFunct::EnumBottom : funcName = "bottom"; break; - case ExpressionFunct::EnumXStretch : funcName = "xstretch"; break; - case ExpressionFunct::EnumYStretch : funcName = "ystretch"; break; - case ExpressionFunct::EnumHasStroke : funcName = "hasstroke"; break; - case ExpressionFunct::EnumHasFill : funcName = "hasfill"; break; - case ExpressionFunct::EnumWidth : funcName = "width"; break; - case ExpressionFunct::EnumHeight : funcName = "height"; break; - case ExpressionFunct::EnumLogWidth : funcName = "logwidth"; break; - case ExpressionFunct::EnumLogHeight : funcName = "logheight"; break; - default: funcName = "???"; break; - } - - SAL_INFO("svx", funcName << " --> " << mrCustoShape.GetEnumFunc(meFunct) << "(angle: " << + SAL_INFO("svx", meFunct << " --> " << mrCustoShape.GetEnumFunc(meFunct) << "(angle: " << 180.0 * mrCustoShape.GetEnumFunc(meFunct) / 10800000.0 << ")"); -#endif return mrCustoShape.GetEnumFunc( meFunct ); } @@ -1160,10 +1135,6 @@ std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& r aExpressionGrammer >> ::boost::spirit::end_p, ::boost::spirit::space_p ) ); -#if (OSL_DEBUG_LEVEL > 0) - ::std::cout.flush(); // needed to keep stdout and cout in sync -#endif - // input fully congested by the parser? if( !aParseInfo.full ) throw ParseError( "EnhancedCustomShapeFunctionParser::parseFunction(): string not fully parseable" ); @@ -1177,7 +1148,6 @@ std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& r return pContext->maOperandStack.top(); } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |