connectivity/source/commontools/RowFunctionParser.cxx         |    8 --
 include/svx/EnhancedCustomShape2d.hxx                         |    7 -
 slideshow/source/engine/smilfunctionparser.cxx                |   11 --
 svx/source/customshapes/EnhancedCustomShape2d.cxx             |    8 --
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |   39 ----------
 5 files changed, 6 insertions(+), 67 deletions(-)

New commits:
commit 9d29d3dad4e944182b2fad6e58bd1cd02aa0a8fd
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Feb 14 20:32:18 2017 +0200

    BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE has been defined forever in these files
    
    Change-Id: I0afa1b404192f44540aa318e748452e0328fac6b

diff --git a/connectivity/source/commontools/RowFunctionParser.cxx 
b/connectivity/source/commontools/RowFunctionParser.cxx
index dd7d05f..cada6ee 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 8cfea83..f2ca8c3 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 0fff90a..d8d5758 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 );
commit f6afad4c7bc0e77ec374a7bf1cd4b97a66921b1c
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Feb 14 20:27:32 2017 +0200

    No need to have SAL_INFOs inside OSL_DEBUG_LEVEL checks
    
    Also, use the operator<< functionality added in
    3f5392c19676a7274a9c9f6e4406c6ab98eab7ad.
    
    Change-Id: I4ae24d2c45e818d9a1b04f2d8e5660c39c71bcdd

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 011a4ac..e4254fb 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 8c5fa8a..0fff90a 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: */
commit 1d171331cd65017f0a4de167a1e3e9a56304dac1
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Feb 14 20:16:30 2017 +0200

    Bin unneeded forward declarations
    
    Change-Id: Ic1224311fbab77c7bb21a502dfa4af9506ddfd75

diff --git a/include/svx/EnhancedCustomShape2d.hxx 
b/include/svx/EnhancedCustomShape2d.hxx
index ee1d0e4..26a9c86 100644
--- a/include/svx/EnhancedCustomShape2d.hxx
+++ b/include/svx/EnhancedCustomShape2d.hxx
@@ -40,12 +40,9 @@
 #include <vector>
 
 class Color;
-class SdrModel;
 class SdrObject;
+class SdrPathObj;
 class SfxItemSet;
-struct SvxMSDffVertPair;
-struct SvxMSDffCalculationData;
-struct SvxMSDffTextRectangles;
 
 enum class HandleFlags
 {
@@ -74,8 +71,6 @@ namespace o3tl
 // escher, but we are using it internally in to differentiate
 // between X_RANGE and Y_RANGE
 
-class SdrPathObj;
-
 class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet
 {
         SdrObject*                  pCustomShapeObj;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to