summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-05-12 13:43:03 +0200
committerMichael Stahl <mstahl@redhat.com>2016-05-12 14:38:16 +0200
commit3e61eb69ac1cff727072011e228eabfc8bc055c0 (patch)
treee037c7719e1c31b3da6ab5479d01255034555314 /reportdesign
parent3d1b29a7da5c95de7dc9456d05e46bf563eab9c9 (diff)
reportdesign: replace boost::bind with C++11 stuff
Change-Id: Idd164e36d6f20a24123886ee1f15202c796eacc6
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx23
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx8
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx28
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
4 files changed, 41 insertions, 22 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 6addf6d7905c..4349d287c4b8 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -124,8 +124,6 @@
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
-#include <boost/bind.hpp>
-
// page styles
#define SC_UNO_PAGE_LEFTBORDER "LeftBorder"
#define SC_UNO_PAGE_RIGHTBORDER "RightBorder"
@@ -1081,7 +1079,8 @@ void SAL_CALL OReportDefinition::removeCloseListener( const uno::Reference< util
}
// XCloseable
-void SAL_CALL OReportDefinition::close( sal_Bool _bDeliverOwnership ) throw (util::CloseVetoException, uno::RuntimeException, std::exception)
+void SAL_CALL OReportDefinition::close(sal_Bool bDeliverOwnership)
+throw (util::CloseVetoException, uno::RuntimeException, std::exception)
{
SolarMutexGuard aSolarGuard;
@@ -1091,7 +1090,9 @@ void SAL_CALL OReportDefinition::close( sal_Bool _bDeliverOwnership ) throw (uti
lang::EventObject aEvt( static_cast< ::cppu::OWeakObject* >( this ) );
aGuard.clear();
m_pImpl->m_aCloseListener.forEach<util::XCloseListener>(
- ::boost::bind(&util::XCloseListener::queryClosing,_1,boost::cref(aEvt),boost::cref(_bDeliverOwnership)));
+ [&aEvt, &bDeliverOwnership] (uno::Reference<util::XCloseListener> const& xListener) {
+ return xListener->queryClosing(aEvt, bDeliverOwnership);
+ });
aGuard.reset();
@@ -1106,7 +1107,7 @@ void SAL_CALL OReportDefinition::close( sal_Bool _bDeliverOwnership ) throw (uti
{
uno::Reference< util::XCloseable> xFrame( (*aIter)->getFrame(), uno::UNO_QUERY );
if ( xFrame.is() )
- xFrame->close( _bDeliverOwnership );
+ xFrame->close( bDeliverOwnership );
}
catch (const util::CloseVetoException&) { throw; }
catch (const uno::Exception&)
@@ -1477,20 +1478,24 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
xStatusIndicator->end();
}
-void SAL_CALL OReportDefinition::switchToStorage( const uno::Reference< embed::XStorage >& _xStorage ) throw (lang::IllegalArgumentException, io::IOException, uno::Exception, uno::RuntimeException, std::exception)
+void SAL_CALL OReportDefinition::switchToStorage(
+ const uno::Reference< embed::XStorage >& xStorage)
+throw (lang::IllegalArgumentException, io::IOException, uno::Exception, uno::RuntimeException, std::exception)
{
- if ( !_xStorage.is() )
+ if (!xStorage.is())
throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_aProps->m_xContext->getServiceManager()),*this,1);
{
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
- m_pImpl->m_xStorage = _xStorage;
+ m_pImpl->m_xStorage = xStorage;
lcl_setModelReadOnly(m_pImpl->m_xStorage,m_pImpl->m_pReportModel);
m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage);
}
// notify our container listeners
m_pImpl->m_aStorageChangeListeners.forEach<document::XStorageChangeListener>(
- ::boost::bind(&document::XStorageChangeListener::notifyStorageChange,_1,static_cast<OWeakObject*>(this),boost::cref(_xStorage)));
+ [this, &xStorage] (uno::Reference<document::XStorageChangeListener> const& xListener) {
+ return xListener->notifyStorageChange(static_cast<OWeakObject*>(this), xStorage);
+ });
}
uno::Reference< embed::XStorage > SAL_CALL OReportDefinition::getDocumentStorage( ) throw (io::IOException, uno::Exception, uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 26a5b216372e..6ab1e188a649 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -56,8 +56,6 @@
#include <osl/mutex.hxx>
#include <sal/macros.h>
-#include <boost/bind.hpp>
-
#include <iterator>
#define DEFAULT_LINE_WIDTH 2
@@ -1200,8 +1198,10 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
aValue.LineStyle = table::BorderLineStyle::NONE;
uno::Any aEmpty;
aEmpty <<= aValue;
- ::std::for_each(aProps.begin(),aProps.end(),
- ::boost::bind(&beans::XPropertySet::setPropertyValue,xBorderProp,_1,aEmpty));
+ for (auto const& it : aProps)
+ {
+ xBorderProp->setPropertyValue(it, aEmpty);
+ }
::std::vector< XMLPropertyState > aBorderStates(m_xCellStylesExportPropertySetMapper->Filter(xBorderProp));
::std::copy(aBorderStates.begin(),aBorderStates.end(),::std::back_inserter(aPropertyStates));
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index cb7759f68d84..186428b0c5be 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -709,7 +709,10 @@ void GeometryHandler::implCreateListLikeControl(
);
out_Descriptor.Control = xListControl.get();
- ::std::for_each( _aEntries.begin(), _aEntries.end(),::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl,_1 ));
+ for (auto const& it : _aEntries)
+ {
+ xListControl->appendListEntry(it);
+ }
}
@@ -812,10 +815,14 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
}
else
{
- ::std::for_each( m_aFieldNames.getConstArray(), m_aFieldNames.getConstArray() + m_aFieldNames.getLength(),
- ::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl, _1 ) );
- ::std::for_each( m_aParamNames.getConstArray(), m_aParamNames.getConstArray() + m_aParamNames.getLength(),
- ::boost::bind( &inspection::XStringListControl::appendListEntry, xListControl, _1 ) );
+ for (auto const& it : m_aFieldNames)
+ {
+ xListControl->appendListEntry(it);
+ }
+ for (auto const& it : m_aParamNames)
+ {
+ xListControl->appendListEntry(it);
+ }
}
}
break;
@@ -1633,14 +1640,19 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
}
}
-void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< OUString >& _out_rList) const
+void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< OUString >& out_rList) const
{
if ( m_nDataFieldType == FUNCTION )
- ::std::transform(m_aDefaultFunctions.begin(),m_aDefaultFunctions.end(),::std::back_inserter(_out_rList),::boost::bind( &DefaultFunction::getName, _1 ));
+ {
+ for (auto const& it : m_aDefaultFunctions)
+ {
+ out_rList.push_back(it.getName());
+ }
+ }
else if ( m_nDataFieldType == USER_DEF_FUNCTION )
::std::transform( m_aFunctionNames.begin(),
m_aFunctionNames.end(),
- ::std::back_inserter(_out_rList),
+ ::std::back_inserter(out_rList),
::o3tl::select1st< TFunctions::value_type >() );
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 1138d2ea741f..afbc800e5bda 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2604,7 +2604,9 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi
}
lang::EventObject aEvent(*this);
m_aSelectionListeners.forEach<view::XSelectionChangeListener>(
- ::boost::bind(&view::XSelectionChangeListener::selectionChanged,_1,boost::cref(aEvent)));
+ [&aEvent] (uno::Reference<view::XSelectionChangeListener> const& xListener) {
+ return xListener->selectionChanged(aEvent);
+ });
}
}