You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/05/11 19:15:27 UTC
[openoffice] branch AOO41X updated (56a52a7 -> b06e87e)
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git.
from 56a52a7 #i28353# add leading dots for a label Floating Frame
new 23b51d7 Removed whitespace, fixed typos
new b06e87e Removed whitespace, fixed typos
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
main/slideshow/source/engine/slideshowimpl.cxx | 676 ++++++++++++-------------
main/slideshow/source/engine/slideview.cxx | 181 +++----
2 files changed, 429 insertions(+), 428 deletions(-)
[openoffice] 02/02: Removed whitespace, fixed typos
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit b06e87e789b55d135c3b39ce57d3335487a2d69a
Author: mseidel <ms...@apache.org>
AuthorDate: Sun Apr 18 17:02:33 2021 +0200
Removed whitespace, fixed typos
(cherry picked from commit 3a0fc1de55289a0e30610b1b4813ae76187008b1)
---
main/slideshow/source/engine/slideview.cxx | 181 +++++++++++++++--------------
1 file changed, 91 insertions(+), 90 deletions(-)
diff --git a/main/slideshow/source/engine/slideview.cxx b/main/slideshow/source/engine/slideview.cxx
index b240089..ac1768d 100644
--- a/main/slideshow/source/engine/slideview.cxx
+++ b/main/slideshow/source/engine/slideview.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
#include "precompiled_slideshow.hxx"
#include <canvas/debug.hxx>
@@ -151,7 +152,7 @@ basegfx::B2DPolyPolygon createClipPolygon( const basegfx::B2DPolyPolygon& rCl
(createClipPolygon() has to be called every time the view size
changes)
*/
-basegfx::B2DPolyPolygon prepareClip( const basegfx::B2DPolyPolygon& rClip )
+basegfx::B2DPolyPolygon prepareClip( const basegfx::B2DPolyPolygon& rClip )
{
basegfx::B2DPolyPolygon aClip( rClip );
@@ -159,14 +160,14 @@ basegfx::B2DPolyPolygon prepareClip( const basegfx::B2DPolyPolygon& rClip )
// AW: Should be no longer necessary; tools are now bezier-safe
if( aClip.areControlPointsUsed() )
aClip = basegfx::tools::adaptiveSubdivideByAngle( aClip );
-
+
// normalize polygon, preparation for clipping
// in updateCanvas()
aClip = basegfx::tools::correctOrientations(aClip);
aClip = basegfx::tools::solveCrossovers(aClip);
aClip = basegfx::tools::stripNeutralPolygons(aClip);
aClip = basegfx::tools::stripDispensablePolygons(aClip, false);
-
+
return aClip;
}
@@ -183,7 +184,7 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas,
pCanvas->setClip( aClipPoly );
}
- // set transformation to identitiy (->device pixel)
+ // set transformation to identity (->device pixel)
pCanvas->setTransformation( ::basegfx::B2DHomMatrix() );
// #i42440# Fill the _full_ background in
@@ -195,8 +196,8 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas,
::basegfx::tools::createPolygonFromRect(
basegfx::B2DRange(rArea)));
- ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
- ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCanvas,
+ ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
+ ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCanvas,
aPoly ) );
if( pPolyPoly )
@@ -213,7 +214,7 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas,
if( pCanvas->getClip() )
{
::cppcanvas::PolyPolygonSharedPtr pPolyPoly2(
- ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCliplessCanvas,
+ ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCliplessCanvas,
*(pCanvas->getClip()) ));
if( pPolyPoly2 )
{
@@ -239,16 +240,16 @@ basegfx::B2IRange getLayerBoundsPixel( basegfx::B2DRange const& rLayerBounds
basegfx::B2DHomMatrix const& rTransformation )
{
::basegfx::B2DRange aTmpRect;
- ::canvas::tools::calcTransformedRectBounds( aTmpRect,
- rLayerBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRect,
+ rLayerBounds,
rTransformation );
if( aTmpRect.isEmpty() )
return ::basegfx::B2IRange();
- // #i42440# Returned layer size is one pixel too small, as
- // rendering happens one pixel to the right and below the
- // actual bound rect.
+ // #i42440# Returned layer size is one pixel too small, as
+ // rendering happens one pixel to the right and below the
+ // actual bound rect.
return ::basegfx::B2IRange( ::basegfx::fround(aTmpRect.getMinX()),
::basegfx::fround(aTmpRect.getMinY()),
::basegfx::fround(aTmpRect.getMaxX()) + 1,
@@ -277,8 +278,8 @@ class LayerSpriteContainer
*/
SpriteVector maSprites;
- /// Priority of this layer, relative to other view layers
- basegfx::B1DRange maLayerPrioRange;
+ // Priority of this layer, relative to other view layers
+ basegfx::B1DRange maLayerPrioRange;
double getSpritePriority( std::size_t nSpriteNum ) const
{
@@ -308,14 +309,14 @@ class LayerSpriteContainer
while( aCurrSprite != aEnd )
{
cppcanvas::CustomSpriteSharedPtr pCurrSprite( aCurrSprite->mpSprite.lock() );
-
+
if( pCurrSprite )
{
// only copy still valid sprites over to the refreshed
// sprite vector.
aValidSprites.push_back( *aCurrSprite );
- pCurrSprite->setPriority(
+ pCurrSprite->setPriority(
getSpritePriority( aValidSprites.size()-1 ));
}
@@ -379,7 +380,7 @@ public:
// prio). This basically caters for the common case of
// iterated character animations, which generate lots of
// sprites, all added to the end.
- pSprite->setPriority(
+ pSprite->setPriority(
getSpritePriority( nNumSprites-1 ));
}
}
@@ -406,28 +407,28 @@ public:
the layer priority changes, the sprites change z order together
with their parent.
*/
-class SlideViewLayer : public ViewLayer,
+class SlideViewLayer : public ViewLayer,
private boost::noncopyable
{
- /// Smart container for all sprites issued by this layer
+ // Smart container for all sprites issued by this layer
mutable LayerSpriteContainer maSpriteContainer;
- /// Bounds of this layer in user space coordinates
+ // Bounds of this layer in user space coordinates
basegfx::B2DRange maLayerBounds;
- /// Bounds of this layer in device pixel
+ // Bounds of this layer in device pixel
mutable basegfx::B2IRange maLayerBoundsPixel;
- /// Current clip polygon in user coordinates
+ // Current clip polygon in user coordinates
basegfx::B2DPolyPolygon maClip;
-
- /// Current size of the view in user coordinates
+
+ // Current size of the view in user coordinates
basegfx::B2DSize maUserSize;
- /// Current overall view transformation
+ // Current overall view transformation
basegfx::B2DHomMatrix maTransformation;
- /// 'parent' canvas, this viewlayer is associated with
+ // 'parent' canvas, this viewlayer is associated with
const cppcanvas::SpriteCanvasSharedPtr mpSpriteCanvas;
/** output surface (necessarily a sprite, won't otherwise be able
@@ -435,10 +436,10 @@ class SlideViewLayer : public ViewLayer,
*/
mutable cppcanvas::CustomSpriteSharedPtr mpSprite;
- /// actual output canvas retrieved from a sprite
+ // actual output canvas retrieved from a sprite
mutable cppcanvas::CanvasSharedPtr mpOutputCanvas;
-
- /// ptr back to owning view. needed for isOnView() method
+
+ // ptr back to owning view. needed for isOnView() method
View const* const mpParentView;
public:
@@ -468,7 +469,7 @@ public:
mpSprite(),
mpOutputCanvas(),
mpParentView(pParentView)
- {
+ {
}
void updateView( const basegfx::B2DHomMatrix& rMatrix,
@@ -529,13 +530,13 @@ private:
// Offset given transformation by left, top border of given
// range (after transformation through given transformation)
basegfx::B2DRectangle aTmpRect;
- canvas::tools::calcTransformedRectBounds( aTmpRect,
- maLayerBounds,
+ canvas::tools::calcTransformedRectBounds( aTmpRect,
+ maLayerBounds,
maTransformation );
basegfx::B2DHomMatrix aMatrix( maTransformation );
- // Add translation according to the origin of aTmpRect. Ignore the
+ // Add translation according to the origin of aTmpRect. Ignore the
// translation when aTmpRect was not properly initialized.
if ( ! aTmpRect.isEmpty())
{
@@ -596,40 +597,40 @@ private:
basegfx::B2DVector(sal::static_int_cast<sal_Int32>(rSpriteSize.getX()),
sal::static_int_cast<sal_Int32>(rSpriteSize.getY())) );
- mpSprite->setPriority(
+ mpSprite->setPriority(
maSpriteContainer.getLayerPriority().getMinimum() );
#if defined(VERBOSE) && defined(DBG_UTIL)
- mpSprite->movePixel(
- basegfx::B2DPoint(maLayerBoundsPixel.getMinimum()) +
+ mpSprite->movePixel(
+ basegfx::B2DPoint(maLayerBoundsPixel.getMinimum()) +
basegfx::B2DPoint(10,10) );
- mpSprite->setAlpha(0.5);
+ mpSprite->setAlpha(0.5);
#else
- mpSprite->movePixel(
+ mpSprite->movePixel(
basegfx::B2DPoint(maLayerBoundsPixel.getMinimum()) );
- mpSprite->setAlpha(1.0);
+ mpSprite->setAlpha(1.0);
#endif
- mpSprite->show();
+ mpSprite->show();
}
ENSURE_OR_THROW( mpSprite,
"SlideViewLayer::getCanvas(): no layer sprite" );
mpOutputCanvas = mpSprite->getContentCanvas();
-
+
ENSURE_OR_THROW( mpOutputCanvas,
"SlideViewLayer::getCanvas(): sprite doesn't yield a canvas" );
// new canvas retrieved - setup transformation and clip
mpOutputCanvas->setTransformation( getTransformation() );
- mpOutputCanvas->setClip(
+ mpOutputCanvas->setClip(
createClipPolygon( maClip,
mpOutputCanvas,
maUserSize ));
}
-
+
return mpOutputCanvas;
}
@@ -642,7 +643,7 @@ private:
maClip = aNewClip;
if(mpOutputCanvas )
- mpOutputCanvas->setClip(
+ mpOutputCanvas->setClip(
createClipPolygon( maClip,
mpOutputCanvas,
maUserSize ));
@@ -664,7 +665,7 @@ private:
// ---------------------------------------------------------
typedef cppu::WeakComponentImplHelper2<
- ::com::sun::star::util::XModifyListener,
+ ::com::sun::star::util::XModifyListener,
::com::sun::star::awt::XPaintListener> SlideViewBase;
/** SlideView class
@@ -724,10 +725,10 @@ private:
void updateClip();
-private:
+private:
typedef std::vector< boost::weak_ptr<SlideViewLayer> > ViewLayerVector;
- /// Prune viewlayers from deceased ones, optionally update them
+ // Prune viewlayers from deceased ones, optionally update them
void pruneLayers( bool bWithViewLayerUpdate=false ) const;
/** Max fill level of maViewLayers, before we try to prune it from
@@ -737,15 +738,15 @@ private:
uno::Reference<presentation::XSlideShowView> mxView;
cppcanvas::SpriteCanvasSharedPtr mpCanvas;
-
+
EventMultiplexer& mrEventMultiplexer;
EventQueue& mrEventQueue;
mutable LayerSpriteContainer maSprites;
- mutable ViewLayerVector maViewLayers;
+ mutable ViewLayerVector maViewLayers;
basegfx::B2DPolyPolygon maClip;
-
+
basegfx::B2DHomMatrix maViewTransform;
basegfx::B2DSize maUserSize;
bool mbIsSoundEnabled;
@@ -764,19 +765,19 @@ SlideView::SlideView( const uno::Reference<presentation::XSlideShowView>& xView,
maViewLayers(),
maClip(),
maViewTransform(),
- maUserSize( 1.0, 1.0 ), // default size: one-by-one rectangle
+ maUserSize( 1.0, 1.0 ), // default size: one-by-one rectangle
mbIsSoundEnabled(true)
{
// take care not constructing any UNO references to this _inside_
- // ctor, shift that code to createSlideView()!
+ // ctor, shift that code to createSlideView()!
ENSURE_OR_THROW( mxView.is(),
"SlideView::SlideView(): Invalid view" );
-
+
mpCanvas = cppcanvas::VCLFactory::getInstance().createSpriteCanvas(
xView->getCanvas() );
- ENSURE_OR_THROW( mpCanvas,
+ ENSURE_OR_THROW( mpCanvas,
"Could not create cppcanvas" );
-
+
geometry::AffineMatrix2D aViewTransform(
xView->getTransformation() );
@@ -787,12 +788,12 @@ SlideView::SlideView( const uno::Reference<presentation::XSlideShowView>& xView,
basegfx::B2DVector(aViewTransform.m01,
aViewTransform.m11).getLength()) )
{
- OSL_ENSURE( false,
+ OSL_ENSURE( false,
"SlideView::SlideView(): Singular matrix!" );
canvas::tools::setIdentityAffineMatrix2D(aViewTransform);
}
-
+
basegfx::unotools::homMatrixFromAffineMatrix(
maViewTransform, aViewTransform );
@@ -810,7 +811,7 @@ void SlideView::disposing()
mpCanvas.reset();
// additionally, also de-register from XSlideShowView
- if (mxView.is())
+ if (mxView.is())
{
mxView->removeTransformationChangedListener( this );
mxView->removePaintListener( this );
@@ -822,7 +823,7 @@ ViewLayerSharedPtr SlideView::createViewLayer( const basegfx::B2DRange& rLayerBo
{
osl::MutexGuard aGuard( m_aMutex );
- ENSURE_OR_THROW( mpCanvas,
+ ENSURE_OR_THROW( mpCanvas,
"SlideView::createViewLayer(): Disposed" );
const std::size_t nNumLayers( maViewLayers.size() );
@@ -866,7 +867,7 @@ void SlideView::clear() const
{
osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( mxView.is() && mpCanvas,
+ OSL_ENSURE( mxView.is() && mpCanvas,
"SlideView::clear(): Disposed" );
if( !mxView.is() || !mpCanvas )
return;
@@ -884,7 +885,7 @@ void SlideView::clearAll() const
{
osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( mxView.is() && mpCanvas,
+ OSL_ENSURE( mxView.is() && mpCanvas,
"SlideView::clear(): Disposed" );
if( !mxView.is() || !mpCanvas )
return;
@@ -918,7 +919,7 @@ cppcanvas::CanvasSharedPtr SlideView::getCanvas() const
{
osl::MutexGuard aGuard( m_aMutex );
- ENSURE_OR_THROW( mpCanvas,
+ ENSURE_OR_THROW( mpCanvas,
"SlideView::getCanvas(): Disposed" );
return mpCanvas;
@@ -926,7 +927,7 @@ cppcanvas::CanvasSharedPtr SlideView::getCanvas() const
cppcanvas::CustomSpriteSharedPtr SlideView::createSprite(
const basegfx::B2DSize& rSpriteSizePixel,
- double nPriority ) const
+ double nPriority ) const
{
osl::MutexGuard aGuard( m_aMutex );
@@ -970,11 +971,11 @@ void SlideView::setClip( const basegfx::B2DPolyPolygon& rClip )
osl::MutexGuard aGuard( m_aMutex );
basegfx::B2DPolyPolygon aNewClip = prepareClip( rClip );
-
+
if( aNewClip != maClip )
{
- maClip = aNewClip;
-
+ maClip = aNewClip;
+
updateClip();
}
}
@@ -1020,7 +1021,7 @@ void SlideView::disposing( lang::EventObject const& evt )
// no deregistration necessary anymore, XView has left:
osl::MutexGuard const guard( m_aMutex );
- if (mxView.is())
+ if (mxView.is())
{
OSL_ASSERT( evt.Source == mxView );
mxView.clear();
@@ -1040,7 +1041,7 @@ void SlideView::modified( const lang::EventObject& /*aEvent*/ )
if( !mxView.is() )
return;
-
+
geometry::AffineMatrix2D aViewTransform(
mxView->getTransformation() );
@@ -1051,25 +1052,25 @@ void SlideView::modified( const lang::EventObject& /*aEvent*/ )
basegfx::B2DVector(aViewTransform.m01,
aViewTransform.m11).getLength()) )
{
- OSL_ENSURE( false,
+ OSL_ENSURE( false,
"SlideView::modified(): Singular matrix!" );
canvas::tools::setIdentityAffineMatrix2D(aViewTransform);
}
-
+
// view transformation really changed?
basegfx::B2DHomMatrix aNewTransform;
basegfx::unotools::homMatrixFromAffineMatrix(
- aNewTransform,
+ aNewTransform,
aViewTransform );
if( aNewTransform == maViewTransform )
return; // No change, nothing to do
-
+
maViewTransform = aNewTransform;
updateCanvas();
-
+
// notify view change. Don't call EventMultiplexer directly, this
// might not be the main thread!
mrEventQueue.addEvent(
@@ -1087,7 +1088,7 @@ void SlideView::windowPaint( const awt::PaintEvent& /*e*/ )
osl::MutexGuard aGuard( m_aMutex );
OSL_ENSURE( mxView.is() && mpCanvas, "Disposed, but event received?!" );
-
+
// notify view clobbering. Don't call EventMultiplexer directly,
// this might not be the main thread!
mrEventQueue.addEvent(
@@ -1098,19 +1099,19 @@ void SlideView::windowPaint( const awt::PaintEvent& /*e*/ )
void SlideView::updateCanvas()
{
- OSL_ENSURE( mpCanvas,
+ OSL_ENSURE( mpCanvas,
"SlideView::updateCanvasTransform(): Disposed" );
if( !mpCanvas || !mxView.is())
return;
-
+
mpCanvas->clear(); // this is unnecessary, strictly speaking. but
// it makes the SlideView behave exactly like a
// sprite-based SlideViewLayer, because those
// are created from scratch after a resize
clearAll();
mpCanvas->setTransformation( getTransformation() );
- mpCanvas->setClip(
+ mpCanvas->setClip(
createClipPolygon( maClip,
mpCanvas,
maUserSize ));
@@ -1121,13 +1122,13 @@ void SlideView::updateCanvas()
void SlideView::updateClip()
{
- OSL_ENSURE( mpCanvas,
+ OSL_ENSURE( mpCanvas,
"SlideView::updateClip(): Disposed" );
if( !mpCanvas )
return;
-
- mpCanvas->setClip(
+
+ mpCanvas->setClip(
createClipPolygon( maClip,
mpCanvas,
maUserSize ));
@@ -1139,7 +1140,7 @@ void SlideView::pruneLayers( bool bWithViewLayerUpdate ) const
{
ViewLayerVector aValidLayers;
- const basegfx::B2DHomMatrix& rCurrTransform(
+ const basegfx::B2DHomMatrix& rCurrTransform(
getTransformation() );
// check all layers for validity, and retain only the live ones
@@ -1148,11 +1149,11 @@ void SlideView::pruneLayers( bool bWithViewLayerUpdate ) const
while( aCurr != aEnd )
{
boost::shared_ptr< SlideViewLayer > pCurrLayer( aCurr->lock() );
-
+
if( pCurrLayer )
{
aValidLayers.push_back( pCurrLayer );
-
+
if( bWithViewLayerUpdate )
pCurrLayer->updateView( rCurrTransform,
maUserSize );
@@ -1173,17 +1174,17 @@ UnoViewSharedPtr createSlideView( uno::Reference< presentation::XSlideShowView>
{
boost::shared_ptr<SlideView> const that(
comphelper::make_shared_from_UNO(
- new SlideView(xView,
+ new SlideView(xView,
rEventQueue,
rEventMultiplexer)));
// register listeners with XSlideShowView
xView->addTransformationChangedListener( that.get() );
xView->addPaintListener( that.get() );
-
+
// set new transformation
that->updateCanvas();
-
+
return that;
}
[openoffice] 01/02: Removed whitespace, fixed typos
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 23b51d7e92a34f26a33e9c1f70743f468609a21f
Author: mseidel <ms...@apache.org>
AuthorDate: Sun Apr 18 13:41:06 2021 +0200
Removed whitespace, fixed typos
(cherry picked from commit b1fb923c00bf9e99ed13c36972688b9a7e4939c1)
---
main/slideshow/source/engine/slideshowimpl.cxx | 676 ++++++++++++-------------
1 file changed, 338 insertions(+), 338 deletions(-)
diff --git a/main/slideshow/source/engine/slideshowimpl.cxx b/main/slideshow/source/engine/slideshowimpl.cxx
index bfe5a05..deeec91 100644
--- a/main/slideshow/source/engine/slideshowimpl.cxx
+++ b/main/slideshow/source/engine/slideshowimpl.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -119,8 +119,8 @@ using namespace ::slideshow::internal;
namespace {
/** During animations the update() method tells its caller to call it as
- soon as possible. This gives us more time to render the next frame and
- still maintain a steady frame rate. This class is responsible for
+ soon as possible. This gives us more time to render the next frame and
+ still maintain a steady frame rate. This class is responsible for
synchronizing the display of new frames and thus keeping the frame rate
steady.
*/
@@ -133,9 +133,9 @@ public:
seconds.
*/
FrameSynchronization (const double nFrameDuration);
-
+
/** Set the current time as the time at which the current frame is
- displayed. From this the target time of the next frame is derived.
+ displayed. From this the target time of the next frame is derived.
*/
void MarkCurrentFrame (void);
@@ -145,19 +145,19 @@ public:
void Synchronize (void);
/** Activate frame synchronization when an animation is active and
- frames are to be displayed in a steady rate. While active
+ frames are to be displayed in a steady rate. While active
Synchronize() will wait until the frame duration time has passed.
*/
void Activate (void);
- /** Deactivate frame sychronization when no animation is active and the
+ /** Deactivate frame synchronization when no animation is active and the
time between frames depends on user actions and other external
- sources. While deactivated Synchronize() will return without delay.
+ sources. While deactivated Synchronize() will return without delay.
*/
void Deactivate (void);
- /** Return the current time of the timer. It is not synchronized with
- any other timer so its absolute values are of no concern. Typically
+ /** Return the current time of the timer. It is not synchronized with
+ any other timer so its absolute values are of no concern. Typically
used during debugging to measure durations.
*/
double GetCurrentTime (void) const;
@@ -168,7 +168,7 @@ private:
animations.
*/
canvas::tools::ElapsedTime maTimer;
- /** Time between the display of frames. Enforced only when mbIsActive
+ /** Time between the display of frames. Enforced only when mbIsActive
is <TRUE/>.
*/
const double mnFrameDuration;
@@ -176,7 +176,7 @@ private:
Synchronize() will wait until this time.
*/
double mnNextFrameTargetTime;
- /** Synchronize() will wait only when this flag is <TRUE/>. Otherwise
+ /** Synchronize() will wait only when this flag is <TRUE/>. Otherwise
it returns immediately.
*/
bool mbIsActive;
@@ -186,23 +186,23 @@ private:
/******************************************************************************
-
+
SlideShowImpl
This class encapsulates the slideshow presentation viewer.
-
+
With an instance of this class, it is possible to statically
and dynamically show a presentation, as defined by the
constructor-provided draw model (represented by a sequence
of ::com::sun::star::drawing::XDrawPage objects).
-
+
It is possible to show the presentation on multiple views
simultaneously (e.g. for a multi-monitor setup). Since this
class also relies on user interaction, the corresponding
XSlideShowView interface provides means to register some UI
event listeners (mostly borrowed from awt::XWindow interface).
-
- Since currently (mid 2004), OOo isn't very well suited to
+
+ Since currently (mid 2004), AOO isn't very well suited to
multi-threaded rendering, this class relies on <em>very
frequent</em> external update() calls, which will render the
next frame of animations. This works as follows: after the
@@ -215,18 +215,18 @@ private:
affairs (I've actually tried threading here, but failed
miserably when using the VCL canvas as the render backend -
deadlocked).
-
+
******************************************************************************/
typedef cppu::WeakComponentImplHelper1<presentation::XSlideShow> SlideShowImplBase;
typedef ::std::vector< ::cppcanvas::PolyPolygonSharedPtr> PolyPolygonVector;
-
-/// Maps XDrawPage for annotations persistence
+
+// Maps XDrawPage for annotations persistence
typedef ::std::map< ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage>,
PolyPolygonVector> PolygonMap;
-
+
class SlideShowImpl : private cppu::BaseMutex,
public CursorManager,
public SlideShowImplBase
@@ -276,7 +276,7 @@ public:
phase, when shape effects are running, and the phase
after the last shape animation has ended, but before
the next slide transition starts.
-
+
This method notifies the end of the third phase.
*/
void notifySlideEnded (const bool bReverse);
@@ -285,9 +285,9 @@ public:
has been clicked.
*/
bool notifyHyperLinkClicked( rtl::OUString const& hyperLink );
-
- /** Notification from eventmultiplexer that an animation event has occoured.
- This will be forewarded to all registered XSlideShowListener
+
+ /** Notification from eventmultiplexer that an animation event has occurred.
+ This will be forwarded to all registered XSlideShowListener
*/
bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode );
@@ -348,38 +348,38 @@ private:
virtual void resetCursor();
/** This is somewhat similar to displaySlide when called for the current
- slide. It has been simplified to take advantage of that no slide
- change takes place. Furthermore it does not show the slide
+ slide. It has been simplified to take advantage of that no slide
+ change takes place. Furthermore it does not show the slide
transition.
*/
void redisplayCurrentSlide (void);
-
+
protected:
// WeakComponentImplHelperBase
- virtual void SAL_CALL disposing();
-
- bool isDisposed() const
+ virtual void SAL_CALL disposing();
+
+ bool isDisposed() const
{
return (rBHelper.bDisposed || rBHelper.bInDispose);
}
-
+
private:
struct SeparateListenerImpl; friend struct SeparateListenerImpl;
class PrefetchPropertiesFunc; friend class PrefetchPropertiesFunc;
-
- /// Stop currently running show.
+
+ // Stop currently running show.
void stopShow();
-
- ///Find a polygons vector in maPolygons (map)
+
+ // Find a polygons vector in maPolygons (map)
PolygonMap::iterator findPolygons( uno::Reference<drawing::XDrawPage> const& xDrawPage);
-
- /// Creates a new slide.
+
+ // Creates a new slide.
SlideSharedPtr makeSlide(
uno::Reference<drawing::XDrawPage> const& xDrawPage,
uno::Reference<drawing::XDrawPagesSupplier> const& xDrawPages,
uno::Reference<animations::XAnimationNode> const& xRootNode );
-
- /// Checks whether the given slide/animation node matches mpPrefetchSlide
+
+ // Checks whether the given slide/animation node matches mpPrefetchSlide
static bool matches(
SlideSharedPtr const& pSlide,
uno::Reference<drawing::XDrawPage> const& xSlide,
@@ -391,19 +391,19 @@ private:
else
return (!xSlide.is() && !xNode.is());
}
-
- /// Resets the current slide transition sound object with a new one:
+
+ // Resets the current slide transition sound object with a new one:
SoundPlayerSharedPtr resetSlideTransitionSound(
uno::Any const& url = uno::Any(), bool bLoopSound = false );
-
- /// stops the current slide transition sound
+
+ // stops the current slide transition sound
void stopSlideTransitionSound();
/** Prepare a slide transition
-
+
This method registers all necessary events and
activities for a slide transition.
-
+
@return the slide change activity, or NULL for no transition effect
*/
ActivitySharedPtr createSlideTransition(
@@ -411,12 +411,12 @@ private:
const SlideSharedPtr& rLeavingSlide,
const SlideSharedPtr& rEnteringSlide,
const EventSharedPtr& rTransitionEndEvent );
-
- /** Request/release the wait symbol. The wait symbol is displayed when
- there are more requests then releases. Locking the wait symbol
+
+ /** Request/release the wait symbol. The wait symbol is displayed when
+ there are more requests then releases. Locking the wait symbol
helps to avoid intermediate repaints.
-
- Do not call this method directly. Use WaitSymbolLock instead.
+
+ Do not call this method directly. Use WaitSymbolLock instead.
*/
void requestWaitSymbol (void);
void releaseWaitSymbol (void);
@@ -428,9 +428,9 @@ private:
{ mrSlideShowImpl.releaseWaitSymbol(); }
private: SlideShowImpl& mrSlideShowImpl;
};
-
- /// Filter requested cursor shape against hard slideshow cursors (wait, etc.)
+
+ // Filter requested cursor shape against hard slideshow cursors (wait, etc.)
sal_Int16 calcActiveCursor( sal_Int16 nCursorShape ) const;
/** This method is called asynchronously to finish the rewinding of an
@@ -438,31 +438,31 @@ private:
*/
void rewindEffectToPreviousSlide (void);
- /// all registered views
+ // all registered views
UnoViewContainer maViewContainer;
-
- /// all registered slide show listeners
+
+ // all registered slide show listeners
cppu::OInterfaceContainerHelper maListenerContainer;
-
- /// map of vectors, containing all registered listeners for a shape
+
+ // map of vectors, containing all registered listeners for a shape
ShapeEventListenerMap maShapeEventListeners;
- /// map of sal_Int16 values, specifying the mouse cursor for every shape
+ // map of sal_Int16 values, specifying the mouse cursor for every shape
ShapeCursorMap maShapeCursors;
-
- //map of vector of Polygons, containing polygons drawn on each slide.
+
+ // map of vector of Polygons, containing polygons drawn on each slide.
PolygonMap maPolygons;
-
+
boost::optional<RGBColor> maUserPaintColor;
-
+
double maUserPaintStrokeWidth;
-
- //changed for the eraser project
+
+ // changed for the eraser project
boost::optional<bool> maEraseAllInk;
boost::optional<bool> maSwitchPenMode;
boost::optional<bool> maSwitchEraserMode;
boost::optional<sal_Int32> maEraseInk;
- //end changed
-
+ // end changed
+
boost::shared_ptr<canvas::tools::ElapsedTime> mpPresTimer;
ScreenUpdater maScreenUpdater;
EventQueue maEventQueue;
@@ -476,28 +476,28 @@ private:
boost::shared_ptr<RehearseTimingsActivity> mpRehearseTimingsActivity;
boost::shared_ptr<WaitSymbol> mpWaitSymbol;
- /// the current slide transition sound object:
+ // the current slide transition sound object:
SoundPlayerSharedPtr mpCurrentSlideTransitionSound;
-
+
uno::Reference<uno::XComponentContext> mxComponentContext;
uno::Reference<
presentation::XTransitionFactory> mxOptionalTransitionFactory;
- /// the previously running slide
+ // the previously running slide
SlideSharedPtr mpPreviousSlide;
- /// the currently running slide
+ // the currently running slide
SlideSharedPtr mpCurrentSlide;
- /// the already prefetched slide: best candidate for upcoming slide
+ // the already prefetched slide: best candidate for upcoming slide
SlideSharedPtr mpPrefetchSlide;
- /// slide to be prefetched: best candidate for upcoming slide
+ // slide to be prefetched: best candidate for upcoming slide
uno::Reference<drawing::XDrawPage> mxPrefetchSlide;
- /// save the XDrawPagesSupplier to retieve polygons
+ // save the XDrawPagesSupplier to retrieve polygons
uno::Reference<drawing::XDrawPagesSupplier> mxDrawPagesSupplier;
- /// slide animation to be prefetched:
+ // slide animation to be prefetched:
uno::Reference<animations::XAnimationNode> mxPrefetchAnimationNode;
sal_Int16 mnCurrentCursor;
-
+
sal_Int32 mnWaitSymbolRequestCount;
bool mbAutomaticAdvancementMode;
bool mbImageAnimationsAllowed;
@@ -529,22 +529,22 @@ struct SlideShowImpl::SeparateListenerImpl : public EventHandler,
ScreenUpdater& mrScreenUpdater;
EventQueue& mrEventQueue;
- SeparateListenerImpl( SlideShowImpl& rShow,
+ SeparateListenerImpl( SlideShowImpl& rShow,
ScreenUpdater& rScreenUpdater,
EventQueue& rEventQueue ) :
- mrShow( rShow ),
+ mrShow( rShow ),
mrScreenUpdater( rScreenUpdater ),
- mrEventQueue( rEventQueue )
+ mrEventQueue( rEventQueue )
{}
// EventHandler
virtual bool handleEvent()
{
- // DON't call notifySlideAnimationsEnded()
+ // DON'T call notifySlideAnimationsEnded()
// directly, but queue an event. handleEvent()
// might be called from e.g.
// showNext(), and notifySlideAnimationsEnded() must not be called
- // in recursion. Note that the event is scheduled for the next
+ // in recursion. Note that the event is scheduled for the next
// frame so that its expensive execution does not come in between
// sprite hiding and shape redraw (at the end of the animation of a
// shape), which would cause a flicker.
@@ -591,7 +591,7 @@ SlideShowImpl::SlideShowImpl(
maEventMultiplexer( maEventQueue,
maViewContainer ),
maActivitiesQueue( mpPresTimer ),
- maUserEventQueue( maEventMultiplexer,
+ maUserEventQueue( maEventMultiplexer,
maEventQueue,
*this ),
mpDummyPtr(),
@@ -622,8 +622,8 @@ SlideShowImpl::SlideShowImpl(
{
// keep care not constructing any UNO references to this inside ctor,
// shift that code to create()!
-
- uno::Reference<lang::XMultiComponentFactory> xFactory(
+
+ uno::Reference<lang::XMultiComponentFactory> xFactory(
mxComponentContext->getServiceManager() );
if( xFactory.is() )
@@ -631,10 +631,10 @@ SlideShowImpl::SlideShowImpl(
try
{
// #i82460# try to retrieve special transition factory
- mxOptionalTransitionFactory.set(
- xFactory->createInstanceWithContext(
+ mxOptionalTransitionFactory.set(
+ xFactory->createInstanceWithContext(
::rtl::OUString::createFromAscii( "com.sun.star.presentation.TransitionFactory" ),
- mxComponentContext ),
+ mxComponentContext ),
uno::UNO_QUERY );
}
catch (loader::CannotActivateFactoryException const&)
@@ -643,7 +643,7 @@ SlideShowImpl::SlideShowImpl(
}
mpListener.reset( new SeparateListenerImpl(
- *this,
+ *this,
maScreenUpdater,
maEventQueue ));
maEventMultiplexer.addSlideAnimationsEndHandler( mpListener );
@@ -659,7 +659,7 @@ void SlideShowImpl::disposing()
osl::MutexGuard const guard( m_aMutex );
maEffectRewinder.dispose();
-
+
// stop slide transition sound, if any:
stopSlideTransitionSound();
@@ -673,13 +673,13 @@ void SlideShowImpl::disposing()
mpWaitSymbol.reset();
- if( mpRehearseTimingsActivity )
+ if( mpRehearseTimingsActivity )
{
mpRehearseTimingsActivity->dispose();
mpRehearseTimingsActivity.reset();
}
- if( mpListener )
+ if( mpListener )
{
maEventMultiplexer.removeSlideAnimationsEndHandler(mpListener);
maEventMultiplexer.removeViewRepaintHandler(mpListener);
@@ -688,7 +688,7 @@ void SlideShowImpl::disposing()
maEventMultiplexer.removeAnimationEndHandler( mpListener );
mpListener.reset();
- }
+ }
maUserEventQueue.clear();
maActivitiesQueue.clear();
@@ -712,10 +712,10 @@ void SlideShowImpl::disposing()
mpPreviousSlide.reset();
}
-/// stops the current slide transition sound
+// stops the current slide transition sound
void SlideShowImpl::stopSlideTransitionSound()
{
- if (mpCurrentSlideTransitionSound)
+ if (mpCurrentSlideTransitionSound)
{
mpCurrentSlideTransitionSound->stopPlayback();
mpCurrentSlideTransitionSound->dispose();
@@ -737,15 +737,15 @@ SoundPlayerSharedPtr SlideShowImpl::resetSlideTransitionSound( const uno::Any& r
stopSlideTransitionSound();
- if (url.getLength() > 0)
+ if (url.getLength() > 0)
{
- try
+ try
{
mpCurrentSlideTransitionSound = SoundPlayer::create(
maEventMultiplexer, url, mxComponentContext );
mpCurrentSlideTransitionSound->setPlaybackLoop( bLoopSound );
}
- catch (lang::NoSupportException const&)
+ catch (lang::NoSupportException const&)
{
// catch possible exceptions from SoundPlayer, since
// being not able to playback the sound is not a hard
@@ -766,12 +766,12 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
"createSlideTransition(): No views" );
ENSURE_OR_THROW( rEnteringSlide,
"createSlideTransition(): No entering slide" );
-
+
// return empty transition, if slide transitions
// are disabled.
if (mbNoSlideTransitions)
return ActivitySharedPtr();
-
+
// retrieve slide change parameters from XDrawPage
uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
uno::UNO_QUERY );
@@ -792,7 +792,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
"Could not extract slide transition type from XDrawPage - assuming no transition\n" );
return ActivitySharedPtr();
}
-
+
sal_Int16 nTransitionSubType(0);
if( !getPropertyValue( nTransitionSubType,
xPropSet,
@@ -802,7 +802,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
"Could not extract slide transition subtype from XDrawPage - assuming no transition\n" );
return ActivitySharedPtr();
}
-
+
bool bTransitionDirection(false);
if( !getPropertyValue( bTransitionDirection,
xPropSet,
@@ -811,7 +811,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
OSL_TRACE( "createSlideTransition(): "
"Could not extract slide transition direction from XDrawPage - assuming default direction\n" );
}
-
+
sal_Int32 aUnoColor(0);
if( !getPropertyValue( aUnoColor,
xPropSet,
@@ -831,7 +831,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
if( !getPropertyValue( bLoopSound, xPropSet, OUSTR("LoopSound") ) )
OSL_TRACE( "createSlideTransition(): Could not get slide property 'LoopSound' - using no sound\n" );
-
+
NumberAnimationSharedPtr pTransition(
TransitionFactory::createSlideTransition(
rLeavingSlide,
@@ -861,7 +861,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
"Could not extract slide transition duration from XDrawPage - assuming no transition\n" );
return ActivitySharedPtr();
}
-
+
sal_Int32 nMinFrames(5);
if( !getPropertyValue( nMinFrames,
xPropSet,
@@ -870,12 +870,12 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
OSL_TRACE( "createSlideTransition(): "
"No minimal number of frames given - assuming 5\n" );
}
-
+
// prefetch slide transition bitmaps, but postpone it after
// displaySlide() has finished - sometimes, view size has not yet
// reached final size
- maEventQueue.addEvent(
- makeEvent(
+ maEventQueue.addEvent(
+ makeEvent(
boost::bind(
&::slideshow::internal::Animation::prefetch,
pTransition,
@@ -903,12 +903,12 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
PolygonMap::iterator SlideShowImpl::findPolygons( uno::Reference<drawing::XDrawPage> const& xDrawPage)
{
- // TODO(P2) : Optimze research in the map.
+ // TODO(P2) : Optimize research in the map.
bool bFound = false;
PolygonMap::iterator aIter=maPolygons.begin();
-
-
- while(aIter!=maPolygons.end() && !bFound)
+
+
+ while(aIter!=maPolygons.end() && !bFound)
{
if(aIter->first == xDrawPage)
bFound = true;
@@ -917,7 +917,7 @@ PolygonMap::iterator SlideShowImpl::findPolygons( uno::Reference<drawing::XDrawP
}
return aIter;
-}
+}
SlideSharedPtr SlideShowImpl::makeSlide(
uno::Reference<drawing::XDrawPage> const& xDrawPage,
@@ -927,11 +927,11 @@ SlideSharedPtr SlideShowImpl::makeSlide(
if( !xDrawPage.is() )
return SlideSharedPtr();
- //Retrieve polygons for the current slide
+ // Retrieve polygons for the current slide
PolygonMap::iterator aIter;
aIter = findPolygons(xDrawPage);
-
- const SlideSharedPtr pSlide( createSlide(xDrawPage,
+
+ const SlideSharedPtr pSlide( createSlide(xDrawPage,
xDrawPages,
xRootNode,
maEventQueue,
@@ -944,14 +944,14 @@ SlideSharedPtr SlideShowImpl::makeSlide(
mxComponentContext,
maShapeEventListeners,
maShapeCursors,
- (aIter != maPolygons.end()) ? aIter->second : PolyPolygonVector(),
+ (aIter != maPolygons.end()) ? aIter->second : PolyPolygonVector(),
maUserPaintColor ? *maUserPaintColor : RGBColor(),
maUserPaintStrokeWidth,
!!maUserPaintColor,
mbImageAnimationsAllowed,
mbDisableAnimationZOrder) );
-
- // prefetch show content (reducing latency for slide
+
+ // prefetch show content (reducing latency for slide
// bitmap and effect start later on)
pSlide->prefetch();
@@ -974,7 +974,7 @@ void SlideShowImpl::requestWaitSymbol (void)
mpWaitSymbol->show();
}
}
-
+
void SlideShowImpl::releaseWaitSymbol (void)
{
--mnWaitSymbolRequestCount;
@@ -1004,7 +1004,7 @@ sal_Int16 SlideShowImpl::calcActiveCursor( sal_Int16 nCursorShape ) const
return nCursorShape;
}
-
+
void SlideShowImpl::stopShow()
{
@@ -1013,13 +1013,13 @@ void SlideShowImpl::stopShow()
if (mpCurrentSlide)
{
mpCurrentSlide->hide();
- //Register polygons in the map
+ // Register polygons in the map
if(findPolygons(mpCurrentSlide->getXDrawPage()) != maPolygons.end())
maPolygons.erase(mpCurrentSlide->getXDrawPage());
-
- maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
+
+ maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
}
-
+
// clear all queues
maEventQueue.clear();
maActivitiesQueue.clear();
@@ -1036,7 +1036,7 @@ void SlideShowImpl::stopShow()
// re-enable automatic effect advancement
// (maEventQueue.clear() above might have killed
// maEventMultiplexer's tick events)
- if (mbAutomaticAdvancementMode)
+ if (mbAutomaticAdvancementMode)
{
// toggle automatic mode (enabling just again is
// ignored by EventMultiplexer)
@@ -1047,7 +1047,7 @@ void SlideShowImpl::stopShow()
-class SlideShowImpl::PrefetchPropertiesFunc
+class SlideShowImpl::PrefetchPropertiesFunc
{
public:
PrefetchPropertiesFunc( SlideShowImpl * that_,
@@ -1057,13 +1057,13 @@ public:
mrbSkipAllMainSequenceEffects(rbSkipAllMainSequenceEffects),
mrbSkipSlideTransition(rbSkipSlideTransition)
{}
-
+
void operator()( beans::PropertyValue const& rProperty ) const {
if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("Prefetch") ))
+ RTL_CONSTASCII_STRINGPARAM("Prefetch") ))
{
uno::Sequence<uno::Any> seq;
- if ((rProperty.Value >>= seq) && seq.getLength() == 2)
+ if ((rProperty.Value >>= seq) && seq.getLength() == 2)
{
seq[0] >>= mpSlideShowImpl->mxPrefetchSlide;
seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode;
@@ -1079,7 +1079,7 @@ public:
{
rProperty.Value >>= mrbSkipSlideTransition;
}
- else
+ else
{
OSL_ENSURE( false, rtl::OUStringToOString(
rProperty.Name, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -1109,8 +1109,8 @@ void SlideShowImpl::displaySlide(
DBG_TESTSOLARMUTEX();
mxDrawPagesSupplier = xDrawPages;
-
- stopShow(); // MUST call that: results in
+
+ stopShow(); // MUST call that: results in
// maUserEventQueue.clear(). What's more,
// stopShow()'s currSlide->hide() call is
// now also required, notifySlideEnded()
@@ -1124,7 +1124,7 @@ void SlideShowImpl::displaySlide(
std::for_each( rProperties.getConstArray(),
rProperties.getConstArray() + rProperties.getLength(),
PrefetchPropertiesFunc(this, bSkipAllMainSequenceEffects, bSkipSlideTransition) );
-
+
OSL_ENSURE( !maViewContainer.empty(), "### no views!" );
if (maViewContainer.empty())
return;
@@ -1132,20 +1132,20 @@ void SlideShowImpl::displaySlide(
// this here might take some time
{
WaitSymbolLock aLock (*this);
-
+
mpPreviousSlide = mpCurrentSlide;
mpCurrentSlide.reset();
- if (matches( mpPrefetchSlide, xSlide, xRootNode ))
+ if (matches( mpPrefetchSlide, xSlide, xRootNode ))
{
// prefetched slide matches:
mpCurrentSlide = mpPrefetchSlide;
}
- else
+ else
mpCurrentSlide = makeSlide( xSlide, xDrawPages, xRootNode );
-
+
OSL_ASSERT( mpCurrentSlide );
- if (mpCurrentSlide)
+ if (mpCurrentSlide)
{
basegfx::B2DSize oldSlideSize;
if( mpPreviousSlide )
@@ -1156,19 +1156,19 @@ void SlideShowImpl::displaySlide(
// push new transformation to all views, if size changed
if( !mpPreviousSlide || oldSlideSize != slideSize )
{
- std::for_each( maViewContainer.begin(),
+ std::for_each( maViewContainer.begin(),
maViewContainer.end(),
boost::bind( &View::setViewSize, _1,
boost::cref(slideSize) ));
-
+
// explicitly notify view change here,
// because transformation might have changed:
// optimization, this->notifyViewChange() would
// repaint slide which is not necessary.
maEventMultiplexer.notifyViewsChanged();
}
-
- // create slide transition, and add proper end event
+
+ // create slide transition, and add proper end event
// (which then starts the slide effects
// via CURRENT_SLIDE.show())
ActivitySharedPtr pSlideChangeActivity (
@@ -1176,7 +1176,7 @@ void SlideShowImpl::displaySlide(
mpCurrentSlide->getXDrawPage(),
mpPreviousSlide,
mpCurrentSlide,
- makeEvent(
+ makeEvent(
boost::bind(
&SlideShowImpl::notifySlideTransitionEnded,
this,
@@ -1186,23 +1186,23 @@ void SlideShowImpl::displaySlide(
if (bSkipSlideTransition)
{
// The transition activity was created for the side effects
- // (like sound transitions). Because we want to skip the
- // acutual transition animation we do not need the activity
+ // (like sound transitions). Because we want to skip the
+ // actual transition animation we do not need the activity
// anymore.
pSlideChangeActivity.reset();
}
-
- if (pSlideChangeActivity)
+
+ if (pSlideChangeActivity)
{
// factory generated a slide transition - activate it!
maActivitiesQueue.addActivity( pSlideChangeActivity );
}
- else
+ else
{
// no transition effect on this slide - schedule slide
// effect start event right away.
- maEventQueue.addEvent(
- makeEvent(
+ maEventQueue.addEvent(
+ makeEvent(
boost::bind(
&SlideShowImpl::notifySlideTransitionEnded,
this,
@@ -1216,8 +1216,8 @@ void SlideShowImpl::displaySlide(
maListenerContainer.forEach<presentation::XSlideShowListener>(
boost::mem_fn( &presentation::XSlideShowListener::slideTransitionStarted ) );
- // We are currently rewinding an effect. This lead us from the next
- // slide to this one. To complete this we have to play back all main
+ // We are currently rewinding an effect. This lead us from the next
+ // slide to this one. To complete this we have to play back all main
// sequence effects on this slide.
if (bSkipAllMainSequenceEffects)
maEffectRewinder.skipAllMainSequenceEffects();
@@ -1233,15 +1233,15 @@ void SlideShowImpl::redisplayCurrentSlide (void)
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
stopShow();
-
+
OSL_ENSURE( !maViewContainer.empty(), "### no views!" );
if (maViewContainer.empty())
return;
// No transition effect on this slide - schedule slide
// effect start event right away.
- maEventQueue.addEvent(
- makeEvent(
+ maEventQueue.addEvent(
+ makeEvent(
boost::bind(
&SlideShowImpl::notifySlideTransitionEnded,
this,
@@ -1259,7 +1259,7 @@ sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException)
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1269,14 +1269,14 @@ sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException)
return maEventMultiplexer.notifyNextEffect();
}
-
+
sal_Bool SlideShowImpl::previousEffect() throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1299,16 +1299,16 @@ void SlideShowImpl::rewindEffectToPreviousSlide (void)
// A previous call to EffectRewinder::Rewind could not rewind the current
// effect because there are no effects on the current slide or none has
- // yet been displayed. Go to the previous slide.
+ // yet been displayed. Go to the previous slide.
notifySlideEnded(true);
-
+
// Process pending events once more in order to have the following
- // screen update show the last effect. Not sure whether this should be
+ // screen update show the last effect. Not sure whether this should be
// necessary.
maEventQueue.forceEmpty();
-
+
// We have to call the screen updater before the wait symbol is turned
- // off. Otherwise the wait symbol would force the display of an
+ // off. Otherwise the wait symbol would force the display of an
// intermediate state of the slide (before the effects are replayed.)
maScreenUpdater.commitUpdates();
}
@@ -1348,7 +1348,7 @@ sal_Bool SlideShowImpl::pause( sal_Bool bPauseShow )
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1357,9 +1357,9 @@ sal_Bool SlideShowImpl::pause( sal_Bool bPauseShow )
mpPresTimer->pauseTimer();
else
mpPresTimer->continueTimer();
-
+
maEventMultiplexer.notifyPauseMode(bPauseShow);
-
+
mbShowPaused = bPauseShow;
return true;
}
@@ -1371,7 +1371,7 @@ uno::Reference<drawing::XDrawPage> SlideShowImpl::getCurrentSlide()
if (isDisposed())
return uno::Reference<drawing::XDrawPage>();
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1389,7 +1389,7 @@ sal_Bool SlideShowImpl::addView(
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1397,18 +1397,18 @@ sal_Bool SlideShowImpl::addView(
ENSURE_OR_RETURN_FALSE( xView.is(), "addView(): Invalid view" );
ENSURE_OR_RETURN_FALSE( xView->getCanvas().is(),
"addView(): View does not provide a valid canvas" );
-
+
UnoViewSharedPtr const pView( createSlideView(
- xView,
+ xView,
maEventQueue,
maEventMultiplexer ));
if (!maViewContainer.addView( pView ))
return false; // view already added
-
+
// initialize view content
// =======================
- if (mpCurrentSlide)
+ if (mpCurrentSlide)
{
// set view transformation
const basegfx::B2ISize slideSize = mpCurrentSlide->getSlideSize();
@@ -1416,7 +1416,7 @@ sal_Bool SlideShowImpl::addView(
slideSize.getY() ) );
}
- // clear view area (since its newly added,
+ // clear view area (since its newly added,
// we need a clean slate)
pView->clearAll();
@@ -1434,27 +1434,27 @@ sal_Bool SlideShowImpl::removeView(
throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
ENSURE_OR_RETURN_FALSE( xView.is(), "removeView(): Invalid view" );
-
+
UnoViewSharedPtr const pView( maViewContainer.removeView( xView ) );
if( !pView )
return false; // view was not added in the first place
-
+
// remove view from EventMultiplexer (mouse events etc.)
maEventMultiplexer.notifyViewRemoved( pView );
-
+
pView->_dispose();
return true;
}
void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMultiServiceFactory >& xDocFactory ) throw (uno::RuntimeException)
-{
- //Retrieve Polygons if user ends presentation by context menu
+{
+ // Retrieve Polygons if user ends presentation by context menu
if (mpCurrentSlide)
{
if(findPolygons(mpCurrentSlide->getXDrawPage()) != maPolygons.end())
@@ -1462,71 +1462,71 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
}
-
- //Creating the layer for shapes
+
+ // Creating the layer for shapes
// query for the XLayerManager
uno::Reference< drawing::XLayerSupplier > xLayerSupplier(xDocFactory, uno::UNO_QUERY);
uno::Reference< container::XNameAccess > xNameAccess = xLayerSupplier->getLayerManager();
-
+
uno::Reference< drawing::XLayerManager > xLayerManager(xNameAccess, uno::UNO_QUERY);
// create a layer and set its properties
uno::Reference< drawing::XLayer > xDrawnInSlideshow = xLayerManager->insertNewByIndex(xLayerManager->getCount());
uno::Reference< beans::XPropertySet > xLayerPropSet(xDrawnInSlideshow, uno::UNO_QUERY);
-
- //Layer Name which enables to catch annotations
+
+ // Layer Name which enables to catch annotations
rtl::OUString layerName = rtl::OUString::createFromAscii("DrawnInSlideshow");
uno::Any aPropLayer;
-
+
aPropLayer <<= layerName;
xLayerPropSet->setPropertyValue(rtl::OUString::createFromAscii("Name"), aPropLayer);
-
+
aPropLayer <<= true;
xLayerPropSet->setPropertyValue(rtl::OUString::createFromAscii("IsVisible"), aPropLayer);
-
+
aPropLayer <<= false;
xLayerPropSet->setPropertyValue(rtl::OUString::createFromAscii("IsLocked"), aPropLayer);
PolygonMap::iterator aIter=maPolygons.begin();
-
+
PolyPolygonVector aPolygons;
::cppcanvas::PolyPolygonSharedPtr pPolyPoly;
::basegfx::B2DPolyPolygon b2DPolyPoly;
-
- //Register polygons for each slide
- while(aIter!=maPolygons.end())
+
+ // Register polygons for each slide
+ while(aIter!=maPolygons.end())
{
aPolygons = aIter->second;
- //Get shapes for the slide
+ // Get shapes for the slide
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > Shapes(aIter->first, ::com::sun::star::uno::UNO_QUERY);
- //Retrieve polygons for one slide
- for( PolyPolygonVector::iterator aIterPoly=aPolygons.begin(),
+ // Retrieve polygons for one slide
+ for( PolyPolygonVector::iterator aIterPoly=aPolygons.begin(),
aEnd=aPolygons.end();
aIterPoly!=aEnd; ++aIterPoly )
- {
+ {
pPolyPoly = (*aIterPoly);
- b2DPolyPoly = ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(pPolyPoly->getUNOPolyPolygon());
-
- //Normally there is only one polygon
+ b2DPolyPoly = ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(pPolyPoly->getUNOPolyPolygon());
+
+ // Normally there is only one polygon
for(sal_uInt32 i=0; i< b2DPolyPoly.count();i++)
{
- const ::basegfx::B2DPolygon& aPoly = b2DPolyPoly.getB2DPolygon(i);
+ const ::basegfx::B2DPolygon& aPoly = b2DPolyPoly.getB2DPolygon(i);
sal_uInt32 nPoints = aPoly.count();
-
+
if( nPoints > 1)
{
- //create the PolyLineShape
+ // create the PolyLineShape
uno::Reference< uno::XInterface > polyshape(xDocFactory->createInstance(
- rtl::OUString::createFromAscii("com.sun.star.drawing.PolyLineShape") ) );
+ rtl::OUString::createFromAscii("com.sun.star.drawing.PolyLineShape") ) );
uno::Reference< drawing::XShape > rPolyShape(polyshape, uno::UNO_QUERY);
-
- //Add the shape to the slide
+
+ // Add the shape to the slide
Shapes->add(rPolyShape);
-
- //Retrieve shape properties
+
+ // Retrieve shape properties
uno::Reference< beans::XPropertySet > aXPropSet = uno::Reference< beans::XPropertySet >( rPolyShape, uno::UNO_QUERY );
- //Construct a sequence of points sequence
+ // Construct a sequence of points sequence
drawing::PointSequenceSequence aRetval;
- //Create only one sequence for one polygon
+ // Create only one sequence for one polygon
aRetval.realloc( 1 );
// Retrieve the sequence of points from aRetval
drawing::PointSequence* pOuterSequence = aRetval.getArray();
@@ -1536,47 +1536,47 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
awt::Point* pInnerSequence = pOuterSequence->getArray();
for( sal_uInt32 n = 0; n < nPoints; n++ )
{
- //Create a point from the polygon
- *pInnerSequence++ = awt::Point(
- basegfx::fround(aPoly.getB2DPoint(n).getX()),
+ // Create a point from the polygon
+ *pInnerSequence++ = awt::Point(
+ basegfx::fround(aPoly.getB2DPoint(n).getX()),
basegfx::fround(aPoly.getB2DPoint(n).getY()));
}
- //Fill the properties
- //Give the built PointSequenceSequence.
+ // Fill the properties
+ // Give the built PointSequenceSequence.
uno::Any aParam;
aParam <<= aRetval;
- aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam );
+ aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam );
- //LineStyle : SOLID by default
+ // LineStyle : SOLID by default
uno::Any aAny;
drawing::LineStyle eLS;
eLS = drawing::LineStyle_SOLID;
aAny <<= eLS;
aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny );
- //LineColor
+ // LineColor
sal_uInt32 nLineColor;
nLineColor = pPolyPoly->getRGBALineColor();
- //Transform polygon color from RRGGBBAA to AARRGGBB
+ // Transform polygon color from RRGGBBAA to AARRGGBB
aAny <<= RGBAColor2UnoColor(nLineColor);
aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny );
-
- //LineWidth
+
+ // LineWidth
double fLineWidth;
fLineWidth = pPolyPoly->getStrokeWidth();
aAny <<= (sal_Int32)fLineWidth;
- aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny );
+ aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny );
- // make polygons special
+ // make polygons special
xLayerManager->attachShapeToLayer(rPolyShape, xDrawnInSlideshow);
}
- }
+ }
}
++aIter;
}
}
-
+
sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
throw (uno::RuntimeException)
{
@@ -1593,19 +1593,19 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
{
double nTimeout(0.0);
mbAutomaticAdvancementMode = (rProperty.Value >>= nTimeout);
- if (mbAutomaticAdvancementMode)
+ if (mbAutomaticAdvancementMode)
{
maEventMultiplexer.setAutomaticTimeout( nTimeout );
}
maEventMultiplexer.setAutomaticMode( mbAutomaticAdvancementMode );
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("UserPaintColor") ))
{
sal_Int32 nColor(0);
- if (rProperty.Value >>= nColor)
+ if (rProperty.Value >>= nColor)
{
OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
@@ -1617,7 +1617,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifyUserPaintColor( *maUserPaintColor );
}
- else
+ else
{
// disable user paint
maUserPaintColor.reset();
@@ -1630,22 +1630,22 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
- //adding support for erasing features in UserPaintOverlay
+
+ // adding support for erasing features in UserPaintOverlay
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("EraseAllInk") ))
{
bool nEraseAllInk(false);
- if (rProperty.Value >>= nEraseAllInk)
+ if (rProperty.Value >>= nEraseAllInk)
{
OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
-
+
// enable user paint
maEraseAllInk.reset( nEraseAllInk );
maEventMultiplexer.notifyEraseAllInk( *maEraseAllInk );
}
-
+
return true;
}
@@ -1653,7 +1653,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
RTL_CONSTASCII_STRINGPARAM("SwitchPenMode") ))
{
bool nSwitchPenMode(false);
- if (rProperty.Value >>= nSwitchPenMode)
+ if (rProperty.Value >>= nSwitchPenMode)
{
OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
@@ -1672,7 +1672,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
RTL_CONSTASCII_STRINGPARAM("SwitchEraserMode") ))
{
bool nSwitchEraserMode(false);
- if (rProperty.Value >>= nSwitchEraserMode)
+ if (rProperty.Value >>= nSwitchEraserMode)
{
OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
@@ -1682,7 +1682,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifySwitchEraserMode();
}
}
-
+
return true;
}
@@ -1692,19 +1692,19 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
RTL_CONSTASCII_STRINGPARAM("EraseInk") ))
{
sal_Int32 nEraseInk(100);
- if (rProperty.Value >>= nEraseInk)
+ if (rProperty.Value >>= nEraseInk)
{
OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
-
+
// enable user paint
maEraseInk.reset( nEraseInk );
maEventMultiplexer.notifyEraseInkWidth( *maEraseInk );
}
-
+
return true;
}
-
+
// new Property for pen's width
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("UserPaintStrokeWidth") ))
@@ -1720,27 +1720,27 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("AdvanceOnClick") ))
+ RTL_CONSTASCII_STRINGPARAM("AdvanceOnClick") ))
{
sal_Bool bAdvanceOnClick = sal_False;
if (! (rProperty.Value >>= bAdvanceOnClick))
return false;
maUserEventQueue.setAdvanceOnClick( bAdvanceOnClick );
return true;
- }
-
+ }
+
if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("DisableAnimationZOrder") ))
+ RTL_CONSTASCII_STRINGPARAM("DisableAnimationZOrder") ))
{
sal_Bool bDisableAnimationZOrder = sal_False;
if (! (rProperty.Value >>= bDisableAnimationZOrder))
return false;
mbDisableAnimationZOrder = bDisableAnimationZOrder == sal_True;
return true;
- }
-
+ }
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("ImageAnimationsAllowed") ) )
{
@@ -1758,7 +1758,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("MouseVisible") ))
{
@@ -1769,28 +1769,28 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("ForceManualAdvance") ))
+ RTL_CONSTASCII_STRINGPARAM("ForceManualAdvance") ))
{
return (rProperty.Value >>= mbForceManualAdvance);
}
-
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("RehearseTimings") ))
{
bool bRehearseTimings = false;
if (! (rProperty.Value >>= bRehearseTimings))
return false;
-
- if (bRehearseTimings)
+
+ if (bRehearseTimings)
{
// TODO(Q3): Move to slide
mpRehearseTimingsActivity = RehearseTimingsActivity::create(
SlideShowContext(
mpDummyPtr,
- maEventQueue,
- maEventMultiplexer,
+ maEventQueue,
+ maEventMultiplexer,
maScreenUpdater,
maActivitiesQueue,
maUserEventQueue,
@@ -1798,7 +1798,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maViewContainer,
mxComponentContext) );
}
- else if (mpRehearseTimingsActivity)
+ else if (mpRehearseTimingsActivity)
{
// removes timer from all views:
mpRehearseTimingsActivity->dispose();
@@ -1806,28 +1806,28 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
}
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("WaitSymbolBitmap") ))
{
uno::Reference<rendering::XBitmap> xBitmap;
if (! (rProperty.Value >>= xBitmap))
return false;
-
- mpWaitSymbol = WaitSymbol::create( xBitmap,
+
+ mpWaitSymbol = WaitSymbol::create( xBitmap,
maScreenUpdater,
maEventMultiplexer,
maViewContainer );
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("NoSlideTransitions") ))
+ RTL_CONSTASCII_STRINGPARAM("NoSlideTransitions") ))
{
return (rProperty.Value >>= mbNoSlideTransitions);
}
-
+
if (rProperty.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSoundEnabled")))
{
uno::Sequence<uno::Any> aValues;
@@ -1891,7 +1891,7 @@ void SlideShowImpl::addShapeEventListener(
if (isDisposed())
return;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1900,11 +1900,11 @@ void SlideShowImpl::addShapeEventListener(
maShapeEventListeners.end() )
{
// no entry for this shape -> create one
- aIter = maShapeEventListeners.insert(
+ aIter = maShapeEventListeners.insert(
ShapeEventListenerMap::value_type(
xShape,
- boost::shared_ptr<cppu::OInterfaceContainerHelper>(
- new cppu::OInterfaceContainerHelper(m_aMutex)))).first;
+ boost::shared_ptr<cppu::OInterfaceContainerHelper>(
+ new cppu::OInterfaceContainerHelper(m_aMutex)))).first;
}
// add new listener to broadcaster
@@ -1921,7 +1921,7 @@ void SlideShowImpl::removeShapeEventListener(
throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1935,7 +1935,7 @@ void SlideShowImpl::removeShapeEventListener(
aIter->second.get(),
"SlideShowImpl::removeShapeEventListener(): "
"listener map contains NULL broadcast helper" );
-
+
aIter->second->removeInterface( xListener );
}
@@ -1951,37 +1951,37 @@ void SlideShowImpl::setShapeCursor(
if (isDisposed())
return;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
ShapeCursorMap::iterator aIter;
- if( (aIter=maShapeCursors.find( xShape )) == maShapeCursors.end() )
+ if( (aIter=maShapeCursors.find( xShape )) == maShapeCursors.end() )
{
// no entry for this shape -> create one
- if( nPointerShape != awt::SystemPointer::ARROW )
+ if( nPointerShape != awt::SystemPointer::ARROW )
{
// add new entry, unless shape shall display
// normal pointer arrow -> no need to handle that
// case
maShapeCursors.insert(
- ShapeCursorMap::value_type(xShape,
+ ShapeCursorMap::value_type(xShape,
nPointerShape) );
}
}
- else if( nPointerShape == awt::SystemPointer::ARROW )
+ else if( nPointerShape == awt::SystemPointer::ARROW )
{
// shape shall display normal cursor -> can disable
// the cursor and clear the entry
maShapeCursors.erase( xShape );
}
- else
+ else
{
// existing entry found, update with new cursor ID
aIter->second = nPointerShape;
}
- maEventMultiplexer.notifyShapeCursorChange(xShape,
+ maEventMultiplexer.notifyShapeCursorChange(xShape,
nPointerShape);
}
@@ -1992,10 +1992,10 @@ bool SlideShowImpl::requestCursor( sal_Int16 nCursorShape )
const sal_Int16 nActualCursor = calcActiveCursor(mnCurrentCursor);
// change all views to the requested cursor ID
- std::for_each( maViewContainer.begin(),
+ std::for_each( maViewContainer.begin(),
maViewContainer.end(),
- boost::bind( &View::setCursorShape,
- _1,
+ boost::bind( &View::setCursorShape,
+ _1,
nActualCursor ));
return nActualCursor==nCursorShape;
@@ -2006,10 +2006,10 @@ void SlideShowImpl::resetCursor()
mnCurrentCursor = awt::SystemPointer::ARROW;
// change all views to the default cursor ID
- std::for_each( maViewContainer.begin(),
+ std::for_each( maViewContainer.begin(),
maViewContainer.end(),
- boost::bind( &View::setCursorShape,
- _1,
+ boost::bind( &View::setCursorShape,
+ _1,
calcActiveCursor(mnCurrentCursor) ));
}
@@ -2020,28 +2020,28 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
if (isDisposed())
return false;
-
+
// precondition: update() must only be called from the
// main thread!
DBG_TESTSOLARMUTEX();
- if( mbShowPaused )
+ if( mbShowPaused )
{
// commit frame (might be repaints pending)
maScreenUpdater.commitUpdates();
return false;
}
- else
+ else
{
// TODO(F2): re-evaluate whether that timer lagging makes
// sense.
-
+
// hold timer, while processing the queues:
// 1. when there is more than one active activity this ensures the
// same time for all activities and events
// 2. processing of events may lead to creation of further events
- // that have zero delay. While the timer is stopped these events
+ // that have zero delay. While the timer is stopped these events
// are processed in the same run.
{
comphelper::ScopeGuard scopeGuard(
@@ -2053,7 +2053,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
maEventQueue.process();
// #118671# the call above may execute a macro bound to an object. In
- // that case this macro may have destroyed this local sliseshow so that it
+ // that case this macro may have destroyed this local slideshow so that it
// is disposed (see bugdoc at task). In that case, detect this and exit
// gently from this slideshow. Do not forget to disable the scoped
// call to mpPresTimer, this will be deleted if we are disposed.
@@ -2090,7 +2090,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
// that to the next round, no updated static slide
// content. In short, the last shape animation of a slide
// tends to blink at its end.
-
+
// process dequeued activities _after_ commit to screen
maActivitiesQueue.processDequeued();
@@ -2098,27 +2098,27 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
maScreenUpdater.commitUpdates();
}
// Time held until here
-
+
const bool bActivitiesLeft = (! maActivitiesQueue.isEmpty());
const bool bTimerEventsLeft = (! maEventQueue.isEmpty());
const bool bRet = (bActivitiesLeft || bTimerEventsLeft);
-
- if (bRet)
+
+ if (bRet)
{
// calc nNextTimeout value:
- if (bActivitiesLeft)
+ if (bActivitiesLeft)
{
- // Activity queue is not empty. Tell caller that we would
+ // Activity queue is not empty. Tell caller that we would
// like to render another frame.
// Return a zero time-out to signal our caller to call us
- // back as soon as possible. The actual timing, waiting the
+ // back as soon as possible. The actual timing, waiting the
// appropriate amount of time between frames, is then done
// by the maFrameSynchronization object.
nNextTimeout = 0;
maFrameSynchronization.Activate();
}
- else
+ else
{
// timer events left:
// difference from current time (nota bene:
@@ -2159,7 +2159,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
uno::Reference< util::XUpdatable > xUpdatable( xView->getCanvas(),
uno::UNO_QUERY_THROW );
xUpdatable->update();
- }
+ }
catch( uno::RuntimeException& )
{
throw;
@@ -2178,7 +2178,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
mbSlideShowIdle = true;
}
#endif
-
+
return bRet;
}
}
@@ -2190,7 +2190,7 @@ void SlideShowImpl::notifySlideTransitionEnded( bool bPaintSlide )
OSL_ENSURE( !isDisposed(), "### already disposed!" );
OSL_ENSURE( mpCurrentSlide,
"notifySlideTransitionEnded(): Invalid current slide" );
- if (mpCurrentSlide)
+ if (mpCurrentSlide)
{
mpCurrentSlide->update_settings( !!maUserPaintColor, maUserPaintColor ? *maUserPaintColor : RGBColor(), maUserPaintStrokeWidth );
@@ -2211,25 +2211,25 @@ void queryAutomaticSlideTransition( uno::Reference<drawing::XDrawPage> const& xD
uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
uno::UNO_QUERY );
-
+
sal_Int32 nChange(0);
if( !xPropSet.is() ||
!getPropertyValue( nChange,
xPropSet,
- ::rtl::OUString(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Change"))) )
{
OSL_TRACE(
"queryAutomaticSlideTransition(): "
"Could not extract slide change mode from XDrawPage - assuming <none>\n" );
}
-
+
bHasAutomaticNextSlide = nChange == 1;
if( !xPropSet.is() ||
!getPropertyValue( nAutomaticNextSlideTimeout,
xPropSet,
- ::rtl::OUString(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Duration"))) )
{
OSL_TRACE(
@@ -2243,31 +2243,31 @@ void SlideShowImpl::notifySlideAnimationsEnded()
{
osl::MutexGuard const guard( m_aMutex );
- //Draw polygons above animations
+ // Draw polygons above animations
mpCurrentSlide->drawPolygons();
-
+
OSL_ENSURE( !isDisposed(), "### already disposed!" );
-
- // This struct will receive the (interruptable) event,
+
+ // This struct will receive the (interruptible) event,
// that triggers the notifySlideEnded() method.
InterruptableEventPair aNotificationEvents;
- if( maEventMultiplexer.getAutomaticMode() )
+ if( maEventMultiplexer.getAutomaticMode() )
{
OSL_ENSURE( ! mpRehearseTimingsActivity,
"unexpected: RehearseTimings mode!" );
-
+
// schedule a slide end event, with automatic mode's
// delay
aNotificationEvents = makeInterruptableDelay(
boost::bind<void>( boost::mem_fn(&SlideShowImpl::notifySlideEnded), this, false ),
maEventMultiplexer.getAutomaticTimeout() );
}
- else
+ else
{
OSL_ENSURE( mpCurrentSlide,
"notifySlideAnimationsEnded(): Invalid current slide!" );
-
+
bool bHasAutomaticNextSlide=false;
double nAutomaticNextSlideTimeout=0.0;
queryAutomaticSlideTransition(mpCurrentSlide->getXDrawPage(),
@@ -2287,37 +2287,37 @@ void SlideShowImpl::notifySlideAnimationsEnded()
aNotificationEvents = makeInterruptableDelay(
boost::bind<void>( boost::mem_fn(&SlideShowImpl::notifySlideEnded), this, false ),
nAutomaticNextSlideTimeout);
-
- // TODO(F2): Provide a mechanism to let the user override
+
+ // TODO(F2): Provide a mechanism to let the user override
// this automatic timeout via next()
}
- else
+ else
{
if (mpRehearseTimingsActivity)
mpRehearseTimingsActivity->start();
-
+
// generate click event. Thus, the user must
// trigger the actual end of a slide. No need to
- // generate interruptable event here, there's no
+ // generate interruptible event here, there's no
// timeout involved.
- aNotificationEvents.mpImmediateEvent =
+ aNotificationEvents.mpImmediateEvent =
makeEvent( boost::bind<void>(
boost::mem_fn(&SlideShowImpl::notifySlideEnded), this, false ),
"SlideShowImpl::notifySlideEnded");
}
}
-
+
// register events on the queues. To make automatic slide
- // changes interruptable, register the interruption event
+ // changes interruptible, register the interruption event
// as a nextEffectEvent target. Note that the timeout
// event is optional (e.g. manual slide changes don't
- // generate a timeout)
+ // generate a timeout)
maUserEventQueue.registerNextEffectEvent(
aNotificationEvents.mpImmediateEvent );
-
+
if( aNotificationEvents.mpTimeoutEvent )
maEventQueue.addEvent( aNotificationEvents.mpTimeoutEvent );
-
+
// current slide's main sequence is over. Now should be
// the time to prefetch the next slide (if any), and
// prepare the initial slide bitmap (speeds up slide
@@ -2325,14 +2325,14 @@ void SlideShowImpl::notifySlideAnimationsEnded()
// indeed might take some seconds.
{
WaitSymbolLock aLock (*this);
-
+
if (! matches( mpPrefetchSlide,
- mxPrefetchSlide, mxPrefetchAnimationNode ))
+ mxPrefetchSlide, mxPrefetchAnimationNode ))
{
mpPrefetchSlide = makeSlide( mxPrefetchSlide, mxDrawPagesSupplier,
mxPrefetchAnimationNode );
}
- if (mpPrefetchSlide)
+ if (mpPrefetchSlide)
{
// ignore return value, this is just to populate
// Slide's internal bitmap buffer, such that the time
@@ -2351,17 +2351,17 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse)
osl::MutexGuard const guard( m_aMutex );
OSL_ENSURE( !isDisposed(), "### already disposed!" );
-
- if (mpRehearseTimingsActivity && !bReverse)
+
+ if (mpRehearseTimingsActivity && !bReverse)
{
const double time = mpRehearseTimingsActivity->stop();
- if (mpRehearseTimingsActivity->hasBeenClicked())
+ if (mpRehearseTimingsActivity->hasBeenClicked())
{
// save time at current drawpage:
uno::Reference<beans::XPropertySet> xPropSet(
mpCurrentSlide->getXDrawPage(), uno::UNO_QUERY );
OSL_ASSERT( xPropSet.is() );
- if (xPropSet.is())
+ if (xPropSet.is())
{
xPropSet->setPropertyValue(
OUSTR("Change"),
@@ -2375,7 +2375,7 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse)
if (bReverse)
maEventMultiplexer.notifySlideEndEvent();
-
+
stopShow(); // MUST call that: results in
// maUserEventQueue.clear(). What's more,
// stopShow()'s currSlide->hide() call is
@@ -2398,13 +2398,13 @@ bool SlideShowImpl::notifyHyperLinkClicked( rtl::OUString const& hyperLink )
maListenerContainer.forEach<presentation::XSlideShowListener>(
boost::bind( &presentation::XSlideShowListener::hyperLinkClicked,
- _1,
+ _1,
boost::cref(hyperLink) ));
return true;
}
-/** Notification from eventmultiplexer that an animation event has occoured.
- This will be forewarded to all registered XSlideShoeListener
+/** Notification from eventmultiplexer that an animation event has occurred.
+ This will be forwarded to all registered XSlideShowListener
*/
bool SlideShowImpl::handleAnimationEvent( const AnimationNodeSharedPtr& rNode )
{
@@ -2417,15 +2417,15 @@ bool SlideShowImpl::handleAnimationEvent( const AnimationNodeSharedPtr& rNode )
case AnimationNode::ACTIVE:
maListenerContainer.forEach<presentation::XSlideShowListener>(
boost::bind( &animations::XAnimationListener::beginEvent,
- _1,
+ _1,
boost::cref(xNode) ));
break;
-
+
case AnimationNode::FROZEN:
case AnimationNode::ENDED:
maListenerContainer.forEach<presentation::XSlideShowListener>(
boost::bind( &animations::XAnimationListener::endEvent,
- _1,
+ _1,
boost::cref(xNode) ));
if(mpCurrentSlide->isPaintOverlayActive())
mpCurrentSlide->drawPolygons();
@@ -2438,7 +2438,7 @@ bool SlideShowImpl::handleAnimationEvent( const AnimationNodeSharedPtr& rNode )
}
-//===== FrameSynchronization ==================================================
+// ===== FrameSynchronization ==================================================
FrameSynchronization::FrameSynchronization (const double nFrameDuration)
: maTimer(),