diff options
author | Adam Majer <amajer@suse.com> | 2020-02-19 15:29:06 +0100 |
---|---|---|
committer | Tomáš Chvátal <tchvatal@suse.com> | 2020-02-20 18:50:24 +0100 |
commit | a7be9479a04de2f0059c5769bbd9dc354c84136b (patch) | |
tree | 6238de55e0ede2c27eb5e84792f54186b7928998 /svx | |
parent | 578667856462c9f7374b0714c5cc311191122b00 (diff) |
Move Boost.Spirit usage away from legacy namespace
Remove BOOST_SPIRIT_USE_OLD_NAMESPACE defines and move all usage
of Boost.Spirit to boost::spirit::classic namespace.
Change-Id: I7dc5bed4d1b51f4a0bd1a4ae40c2024222127ce3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89079
Tested-by: Jenkins
Reviewed-by: Tomáš Chvátal <tchvatal@suse.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/Library_svx.mk | 1 | ||||
-rw-r--r-- | svx/Library_svxcore.mk | 1 | ||||
-rw-r--r-- | svx/Module_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 50 |
4 files changed, 25 insertions, 28 deletions
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 2b9b96f04a3b..a7d72db44ccd 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -35,7 +35,6 @@ $(eval $(call gb_Library_use_custom_headers,svx,\ $(eval $(call gb_Library_add_defs,svx,\ -DSVX_DLLIMPLEMENTATION \ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ )) $(eval $(call gb_Library_set_precompiled_header,svx,svx/inc/pch/precompiled_svx)) diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index 5cb8a455738d..80fcdae920f3 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -46,7 +46,6 @@ $(eval $(call gb_Library_set_precompiled_header,svxcore,svx/inc/pch/precompiled_ $(eval $(call gb_Library_add_defs,svxcore,\ -DSVXCORE_DLLIMPLEMENTATION \ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ )) $(eval $(call gb_Library_use_libraries,svxcore,\ diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk index c4d816e6fc5d..1d83bdc29d68 100644 --- a/svx/Module_svx.mk +++ b/svx/Module_svx.mk @@ -52,7 +52,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\ )) #todo: noopt for EnhanceCustomShapesFunctionParser.cxx on Solaris Sparc and MacOSX -#todo: -DBOOST_SPIRIT_USE_OLD_NAMESPACE only in CustomShapes ? #todo: -DUNICODE and -D_UNICODE on WNT for source/dialog #todo: component file # vim: set noet sw=4 ts=4: diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 2c761e9d7360..cecc478ae66e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -921,14 +921,14 @@ public: // notation, not the 1.0e10 one. // TODO(F1): Also handle the 1.0e10 case here. -template< typename T > struct custom_real_parser_policies : public ::boost::spirit::ureal_parser_policies<T> +template< typename T > struct custom_real_parser_policies : public ::boost::spirit::classic::ureal_parser_policies<T> { template< typename ScannerT > - static typename ::boost::spirit::parser_result< ::boost::spirit::chlit<>, ScannerT >::type + static typename ::boost::spirit::classic::parser_result< ::boost::spirit::classic::chlit<>, ScannerT >::type parse_exp(ScannerT& scan) { // as_lower_d somehow breaks MSVC7 - return ::boost::spirit::ch_p('E').parse(scan); + return ::boost::spirit::classic::ch_p('E').parse(scan); } }; @@ -960,7 +960,7 @@ template< typename T > struct custom_real_parser_policies : public ::boost::spir */ -class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar > +class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar > { public: /** Create an arithmetic expression grammar @@ -979,10 +979,10 @@ public: // grammar definition explicit definition( const ExpressionGrammar& self ) { - using ::boost::spirit::str_p; - using ::boost::spirit::range_p; - using ::boost::spirit::lexeme_d; - using ::boost::spirit::real_parser; + using ::boost::spirit::classic::str_p; + using ::boost::spirit::classic::range_p; + using ::boost::spirit::classic::lexeme_d; + using ::boost::spirit::classic::real_parser; identifier = str_p( "pi" )[ EnumFunctor(ExpressionFunct::EnumPi, self.getContext() ) ] @@ -1071,7 +1071,7 @@ public: BOOST_SPIRIT_DEBUG_RULE(identifier); } - const ::boost::spirit::rule< ScannerT >& start() const + const ::boost::spirit::classic::rule< ScannerT >& start() const { return additiveExpression; } @@ -1079,18 +1079,18 @@ public: private: // the constituents of the Spirit arithmetic expression grammar. // For the sake of readability, without 'ma' prefix. - ::boost::spirit::rule< ScannerT > additiveExpression; - ::boost::spirit::rule< ScannerT > multiplicativeExpression; - ::boost::spirit::rule< ScannerT > unaryExpression; - ::boost::spirit::rule< ScannerT > basicExpression; - ::boost::spirit::rule< ScannerT > unaryFunction; - ::boost::spirit::rule< ScannerT > binaryFunction; - ::boost::spirit::rule< ScannerT > ternaryFunction; - ::boost::spirit::rule< ScannerT > funcRef_decl; - ::boost::spirit::rule< ScannerT > functionReference; - ::boost::spirit::rule< ScannerT > modRef_decl; - ::boost::spirit::rule< ScannerT > modifierReference; - ::boost::spirit::rule< ScannerT > identifier; + ::boost::spirit::classic::rule< ScannerT > additiveExpression; + ::boost::spirit::classic::rule< ScannerT > multiplicativeExpression; + ::boost::spirit::classic::rule< ScannerT > unaryExpression; + ::boost::spirit::classic::rule< ScannerT > basicExpression; + ::boost::spirit::classic::rule< ScannerT > unaryFunction; + ::boost::spirit::classic::rule< ScannerT > binaryFunction; + ::boost::spirit::classic::rule< ScannerT > ternaryFunction; + ::boost::spirit::classic::rule< ScannerT > funcRef_decl; + ::boost::spirit::classic::rule< ScannerT > functionReference; + ::boost::spirit::classic::rule< ScannerT > modRef_decl; + ::boost::spirit::classic::rule< ScannerT > modifierReference; + ::boost::spirit::classic::rule< ScannerT > identifier; }; const ParserContextSharedPtr& getContext() const @@ -1136,11 +1136,11 @@ std::shared_ptr<ExpressionNode> const & FunctionParser::parseFunction( const OUS pContext->mpCustoShape = &rCustoShape; ExpressionGrammar aExpressionGrammer( pContext ); - const ::boost::spirit::parse_info<StringIteratorT> aParseInfo( - ::boost::spirit::parse( aStart, + const ::boost::spirit::classic::parse_info<StringIteratorT> aParseInfo( + ::boost::spirit::classic::parse( aStart, aEnd, - aExpressionGrammer >> ::boost::spirit::end_p, - ::boost::spirit::space_p ) ); + aExpressionGrammer >> ::boost::spirit::classic::end_p, + ::boost::spirit::classic::space_p ) ); // input fully congested by the parser? if( !aParseInfo.full ) |