Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2
libreoffice
fix_old_boost_spirit_namespace.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_old_boost_spirit_namespace.patch of Package libreoffice
commit 74ac4cd9c0cbc8bc5a9b3c049731dd28c4b0d981 (HEAD -> master) Author: Adam Majer <amajer@suse.com> Date: Wed Feb 19 15:29:06 2020 +0100 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 PR: https://gerrit.libreoffice.org/c/core/+/89079 Index: libreoffice-6.4.1.1/connectivity/Library_dbtools.mk =================================================================== --- libreoffice-6.4.1.1.orig/connectivity/Library_dbtools.mk +++ libreoffice-6.4.1.1/connectivity/Library_dbtools.mk @@ -12,7 +12,6 @@ $(eval $(call gb_Library_Library,dbtools $(eval $(call gb_Library_add_defs,dbtools,\ -DOOO_DLLIMPLEMENTATION_DBTOOLS \ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ )) $(eval $(call gb_Library_set_componentfile,dbtools,connectivity/source/dbtools/dbtools)) Index: libreoffice-6.4.1.1/sdext/Library_pdfimport.mk =================================================================== --- libreoffice-6.4.1.1.orig/sdext/Library_pdfimport.mk +++ libreoffice-6.4.1.1/sdext/Library_pdfimport.mk @@ -44,7 +44,6 @@ $(eval $(call gb_Library_add_defs,pdfimp endif $(eval $(call gb_Library_add_defs,pdfimport, \ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ -DBOOST_ALL_NO_LIB \ )) Index: libreoffice-6.4.1.1/slideshow/Library_slideshow.mk =================================================================== --- libreoffice-6.4.1.1.orig/slideshow/Library_slideshow.mk +++ libreoffice-6.4.1.1/slideshow/Library_slideshow.mk @@ -14,10 +14,6 @@ $(eval $(call gb_Library_set_include,sli -I$(SRCDIR)/slideshow/source/inc \ )) -$(eval $(call gb_Library_add_defs,slideshow,\ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ -)) - ifneq ($(strip $(debug)$(DEBUG)),) $(eval $(call gb_Library_add_defs,slideshow,\ -DBOOST_SP_ENABLE_DEBUG_HOOKS \ Index: libreoffice-6.4.1.1/svx/Library_svx.mk =================================================================== --- libreoffice-6.4.1.1.orig/svx/Library_svx.mk +++ libreoffice-6.4.1.1/svx/Library_svx.mk @@ -35,7 +35,6 @@ $(eval $(call gb_Library_use_custom_head $(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)) Index: libreoffice-6.4.1.1/svx/Library_svxcore.mk =================================================================== --- libreoffice-6.4.1.1.orig/svx/Library_svxcore.mk +++ libreoffice-6.4.1.1/svx/Library_svxcore.mk @@ -46,7 +46,6 @@ $(eval $(call gb_Library_set_precompiled $(eval $(call gb_Library_add_defs,svxcore,\ -DSVX_DLLIMPLEMENTATION \ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ )) $(eval $(call gb_Library_use_libraries,svxcore,\ Index: libreoffice-6.4.1.1/svx/Module_svx.mk =================================================================== --- libreoffice-6.4.1.1.orig/svx/Module_svx.mk +++ libreoffice-6.4.1.1/svx/Module_svx.mk @@ -54,7 +54,6 @@ $(eval $(call gb_Module_add_subsequentch endif #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: Index: libreoffice-6.4.1.1/sdext/source/pdfimport/pdfparse/pdfparse.cxx =================================================================== --- libreoffice-6.4.1.1.orig/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ libreoffice-6.4.1.1/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -49,7 +49,7 @@ #endif -using namespace boost::spirit; +using namespace boost::spirit::classic; using namespace pdfparse; @@ -556,12 +556,12 @@ std::unique_ptr<PDFEntry> PDFReader::rea try { #if OSL_DEBUG_LEVEL > 0 - boost::spirit::parse_info<const char*> aInfo = + boost::spirit::classic::parse_info<const char*> aInfo = #endif - boost::spirit::parse( pBuffer, + boost::spirit::classic::parse( pBuffer, pBuffer+nLen, aGrammar, - boost::spirit::space_p ); + boost::spirit::classic::space_p ); #if OSL_DEBUG_LEVEL > 0 SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop = " << aInfo.stop << " (buff=" << pBuffer << ", offset = " << aInfo.stop - pBuffer << "), hit = " << (aInfo.hit ? OUString("true") : OUString("false")) << ", full = " << (aInfo.full ? OUString("true") : OUString("false")) << ", length = " << static_cast<int>(aInfo.length) ); #endif @@ -634,12 +634,12 @@ std::unique_ptr<PDFEntry> PDFReader::rea try { #if OSL_DEBUG_LEVEL > 0 - boost::spirit::parse_info< file_iterator<> > aInfo = + boost::spirit::classic::parse_info< file_iterator<> > aInfo = #endif - boost::spirit::parse( file_start, + boost::spirit::classic::parse( file_start, file_end, aGrammar, - boost::spirit::space_p ); + boost::spirit::classic::space_p ); #if OSL_DEBUG_LEVEL > 0 SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop at offset = " << aInfo.stop - file_start << ", hit = " << (aInfo.hit ? "true" : "false") << ", full = " << (aInfo.full ? "true" : "false") << ", length = " << aInfo.length); #endif Index: libreoffice-6.4.1.1/connectivity/source/commontools/RowFunctionParser.cxx =================================================================== --- libreoffice-6.4.1.1.orig/connectivity/source/commontools/RowFunctionParser.cxx +++ libreoffice-6.4.1.1/connectivity/source/commontools/RowFunctionParser.cxx @@ -284,7 +284,7 @@ public: ( '-' multiplicative_expression )* ) */ -class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar > +class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar > { public: /** Create an arithmetic expression grammar @@ -303,14 +303,14 @@ public: // grammar definition explicit definition( const ExpressionGrammar& self ) { - using ::boost::spirit::space_p; - using ::boost::spirit::range_p; - using ::boost::spirit::lexeme_d; - using ::boost::spirit::ch_p; - using ::boost::spirit::int_p; - using ::boost::spirit::as_lower_d; - using ::boost::spirit::strlit; - using ::boost::spirit::inhibit_case; + using ::boost::spirit::classic::space_p; + using ::boost::spirit::classic::range_p; + using ::boost::spirit::classic::lexeme_d; + using ::boost::spirit::classic::ch_p; + using ::boost::spirit::classic::int_p; + using ::boost::spirit::classic::as_lower_d; + using ::boost::spirit::classic::strlit; + using ::boost::spirit::classic::inhibit_case; typedef inhibit_case<strlit<> > token_t; @@ -362,7 +362,7 @@ public: BOOST_SPIRIT_DEBUG_RULE(andExpression); } - const ::boost::spirit::rule< ScannerT >& start() const + const ::boost::spirit::classic::rule< ScannerT >& start() const { return basicExpression; } @@ -370,11 +370,11 @@ public: private: // the constituents of the Spirit arithmetic expression grammar. // For the sake of readability, without 'ma' prefix. - ::boost::spirit::rule< ScannerT > basicExpression; - ::boost::spirit::rule< ScannerT > unaryFunction; - ::boost::spirit::rule< ScannerT > assignment; - ::boost::spirit::rule< ScannerT > integer,argument; - ::boost::spirit::rule< ScannerT > orExpression,andExpression; + ::boost::spirit::classic::rule< ScannerT > basicExpression; + ::boost::spirit::classic::rule< ScannerT > unaryFunction; + ::boost::spirit::classic::rule< ScannerT > assignment; + ::boost::spirit::classic::rule< ScannerT > integer,argument; + ::boost::spirit::classic::rule< ScannerT > orExpression,andExpression; }; const ParserContextSharedPtr& getContext() const @@ -417,11 +417,11 @@ std::shared_ptr<ExpressionNode> const & 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::space_p ) ); + ::boost::spirit::classic::space_p ) ); #if (OSL_DEBUG_LEVEL > 0) std::cout.flush(); // needed to keep stdout and cout in sync Index: libreoffice-6.4.1.1/slideshow/source/engine/smilfunctionparser.cxx =================================================================== --- libreoffice-6.4.1.1.orig/slideshow/source/engine/smilfunctionparser.cxx +++ libreoffice-6.4.1.1/slideshow/source/engine/smilfunctionparser.cxx @@ -363,14 +363,14 @@ namespace slideshow // 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); } }; @@ -401,7 +401,7 @@ namespace slideshow ( '-' multiplicative_expression )* ) */ - class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar > + class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar > { public: /** Create an arithmetic expression grammar @@ -420,8 +420,8 @@ namespace slideshow // grammar definition explicit definition( const ExpressionGrammar& self ) { - using ::boost::spirit::str_p; - using ::boost::spirit::real_parser; + using ::boost::spirit::classic::str_p; + using ::boost::spirit::classic::real_parser; identifier = str_p( "$" )[ ValueTFunctor( self.getContext()) ] @@ -487,7 +487,7 @@ namespace slideshow BOOST_SPIRIT_DEBUG_RULE(identifier); } - const ::boost::spirit::rule< ScannerT >& start() const + const ::boost::spirit::classic::rule< ScannerT >& start() const { return additiveExpression; } @@ -495,13 +495,13 @@ namespace slideshow 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 > 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 > identifier; }; const ParserContextSharedPtr& getContext() const @@ -547,11 +547,11 @@ namespace slideshow 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::space_p ) ); + ::boost::spirit::classic::space_p ) ); #if OSL_DEBUG_LEVEL > 0 ::std::cout.flush(); // needed to keep stdout and cout in sync @@ -590,11 +590,11 @@ namespace slideshow 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 ) ); #if OSL_DEBUG_LEVEL > 0 ::std::cout.flush(); // needed to keep stdout and cout in sync Index: libreoffice-6.4.1.1/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx =================================================================== --- libreoffice-6.4.1.1.orig/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ libreoffice-6.4.1.1/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -922,14 +922,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); } }; @@ -961,7 +961,7 @@ template< typename T > struct custom_rea */ -class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar > +class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar > { public: /** Create an arithmetic expression grammar @@ -980,10 +980,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() ) ] @@ -1072,7 +1072,7 @@ public: BOOST_SPIRIT_DEBUG_RULE(identifier); } - const ::boost::spirit::rule< ScannerT >& start() const + const ::boost::spirit::classic::rule< ScannerT >& start() const { return additiveExpression; } @@ -1080,18 +1080,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 @@ -1137,11 +1137,11 @@ std::shared_ptr<ExpressionNode> const & 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 )
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor