Kaydet (Commit) 4b37994a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantparam in slideshow

Change-Id: I36215c1e5c698b1dd2a984163639b024739b3113
üst b4e3f5e9
......@@ -31,7 +31,7 @@ namespace {
class UpdateLock : public ::slideshow::internal::ScreenUpdater::UpdateLock
{
public:
UpdateLock (::slideshow::internal::ScreenUpdater& rUpdater, const bool bStartLocked);
UpdateLock (::slideshow::internal::ScreenUpdater& rUpdater);
virtual ~UpdateLock();
virtual void Activate() override;
private:
......@@ -214,7 +214,7 @@ namespace internal
::std::shared_ptr<ScreenUpdater::UpdateLock> ScreenUpdater::createLock()
{
return ::std::shared_ptr<ScreenUpdater::UpdateLock>(new ::UpdateLock(*this, false/*bStartLocked*/));
return ::std::shared_ptr<ScreenUpdater::UpdateLock>(new ::UpdateLock(*this));
}
......@@ -224,13 +224,10 @@ namespace internal
namespace {
UpdateLock::UpdateLock (
::slideshow::internal::ScreenUpdater& rUpdater,
const bool bStartLocked)
::slideshow::internal::ScreenUpdater& rUpdater)
: mrUpdater(rUpdater),
mbIsActivated(false)
{
if (bStartLocked)
Activate();
}
......
......@@ -93,30 +93,18 @@ namespace slideshow
this->viewAdded( rView );
}
void LayerManager::activate( bool bSlideBackgoundPainted )
void LayerManager::activate()
{
mbActive = true;
maUpdateShapes.clear(); // update gets forced via area, or
// has happened outside already
if( !bSlideBackgoundPainted )
{
for( const auto& pView : mrViews )
pView->clearAll();
// force update of whole slide area
for( const auto& pLayer : maLayers )
pLayer->addUpdateRange( maPageBounds );
}
else
{
// clear all possibly pending update areas - content
// is there, already
for( const auto& pLayer : maLayers )
pLayer->clearUpdateRanges();
}
// clear all possibly pending update areas - content
// is there, already
for( const auto& pLayer : maLayers )
pLayer->clearUpdateRanges();
updateShapeLayers( bSlideBackgoundPainted );
updateShapeLayers( true/*bSlideBackgoundPainted*/ );
}
void LayerManager::deactivate()
......
......@@ -84,15 +84,8 @@ namespace slideshow
This method activates the LayerManager. Prior to
activation, this instance will be passive, i.e. won't
render anything to any view.
@param bSlideBackgoundPainted
When true, the initial slide content on the background
layer is already rendered (e.g. from a previous slide
transition). When false, LayerManager also renders
initial content of background layer on next update()
call.
*/
void activate( bool bSlideBackgoundPainted );
void activate();
/** Deactivate the LayerManager
......
......@@ -72,7 +72,7 @@ void ShapeManagerImpl::activate()
this->cursorChanged( rListener.first, rListener.second );
if( mpLayerManager )
mpLayerManager->activate( true/*bSlideBackgoundPainted*/ );
mpLayerManager->activate();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment