summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/unoviewcontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/unoviewcontainer.cxx')
-rw-r--r--slideshow/source/engine/unoviewcontainer.cxx32
1 files changed, 23 insertions, 9 deletions
diff --git a/slideshow/source/engine/unoviewcontainer.cxx b/slideshow/source/engine/unoviewcontainer.cxx
index 0215b3c4fe41..f51f104ca52e 100644
--- a/slideshow/source/engine/unoviewcontainer.cxx
+++ b/slideshow/source/engine/unoviewcontainer.cxx
@@ -22,6 +22,8 @@
#include <osl/diagnose.h>
+#include <boost/bind.hpp>
+
#include <algorithm>
@@ -43,11 +45,14 @@ namespace slideshow
// check whether same view is already added
// already added?
- const uno::Reference< presentation::XSlideShowView > rShowView = rView->getUnoView();
if( ::std::any_of( maViews.begin(),
maViews.end(),
- [&rShowView]( const UnoViewSharedPtr& pUnoView )
- { return rShowView == pUnoView->getUnoView(); } ) )
+ ::boost::bind(
+ ::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
+ rView->getUnoView(),
+ ::boost::bind(
+ &UnoView::getUnoView,
+ _1 ) ) ) )
{
// yes, nothing to do
return false;
@@ -68,8 +73,12 @@ namespace slideshow
// added in the first place?
if( (aIter=::std::find_if( maViews.begin(),
aEnd,
- [&xView]( const UnoViewSharedPtr& pUnoView )
- { return xView == pUnoView->getUnoView(); } ) ) == aEnd )
+ ::boost::bind(
+ ::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
+ ::boost::cref( xView ),
+ ::boost::bind(
+ &UnoView::getUnoView,
+ _1 ) ) ) ) == aEnd )
{
// nope, nothing to do
return UnoViewSharedPtr();
@@ -79,8 +88,12 @@ namespace slideshow
::std::count_if(
maViews.begin(),
aEnd,
- [&xView]( const UnoViewSharedPtr& pUnoView )
- { return xView == pUnoView->getUnoView(); } ) == 1,
+ ::boost::bind(
+ ::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
+ ::boost::cref( xView ),
+ ::boost::bind(
+ &UnoView::getUnoView,
+ _1 ))) == 1,
"UnoViewContainer::removeView(): View was added multiple times" );
UnoViewSharedPtr pView( *aIter );
@@ -93,8 +106,9 @@ namespace slideshow
void UnoViewContainer::dispose()
{
- for( const auto& rView : maViews )
- rView->_dispose();
+ ::std::for_each( maViews.begin(),
+ maViews.end(),
+ ::boost::mem_fn(&UnoView::_dispose) );
maViews.clear();
}
}