[Libreoffice-commits] core.git: desktop/inc desktop/source include/vcl
Michael Stahl
mstahl at redhat.com
Wed Feb 3 11:00:15 UTC 2016
desktop/inc/pch/precompiled_deployment.hxx | 1 -
desktop/inc/pch/precompiled_deploymentgui.hxx | 1 -
desktop/source/deployment/gui/license_dialog.cxx | 5 +++--
desktop/source/deployment/gui/license_dialog.hxx | 1 -
desktop/source/deployment/manager/dp_extensionmanager.cxx | 5 ++---
desktop/source/deployment/manager/dp_manager.cxx | 10 +++++-----
include/vcl/threadex.hxx | 4 ++++
7 files changed, 14 insertions(+), 13 deletions(-)
New commits:
commit e9089b4f53c0fef5d0bdcc76add9a43a8c6d81bd
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Feb 2 15:40:33 2016 +0100
desktop: replace boost::bind with lambda or std::bind
This requires working around MSVC 2013 error C3848, that compiler
apparently just doesn't like to call its std::bind() functions if
they're "const".
Change-Id: Ic2e66cab3cadb36ab29cf2504a4c6107334f2ae1
diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx
index 0b60d8b..925f79c 100644
--- a/desktop/inc/pch/precompiled_deployment.hxx
+++ b/desktop/inc/pch/precompiled_deployment.hxx
@@ -27,7 +27,6 @@
#include <memory>
#include <unordered_map>
#include <vector>
-#include <boost/bind.hpp>
#include <boost/optional.hpp>
#include <osl/diagnose.h>
#include <osl/file.hxx>
diff --git a/desktop/inc/pch/precompiled_deploymentgui.hxx b/desktop/inc/pch/precompiled_deploymentgui.hxx
index 23c501f..7664dd2 100644
--- a/desktop/inc/pch/precompiled_deploymentgui.hxx
+++ b/desktop/inc/pch/precompiled_deploymentgui.hxx
@@ -33,7 +33,6 @@
#include <stddef.h>
#include <string.h>
#include <vector>
-#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
#include <osl/conditn.hxx>
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index ec47151..0932782 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -35,11 +35,12 @@
#include <vcl/threadex.hxx>
#include <vcl/builderfactory.hxx>
-#include <boost/bind.hpp>
#include "dp_gui_shared.hxx"
#include "license_dialog.hxx"
#include "dp_gui.hrc"
+#include <functional>
+
using namespace ::dp_misc;
namespace cssu = ::com::sun::star::uno;
using namespace ::com::sun::star;
@@ -311,7 +312,7 @@ void LicenseDialog::setTitle( OUString const & ) throw (RuntimeException, std::e
sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
{
return vcl::solarthread::syncExecute(
- boost::bind( &LicenseDialog::solar_execute, this));
+ std::bind(&LicenseDialog::solar_execute, this));
}
sal_Int16 LicenseDialog::solar_execute()
diff --git a/desktop/source/deployment/gui/license_dialog.hxx b/desktop/source/deployment/gui/license_dialog.hxx
index f5646c9..11eab9d 100644
--- a/desktop/source/deployment/gui/license_dialog.hxx
+++ b/desktop/source/deployment/gui/license_dialog.hxx
@@ -24,7 +24,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <boost/bind.hpp>
namespace dp_gui {
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 58aadbb..3d5000d 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -51,7 +51,6 @@
#include "dp_extensionmanager.hxx"
#include "dp_commandenvironments.hxx"
#include "dp_properties.hxx"
-#include <boost/bind.hpp>
#include <list>
#include <algorithm>
@@ -1495,8 +1494,8 @@ void ExtensionManager::fireModified()
cppu::UnoType<util::XModifyListener>::get() );
if (pContainer != nullptr) {
pContainer->forEach<util::XModifyListener>(
- boost::bind(&util::XModifyListener::modified, _1,
- lang::EventObject(static_cast<OWeakObject *>(this))) );
+ [this] (uno::Reference<util::XModifyListener> const& xListener)
+ { return xListener->modified(lang::EventObject(static_cast<OWeakObject *>(this))); });
}
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 0c87238..2db22a5 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -54,14 +54,14 @@
#include <com/sun/star/deployment/Prerequisites.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
-#include <boost/bind.hpp>
#include <unotools/tempfile.hxx>
-#include <vector>
-#include <list>
#include "dp_descriptioninfoset.hxx"
#include "dp_commandenvironments.hxx"
#include "dp_properties.hxx"
+
+#include <vector>
+#include <list>
#include <algorithm>
using namespace ::dp_misc;
@@ -431,8 +431,8 @@ void PackageManagerImpl::fireModified()
cppu::UnoType<util::XModifyListener>::get() );
if (pContainer != nullptr) {
pContainer->forEach<util::XModifyListener>(
- boost::bind(&util::XModifyListener::modified, _1,
- lang::EventObject(static_cast<OWeakObject *>(this))) );
+ [this] (uno::Reference<util::XModifyListener> const& xListener)
+ { return xListener->modified(lang::EventObject(static_cast<OWeakObject *>(this))); });
}
}
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index 47c1c44..358f1ca 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -87,7 +87,11 @@ private:
}
css::uno::Any m_exc;
+#ifdef _MSC_VER
+ FuncT m_func; // "const" and std::bind() results in Error C3848 expression would lose const-volatile qualifiers
+#else
FuncT const m_func;
+#endif
// using boost::optional here omits the need that ResultT is default
// constructable:
::boost::optional<ResultT> m_result;
More information about the Libreoffice-commits
mailing list