No need to have SAL_INFOs inside OSL_DEBUG_LEVEL checks
Also, use the operator<< functionality added in 3f5392c19676a7274a9c9f6e4406c6ab98eab7ad. Change-Id: I4ae24d2c45e818d9a1b04f2d8e5660c39c71bcdd
This commit is contained in:
parent
1d171331cd
commit
f6afad4c7b
@ -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",
|
||||
|
@ -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: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user