summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/commontools/RowFunctionParser.cxx8
-rw-r--r--slideshow/source/engine/smilfunctionparser.cxx11
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx7
3 files changed, 4 insertions, 22 deletions
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index dd7d05f03900..cada6eeb03e2 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -23,6 +23,7 @@
// But watch out, the parser might have
// state not visible to this code!
#define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
+
#if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL)
#include <typeinfo>
#define BOOST_SPIRIT_DEBUG
@@ -385,7 +386,6 @@ private:
ParserContextSharedPtr mpParserContext; // might get modified during parsing
};
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
const ParserContextSharedPtr& getParserContext()
{
static ParserContextSharedPtr lcl_parserContext( new ParserContext() );
@@ -397,7 +397,7 @@ const ParserContextSharedPtr& getParserContext()
return lcl_parserContext;
}
-#endif
+
}
std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& _sFunction)
@@ -413,13 +413,9 @@ std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& _
ParserContextSharedPtr pContext;
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
// static parser context, because the actual
// Spirit parser is also a static object
pContext = getParserContext();
-#else
- pContext.reset( new ParserContext() );
-#endif
ExpressionGrammar aExpressionGrammer( pContext );
diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx
index 8cfea83efc17..f2ca8c3bc024 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -35,6 +35,7 @@
// But watch out, the parser might have
// state not visible to this code!
#define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
+
#if defined(DBG_UTIL)
#include <typeinfo>
#define BOOST_SPIRIT_DEBUG
@@ -511,7 +512,6 @@ namespace slideshow
ParserContextSharedPtr mpParserContext; // might get modified during parsing
};
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
const ParserContextSharedPtr& getParserContext()
{
static ParserContextSharedPtr lcl_parserContext( new ParserContext() );
@@ -523,7 +523,6 @@ namespace slideshow
return lcl_parserContext;
}
-#endif
}
std::shared_ptr<ExpressionNode> SmilFunctionParser::parseSmilValue( const OUString& rSmilValue,
@@ -540,13 +539,9 @@ namespace slideshow
ParserContextSharedPtr pContext;
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
// static parser context, because the actual
// Spirit parser is also a static object
pContext = getParserContext();
-#else
- pContext.reset( new ParserContext() );
-#endif
pContext->maShapeBounds = rRelativeShapeBounds;
pContext->mbParseAnimationFunction = false; // parse with '$' disabled
@@ -589,13 +584,9 @@ namespace slideshow
ParserContextSharedPtr pContext;
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
// static parser context, because the actual
// Spirit parser is also a static object
pContext = getParserContext();
-#else
- pContext.reset( new ParserContext() );
-#endif
pContext->maShapeBounds = rRelativeShapeBounds;
pContext->mbParseAnimationFunction = true; // parse with '$' enabled
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 0fff90ae9392..d8d5758383e0 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -28,6 +28,7 @@
// state not visible to this code!
#define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
+
#if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL)
#define BOOST_SPIRIT_DEBUG
#endif
@@ -1087,7 +1088,6 @@ private:
ParserContextSharedPtr mpParserContext; // might get modified during parsing
};
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
const ParserContextSharedPtr& getParserContext()
{
static ParserContextSharedPtr lcl_parserContext( new ParserContext() );
@@ -1099,7 +1099,6 @@ const ParserContextSharedPtr& getParserContext()
return lcl_parserContext;
}
-#endif
}
@@ -1119,13 +1118,9 @@ std::shared_ptr<ExpressionNode> FunctionParser::parseFunction( const OUString& r
ParserContextSharedPtr pContext;
-#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
// static parser context, because the actual
// Spirit parser is also a static object
pContext = getParserContext();
-#else
- pContext.reset( new ParserContext() );
-#endif
pContext->mpCustoShape = &rCustoShape;
ExpressionGrammar aExpressionGrammer( pContext );