[Libreoffice-commits] core.git: 6 commits - include/oox include/osl include/sfx2 include/tools include/vcl oox/source sc/source unoxml/source
Michael Stahl
mstahl at redhat.com
Fri Jan 29 04:50:48 PST 2016
include/oox/helper/refmap.hxx | 11 ++++++-----
include/oox/helper/refvector.hxx | 13 +++++++------
include/osl/diagnose.hxx | 4 ++--
include/sfx2/sidebar/Theme.hxx | 1 -
include/tools/diagnose_ex.h | 3 ---
include/vcl/threadex.hxx | 10 +++++-----
oox/source/ole/vbacontrol.cxx | 6 +++---
oox/source/ole/vbaproject.cxx | 10 +++++-----
sc/source/filter/oox/pivottablebuffer.cxx | 4 ++--
unoxml/source/rdf/librdf_repository.cxx | 8 ++++----
10 files changed, 34 insertions(+), 36 deletions(-)
New commits:
commit fb76228fe7a6984a240e137d4de083199f96aaf4
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 13:35:08 2016 +0100
unoxml: replace boost::bind with lambda
Change-Id: Id8d73fa9a93cd793dbce0d3f84ddde86860f7308
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 2c62713..353f91a 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -30,7 +30,6 @@
#include <boost/noncopyable.hpp>
#include <boost/shared_array.hpp>
-#include <boost/bind.hpp>
#include <boost/optional.hpp>
#include <libxslt/security.h>
@@ -1253,8 +1252,8 @@ throw (uno::RuntimeException, rdf::RepositoryException, std::exception)
::std::vector< uno::Reference<rdf::XURI> > ret;
std::transform(m_NamedGraphs.begin(), m_NamedGraphs.end(),
std::back_inserter(ret),
- boost::bind(&rdf::XNamedGraph::getName,
- boost::bind(&NamedGraphMap_t::value_type::second, _1)));
+ [](std::pair<OUString, ::rtl::Reference<librdf_NamedGraph>> const& it)
+ { return it.second->getName(); });
return comphelper::containerToSequence(ret);
}
@@ -1585,7 +1584,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
predicates;
::std::transform(i_rPredicates.begin(), i_rPredicates.end(),
::std::back_inserter(predicates),
- ::boost::bind(&librdf_TypeConverter::extractResource_NoLock, _1));
+ [](uno::Reference<rdf::XURI> const& xURI)
+ { return librdf_TypeConverter::extractResource_NoLock(xURI); });
removeStatementRDFa(i_xObject); // not atomic with insertion?
commit d54a7555ab38435d07bdb12e3d4b017d0753fa1f
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 13:23:14 2016 +0100
sfx2: remove unused boost include
Change-Id: I75d9e953bc99f0af70e09ee07568a7a31b904573
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index a4c823c..38d9d14 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -33,7 +33,6 @@
#include <map>
#include <unordered_map>
-#include <boost/optional.hpp>
class SvBorder;
commit 4548110146b7d392a9d24379025e4550c7d1a947
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 13:17:18 2016 +0100
vcl: update documentation to std::bind
Change-Id: Ibabcc78a6b30740a8a0f675591dc37dfd5887be9
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index 2bb011b..47c1c44 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -159,7 +159,7 @@ private:
(e.g. for out parameters) to foreign threads, use inout_by_ref()
for this purpose. For in parameters, this may not affect you, because
the functor object is copy constructed into free store. This way
- you must not use \verbatim boost::cref()/boost::ref() \endverbatim or similar
+ you must not use \verbatim std::cref()/std::ref() \endverbatim or similar
for objects on your thread's stack.
Use inout_by_ref() or inout_by_ptr() for this purpose, e.g.
@@ -168,15 +168,15 @@ private:
long n = 3;
// calling foo( long & r ):
- syncExecute( boost::bind( &foo, inout_by_ref(n) ) );
+ syncExecute( std::bind( &foo, inout_by_ref(n) ) );
// calling foo( long * p ):
- syncExecute( boost::bind( &foo, inout_by_ptr(&n) ) );
+ syncExecute( std::bind( &foo, inout_by_ptr(&n) ) );
char const* pc = "default";
// calling foo( char const** ppc ):
- syncExecute( boost::bind( &foo, inout_by_ptr(&pc) ) );
+ syncExecute( std::bind( &foo, inout_by_ptr(&pc) ) );
// calling foo( char const*& rpc ):
- syncExecute( boost::bind( &foo, inout_by_ref(pc) ) );
+ syncExecute( std::bind( &foo, inout_by_ref(pc) ) );
\endcode
@tpl ResultT result type, defaults to FuncT::result_type to seamlessly
commit 0e57d54e1f8fe81d870ae18d6401f5ce104deb17
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 12:59:35 2016 +0100
oox: replace boost::bind with std::bind
Change-Id: Ic402cfd6900cdf1741264b409f6fbe8f2db7e17a
diff --git a/include/oox/helper/refmap.hxx b/include/oox/helper/refmap.hxx
index 1a40634..ef20d37 100644
--- a/include/oox/helper/refmap.hxx
+++ b/include/oox/helper/refmap.hxx
@@ -21,10 +21,11 @@
#define INCLUDED_OOX_HELPER_REFMAP_HXX
#include <sal/types.h>
+
+#include <functional>
#include <algorithm>
#include <map>
#include <memory>
-#include <boost/bind.hpp>
namespace oox {
@@ -77,7 +78,7 @@ public:
template< typename FuncType >
void forEachMem( FuncType pFunc ) const
{
- forEach( ::boost::bind( pFunc, _1 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1 ) );
}
/** Calls the passed member function of ObjType on every contained object,
@@ -85,7 +86,7 @@ public:
template< typename FuncType, typename ParamType1, typename ParamType2 >
void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2 ) const
{
- forEach( ::boost::bind( pFunc, _1, aParam1, aParam2 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1, aParam1, aParam2 ) );
}
/** Calls the passed member function of ObjType on every contained object,
@@ -93,7 +94,7 @@ public:
template< typename FuncType, typename ParamType1, typename ParamType2, typename ParamType3 >
void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3 ) const
{
- forEach( ::boost::bind( pFunc, _1, aParam1, aParam2, aParam3 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1, aParam1, aParam2, aParam3 ) );
}
@@ -110,7 +111,7 @@ public:
template< typename FuncType >
void forEachMemWithKey( FuncType pFunc ) const
{
- forEachWithKey( ::boost::bind( pFunc, _2, _1 ) );
+ forEachWithKey( ::std::bind( pFunc, std::placeholders::_2, std::placeholders::_1 ) );
}
diff --git a/include/oox/helper/refvector.hxx b/include/oox/helper/refvector.hxx
index e7aca39..8192032 100644
--- a/include/oox/helper/refvector.hxx
+++ b/include/oox/helper/refvector.hxx
@@ -21,7 +21,8 @@
#define INCLUDED_OOX_HELPER_REFVECTOR_HXX
#include <sal/types.h>
-#include <boost/bind.hpp>
+
+#include <functional>
#include <algorithm>
#include <memory>
#include <vector>
@@ -67,7 +68,7 @@ public:
template< typename FuncType >
void forEachMem( FuncType pFunc ) const
{
- forEach( ::boost::bind( pFunc, _1 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1 ) );
}
/** Calls the passed member function of ObjType on every contained object,
@@ -75,7 +76,7 @@ public:
template< typename FuncType, typename ParamType >
void forEachMem( FuncType pFunc, ParamType aParam ) const
{
- forEach( ::boost::bind( pFunc, _1, aParam ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1, aParam ) );
}
/** Calls the passed member function of ObjType on every contained object,
@@ -83,7 +84,7 @@ public:
template< typename FuncType, typename ParamType1, typename ParamType2 >
void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2 ) const
{
- forEach( ::boost::bind( pFunc, _1, aParam1, aParam2 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1, aParam1, aParam2 ) );
}
/** Calls the passed member function of ObjType on every contained object,
@@ -91,7 +92,7 @@ public:
template< typename FuncType, typename ParamType1, typename ParamType2, typename ParamType3 >
void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3 ) const
{
- forEach( ::boost::bind( pFunc, _1, aParam1, aParam2, aParam3 ) );
+ forEach( ::std::bind( pFunc, std::placeholders::_1, aParam1, aParam2, aParam3 ) );
}
/** Calls the passed functor for every contained object. Passes the index as
@@ -107,7 +108,7 @@ public:
template< typename FuncType, typename ParamType1, typename ParamType2 >
void forEachMemWithIndex( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2 ) const
{
- forEachWithIndex( ::boost::bind( pFunc, _2, _1, aParam1, aParam2 ) );
+ forEachWithIndex( ::std::bind( pFunc, std::placeholders::_2, std::placeholders::_1, aParam1, aParam2 ) );
}
/** Searches for an element by using the passed functor that takes a
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 8926acf..1ed1e99 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -407,7 +407,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
stream (for embedded simple controls) or from the substorage
(for embedded container controls). */
maControls.forEachMem( &VbaFormControl::importModelOrStorage,
- ::boost::ref( aOStrm ), ::boost::ref( rStrg ), ::boost::cref( maClassTable ) );
+ ::std::ref( aOStrm ), ::std::ref( rStrg ), ::std::cref( maClassTable ) );
// Special handling for multi-page which has non-standard
// containment and additionally needs to re-order Page children
@@ -495,7 +495,7 @@ bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrl
/* Call conversion for all controls. Pass vector index as new
tab order to make option button groups work correctly. */
maControls.forEachMemWithIndex( &VbaFormControl::createAndConvert,
- ::boost::cref( xCtrlModelNC ), ::boost::cref( rConv ) );
+ ::std::cref( xCtrlModelNC ), ::std::cref( rConv ) );
}
catch(const Exception& )
{
@@ -701,7 +701,7 @@ void VbaFormControl::moveEmbeddedToAbsoluteParent()
}
// move the embedded controls
- maControls.forEachMem( &VbaFormControl::moveRelative, ::boost::cref( aDistance ) );
+ maControls.forEachMem( &VbaFormControl::moveRelative, ::std::cref( aDistance ) );
}
}
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 77c6764..7cab269 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -455,14 +455,14 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
if( xBasicLib.is() )
{
// #TODO cater for mxOleOverridesSink, like I used to before
- // call Basic source code import for each module, boost::[c]ref enforces pass-by-ref
+ // call Basic source code import for each module, std::[c]ref enforces pass-by-ref
maModules.forEachMem( &VbaModule::createAndImportModule,
- ::boost::ref( *xVbaStrg ), ::boost::cref( xBasicLib ),
- ::boost::cref( xDocObjectNA ) );
+ ::std::ref( *xVbaStrg ), ::std::cref( xBasicLib ),
+ ::std::cref( xDocObjectNA ) );
// create empty dummy modules
aDummyModules.forEachMem( &VbaModule::createEmptyModule,
- ::boost::cref( xBasicLib ), ::boost::cref( xDocObjectNA ) );
+ ::std::cref( xBasicLib ), ::std::cref( xDocObjectNA ) );
}
}
catch(const Exception& )
@@ -516,7 +516,7 @@ void VbaProject::attachMacros()
aArgs[ 1 ] <<= maPrjName;
Reference< XVBAMacroResolver > xResolver( xFactory->createInstanceWithArgumentsAndContext(
"com.sun.star.script.vba.VBAMacroResolver", aArgs, mxContext ), UNO_QUERY_THROW );
- maMacroAttachers.forEachMem( &VbaMacroAttacherBase::resolveAndAttachMacro, ::boost::cref( xResolver ) );
+ maMacroAttachers.forEachMem( &VbaMacroAttacherBase::resolveAndAttachMacro, ::std::cref( xResolver ) );
}
catch(const Exception& )
{
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index 7756ada..35a5ad4 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -1189,7 +1189,7 @@ void PivotTable::finalizeImport()
aDescProp.setProperty( PROP_DrillDownOnDoubleClick, maDefModel.mbEnableDrill );
// finalize all fields, this finds field names and creates grouping fields
- maFields.forEachMem( &PivotTableField::finalizeImport, ::boost::cref( mxDPDescriptor ) );
+ maFields.forEachMem(&PivotTableField::finalizeImport, ::std::cref(mxDPDescriptor));
// all row fields
for( IndexVector::iterator aIt = maRowFields.begin(), aEnd = maRowFields.end(); aIt != aEnd; ++aIt )
@@ -1252,7 +1252,7 @@ void PivotTable::finalizeImport()
void PivotTable::finalizeDateGroupingImport( const Reference< XDataPilotField >& rxBaseDPField, sal_Int32 nBaseFieldIdx )
{
// process all fields, there is no chaining information in the cache fields
- maFields.forEachMem( &PivotTableField::finalizeDateGroupingImport, ::boost::cref( rxBaseDPField ), nBaseFieldIdx );
+ maFields.forEachMem( &PivotTableField::finalizeDateGroupingImport, ::std::cref(rxBaseDPField), nBaseFieldIdx );
}
void PivotTable::finalizeParentGroupingImport( const Reference< XDataPilotField >& rxBaseDPField,
commit 12ebf6f72b2b3c9f66be767933835cde848d8e48
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 13:06:59 2016 +0100
tools: forgot to remove the include boost/current_function.hpp
Change-Id: Ic941539747fe47b4295e57a0e80b5920d2e62cc9
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h
index 67c2421..bd0ec88 100644
--- a/include/tools/diagnose_ex.h
+++ b/include/tools/diagnose_ex.h
@@ -25,8 +25,6 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <boost/current_function.hpp>
-
#include <tools/toolsdllapi.h>
TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException, const char* currentFunction, const char* fileAndLineNo);
@@ -36,7 +34,6 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
- #include <boost/current_function.hpp>
/** reports a caught UNO exception via OSL diagnostics
commit 110d55cc11033d72bce908e65bbb6a9506ab39e5
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 29 12:45:54 2016 +0100
sal: replace boost::unordered_set with std::unordered_set
This header is completely internal and not even shipped with the SDK.
Change-Id: I0402e23786bae5eb4f51be8582dcf41475176e4f
diff --git a/include/osl/diagnose.hxx b/include/osl/diagnose.hxx
index c94b9b1..ece1e16 100644
--- a/include/osl/diagnose.hxx
+++ b/include/osl/diagnose.hxx
@@ -26,8 +26,8 @@
#include <cstddef>
#include <functional>
#include <typeinfo>
+#include <unordered_set>
-#include <boost/unordered_set.hpp>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
@@ -93,7 +93,7 @@ struct VoidPtrHash : ::std::unary_function<void const*, ::std::size_t> {
}
};
-typedef ::boost::unordered_set<void const*, VoidPtrHash, ::std::equal_to<void const*> > VoidPointerSet;
+typedef ::std::unordered_set<void const*, VoidPtrHash, ::std::equal_to<void const*> > VoidPointerSet;
struct ObjectRegistryData {
ObjectRegistryData( ::std::type_info const& rTypeInfo )
More information about the Libreoffice-commits
mailing list