diff options
Diffstat (limited to 'slideshow/source/engine/shapes/appletshape.cxx')
-rw-r--r-- | slideshow/source/engine/shapes/appletshape.cxx | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx index 339161e19ab6..dee9298e57e9 100644 --- a/slideshow/source/engine/shapes/appletshape.cxx +++ b/slideshow/source/engine/shapes/appletshape.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_slideshow.hxx" - + // must be first #include <canvas/debug.hxx> #include <canvas/verbosetrace.hxx> @@ -81,9 +81,9 @@ namespace slideshow @param nNumPropEntries Number of property table entries (in pPropCopyTable) */ - AppletShape( const ::com::sun::star::uno::Reference< - ::com::sun::star::drawing::XShape >& xShape, - double nPrio, + AppletShape( const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape >& xShape, + double nPrio, const ::rtl::OUString& rServiceName, const char** pPropCopyTable, sal_Size nNumPropEntries, @@ -94,11 +94,11 @@ namespace slideshow // View layer methods //------------------------------------------------------------------ - virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, - bool bRedrawLayer ); - virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ); + virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, + bool bRedrawLayer ); + virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ); virtual bool clearAllViewLayers(); - + // ExternalShapeBase methods //------------------------------------------------------------------ @@ -160,8 +160,8 @@ namespace slideshow // resize all ViewShapes ::std::for_each( maViewAppletShapes.begin(), maViewAppletShapes.end(), - ::boost::bind( - &ViewAppletShape::resize, + ::boost::bind( + &ViewAppletShape::resize, _1, ::boost::cref( AppletShape::getBounds())) ); } @@ -173,22 +173,22 @@ namespace slideshow { try { - maViewAppletShapes.push_back( - ViewAppletShapeSharedPtr( new ViewAppletShape( rNewLayer, + maViewAppletShapes.push_back( + ViewAppletShapeSharedPtr( new ViewAppletShape( rNewLayer, getXShape(), maServiceName, mpPropCopyTable, mnNumPropEntries, mxComponentContext ))); - + // push new size to view shape maViewAppletShapes.back()->resize( getBounds() ); - + // render the Shape on the newly added ViewLayer if( bRedrawLayer ) maViewAppletShapes.back()->render( getBounds() ); } - catch(uno::Exception&) + catch(uno::Exception&) { // ignore failed shapes - slideshow should run with // the remaining content @@ -196,14 +196,14 @@ namespace slideshow } // --------------------------------------------------------------------- - + bool AppletShape::removeViewLayer( const ViewLayerSharedPtr& rLayer ) { const ViewAppletShapeVector::iterator aEnd( maViewAppletShapes.end() ); - OSL_ENSURE( ::std::count_if(maViewAppletShapes.begin(), - aEnd, - ::boost::bind<bool>( + OSL_ENSURE( ::std::count_if(maViewAppletShapes.begin(), + aEnd, + ::boost::bind<bool>( ::std::equal_to< ViewLayerSharedPtr >(), ::boost::bind( &ViewAppletShape::getViewLayer, _1 ), ::boost::cref( rLayer ) ) ) < 2, @@ -211,9 +211,9 @@ namespace slideshow ViewAppletShapeVector::iterator aIter; - if( (aIter=::std::remove_if( maViewAppletShapes.begin(), - aEnd, - ::boost::bind<bool>( + if( (aIter=::std::remove_if( maViewAppletShapes.begin(), + aEnd, + ::boost::bind<bool>( ::std::equal_to< ViewLayerSharedPtr >(), ::boost::bind( &ViewAppletShape::getViewLayer, _1 ), @@ -230,7 +230,7 @@ namespace slideshow } // --------------------------------------------------------------------- - + bool AppletShape::clearAllViewLayers() { maViewAppletShapes.clear(); @@ -244,13 +244,13 @@ namespace slideshow // redraw all view shapes, by calling their update() method if( ::std::count_if( maViewAppletShapes.begin(), maViewAppletShapes.end(), - ::boost::bind<bool>( - ::boost::mem_fn( &ViewAppletShape::render ), + ::boost::bind<bool>( + ::boost::mem_fn( &ViewAppletShape::render ), _1, - ::boost::cref( rCurrBounds ) ) ) + ::boost::cref( rCurrBounds ) ) ) != static_cast<ViewAppletShapeVector::difference_type>(maViewAppletShapes.size()) ) { - // at least one of the ViewShape::update() calls did return + // at least one of the ViewShape::update() calls did return // false - update failed on at least one ViewLayer return false; } @@ -259,7 +259,7 @@ namespace slideshow } // --------------------------------------------------------------------- - + bool AppletShape::implStartIntrinsicAnimation() { ::std::for_each( maViewAppletShapes.begin(), @@ -268,12 +268,12 @@ namespace slideshow _1, ::boost::cref( getBounds() ))); mbIsPlaying = true; - + return true; } - + // --------------------------------------------------------------------- - + bool AppletShape::implEndIntrinsicAnimation() { ::std::for_each( maViewAppletShapes.begin(), @@ -286,7 +286,7 @@ namespace slideshow } // --------------------------------------------------------------------- - + bool AppletShape::implPauseIntrinsicAnimation() { // TODO(F1): any way of temporarily disabling/deactivating |