summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/inc/pch/precompiled_slideshow.cxx2
-rw-r--r--slideshow/inc/pch/precompiled_slideshow.hxx2
-rw-r--r--slideshow/qa/debug/nodetree.sh20
-rw-r--r--slideshow/qa/debug/timings.pl2
-rwxr-xr-xslideshow/qa/tools/mkeffects.pl192
-rw-r--r--slideshow/qa/tools/mktransitions.pl164
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_Shaders.cxx2
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_Shaders.hxx4
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx152
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx134
-rw-r--r--slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx170
-rw-r--r--slideshow/source/engine/activities/accumulation.hxx26
-rw-r--r--slideshow/source/engine/activities/activitiesfactory.cxx296
-rw-r--r--slideshow/source/engine/activities/activitybase.cxx54
-rw-r--r--slideshow/source/engine/activities/activitybase.hxx48
-rw-r--r--slideshow/source/engine/activities/activityparameters.hxx40
-rw-r--r--slideshow/source/engine/activities/continuousactivitybase.cxx8
-rw-r--r--slideshow/source/engine/activities/continuousactivitybase.hxx10
-rw-r--r--slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx12
-rw-r--r--slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx18
-rw-r--r--slideshow/source/engine/activities/discreteactivitybase.cxx44
-rw-r--r--slideshow/source/engine/activities/discreteactivitybase.hxx22
-rw-r--r--slideshow/source/engine/activities/interpolation.hxx94
-rw-r--r--slideshow/source/engine/activities/simplecontinuousactivitybase.cxx22
-rw-r--r--slideshow/source/engine/activities/simplecontinuousactivitybase.hxx18
-rw-r--r--slideshow/source/engine/activitiesqueue.cxx20
-rw-r--r--slideshow/source/engine/animatedsprite.cxx24
-rw-r--r--slideshow/source/engine/animationfactory.cxx420
-rw-r--r--slideshow/source/engine/animationnodes/animationaudionode.cxx34
-rw-r--r--slideshow/source/engine/animationnodes/animationaudionode.hxx18
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx98
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.hxx28
-rw-r--r--slideshow/source/engine/animationnodes/animationcolornode.cxx28
-rw-r--r--slideshow/source/engine/animationnodes/animationcolornode.hxx12
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.cxx14
-rw-r--r--slideshow/source/engine/animationnodes/animationcommandnode.hxx12
-rw-r--r--slideshow/source/engine/animationnodes/animationnodefactory.cxx192
-rw-r--r--slideshow/source/engine/animationnodes/animationpathmotionnode.cxx4
-rw-r--r--slideshow/source/engine/animationnodes/animationpathmotionnode.hxx16
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.cxx80
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.hxx8
-rw-r--r--slideshow/source/engine/animationnodes/animationtransformnode.cxx40
-rw-r--r--slideshow/source/engine/animationnodes/animationtransformnode.hxx14
-rw-r--r--slideshow/source/engine/animationnodes/animationtransitionfilternode.cxx2
-rw-r--r--slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx14
-rw-r--r--slideshow/source/engine/animationnodes/basecontainernode.cxx22
-rw-r--r--slideshow/source/engine/animationnodes/basecontainernode.hxx24
-rw-r--r--slideshow/source/engine/animationnodes/basenode.cxx224
-rw-r--r--slideshow/source/engine/animationnodes/basenode.hxx72
-rw-r--r--slideshow/source/engine/animationnodes/generateevent.cxx30
-rw-r--r--slideshow/source/engine/animationnodes/generateevent.hxx10
-rw-r--r--slideshow/source/engine/animationnodes/nodetools.cxx24
-rw-r--r--slideshow/source/engine/animationnodes/nodetools.hxx18
-rw-r--r--slideshow/source/engine/animationnodes/paralleltimecontainer.cxx2
-rw-r--r--slideshow/source/engine/animationnodes/paralleltimecontainer.hxx12
-rw-r--r--slideshow/source/engine/animationnodes/propertyanimationnode.cxx28
-rw-r--r--slideshow/source/engine/animationnodes/propertyanimationnode.hxx8
-rw-r--r--slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx18
-rw-r--r--slideshow/source/engine/animationnodes/sequentialtimecontainer.hxx20
-rw-r--r--slideshow/source/engine/animationnodes/setactivity.hxx28
-rw-r--r--slideshow/source/engine/attributemap.cxx12
-rw-r--r--slideshow/source/engine/color.cxx70
-rw-r--r--slideshow/source/engine/debug.cxx16
-rw-r--r--slideshow/source/engine/delayevent.cxx2
-rw-r--r--slideshow/source/engine/effectrewinder.cxx16
-rw-r--r--slideshow/source/engine/effectrewinder.hxx12
-rw-r--r--slideshow/source/engine/eventmultiplexer.cxx170
-rw-r--r--slideshow/source/engine/eventqueue.cxx46
-rw-r--r--slideshow/source/engine/expressionnodefactory.cxx80
-rw-r--r--slideshow/source/engine/rehearsetimingsactivity.cxx58
-rw-r--r--slideshow/source/engine/rehearsetimingsactivity.hxx22
-rw-r--r--slideshow/source/engine/screenupdater.cxx26
-rw-r--r--slideshow/source/engine/shapeattributelayer.cxx206
-rw-r--r--slideshow/source/engine/shapes/appletshape.cxx66
-rw-r--r--slideshow/source/engine/shapes/appletshape.hxx4
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.cxx60
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.hxx10
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.cxx300
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.hxx2
-rw-r--r--slideshow/source/engine/shapes/drawshape.cxx208
-rw-r--r--slideshow/source/engine/shapes/drawshape.hxx54
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.cxx116
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.hxx88
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.cxx44
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.hxx20
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx68
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.hxx24
-rw-r--r--slideshow/source/engine/shapes/intrinsicanimationactivity.cxx38
-rw-r--r--slideshow/source/engine/shapes/intrinsicanimationactivity.hxx10
-rw-r--r--slideshow/source/engine/shapes/mediashape.cxx68
-rw-r--r--slideshow/source/engine/shapes/mediashape.hxx4
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx158
-rw-r--r--slideshow/source/engine/shapes/viewappletshape.cxx78
-rw-r--r--slideshow/source/engine/shapes/viewappletshape.hxx18
-rw-r--r--slideshow/source/engine/shapes/viewbackgroundshape.cxx46
-rw-r--r--slideshow/source/engine/shapes/viewbackgroundshape.hxx24
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx168
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.hxx42
-rw-r--r--slideshow/source/engine/shapes/viewshape.cxx154
-rw-r--r--slideshow/source/engine/shapes/viewshape.hxx140
-rw-r--r--slideshow/source/engine/shapesubset.cxx24
-rw-r--r--slideshow/source/engine/slide/layer.cxx62
-rw-r--r--slideshow/source/engine/slide/layer.hxx4
-rw-r--r--slideshow/source/engine/slide/layermanager.cxx88
-rw-r--r--slideshow/source/engine/slide/layermanager.hxx30
-rw-r--r--slideshow/source/engine/slide/shapemanagerimpl.cxx60
-rw-r--r--slideshow/source/engine/slide/shapemanagerimpl.hxx28
-rw-r--r--slideshow/source/engine/slide/slideanimations.cxx8
-rw-r--r--slideshow/source/engine/slide/slideanimations.hxx10
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx204
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.cxx136
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.hxx8
-rw-r--r--slideshow/source/engine/slidebitmap.cxx26
-rw-r--r--slideshow/source/engine/slideshowcontext.cxx10
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx532
-rw-r--r--slideshow/source/engine/slideview.cxx146
-rw-r--r--slideshow/source/engine/smilfunctionparser.cxx264
-rw-r--r--slideshow/source/engine/soundplayer.cxx24
-rw-r--r--slideshow/source/engine/sp_debug.cxx2
-rw-r--r--slideshow/source/engine/tools.cxx212
-rw-r--r--slideshow/source/engine/transitions/barndoorwipe.cxx8
-rw-r--r--slideshow/source/engine/transitions/barndoorwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/barwipepolypolygon.cxx2
-rw-r--r--slideshow/source/engine/transitions/barwipepolypolygon.hxx2
-rw-r--r--slideshow/source/engine/transitions/boxwipe.cxx4
-rw-r--r--slideshow/source/engine/transitions/boxwipe.hxx4
-rw-r--r--slideshow/source/engine/transitions/checkerboardwipe.cxx6
-rw-r--r--slideshow/source/engine/transitions/checkerboardwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/clippingfunctor.cxx50
-rw-r--r--slideshow/source/engine/transitions/clippingfunctor.hxx16
-rw-r--r--slideshow/source/engine/transitions/clockwipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/clockwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/combtransition.cxx48
-rw-r--r--slideshow/source/engine/transitions/combtransition.hxx12
-rw-r--r--slideshow/source/engine/transitions/doublediamondwipe.cxx4
-rw-r--r--slideshow/source/engine/transitions/doublediamondwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/ellipsewipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/ellipsewipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/fanwipe.cxx12
-rw-r--r--slideshow/source/engine/transitions/fanwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/figurewipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/figurewipe.hxx4
-rw-r--r--slideshow/source/engine/transitions/fourboxwipe.cxx12
-rw-r--r--slideshow/source/engine/transitions/fourboxwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/iriswipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/iriswipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/parametricpolypolygon.hxx2
-rw-r--r--slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx12
-rw-r--r--slideshow/source/engine/transitions/parametricpolypolygonfactory.hxx2
-rw-r--r--slideshow/source/engine/transitions/pinwheelwipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/pinwheelwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/randomwipe.cxx4
-rw-r--r--slideshow/source/engine/transitions/randomwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/shapetransitionfactory.cxx108
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx90
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.hxx48
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx168
-rw-r--r--slideshow/source/engine/transitions/snakewipe.cxx30
-rw-r--r--slideshow/source/engine/transitions/snakewipe.hxx4
-rw-r--r--slideshow/source/engine/transitions/spiralwipe.cxx12
-rw-r--r--slideshow/source/engine/transitions/spiralwipe.hxx4
-rw-r--r--slideshow/source/engine/transitions/sweepwipe.cxx18
-rw-r--r--slideshow/source/engine/transitions/sweepwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/transitionfactorytab.cxx76
-rw-r--r--slideshow/source/engine/transitions/transitiontools.cxx4
-rw-r--r--slideshow/source/engine/transitions/transitiontools.hxx2
-rw-r--r--slideshow/source/engine/transitions/veewipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/veewipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/waterfallwipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/waterfallwipe.hxx2
-rw-r--r--slideshow/source/engine/transitions/zigzagwipe.cxx2
-rw-r--r--slideshow/source/engine/transitions/zigzagwipe.hxx2
-rw-r--r--slideshow/source/engine/unoviewcontainer.cxx30
-rw-r--r--slideshow/source/engine/usereventqueue.cxx220
-rw-r--r--slideshow/source/engine/waitsymbol.cxx28
-rw-r--r--slideshow/source/engine/waitsymbol.hxx4
-rw-r--r--slideshow/source/engine/wakeupevent.cxx18
-rw-r--r--slideshow/source/inc/activitiesfactory.hxx138
-rw-r--r--slideshow/source/inc/activitiesqueue.hxx18
-rw-r--r--slideshow/source/inc/activity.hxx8
-rw-r--r--slideshow/source/inc/animatableshape.hxx2
-rw-r--r--slideshow/source/inc/animatedsprite.hxx24
-rw-r--r--slideshow/source/inc/animation.hxx4
-rw-r--r--slideshow/source/inc/animationactivity.hxx6
-rw-r--r--slideshow/source/inc/animationeventhandler.hxx2
-rw-r--r--slideshow/source/inc/animationfactory.hxx62
-rw-r--r--slideshow/source/inc/animationfunction.hxx4
-rw-r--r--slideshow/source/inc/animationnode.hxx52
-rw-r--r--slideshow/source/inc/animationnodefactory.hxx10
-rw-r--r--slideshow/source/inc/attributableshape.hxx16
-rw-r--r--slideshow/source/inc/attributemap.hxx4
-rw-r--r--slideshow/source/inc/boolanimation.hxx4
-rw-r--r--slideshow/source/inc/coloranimation.hxx2
-rw-r--r--slideshow/source/inc/cursormanager.hxx4
-rw-r--r--slideshow/source/inc/debug.hxx2
-rw-r--r--slideshow/source/inc/delayevent.hxx24
-rw-r--r--slideshow/source/inc/disposable.hxx2
-rw-r--r--slideshow/source/inc/doctreenode.hxx32
-rw-r--r--slideshow/source/inc/doctreenodesupplier.hxx18
-rw-r--r--slideshow/source/inc/enumanimation.hxx4
-rw-r--r--slideshow/source/inc/event.hxx16
-rw-r--r--slideshow/source/inc/eventhandler.hxx2
-rw-r--r--slideshow/source/inc/eventmultiplexer.hxx220
-rw-r--r--slideshow/source/inc/eventqueue.hxx18
-rw-r--r--slideshow/source/inc/expressionnode.hxx4
-rw-r--r--slideshow/source/inc/expressionnodefactory.hxx32
-rw-r--r--slideshow/source/inc/externalmediashape.hxx4
-rw-r--r--slideshow/source/inc/framerate.hxx2
-rw-r--r--slideshow/source/inc/hslcolor.hxx20
-rw-r--r--slideshow/source/inc/hslcoloranimation.hxx2
-rw-r--r--slideshow/source/inc/hyperlinkarea.hxx8
-rw-r--r--slideshow/source/inc/hyperlinkhandler.hxx2
-rw-r--r--slideshow/source/inc/interruptabledelayevent.hxx18
-rw-r--r--slideshow/source/inc/intrinsicanimationeventhandler.hxx2
-rw-r--r--slideshow/source/inc/listenercontainer.hxx32
-rw-r--r--slideshow/source/inc/listenercontainerimpl.hxx58
-rw-r--r--slideshow/source/inc/mouseeventhandler.hxx2
-rw-r--r--slideshow/source/inc/numberanimation.hxx4
-rw-r--r--slideshow/source/inc/pairanimation.hxx2
-rw-r--r--slideshow/source/inc/pauseeventhandler.hxx2
-rw-r--r--slideshow/source/inc/rgbcolor.hxx26
-rw-r--r--slideshow/source/inc/screenupdater.hxx10
-rw-r--r--slideshow/source/inc/shape.hxx22
-rw-r--r--slideshow/source/inc/shapeattributelayer.hxx150
-rw-r--r--slideshow/source/inc/shapeattributelayerholder.hxx8
-rw-r--r--slideshow/source/inc/shapecursoreventhandler.hxx2
-rw-r--r--slideshow/source/inc/shapeimporter.hxx56
-rw-r--r--slideshow/source/inc/shapelistenereventhandler.hxx2
-rw-r--r--slideshow/source/inc/shapemanager.hxx4
-rw-r--r--slideshow/source/inc/shapemaps.hxx6
-rw-r--r--slideshow/source/inc/shapesubset.hxx20
-rw-r--r--slideshow/source/inc/slide.hxx38
-rw-r--r--slideshow/source/inc/slidebitmap.hxx18
-rw-r--r--slideshow/source/inc/slideshowcontext.hxx26
-rw-r--r--slideshow/source/inc/slideshowexceptions.hxx4
-rw-r--r--slideshow/source/inc/slideview.hxx2
-rw-r--r--slideshow/source/inc/smilfunctionparser.hxx92
-rw-r--r--slideshow/source/inc/soundplayer.hxx10
-rw-r--r--slideshow/source/inc/state.hxx6
-rw-r--r--slideshow/source/inc/stringanimation.hxx2
-rw-r--r--slideshow/source/inc/subsettableshapemanager.hxx12
-rw-r--r--slideshow/source/inc/tools.hxx142
-rw-r--r--slideshow/source/inc/transitionfactory.hxx28
-rw-r--r--slideshow/source/inc/transitioninfo.hxx52
-rw-r--r--slideshow/source/inc/unoview.hxx10
-rw-r--r--slideshow/source/inc/unoviewcontainer.hxx18
-rw-r--r--slideshow/source/inc/usereventqueue.hxx82
-rw-r--r--slideshow/source/inc/userpainteventhandler.hxx4
-rw-r--r--slideshow/source/inc/view.hxx10
-rw-r--r--slideshow/source/inc/vieweventhandler.hxx2
-rw-r--r--slideshow/source/inc/viewlayer.hxx16
-rw-r--r--slideshow/source/inc/viewrepainthandler.hxx2
-rw-r--r--slideshow/source/inc/viewupdate.hxx2
-rw-r--r--slideshow/source/inc/wakeupevent.hxx18
-rw-r--r--slideshow/test/demoshow.cxx70
-rw-r--r--slideshow/test/export.map2
-rw-r--r--slideshow/test/slidetest.cxx78
-rw-r--r--slideshow/test/tests.hxx2
-rw-r--r--slideshow/test/testshape.cxx4
-rw-r--r--slideshow/test/testview.cxx4
-rw-r--r--slideshow/test/views.cxx2
261 files changed, 5434 insertions, 5434 deletions
diff --git a/slideshow/inc/pch/precompiled_slideshow.cxx b/slideshow/inc/pch/precompiled_slideshow.cxx
index 51c054755b6a..31553196fe1d 100644
--- a/slideshow/inc/pch/precompiled_slideshow.cxx
+++ b/slideshow/inc/pch/precompiled_slideshow.cxx
@@ -2,7 +2,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
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx
index 69f6fd6b533a..b3f964d57cf5 100644
--- a/slideshow/inc/pch/precompiled_slideshow.hxx
+++ b/slideshow/inc/pch/precompiled_slideshow.hxx
@@ -2,7 +2,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
diff --git a/slideshow/qa/debug/nodetree.sh b/slideshow/qa/debug/nodetree.sh
index e40078faaddd..a4ef1c107f7a 100644
--- a/slideshow/qa/debug/nodetree.sh
+++ b/slideshow/qa/debug/nodetree.sh
@@ -12,20 +12,20 @@
# First of all, you need to recompile modules slideshow and canvas
# with VERBOSE=t set in the environment, and debug=t defined at the
# build tool command line. Then run your slideshow and redirect stdout
-# to a file.
+# to a file.
#
# Then, call 'nodetree.sh trace-file > tree.ps' to generate a
# PostScript file for the AnimationNode tree generated during the show.
-# Since these easily get pretty huge, use only one page, and try to
-# limit the slide content (which have effects assigned, that is) to
+# Since these easily get pretty huge, use only one page, and try to
+# limit the slide content (which have effects assigned, that is) to
# the bare minimum (to reproduce your bug, or whatever you need this
# for).
#
-# The generated output will have all nodes color-coded with their state
-# at the point when the tree was dumped (see colors.sh for the color
+# The generated output will have all nodes color-coded with their state
+# at the point when the tree was dumped (see colors.sh for the color
# codes)
#
-# When looking for the mechanics that generate the relevant output,
+# When looking for the mechanics that generate the relevant output,
# grep for the DEBUG_NODES_SHOWTREE macros in the slideshow source:
# Each such place dumps the current node tree to the trace output. Thus,
# if you need to check the tree state at other places or times, just add
@@ -38,11 +38,11 @@
#
###################################################
-egrep "Node connection|Node state" $1 | \
- sed -e '/Node state/ s/.*Node state.*: \(.*\)/\1/' \
- -e '/Node connection/ s/.*Node connection.*: \(n.*\)/\1/' | \
+egrep "Node connection|Node state" $1 | \
+ sed -e '/Node state/ s/.*Node state.*: \(.*\)/\1/' \
+ -e '/Node connection/ s/.*Node connection.*: \(n.*\)/\1/' | \
\
-awk 'BEGIN { print "digraph Event_network {" }; { print } END { print "}" }' | \
+awk 'BEGIN { print "digraph Event_network {" }; { print } END { print "}" }' | \
\
\
# fill a complete A1 page with graph output
diff --git a/slideshow/qa/debug/timings.pl b/slideshow/qa/debug/timings.pl
index 5af3e89761e9..a409b8d5f392 100644
--- a/slideshow/qa/debug/timings.pl
+++ b/slideshow/qa/debug/timings.pl
@@ -51,7 +51,7 @@ $record = 1;
while( <> )
{
if( $state == 0 && m|next position will be| )
- {
+ {
($posX) = m|.*\(([0-9]+.[0-9]+),|;
($posY) = m|.*,([0-9]+.[0-9]+)\)|;
$state = 1;
diff --git a/slideshow/qa/tools/mkeffects.pl b/slideshow/qa/tools/mkeffects.pl
index 38673aea473d..954f9659f2c5 100755
--- a/slideshow/qa/tools/mkeffects.pl
+++ b/slideshow/qa/tools/mkeffects.pl
@@ -1,10 +1,10 @@
:
eval 'exec perl -wS $0 ${1+"$@"}'
- if 0;
+ if 0;
-use IO::File;
-use Cwd;
+use IO::File;
+use Cwd;
use File::Spec;
use File::Spec::Functions;
use File::Temp;
@@ -18,72 +18,72 @@ $TempDir = "";
###############################################################################
-# Open a file with the given name.
-# First it is checked if the temporary directory, in which all files for
-# the document are gathered, is already present and create it if it is not.
-# Then create the path to the file inside the temporary directory.
-# Finally open the file and return a file handle to it.
+# Open a file with the given name.
+# First it is checked if the temporary directory, in which all files for
+# the document are gathered, is already present and create it if it is not.
+# Then create the path to the file inside the temporary directory.
+# Finally open the file and return a file handle to it.
#
-sub open_file
+sub open_file
{
- my $filename = pop @_;
-
- # Create base directory of temporary directory tree if not alreay
- # present.
+ my $filename = pop @_;
+
+ # Create base directory of temporary directory tree if not alreay
+ # present.
if ($TempDir eq "")
{
$TempDir = File::Temp::tempdir (CLEANUP => 1);
}
-
- # Create the path to the file.
+
+ # Create the path to the file.
my $fullname = File::Spec->catfile ($TempDir, $filename);
my ($volume,$directories,$file) = File::Spec->splitpath ($fullname);
mkpath (File::Spec->catpath ($volume,$directories,""));
-
- # Open the file and return a file handle to it.
+
+ # Open the file and return a file handle to it.
return new IO::File ($fullname, "w");
}
###############################################################################
-# Zip the files in the directory tree into the given file.
+# Zip the files in the directory tree into the given file.
#
-sub zip_dirtree
+sub zip_dirtree
{
- my $filename = pop @_;
-
- my $cwd = getcwd;
- my $zip_name = $filename;
-
- # We are about to change the directory.
- # Therefore create an absolute pathname for the zip archive.
-
- # First transfer the drive from $cwd to $zip_name. This is a
- # workaround for a bug in file_name_is_absolute which thinks
- # the the path \bla is an absolute path under DOS.
+ my $filename = pop @_;
+
+ my $cwd = getcwd;
+ my $zip_name = $filename;
+
+ # We are about to change the directory.
+ # Therefore create an absolute pathname for the zip archive.
+
+ # First transfer the drive from $cwd to $zip_name. This is a
+ # workaround for a bug in file_name_is_absolute which thinks
+ # the the path \bla is an absolute path under DOS.
my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name);
my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd);
$volume = $volume_cwd if ($volume eq "");
$zip_name = File::Spec->catpath ($volume,$directories,$file);
-
- # Add the current working directory to a relative path.
+
+ # Add the current working directory to a relative path.
if ( ! file_name_is_absolute ($zip_name))
{
$zip_name = File::Spec->catfile ($cwd, $zip_name);
-
- # Try everything to clean up the name.
+
+ # Try everything to clean up the name.
$zip_name = File::Spec->rel2abs ($filename);
$zip_name = File::Spec->canonpath ($zip_name);
-
- # Remove .. directories from the middle of the path.
+
+ # Remove .. directories from the middle of the path.
while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//)
{
$zip_name = $` . "/" . $';
}
}
- # Just in case the zip program gets confused by an existing file with the
- # same name as the one to be written that file is removed first.
+ # Just in case the zip program gets confused by an existing file with the
+ # same name as the one to be written that file is removed first.
if ( -e $filename)
{
if (unlink ($filename) == 0)
@@ -93,9 +93,9 @@ sub zip_dirtree
return;
}
}
-
- # Finally create the zip file. First change into the temporary directory
- # so that the resulting zip file contains only paths relative to it.
+
+ # Finally create the zip file. First change into the temporary directory
+ # so that the resulting zip file contains only paths relative to it.
print "zipping [$ZipCmd $ZipFlags $zip_name *]\n";
chdir ($TempDir);
system ("$ZipCmd $ZipFlags $zip_name *");
@@ -220,9 +220,9 @@ sub writeTransitionAnimation
print $OUT " <anim:par smil:begin=\"0s\" smil:fill=\"remove\">\n";
print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
- print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
+ print $OUT " <anim:transitionFilter smil:dur=\"1s\" smil:targetElement=\"textid$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
print $OUT " <anim:set smil:begin=\"0.3s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
- print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
+ print $OUT " <anim:transitionFilter smil:begin=\"0.3s\" smil:dur=\"1s\" smil:targetElement=\"id$slideNum\" smil:type=\"$transitionType\" smil:subtype=\"$transitionSubtype\"/>\n";
print $OUT " </anim:par>\n";
}
@@ -235,9 +235,9 @@ sub writePropertyAnimation
print $OUT " <anim:par smil:begin=\"0s\" smil:dur=\"3s\" smil:fill=\"remove\">\n";
print $OUT " <anim:set smil:begin=\"0s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
- print $OUT " <anim:animate smil:begin=\"0s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
+ print $OUT " <anim:animate smil:begin=\"0s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"id$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
print $OUT " <anim:set smil:begin=\"0.6s\" smil:dur=\"0.001s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"visibility\" smil:to=\"visible\"/>\n";
- print $OUT " <anim:animate smil:begin=\"0.6s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
+ print $OUT " <anim:animate smil:begin=\"0.6s\" smil:dur=\"1s\" smil:fill=\"hold\" smil:targetElement=\"textid$slideNum\" smil:attributeName=\"$propertyName\" smil:values=\"$propertyStart;$propertyEnd\" smil:keyTimes=\"0;1\" presentation:additive=\"base\"/>\n";
print $OUT " </anim:par>\n";
}
@@ -284,9 +284,9 @@ sub writeManifest
###############################################################################
-# Print usage information.
+# Print usage information.
#
-sub usage ()
+sub usage ()
{
print <<END_OF_USAGE;
usage: $0 <option>* [<output-file-name>]
@@ -300,9 +300,9 @@ END_OF_USAGE
}
###############################################################################
-# Process the command line.
+# Process the command line.
#
-sub process_command_line
+sub process_command_line
{
foreach (@ARGV)
{
@@ -312,11 +312,11 @@ sub process_command_line
exit 0;
}
}
-
+
$global_gen_all=0;
$global_output_name = "alltransitions.odp";
- my $j = 0;
+ my $j = 0;
for (my $i=0; $i<=$#ARGV; $i++)
{
if ($ARGV[$i] eq "-a")
@@ -331,7 +331,7 @@ sub process_command_line
}
elsif ($#ARGV == $i )
{
- $global_output_name = $ARGV[$i];
+ $global_output_name = $ARGV[$i];
}
}
@@ -341,41 +341,41 @@ sub process_command_line
$transitionsRef = [
["barWipe",
- ["leftToRight",
+ ["leftToRight",
"topToBottom"]],
["blindsWipe",
- ["vertical",
+ ["vertical",
"horizontal"]],
-
+
["boxWipe",
- ["topLeft",
- "topRight",
- "bottomRight",
- "bottomLeft",
- "topCenter",
- "rightCenter",
- "bottomCenter",
- "leftCenter"]],
+ ["topLeft",
+ "topRight",
+ "bottomRight",
+ "bottomLeft",
+ "topCenter",
+ "rightCenter",
+ "bottomCenter",
+ "leftCenter"]],
["fourBoxWipe",
- ["cornersIn",
+ ["cornersIn",
"cornersOut"]],
["barnDoorWipe",
- ["vertical",
- "horizontal",
- "diagonalBottomLeft",
- "diagonalTopLeft"]],
+ ["vertical",
+ "horizontal",
+ "diagonalBottomLeft",
+ "diagonalTopLeft"]],
["bowTieWipe",
- ["vertical",
- "horizontal"]],
-
+ ["vertical",
+ "horizontal"]],
+
["miscDiagonalWipe",
["doubleBarnDoor",
"doubleDiamond"]],
-
+
["veeWipe",
["down",
"left",
@@ -395,11 +395,11 @@ $transitionsRef = [
["barnZigZagWipe",
["vertical",
"horizontal"]],
-
+
["irisWipe",
["rectangle",
"diamond"]],
-
+
["triangleWipe",
["up",
"right",
@@ -411,11 +411,11 @@ $transitionsRef = [
"right",
"down",
"left"]],
-
+
["pentagonWipe",
["up",
"down"]],
-
+
["hexagonWipe",
["horizontal",
"vertical"]],
@@ -437,7 +437,7 @@ $transitionsRef = [
["fourPoint",
"fivePoint",
"sixPoint"]],
-
+
["miscShapeWipe",
["heart",
"keyhole"]],
@@ -447,7 +447,7 @@ $transitionsRef = [
"clockwiseThree",
"clockwiseSix",
"clockwiseNine"]],
-
+
["pinWheelWipe",
["oneBlade",
"twoBladeVertical",
@@ -479,7 +479,7 @@ $transitionsRef = [
"fanOutHorizontal",
"fanInVertical",
"fanInHorizontal"]],
-
+
["doubleSweepWipe",
["parallelVertical",
"parallelDiagonal",
@@ -487,7 +487,7 @@ $transitionsRef = [
"oppositeHorizontal",
"parallelDiagonalTopLeft",
"parallelDiagonalBottomLeft"]],
-
+
["saloonDoorWipe",
["top",
"left",
@@ -507,7 +507,7 @@ $transitionsRef = [
"topRightDiagonal",
"bottomRightDiagonal",
"bottomLeftDiagonal"]],
-
+
["spiralWipe",
["topLeftClockwise",
"topRightClockwise",
@@ -517,7 +517,7 @@ $transitionsRef = [
"topRightCounterClockwise",
"bottomRightCounterClockwise",
"bottomLeftCounterClockwise"]],
-
+
["parallelSnakesWipe",
["verticalTopSame",
"verticalBottomSame",
@@ -529,7 +529,7 @@ $transitionsRef = [
"horizontalTopRightOpposite",
"diagonalBottomLeftOpposite",
"diagonalTopLeftOpposite"]],
-
+
["boxSnakesWipe",
["twoBoxTop",
"twoBoxLeft",
@@ -619,7 +619,7 @@ $propertiesRef = [
[ "value", "y", "y-0.1", "y+0.1" ]
];
-$transformsRef = [
+$transformsRef = [
["translate", "0.5*width,0.5*height"],
["scale", "0.5*width,0.5*height"],
["rotate", "270"],
@@ -629,12 +629,12 @@ $transformsRef = [
###############################################################################
-# Main
+# Main
###############################################################################
$ZipCmd = $ENV{LOG_FILE_ZIP_CMD};
$ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS};
-# Provide default values for the zip command and it's flags.
+# Provide default values for the zip command and it's flags.
if ( ! defined $ZipCmd)
{
$ZipCmd = "zip" unless defined $ZipCmd;
@@ -719,23 +719,23 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10001" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10001" smil:accelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10001" smil:accelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10002" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10002" smil:decelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="10s" smil:fill="hold" smil:targetElement="textid10002" smil:decelerate="0.5" smil:attributeName="x" smil:by="0.3" presentation:additive="base"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
- <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
+ <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
+ <anim:animate smil:begin="0s" smil:dur="6s" smil:fill="hold" smil:targetElement="textid10003" smil:attributeName="x" smil:to="0.3" presentation:additive="sum"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="5s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="y" smil:from="0.3" smil:to="0.8" smil:autoReverse="true" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="5s" smil:fill="hold" smil:targetElement="textid10004" smil:attributeName="y" smil:from="0.3" smil:to="0.8" smil:autoReverse="true" presentation:additive="base"/>
</anim:par>
<anim:par smil:begin="0s" smil:fill="remove">
@@ -750,7 +750,7 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="y" smil:values="0;1" smil:keyTimes="0;1" anim:formula="y+0.3*height*sin(5*pi*\$)" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="3s" smil:fill="hold" smil:targetElement="textid10007" smil:attributeName="y" smil:values="0;1" smil:keyTimes="0;1" anim:formula="y+0.3*height*sin(5*pi*\$)" presentation:additive="base"/>
</anim:par>
~;
@@ -764,7 +764,7 @@ writeSlideFooter();
<draw:rect draw:style-name="gr1" draw:text-style-name="P1" draw:id="id20000" draw:layer="layout" svg:width="17.5cm" svg:height="13cm" svg:x="5cm" svg:y="4cm">
<text:p text:style-name="P2">Slide: 5</text:p>
<text:p text:style-name="P2">Topic: Text effects</text:p>
- <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p>
+ <text:p text:id="textid20001" text:style-name="P2">Some text to show iterated single paragraph</text:p>
<text:p text:id="textid20002" text:style-name="P2">Some text to show iterated word-by-word effects</text:p>
<text:p text:id="textid20003" text:style-name="P2">Some text to show iterated letter-by-letter effects</text:p>
<text:p text:id="textid20004" text:style-name="P2">Some more text</text:p>
@@ -779,7 +779,7 @@ writeSlideFooter();
<anim:par smil:begin="0s" smil:fill="remove">
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="id20000" anim:iterate-type="by-paragraph" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
</anim:iterate>
</anim:par>
@@ -787,7 +787,7 @@ writeSlideFooter();
<anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20002" anim:iterate-type="by-word" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
</anim:iterate>
</anim:par>
@@ -795,7 +795,7 @@ writeSlideFooter();
<anim:set smil:begin="0s" smil:dur="0.001s" smil:targetElement="id20000" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:iterate smil:begin="0s" smil:fill="hold" smil:targetElement="textid20003" anim:iterate-type="by-letter" anim:iterate-interval="0.2s">
<anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
- <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
+ <anim:animate smil:begin="0s" smil:dur="2s" smil:fill="hold" smil:decelerate="0.5" smil:attributeName="x" smil:from="1.0" smil:to="x" presentation:additive="base"/>
</anim:iterate>
</anim:par>
~;
diff --git a/slideshow/qa/tools/mktransitions.pl b/slideshow/qa/tools/mktransitions.pl
index fd14cfab334f..4ba637774798 100644
--- a/slideshow/qa/tools/mktransitions.pl
+++ b/slideshow/qa/tools/mktransitions.pl
@@ -1,10 +1,10 @@
:
eval 'exec perl -wS $0 ${1+"$@"}'
- if 0;
+ if 0;
-use IO::File;
-use Cwd;
+use IO::File;
+use Cwd;
use File::Spec;
use File::Spec::Functions;
use File::Temp;
@@ -18,72 +18,72 @@ $TempDir = "";
###############################################################################
-# Open a file with the given name.
-# First it is checked if the temporary directory, in which all files for
-# the document are gathered, is already present and create it if it is not.
-# Then create the path to the file inside the temporary directory.
-# Finally open the file and return a file handle to it.
+# Open a file with the given name.
+# First it is checked if the temporary directory, in which all files for
+# the document are gathered, is already present and create it if it is not.
+# Then create the path to the file inside the temporary directory.
+# Finally open the file and return a file handle to it.
#
-sub open_file
+sub open_file
{
- my $filename = pop @_;
-
- # Create base directory of temporary directory tree if not alreay
- # present.
+ my $filename = pop @_;
+
+ # Create base directory of temporary directory tree if not alreay
+ # present.
if ($TempDir eq "")
{
$TempDir = File::Temp::tempdir (CLEANUP => 1);
}
-
- # Create the path to the file.
+
+ # Create the path to the file.
my $fullname = File::Spec->catfile ($TempDir, $filename);
my ($volume,$directories,$file) = File::Spec->splitpath ($fullname);
mkpath (File::Spec->catpath ($volume,$directories,""));
-
- # Open the file and return a file handle to it.
+
+ # Open the file and return a file handle to it.
return new IO::File ($fullname, "w");
}
###############################################################################
-# Zip the files in the directory tree into the given file.
+# Zip the files in the directory tree into the given file.
#
-sub zip_dirtree
+sub zip_dirtree
{
- my $filename = pop @_;
-
- my $cwd = getcwd;
- my $zip_name = $filename;
-
- # We are about to change the directory.
- # Therefore create an absolute pathname for the zip archive.
-
- # First transfer the drive from $cwd to $zip_name. This is a
- # workaround for a bug in file_name_is_absolute which thinks
- # the the path \bla is an absolute path under DOS.
+ my $filename = pop @_;
+
+ my $cwd = getcwd;
+ my $zip_name = $filename;
+
+ # We are about to change the directory.
+ # Therefore create an absolute pathname for the zip archive.
+
+ # First transfer the drive from $cwd to $zip_name. This is a
+ # workaround for a bug in file_name_is_absolute which thinks
+ # the the path \bla is an absolute path under DOS.
my ($volume,$directories,$file) = File::Spec->splitpath ($zip_name);
my ($volume_cwd,$directories_cwd,$file_cwd) = File::Spec->splitpath ($cwd);
$volume = $volume_cwd if ($volume eq "");
$zip_name = File::Spec->catpath ($volume,$directories,$file);
-
- # Add the current working directory to a relative path.
+
+ # Add the current working directory to a relative path.
if ( ! file_name_is_absolute ($zip_name))
{
$zip_name = File::Spec->catfile ($cwd, $zip_name);
-
- # Try everything to clean up the name.
+
+ # Try everything to clean up the name.
$zip_name = File::Spec->rel2abs ($filename);
$zip_name = File::Spec->canonpath ($zip_name);
-
- # Remove .. directories from the middle of the path.
+
+ # Remove .. directories from the middle of the path.
while ($zip_name =~ /\/[^\/][^\.\/][^\/]*\/\.\.\//)
{
$zip_name = $` . "/" . $';
}
}
- # Just in case the zip program gets confused by an existing file with the
- # same name as the one to be written that file is removed first.
+ # Just in case the zip program gets confused by an existing file with the
+ # same name as the one to be written that file is removed first.
if ( -e $filename)
{
if (unlink ($filename) == 0)
@@ -93,14 +93,14 @@ sub zip_dirtree
return;
}
}
-
- # Finally create the zip file. First change into the temporary directory
- # so that the resulting zip file contains only paths relative to it.
+
+ # Finally create the zip file. First change into the temporary directory
+ # so that the resulting zip file contains only paths relative to it.
print "zipping [$ZipCmd $ZipFlags $zip_name *]\n";
chdir ($TempDir);
system ("$ZipCmd $ZipFlags $zip_name *");
chdir ($cwd);
-
+
}
@@ -279,41 +279,41 @@ sub writeManifest
$transitionsRef = [
["barWipe",
- ["leftToRight",
+ ["leftToRight",
"topToBottom"]],
["blindsWipe",
- ["vertical",
+ ["vertical",
"horizontal"]],
-
+
["boxWipe",
- ["topLeft",
- "topRight",
- "bottomRight",
- "bottomLeft",
- "topCenter",
- "rightCenter",
- "bottomCenter",
- "leftCenter"]],
+ ["topLeft",
+ "topRight",
+ "bottomRight",
+ "bottomLeft",
+ "topCenter",
+ "rightCenter",
+ "bottomCenter",
+ "leftCenter"]],
["fourBoxWipe",
- ["cornersIn",
+ ["cornersIn",
"cornersOut"]],
["barnDoorWipe",
- ["vertical",
- "horizontal",
- "diagonalBottomLeft",
- "diagonalTopLeft"]],
+ ["vertical",
+ "horizontal",
+ "diagonalBottomLeft",
+ "diagonalTopLeft"]],
["bowTieWipe",
- ["vertical",
- "horizontal"]],
-
+ ["vertical",
+ "horizontal"]],
+
["miscDiagonalWipe",
["doubleBarnDoor",
"doubleDiamond"]],
-
+
["veeWipe",
["down",
"left",
@@ -333,11 +333,11 @@ $transitionsRef = [
["barnZigZagWipe",
["vertical",
"horizontal"]],
-
+
["irisWipe",
["rectangle",
"diamond"]],
-
+
["triangleWipe",
["up",
"right",
@@ -349,11 +349,11 @@ $transitionsRef = [
"right",
"down",
"left"]],
-
+
["pentagonWipe",
["up",
"down"]],
-
+
["hexagonWipe",
["horizontal",
"vertical"]],
@@ -375,7 +375,7 @@ $transitionsRef = [
["fourPoint",
"fivePoint",
"sixPoint"]],
-
+
["miscShapeWipe",
["heart",
"keyhole"]],
@@ -385,7 +385,7 @@ $transitionsRef = [
"clockwiseThree",
"clockwiseSix",
"clockwiseNine"]],
-
+
["pinWheelWipe",
["oneBlade",
"twoBladeVertical",
@@ -417,7 +417,7 @@ $transitionsRef = [
"fanOutHorizontal",
"fanInVertical",
"fanInHorizontal"]],
-
+
["doubleSweepWipe",
["parallelVertical",
"parallelDiagonal",
@@ -425,7 +425,7 @@ $transitionsRef = [
"oppositeHorizontal",
"parallelDiagonalTopLeft",
"parallelDiagonalBottomLeft"]],
-
+
["saloonDoorWipe",
["top",
"left",
@@ -445,7 +445,7 @@ $transitionsRef = [
"topRightDiagonal",
"bottomRightDiagonal",
"bottomLeftDiagonal"]],
-
+
["spiralWipe",
["topLeftClockwise",
"topRightClockwise",
@@ -455,7 +455,7 @@ $transitionsRef = [
"topRightCounterClockwise",
"bottomRightCounterClockwise",
"bottomLeftCounterClockwise"]],
-
+
["parallelSnakesWipe",
["verticalTopSame",
"verticalBottomSame",
@@ -467,7 +467,7 @@ $transitionsRef = [
"horizontalTopRightOpposite",
"diagonalBottomLeftOpposite",
"diagonalTopLeftOpposite"]],
-
+
["boxSnakesWipe",
["twoBoxTop",
"twoBoxLeft",
@@ -523,9 +523,9 @@ $transitionsRef = [
###############################################################################
-# Print usage information.
+# Print usage information.
#
-sub usage ()
+sub usage ()
{
print <<END_OF_USAGE;
usage: $0 <option>* [<output-file-name>]
@@ -539,9 +539,9 @@ END_OF_USAGE
}
###############################################################################
-# Process the command line.
+# Process the command line.
#
-sub process_command_line
+sub process_command_line
{
foreach (@ARGV)
{
@@ -551,11 +551,11 @@ sub process_command_line
exit 0;
}
}
-
+
$global_gen_all=0;
$global_output_name = "alltransitions.odp";
- my $j = 0;
+ my $j = 0;
for (my $i=0; $i<=$#ARGV; $i++)
{
if ($ARGV[$i] eq "-a")
@@ -570,7 +570,7 @@ sub process_command_line
}
elsif ($#ARGV == $i )
{
- $global_output_name = $ARGV[$i];
+ $global_output_name = $ARGV[$i];
}
}
@@ -579,12 +579,12 @@ sub process_command_line
###############################################################################
-# Main
+# Main
###############################################################################
$ZipCmd = $ENV{LOG_FILE_ZIP_CMD};
$ZipFlags = $ENV{LOG_FILE_ZIP_FLAGS};
-# Provide default values for the zip command and it's flags.
+# Provide default values for the zip command and it's flags.
if ( ! defined $ZipCmd)
{
$ZipCmd = "zip" unless defined $ZipCmd;
diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.cxx
index e2114ee0cffd..76b893a83b9e 100644
--- a/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.cxx
+++ b/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.hxx b/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.hxx
index 2b1bd49374c9..e42c2a0f7a42 100644
--- a/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.hxx
+++ b/slideshow/source/engine/OGLTrans/OGLTrans_Shaders.hxx
@@ -2,7 +2,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
@@ -37,7 +37,7 @@ class OGLShaders {
static bool Initialize();
static bool cbInitialized;
-public:
+public:
static GLuint LinkProgram( const char *vertexShader, const char *fragmentShader );
diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
index a68af1f65707..c3d15073d632 100644
--- a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.cxx
@@ -2,7 +2,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
@@ -286,7 +286,7 @@ void Iris::display(double nTime, double SlideWidth, double SlideHeight, double D
void Iris::prepare()
{
static GLubyte img[3] = { 80, 80, 80 };
-
+
glGenTextures(1, &maTexture);
glBindTexture(GL_TEXTURE_2D, maTexture);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
@@ -305,7 +305,7 @@ void OGLTransitionImpl::makeOutsideCubeFaceToLeft()
{
clear();
Primitive Slide;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
@@ -322,7 +322,7 @@ void OGLTransitionImpl::makeInsideCubeFaceToLeft()
{
clear();
Primitive Slide;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
@@ -331,7 +331,7 @@ void OGLTransitionImpl::makeInsideCubeFaceToLeft()
Slide.Operations.push_back(new RotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,1),-90,false,0.0,1.0));
maEnteringSlidePrimitives.push_back(Slide);
-
+
OverallOperations.push_back(new RotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,1),90,true,0.0,1.0));
}
@@ -339,7 +339,7 @@ void OGLTransitionImpl::makeFallLeaving()
{
clear();
Primitive Slide;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
maEnteringSlidePrimitives.push_back(Slide);
@@ -356,7 +356,7 @@ void OGLTransitionImpl::makeTurnAround()
Primitive Slide;
mbReflectSlides = true;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
maLeavingSlidePrimitives.push_back(Slide);
@@ -373,7 +373,7 @@ void OGLTransitionImpl::makeTurnDown()
{
clear();
Primitive Slide;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
maLeavingSlidePrimitives.push_back(Slide);
@@ -390,7 +390,7 @@ void OGLTransitionImpl::makeIris()
{
clear();
Primitive Slide;
-
+
Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
maEnteringSlidePrimitives.push_back (Slide);
@@ -473,7 +473,7 @@ void OGLTransitionImpl::makeRochade()
{
clear();
Primitive Slide;
-
+
mbReflectSlides = true;
mmDisplaySlides = &OGLTransitionImpl::displaySlidesRochade;
@@ -555,7 +555,7 @@ void OGLTransitionImpl::makeRevolvingCircles( ::sal_uInt16 nCircles , ::sal_uInt
TempAngle += dAngle;
}
-
+
{
//double angle(0.0);
Primitive EnteringSlide;
@@ -567,46 +567,46 @@ void OGLTransitionImpl::makeRevolvingCircles( ::sal_uInt16 nCircles , ::sal_uInt
}
EnteringSlide.pushTriangle( basegfx::B2DVector(0.5,0.5) , Radius * unScaledTexCoords[ 0 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ nPointsOnCircles - 1 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) );
LeavingSlide.pushTriangle( basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
basegfx::B3DVector axis(randNormVectorInXYPlane());
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
LeavingSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
-
+
maEnteringSlidePrimitives.push_back(EnteringSlide);
maLeavingSlidePrimitives.push_back(LeavingSlide);
LastRadius = Radius;
Radius = NextRadius;
NextRadius += dRadius;
- }
-
+ }
+
for(int i(1); i < nCircles - 1; ++i)
{
Primitive LeavingSlide;
Primitive EnteringSlide;
for(int Side(0); Side < nPointsOnCircles - 1; ++Side)
- {
+ {
EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
}
-
+
EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
basegfx::B3DVector axis(randNormVectorInXYPlane());
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
LeavingSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
-
+
maEnteringSlidePrimitives.push_back(EnteringSlide);
maLeavingSlidePrimitives.push_back(LeavingSlide);
-
+
LastRadius = Radius;
Radius = NextRadius;
NextRadius += dRadius;
@@ -617,25 +617,25 @@ void OGLTransitionImpl::makeRevolvingCircles( ::sal_uInt16 nCircles , ::sal_uInt
Primitive EnteringSlide;
for(int Side(0); Side < nPointsOnCircles - 1; ++Side)
{
-
+
EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0 + basegfx::B2DVector(0.5,0.5) );
}
-
+
EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0 + basegfx::B2DVector(0.5,0.5) );
-
+
basegfx::B3DVector axis(randNormVectorInXYPlane());
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
LeavingSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
EnteringSlide.Operations.push_back( new SRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
-
+
maEnteringSlidePrimitives.push_back(EnteringSlide);
maLeavingSlidePrimitives.push_back(LeavingSlide);
}
@@ -650,21 +650,21 @@ void OGLTransitionImpl::makeHelix( ::sal_uInt16 nRows )
for(unsigned int i(0); i < nRows; ++i)
{
Primitive Tile;
-
+
Tile.pushTriangle(basegfx::B2DVector( 1.0 , iDn ) , basegfx::B2DVector( 0.0 , iDn ) , basegfx::B2DVector( 0.0 , iPDn ));
-
+
Tile.pushTriangle(basegfx::B2DVector( 1.0 , iPDn ) , basegfx::B2DVector( 1.0 , iDn ) , basegfx::B2DVector( 0.0 , iPDn ));
-
- Tile.Operations.push_back( new SRotate( basegfx::B3DVector( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , 180 ,
+
+ Tile.Operations.push_back( new SRotate( basegfx::B3DVector( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , 180 ,
true,min(max(static_cast<double>(i - nRows/2.0)*invN/2.0,0.0),1.0),
min(max(static_cast<double>(i + nRows/2.0)*invN/2.0,0.0),1.0) ) );
-
+
maLeavingSlidePrimitives.push_back(Tile);
-
+
Tile.Operations.push_back( new SRotate( basegfx::B3DVector( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , -180 , false,0.0,1.0) );
-
+
maEnteringSlidePrimitives.push_back(Tile);
-
+
iDn += invN;
iPDn += invN;
}
@@ -687,7 +687,7 @@ void OGLTransitionImpl::makeNByMTileFlip( ::sal_uInt16 n, ::sal_uInt16 m )
Tile.pushTriangle(basegfx::B2DVector( iPDn , jDm ) , basegfx::B2DVector( iDn , jDm ) , basegfx::B2DVector( iDn , jPDm ));
- Tile.pushTriangle(basegfx::B2DVector( iPDn , jPDm ) , basegfx::B2DVector( iPDn , jDm ) , basegfx::B2DVector( iDn , jPDm ));//bottom left corner of tile
+ Tile.pushTriangle(basegfx::B2DVector( iPDn , jPDm ) , basegfx::B2DVector( iPDn , jDm ) , basegfx::B2DVector( iDn , jPDm ));//bottom left corner of tile
Tile.Operations.push_back( new SRotate( basegfx::B3DVector( 1 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , 180 , true, iDn*jDm/2.0 , ((iPDn*jPDm)+1.0)/2.0 ) );
maLeavingSlidePrimitives.push_back(Tile);
@@ -870,10 +870,10 @@ const Primitive& Primitive::operator=(const Primitive& rvalue)
for(unsigned int i( 0 ); i < rvalue.TexCoords.size(); ++i)//SPEED! use copy or something. this is slow.
TexCoords.push_back(rvalue.TexCoords[i]);
for(unsigned int i( 0 ); i < rvalue.Normals.size(); ++i)//SPEED! use copy or something. this is slow.
- Normals.push_back(rvalue.Normals[i]);
- return *this;
+ Normals.push_back(rvalue.Normals[i]);
+ return *this;
}
-
+
Primitive::Primitive(const Primitive& rvalue)
{
for(unsigned int i( 0 ); i < rvalue.Operations.size(); ++i)
@@ -923,7 +923,7 @@ void Primitive::pushTriangle(const basegfx::B2DVector& SlideLocation0,const base
TexCoords.push_back(Texs[0]);
TexCoords.push_back(Texs[1]);
TexCoords.push_back(Texs[2]);
-
+
Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
@@ -943,7 +943,7 @@ void OGLTransitionImpl::prepareDiamond( double nTime, double /* SlideWidth */, d
Slide1.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
maEnteringSlidePrimitives.push_back (Slide1);
-
+
if( nTime >= 0.5 ) {
double m = 1 - nTime;
@@ -1022,7 +1022,7 @@ void OGLTransitionImpl::displaySlidesFadeSmoothly( double nTime, ::sal_Int32 glL
}
void OGLTransitionImpl::makeFadeSmoothly()
-{
+{
Primitive Slide;
Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
@@ -1059,7 +1059,7 @@ void OGLTransitionImpl::displaySlidesFadeThroughBlack( double nTime, ::sal_Int32
}
void OGLTransitionImpl::makeFadeThroughBlack()
-{
+{
Primitive Slide;
Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
@@ -1140,37 +1140,37 @@ void main() {\n\
";
int permutation256 [256]= {
-215, 100, 200, 204, 233, 50, 85, 196,
- 71, 141, 122, 160, 93, 131, 243, 234,
-162, 183, 36, 155, 4, 62, 35, 205,
- 40, 102, 33, 27, 255, 55, 214, 156,
- 75, 163, 134, 126, 249, 74, 197, 228,
- 72, 90, 206, 235, 17, 22, 49, 169,
-227, 89, 16, 5, 117, 60, 248, 230,
-217, 68, 138, 96, 194, 170, 136, 10,
-112, 238, 184, 189, 176, 42, 225, 212,
- 84, 58, 175, 244, 150, 168, 219, 236,
-101, 208, 123, 37, 164, 110, 158, 201,
- 78, 114, 57, 48, 70, 142, 106, 43,
-232, 26, 32, 252, 239, 98, 191, 94,
- 59, 149, 39, 187, 203, 190, 19, 13,
-133, 45, 61, 247, 23, 34, 20, 52,
-118, 209, 146, 193, 222, 18, 1, 152,
- 46, 41, 91, 148, 115, 25, 135, 77,
-254, 147, 224, 161, 9, 213, 223, 250,
-231, 251, 127, 166, 63, 179, 81, 130,
-139, 28, 120, 151, 241, 86, 111, 0,
- 88, 153, 172, 182, 159, 105, 178, 47,
- 51, 167, 65, 66, 92, 73, 198, 211,
-245, 195, 31, 220, 140, 76, 221, 186,
-154, 185, 56, 83, 38, 165, 109, 67,
-124, 226, 132, 53, 229, 29, 12, 181,
-121, 24, 207, 199, 177, 113, 30, 80,
- 3, 97, 188, 79, 216, 173, 8, 145,
- 87, 128, 180, 237, 240, 137, 125, 104,
- 15, 242, 119, 246, 103, 143, 95, 144,
- 2, 44, 69, 157, 192, 174, 14, 54,
-218, 82, 64, 210, 11, 6, 129, 21,
+215, 100, 200, 204, 233, 50, 85, 196,
+ 71, 141, 122, 160, 93, 131, 243, 234,
+162, 183, 36, 155, 4, 62, 35, 205,
+ 40, 102, 33, 27, 255, 55, 214, 156,
+ 75, 163, 134, 126, 249, 74, 197, 228,
+ 72, 90, 206, 235, 17, 22, 49, 169,
+227, 89, 16, 5, 117, 60, 248, 230,
+217, 68, 138, 96, 194, 170, 136, 10,
+112, 238, 184, 189, 176, 42, 225, 212,
+ 84, 58, 175, 244, 150, 168, 219, 236,
+101, 208, 123, 37, 164, 110, 158, 201,
+ 78, 114, 57, 48, 70, 142, 106, 43,
+232, 26, 32, 252, 239, 98, 191, 94,
+ 59, 149, 39, 187, 203, 190, 19, 13,
+133, 45, 61, 247, 23, 34, 20, 52,
+118, 209, 146, 193, 222, 18, 1, 152,
+ 46, 41, 91, 148, 115, 25, 135, 77,
+254, 147, 224, 161, 9, 213, 223, 250,
+231, 251, 127, 166, 63, 179, 81, 130,
+139, 28, 120, 151, 241, 86, 111, 0,
+ 88, 153, 172, 182, 159, 105, 178, 47,
+ 51, 167, 65, 66, 92, 73, 198, 211,
+245, 195, 31, 220, 140, 76, 221, 186,
+154, 185, 56, 83, 38, 165, 109, 67,
+124, 226, 132, 53, 229, 29, 12, 181,
+121, 24, 207, 199, 177, 113, 30, 80,
+ 3, 97, 188, 79, 216, 173, 8, 145,
+ 87, 128, 180, 237, 240, 137, 125, 104,
+ 15, 242, 119, 246, 103, 143, 95, 144,
+ 2, 44, 69, 157, 192, 174, 14, 54,
+218, 82, 64, 210, 11, 6, 129, 21,
116, 171, 99, 202, 7, 107, 253, 108
};
@@ -1295,7 +1295,7 @@ void OGLTransitionImpl::makeDissolve()
void OGLTransitionImpl::makeNewsflash()
{
Primitive Slide;
-
+
Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
Slide.Operations.push_back(new SRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0,0,0),3000,true,0,0.5));
diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
index b3e9ceae62c2..9ebd42c3f820 100644
--- a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionImpl.hxx
@@ -2,7 +2,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
@@ -34,13 +34,13 @@
#include <tools/prewin.h>
#include <tools/postwin.h>
-#if defined( WNT )
+#if defined( WNT )
#include <tools/prewin.h>
#include <tools/postwin.h>
#elif defined( OS2 )
#elif defined( QUARTZ )
#elif defined( UNX )
-#endif
+#endif
#include <vector>
#include <GL/gl.h>
@@ -78,7 +78,7 @@ public:
{}
~OGLTransitionImpl();
-
+
void prepare( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex );
void display( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight );
void finish();
@@ -117,15 +117,15 @@ private:
/** clears all the primitives and operations
*/
void clear();
-
+
/** All the primitives that use the leaving slide texture
*/
vector<Primitive> maLeavingSlidePrimitives;
-
+
/** All the primitives that use the leaving slide texture
*/
vector<Primitive> maEnteringSlidePrimitives;
-
+
/** All the surrounding scene objects
*/
vector<SceneObject*> maSceneObjects;
@@ -214,7 +214,7 @@ private:
GLuint maTexture;
};
-/** This class is a list of Triangles that will share Operations, and could possibly share
+/** This class is a list of Triangles that will share Operations, and could possibly share
*/
class Primitive
{
@@ -227,61 +227,61 @@ public:
void applyOperations(double nTime, double SlideWidthScale, double SlideHeightScale);
void display(double nTime, double SlideWidthScale, double SlideHeightScale);
const Primitive& operator=(const Primitive& rvalue);
-
+
/** PushBack a vertex,normal, and tex coord. Each SlideLocation is where on the slide is mapped to this location ( from (0,0) to (1,1) ). This will make sure the correct aspect ratio is used, and helps to make slides begin and end at the correct position. (0,0) is the top left of the slide, and (1,1) is the bottom right.
-
+
@param SlideLocation0
Location of first Vertex on slide
-
+
@param SlideLocation1
Location of second Vertex on slide
-
+
@param SlideLocation2
Location of third Vertex on slide
-
+
*/
void pushTriangle(const basegfx::B2DVector& SlideLocation0,const basegfx::B2DVector& SlideLocation1,const basegfx::B2DVector& SlideLocation2);
-
+
/** clear all the vertices, normals, tex coordinates, and normals
*/
void clearTriangles();
-
+
/** guards against directly changing the vertices
-
- @return
+
+ @return
the list of vertices
*/
const vector<basegfx::B3DVector>& getVertices() const {return Vertices;}
-
+
/** guards against directly changing the vertices
*/
const vector<basegfx::B3DVector>& getNormals() const {return Normals;}
-
+
/** guards against directly changing the vertices
-
- @return
+
+ @return
the list of Texture Coordinates
-
+
*/
const vector<basegfx::B2DVector>& getTexCoords() const {return TexCoords;}
/** list of Operations to be performed on this primitive.These operations will be called in the order they were pushed back in. In OpenGL this effectively uses the operations in the opposite order they were pushed back.
-
- @return
+
+ @return
the list of Operations
-
- */
+
+ */
vector<Operation*> Operations;
private:
/** list of vertices
*/
vector<basegfx::B3DVector> Vertices;
-
+
/** list of Normals
*/
vector<basegfx::B3DVector> Normals;
-
+
/** list of Texture Coordinates
*/
vector<basegfx::B2DVector> TexCoords;
@@ -294,33 +294,33 @@ class Operation
public:
Operation(){}
virtual ~Operation(){}
-
- /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to nT0 to being completely transformed from t = nT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to nT0, and completely transformed from t = nT0 to 1.
+
+ /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to nT0 to being completely transformed from t = nT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to nT0, and completely transformed from t = nT0 to 1.
*/
bool bInterpolate;
-
+
/** time to begin the transformation
*/
double nT0;
-
+
/** time to finish the transformation
*/
double nT1;
public:
/** this is the function that is called to give the Operation to OpenGL.
-
+
@param t
time from t = 0 to t = 1
-
+
@param SlideWidthScale
width of slide divided by width of window
-
+
@param SlideHeightScale
height of slide divided by height of window
-
+
*/
virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) = 0;
-
+
/** return a copy of this operation
*/
virtual Operation* clone() = 0;
@@ -333,27 +333,27 @@ class SRotate: public Operation
public:
void interpolate(double t,double SlideWidthScale,double SlideHeightScale);
virtual SRotate* clone();
-
+
/** Constructor
-
+
@param Axis
axis to rotate about
-
+
@param Origin
position that rotation axis runs through
-
+
@param Angle
angle in radians of CCW rotation
-
+
@param bInter
see Operation
-
+
@param T0
transformation starting time
-
+
@param T1
transformation ending time
-
+
*/
SRotate(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
~SRotate(){}
@@ -361,11 +361,11 @@ private:
/** axis to rotate CCW about
*/
basegfx::B3DVector axis;
-
+
/** position that rotation axis runs through
*/
basegfx::B3DVector origin;
-
+
/** angle in radians of CCW rotation
*/
double angle;
@@ -378,24 +378,24 @@ class SScale: public Operation
public:
void interpolate(double t,double SlideWidthScale,double SlideHeightScale);
SScale* clone();
-
+
/** Constructor
-
+
@param Scale
- amount to scale by
-
+ amount to scale by
+
@param Origin
position that rotation axis runs through
-
+
@param bInter
see Operation
-
+
@param T0
transformation starting time
-
+
@param T1
transformation ending time
-
+
*/
SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,bool bInter, double T0, double T1);
~SScale(){}
@@ -411,21 +411,21 @@ class STranslate: public Operation
public:
void interpolate(double t,double SlideWidthScale,double SlideHeightScale);
STranslate* clone();
-
+
/** Constructor
-
+
@param Vector
vector to translate
-
+
@param bInter
see Operation
-
+
@param T0
transformation starting time
-
+
@param T1
transformation ending time
-
+
*/
STranslate(const basegfx::B3DVector& Vector,bool bInter, double T0, double T1);
~STranslate(){}
@@ -442,21 +442,21 @@ class SEllipseTranslate: public Operation
public:
void interpolate(double t,double SlideWidthScale,double SlideHeightScale);
SEllipseTranslate* clone();
-
+
/** Constructor
-
+
@param Vector
vector to translate
-
+
@param bInter
see Operation
-
+
@param T0
transformation starting time
-
+
@param T1
transformation ending time
-
+
*/
SEllipseTranslate(double dWidth, double dHeight, double dStartPosition, double dEndPosition, bool bInter, double T0, double T1);
~SEllipseTranslate(){}
diff --git a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
index 2f0c6673ade9..33784088d3d5 100644
--- a/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
@@ -2,7 +2,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
@@ -60,7 +60,7 @@
#include <GL/glu.h>
-#if defined( WNT )
+#if defined( WNT )
#include <tools/prewin.h>
#include <windows.h>
#include <tools/postwin.h>
@@ -116,7 +116,7 @@ namespace
GLenum eType;
};
- /* channel ordering: (0:rgba, 1:bgra, 2:argb, 3:abgr)
+ /* channel ordering: (0:rgba, 1:bgra, 2:argb, 3:abgr)
*/
int calcComponentOrderIndex(const uno::Sequence<sal_Int8>& rTags)
{
@@ -127,7 +127,7 @@ namespace
RGB_RED, RGB_GREEN, RGB_BLUE, ALPHA,
RGB_BLUE, RGB_GREEN, RGB_RED, ALPHA,
ALPHA, RGB_RED, RGB_GREEN, RGB_BLUE,
- ALPHA, RGB_BLUE, RGB_GREEN, RGB_RED,
+ ALPHA, RGB_BLUE, RGB_GREEN, RGB_RED,
};
const sal_Int32 nNumComps(rTags.getLength());
@@ -177,14 +177,14 @@ public:
const Reference< rendering::XBitmap >& rLeavingBitmap,
const Reference< rendering::XBitmap >& rEnteringBitmap )
throw (uno::RuntimeException);
-
+
protected:
void disposeContextAndWindow();
void disposeTextures();
// WeakComponentImplHelperBase
virtual void SAL_CALL disposing();
-
+
bool isDisposed() const
{
return (rBHelper.bDisposed || rBHelper.bInDispose);
@@ -202,7 +202,7 @@ protected:
void prepareEnvironment ();
const OGLFormat* chooseFormats();
-private:
+private:
/** After the window has been created, and the slides have been set, we'll initialize the slides with OpenGL.
*/
void GLInitSlides();
@@ -211,10 +211,10 @@ private:
/// Holds the information of our new child window
struct GLWindow
{
-#if defined( WNT )
- HWND hWnd;
- HDC hDC;
- HGLRC hRC;
+#if defined( WNT )
+ HWND hWnd;
+ HDC hDC;
+ HGLRC hRC;
#elif defined( OS2 )
#elif defined( QUARTZ )
#elif defined( UNX )
@@ -236,14 +236,14 @@ private:
bool HasGLXExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, (const GLubyte*) GLXExtensions ); }
bool HasGLExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, GLExtensions ); }
} GLWin;
-
+
/** OpenGL handle to the leaving slide's texture
*/
unsigned int GLleavingSlide;
/** OpenGL handle to the entering slide's texture
*/
unsigned int GLenteringSlide;
-
+
/** pointer to our window which we MIGHT create.
*/
class SystemChildWindow* pWindow;
@@ -251,11 +251,11 @@ private:
Reference< presentation::XSlideShowView > mxView;
Reference< rendering::XIntegerBitmap > mxLeavingBitmap;
Reference< rendering::XIntegerBitmap > mxEnteringBitmap;
-
+
/** raw bytes of the entering bitmap
*/
uno::Sequence<sal_Int8> EnteringBytes;
-
+
/** raw bytes of the leaving bitmap
*/
uno::Sequence<sal_Int8> LeavingBytes;
@@ -271,17 +271,17 @@ private:
bool mbFreeEnteringPixmap;
unx::Pixmap maLeavingPixmap;
unx::Pixmap maEnteringPixmap;
-
+
/** the form the raw bytes are in for the bitmaps
*/
- rendering::IntegerBitmapLayout SlideBitmapLayout;
-
+ rendering::IntegerBitmapLayout SlideBitmapLayout;
+
/** the size of the slides
- */
+ */
geometry::IntegerSize2D SlideSize;
-
+
/** Our Transition to be used.
- */
+ */
OGLTransitionImpl* pTransition;
public:
@@ -376,7 +376,7 @@ bool OGLTransitionerImpl::initialize( const Reference< presentation::XSlideShowV
bool OGLTransitionerImpl::createWindow( Window* pPWindow )
{
const SystemEnvData* sysData(pPWindow->GetSystemData());
-#if defined( WNT )
+#if defined( WNT )
GLWin.hWnd = sysData->hWnd;
#elif defined( UNX )
GLWin.dpy = reinterpret_cast<unx::Display*>(sysData->pDisplay);
@@ -408,7 +408,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
GLX_DEPTH_SIZE,0,//no depth buffer
None
};
- static int attrList2[] =
+ static int attrList2[] =
{
GLX_RGBA,//only TrueColor or DirectColor
/// single buffered
@@ -437,8 +437,8 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
GLX_BLUE_SIZE,4,/// use the maximum blue bits, with a minimum of 4 bits
GLX_DEPTH_SIZE,1,/// use the maximum depth bits, making sure there is a depth buffer
None
- };
- static int* attrTable[] =
+ };
+ static int* attrTable[] =
{
attrList0,
attrList1,
@@ -534,13 +534,13 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
}
#endif
-#if defined( WNT )
+#if defined( WNT )
const SystemEnvData* pChildSysData = NULL;
SystemWindowData winData;
winData.nSize = sizeof(winData);
pWindow=new SystemChildWindow(pPWindow, 0, &winData, FALSE);
pChildSysData = pWindow->GetSystemData();
-#endif
+#endif
if( pWindow )
{
@@ -550,7 +550,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
pWindow->SetControlForeground();
pWindow->SetControlBackground();
pWindow->EnablePaint(FALSE);
-#if defined( WNT )
+#if defined( WNT )
GLWin.hWnd = sysData->hWnd;
#elif defined( UNX )
GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay);
@@ -600,7 +600,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
GLWin.Height = aCanvasArea.Height;
OSL_TRACE("canvas area: %d,%d - %dx%d", aCanvasArea.X, aCanvasArea.Y, aCanvasArea.Width, aCanvasArea.Height);
-#if defined( WNT )
+#if defined( WNT )
GLWin.hDC = GetDC(GLWin.hWnd);
#elif defined( UNX )
GLWin.ctx = glXCreateContext(GLWin.dpy,
@@ -613,27 +613,27 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
}
#endif
-#if defined( WNT )
- PIXELFORMATDESCRIPTOR PixelFormatFront = // PixelFormat Tells Windows How We Want Things To Be
+#if defined( WNT )
+ PIXELFORMATDESCRIPTOR PixelFormatFront = // PixelFormat Tells Windows How We Want Things To Be
{
sizeof(PIXELFORMATDESCRIPTOR),
- 1, // Version Number
+ 1, // Version Number
PFD_DRAW_TO_WINDOW |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER,
- PFD_TYPE_RGBA, // Request An RGBA Format
- (BYTE)32, // Select Our Color Depth
- 0, 0, 0, 0, 0, 0, // Color Bits Ignored
- 0, // No Alpha Buffer
- 0, // Shift Bit Ignored
- 0, // No Accumulation Buffer
- 0, 0, 0, 0, // Accumulation Bits Ignored
- 64, // 32 bit Z-BUFFER
- 0, // 0 bit stencil buffer
- 0, // No Auxiliary Buffer
- 0, // now ignored
- 0, // Reserved
- 0, 0, 0 // Layer Masks Ignored
+ PFD_TYPE_RGBA, // Request An RGBA Format
+ (BYTE)32, // Select Our Color Depth
+ 0, 0, 0, 0, 0, 0, // Color Bits Ignored
+ 0, // No Alpha Buffer
+ 0, // Shift Bit Ignored
+ 0, // No Accumulation Buffer
+ 0, 0, 0, 0, // Accumulation Bits Ignored
+ 64, // 32 bit Z-BUFFER
+ 0, // 0 bit stencil buffer
+ 0, // No Auxiliary Buffer
+ 0, // now ignored
+ 0, // Reserved
+ 0, 0, 0 // Layer Masks Ignored
};
int WindowPix = ChoosePixelFormat(GLWin.hDC,&PixelFormatFront);
SetPixelFormat(GLWin.hDC,WindowPix,&PixelFormatFront);
@@ -690,12 +690,12 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
glCullFace(GL_BACK);
glClearColor (0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
-#if defined( WNT )
+#if defined( WNT )
SwapBuffers(GLWin.hDC);
#elif defined( UNX )
unx::glXSwapBuffers(GLWin.dpy, GLWin.win);
#endif
-
+
glEnable(GL_LIGHTING);
GLfloat light_direction[] = { 0.0 , 0.0 , 1.0 };
GLfloat materialDiffuse[] = { 1.0 , 1.0 , 1.0 , 1.0};
@@ -705,7 +705,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
glEnable(GL_NORMALIZE);
if( LeavingBytes.hasElements() && EnteringBytes.hasElements())
- GLInitSlides();//we already have uninitialized slides, let's initialize
+ GLInitSlides();//we already have uninitialized slides, let's initialize
if( pTransition && pTransition->mnRequiredGLVersion <= cnGLVersion )
pTransition->prepare( GLleavingSlide, GLenteringSlide );
@@ -713,14 +713,14 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
return true;
}
-void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >& xLeavingSlide,
+void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >& xLeavingSlide,
const uno::Reference< rendering::XBitmap >& xEnteringSlide )
{
osl::MutexGuard const guard( m_aMutex );
if (isDisposed())
return;
-
+
mxLeavingBitmap.set( xLeavingSlide , UNO_QUERY_THROW );
mxEnteringBitmap.set( xEnteringSlide , UNO_QUERY_THROW );
Reference< XFastPropertySet > xLeavingSet( xLeavingSlide , UNO_QUERY );
@@ -800,7 +800,7 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
}
errorTriggered = false;
}
-
+
EnteringPixmap = glXCreatePixmap( GLWin.dpy, GLWin.fbc, maEnteringPixmap, pixmapAttribs );
// sync so that we possibly get an XError
@@ -830,7 +830,7 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
if( !mbUseEnteringPixmap )
EnteringBytes = mxEnteringBitmap->getData(SlideBitmapLayout,SlideRect);
-// TODO
+// TODO
#ifdef UNX
if(GLWin.ctx)//if we have a rendering context, let's init the slides
#endif
@@ -885,16 +885,16 @@ void OGLTransitionerImpl::createTexture( unsigned int* texID,
#endif
if( !pFormat )
{
- // force-convert color to ARGB8888 int color space
+ // force-convert color to ARGB8888 int color space
uno::Sequence<sal_Int8> tempBytes(
SlideBitmapLayout.ColorSpace->convertToIntegerColorSpace(
data,
canvas::tools::getStdColorSpace()));
- gluBuild2DMipmaps(GL_TEXTURE_2D,
- 4,
- SlideSize.Width,
- SlideSize.Height,
- GL_RGBA,
+ gluBuild2DMipmaps(GL_TEXTURE_2D,
+ 4,
+ SlideSize.Width,
+ SlideSize.Height,
+ GL_RGBA,
GL_UNSIGNED_BYTE,
&tempBytes[0]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -967,7 +967,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
(0:16, 1:24, 2:32), then channel ordering: (0:rgba, 1:bgra,
2:argb, 3:abgr)
*/
- static const OGLFormat lcl_RGB24[] =
+ static const OGLFormat lcl_RGB24[] =
{
// 24 bit RGB
{3, GL_BGR, GL_UNSIGNED_BYTE},
@@ -978,7 +978,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
#if defined(GL_VERSION_1_2) && defined(GLU_VERSION_1_3)
// more format constants available
- static const OGLFormat lcl_RGB16[] =
+ static const OGLFormat lcl_RGB16[] =
{
// 16 bit RGB
{3, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV},
@@ -987,7 +987,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
{3, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}
};
- static const OGLFormat lcl_ARGB16_4[] =
+ static const OGLFormat lcl_ARGB16_4[] =
{
// 16 bit ARGB
{4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV},
@@ -996,7 +996,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
{4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4}
};
- static const OGLFormat lcl_ARGB16_5[] =
+ static const OGLFormat lcl_ARGB16_5[] =
{
// 16 bit ARGB
{4, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV},
@@ -1005,7 +1005,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
{4, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1}
};
- static const OGLFormat lcl_ARGB32[] =
+ static const OGLFormat lcl_ARGB32[] =
{
// 32 bit ARGB
{4, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV},
@@ -1024,7 +1024,7 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
// supported component ordering?
const int nComponentOrderIndex(
calcComponentOrderIndex(aComponentTags));
- if( nComponentOrderIndex != -1 )
+ if( nComponentOrderIndex != -1 )
{
switch( nBitsPerPixel )
{
@@ -1060,8 +1060,8 @@ const OGLFormat* OGLTransitionerImpl::chooseFormats()
const uno::Sequence<sal_Int8> aComponentTags(
xIntColorSpace->getComponentTags());
const int nComponentOrderIndex(calcComponentOrderIndex(aComponentTags));
- if( aComponentTags.getLength() == 3 &&
- nComponentOrderIndex != -1 &&
+ if( aComponentTags.getLength() == 3 &&
+ nComponentOrderIndex != -1 &&
xIntColorSpace->getBitsPerPixel() == 24 )
{
pDetectedFormat = &lcl_RGB24[nComponentOrderIndex];
@@ -1140,12 +1140,12 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeExc
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if(pTransition)
- pTransition->display( nTime, GLleavingSlide, GLenteringSlide,
+ pTransition->display( nTime, GLleavingSlide, GLenteringSlide,
SlideSize.Width, SlideSize.Height,
static_cast<double>(GLWin.Width),
static_cast<double>(GLWin.Height) );
-#if defined( WNT )
+#if defined( WNT )
SwapBuffers(GLWin.hDC);
#elif defined( UNX )
unx::glXSwapBuffers(GLWin.dpy, GLWin.win);
@@ -1187,8 +1187,8 @@ void OGLTransitionerImpl::disposeContextAndWindow()
#if defined( WNT )
if (GLWin.hRC)
{
- wglMakeCurrent( GLWin.hDC, 0 ); // kill Device Context
- wglDeleteContext( GLWin.hRC ); // Kill Render Context
+ wglMakeCurrent( GLWin.hDC, 0 ); // kill Device Context
+ wglDeleteContext( GLWin.hRC ); // Kill Render Context
ReleaseDC( GLWin.hWnd, GLWin.hDC ); // Release Window
}
#elif defined( UNX )
@@ -1304,12 +1304,12 @@ void OGLTransitionerImpl::disposing()
mxView.clear();
}
-OGLTransitionerImpl::OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition) :
- OGLTransitionerImplBase(m_aMutex),
+OGLTransitionerImpl::OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition) :
+ OGLTransitionerImplBase(m_aMutex),
GLWin(),
- GLleavingSlide( 0 ),
- GLenteringSlide( 0 ),
- pWindow( NULL ),
+ GLleavingSlide( 0 ),
+ GLenteringSlide( 0 ),
+ pWindow( NULL ),
mxView(),
mxLeavingBitmap(),
mxEnteringBitmap(),
@@ -1358,7 +1358,7 @@ public:
case animations::TransitionSubType::CORNERSOUT:
case animations::TransitionSubType::CIRCLE:
case animations::TransitionSubType::FANOUTHORIZONTAL:
- case animations::TransitionSubType::CORNERSIN:
+ case animations::TransitionSubType::CORNERSIN:
case animations::TransitionSubType::LEFTTORIGHT:
case animations::TransitionSubType::TOPTOBOTTOM:
case animations::TransitionSubType::TOPRIGHT:
@@ -1385,11 +1385,11 @@ public:
return sal_False;
}
- virtual uno::Reference< presentation::XTransition > SAL_CALL createTransition(
- ::sal_Int16 transitionType,
- ::sal_Int16 transitionSubType,
- const uno::Reference< presentation::XSlideShowView >& view,
- const uno::Reference< rendering::XBitmap >& leavingBitmap,
+ virtual uno::Reference< presentation::XTransition > SAL_CALL createTransition(
+ ::sal_Int16 transitionType,
+ ::sal_Int16 transitionSubType,
+ const uno::Reference< presentation::XSlideShowView >& view,
+ const uno::Reference< rendering::XBitmap >& leavingBitmap,
const uno::Reference< rendering::XBitmap >& enteringBitmap )
throw (uno::RuntimeException)
{
@@ -1403,7 +1403,7 @@ public:
( transitionType == animations::TransitionType::FADE && transitionSubType == animations::TransitionSubType::FADEOVERCOLOR ) ||
( transitionType == animations::TransitionType::IRISWIPE && transitionSubType == animations::TransitionSubType::DIAMOND ) ) )
return uno::Reference< presentation::XTransition >();
-
+
OGLTransitionImpl* pTransition = NULL;
@@ -1413,17 +1413,17 @@ public:
{
case animations::TransitionSubType::ACROSS:
pTransition->makeNByMTileFlip(8,6);
- break;
+ break;
case animations::TransitionSubType::CORNERSOUT:
pTransition->makeOutsideCubeFaceToLeft();
- break;
+ break;
case animations::TransitionSubType::CIRCLE:
pTransition->makeRevolvingCircles(8,128);
break;
case animations::TransitionSubType::FANOUTHORIZONTAL:
pTransition->makeHelix(20);
break;
- case animations::TransitionSubType::CORNERSIN:
+ case animations::TransitionSubType::CORNERSIN:
pTransition->makeInsideCubeFaceToLeft();
break;
case animations::TransitionSubType::LEFTTORIGHT:
diff --git a/slideshow/source/engine/activities/accumulation.hxx b/slideshow/source/engine/activities/accumulation.hxx
index d901b54ecc3d..b8b317192021 100644
--- a/slideshow/source/engine/activities/accumulation.hxx
+++ b/slideshow/source/engine/activities/accumulation.hxx
@@ -2,7 +2,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
@@ -42,7 +42,7 @@ namespace slideshow
This template handles value accumulation across repeated
effect runs: returned is the end value times the repeat
count, plus the current value.
-
+
@param rEndValue
End value of the simple animation.
@@ -53,35 +53,35 @@ namespace slideshow
@param rCurrValue
Current animation value
*/
- template< typename ValueType > ValueType accumulate( const ValueType& rEndValue,
- sal_uInt32 nRepeatCount,
- const ValueType& rCurrValue )
+ template< typename ValueType > ValueType accumulate( const ValueType& rEndValue,
+ sal_uInt32 nRepeatCount,
+ const ValueType& rCurrValue )
{
return nRepeatCount*rEndValue + rCurrValue;
}
/// Specialization for non-addable enums/constant values
- template<> sal_Int16 accumulate< sal_Int16 >( const sal_Int16&,
- sal_uInt32,
- const sal_Int16& rCurrValue )
+ template<> sal_Int16 accumulate< sal_Int16 >( const sal_Int16&,
+ sal_uInt32,
+ const sal_Int16& rCurrValue )
{
// always return rCurrValue, it's forbidden to add enums/constant values...
return rCurrValue;
}
/// Specialization for non-addable strings
- template<> ::rtl::OUString accumulate< ::rtl::OUString >( const ::rtl::OUString&,
+ template<> ::rtl::OUString accumulate< ::rtl::OUString >( const ::rtl::OUString&,
sal_uInt32,
- const ::rtl::OUString& rCurrValue )
+ const ::rtl::OUString& rCurrValue )
{
// always return rCurrValue, it's impossible to add strings...
return rCurrValue;
}
/// Specialization for non-addable bools
- template<> bool accumulate< bool >( const bool&,
- sal_uInt32,
- const bool& bCurrValue )
+ template<> bool accumulate< bool >( const bool&,
+ sal_uInt32,
+ const bool& bCurrValue )
{
// always return bCurrValue, SMIL spec requires to ignore
// cumulative behaviour for bools.
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx
index 9308d0b80217..f42a6497f25b 100644
--- a/slideshow/source/engine/activities/activitiesfactory.cxx
+++ b/slideshow/source/engine/activities/activitiesfactory.cxx
@@ -2,7 +2,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
@@ -87,14 +87,14 @@ template<> struct FormulaTraits<double>
// =================================================================
/** FromToBy handler
-
+
Provides the Activity specializations for FromToBy
animations (e.g. those without a values list).
-
+
This template makes heavy use of SFINAE, only one of
the perform*() methods will compile for each of the
base classes.
-
+
Note that we omit the virtual keyword on the perform()
overrides on purpose; those that actually do override
baseclass virtual methods inherit the property, and
@@ -102,14 +102,14 @@ template<> struct FormulaTraits<double>
having all perform() method in the vtable actually
creates POIs for them, which breaks the whole SFINAE
concept (IOW, this template won't compile any longer).
-
+
@tpl BaseType
Base class to use for this activity. Only
ContinuousActivityBase and DiscreteActivityBase are
supported here.
-
+
@tpl AnimationType
- Type of the Animation to call.
+ Type of the Animation to call.
*/
template<class BaseType, typename AnimationType>
class FromToByActivity : public BaseType
@@ -117,39 +117,39 @@ class FromToByActivity : public BaseType
public:
typedef typename AnimationType::ValueType ValueType;
typedef boost::optional<ValueType> OptionalValueType;
-
+
private:
- // some compilers don't inline whose definition they haven't
+ // some compilers don't inline whose definition they haven't
// seen before the call site...
ValueType getPresentationValue( const ValueType& rVal ) const
{
return FormulaTraits<ValueType>::getPresentationValue( rVal, mpFormula);
}
-
+
public:
/** Create FromToByActivity.
-
+
@param rFrom
From this value, the animation starts
-
+
@param rTo
With this value, the animation ends
-
+
@param rBy
With this value, the animation increments the start value
-
+
@param rParms
Standard Activity parameter struct
-
+
@param rAnim
Shared ptr to AnimationType
-
+
@param rInterpolator
Interpolator object to be used for lerping between
start and end value (need to be passed, since it
might contain state, e.g. interpolation direction
for HSL color space).
-
+
@param bCumulative
Whether repeated animations should cumulate the
value, or start fresh each time.
@@ -175,60 +175,60 @@ public:
mbCumulative( bCumulative )
{
ENSURE_OR_THROW( mpAnim, "Invalid animation object" );
-
+
ENSURE_OR_THROW(
rTo || rBy,
"From and one of To or By, or To or By alone must be valid" );
}
-
- virtual void startAnimation()
+
+ virtual void startAnimation()
{
if (this->isDisposed() || !mpAnim)
return;
BaseType::startAnimation();
-
- // start animation
+
+ // start animation
mpAnim->start( BaseType::getShape(),
BaseType::getShapeAttributeLayer() );
-
+
// setup start and end value. Determine animation
// start value only when animation actually
// started up (this order is part of the Animation
// interface contract)
const ValueType aAnimationStartValue( mpAnim->getUnderlyingValue() );
-
+
// first of all, determine general type of
// animation, by inspecting which of the FromToBy values
// are actually valid.
// See http://www.w3.org/TR/smil20/animation.html#AnimationNS-FromToBy
// for a definition
- if( maFrom )
+ if( maFrom )
{
// From-to or From-by animation. According to
// SMIL spec, the To value takes precedence
// over the By value, if both are specified
- if( maTo )
+ if( maTo )
{
// From-To animation
maStartValue = *maFrom;
maEndValue = *maTo;
}
- else if( maBy )
+ else if( maBy )
{
// From-By animation
maStartValue = *maFrom;
maEndValue = maStartValue + *maBy;
}
}
- else
+ else
{
// By or To animation. According to SMIL spec,
// the To value takes precedence over the By
// value, if both are specified
- if( maTo )
+ if( maTo )
{
// To animation
-
+
// According to the SMIL spec
// (http://www.w3.org/TR/smil20/animation.html#animationNS-ToAnimation),
// the to animation interpolates between
@@ -236,7 +236,7 @@ public:
mbDynamicStartValue = true;
maEndValue = *maTo;
}
- else if( maBy )
+ else if( maBy )
{
// By animation
maStartValue = aAnimationStartValue;
@@ -244,14 +244,14 @@ public:
}
}
}
-
+
virtual void endAnimation()
{
// end animation
if (mpAnim)
mpAnim->end();
}
-
+
/// perform override for ContinuousActivityBase
void perform( double nModifiedTime, sal_uInt32 nRepeatCount ) const
{
@@ -259,7 +259,7 @@ public:
return;
(*mpAnim)(
getPresentationValue(
- accumulate( maEndValue,
+ accumulate( maEndValue,
mbCumulative * nRepeatCount, // means: mbCumulative ? nRepeatCount : 0,
maInterpolator( (mbDynamicStartValue
? mpAnim->getUnderlyingValue()
@@ -275,7 +275,7 @@ public:
{
if (this->isDisposed() || !mpAnim)
return;
- (*mpAnim)(
+ (*mpAnim)(
getPresentationValue(
accumulate( maEndValue, mbCumulative ? nRepeatCount : 0,
lerp( maInterpolator,
@@ -283,12 +283,12 @@ public:
? mpAnim->getUnderlyingValue()
: maStartValue),
maEndValue,
- nFrame,
+ nFrame,
BaseType::getNumberOfKeyTimes() ) ) ) );
}
using BaseType::isAutoReverse;
-
+
virtual void performEnd()
{
// xxx todo: good guess
@@ -300,7 +300,7 @@ public:
(*mpAnim)( getPresentationValue( maEndValue ) );
}
}
-
+
/// Disposable:
virtual void dispose()
{
@@ -312,12 +312,12 @@ private:
const OptionalValueType maFrom;
const OptionalValueType maTo;
const OptionalValueType maBy;
-
+
ExpressionNodeSharedPtr mpFormula;
-
+
ValueType maStartValue;
ValueType maEndValue;
-
+
::boost::shared_ptr< AnimationType > mpAnim;
Interpolator< ValueType > maInterpolator;
bool mbDynamicStartValue;
@@ -326,10 +326,10 @@ private:
/** Generate Activity corresponding to given FromToBy values
-
+
@tpl BaseType
BaseType to use for deriving the Activity from
-
+
@tpl AnimationType
Subtype of the Animation object (e.g. NumberAnimation)
*/
@@ -347,35 +347,35 @@ AnimationActivitySharedPtr createFromToByActivity(
{
typedef typename AnimationType::ValueType ValueType;
typedef boost::optional<ValueType> OptionalValueType;
-
+
OptionalValueType aFrom;
OptionalValueType aTo;
OptionalValueType aBy;
-
+
ValueType aTmpValue;
-
- if( rFromAny.hasValue() )
+
+ if( rFromAny.hasValue() )
{
ENSURE_OR_THROW(
extractValue( aTmpValue, rFromAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract from value" );
aFrom.reset(aTmpValue);
}
- if( rToAny.hasValue() )
+ if( rToAny.hasValue() )
{
ENSURE_OR_THROW(
extractValue( aTmpValue, rToAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract to value" );
aTo.reset(aTmpValue);
}
- if( rByAny.hasValue() )
+ if( rByAny.hasValue() )
{
ENSURE_OR_THROW(
extractValue( aTmpValue, rByAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract by value" );
aBy.reset(aTmpValue);
}
-
+
return AnimationActivitySharedPtr(
new FromToByActivity<BaseType, AnimationType>(
aFrom,
@@ -389,7 +389,7 @@ AnimationActivitySharedPtr createFromToByActivity(
/* The following table shows which animator combines with
which Activity type:
-
+
NumberAnimator: all
PairAnimation: all
ColorAnimation: all
@@ -398,14 +398,14 @@ AnimationActivitySharedPtr createFromToByActivity(
*/
/** Values handler
-
+
Provides the Activity specializations for value lists
animations.
-
+
This template makes heavy use of SFINAE, only one of
the perform*() methods will compile for each of the
base classes.
-
+
Note that we omit the virtual keyword on the perform()
overrides on purpose; those that actually do override
baseclass virtual methods inherit the property, and
@@ -413,7 +413,7 @@ AnimationActivitySharedPtr createFromToByActivity(
having all perform() method in the vtable actually
creates POIs for them, which breaks the whole SFINAE
concept (IOW, this template won't compile any longer).
-
+
@tpl BaseType
Base class to use for this activity. Only
ContinuousKeyTimeActivityBase and DiscreteActivityBase
@@ -421,9 +421,9 @@ AnimationActivitySharedPtr createFromToByActivity(
times, the client must emulate key times by providing
a vector of equally spaced values between 0 and 1,
with the same number of entries as the values vector.
-
+
@tpl AnimationType
- Type of the Animation to call.
+ Type of the Animation to call.
*/
template<class BaseType, typename AnimationType>
class ValuesActivity : public BaseType
@@ -431,34 +431,34 @@ class ValuesActivity : public BaseType
public:
typedef typename AnimationType::ValueType ValueType;
typedef std::vector<ValueType> ValueVectorType;
-
+
private:
- // some compilers don't inline methods whose definition they haven't
+ // some compilers don't inline methods whose definition they haven't
// seen before the call site...
ValueType getPresentationValue( const ValueType& rVal ) const
{
return FormulaTraits<ValueType>::getPresentationValue(
rVal, mpFormula );
}
-
+
public:
/** Create ValuesActivity.
-
+
@param rValues
Value vector to cycle animation through
-
+
@param rParms
Standard Activity parameter struct
-
+
@param rAnim
Shared ptr to AnimationType
-
+
@param rInterpolator
Interpolator object to be used for lerping between
start and end value (need to be passed, since it
might contain state, e.g. interpolation direction
for HSL color space).
-
+
@param bCumulative
Whether repeated animations should cumulate the
value, or start afresh each time.
@@ -479,25 +479,25 @@ public:
ENSURE_OR_THROW( mpAnim, "Invalid animation object" );
ENSURE_OR_THROW( !rValues.empty(), "Empty value vector" );
}
-
+
virtual void startAnimation()
{
if (this->isDisposed() || !mpAnim)
return;
BaseType::startAnimation();
-
+
// start animation
mpAnim->start( BaseType::getShape(),
BaseType::getShapeAttributeLayer() );
}
-
+
virtual void endAnimation()
{
// end animation
if (mpAnim)
mpAnim->end();
}
-
+
/// perform override for ContinuousKeyTimeActivityBase base
void perform( sal_uInt32 nIndex,
double nFractionalIndex,
@@ -507,14 +507,14 @@ public:
return;
ENSURE_OR_THROW( nIndex+1 < maValues.size(),
"ValuesActivity::perform(): index out of range" );
-
+
// interpolate between nIndex and nIndex+1 values
- (*mpAnim)(
+ (*mpAnim)(
getPresentationValue(
accumulate( maValues.back(),
mbCumulative ? nRepeatCount : 0,
- maInterpolator( maValues[ nIndex ],
- maValues[ nIndex+1 ],
+ maInterpolator( maValues[ nIndex ],
+ maValues[ nIndex+1 ],
nFractionalIndex ) ) ) );
}
@@ -527,44 +527,44 @@ public:
return;
ENSURE_OR_THROW( nFrame < maValues.size(),
"ValuesActivity::perform(): index out of range" );
-
+
// this is discrete, thus no lerp here.
- (*mpAnim)(
+ (*mpAnim)(
getPresentationValue(
accumulate( maValues.back(),
mbCumulative ? nRepeatCount : 0,
maValues[ nFrame ] ) ) );
}
-
+
virtual void performEnd()
{
// xxx todo: good guess
if (mpAnim)
(*mpAnim)( getPresentationValue( maValues.back() ) );
}
-
+
/// Disposable:
virtual void dispose()
{
mpAnim.reset();
BaseType::dispose();
}
-
+
private:
ValueVectorType maValues;
-
+
ExpressionNodeSharedPtr mpFormula;
-
+
boost::shared_ptr<AnimationType> mpAnim;
Interpolator< ValueType > maInterpolator;
bool mbCumulative;
};
/** Generate Activity corresponding to given Value vector
-
+
@tpl BaseType
BaseType to use for deriving the Activity from
-
+
@tpl AnimationType
Subtype of the Animation object (e.g. NumberAnimation)
*/
@@ -580,19 +580,19 @@ AnimationActivitySharedPtr createValueListActivity(
{
typedef typename AnimationType::ValueType ValueType;
typedef std::vector<ValueType> ValueVectorType;
-
- ValueVectorType aValueVector;
+
+ ValueVectorType aValueVector;
aValueVector.reserve( rValues.getLength() );
-
+
for( ::std::size_t i=0, nLen=rValues.getLength(); i<nLen; ++i )
{
- ValueType aValue;
+ ValueType aValue;
ENSURE_OR_THROW(
extractValue( aValue, rValues[i], rShape, rSlideBounds ),
"createValueListActivity(): Could not extract values" );
aValueVector.push_back( aValue );
}
-
+
return AnimationActivitySharedPtr(
new ValuesActivity<BaseType, AnimationType>(
aValueVector,
@@ -603,20 +603,20 @@ AnimationActivitySharedPtr createValueListActivity(
}
/** Generate Activity for given XAnimate, corresponding to given Value vector
-
+
@tpl AnimationType
Subtype of the Animation object (e.g. NumberAnimation)
-
+
@param rParms
Common activity parameters
-
+
@param xNode
XAnimate node, to retrieve animation values from
-
+
@param rAnim
Actual animation to operate with (gets called with the
time-dependent values)
-
+
@param rInterpolator
Interpolator object to be used for lerping between
start and end values (need to be passed, since it
@@ -633,7 +633,7 @@ AnimationActivitySharedPtr createActivity(
{
// setup common parameters
// =======================
-
+
ActivityParameters aActivityParms( rParms.mpEndEvent,
rParms.mrEventQueue,
rParms.mrActivitiesQueue,
@@ -643,75 +643,75 @@ AnimationActivitySharedPtr createActivity(
rParms.mnDeceleration,
rParms.mnMinNumberOfFrames,
rParms.mbAutoReverse );
-
- // is a formula given?
+
+ // is a formula given?
const ::rtl::OUString& rFormulaString( xNode->getFormula() );
if( rFormulaString.getLength() )
{
// yep, parse and pass to ActivityParameters
- try
+ try
{
- aActivityParms.mpFormula =
+ aActivityParms.mpFormula =
SmilFunctionParser::parseSmilFunction(
rFormulaString,
calcRelativeShapeBounds(
rParms.maSlideBounds,
rParms.mpShape->getBounds() ) );
}
- catch( ParseError& )
+ catch( ParseError& )
{
// parse error, thus no formula
OSL_ENSURE( false,
"createActivity(): Error parsing formula string" );
}
}
-
+
// are key times given?
const uno::Sequence< double >& aKeyTimes( xNode->getKeyTimes() );
- if( aKeyTimes.hasElements() )
+ if( aKeyTimes.hasElements() )
{
// yes, convert them from Sequence< double >
aActivityParms.maDiscreteTimes.resize( aKeyTimes.getLength() );
comphelper::sequenceToArray(
- &aActivityParms.maDiscreteTimes[0],
+ &aActivityParms.maDiscreteTimes[0],
aKeyTimes ); // saves us some temporary vectors
}
-
+
// values sequence given?
const sal_Int32 nValueLen( xNode->getValues().getLength() );
- if( nValueLen )
+ if( nValueLen )
{
// Value list activity
// ===================
-
+
// fake keytimes, if necessary
- if( !aKeyTimes.hasElements() )
+ if( !aKeyTimes.hasElements() )
{
// create a dummy vector of key times,
// with aValues.getLength equally spaced entries.
for( sal_Int32 i=0; i<nValueLen; ++i )
aActivityParms.maDiscreteTimes.push_back( double(i)/nValueLen );
}
-
+
// determine type of animation needed here:
// Value list activities are possible with
// ContinuousKeyTimeActivityBase and DiscreteActivityBase
// specializations
const sal_Int16 nCalcMode( xNode->getCalcMode() );
-
- switch( nCalcMode )
+
+ switch( nCalcMode )
{
- case animations::AnimationCalcMode::DISCRETE:
+ case animations::AnimationCalcMode::DISCRETE:
{
// since DiscreteActivityBase suspends itself
// between the frames, create a WakeupEvent for it.
- aActivityParms.mpWakeupEvent.reset(
+ aActivityParms.mpWakeupEvent.reset(
new WakeupEvent(
rParms.mrEventQueue.getTimer(),
rParms.mrActivitiesQueue ) );
-
+
AnimationActivitySharedPtr pActivity(
- createValueListActivity< DiscreteActivityBase >(
+ createValueListActivity< DiscreteActivityBase >(
xNode->getValues(),
aActivityParms,
rAnim,
@@ -719,23 +719,23 @@ AnimationActivitySharedPtr createActivity(
xNode->getAccumulate(),
rParms.mpShape,
rParms.maSlideBounds ) );
-
+
// WakeupEvent and DiscreteActivityBase need circular
// references to the corresponding other object.
aActivityParms.mpWakeupEvent->setActivity( pActivity );
-
+
return pActivity;
}
-
+
default:
OSL_ENSURE( false, "createActivity(): unexpected case" );
- // FALLTHROUGH intended
+ // FALLTHROUGH intended
case animations::AnimationCalcMode::PACED:
// FALLTHROUGH intended
case animations::AnimationCalcMode::SPLINE:
// FALLTHROUGH intended
case animations::AnimationCalcMode::LINEAR:
- return createValueListActivity< ContinuousKeyTimeActivityBase >(
+ return createValueListActivity< ContinuousKeyTimeActivityBase >(
xNode->getValues(),
aActivityParms,
rAnim,
@@ -745,39 +745,39 @@ AnimationActivitySharedPtr createActivity(
rParms.maSlideBounds );
}
}
- else
+ else
{
// FromToBy activity
// =================
-
+
// determine type of animation needed here:
// FromToBy activities are possible with
// ContinuousActivityBase and DiscreteActivityBase
// specializations
const sal_Int16 nCalcMode( xNode->getCalcMode() );
-
- switch( nCalcMode )
+
+ switch( nCalcMode )
{
- case animations::AnimationCalcMode::DISCRETE:
+ case animations::AnimationCalcMode::DISCRETE:
{
// fake keytimes, if necessary
- if( !aKeyTimes.hasElements() )
+ if( !aKeyTimes.hasElements() )
{
// create a dummy vector of 2 key times
const ::std::size_t nLen( 2 );
for( ::std::size_t i=0; i<nLen; ++i )
aActivityParms.maDiscreteTimes.push_back( double(i)/nLen );
}
-
+
// since DiscreteActivityBase suspends itself
// between the frames, create a WakeupEvent for it.
- aActivityParms.mpWakeupEvent.reset(
+ aActivityParms.mpWakeupEvent.reset(
new WakeupEvent(
rParms.mrEventQueue.getTimer(),
rParms.mrActivitiesQueue ) );
-
+
AnimationActivitySharedPtr pActivity(
- createFromToByActivity< DiscreteActivityBase >(
+ createFromToByActivity< DiscreteActivityBase >(
xNode->getFrom(),
xNode->getTo(),
xNode->getBy(),
@@ -787,23 +787,23 @@ AnimationActivitySharedPtr createActivity(
xNode->getAccumulate(),
rParms.mpShape,
rParms.maSlideBounds ) );
-
+
// WakeupEvent and DiscreteActivityBase need circular
// references to the corresponding other object.
aActivityParms.mpWakeupEvent->setActivity( pActivity );
-
+
return pActivity;
}
-
+
default:
OSL_ENSURE( false, "createActivity(): unexpected case" );
- // FALLTHROUGH intended
+ // FALLTHROUGH intended
case animations::AnimationCalcMode::PACED:
// FALLTHROUGH intended
case animations::AnimationCalcMode::SPLINE:
// FALLTHROUGH intended
case animations::AnimationCalcMode::LINEAR:
- return createFromToByActivity< ContinuousActivityBase >(
+ return createFromToByActivity< ContinuousActivityBase >(
xNode->getFrom(),
xNode->getTo(),
xNode->getBy(),
@@ -818,7 +818,7 @@ AnimationActivitySharedPtr createActivity(
}
/** Simple activity for ActivitiesFactory::createSimpleActivity
-
+
@tpl Direction
Determines direction of value generator. A 1 yields a
forward direction, starting with 0.0 and ending with
@@ -830,7 +830,7 @@ class SimpleActivity : public ContinuousActivityBase
{
public:
/** Create SimpleActivity.
-
+
@param rParms
Standard Activity parameter struct
*/
@@ -841,18 +841,18 @@ public:
{
ENSURE_OR_THROW( mpAnim, "Invalid animation object" );
}
-
+
virtual void startAnimation()
{
if (this->isDisposed() || !mpAnim)
return;
ContinuousActivityBase::startAnimation();
-
+
// start animation
mpAnim->start( getShape(),
getShapeAttributeLayer() );
}
-
+
virtual void endAnimation()
{
// end animation
@@ -870,21 +870,21 @@ public:
// no cumulation, simple [0,1] range
(*mpAnim)( 1.0 - Direction + nModifiedTime*(2.0*Direction - 1.0) );
}
-
+
virtual void performEnd()
{
// xxx todo: review
if (mpAnim)
(*mpAnim)( 1.0*Direction );
}
-
+
/// Disposable:
virtual void dispose()
{
mpAnim.reset();
ContinuousActivityBase::dispose();
}
-
+
private:
NumberAnimationSharedPtr mpAnim;
};
@@ -894,7 +894,7 @@ private:
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const NumberAnimationSharedPtr& rAnim,
+ const NumberAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -903,7 +903,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const EnumAnimationSharedPtr& rAnim,
+ const EnumAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -912,7 +912,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const ColorAnimationSharedPtr& rAnim,
+ const ColorAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -921,7 +921,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const HSLColorAnimationSharedPtr& rAnim,
+ const HSLColorAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimateColor >& xNode )
{
// forward to appropriate template instantiation
@@ -935,7 +935,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const PairAnimationSharedPtr& rAnim,
+ const PairAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -944,7 +944,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const StringAnimationSharedPtr& rAnim,
+ const StringAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -953,7 +953,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
AnimationActivitySharedPtr ActivitiesFactory::createAnimateActivity(
const CommonParameters& rParms,
- const BoolAnimationSharedPtr& rAnim,
+ const BoolAnimationSharedPtr& rAnim,
const uno::Reference< animations::XAnimate >& xNode )
{
// forward to appropriate template instantiation
@@ -974,7 +974,7 @@ AnimationActivitySharedPtr ActivitiesFactory::createSimpleActivity(
rParms.mnDeceleration,
rParms.mnMinNumberOfFrames,
rParms.mbAutoReverse );
-
+
if( bDirectionForward )
return AnimationActivitySharedPtr(
new SimpleActivity<1>( aActivityParms, rAnim ) );
diff --git a/slideshow/source/engine/activities/activitybase.cxx b/slideshow/source/engine/activities/activitybase.cxx
index 212ab1d95294..541e6e9e7e7d 100644
--- a/slideshow/source/engine/activities/activitybase.cxx
+++ b/slideshow/source/engine/activities/activitybase.cxx
@@ -2,7 +2,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
@@ -41,10 +41,10 @@
namespace slideshow
{
namespace internal
- {
+ {
// TODO(P1): Elide some virtual function calls, by templifying this
// static hierarchy
-
+
ActivityBase::ActivityBase( const ActivityParameters& rParms ) :
mpEndEvent( rParms.mrEndEvent ),
mrEventQueue( rParms.mrEventQueue ),
@@ -56,16 +56,16 @@ namespace slideshow
mbAutoReverse( rParms.mbAutoReverse ),
mbFirstPerformCall( true ),
mbIsActive( true ) {}
-
+
void ActivityBase::dispose()
{
// deactivate
mbIsActive = false;
-
+
// dispose event
if( mpEndEvent )
mpEndEvent->dispose();
-
+
// release references
mpEndEvent.reset();
mpShape.reset();
@@ -74,26 +74,26 @@ namespace slideshow
double ActivityBase::calcTimeLag() const
{
- // TODO(Q1): implement different init process!
+ // TODO(Q1): implement different init process!
if (isActive() && mbFirstPerformCall)
{
mbFirstPerformCall = false;
-
- // notify derived classes that we're
+
+ // notify derived classes that we're
// starting now
const_cast<ActivityBase *>(this)->startAnimation();
}
return 0.0;
}
-
+
bool ActivityBase::perform()
{
// still active?
if( !isActive() )
return false; // no, early exit.
-
+
OSL_ASSERT( ! mbFirstPerformCall );
-
+
return true;
}
@@ -101,9 +101,9 @@ namespace slideshow
{
return mbIsActive;
}
-
- void ActivityBase::setTargets( const AnimatableShapeSharedPtr& rShape,
- const ShapeAttributeLayerSharedPtr& rAttrLayer )
+
+ void ActivityBase::setTargets( const AnimatableShapeSharedPtr& rShape,
+ const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
ENSURE_OR_THROW( rShape,
"ActivityBase::setTargets(): Invalid shape" );
@@ -137,7 +137,7 @@ namespace slideshow
if( !isActive() )
endAnimation();
}
-
+
void ActivityBase::end()
{
if (!isActive() || isDisposed())
@@ -148,12 +148,12 @@ namespace slideshow
// notify derived classes that we're starting now
this->startAnimation();
}
-
+
performEnd(); // calling private virtual
endAnimation();
endActivity();
}
-
+
double ActivityBase::calcAcceleratedTime( double nT ) const
{
// Handle acceleration/deceleration
@@ -170,12 +170,12 @@ namespace slideshow
mnAccelerationFraction + mnDecelerationFraction <= 1.0 )
{
/*
- // calc accelerated/decelerated time.
+ // calc accelerated/decelerated time.
//
// We have three intervals:
// 1 [0,a]
// 2 [a,d]
- // 3 [d,1] (with a and d being acceleration/deceleration
+ // 3 [d,1] (with a and d being acceleration/deceleration
// fraction, resp.)
//
// The change rate during interval 1 is constantly
@@ -202,10 +202,10 @@ namespace slideshow
// The graph of the change rate is a trapezoid:
//
// |
- // 1| /--------------\
- // | / \
- // | / \
- // | / \
+ // 1| /--------------\
+ // | / \
+ // | / \
+ // | / \
// -----------------------------
// 0 a d 1
//
@@ -221,8 +221,8 @@ namespace slideshow
}
else
{
- nTPrime += 0.5*mnAccelerationFraction; // full first interval
-
+ nTPrime += 0.5*mnAccelerationFraction; // full first interval
+
if( nT <= 1.0-mnDecelerationFraction )
{
nTPrime += nT-mnAccelerationFraction; // partial second interval
@@ -232,7 +232,7 @@ namespace slideshow
nTPrime += 1.0 - mnAccelerationFraction - mnDecelerationFraction; // full second interval
const double nTRelative( nT - 1.0 + mnDecelerationFraction );
-
+
nTPrime += nTRelative - 0.5*nTRelative*nTRelative / mnDecelerationFraction;
}
}
diff --git a/slideshow/source/engine/activities/activitybase.hxx b/slideshow/source/engine/activities/activitybase.hxx
index e74a3e5ad7de..d521df1783fe 100644
--- a/slideshow/source/engine/activities/activitybase.hxx
+++ b/slideshow/source/engine/activities/activitybase.hxx
@@ -2,7 +2,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
@@ -38,7 +38,7 @@ namespace slideshow {
namespace internal {
/** Base class for animation activities.
-
+
This whole class hierarchy is only for code sharing
between the various specializations (with or without
key times, fully discrete, etc.).
@@ -47,39 +47,39 @@ class ActivityBase : public AnimationActivity
{
public:
ActivityBase( const ActivityParameters& rParms );
-
+
/// From Disposable interface
virtual void dispose();
protected:
/** From Activity interface
-
+
Derived classes should override, call this first
and then perform their work.
*/
virtual bool perform();
virtual double calcTimeLag() const;
virtual bool isActive() const;
-
+
private:
virtual void dequeued();
-
+
// From AnimationActivity interface
virtual void setTargets(
const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer );
-
+
private:
/** Hook for derived classes
-
+
This method will be called from the first
perform() invocation, to signal the start of the
activity.
*/
virtual void startAnimation() = 0;
-
+
/** Hook for derived classes
-
+
This method will be called after the last perform()
invocation, and after the potential changes of that
perform() call are committed to screen. That is, in
@@ -88,38 +88,38 @@ private:
visible artifacts on screen.
*/
virtual void endAnimation() = 0;
-
+
protected:
-
+
/** End this activity, in a regular way.
-
+
This method is for derived classes needing to signal a
regular activity end (i.e. because the regular
duration is over)
*/
void endActivity();
-
+
/** Modify fractional time.
-
+
This method modifies the fractional time (total
duration mapped to the [0,1] range) to the
effective simple time, but only according to
acceleration/deceleration.
*/
double calcAcceleratedTime( double nT ) const;
-
+
bool isDisposed() const {
return (!mbIsActive && !mpEndEvent && !mpShape &&
!mpAttributeLayer);
}
-
+
EventQueue& getEventQueue() const { return mrEventQueue; }
-
+
AnimatableShapeSharedPtr getShape() const { return mpShape; }
-
+
ShapeAttributeLayerSharedPtr getShapeAttributeLayer() const
{ return mpAttributeLayer; }
-
+
bool isRepeatCountValid() const { return maRepeats; }
double getRepeatCount() const { return *maRepeats; }
bool isAutoReverse() const { return mbAutoReverse; }
@@ -128,19 +128,19 @@ private:
/// Activity:
virtual void end();
virtual void performEnd() = 0;
-
+
private:
EventSharedPtr mpEndEvent;
EventQueue& mrEventQueue;
AnimatableShapeSharedPtr mpShape; // only to pass on to animation
ShapeAttributeLayerSharedPtr mpAttributeLayer; // only to pass on to anim
-
+
::boost::optional<double> const maRepeats;
const double mnAccelerationFraction;
const double mnDecelerationFraction;
-
+
const bool mbAutoReverse;
-
+
// true, if perform() has not yet been called:
mutable bool mbFirstPerformCall;
bool mbIsActive;
diff --git a/slideshow/source/engine/activities/activityparameters.hxx b/slideshow/source/engine/activities/activityparameters.hxx
index f09148988c11..0bab1359e9c4 100644
--- a/slideshow/source/engine/activities/activityparameters.hxx
+++ b/slideshow/source/engine/activities/activityparameters.hxx
@@ -2,7 +2,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
@@ -41,42 +41,42 @@ namespace slideshow {
namespace internal {
/** Parameter struct for animation activities
-
+
This struct contains all common parameters needed to
initialize the activities generated by the ActivityFactory.
*/
struct ActivityParameters
-{
- /** Create
-
+{
+ /** Create
+
@param rEndEvent
Event to be fired, when the activity ends.
-
+
@param rEventQueue
Queue to add end event to
-
+
@param nMinDuration
Minimal duration of the activity (might actually be
longer because of nMinNumberOfFrames). Note that this
duration must always be the <em>simple</em> duration,
i.e. without any repeat.
-
+
@param rRepeats
Number of repeats. If this parameter is invalid,
infinite repeat is assumed.
-
+
@param nAccelerationFraction
Value between 0 and 1, denoting the fraction of the
total simple duration, which the animation should
accelerate.
-
- @param nDecelerationFraction
+
+ @param nDecelerationFraction
Value between 0 and 1, denoting the fraction of the
total simple duration, which the animation should
decelerate. Note that the ranges
[0,nAccelerationFraction] and
[nDecelerationFraction,1] must be non-overlapping!
-
+
@param bAutoReverse
When true, at the end of the simple duration, the
animation plays reversed to the start value. Note that
@@ -106,33 +106,33 @@ struct ActivityParameters
mnDecelerationFraction( nDecelerationFraction ),
mnMinNumberOfFrames( nMinNumberOfFrames ),
mbAutoReverse( bAutoReverse ) {}
-
+
/// End event to fire, when activity is over
const EventSharedPtr& mrEndEvent;
/// Wakeup event to use for discrete activities
WakeupEventSharedPtr mpWakeupEvent;
-
+
/// EventQueue to add events to
EventQueue& mrEventQueue;
-
+
/// ActivitiesQueue to add events to
ActivitiesQueue& mrActivitiesQueue;
-
+
/// Optional formula
ExpressionNodeSharedPtr mpFormula;
-
+
/// Key times, for discrete and key time activities
::std::vector< double > maDiscreteTimes;
-
+
/// Total duration of activity (including all repeats)
const double mnMinDuration;
::boost::optional<double> const& mrRepeats;
const double mnAccelerationFraction;
const double mnDecelerationFraction;
-
+
/// Minimal number of frames this activity must render
const sal_uInt32 mnMinNumberOfFrames;
-
+
/// When true, activity is played reversed after mnDuration.
const bool mbAutoReverse;
};
diff --git a/slideshow/source/engine/activities/continuousactivitybase.cxx b/slideshow/source/engine/activities/continuousactivitybase.cxx
index c8944c705a0a..e6129d77af0c 100644
--- a/slideshow/source/engine/activities/continuousactivitybase.cxx
+++ b/slideshow/source/engine/activities/continuousactivitybase.cxx
@@ -2,7 +2,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
@@ -45,10 +45,10 @@ namespace slideshow
{
}
- void ContinuousActivityBase::simplePerform( double nSimpleTime,
- sal_uInt32 nRepeatCount ) const
+ void ContinuousActivityBase::simplePerform( double nSimpleTime,
+ sal_uInt32 nRepeatCount ) const
{
- perform( calcAcceleratedTime( nSimpleTime ),
+ perform( calcAcceleratedTime( nSimpleTime ),
nRepeatCount );
}
}
diff --git a/slideshow/source/engine/activities/continuousactivitybase.hxx b/slideshow/source/engine/activities/continuousactivitybase.hxx
index 0cdefbd2775a..6ef84dd0e7e7 100644
--- a/slideshow/source/engine/activities/continuousactivitybase.hxx
+++ b/slideshow/source/engine/activities/continuousactivitybase.hxx
@@ -2,7 +2,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
@@ -54,19 +54,19 @@ namespace slideshow
This method will be called from perform(), already
equipped with the modified time (nMinNumberOfFrames, repeat,
acceleration and deceleration taken into account).
-
+
@param nModifiedTime
Already accelerated/decelerated and repeated time, always
in the [0,1] range.
-
+
@param nRepeatCount
Number of full repeats already performed
*/
virtual void perform( double nModifiedTime, sal_uInt32 nRepeatCount ) const = 0;
/// From SimpleContinuousActivityBase class
- virtual void simplePerform( double nSimpleTime,
- sal_uInt32 nRepeatCount ) const;
+ virtual void simplePerform( double nSimpleTime,
+ sal_uInt32 nRepeatCount ) const;
};
}
}
diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx
index 8e78a5f6d642..78b5b6f442c3 100644
--- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx
+++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx
@@ -2,7 +2,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
@@ -49,7 +49,7 @@ namespace slideshow
SimpleContinuousActivityBase( rParms ),
maLerper( rParms.maDiscreteTimes )
{
- ENSURE_OR_THROW( rParms.maDiscreteTimes.size() > 1,
+ ENSURE_OR_THROW( rParms.maDiscreteTimes.size() > 1,
"ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector must have two entries or more" );
ENSURE_OR_THROW( rParms.maDiscreteTimes.front() == 0.0,
"ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector first entry must be zero" );
@@ -57,18 +57,18 @@ namespace slideshow
"ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector last entry must be less or equal 1" );
}
- void ContinuousKeyTimeActivityBase::simplePerform( double nSimpleTime,
- sal_uInt32 nRepeatCount ) const
+ void ContinuousKeyTimeActivityBase::simplePerform( double nSimpleTime,
+ sal_uInt32 nRepeatCount ) const
{
// calc simple time from global time - sweep through the
- // array multiple times for repeated animations (according to
+ // array multiple times for repeated animations (according to
// SMIL spec).
double fAlpha( calcAcceleratedTime( nSimpleTime ) );
std::ptrdiff_t nIndex;
boost::tuples::tie(nIndex,fAlpha) = maLerper.lerp(fAlpha);
- perform(
+ perform(
nIndex,
fAlpha,
nRepeatCount );
diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx
index 5b9c10b3ead8..427fea36b2b8 100644
--- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx
+++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx
@@ -2,7 +2,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
@@ -56,24 +56,24 @@ namespace slideshow
This method will be called from perform(), already
equipped with the modified time (nMinNumberOfFrames, repeat,
acceleration and deceleration taken into account).
-
+
@param nIndex
Current index of the key times/key values.
-
+
@param nFractionalIndex
Fractional value from the [0,1] range, specifying
the position between nIndex and nIndex+1.
-
+
@param nRepeatCount
Number of full repeats already performed
*/
- virtual void perform( sal_uInt32 nIndex,
- double nFractionalIndex,
- sal_uInt32 nRepeatCount ) const = 0;
+ virtual void perform( sal_uInt32 nIndex,
+ double nFractionalIndex,
+ sal_uInt32 nRepeatCount ) const = 0;
/// From SimpleContinuousActivityBase class
- virtual void simplePerform( double nSimpleTime,
- sal_uInt32 nRepeatCount ) const;
+ virtual void simplePerform( double nSimpleTime,
+ sal_uInt32 nRepeatCount ) const;
private:
const ::basegfx::tools::KeyStopLerp maLerper;
diff --git a/slideshow/source/engine/activities/discreteactivitybase.cxx b/slideshow/source/engine/activities/discreteactivitybase.cxx
index d1cac547b200..949f0c8a8c27 100644
--- a/slideshow/source/engine/activities/discreteactivitybase.cxx
+++ b/slideshow/source/engine/activities/discreteactivitybase.cxx
@@ -2,7 +2,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
@@ -51,7 +51,7 @@ namespace slideshow
ENSURE_OR_THROW( mpWakeupEvent,
"DiscreteActivityBase::DiscreteActivityBase(): Invalid wakeup event" );
- ENSURE_OR_THROW( !maDiscreteTimes.empty(),
+ ENSURE_OR_THROW( !maDiscreteTimes.empty(),
"DiscreteActivityBase::DiscreteActivityBase(): time vector is empty, why do you create me?" );
#ifdef DBG_UTIL
@@ -61,7 +61,7 @@ namespace slideshow
for( ::std::size_t i=1, len=maDiscreteTimes.size(); i<len; ++i )
{
if( maDiscreteTimes[i] < 0.0 ||
- maDiscreteTimes[i] > 1.0 ||
+ maDiscreteTimes[i] > 1.0 ||
maDiscreteTimes[i-1] < 0.0 ||
maDiscreteTimes[i-1] > 1.0 )
{
@@ -82,8 +82,8 @@ namespace slideshow
mpWakeupEvent->start();
}
- sal_uInt32 DiscreteActivityBase::calcFrameIndex( sal_uInt32 nCurrCalls,
- ::std::size_t nVectorSize ) const
+ sal_uInt32 DiscreteActivityBase::calcFrameIndex( sal_uInt32 nCurrCalls,
+ ::std::size_t nVectorSize ) const
{
if( isAutoReverse() )
{
@@ -104,8 +104,8 @@ namespace slideshow
}
}
- sal_uInt32 DiscreteActivityBase::calcRepeatCount( sal_uInt32 nCurrCalls,
- ::std::size_t nVectorSize ) const
+ sal_uInt32 DiscreteActivityBase::calcRepeatCount( sal_uInt32 nCurrCalls,
+ ::std::size_t nVectorSize ) const
{
if( isAutoReverse() )
return nCurrCalls / (2*nVectorSize); // we've got 2 cycles per repeat
@@ -126,11 +126,11 @@ namespace slideshow
// TODO(Q3): Refactor this mess
- // call derived class with current frame index (modulo
+ // call derived class with current frame index (modulo
// vector size, to cope with repeats)
- perform( calcFrameIndex( mnCurrPerformCalls, nVectorSize ),
+ perform( calcFrameIndex( mnCurrPerformCalls, nVectorSize ),
calcRepeatCount( mnCurrPerformCalls, nVectorSize ) );
-
+
// calc next index
++mnCurrPerformCalls;
@@ -143,21 +143,21 @@ namespace slideshow
if( isAutoReverse() )
nCurrRepeat /= 2.0;
- // schedule next frame, if either repeat is indefinite
+ // schedule next frame, if either repeat is indefinite
// (repeat forever), or we've not yet reached the requested
// repeat count
if( !isRepeatCountValid() ||
nCurrRepeat < getRepeatCount() )
{
- // add wake-up event to queue (modulo
+ // add wake-up event to queue (modulo
// vector size, to cope with repeats).
// repeat is handled locally, only apply acceleration/deceleration.
- // Scale time vector with simple duration, offset with full repeat
+ // Scale time vector with simple duration, offset with full repeat
// times.
//
// Somewhat condensed, the argument for setNextTimeout below could
- // be written as
+ // be written as
//
// mnSimpleDuration*(nFullRepeats + calcAcceleratedTime( currentRepeatTime )),
//
@@ -166,15 +166,15 @@ namespace slideshow
// Note that calcAcceleratedTime() is only applied to the current repeat's value,
// not to the total resulting time. This is in accordance with the SMIL spec.
//
- mpWakeupEvent->setNextTimeout(
+ mpWakeupEvent->setNextTimeout(
mnSimpleDuration*(
- calcRepeatCount(
- mnCurrPerformCalls,
- nVectorSize ) +
- calcAcceleratedTime(
+ calcRepeatCount(
+ mnCurrPerformCalls,
+ nVectorSize ) +
+ calcAcceleratedTime(
maDiscreteTimes[
- calcFrameIndex(
- mnCurrPerformCalls,
+ calcFrameIndex(
+ mnCurrPerformCalls,
nVectorSize ) ] ) ) );
getEventQueue().addEvent( mpWakeupEvent );
@@ -197,7 +197,7 @@ namespace slideshow
// dispose event
if( mpWakeupEvent )
mpWakeupEvent->dispose();
-
+
// release references
mpWakeupEvent.reset();
diff --git a/slideshow/source/engine/activities/discreteactivitybase.hxx b/slideshow/source/engine/activities/discreteactivitybase.hxx
index 3a14f5a7354b..de4c11aeedc7 100644
--- a/slideshow/source/engine/activities/discreteactivitybase.hxx
+++ b/slideshow/source/engine/activities/discreteactivitybase.hxx
@@ -2,7 +2,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
@@ -54,10 +54,10 @@ namespace slideshow
This method is called for each discrete time
instant, with nFrame denoting the frame number
(starting with 0)
-
+
@param nFrame
Current frame number.
-
+
@param nRepeatCount
Number of full repeats already performed
*/
@@ -68,19 +68,19 @@ namespace slideshow
protected:
virtual void startAnimation();
- sal_uInt32 calcFrameIndex( sal_uInt32 nCurrCalls,
- ::std::size_t nVectorSize ) const;
+ sal_uInt32 calcFrameIndex( sal_uInt32 nCurrCalls,
+ ::std::size_t nVectorSize ) const;
- sal_uInt32 calcRepeatCount( sal_uInt32 nCurrCalls,
- ::std::size_t nVectorSize ) const;
+ sal_uInt32 calcRepeatCount( sal_uInt32 nCurrCalls,
+ ::std::size_t nVectorSize ) const;
::std::size_t getNumberOfKeyTimes() const { return maDiscreteTimes.size(); }
private:
- WakeupEventSharedPtr mpWakeupEvent;
- const ::std::vector< double > maDiscreteTimes;
- const double mnSimpleDuration;
- sal_uInt32 mnCurrPerformCalls;
+ WakeupEventSharedPtr mpWakeupEvent;
+ const ::std::vector< double > maDiscreteTimes;
+ const double mnSimpleDuration;
+ sal_uInt32 mnCurrPerformCalls;
};
}
}
diff --git a/slideshow/source/engine/activities/interpolation.hxx b/slideshow/source/engine/activities/interpolation.hxx
index 12fa27ffb1ea..5efa0f01527f 100644
--- a/slideshow/source/engine/activities/interpolation.hxx
+++ b/slideshow/source/engine/activities/interpolation.hxx
@@ -2,7 +2,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
@@ -43,38 +43,38 @@ namespace basegfx
// not-straight-forward-interpolatable types
/// Specialization for RGBColor, to employ color-specific interpolator
- template<> ::slideshow::internal::RGBColor lerp< ::slideshow::internal::RGBColor >(
- const ::slideshow::internal::RGBColor& rFrom,
- const ::slideshow::internal::RGBColor& rTo,
- double t )
+ template<> ::slideshow::internal::RGBColor lerp< ::slideshow::internal::RGBColor >(
+ const ::slideshow::internal::RGBColor& rFrom,
+ const ::slideshow::internal::RGBColor& rTo,
+ double t )
{
return interpolate( rFrom, rTo, t );
}
-
+
/// Specialization also for sal_Int16, although this code should not be called
- template<> sal_Int16 lerp< sal_Int16 >( const sal_Int16&,
- const sal_Int16& rTo,
- double )
+ template<> sal_Int16 lerp< sal_Int16 >( const sal_Int16&,
+ const sal_Int16& rTo,
+ double )
{
OSL_ENSURE( false,
"lerp<sal_Int16> called" );
return rTo;
}
-
+
/// Specialization also for string, although this code should not be called
- template<> ::rtl::OUString lerp< ::rtl::OUString >( const ::rtl::OUString&,
- const ::rtl::OUString& rTo,
- double )
+ template<> ::rtl::OUString lerp< ::rtl::OUString >( const ::rtl::OUString&,
+ const ::rtl::OUString& rTo,
+ double )
{
OSL_ENSURE( false,
"lerp<::rtl::OUString> called" );
return rTo;
}
-
+
/// Specialization also for bool, although this code should not be called
- template<> bool lerp< bool >( const bool&,
- const bool& rTo,
- double )
+ template<> bool lerp< bool >( const bool&,
+ const bool& rTo,
+ double )
{
OSL_ENSURE( false,
"lerp<bool> called" );
@@ -82,21 +82,21 @@ namespace basegfx
}
}
}
-
+
namespace slideshow
{
namespace internal
{
template< typename ValueType > struct Interpolator
{
- ValueType operator()( const ValueType& rFrom,
- const ValueType& rTo,
- double t ) const
+ ValueType operator()( const ValueType& rFrom,
+ const ValueType& rTo,
+ double t ) const
{
return basegfx::tools::lerp( rFrom, rTo, t );
}
};
-
+
/// Specialization for HSLColor, to employ color-specific interpolator
template<> struct Interpolator< HSLColor >
{
@@ -105,9 +105,9 @@ namespace slideshow
{
}
- HSLColor operator()( const HSLColor& rFrom,
- const HSLColor& rTo,
- double t ) const
+ HSLColor operator()( const HSLColor& rFrom,
+ const HSLColor& rTo,
+ double t ) const
{
return interpolate( rFrom, rTo, t, mbCCW );
}
@@ -134,10 +134,10 @@ namespace slideshow
Total number of frames. Should be greater than zero.
*/
template< typename ValueType > ValueType lerp( const Interpolator< ValueType >& rInterpolator,
- const ValueType& rFrom,
- const ValueType& rTo,
- sal_uInt32 nFrame,
- ::std::size_t nTotalFrames )
+ const ValueType& rFrom,
+ const ValueType& rTo,
+ sal_uInt32 nFrame,
+ ::std::size_t nTotalFrames )
{
// TODO(P1): There's a nice HAKMEM trick for that
// nTotalFrames > 1 condition below
@@ -149,42 +149,42 @@ namespace slideshow
}
/// Specialization for non-interpolatable constants/enums
- template<> sal_Int16 lerp< sal_Int16 >( const Interpolator< sal_Int16 >& /*rInterpolator*/,
- const sal_Int16& rFrom,
- const sal_Int16& rTo,
- sal_uInt32 nFrame,
- ::std::size_t nTotalFrames )
+ template<> sal_Int16 lerp< sal_Int16 >( const Interpolator< sal_Int16 >& /*rInterpolator*/,
+ const sal_Int16& rFrom,
+ const sal_Int16& rTo,
+ sal_uInt32 nFrame,
+ ::std::size_t nTotalFrames )
{
// until one half of the total frames are over, take from value.
- // after that, take to value.
+ // after that, take to value.
// For nFrames not divisable by 2, we prefer to over from, which
// also neatly yields to for 1 frame activities
return nFrame < nTotalFrames/2 ? rFrom : rTo;
}
/// Specialization for non-interpolatable strings
- template<> ::rtl::OUString lerp< ::rtl::OUString >( const Interpolator< ::rtl::OUString >& /*rInterpolator*/,
- const ::rtl::OUString& rFrom,
- const ::rtl::OUString& rTo,
- sal_uInt32 nFrame,
- ::std::size_t nTotalFrames )
+ template<> ::rtl::OUString lerp< ::rtl::OUString >( const Interpolator< ::rtl::OUString >& /*rInterpolator*/,
+ const ::rtl::OUString& rFrom,
+ const ::rtl::OUString& rTo,
+ sal_uInt32 nFrame,
+ ::std::size_t nTotalFrames )
{
// until one half of the total frames are over, take from value.
- // after that, take to value.
+ // after that, take to value.
// For nFrames not divisable by 2, we prefer to over from, which
// also neatly yields to for 1 frame activities
return nFrame < nTotalFrames/2 ? rFrom : rTo;
}
/// Specialization for non-interpolatable bools
- template<> bool lerp< bool >( const Interpolator< bool >& /*rInterpolator*/,
- const bool& bFrom,
- const bool& bTo,
- sal_uInt32 nFrame,
- ::std::size_t nTotalFrames )
+ template<> bool lerp< bool >( const Interpolator< bool >& /*rInterpolator*/,
+ const bool& bFrom,
+ const bool& bTo,
+ sal_uInt32 nFrame,
+ ::std::size_t nTotalFrames )
{
// until one half of the total frames are over, take from value.
- // after that, take to value.
+ // after that, take to value.
// For nFrames not divisable by 2, we prefer to over from, which
// also neatly yields to for 1 frame activities
return nFrame < nTotalFrames/2 ? bFrom : bTo;
diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
index af6d51ed6d8a..e391a0fdb3a6 100644
--- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
+++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
@@ -2,7 +2,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
@@ -52,7 +52,7 @@ namespace slideshow
void SimpleContinuousActivityBase::startAnimation()
{
- // init timer. We measure animation time only when we're
+ // init timer. We measure animation time only when we're
// actually started.
maTimer.reset();
}
@@ -62,7 +62,7 @@ namespace slideshow
ActivityBase::calcTimeLag();
if (! isActive())
return 0.0;
-
+
// retrieve locally elapsed time
const double nCurrElapsedTime( maTimer.getElapsedTime() );
@@ -75,7 +75,7 @@ namespace slideshow
// here, try to spread the animator calls uniquely over
// the [0,1] parameter range. Be aware of the fact that
// perform will be called at least mnMinNumberOfTurns
- // times.
+ // times.
// fraction of time elapsed
const double nFractionElapsedTime(
@@ -110,26 +110,26 @@ namespace slideshow
VERBOSE_TRACE( "SimpleContinuousActivityBase::perform(): "
"t=%f is based on number of calls",
nFractionRequiredCalls );
-
+
// lag global time, so all other animations lag, too:
return ((nFractionElapsedTime - nFractionRequiredCalls)
* mnMinSimpleDuration);
}
}
-
+
bool SimpleContinuousActivityBase::perform()
{
// call base class, for start() calls and end handling
if( !ActivityBase::perform() )
return false; // done, we're ended
-
+
// get relative animation position
// ===============================
-
+
const double nCurrElapsedTime( maTimer.getElapsedTime() );
double nT( nCurrElapsedTime / mnMinSimpleDuration );
-
+
// one of the stop criteria reached?
// =================================
@@ -157,7 +157,7 @@ namespace slideshow
// to give animation the chance to render the last
// frame below
bActivityEnding = true;
-
+
// clamp animation to max permissible value
nT = nEffectiveRepeat;
}
@@ -202,7 +202,7 @@ namespace slideshow
// calc simple time and number of repeats from nT
// Now, that's easy, since the fractional part of
- // nT gives the relative simple time, and the
+ // nT gives the relative simple time, and the
// integer part the number of full repeats:
nRelativeSimpleTime = modf(nT, &nRepeats);
diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.hxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.hxx
index 031c1e972c5b..73d6b0b6803b 100644
--- a/slideshow/source/engine/activities/simplecontinuousactivitybase.hxx
+++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.hxx
@@ -2,7 +2,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
@@ -50,37 +50,37 @@ namespace slideshow
virtual double calcTimeLag() const;
virtual bool perform();
-
+
protected:
/** Hook for derived classes
This method will be called from perform().
-
+
@param nSimpleTime
Simple animation time, without repeat,
acceleration or deceleration applied. This value
is always in the [0,1] range, the repeat is
accounted for with the nRepeatCount parameter.
-
+
@param nRepeatCount
Number of full repeats already performed
*/
virtual void simplePerform( double nSimpleTime, sal_uInt32 nRepeatCount ) const = 0;
-
+
virtual void startAnimation();
private:
/// Time elapsed since activity started
- ::canvas::tools::ElapsedTime maTimer;
+ ::canvas::tools::ElapsedTime maTimer;
/// Simple duration of activity
- const double mnMinSimpleDuration;
+ const double mnMinSimpleDuration;
/// Minimal number of frames to show (see ActivityParameters)
- const sal_uInt32 mnMinNumberOfFrames;
+ const sal_uInt32 mnMinNumberOfFrames;
/// Actual number of frames shown until now.
- sal_uInt32 mnCurrPerformCalls;
+ sal_uInt32 mnCurrPerformCalls;
};
}
}
diff --git a/slideshow/source/engine/activitiesqueue.cxx b/slideshow/source/engine/activitiesqueue.cxx
index 673c029e2cbc..76174958b2a1 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -2,7 +2,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
@@ -50,7 +50,7 @@ namespace slideshow
{
namespace internal
{
- ActivitiesQueue::ActivitiesQueue(
+ ActivitiesQueue::ActivitiesQueue(
const ::boost::shared_ptr< ::canvas::tools::ElapsedTime >& pPresTimer ) :
mpTimer( pPresTimer ),
maCurrentActivitiesWaiting(),
@@ -62,7 +62,7 @@ namespace slideshow
ActivitiesQueue::~ActivitiesQueue()
{
// dispose all queue entries
- try
+ try
{
std::for_each( maCurrentActivitiesWaiting.begin(),
maCurrentActivitiesWaiting.end(),
@@ -71,7 +71,7 @@ namespace slideshow
maCurrentActivitiesReinsert.end(),
boost::mem_fn( &Disposable::dispose ) );
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -106,18 +106,18 @@ namespace slideshow
double fLag = 0.0;
for ( ; iPos != iEnd; ++iPos )
fLag = std::max<double>( fLag, (*iPos)->calcTimeLag() );
- if (fLag > 0.0)
+ if (fLag > 0.0)
{
mpTimer->adjustTimer( -fLag );
}
-
+
// process list of activities
while( !maCurrentActivitiesWaiting.empty() )
{
// process topmost activity
ActivitySharedPtr pActivity( maCurrentActivitiesWaiting.front() );
maCurrentActivitiesWaiting.pop_front();
-
+
bool bReinsert( false );
try
@@ -136,7 +136,7 @@ namespace slideshow
// circumstance. Although, do _not_
// reinsert an activity that threw
// once.
-
+
// NOTE: we explicitely don't catch(...) here,
// since this will also capture segmentation
// violations and the like. In such a case, we
@@ -153,7 +153,7 @@ namespace slideshow
// circumstance. Although, do _not_
// reinsert an activity that threw
// once.
-
+
// NOTE: we explicitely don't catch(...) here,
// since this will also capture segmentation
// violations and the like. In such a case, we
@@ -201,7 +201,7 @@ namespace slideshow
maCurrentActivitiesWaiting.end(),
boost::mem_fn( &Activity::dequeued ) );
ActivityQueue().swap( maCurrentActivitiesWaiting );
-
+
std::for_each( maCurrentActivitiesReinsert.begin(),
maCurrentActivitiesReinsert.end(),
boost::mem_fn( &Activity::dequeued ) );
diff --git a/slideshow/source/engine/animatedsprite.cxx b/slideshow/source/engine/animatedsprite.cxx
index 951f88bf1454..d4188b6a7f62 100644
--- a/slideshow/source/engine/animatedsprite.cxx
+++ b/slideshow/source/engine/animatedsprite.cxx
@@ -2,7 +2,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
@@ -50,8 +50,8 @@ namespace slideshow
{
namespace internal
{
- AnimatedSprite::AnimatedSprite( const ViewLayerSharedPtr& rViewLayer,
- const ::basegfx::B2DSize& rSpriteSizePixel,
+ AnimatedSprite::AnimatedSprite( const ViewLayerSharedPtr& rViewLayer,
+ const ::basegfx::B2DSize& rSpriteSizePixel,
double nSpritePrio ) :
mpViewLayer( rViewLayer ),
mpSprite(),
@@ -65,7 +65,7 @@ namespace slideshow
mbSpriteVisible( false )
{
ENSURE_OR_THROW( mpViewLayer, "AnimatedSprite::AnimatedSprite(): Invalid view layer" );
-
+
// Add half a pixel tolerance to sprite size, since we later on compare
// against it in resize(). And view transformations will almost never yield
// the same data bits when transforming to device coordinates
@@ -83,19 +83,19 @@ namespace slideshow
const ::cppcanvas::CanvasSharedPtr pContentCanvas( mpSprite->getContentCanvas() );
pContentCanvas->clear();
-
+
// extract linear part of canvas view transformation
// (linear means: without translational components). The
// only translation that is imposed at the view transform
// is the local content pixel offset.
- //
+ //
// We can apply that directly here, no need to call
// aLinearTransform.translate(), since, as said above, the
// last column of aLinearTransform is assumed [0 0 1]
::basegfx::B2DHomMatrix aLinearTransform( mpViewLayer->getTransformation() );
aLinearTransform.set( 0, 2, maContentPixelOffset.getX() );
aLinearTransform.set( 1, 2, maContentPixelOffset.getY() );
-
+
// apply linear part of canvas view transformation to sprite canvas
pContentCanvas->setTransformation( aLinearTransform );
@@ -113,9 +113,9 @@ namespace slideshow
// implementations are limited to such sprite sizes
// (otherwise, those implementations would internally
// round up, too, wasting precious mem).
- ::basegfx::B2DSize aNewSize( maEffectiveSpriteSizePixel );
- bool bNeedResize( false );
-
+ ::basegfx::B2DSize aNewSize( maEffectiveSpriteSizePixel );
+ bool bNeedResize( false );
+
if( rSpriteSizePixel.getX() > maEffectiveSpriteSizePixel.getX() ||
rSpriteSizePixel.getX() < 0.5*maEffectiveSpriteSizePixel.getX() )
{
@@ -145,7 +145,7 @@ namespace slideshow
mpSprite = mpViewLayer->createSprite( maEffectiveSpriteSizePixel,
mnSpritePrio );
- ENSURE_OR_THROW( mpSprite,
+ ENSURE_OR_THROW( mpSprite,
"AnimatedSprite::resize(): Could not create new sprite" );
// set attributes similar to previous sprite
@@ -215,7 +215,7 @@ namespace slideshow
mpSprite->hide();
mbSpriteVisible = false;
}
-
+
void AnimatedSprite::show()
{
mbSpriteVisible = true;
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index ce0c416e75ff..f5407ad9831c 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -2,7 +2,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
@@ -61,22 +61,22 @@ namespace slideshow
namespace internal
{
namespace
- {
- // attention, there is a similar implementation of Animation in
+ {
+ // attention, there is a similar implementation of Animation in
// transitions/transitionfactory.cxx
-
+
template< typename ValueT > class TupleAnimation : public PairAnimation
{
public:
- TupleAnimation( const ShapeManagerSharedPtr& rShapeManager,
- int nFlags,
- bool (ShapeAttributeLayer::*pIs1stValid)() const,
- bool (ShapeAttributeLayer::*pIs2ndValid)() const,
- const ValueT& rDefaultValue,
- const ::basegfx::B2DSize& rReferenceSize,
- double (ShapeAttributeLayer::*pGet1stValue)() const,
- double (ShapeAttributeLayer::*pGet2ndValue)() const,
- void (ShapeAttributeLayer::*pSetValue)( const ValueT& ) ) :
+ TupleAnimation( const ShapeManagerSharedPtr& rShapeManager,
+ int nFlags,
+ bool (ShapeAttributeLayer::*pIs1stValid)() const,
+ bool (ShapeAttributeLayer::*pIs2ndValid)() const,
+ const ValueT& rDefaultValue,
+ const ::basegfx::B2DSize& rReferenceSize,
+ double (ShapeAttributeLayer::*pGet1stValue)() const,
+ double (ShapeAttributeLayer::*pGet2ndValue)() const,
+ void (ShapeAttributeLayer::*pSetValue)( const ValueT& ) ) :
mpShape(),
mpAttrLayer(),
mpShapeManager( rShapeManager ),
@@ -94,20 +94,20 @@ namespace slideshow
"TupleAnimation::TupleAnimation(): Invalid ShapeManager" );
ENSURE_OR_THROW( pIs1stValid && pIs2ndValid && pGet1stValue && pGet2ndValue && pSetValue,
"TupleAnimation::TupleAnimation(): One of the method pointers is NULL" );
- }
+ }
~TupleAnimation()
{
end_();
}
-
+
// Animation interface
// -------------------
virtual void prefetch( const AnimatableShapeSharedPtr&,
const ShapeAttributeLayerSharedPtr& )
{}
- virtual void start( const AnimatableShapeSharedPtr& rShape,
+ virtual void start( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
OSL_ENSURE( !mpShape,
@@ -131,7 +131,7 @@ namespace slideshow
mpShapeManager->enterAnimationMode( mpShape );
}
}
-
+
virtual void end() { end_(); }
void end_()
{
@@ -167,7 +167,7 @@ namespace slideshow
if( mpShape->isContentChanged() )
mpShapeManager->notifyShapeUpdate( mpShape );
-
+
return true;
}
@@ -199,31 +199,31 @@ namespace slideshow
}
private:
- AnimatableShapeSharedPtr mpShape;
- ShapeAttributeLayerSharedPtr mpAttrLayer;
- ShapeManagerSharedPtr mpShapeManager;
- bool (ShapeAttributeLayer::*mpIs1stValidFunc)() const;
- bool (ShapeAttributeLayer::*mpIs2ndValidFunc)() const;
- double (ShapeAttributeLayer::*mpGet1stValueFunc)() const;
- double (ShapeAttributeLayer::*mpGet2ndValueFunc)() const;
- void (ShapeAttributeLayer::*mpSetValueFunc)( const ValueT& );
-
- const int mnFlags;
-
- const ::basegfx::B2DSize maReferenceSize;
- const ValueT maDefaultValue;
- bool mbAnimationStarted;
+ AnimatableShapeSharedPtr mpShape;
+ ShapeAttributeLayerSharedPtr mpAttrLayer;
+ ShapeManagerSharedPtr mpShapeManager;
+ bool (ShapeAttributeLayer::*mpIs1stValidFunc)() const;
+ bool (ShapeAttributeLayer::*mpIs2ndValidFunc)() const;
+ double (ShapeAttributeLayer::*mpGet1stValueFunc)() const;
+ double (ShapeAttributeLayer::*mpGet2ndValueFunc)() const;
+ void (ShapeAttributeLayer::*mpSetValueFunc)( const ValueT& );
+
+ const int mnFlags;
+
+ const ::basegfx::B2DSize maReferenceSize;
+ const ValueT maDefaultValue;
+ bool mbAnimationStarted;
};
class PathAnimation : public NumberAnimation
{
public:
- PathAnimation( const ::rtl::OUString& rSVGDPath,
+ PathAnimation( const ::rtl::OUString& rSVGDPath,
sal_Int16 nAdditive,
- const ShapeManagerSharedPtr& rShapeManager,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags ) :
+ int nFlags ) :
maPathPoly(),
mpShape(),
mpAttrLayer(),
@@ -238,13 +238,13 @@ namespace slideshow
"PathAnimation::PathAnimation(): Invalid ShapeManager" );
::basegfx::B2DPolyPolygon aPolyPoly;
-
+
ENSURE_OR_THROW( ::basegfx::tools::importFromSvgD( aPolyPoly, rSVGDPath ),
"PathAnimation::PathAnimation(): failed to parse SVG:d path" );
ENSURE_OR_THROW( aPolyPoly.count() == 1,
"PathAnimation::PathAnimation(): motion path consists of multiple/zero polygon(s)" );
- // TODO(F2): Since getPositionRelative() currently
+ // TODO(F2): Since getPositionRelative() currently
// cannot handle beziers, have to subdivide.
// AW: Should be no longer necessary; getPositionRelative is now bezier-safe
maPathPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aPolyPoly.getB2DPolygon(0) );
@@ -261,7 +261,7 @@ namespace slideshow
const ShapeAttributeLayerSharedPtr& )
{}
- virtual void start( const AnimatableShapeSharedPtr& rShape,
+ virtual void start( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
OSL_ENSURE( !mpShape,
@@ -279,7 +279,7 @@ namespace slideshow
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
if( mnAdditive == animations::AnimationAdditiveMode::SUM )
maShapeOrig = mpShape->getBounds().getCenter();
@@ -294,7 +294,7 @@ namespace slideshow
mpShapeManager->enterAnimationMode( mpShape );
}
}
-
+
virtual void end() { end_(); }
void end_()
{
@@ -338,7 +338,7 @@ namespace slideshow
if( mpShape->isContentChanged() )
mpShapeManager->notifyShapeUpdate( mpShape );
-
+
return true;
}
@@ -347,22 +347,22 @@ namespace slideshow
ENSURE_OR_THROW( mpAttrLayer,
"PathAnimation::getUnderlyingValue(): Invalid ShapeAttributeLayer" );
- return 0.0; // though this should be used in concert with
+ return 0.0; // though this should be used in concert with
// ActivitiesFactory::createSimpleActivity, better
// explicitely name our start value.
// Permissible range for operator() above is [0,1]
}
private:
- ::basegfx::B2DPolygon maPathPoly;
- AnimatableShapeSharedPtr mpShape;
- ShapeAttributeLayerSharedPtr mpAttrLayer;
- ShapeManagerSharedPtr mpShapeManager;
- const ::basegfx::B2DSize maPageSize;
- ::basegfx::B2DPoint maShapeOrig;
- const int mnFlags;
- bool mbAnimationStarted;
- sal_Int16 mnAdditive;
+ ::basegfx::B2DPolygon maPathPoly;
+ AnimatableShapeSharedPtr mpShape;
+ ShapeAttributeLayerSharedPtr mpAttrLayer;
+ ShapeManagerSharedPtr mpShapeManager;
+ const ::basegfx::B2DSize maPageSize;
+ ::basegfx::B2DPoint maShapeOrig;
+ const int mnFlags;
+ bool mbAnimationStarted;
+ sal_Int16 mnAdditive;
};
@@ -422,14 +422,14 @@ namespace slideshow
Modifies up values before passing them to the pSetValue method.
Must provide operator()( const ValueT& ) method.
*/
- GenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
- int nFlags,
- bool (ShapeAttributeLayer::*pIsValid)() const,
- const ValueT& rDefaultValue,
- ValueT (ShapeAttributeLayer::*pGetValue)() const,
- void (ShapeAttributeLayer::*pSetValue)( const ValueT& ),
- const ModifierFunctor& rGetterModifier,
- const ModifierFunctor& rSetterModifier ) :
+ GenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
+ int nFlags,
+ bool (ShapeAttributeLayer::*pIsValid)() const,
+ const ValueT& rDefaultValue,
+ ValueT (ShapeAttributeLayer::*pGetValue)() const,
+ void (ShapeAttributeLayer::*pSetValue)( const ValueT& ),
+ const ModifierFunctor& rGetterModifier,
+ const ModifierFunctor& rSetterModifier ) :
mpShape(),
mpAttrLayer(),
mpShapeManager( rShapeManager ),
@@ -452,14 +452,14 @@ namespace slideshow
{
end_();
}
-
+
// Animation interface
// -------------------
virtual void prefetch( const AnimatableShapeSharedPtr&,
const ShapeAttributeLayerSharedPtr& )
{}
- virtual void start( const AnimatableShapeSharedPtr& rShape,
+ virtual void start( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
OSL_ENSURE( !mpShape,
@@ -485,7 +485,7 @@ namespace slideshow
mpShapeManager->enterAnimationMode( mpShape );
}
}
-
+
virtual void end() { end_(); }
void end_()
{
@@ -514,8 +514,8 @@ namespace slideshow
// state has been set, and corresponds to the
// shape's hold state), or by the animation
// node (then, it's a forced end, and we
- // _have_ to snap back).
- //
+ // _have_ to snap back).
+ //
// To reiterate: normally, we're called from
// the Activity first, thus the
// notifyShapeUpdate() below will update to
@@ -576,20 +576,20 @@ namespace slideshow
}
private:
- AnimatableShapeSharedPtr mpShape;
- ShapeAttributeLayerSharedPtr mpAttrLayer;
- ShapeManagerSharedPtr mpShapeManager;
- bool (ShapeAttributeLayer::*mpIsValidFunc)() const;
- ValueT (ShapeAttributeLayer::*mpGetValueFunc)() const;
- void (ShapeAttributeLayer::*mpSetValueFunc)( const ValueT& );
+ AnimatableShapeSharedPtr mpShape;
+ ShapeAttributeLayerSharedPtr mpAttrLayer;
+ ShapeManagerSharedPtr mpShapeManager;
+ bool (ShapeAttributeLayer::*mpIsValidFunc)() const;
+ ValueT (ShapeAttributeLayer::*mpGetValueFunc)() const;
+ void (ShapeAttributeLayer::*mpSetValueFunc)( const ValueT& );
- ModifierFunctor maGetterModifier;
- ModifierFunctor maSetterModifier;
+ ModifierFunctor maGetterModifier;
+ ModifierFunctor maSetterModifier;
- const int mnFlags;
+ const int mnFlags;
- const ValueT maDefaultValue;
- bool mbAnimationStarted;
+ const ValueT maDefaultValue;
+ bool mbAnimationStarted;
};
/** Function template wrapper around GenericAnimation template
@@ -598,17 +598,17 @@ namespace slideshow
Type of animation to generate (determines the
interface GenericAnimation will implement).
*/
- template< typename AnimationBase > ::boost::shared_ptr< AnimationBase >
- makeGenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
- int nFlags,
- bool (ShapeAttributeLayer::*pIsValid)() const,
- const typename AnimationBase::ValueType& rDefaultValue,
+ template< typename AnimationBase > ::boost::shared_ptr< AnimationBase >
+ makeGenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
+ int nFlags,
+ bool (ShapeAttributeLayer::*pIsValid)() const,
+ const typename AnimationBase::ValueType& rDefaultValue,
typename AnimationBase::ValueType (ShapeAttributeLayer::*pGetValue)() const,
- void (ShapeAttributeLayer::*pSetValue)( const typename AnimationBase::ValueType& ) )
+ void (ShapeAttributeLayer::*pSetValue)( const typename AnimationBase::ValueType& ) )
{
- return ::boost::shared_ptr< AnimationBase >(
- new GenericAnimation< AnimationBase,
- ::std::identity< typename AnimationBase::ValueType > >(
+ return ::boost::shared_ptr< AnimationBase >(
+ new GenericAnimation< AnimationBase,
+ ::std::identity< typename AnimationBase::ValueType > >(
rShapeManager,
nFlags,
pIsValid,
@@ -623,7 +623,7 @@ namespace slideshow
class Scaler
{
public:
- Scaler( double nScale ) :
+ Scaler( double nScale ) :
mnScale( nScale )
{
}
@@ -639,13 +639,13 @@ namespace slideshow
/** Overload for NumberAnimations which need scaling (width,height,x,y currently)
*/
- NumberAnimationSharedPtr makeGenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
- int nFlags,
- bool (ShapeAttributeLayer::*pIsValid)() const,
- double nDefaultValue,
- double (ShapeAttributeLayer::*pGetValue)() const,
- void (ShapeAttributeLayer::*pSetValue)( const double& ),
- double nScaleValue )
+ NumberAnimationSharedPtr makeGenericAnimation( const ShapeManagerSharedPtr& rShapeManager,
+ int nFlags,
+ bool (ShapeAttributeLayer::*pIsValid)() const,
+ double nDefaultValue,
+ double (ShapeAttributeLayer::*pGetValue)() const,
+ void (ShapeAttributeLayer::*pSetValue)( const double& ),
+ double nScaleValue )
{
return NumberAnimationSharedPtr(
new GenericAnimation< NumberAnimation, Scaler >( rShapeManager,
@@ -659,17 +659,17 @@ namespace slideshow
}
- uno::Any getShapeDefault( const AnimatableShapeSharedPtr& rShape,
- const ::rtl::OUString& rPropertyName )
+ uno::Any getShapeDefault( const AnimatableShapeSharedPtr& rShape,
+ const ::rtl::OUString& rPropertyName )
{
uno::Reference< drawing::XShape > xShape( rShape->getXShape() );
if( !xShape.is() )
return uno::Any(); // no regular shape, no defaults available
-
+
// extract relevant value from XShape's PropertySet
- uno::Reference< beans::XPropertySet > xPropSet( xShape,
+ uno::Reference< beans::XPropertySet > xPropSet( xShape,
uno::UNO_QUERY );
ENSURE_OR_THROW( xPropSet.is(),
@@ -678,17 +678,17 @@ namespace slideshow
return xPropSet->getPropertyValue( rPropertyName );
}
- template< typename ValueType > ValueType getDefault( const AnimatableShapeSharedPtr& rShape,
- const ::rtl::OUString& rPropertyName )
+ template< typename ValueType > ValueType getDefault( const AnimatableShapeSharedPtr& rShape,
+ const ::rtl::OUString& rPropertyName )
{
- const uno::Any& rAny( getShapeDefault( rShape,
+ const uno::Any& rAny( getShapeDefault( rShape,
rPropertyName ) );
if( !rAny.hasValue() )
{
OSL_ENSURE( false, "getDefault(): cannot get requested shape property" );
OSL_TRACE( "getDefault(): cannot get '%s' shape property",
- ::rtl::OUStringToOString( rPropertyName,
+ ::rtl::OUStringToOString( rPropertyName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
return ValueType();
}
@@ -700,7 +700,7 @@ namespace slideshow
{
OSL_ENSURE( false, "getDefault(): cannot extract requested shape property" );
OSL_TRACE( "getDefault(): cannot extract '%s' shape property",
- ::rtl::OUStringToOString( rPropertyName,
+ ::rtl::OUStringToOString( rPropertyName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
return ValueType();
}
@@ -710,16 +710,16 @@ namespace slideshow
}
template<> RGBColor getDefault< RGBColor >( const AnimatableShapeSharedPtr& rShape,
- const ::rtl::OUString& rPropertyName )
+ const ::rtl::OUString& rPropertyName )
{
- const uno::Any& rAny( getShapeDefault( rShape,
+ const uno::Any& rAny( getShapeDefault( rShape,
rPropertyName ) );
if( !rAny.hasValue() )
{
OSL_ENSURE( false, "getDefault(): cannot get requested shape color property" );
OSL_TRACE( "getDefault(): cannot get '%s' shape color property",
- ::rtl::OUStringToOString( rPropertyName,
+ ::rtl::OUStringToOString( rPropertyName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
return RGBColor();
}
@@ -731,7 +731,7 @@ namespace slideshow
{
OSL_ENSURE( false, "getDefault(): cannot extract requested shape color property" );
OSL_TRACE( "getDefault(): cannot extract '%s' shape color property",
- ::rtl::OUStringToOString( rPropertyName,
+ ::rtl::OUStringToOString( rPropertyName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
return RGBColor();
}
@@ -748,7 +748,7 @@ namespace slideshow
// ATTENTION: When changing this map, also the create*PropertyAnimation() methods must
// be checked and possibly adapted in their switch statements
- // TODO(Q2): Since this map must be coherent with the various switch statements
+ // TODO(Q2): Since this map must be coherent with the various switch statements
// in the create*PropertyAnimation methods, try to unify into a single method or table
switch( mapAttributeName( rAttrName ) )
{
@@ -808,11 +808,11 @@ namespace slideshow
}
}
- NumberAnimationSharedPtr AnimationFactory::createNumberPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ NumberAnimationSharedPtr AnimationFactory::createNumberPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags )
+ int nFlags )
{
// ATTENTION: When changing this map, also the classifyAttributeName() method must
// be checked and possibly adapted in their switch statement
@@ -853,38 +853,38 @@ namespace slideshow
case ATTRIBUTE_CHAR_HEIGHT:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isCharScaleValid,
+ &ShapeAttributeLayer::isCharScaleValid,
1.0, // CharHeight is a relative attribute, thus
// default is 1.0
- &ShapeAttributeLayer::getCharScale,
+ &ShapeAttributeLayer::getCharScale,
&ShapeAttributeLayer::setCharScale );
case ATTRIBUTE_CHAR_WEIGHT:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isCharWeightValid,
+ &ShapeAttributeLayer::isCharWeightValid,
getDefault<double>( rShape, rAttrName ),
- &ShapeAttributeLayer::getCharWeight,
+ &ShapeAttributeLayer::getCharWeight,
&ShapeAttributeLayer::setCharWeight );
case ATTRIBUTE_CHAR_ROTATION:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isCharRotationAngleValid,
+ &ShapeAttributeLayer::isCharRotationAngleValid,
getDefault<double>( rShape, rAttrName ),
- &ShapeAttributeLayer::getCharRotationAngle,
+ &ShapeAttributeLayer::getCharRotationAngle,
&ShapeAttributeLayer::setCharRotationAngle );
case ATTRIBUTE_HEIGHT:
return makeGenericAnimation( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isHeightValid,
+ &ShapeAttributeLayer::isHeightValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rShape->getBounds().getHeight(),
- &ShapeAttributeLayer::getHeight,
+ &ShapeAttributeLayer::getHeight,
&ShapeAttributeLayer::setHeight,
// convert expression parser value from relative page size
rSlideSize.getY() );
@@ -892,78 +892,78 @@ namespace slideshow
case ATTRIBUTE_OPACITY:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isAlphaValid,
+ &ShapeAttributeLayer::isAlphaValid,
// TODO(F1): Provide shape default here (FillTransparency?)
1.0,
- &ShapeAttributeLayer::getAlpha,
+ &ShapeAttributeLayer::getAlpha,
&ShapeAttributeLayer::setAlpha );
case ATTRIBUTE_ROTATE:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isRotationAngleValid,
+ &ShapeAttributeLayer::isRotationAngleValid,
// NOTE: Since we paint the shape as-is from metafile,
// rotation angle is always 0.0, even for rotated shapes
0.0,
- &ShapeAttributeLayer::getRotationAngle,
+ &ShapeAttributeLayer::getRotationAngle,
&ShapeAttributeLayer::setRotationAngle );
-
+
case ATTRIBUTE_SKEW_X:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isShearXAngleValid,
+ &ShapeAttributeLayer::isShearXAngleValid,
// TODO(F1): Is there any shape property for skew?
0.0,
- &ShapeAttributeLayer::getShearXAngle,
+ &ShapeAttributeLayer::getShearXAngle,
&ShapeAttributeLayer::setShearXAngle );
-
+
case ATTRIBUTE_SKEW_Y:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isShearYAngleValid,
+ &ShapeAttributeLayer::isShearYAngleValid,
// TODO(F1): Is there any shape property for skew?
0.0,
- &ShapeAttributeLayer::getShearYAngle,
+ &ShapeAttributeLayer::getShearYAngle,
&ShapeAttributeLayer::setShearYAngle );
-
+
case ATTRIBUTE_WIDTH:
return makeGenericAnimation( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isWidthValid,
+ &ShapeAttributeLayer::isWidthValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rShape->getBounds().getWidth(),
- &ShapeAttributeLayer::getWidth,
+ &ShapeAttributeLayer::getWidth,
&ShapeAttributeLayer::setWidth,
// convert expression parser value from relative page size
rSlideSize.getX() );
-
+
case ATTRIBUTE_POS_X:
return makeGenericAnimation( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isPosXValid,
+ &ShapeAttributeLayer::isPosXValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rShape->getBounds().getCenterX(),
- &ShapeAttributeLayer::getPosX,
+ &ShapeAttributeLayer::getPosX,
&ShapeAttributeLayer::setPosX,
// convert expression parser value from relative page size
rSlideSize.getX() );
-
+
case ATTRIBUTE_POS_Y:
return makeGenericAnimation( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isPosYValid,
+ &ShapeAttributeLayer::isPosYValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rShape->getBounds().getCenterY(),
- &ShapeAttributeLayer::getPosY,
+ &ShapeAttributeLayer::getPosY,
&ShapeAttributeLayer::setPosY,
// convert expression parser value from relative page size
rSlideSize.getY() );
@@ -972,11 +972,11 @@ namespace slideshow
return NumberAnimationSharedPtr();
}
- EnumAnimationSharedPtr AnimationFactory::createEnumPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ EnumAnimationSharedPtr AnimationFactory::createEnumPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& /*rSlideSize*/,
- int nFlags )
+ int nFlags )
{
// ATTENTION: When changing this map, also the classifyAttributeName() method must
// be checked and possibly adapted in their switch statement
@@ -1032,47 +1032,47 @@ namespace slideshow
case ATTRIBUTE_FILL_STYLE:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isFillStyleValid,
+ &ShapeAttributeLayer::isFillStyleValid,
sal::static_int_cast<sal_Int16>(
getDefault<drawing::FillStyle>( rShape, rAttrName )),
- &ShapeAttributeLayer::getFillStyle,
+ &ShapeAttributeLayer::getFillStyle,
&ShapeAttributeLayer::setFillStyle );
case ATTRIBUTE_LINE_STYLE:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isLineStyleValid,
+ &ShapeAttributeLayer::isLineStyleValid,
sal::static_int_cast<sal_Int16>(
getDefault<drawing::LineStyle>( rShape, rAttrName )),
- &ShapeAttributeLayer::getLineStyle,
+ &ShapeAttributeLayer::getLineStyle,
&ShapeAttributeLayer::setLineStyle );
-
+
case ATTRIBUTE_CHAR_POSTURE:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isCharPostureValid,
+ &ShapeAttributeLayer::isCharPostureValid,
sal::static_int_cast<sal_Int16>(
getDefault<awt::FontSlant>( rShape, rAttrName )),
- &ShapeAttributeLayer::getCharPosture,
+ &ShapeAttributeLayer::getCharPosture,
&ShapeAttributeLayer::setCharPosture );
-
+
case ATTRIBUTE_CHAR_UNDERLINE:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isUnderlineModeValid,
+ &ShapeAttributeLayer::isUnderlineModeValid,
getDefault<sal_Int16>( rShape, rAttrName ),
- &ShapeAttributeLayer::getUnderlineMode,
+ &ShapeAttributeLayer::getUnderlineMode,
&ShapeAttributeLayer::setUnderlineMode );
}
-
+
return EnumAnimationSharedPtr();
}
- ColorAnimationSharedPtr AnimationFactory::createColorPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ ColorAnimationSharedPtr AnimationFactory::createColorPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& /*rSlideSize*/,
- int nFlags )
+ int nFlags )
{
// ATTENTION: When changing this map, also the classifyAttributeName() method must
// be checked and possibly adapted in their switch statement
@@ -1125,90 +1125,90 @@ namespace slideshow
case ATTRIBUTE_CHAR_COLOR:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isCharColorValid,
+ &ShapeAttributeLayer::isCharColorValid,
getDefault<RGBColor>( rShape, rAttrName ),
- &ShapeAttributeLayer::getCharColor,
+ &ShapeAttributeLayer::getCharColor,
&ShapeAttributeLayer::setCharColor );
-
+
case ATTRIBUTE_COLOR:
// TODO(F2): This is just mapped to fill color to make it work
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isFillColorValid,
+ &ShapeAttributeLayer::isFillColorValid,
getDefault<RGBColor>( rShape, rAttrName ),
- &ShapeAttributeLayer::getFillColor,
+ &ShapeAttributeLayer::getFillColor,
&ShapeAttributeLayer::setFillColor );
-
+
case ATTRIBUTE_DIMCOLOR:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isDimColorValid,
+ &ShapeAttributeLayer::isDimColorValid,
getDefault<RGBColor>( rShape, rAttrName ),
- &ShapeAttributeLayer::getDimColor,
+ &ShapeAttributeLayer::getDimColor,
&ShapeAttributeLayer::setDimColor );
case ATTRIBUTE_FILL_COLOR:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isFillColorValid,
+ &ShapeAttributeLayer::isFillColorValid,
getDefault<RGBColor>( rShape, rAttrName ),
- &ShapeAttributeLayer::getFillColor,
+ &ShapeAttributeLayer::getFillColor,
&ShapeAttributeLayer::setFillColor );
-
+
case ATTRIBUTE_LINE_COLOR:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isLineColorValid,
+ &ShapeAttributeLayer::isLineColorValid,
getDefault<RGBColor>( rShape, rAttrName ),
- &ShapeAttributeLayer::getLineColor,
+ &ShapeAttributeLayer::getLineColor,
&ShapeAttributeLayer::setLineColor );
}
return ColorAnimationSharedPtr();
}
- PairAnimationSharedPtr AnimationFactory::createPairPropertyAnimation( const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ PairAnimationSharedPtr AnimationFactory::createPairPropertyAnimation( const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- sal_Int16 nTransformType,
- int nFlags )
+ sal_Int16 nTransformType,
+ int nFlags )
{
const ::basegfx::B2DRectangle& rBounds( rShape->getBounds() );
switch( nTransformType )
{
case animations::AnimationTransformType::SCALE:
- return PairAnimationSharedPtr(
- new TupleAnimation< ::basegfx::B2DSize >(
+ return PairAnimationSharedPtr(
+ new TupleAnimation< ::basegfx::B2DSize >(
rShapeManager,
nFlags,
- &ShapeAttributeLayer::isWidthValid,
- &ShapeAttributeLayer::isHeightValid,
+ &ShapeAttributeLayer::isWidthValid,
+ &ShapeAttributeLayer::isHeightValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rBounds.getRange(),
rBounds.getRange(),
- &ShapeAttributeLayer::getWidth,
- &ShapeAttributeLayer::getHeight,
+ &ShapeAttributeLayer::getWidth,
+ &ShapeAttributeLayer::getHeight,
&ShapeAttributeLayer::setSize ) );
case animations::AnimationTransformType::TRANSLATE:
- return PairAnimationSharedPtr(
- new TupleAnimation< ::basegfx::B2DPoint >(
+ return PairAnimationSharedPtr(
+ new TupleAnimation< ::basegfx::B2DPoint >(
rShapeManager,
nFlags,
- &ShapeAttributeLayer::isPosXValid,
- &ShapeAttributeLayer::isPosYValid,
+ &ShapeAttributeLayer::isPosXValid,
+ &ShapeAttributeLayer::isPosYValid,
// TODO(F1): Check whether _shape_ bounds are correct here.
// Theoretically, our AttrLayer is way down the stack, and
- // we only have to consider _that_ value, not the one from
+ // we only have to consider _that_ value, not the one from
// the top of the stack as returned by Shape::getBounds()
rBounds.getCenter(),
rSlideSize,
- &ShapeAttributeLayer::getPosX,
- &ShapeAttributeLayer::getPosY,
+ &ShapeAttributeLayer::getPosX,
+ &ShapeAttributeLayer::getPosY,
&ShapeAttributeLayer::setPosition ) );
default:
@@ -1220,11 +1220,11 @@ namespace slideshow
return PairAnimationSharedPtr();
}
- StringAnimationSharedPtr AnimationFactory::createStringPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ StringAnimationSharedPtr AnimationFactory::createStringPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& /*rSlideSize*/,
- int nFlags )
+ int nFlags )
{
// ATTENTION: When changing this map, also the classifyAttributeName() method must
// be checked and possibly adapted in their switch statement
@@ -1285,20 +1285,20 @@ namespace slideshow
case ATTRIBUTE_CHAR_FONT_NAME:
return makeGenericAnimation<StringAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isFontFamilyValid,
+ &ShapeAttributeLayer::isFontFamilyValid,
getDefault< ::rtl::OUString >( rShape, rAttrName ),
- &ShapeAttributeLayer::getFontFamily,
+ &ShapeAttributeLayer::getFontFamily,
&ShapeAttributeLayer::setFontFamily );
}
return StringAnimationSharedPtr();
}
- BoolAnimationSharedPtr AnimationFactory::createBoolPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& /*rShape*/,
- const ShapeManagerSharedPtr& rShapeManager,
+ BoolAnimationSharedPtr AnimationFactory::createBoolPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& /*rShape*/,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& /*rSlideSize*/,
- int nFlags )
+ int nFlags )
{
// ATTENTION: When changing this map, also the classifyAttributeName() method must
// be checked and possibly adapted in their switch statement
@@ -1359,30 +1359,30 @@ namespace slideshow
case ATTRIBUTE_VISIBILITY:
return makeGenericAnimation<BoolAnimation>( rShapeManager,
nFlags,
- &ShapeAttributeLayer::isVisibilityValid,
+ &ShapeAttributeLayer::isVisibilityValid,
// TODO(F1): Is there a corresponding shape property?
true,
- &ShapeAttributeLayer::getVisibility,
+ &ShapeAttributeLayer::getVisibility,
&ShapeAttributeLayer::setVisibility );
}
return BoolAnimationSharedPtr();
}
- NumberAnimationSharedPtr AnimationFactory::createPathMotionAnimation( const ::rtl::OUString& rSVGDPath,
- sal_Int16 nAdditive,
- const AnimatableShapeSharedPtr& /*rShape*/,
- const ShapeManagerSharedPtr& rShapeManager,
+ NumberAnimationSharedPtr AnimationFactory::createPathMotionAnimation( const ::rtl::OUString& rSVGDPath,
+ sal_Int16 nAdditive,
+ const AnimatableShapeSharedPtr& /*rShape*/,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags )
+ int nFlags )
{
- return NumberAnimationSharedPtr(
+ return NumberAnimationSharedPtr(
new PathAnimation( rSVGDPath, nAdditive,
rShapeManager,
rSlideSize,
nFlags ) );
}
-
+
}
}
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx
index 64c91e2a2519..a03336650459 100644
--- a/slideshow/source/engine/animationnodes/animationaudionode.cxx
+++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx
@@ -2,7 +2,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
@@ -46,7 +46,7 @@ namespace slideshow {
namespace internal {
AnimationAudioNode::AnimationAudioNode(
- const uno::Reference< animations::XAnimationNode >& xNode,
+ const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: BaseNode( xNode, rParent, rContext ),
@@ -55,10 +55,10 @@ AnimationAudioNode::AnimationAudioNode(
mpPlayer()
{
mxAudioNode->getSource() >>= maSoundURL;
-
+
OSL_ENSURE( maSoundURL.getLength(),
"could not extract sound source URL/empty URL string" );
-
+
ENSURE_OR_THROW( getContext().mxComponentContext.is(),
"Invalid component context" );
}
@@ -73,21 +73,21 @@ void AnimationAudioNode::dispose()
void AnimationAudioNode::activate_st()
{
createPlayer();
-
+
AnimationEventHandlerSharedPtr aHandler(
boost::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) );
OSL_ENSURE( aHandler,
"could not cast self to AnimationEventHandler?" );
getContext().mrEventMultiplexer.addCommandStopAudioHandler( aHandler );
-
- if (mpPlayer && mpPlayer->startPlayback())
+
+ if (mpPlayer && mpPlayer->startPlayback())
{
// TODO(F2): Handle end time attribute, too
- if( getXAnimationNode()->getDuration().hasValue() )
+ if( getXAnimationNode()->getDuration().hasValue() )
{
scheduleDeactivationEvent();
}
- else
+ else
{
// no node duration. Take inherent media time, then
scheduleDeactivationEvent(
@@ -96,7 +96,7 @@ void AnimationAudioNode::activate_st()
"AnimationAudioNode::deactivate with delay") );
}
}
- else
+ else
{
// deactivate ASAP:
scheduleDeactivationEvent(
@@ -115,14 +115,14 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ )
OSL_ENSURE( aHandler,
"could not cas self to AnimationEventHandler?" );
getContext().mrEventMultiplexer.removeCommandStopAudioHandler( aHandler );
-
+
// force-end sound
- if (mpPlayer)
+ if (mpPlayer)
{
mpPlayer->stopPlayback();
resetPlayer();
}
-
+
// notify _after_ state change:
getContext().mrEventQueue.addEvent(
makeEvent( boost::bind( &EventMultiplexer::notifyAudioStopped,
@@ -143,14 +143,14 @@ void AnimationAudioNode::createPlayer() const
{
if (mpPlayer)
return;
-
- try
+
+ try
{
mpPlayer = SoundPlayer::create( getContext().mrEventMultiplexer,
maSoundURL,
getContext().mxComponentContext );
}
- catch( lang::NoSupportException& )
+ catch( lang::NoSupportException& )
{
// catch possible exceptions from SoundPlayer,
// since being not able to playback the sound
@@ -161,7 +161,7 @@ void AnimationAudioNode::createPlayer() const
void AnimationAudioNode::resetPlayer() const
{
- if (mpPlayer)
+ if (mpPlayer)
{
mpPlayer->stopPlayback();
mpPlayer->dispose();
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.hxx b/slideshow/source/engine/animationnodes/animationaudionode.hxx
index ab2877a99784..35397557d0e2 100644
--- a/slideshow/source/engine/animationnodes/animationaudionode.hxx
+++ b/slideshow/source/engine/animationnodes/animationaudionode.hxx
@@ -2,7 +2,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
@@ -37,7 +37,7 @@ namespace slideshow {
namespace internal {
/** Audio node.
-
+
This animation node contains an audio effect. Duration and
start/stop behaviour is affected by the referenced audio
file.
@@ -47,27 +47,27 @@ class AnimationAudioNode : public BaseNode, public AnimationEventHandler
public:
AnimationAudioNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext );
-
+
protected:
virtual void dispose();
-
+
private:
virtual void activate_st();
virtual void deactivate_st( NodeState eDestState );
virtual bool hasPendingAnimation() const;
-
+
/// overriden, because we need to deal with STOPAUDIO commands
virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode );
-
+
private:
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAudio > mxAudioNode;
::rtl::OUString maSoundURL;
mutable SoundPlayerSharedPtr mpPlayer;
-
+
void createPlayer() const;
void resetPlayer() const;
};
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 9125cc6bcac5..ee979e60e659 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -2,7 +2,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
@@ -55,7 +55,7 @@ namespace slideshow {
namespace internal {
AnimationBaseNode::AnimationBaseNode(
- const uno::Reference< animations::XAnimationNode >& xNode,
+ const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: BaseNode( xNode, rParent, rContext ),
@@ -70,13 +70,13 @@ AnimationBaseNode::AnimationBaseNode(
{
// extract native node targets
// ===========================
-
+
// plain shape target
uno::Reference< drawing::XShape > xShape( mxAnimateNode->getTarget(),
uno::UNO_QUERY );
-
+
// distinguish 5 cases:
- //
+ //
// - plain shape target
// (NodeContext.mpMasterShapeSubset full set)
//
@@ -100,7 +100,7 @@ AnimationBaseNode::AnimationBaseNode(
}
else
{
- // cases 2 & 3: subset shape
+ // cases 2 & 3: subset shape
mpShapeSubset = rContext.mpMasterShapeSubset;
}
}
@@ -108,9 +108,9 @@ AnimationBaseNode::AnimationBaseNode(
{
// no parent-provided shape, try to extract
// from XAnimationNode - cases 4 and 5
-
+
if( xShape.is() )
- {
+ {
mpShape = lookupAttributableShape( getContext().mpSubsettableShapeManager,
xShape );
}
@@ -118,18 +118,18 @@ AnimationBaseNode::AnimationBaseNode(
{
// no shape provided. Maybe a ParagraphTarget?
presentation::ParagraphTarget aTarget;
-
+
if( !(mxAnimateNode->getTarget() >>= aTarget) )
ENSURE_OR_THROW(
false, "could not extract any target information" );
-
+
xShape = aTarget.Shape;
-
+
ENSURE_OR_THROW( xShape.is(), "invalid shape in ParagraphTarget" );
-
+
mpShape = lookupAttributableShape( getContext().mpSubsettableShapeManager,
xShape );
-
+
// NOTE: For shapes with ParagraphTarget, we ignore
// the SubItem property. We implicitely assume that it
// is set to ONLY_TEXT.
@@ -140,14 +140,14 @@ AnimationBaseNode::AnimationBaseNode(
presentation::ShapeAnimationSubType::AS_WHOLE,
"ParagraphTarget given, but subitem not AS_TEXT or AS_WHOLE? "
"Make up your mind, I'll ignore the subitem." );
-
+
// okay, found a ParagraphTarget with a valid XShape. Does the shape
// provide the given paragraph?
- const DocTreeNode& rTreeNode(
+ const DocTreeNode& rTreeNode(
mpShape->getTreeNodeSupplier().getTreeNode(
- aTarget.Paragraph,
+ aTarget.Paragraph,
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) );
-
+
// CAUTION: the creation of the subset shape
// _must_ stay in the node constructor, since
// Slide::prefetchShow() initializes shape
@@ -157,7 +157,7 @@ AnimationBaseNode::AnimationBaseNode(
new ShapeSubset( mpShape,
rTreeNode,
mpSubsetManager ));
-
+
// Override NodeContext, and flag this node as
// a special independent subset one. This is
// important when applying initial attributes:
@@ -172,7 +172,7 @@ AnimationBaseNode::AnimationBaseNode(
// the slide is initially shown, and become
// visible only when the effect starts.
mbIsIndependentSubset = true;
-
+
// already enable subset right here, the
// setup of initial shape attributes of
// course needs the subset shape
@@ -189,12 +189,12 @@ void AnimationBaseNode::dispose()
mpActivity->dispose();
mpActivity.reset();
}
-
+
maAttributeLayerHolder.reset();
mxAnimateNode.clear();
mpShape.reset();
mpShapeSubset.reset();
-
+
BaseNode::dispose();
}
@@ -205,12 +205,12 @@ bool AnimationBaseNode::init_st()
mpActivity->dispose();
mpActivity.reset();
}
-
+
// note: actually disposing the activity too early might cause problems,
// because on dequeued() it calls endAnimation(pAnim->end()), thus ending
// animation _after_ last screen update.
// review that end() is properly called (which calls endAnimation(), too).
-
+
try {
// TODO(F2): For restart functionality, we must regenerate activities,
// since they are not able to reset their state (or implement _that_)
@@ -220,7 +220,7 @@ bool AnimationBaseNode::init_st()
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(cppu::getCaughtException()),
RTL_TEXTENCODING_UTF8 ) );
- // catch and ignore. We later handle empty activities, but for
+ // catch and ignore. We later handle empty activities, but for
// other nodes to function properly, the core functionality of
// this node must remain up and running.
}
@@ -228,7 +228,7 @@ bool AnimationBaseNode::init_st()
}
bool AnimationBaseNode::resolve_st()
-{
+{
// enable shape subset for automatically generated
// subsets. Independent subsets are already setup
// during construction time. Doing it only here
@@ -247,17 +247,17 @@ void AnimationBaseNode::activate_st()
{
// create new attribute layer
maAttributeLayerHolder.createAttributeLayer( getShape() );
-
+
ENSURE_OR_THROW( maAttributeLayerHolder.get(),
"Could not generate shape attribute layer" );
-
+
// TODO(Q2): This affects the way mpActivity
// works, but is performed here because of
// locality (we're fiddling with the additive mode
// here, anyway, and it's the only place where we
// do). OTOH, maybe the complete additive mode
// setup should be moved to the activities.
-
+
// for simple by-animations, the SMIL spec
// requires us to emulate "0,by-value" value list
// behaviour, with additive mode forced to "sum",
@@ -276,7 +276,7 @@ void AnimationBaseNode::activate_st()
// determine whether an
// Activity::getUnderlyingValue() yields the
// DOM value, or already a summed-up conglomerate)
- //
+ //
// Note that this poses problems with our
// hybrid activity duration (time or min number of frames),
// since if activities
@@ -291,7 +291,7 @@ void AnimationBaseNode::activate_st()
maAttributeLayerHolder.get()->setAdditiveMode(
mxAnimateNode->getAdditive() );
}
-
+
// fake normal animation behaviour, even if we
// show nothing. This is the appropriate way to
// handle errors on Activity generation, because
@@ -302,7 +302,7 @@ void AnimationBaseNode::activate_st()
// supply Activity (and the underlying Animation) with
// it's AttributeLayer, to perform the animation on
mpActivity->setTargets( getShape(), maAttributeLayerHolder.get() );
-
+
// add to activities queue
getContext().mrActivitiesQueue.addActivity( mpActivity );
}
@@ -319,7 +319,7 @@ void AnimationBaseNode::deactivate_st( NodeState eDestState )
if (mpActivity)
mpActivity->end();
}
-
+
if (isDependentSubsettedShape()) {
// for dependent subsets, remove subset shape
// from layer, re-integrate subsetted part
@@ -330,7 +330,7 @@ void AnimationBaseNode::deactivate_st( NodeState eDestState )
// will effectively re-integrate the subsetted
// part into the original shape (whose
// animation will hopefully have ended, too)
-
+
// this statement will save a whole lot of
// sprites for iterated text effects, since
// those sprites will only exist during the
@@ -339,26 +339,26 @@ void AnimationBaseNode::deactivate_st( NodeState eDestState )
mpShapeSubset->disableSubsetShape();
}
}
-
+
if (eDestState == ENDED) {
-
+
// no shape anymore, no layer needed:
maAttributeLayerHolder.reset();
-
+
if (! isDependentSubsettedShape()) {
-
+
// for all other shapes, removing the
// attribute layer quite possibly changes
// shape display. Thus, force update
AttributableShapeSharedPtr const pShape( getShape() );
-
+
// don't anybody dare to check against
// pShape->isVisible() here, removing the
// attribute layer might actually make the
// shape invisible!
getContext().mpSubsettableShapeManager->notifyShapeUpdate( pShape );
}
-
+
if (mpActivity) {
// kill activity, if still running
mpActivity->dispose();
@@ -369,7 +369,7 @@ void AnimationBaseNode::deactivate_st( NodeState eDestState )
bool AnimationBaseNode::hasPendingAnimation() const
{
- // TODO(F1): This might not always be true. Are there 'inactive'
+ // TODO(F1): This might not always be true. Are there 'inactive'
// animation nodes?
return true;
}
@@ -378,7 +378,7 @@ bool AnimationBaseNode::hasPendingAnimation() const
void AnimationBaseNode::showState() const
{
BaseNode::showState();
-
+
VERBOSE_TRACE( "AnimationBaseNode info: independent subset=%s",
mbIsIndependentSubset ? "y" : "n" );
}
@@ -388,17 +388,17 @@ ActivitiesFactory::CommonParameters
AnimationBaseNode::fillCommonParameters() const
{
double nDuration = 0.0;
-
+
// TODO(F3): Duration/End handling is barely there
if( !(mxAnimateNode->getDuration() >>= nDuration) ) {
mxAnimateNode->getEnd() >>= nDuration; // Wah.
}
-
+
// minimal duration we fallback to (avoid 0 here!)
nDuration = ::std::max( 0.001, nDuration );
-
+
const bool bAutoReverse( mxAnimateNode->getAutoReverse() );
-
+
boost::optional<double> aRepeats;
double nRepeats = 0;
if( (mxAnimateNode->getRepeatCount() >>= nRepeats) ) {
@@ -411,7 +411,7 @@ AnimationBaseNode::fillCommonParameters() const
// active duration. Thus, calc repeat
// count with already adapted simple
// duration (twice the specified duration)
-
+
// convert duration back to repeat counts
if( bAutoReverse )
aRepeats.reset( nRepeats / (2.0 * nDuration) );
@@ -421,7 +421,7 @@ AnimationBaseNode::fillCommonParameters() const
else {
// no double value for both values - Timing::INDEFINITE?
animations::Timing eTiming;
-
+
if( !(mxAnimateNode->getRepeatDuration() >>= eTiming) ||
eTiming != animations::Timing_INDEFINITE )
{
@@ -435,7 +435,7 @@ AnimationBaseNode::fillCommonParameters() const
}
}
}
-
+
// calc accel/decel:
double nAcceleration = 0.0;
double nDeceleration = 0.0;
@@ -450,7 +450,7 @@ AnimationBaseNode::fillCommonParameters() const
nDeceleration = std::max( nDeceleration,
xAnimationNode->getDecelerate() );
}
-
+
EventSharedPtr pEndEvent;
if (pSelf) {
pEndEvent = makeEvent(
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx b/slideshow/source/engine/animationnodes/animationbasenode.hxx
index b15047d78c4f..aac9f3a0c3fe 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.hxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.hxx
@@ -2,7 +2,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
@@ -41,7 +41,7 @@ namespace slideshow {
namespace internal {
/** Common base class for all leaf animation nodes.
-
+
This class basically holds the target shape
*/
class AnimationBaseNode : public BaseNode
@@ -49,36 +49,36 @@ class AnimationBaseNode : public BaseNode
public:
AnimationBaseNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext );
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual void showState() const;
#endif
-
+
protected:
virtual void dispose();
-
+
::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate> const& getXAnimateNode() const
{ return mxAnimateNode; }
-
+
/// Create parameter struct for ActivitiesFactory
ActivitiesFactory::CommonParameters fillCommonParameters() const;
::basegfx::B2DVector const& getSlideSize() const { return maSlideSize; }
AttributableShapeSharedPtr getShape() const;
-
+
private:
virtual bool hasPendingAnimation() const;
-
+
private: // state transition callbacks
virtual bool init_st();
virtual bool resolve_st();
virtual void activate_st();
virtual void deactivate_st( NodeState eDestState );
virtual AnimationActivitySharedPtr createActivity() const = 0;
-
+
private:
/** Returns true, if this is a subset animation, and
the subset is autogenerated (e.g. from an
@@ -86,20 +86,20 @@ private:
*/
bool isDependentSubsettedShape() const
{ return mpShapeSubset && !mbIsIndependentSubset; }
-
+
ShapeAttributeLayerHolder const & getAttributeLayerHolder() const
{ return maAttributeLayerHolder; }
-
+
private:
::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate> mxAnimateNode;
ShapeAttributeLayerHolder maAttributeLayerHolder;
::basegfx::B2DVector maSlideSize;
AnimationActivitySharedPtr mpActivity;
-
+
/// When valid, this node has a plain target shape
AttributableShapeSharedPtr mpShape;
- /// When valid, this is a subsetted target shape
+ /// When valid, this is a subsetted target shape
ShapeSubsetSharedPtr mpShapeSubset;
SubsettableShapeManagerSharedPtr mpSubsetManager;
bool mbIsIndependentSubset;
diff --git a/slideshow/source/engine/animationnodes/animationcolornode.cxx b/slideshow/source/engine/animationnodes/animationcolornode.cxx
index 6f1536d8ebee..5bd25ec26aba 100644
--- a/slideshow/source/engine/animationnodes/animationcolornode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcolornode.cxx
@@ -2,7 +2,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
@@ -47,7 +47,7 @@ namespace internal {
namespace {
/** Little wrapper for HSL to RGB mapping.
-
+
This class implements the HSLColorAnimation interface,
internally converting to RGB and forwarding to
ColorAnimation.
@@ -62,7 +62,7 @@ public:
mpAnimation,
"HSLWrapper::HSLWrapper(): Invalid color animation delegate" );
}
-
+
virtual void prefetch( const AnimatableShapeSharedPtr&,
const ShapeAttributeLayerSharedPtr& )
{}
@@ -72,22 +72,22 @@ public:
{
mpAnimation->start( rShape, rAttrLayer );
}
-
+
virtual void end()
{
mpAnimation->end();
}
-
+
virtual bool operator()( const HSLColor& rColor )
{
return (*mpAnimation)( RGBColor( rColor ) );
}
-
+
virtual HSLColor getUnderlyingValue() const
{
return HSLColor( mpAnimation->getUnderlyingValue() );
}
-
+
private:
ColorAnimationSharedPtr mpAnimation;
};
@@ -97,39 +97,39 @@ private:
AnimationActivitySharedPtr AnimationColorNode::createActivity() const
{
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
-
+
switch( mxColorNode->getColorInterpolation() )
{
case animations::AnimationColorSpace::RGB:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createColorPropertyAnimation(
+ AnimationFactory::createColorPropertyAnimation(
mxColorNode->getAttributeName(),
getShape(),
getContext().mpSubsettableShapeManager,
getSlideSize() ),
getXAnimateNode() );
-
+
case animations::AnimationColorSpace::HSL:
// Wrap a plain ColorAnimation with the HSL
// wrapper, which implements the HSLColorAnimation
- // interface, and internally converts HSL to RGB color
+ // interface, and internally converts HSL to RGB color
return ActivitiesFactory::createAnimateActivity(
aParms,
HSLColorAnimationSharedPtr(
new HSLWrapper(
- AnimationFactory::createColorPropertyAnimation(
+ AnimationFactory::createColorPropertyAnimation(
mxColorNode->getAttributeName(),
getShape(),
getContext().mpSubsettableShapeManager,
getSlideSize() ))),
mxColorNode );
-
+
default:
ENSURE_OR_THROW( false, "AnimationColorNode::createColorActivity(): "
"Unexpected color space" );
}
-
+
return AnimationActivitySharedPtr();
}
diff --git a/slideshow/source/engine/animationnodes/animationcolornode.hxx b/slideshow/source/engine/animationnodes/animationcolornode.hxx
index 68c1dc856823..dfa9f60cfa82 100644
--- a/slideshow/source/engine/animationnodes/animationcolornode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcolornode.hxx
@@ -2,7 +2,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
@@ -40,20 +40,20 @@ class AnimationColorNode : public AnimationBaseNode
public:
AnimationColorNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext )
: AnimationBaseNode( xNode, pParent, rContext ),
mxColorNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const { return "AnimationColorNode"; }
#endif
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
-
- ::com::sun::star::uno::Reference<
+
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimateColor > mxColorNode;
};
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index 69a41ab13978..6717b5fd7a38 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -2,7 +2,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
@@ -49,10 +49,10 @@ namespace slideshow {
namespace internal {
namespace EffectCommands = com::sun::star::presentation::EffectCommands;
-
-AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimationNode> const& xNode,
+
+AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
- NodeContext const& rContext ) :
+ NodeContext const& rContext ) :
BaseNode( xNode, pParent, rContext ),
mpShape(),
mxCommandNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW )
@@ -78,12 +78,12 @@ void AnimationCommandNode::activate_st()
// the command is an ole verb.
case EffectCommands::VERB: break;
// the command starts playing on a media object
- case EffectCommands::PLAY:
+ case EffectCommands::PLAY:
{
double fMediaTime=0.0;
beans::PropertyValue aMediaTime;
if( (mxCommandNode->getParameter() >>= aMediaTime) &&
- aMediaTime.Name.equalsAsciiL(
+ aMediaTime.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("MediaTime") ))
{
aMediaTime.Value >>= fMediaTime;
@@ -119,7 +119,7 @@ void AnimationCommandNode::activate_st()
getContext().mrEventMultiplexer.notifyCommandStopAudio( getSelf() );
break;
}
-
+
// deactivate ASAP:
scheduleDeactivationEvent(
makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
index 2c1b6aff2bee..94b10fd44e93 100644
--- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx
@@ -2,7 +2,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
@@ -46,20 +46,20 @@ class AnimationCommandNode : public BaseNode
public:
AnimationCommandNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext );
-
+
protected:
virtual void dispose();
-
+
private:
virtual void activate_st();
virtual bool hasPendingAnimation() const;
-
+
private:
ExternalMediaShapeSharedPtr mpShape;
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XCommand > mxCommandNode;
bool mbIsPaused;
};
diff --git a/slideshow/source/engine/animationnodes/animationnodefactory.cxx b/slideshow/source/engine/animationnodes/animationnodefactory.cxx
index c4a205cf6588..7e2f3bb4d59e 100644
--- a/slideshow/source/engine/animationnodes/animationnodefactory.cxx
+++ b/slideshow/source/engine/animationnodes/animationnodefactory.cxx
@@ -2,7 +2,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
@@ -87,13 +87,13 @@ public:
NodeCreator( BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: mrParent( rParent ), mrContext( rContext ) {}
-
+
void operator()(
const uno::Reference< animations::XAnimationNode >& xChildNode ) const
{
createChild( xChildNode, mrContext );
}
-
+
protected:
void createChild(
const uno::Reference< animations::XAnimationNode >& xChildNode,
@@ -102,23 +102,23 @@ protected:
BaseNodeSharedPtr pChild( implCreateAnimationNode( xChildNode,
mrParent,
rContext ) );
-
+
OSL_ENSURE( pChild,
"NodeCreator::operator(): child creation failed" );
-
- // TODO(Q1): This yields circular references, which, it seems, is
+
+ // TODO(Q1): This yields circular references, which, it seems, is
// unavoidable here
if( pChild )
mrParent->appendChildNode( pChild );
}
-
+
BaseContainerNodeSharedPtr& mrParent;
const NodeContext& mrContext;
};
/** Same as NodeCreator, only that NodeContext's
SubsetShape is cloned for every child node.
-
+
This is used for iterated animation node generation
*/
class CloningNodeCreator : private NodeCreator
@@ -127,12 +127,12 @@ public:
CloningNodeCreator( BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: NodeCreator( rParent, rContext ) {}
-
+
void operator()(
const uno::Reference< animations::XAnimationNode >& xChildNode ) const
{
NodeContext aContext( mrContext );
-
+
// TODO(Q1): There's a catch here. If you clone a
// subset whose actual subsetting has already been
// realized (i.e. if enableSubsetShape() has been
@@ -143,12 +143,12 @@ public:
// triggered here (we either clone, XOR we enable
// subset initially), but one might consider
// reworking DrawShape/ShapeSubset to avoid this.
-
+
// clone ShapeSubset, since each node needs their
// own version of the ShapeSubset (otherwise,
// e.g. activity counting does not work - subset
// would be removed after first animation node
- // disables it).
+ // disables it).
//
// NOTE: this is only a problem for animation
// nodes that explicitely call
@@ -158,15 +158,15 @@ public:
// normalize things, which does the right thing
// here: the subset is only removed after _the
// last_ animation node releases the shared ptr.
- aContext.mpMasterShapeSubset.reset(
+ aContext.mpMasterShapeSubset.reset(
new ShapeSubset( *aContext.mpMasterShapeSubset ) );
-
+
createChild( xChildNode, aContext );
}
};
/** Create animation nodes for text iterations
-
+
This method clones the animation nodes below xIterNode
for every iterated shape entity.
*/
@@ -177,9 +177,9 @@ bool implCreateIteratedNodes(
{
ENSURE_OR_THROW( xIterNode.is(),
"implCreateIteratedNodes(): Invalid node" );
-
+
const double nIntervalTimeout( xIterNode->getIterateInterval() );
-
+
// valid iterate interval? We're ruling out monstrous
// values here, to avoid pseudo 'hangs' in the
// presentation
@@ -188,28 +188,28 @@ bool implCreateIteratedNodes(
{
return false; // not an active iteration
}
-
+
if( ::basegfx::fTools::equalZero( nIntervalTimeout ) )
OSL_TRACE( "implCreateIteratedNodes(): "
"iterate interval close to zero, there's "
"no point in defining such an effect "
"(visually equivalent to whole-shape effect)" );
-
+
// Determine target shape (or subset)
// ==================================
-
+
// TODO(E1): I'm not too sure what to expect here...
ENSURE_OR_RETURN_FALSE(
xIterNode->getTarget().hasValue(),
"implCreateIteratedNodes(): no target on ITERATE node" );
-
+
uno::Reference< drawing::XShape > xTargetShape( xIterNode->getTarget(),
uno::UNO_QUERY );
-
+
presentation::ParagraphTarget aTarget;
sal_Int16 nSubItem( xIterNode->getSubItem() );
bool bParagraphTarget( false );
-
+
if( !xTargetShape.is() )
{
// no shape provided. Maybe a ParagraphTarget?
@@ -218,48 +218,48 @@ bool implCreateIteratedNodes(
false,
"implCreateIteratedNodes(): could not extract any "
"target information" );
-
+
xTargetShape = aTarget.Shape;
-
+
ENSURE_OR_RETURN_FALSE(
xTargetShape.is(),
"implCreateIteratedNodes(): invalid shape in ParagraphTarget" );
-
+
// we've a paragraph target to iterate over, thus,
// the whole animation container refers only to
// the text
nSubItem = presentation::ShapeAnimationSubType::ONLY_TEXT;
-
+
bParagraphTarget = true;
}
-
+
// Lookup shape, and fill NodeContext
// ==================================
-
- AttributableShapeSharedPtr pTargetShape(
+
+ AttributableShapeSharedPtr pTargetShape(
lookupAttributableShape( rContext.maContext.mpSubsettableShapeManager,
xTargetShape ) );
-
+
const DocTreeNodeSupplier& rTreeNodeSupplier(
pTargetShape->getTreeNodeSupplier() );
-
+
ShapeSubsetSharedPtr pTargetSubset;
-
+
NodeContext aContext( rContext );
-
+
// paragraph targets already need a subset as the
// master shape (they're representing only a single
// paragraph)
if( bParagraphTarget )
{
- ENSURE_OR_RETURN_FALSE(
+ ENSURE_OR_RETURN_FALSE(
aTarget.Paragraph >= 0 &&
rTreeNodeSupplier.getNumberOfTreeNodes(
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) > aTarget.Paragraph,
"implCreateIteratedNodes(): paragraph index out of range" );
-
- pTargetSubset.reset(
- new ShapeSubset(
+
+ pTargetSubset.reset(
+ new ShapeSubset(
pTargetShape,
// retrieve index aTarget.Paragraph of
// type PARAGRAPH from this shape
@@ -267,13 +267,13 @@ bool implCreateIteratedNodes(
aTarget.Paragraph,
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ),
rContext.maContext.mpSubsettableShapeManager ) );
-
+
// iterate target is not the whole shape, but only
// the selected paragraph - subset _must_ be
// independent, to be able to affect visibility
// independent of master shape
aContext.mbIsIndependentSubset = true;
-
+
// already enable parent subset right here, to
// make potentially generated subsets subtract
// their content from the parent subset (and not
@@ -288,18 +288,18 @@ bool implCreateIteratedNodes(
}
else
{
- pTargetSubset.reset(
+ pTargetSubset.reset(
new ShapeSubset( pTargetShape,
rContext.maContext.mpSubsettableShapeManager ));
}
-
+
aContext.mpMasterShapeSubset = pTargetSubset;
uno::Reference< animations::XAnimationNode > xNode( xIterNode,
uno::UNO_QUERY_THROW );
-
+
// Generate subsets
// ================
-
+
if( bParagraphTarget ||
nSubItem != presentation::ShapeAnimationSubType::ONLY_TEXT )
{
@@ -310,7 +310,7 @@ bool implCreateIteratedNodes(
// method). For ONLY_TEXT effects,
// we skip this part, to animate
// only the text.
- //
+ //
// OR
//
// prepend with subset animation for full
@@ -320,15 +320,15 @@ bool implCreateIteratedNodes(
// ONLY_TEXT, if a paragraph is referenced as the
// master of an iteration effect.
NodeCreator aCreator( rParent, aContext );
- if( !::anim::for_each_childNode( xNode,
+ if( !::anim::for_each_childNode( xNode,
aCreator ) )
{
ENSURE_OR_RETURN_FALSE(
- false,
+ false,
"implCreateIteratedNodes(): iterated child node creation failed" );
- }
+ }
}
-
+
// TODO(F2): This does not do the correct
// thing. Having nSubItem be set to ONLY_BACKGROUND
// should result in the text staying unanimated in the
@@ -341,31 +341,31 @@ bool implCreateIteratedNodes(
{
// determine type of subitem iteration (logical
// text unit to animate)
- DocTreeNode::NodeType eIterateNodeType(
+ DocTreeNode::NodeType eIterateNodeType(
DocTreeNode::NODETYPE_LOGICAL_CHARACTER_CELL );
-
+
switch( xIterNode->getIterateType() )
{
case presentation::TextAnimationType::BY_PARAGRAPH:
eIterateNodeType = DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH;
break;
-
+
case presentation::TextAnimationType::BY_WORD:
eIterateNodeType = DocTreeNode::NODETYPE_LOGICAL_WORD;
break;
-
+
case presentation::TextAnimationType::BY_LETTER:
eIterateNodeType = DocTreeNode::NODETYPE_LOGICAL_CHARACTER_CELL;
break;
-
+
default:
ENSURE_OR_THROW(
false, "implCreateIteratedNodes(): "
"Unexpected IterateType on XIterateContainer");
break;
}
-
- if( bParagraphTarget &&
+
+ if( bParagraphTarget &&
eIterateNodeType != DocTreeNode::NODETYPE_LOGICAL_WORD &&
eIterateNodeType != DocTreeNode::NODETYPE_LOGICAL_CHARACTER_CELL )
{
@@ -378,7 +378,7 @@ bool implCreateIteratedNodes(
{
// setup iteration parameters
// --------------------------
-
+
// iterate target is the whole shape (or the
// whole parent subshape), thus, can save
// loads of subset shapes by generating them
@@ -388,7 +388,7 @@ bool implCreateIteratedNodes(
// master shape and subset (since the iterated
// effects are all the same).
aContext.mbIsIndependentSubset = false;
-
+
// determine number of nodes for given subitem
// type
sal_Int32 nTreeNodes( 0 );
@@ -405,26 +405,26 @@ bool implCreateIteratedNodes(
else
{
// generate normal subset
- nTreeNodes = rTreeNodeSupplier.getNumberOfTreeNodes(
+ nTreeNodes = rTreeNodeSupplier.getNumberOfTreeNodes(
eIterateNodeType );
}
-
-
+
+
// iterate node, generate copies of the children for each subset
// -------------------------------------------------------------
-
+
// NodeContext::mnStartDelay contains additional node delay.
// This will make the duplicated nodes for each iteration start
// increasingly later.
- aContext.mnStartDelay = nIntervalTimeout;
-
+ aContext.mnStartDelay = nIntervalTimeout;
+
for( sal_Int32 i=0; i<nTreeNodes; ++i )
{
// create subset with the corresponding tree nodes
if( bParagraphTarget )
{
// create subsets relative to paragraph subset
- aContext.mpMasterShapeSubset.reset(
+ aContext.mpMasterShapeSubset.reset(
new ShapeSubset(
pTargetSubset,
rTreeNodeSupplier.getSubsetTreeNode(
@@ -435,27 +435,27 @@ bool implCreateIteratedNodes(
else
{
// create subsets from main shape
- aContext.mpMasterShapeSubset.reset(
+ aContext.mpMasterShapeSubset.reset(
new ShapeSubset( pTargetSubset,
rTreeNodeSupplier.getTreeNode(
i,
eIterateNodeType ) ) );
}
-
+
CloningNodeCreator aCreator( rParent, aContext );
- if( !::anim::for_each_childNode( xNode,
+ if( !::anim::for_each_childNode( xNode,
aCreator ) )
{
ENSURE_OR_RETURN_FALSE(
false, "implCreateIteratedNodes(): "
"iterated child node creation failed" );
}
-
+
aContext.mnStartDelay += nIntervalTimeout;
}
}
}
-
+
// done with iterate child generation
return true;
}
@@ -467,10 +467,10 @@ BaseNodeSharedPtr implCreateAnimationNode(
{
ENSURE_OR_THROW( xNode.is(),
"implCreateAnimationNode(): invalid XAnimationNode" );
-
+
BaseNodeSharedPtr pCreatedNode;
BaseContainerNodeSharedPtr pCreatedContainer;
-
+
// create the internal node, corresponding to xNode
switch( xNode->getType() )
{
@@ -478,12 +478,12 @@ BaseNodeSharedPtr implCreateAnimationNode(
OSL_ENSURE( false, "implCreateAnimationNode(): "
"CUSTOM not yet implemented" );
return pCreatedNode;
-
+
case animations::AnimationNodeType::PAR:
pCreatedNode = pCreatedContainer = BaseContainerNodeSharedPtr(
new ParallelTimeContainer( xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::ITERATE:
// map iterate container to ParallelTimeContainer.
// the iterating functionality is to be found
@@ -491,72 +491,72 @@ BaseNodeSharedPtr implCreateAnimationNode(
pCreatedNode = pCreatedContainer = BaseContainerNodeSharedPtr(
new ParallelTimeContainer( xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::SEQ:
pCreatedNode = pCreatedContainer = BaseContainerNodeSharedPtr(
new SequentialTimeContainer( xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::ANIMATE:
pCreatedNode.reset( new PropertyAnimationNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::SET:
pCreatedNode.reset( new AnimationSetNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::ANIMATEMOTION:
pCreatedNode.reset( new AnimationPathMotionNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::ANIMATECOLOR:
pCreatedNode.reset( new AnimationColorNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::ANIMATETRANSFORM:
pCreatedNode.reset( new AnimationTransformNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::TRANSITIONFILTER:
pCreatedNode.reset( new AnimationTransitionFilterNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::AUDIO:
pCreatedNode.reset( new AnimationAudioNode(
xNode, rParent, rContext ) );
break;
-
+
case animations::AnimationNodeType::COMMAND:
pCreatedNode.reset( new AnimationCommandNode(
xNode, rParent, rContext ) );
break;
-
+
default:
OSL_ENSURE( false, "implCreateAnimationNode(): "
"invalid AnimationNodeType" );
return pCreatedNode;
}
-
- // TODO(Q1): This yields circular references, which, it seems, is
+
+ // TODO(Q1): This yields circular references, which, it seems, is
// unavoidable here
-
- // HACK: node objects need shared_ptr to themselves,
+
+ // HACK: node objects need shared_ptr to themselves,
// which we pass them here.
pCreatedNode->setSelf( pCreatedNode );
-
- // if we've got a container node object, recursively add
+
+ // if we've got a container node object, recursively add
// its children
if( pCreatedContainer )
{
uno::Reference< animations::XIterateContainer > xIterNode(
xNode, uno::UNO_QUERY );
-
+
// when this node is an XIterateContainer with
// active iterations, this method will generate
// the appropriate children
@@ -570,7 +570,7 @@ BaseNodeSharedPtr implCreateAnimationNode(
// node attribute are incomplete for iteration
// children.
implCreateIteratedNodes( xIterNode,
- pCreatedContainer,
+ pCreatedContainer,
rContext );
}
else
@@ -584,8 +584,8 @@ BaseNodeSharedPtr implCreateAnimationNode(
return BaseNodeSharedPtr();
}
}
- }
-
+ }
+
return pCreatedNode;
}
@@ -599,9 +599,9 @@ AnimationNodeSharedPtr AnimationNodeFactory::createAnimationNode(
ENSURE_OR_THROW(
xNode.is(),
"AnimationNodeFactory::createAnimationNode(): invalid XAnimationNode" );
-
+
return BaseNodeSharedPtr( implCreateAnimationNode(
- xNode,
+ xNode,
BaseContainerNodeSharedPtr(), // no parent
NodeContext( rContext,
rSlideSize )));
diff --git a/slideshow/source/engine/animationnodes/animationpathmotionnode.cxx b/slideshow/source/engine/animationnodes/animationpathmotionnode.cxx
index d0ffe8b59da4..7e90f3abf692 100644
--- a/slideshow/source/engine/animationnodes/animationpathmotionnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationpathmotionnode.cxx
@@ -2,7 +2,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
@@ -50,7 +50,7 @@ AnimationActivitySharedPtr AnimationPathMotionNode::createActivity() const
rtl::OUString aString;
ENSURE_OR_THROW( (mxPathMotionNode->getPath() >>= aString),
"no string-based SVG:d path found" );
-
+
ActivitiesFactory::CommonParameters const aParms( fillCommonParameters() );
return ActivitiesFactory::createSimpleActivity(
aParms,
diff --git a/slideshow/source/engine/animationnodes/animationpathmotionnode.hxx b/slideshow/source/engine/animationnodes/animationpathmotionnode.hxx
index 02fbc99fab83..c0e11d81863c 100644
--- a/slideshow/source/engine/animationnodes/animationpathmotionnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationpathmotionnode.hxx
@@ -2,7 +2,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
@@ -38,25 +38,25 @@ class AnimationPathMotionNode : public AnimationBaseNode
{
public:
AnimationPathMotionNode(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode >& xNode,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: AnimationBaseNode( xNode, rParent, rContext ),
mxPathMotionNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const
{ return "AnimationPathMotionNode"; }
#endif
-
+
protected:
virtual void dispose();
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
-
- ::com::sun::star::uno::Reference<
+
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimateMotion > mxPathMotionNode;
};
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx
index b09e5d041889..5bf744ecb8ff 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx
@@ -2,7 +2,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
@@ -57,7 +57,7 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
uno::Reference<animations::XAnimate> const xAnimateNode = getXAnimateNode();
rtl::OUString const attrName( xAnimateNode->getAttributeName() );
AttributableShapeSharedPtr const pShape( getShape() );
-
+
// make deactivation a two-step procedure. Normally, we
// could solely rely on
// BaseNode::scheduleDeactivationEvent() to deactivate()
@@ -68,7 +68,7 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
// sequentiality by letting only the set activity schedule
// the deactivation event (and AnimationBaseNode
// takes care for the fact when mpActivity should be zero).
-
+
// AnimationBaseNode::fillCommonParameters() has set up
// immediate deactivation as default when activity ends, but
if (! isIndefiniteTiming( xAnimateNode->getDuration() )) {
@@ -81,7 +81,7 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
pSelf ),
"AnimationSetNode::implScheduleDeactivationEvent");
}
-
+
switch (AnimationFactory::classifyAttributeName( attrName )) {
default:
case AnimationFactory::CLASS_UNKNOWN_PROPERTY:
@@ -89,22 +89,22 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
false, "AnimationSetNode::createSetActivity(): "
"Unexpected attribute class" );
break;
-
+
case AnimationFactory::CLASS_NUMBER_PROPERTY:
{
NumberAnimation::ValueType aValue;
-
+
ENSURE_OR_THROW(
- extractValue( aValue,
- xAnimateNode->getTo(),
- pShape,
+ extractValue( aValue,
+ xAnimateNode->getTo(),
+ pShape,
getSlideSize() ),
"AnimationSetNode::createSetActivity(): "
"Could not import numeric to value" );
-
+
return makeSetActivity(
aParms,
- AnimationFactory::createNumberPropertyAnimation(
+ AnimationFactory::createNumberPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
@@ -112,22 +112,22 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
AnimationFactory::FLAG_NO_SPRITE ),
aValue );
}
-
+
case AnimationFactory::CLASS_ENUM_PROPERTY:
{
EnumAnimation::ValueType aValue;
-
+
ENSURE_OR_THROW(
- extractValue( aValue,
- xAnimateNode->getTo(),
- pShape,
+ extractValue( aValue,
+ xAnimateNode->getTo(),
+ pShape,
getSlideSize() ),
"AnimationSetNode::createSetActivity(): "
"Could not import enum to value" );
-
+
return makeSetActivity(
aParms,
- AnimationFactory::createEnumPropertyAnimation(
+ AnimationFactory::createEnumPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
@@ -135,22 +135,22 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
AnimationFactory::FLAG_NO_SPRITE ),
aValue );
}
-
+
case AnimationFactory::CLASS_COLOR_PROPERTY:
{
ColorAnimation::ValueType aValue;
-
+
ENSURE_OR_THROW(
- extractValue( aValue,
- xAnimateNode->getTo(),
- pShape,
+ extractValue( aValue,
+ xAnimateNode->getTo(),
+ pShape,
getSlideSize() ),
"AnimationSetNode::createSetActivity(): "
"Could not import color to value" );
-
+
return makeSetActivity(
aParms,
- AnimationFactory::createColorPropertyAnimation(
+ AnimationFactory::createColorPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
@@ -158,22 +158,22 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
AnimationFactory::FLAG_NO_SPRITE ),
aValue );
}
-
+
case AnimationFactory::CLASS_STRING_PROPERTY:
{
StringAnimation::ValueType aValue;
-
+
ENSURE_OR_THROW(
- extractValue( aValue,
- xAnimateNode->getTo(),
- pShape,
+ extractValue( aValue,
+ xAnimateNode->getTo(),
+ pShape,
getSlideSize() ),
"AnimationSetNode::createSetActivity(): "
"Could not import string to value" );
-
+
return makeSetActivity(
aParms,
- AnimationFactory::createStringPropertyAnimation(
+ AnimationFactory::createStringPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
@@ -181,22 +181,22 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
AnimationFactory::FLAG_NO_SPRITE ),
aValue );
}
-
+
case AnimationFactory::CLASS_BOOL_PROPERTY:
{
BoolAnimation::ValueType aValue;
-
+
ENSURE_OR_THROW(
- extractValue( aValue,
- xAnimateNode->getTo(),
- pShape,
+ extractValue( aValue,
+ xAnimateNode->getTo(),
+ pShape,
getSlideSize() ),
"AnimationSetNode::createSetActivity(): "
"Could not import bool to value" );
-
+
return makeSetActivity(
aParms,
- AnimationFactory::createBoolPropertyAnimation(
+ AnimationFactory::createBoolPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
@@ -205,7 +205,7 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const
aValue );
}
}
-
+
return AnimationActivitySharedPtr();
}
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.hxx b/slideshow/source/engine/animationnodes/animationsetnode.hxx
index a836b9ae0f38..f84f831d38cf 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.hxx
@@ -2,7 +2,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
@@ -38,15 +38,15 @@ class AnimationSetNode : public AnimationBaseNode
public:
AnimationSetNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext )
: AnimationBaseNode( xNode, pParent, rContext ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const { return "AnimationSetNode"; }
#endif
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
void implScheduleDeactivationEvent();
diff --git a/slideshow/source/engine/animationnodes/animationtransformnode.cxx b/slideshow/source/engine/animationnodes/animationtransformnode.cxx
index cfa22104c417..fa83ea7fc2da 100644
--- a/slideshow/source/engine/animationnodes/animationtransformnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationtransformnode.cxx
@@ -2,7 +2,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
@@ -52,59 +52,59 @@ void AnimationTransformNode::dispose()
AnimationActivitySharedPtr AnimationTransformNode::createActivity() const
{
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
-
+
const sal_Int16 nTransformType( mxTransformNode->getTransformType() );
-
+
const AttributableShapeSharedPtr& rShape( getShape() );
-
+
switch( nTransformType )
{
default:
ENSURE_OR_THROW(
false, "AnimationTransformNode::createTransformActivity(): "
"Unknown transform type" );
-
+
case animations::AnimationTransformType::TRANSLATE:
// FALLTHROUGH intended
case animations::AnimationTransformType::SCALE:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createPairPropertyAnimation(
- rShape,
- getContext().mpSubsettableShapeManager,
+ AnimationFactory::createPairPropertyAnimation(
+ rShape,
+ getContext().mpSubsettableShapeManager,
getSlideSize(),
nTransformType ),
getXAnimateNode() );
-
+
case animations::AnimationTransformType::ROTATE:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createNumberPropertyAnimation(
- ::rtl::OUString(
+ AnimationFactory::createNumberPropertyAnimation(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Rotate") ),
- rShape,
+ rShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
getXAnimateNode() );
-
+
case animations::AnimationTransformType::SKEWX:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createNumberPropertyAnimation(
- ::rtl::OUString(
+ AnimationFactory::createNumberPropertyAnimation(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("SkewX") ),
- rShape,
+ rShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
getXAnimateNode() );
-
+
case animations::AnimationTransformType::SKEWY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createNumberPropertyAnimation(
- ::rtl::OUString(
+ AnimationFactory::createNumberPropertyAnimation(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("SkewY") ),
- rShape,
+ rShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
getXAnimateNode() );
diff --git a/slideshow/source/engine/animationnodes/animationtransformnode.hxx b/slideshow/source/engine/animationnodes/animationtransformnode.hxx
index e2416b72a7f3..c24030f73d41 100644
--- a/slideshow/source/engine/animationnodes/animationtransformnode.hxx
+++ b/slideshow/source/engine/animationnodes/animationtransformnode.hxx
@@ -2,7 +2,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
@@ -40,24 +40,24 @@ class AnimationTransformNode : public AnimationBaseNode
public:
AnimationTransformNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext )
: AnimationBaseNode( xNode, pParent, rContext ),
mxTransformNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const
{ return "AnimationTransformNode"; }
#endif
-
+
protected:
virtual void dispose();
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
-
- ::com::sun::star::uno::Reference<
+
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimateTransform > mxTransformNode;
};
diff --git a/slideshow/source/engine/animationnodes/animationtransitionfilternode.cxx b/slideshow/source/engine/animationnodes/animationtransitionfilternode.cxx
index feb88fe8f3d9..709685633d25 100644
--- a/slideshow/source/engine/animationnodes/animationtransitionfilternode.cxx
+++ b/slideshow/source/engine/animationnodes/animationtransitionfilternode.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx b/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx
index 506ab668050c..05a8802c4ac2 100644
--- a/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx
+++ b/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx
@@ -2,7 +2,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
@@ -40,25 +40,25 @@ class AnimationTransitionFilterNode : public AnimationBaseNode
public:
AnimationTransitionFilterNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext )
: AnimationBaseNode( xNode, pParent, rContext ),
mxTransitionFilterNode( xNode, ::com::sun::star::uno::UNO_QUERY_THROW)
{}
-
+
#if defined(VERBOSE)
virtual const char* getDescription() const
{ return "AnimationTransitionFilterNode"; }
#endif
-
+
protected:
virtual void dispose();
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
-
- ::com::sun::star::uno::Reference<
+
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XTransitionFilter> mxTransitionFilterNode;
};
diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx
index bd5c9a8868b3..8ee1c197fcb6 100644
--- a/slideshow/source/engine/animationnodes/basecontainernode.cxx
+++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx
@@ -2,7 +2,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
@@ -47,7 +47,7 @@ namespace slideshow {
namespace internal {
BaseContainerNode::BaseContainerNode(
- const uno::Reference< animations::XAnimationNode >& xNode,
+ const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: BaseNode( xNode, rParent, rContext ),
@@ -91,7 +91,7 @@ void BaseContainerNode::deactivate_st( NodeState eDestState )
bool BaseContainerNode::hasPendingAnimation() const
{
// does any of our children returns "true" on
- // AnimationNode::hasPendingAnimation()?
+ // AnimationNode::hasPendingAnimation()?
// If yes, we, too, return true
VectorOfNodes::const_iterator const iEnd( maChildren.end() );
return (std::find_if(
@@ -103,9 +103,9 @@ void BaseContainerNode::appendChildNode( AnimationNodeSharedPtr const& pNode )
{
if (! checkValidNode())
return;
-
+
// register derived classes as end listeners at all children.
- // this is necessary to control the children animation
+ // this is necessary to control the children animation
// sequence, and to determine our own end event
if (pNode->registerDeactivatingListener( getSelf() )) {
maChildren.push_back( pNode );
@@ -136,12 +136,12 @@ bool BaseContainerNode::notifyDeactivatedChild(
OSL_ENSURE( false, "unknown notifier!" );
return false;
}
-
+
std::size_t const nSize = maChildren.size();
OSL_ASSERT( mnFinishedChildren < nSize );
++mnFinishedChildren;
bool const bFinished = (mnFinishedChildren >= nSize);
-
+
// all children finished, and we've got indefinite duration?
// think of ParallelTimeContainer::notifyDeactivating()
// if duration given, we will be deactivated by some end event
@@ -149,7 +149,7 @@ bool BaseContainerNode::notifyDeactivatedChild(
if (bFinished && isDurationIndefinite()) {
deactivate();
}
-
+
return bFinished;
}
@@ -161,12 +161,12 @@ void BaseContainerNode::showState() const
BaseNodeSharedPtr pNode =
boost::shared_dynamic_cast<BaseNode>(maChildren[i]);
VERBOSE_TRACE(
- "Node connection: n0x%X -> n0x%X",
- (const char*)this+debugGetCurrentOffset(),
+ "Node connection: n0x%X -> n0x%X",
+ (const char*)this+debugGetCurrentOffset(),
(const char*)pNode.get()+debugGetCurrentOffset() );
pNode->showState();
}
-
+
BaseNode::showState();
}
#endif
diff --git a/slideshow/source/engine/animationnodes/basecontainernode.hxx b/slideshow/source/engine/animationnodes/basecontainernode.hxx
index 8523d122f722..3015694a2ec9 100644
--- a/slideshow/source/engine/animationnodes/basecontainernode.hxx
+++ b/slideshow/source/engine/animationnodes/basecontainernode.hxx
@@ -2,7 +2,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
@@ -40,15 +40,15 @@ class BaseContainerNode : public BaseNode
{
public:
BaseContainerNode(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext );
-
+
/** Add given child node to this container
*/
void appendChildNode( AnimationNodeSharedPtr const& pNode );
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual void showState() const;
virtual const char* getDescription() const { return "BaseContainerNode"; }
@@ -57,7 +57,7 @@ public:
protected:
// overrides from BaseNode
virtual void dispose();
-
+
private:
virtual bool init_st();
virtual void deactivate_st( NodeState eDestState );
@@ -66,15 +66,15 @@ private:
virtual void activate_st() = 0;
virtual void notifyDeactivating(
AnimationNodeSharedPtr const& rNotifier ) = 0;
-
+
protected:
bool isDurationIndefinite() const { return mbDurationIndefinite; }
-
+
bool isChildNode( AnimationNodeSharedPtr const& pNode ) const;
-
+
/// @return true: if all children have been deactivated
bool notifyDeactivatedChild( AnimationNodeSharedPtr const& pChildNode );
-
+
template <typename FuncT>
inline void forEachChildNode( FuncT const& func,
int nodeStateMask = -1 ) const
@@ -88,11 +88,11 @@ protected:
func(pNode);
}
}
-
+
typedef ::std::vector<AnimationNodeSharedPtr> VectorOfNodes;
VectorOfNodes maChildren;
::std::size_t mnFinishedChildren;
-
+
private:
const bool mbDurationIndefinite;
};
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index e7343857f98b..71450cb568a9 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -2,7 +2,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
@@ -71,38 +71,38 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
sal_Int16 nFillMode )
{
// TODO(F2): restart issues in below tables
-
+
// transition table for restart=NEVER, fill=REMOVE
static const StateTransitionTable stateTransitionTable_Never_Remove = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED, // active successors for ACTIVE: no freeze here
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::INVALID, // active successors for FROZEN: this state is unreachable here
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED // active successors for ENDED: this state is a sink here (cannot restart)
};
-
+
// transition table for restart=WHEN_NOT_ACTIVE, fill=REMOVE
static const StateTransitionTable stateTransitionTable_NotActive_Remove = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED, // active successors for ACTIVE: no freeze here
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::INVALID, // active successors for FROZEN:
// this state is unreachable here
AnimationNode::INVALID,
@@ -115,13 +115,13 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
AnimationNode::ENDED|AnimationNode::RESOLVED|AnimationNode::ACTIVE // active successors for ENDED:
// restart possible when ended
};
-
+
// transition table for restart=ALWAYS, fill=REMOVE
static const StateTransitionTable stateTransitionTable_Always_Remove = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED|AnimationNode::ACTIVE|AnimationNode::RESOLVED, // active successors for ACTIVE: restart
AnimationNode::INVALID,
AnimationNode::INVALID,
@@ -137,38 +137,38 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
AnimationNode::INVALID,
AnimationNode::ENDED|AnimationNode::ACTIVE|AnimationNode::RESOLVED // active successors for ENDED: restart
};
-
+
// transition table for restart=NEVER, fill=FREEZE
static const StateTransitionTable stateTransitionTable_Never_Freeze = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::FROZEN|AnimationNode::ENDED, // active successors for ACTIVE: freeze object
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::ENDED, // active successors for FROZEN: end
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::ENDED, // active successors for FROZEN: end
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED, // active successors for ENDED: this state is a sink here (cannot restart)
};
-
+
// transition table for restart=WHEN_NOT_ACTIVE, fill=FREEZE
static const StateTransitionTable stateTransitionTable_NotActive_Freeze = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::FROZEN|AnimationNode::ENDED, // active successors for ACTIVE: freeze object
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED|AnimationNode::RESOLVED|AnimationNode::ACTIVE, // active successors for FROZEN:
// restart possible when ended
AnimationNode::INVALID,
@@ -181,29 +181,29 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
AnimationNode::ENDED|AnimationNode::RESOLVED|AnimationNode::ACTIVE // active successors for ENDED:
// restart possible when ended
};
-
+
// transition table for restart=ALWAYS, fill=FREEZE
static const StateTransitionTable stateTransitionTable_Always_Freeze = {
AnimationNode::INVALID,
AnimationNode::RESOLVED|AnimationNode::ENDED, // active successors for UNRESOLVED
AnimationNode::ACTIVE|AnimationNode::ENDED, // active successors for RESOLVED
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::FROZEN|AnimationNode::ENDED|AnimationNode::ACTIVE|AnimationNode::RESOLVED, // active successors for ACTIVE:
// end object, restart
AnimationNode::INVALID,
AnimationNode::INVALID,
AnimationNode::INVALID,
AnimationNode::ENDED|AnimationNode::RESOLVED|AnimationNode::ACTIVE, // active successors for FROZEN: restart possible
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
- AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
+ AnimationNode::INVALID,
AnimationNode::ENDED|AnimationNode::ACTIVE|AnimationNode::RESOLVED // active successors for ENDED: restart
};
-
+
static const StateTransitionTable* tableGuide[] = {
&stateTransitionTable_Never_Remove,
&stateTransitionTable_NotActive_Remove,
@@ -212,12 +212,12 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
&stateTransitionTable_NotActive_Freeze,
&stateTransitionTable_Always_Freeze
};
-
+
int nRestartValue;
switch( nRestartMode ) {
default:
case animations::AnimationRestart::DEFAULT:
- // same value: animations::AnimationRestart::INHERIT:
+ // same value: animations::AnimationRestart::INHERIT:
OSL_ENSURE(
false, "getStateTransitionTable(): unexpected case for restart" );
// FALLTHROUGH intended
@@ -231,7 +231,7 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
nRestartValue = 2;
break;
}
-
+
int nFillValue;
switch( nFillMode ) {
default:
@@ -250,7 +250,7 @@ const int* getStateTransitionTable( sal_Int16 nRestartMode,
nFillValue = 1;
break;
}
-
+
return *tableGuide[ 3*nFillValue + nRestartValue ];
}
@@ -260,10 +260,10 @@ bool isMainSequenceRootNode_(
{
// detect main sequence root node (need that for
// end-of-mainsequence signalling below)
- beans::NamedValue const aSearchKey(
+ beans::NamedValue const aSearchKey(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "node-type" ) ),
uno::makeAny( presentation::EffectNodeType::MAIN_SEQUENCE ) );
-
+
uno::Sequence<beans::NamedValue> const userData(xNode->getUserData());
return findNamedValue( userData, aSearchKey );
}
@@ -279,14 +279,14 @@ class BaseNode::StateTransition : private boost::noncopyable
{
public:
enum Options { NONE, FORCE };
-
+
explicit StateTransition( BaseNode * pNode )
: mpNode(pNode), meToState(INVALID) {}
-
+
~StateTransition() {
clear();
}
-
+
bool enter( NodeState eToState, int options = NONE )
{
OSL_ENSURE( meToState == INVALID,
@@ -304,7 +304,7 @@ public:
meToState = eToState;
return true; // in transition
}
-
+
void commit() {
OSL_ENSURE( meToState != INVALID, "### nothing to commit!" );
if (meToState != INVALID) {
@@ -316,7 +316,7 @@ public:
// every state change of one of its nodes.
// Debug_ShowNodeTree(mpNode->mpSelf);
}
-
+
void clear() {
if (meToState != INVALID) {
OSL_ASSERT( (mpNode->meCurrentStateTransition & meToState) != 0 );
@@ -324,13 +324,13 @@ public:
meToState = INVALID;
}
}
-
+
private:
BaseNode *const mpNode;
NodeState meToState;
};
-BaseNode::BaseNode( const uno::Reference< animations::XAnimationNode >& xNode,
+BaseNode::BaseNode( const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext ) :
maContext( rContext.maContext ),
@@ -347,7 +347,7 @@ BaseNode::BaseNode( const uno::Reference< animations::XAnimationNode >& xNode,
{
ENSURE_OR_THROW( mxAnimationNode.is(),
"BaseNode::BaseNode(): Invalid XAnimationNode" );
-
+
// setup state transition table
mpStateTransitionTable = getStateTransitionTable( getRestartMode(),
getFillMode() );
@@ -356,7 +356,7 @@ BaseNode::BaseNode( const uno::Reference< animations::XAnimationNode >& xNode,
void BaseNode::dispose()
{
meCurrState = INVALID;
-
+
// discharge a loaded event, if any:
if (mpCurrentEvent) {
mpCurrentEvent->dispose();
@@ -384,13 +384,13 @@ sal_Int16 BaseNode::getFillMode()
const sal_Int16 nFill((nTmp != animations::AnimationFill::DEFAULT &&
nTmp != animations::AnimationFill::INHERIT)
? nTmp : getFillDefaultMode());
-
+
// For AUTO fill mode, SMIL specifies that fill mode is FREEZE,
// if no explicit active duration is given
- // (no duration, end, repeatCount or repeatDuration given),
+ // (no duration, end, repeatCount or repeatDuration given),
// and REMOVE otherwise
if( nFill == animations::AnimationFill::AUTO ) {
- return (isIndefiniteTiming( mxAnimationNode->getDuration() ) &&
+ return (isIndefiniteTiming( mxAnimationNode->getDuration() ) &&
isIndefiniteTiming( mxAnimationNode->getEnd() ) &&
!mxAnimationNode->getRepeatCount().hasValue() &&
isIndefiniteTiming( mxAnimationNode->getRepeatDuration() ))
@@ -451,31 +451,31 @@ bool BaseNode::resolve()
{
if (! checkValidNode())
return false;
-
+
OSL_ASSERT( meCurrState != RESOLVED );
if (inStateOrTransition( RESOLVED ))
return true;
-
+
StateTransition st(this);
if (st.enter( RESOLVED ) &&
isTransition( RESOLVED, ACTIVE ) &&
resolve_st() /* may call derived class */)
{
st.commit(); // changing state
-
+
// discharge a loaded event, if any:
if (mpCurrentEvent)
mpCurrentEvent->dispose();
-
+
// schedule activation event:
-
+
// This method takes the NodeContext::mnStartDelay value into account,
// to cater for iterate container time shifts. We cannot put different
- // iterations of the iterate container's children into different
+ // iterations of the iterate container's children into different
// subcontainer (such as a 'DelayContainer', which delays resolving its
- // children by a fixed amount), since all iterations' nodes must be
+ // children by a fixed amount), since all iterations' nodes must be
// resolved at the same time (otherwise, the delayed subset creation
- // will not work, i.e. deactivate the subsets too late in the master
+ // will not work, i.e. deactivate the subsets too late in the master
// shape).
uno::Any const aBegin( mxAnimationNode->getBegin() );
if (aBegin.hasValue()) {
@@ -487,7 +487,7 @@ bool BaseNode::resolve()
// For some leaf nodes, PPT import yields empty begin time,
// although semantically, it should be 0.0
// TODO(F3): That should really be provided by the PPT import
-
+
// schedule delayed activation event. Take iterate node
// timeout into account
mpCurrentEvent = makeDelay(
@@ -496,7 +496,7 @@ bool BaseNode::resolve()
"AnimationNode::activate with delay");
maContext.mrEventQueue.addEvent( mpCurrentEvent );
}
-
+
return true;
}
return false;
@@ -512,23 +512,23 @@ bool BaseNode::activate()
{
if (! checkValidNode())
return false;
-
+
OSL_ASSERT( meCurrState != ACTIVE );
if (inStateOrTransition( ACTIVE ))
return true;
-
+
StateTransition st(this);
if (st.enter( ACTIVE )) {
-
+
activate_st(); // calling derived class
-
+
st.commit(); // changing state
-
+
maContext.mrEventMultiplexer.notifyAnimationStart( mpSelf );
-
+
return true;
}
-
+
return false;
}
@@ -553,12 +553,12 @@ void BaseNode::scheduleDeactivationEvent( EventSharedPtr const& pEvent )
// because the deactivation event is only scheduled
// when the effect is started: the timeout is then
// already respected.
-
+
// xxx todo:
// think about set node, anim base node!
// if anim base node has no activity, this is called to schedule deactivatiion,
// but what if it does not schedule anything?
-
+
// TODO(F2): Handle end time attribute, too
mpCurrentEvent = generateEvent(
mxAnimationNode->getDuration(),
@@ -571,17 +571,17 @@ void BaseNode::deactivate()
{
if (inStateOrTransition( ENDED | FROZEN ) || !checkValidNode())
return;
-
+
if (isTransition( meCurrState, FROZEN, false /* no OSL_ASSERT */ )) {
// do transition to FROZEN:
StateTransition st(this);
if (st.enter( FROZEN, StateTransition::FORCE )) {
-
+
deactivate_st( FROZEN );
st.commit();
-
+
notifyEndListeners();
-
+
// discharge a loaded event, before going on:
if (mpCurrentEvent) {
mpCurrentEvent->dispose();
@@ -605,15 +605,15 @@ void BaseNode::end()
bool const bIsFrozenOrInTransitionToFrozen = inStateOrTransition( FROZEN );
if (inStateOrTransition( ENDED ) || !checkValidNode())
return;
-
- // END must always be reachable. If not, that's an error in the
+
+ // END must always be reachable. If not, that's an error in the
// transition tables
OSL_ENSURE( isTransition( meCurrState, ENDED ),
"end state not reachable in transition table" );
-
+
StateTransition st(this);
if (st.enter( ENDED, StateTransition::FORCE )) {
-
+
deactivate_st( ENDED );
st.commit(); // changing state
@@ -621,7 +621,7 @@ void BaseNode::end()
// will/already notified deactivating listeners
if (!bIsFrozenOrInTransitionToFrozen)
notifyEndListeners();
-
+
// discharge a loaded event, before going on:
if (mpCurrentEvent) {
mpCurrentEvent->dispose();
@@ -645,10 +645,10 @@ void BaseNode::notifyEndListeners() const
maDeactivatingListeners.end(),
boost::bind( &AnimationNode::notifyDeactivating, _1,
boost::cref(mpSelf) ) );
-
+
// notify state change
maContext.mrEventMultiplexer.notifyAnimationEnd( mpSelf );
-
+
// notify main sequence end (iff we're the main
// sequence root node). This is because the main
// sequence determines the active duration of the
@@ -671,12 +671,12 @@ bool BaseNode::registerDeactivatingListener(
{
if (! checkValidNode())
return false;
-
+
ENSURE_OR_RETURN_FALSE(
rNotifee,
"BaseNode::registerDeactivatingListener(): invalid notifee" );
maDeactivatingListeners.push_back( rNotifee );
-
+
return true;
}
@@ -686,7 +686,7 @@ void BaseNode::setSelf( const BaseNodeSharedPtr& rSelf )
"BaseNode::setSelf(): got ptr to different object" );
ENSURE_OR_THROW( !mpSelf,
"BaseNode::setSelf(): called multiple times" );
-
+
mpSelf = rSelf;
}
@@ -697,7 +697,7 @@ void BaseNode::setSelf( const BaseNodeSharedPtr& rSelf )
void BaseNode::showState() const
{
const AnimationNode::NodeState eNodeState( getState() );
-
+
if( eNodeState == AnimationNode::INVALID )
VERBOSE_TRACE( "Node state: n0x%X [label=\"%s\",style=filled,"
"fillcolor=\"0.5,0.2,0.5\"]",
@@ -709,7 +709,7 @@ void BaseNode::showState() const
(const char*)this+debugGetCurrentOffset(),
getDescription(),
log(double(getState()))/4.0 );
-
+
// determine additional node information
uno::Reference<animations::XAnimate> const xAnimate( mxAnimationNode,
uno::UNO_QUERY );
@@ -717,31 +717,31 @@ void BaseNode::showState() const
{
uno::Reference< drawing::XShape > xTargetShape( xAnimate->getTarget(),
uno::UNO_QUERY );
-
+
if( !xTargetShape.is() )
{
::com::sun::star::presentation::ParagraphTarget aTarget;
-
+
// no shape provided. Maybe a ParagraphTarget?
if( (xAnimate->getTarget() >>= aTarget) )
xTargetShape = aTarget.Shape;
}
-
+
if( xTargetShape.is() )
{
- uno::Reference< beans::XPropertySet > xPropSet( xTargetShape,
+ uno::Reference< beans::XPropertySet > xPropSet( xTargetShape,
uno::UNO_QUERY );
-
+
// read shape name
::rtl::OUString aName;
- if( (xPropSet->getPropertyValue(
+ if( (xPropSet->getPropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) )
>>= aName) )
{
- const ::rtl::OString& rAsciiName(
- ::rtl::OUStringToOString( aName,
- RTL_TEXTENCODING_ASCII_US ) );
-
+ const ::rtl::OString& rAsciiName(
+ ::rtl::OUStringToOString( aName,
+ RTL_TEXTENCODING_ASCII_US ) );
+
VERBOSE_TRACE( "Node info: n0x%X, name \"%s\"",
(const char*)this+debugGetCurrentOffset(),
rAsciiName.getStr() );
@@ -760,7 +760,7 @@ void BaseNode::showTreeFromWithin() const
// find root node
BaseNodeSharedPtr pCurrNode( mpSelf );
while( pCurrNode->mpParent ) pCurrNode = pCurrNode->mpParent;
-
+
pCurrNode->showState();
}
#endif
diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx
index 6f4a6d9c47b3..f927c1be8f89 100644
--- a/slideshow/source/engine/animationnodes/basenode.hxx
+++ b/slideshow/source/engine/animationnodes/basenode.hxx
@@ -2,7 +2,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
@@ -44,7 +44,7 @@ namespace slideshow {
namespace internal {
/** Context for every node.
-
+
Besides the global AnimationNodeFactory::Context data,
this struct also contains the current DocTree subset
for this node. If start and end index of the
@@ -61,13 +61,13 @@ struct NodeContext
mnStartDelay(0.0),
mbIsIndependentSubset( true )
{}
-
- void dispose()
- {
- maContext.dispose();
- mpMasterShapeSubset.reset();
+
+ void dispose()
+ {
+ maContext.dispose();
+ mpMasterShapeSubset.reset();
}
-
+
/// Context as passed to createAnimationNode()
SlideShowContext maContext;
@@ -76,10 +76,10 @@ struct NodeContext
/// Shape to be used (provided by parent, e.g. for iterations)
ShapeSubsetSharedPtr mpMasterShapeSubset;
-
+
/// Additional delay to node begin (to offset iterate effects)
double mnStartDelay;
-
+
/// When true, subset must be created during slide initialization
bool mbIsIndependentSubset;
};
@@ -94,40 +94,40 @@ class BaseNode : public AnimationNode,
private ::boost::noncopyable
{
public:
- BaseNode( ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ BaseNode( ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext );
-
+
/** Provide the node with a shared_ptr to itself.
-
+
Since implementation has to create objects which need
a shared_ptr to this node, and a pointee cannot
retrieve a shared_ptr to itself internally, have to
set that from the outside.
*/
void setSelf( const ::boost::shared_ptr< BaseNode >& rSelf );
-
-
+
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual void showState() const;
virtual const char* getDescription() const;
void showTreeFromWithin() const;
#endif
-
+
const ::boost::shared_ptr< BaseContainerNode >& getParentNode() const
{ return mpParent; }
-
+
// Disposable:
virtual void dispose();
-
+
// AnimationNode:
virtual bool init();
virtual bool resolve();
virtual bool activate();
virtual void deactivate();
virtual void end();
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode> getXAnimationNode() const;
virtual NodeState getState() const;
virtual bool registerDeactivatingListener(
@@ -135,12 +135,12 @@ public:
// nop:
virtual void notifyDeactivating( const AnimationNodeSharedPtr& rNotifier );
- bool isMainSequenceRootNode() const { return mbIsMainSequenceRootNode; }
+ bool isMainSequenceRootNode() const { return mbIsMainSequenceRootNode; }
protected:
void scheduleDeactivationEvent( EventSharedPtr const& pEvent =
EventSharedPtr() );
-
+
SlideShowContext const& getContext() const { return maContext; }
::boost::shared_ptr<BaseNode> const& getSelf() const { return mpSelf; }
@@ -150,7 +150,7 @@ protected:
OSL_ENSURE( bRet, "### INVALID node!" );
return bRet;
}
-
+
private:
// all state affecting methods have "_st" counterparts being called at
// derived classes when in state transistion: no-ops here at BaseNode...
@@ -158,35 +158,35 @@ private:
virtual bool resolve_st();
virtual void activate_st();
virtual void deactivate_st( NodeState eDestState );
-
+
private:
/// notifies
/// - all registered deactivation listeners
/// - single animation end (every node)
/// - slide animations (if main sequence root node)
void notifyEndListeners() const;
-
+
/// Get the node's restart mode
sal_Int16 getRestartMode();
-
+
/** Get the default restart mode
-
+
If this node's default mode is
AnimationRestart::DEFAULT, this method recursively
calls the parent node.
*/
sal_Int16 getRestartDefaultMode() const;
-
+
/// Get the node's fill mode
sal_Int16 getFillMode();
-
+
/** Get the default fill mode.
-
+
If this node's default mode is AnimationFill::DEFAULT,
this method recursively calls the parent node.
*/
sal_Int16 getFillDefaultMode() const;
-
+
bool isTransition( NodeState eFromState, NodeState eToState,
bool debugAssert = true ) const {
(void) debugAssert; // avoid warning
@@ -199,17 +199,17 @@ private:
return ((meCurrState & mask) != 0 ||
(meCurrentStateTransition & mask) != 0);
}
-
+
class StateTransition;
friend class StateTransition;
-
+
private:
SlideShowContext maContext;
-
+
typedef ::std::vector< AnimationNodeSharedPtr > ListenerVector;
-
+
ListenerVector maDeactivatingListeners;
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode > mxAnimationNode;
::boost::shared_ptr< BaseContainerNode > mpParent;
::boost::shared_ptr< BaseNode > mpSelf;
diff --git a/slideshow/source/engine/animationnodes/generateevent.cxx b/slideshow/source/engine/animationnodes/generateevent.cxx
index afb9f2bf4aa5..40380b080ac3 100644
--- a/slideshow/source/engine/animationnodes/generateevent.cxx
+++ b/slideshow/source/engine/animationnodes/generateevent.cxx
@@ -2,7 +2,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
@@ -58,15 +58,15 @@ EventSharedPtr generateEvent(
double nAdditionalDelay )
{
EventSharedPtr pEvent;
-
+
if (! rEventDescription.hasValue())
return pEvent;
-
+
animations::Timing eTiming;
animations::Event aEvent;
uno::Sequence<uno::Any> aSequence;
double nDelay1 = 0;
-
+
if (rEventDescription >>= eTiming) {
switch (eTiming) {
case animations::Timing_INDEFINITE:
@@ -79,21 +79,21 @@ EventSharedPtr generateEvent(
}
}
else if (rEventDescription >>= aEvent) {
-
+
// try to extract additional event delay
double nDelay2 = 0.0;
if (aEvent.Offset.hasValue() && !(aEvent.Offset >>= nDelay2)) {
OSL_ENSURE( false, "offset values apart from DOUBLE not "
"recognized in animations::Event!" );
}
-
+
// common vars used inside switch
uno::Reference<animations::XAnimationNode> xNode;
uno::Reference<drawing::XShape> xShape;
ShapeSharedPtr pShape;
-
+
// TODO(F1): Respect aEvent.Repeat value
-
+
switch (aEvent.Trigger) {
default:
ENSURE_OR_THROW( false, "unexpected event trigger!" );
@@ -112,7 +112,7 @@ EventSharedPtr generateEvent(
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
"generateEvent, BEGIN_EVENT");
- rContext.mrUserEventQueue.registerAnimationStartEvent(
+ rContext.mrUserEventQueue.registerAnimationStartEvent(
pEvent, xNode );
}
else {
@@ -126,7 +126,7 @@ EventSharedPtr generateEvent(
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
"generateEvent, END_EVENT");
- rContext.mrUserEventQueue.registerAnimationEndEvent(
+ rContext.mrUserEventQueue.registerAnimationEndEvent(
pEvent, xNode );
}
else {
@@ -158,14 +158,14 @@ EventSharedPtr generateEvent(
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
"generateEvent, ON_DBL_CLICK");
- rContext.mrUserEventQueue.registerShapeDoubleClickEvent(
+ rContext.mrUserEventQueue.registerShapeDoubleClickEvent(
pEvent, pShape );
}
else {
OSL_ENSURE( false, "could not extract source XAnimationNode "
"for ON_DBL_CLICK!" );
}
- break;
+ break;
case animations::EventTrigger::ON_MOUSE_ENTER:
// try to extract XShape event source
if ((aEvent.Source >>= xShape) &&
@@ -174,7 +174,7 @@ EventSharedPtr generateEvent(
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
"generateEvent, ON_MOUSE_ENTER");
- rContext.mrUserEventQueue.registerMouseEnterEvent(
+ rContext.mrUserEventQueue.registerMouseEnterEvent(
pEvent, pShape );
}
else {
@@ -190,7 +190,7 @@ EventSharedPtr generateEvent(
pEvent = makeDelay( rFunctor,
nDelay2 + nAdditionalDelay,
"generateEvent, ON_MOUSE_LEAVE");
- rContext.mrUserEventQueue.registerMouseLeaveEvent(
+ rContext.mrUserEventQueue.registerMouseLeaveEvent(
pEvent, pShape );
}
else {
@@ -238,7 +238,7 @@ EventSharedPtr generateEvent(
// schedule delay event
rContext.mrEventQueue.addEvent( pEvent );
}
-
+
return pEvent;
}
diff --git a/slideshow/source/engine/animationnodes/generateevent.hxx b/slideshow/source/engine/animationnodes/generateevent.hxx
index 9c0104e5a254..fcadee19dfd2 100644
--- a/slideshow/source/engine/animationnodes/generateevent.hxx
+++ b/slideshow/source/engine/animationnodes/generateevent.hxx
@@ -2,7 +2,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
@@ -37,16 +37,16 @@ namespace slideshow {
namespace internal {
/** Create an event for the given description, calling the given functor.
-
+
@param rEventDescription
Directly from API
-
+
@param rFunctor
Functor to call when event fires.
-
+
@param rContext
Context struct, to provide event queue
-
+
@param nAdditionalDelay
Additional delay, gets added on top of timeout.
*/
diff --git a/slideshow/source/engine/animationnodes/nodetools.cxx b/slideshow/source/engine/animationnodes/nodetools.cxx
index 756f6b1969b0..ce7fab6d3506 100644
--- a/slideshow/source/engine/animationnodes/nodetools.cxx
+++ b/slideshow/source/engine/animationnodes/nodetools.cxx
@@ -2,7 +2,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
@@ -49,14 +49,14 @@ namespace slideshow
int& debugGetCurrentOffset()
{
static int lcl_nOffset = 0; // to make each tree output distinct
-
+
return lcl_nOffset;
}
void debugNodesShowTree( const BaseNode* pNode )
{
if( pNode )
- pNode->showState();
+ pNode->showState();
++debugGetCurrentOffset();
}
@@ -64,24 +64,24 @@ namespace slideshow
void debugNodesShowTreeWithin( const BaseNode* pNode )
{
if( pNode )
- pNode->showTreeFromWithin();
+ pNode->showTreeFromWithin();
++debugGetCurrentOffset();
}
#endif
- AttributableShapeSharedPtr lookupAttributableShape( const ShapeManagerSharedPtr& rShapeManager,
- const uno::Reference< drawing::XShape >& xShape )
+ AttributableShapeSharedPtr lookupAttributableShape( const ShapeManagerSharedPtr& rShapeManager,
+ const uno::Reference< drawing::XShape >& xShape )
{
ENSURE_OR_THROW( rShapeManager,
"lookupAttributableShape(): invalid ShapeManager" );
-
+
ShapeSharedPtr pShape( rShapeManager->lookupShape( xShape ) );
ENSURE_OR_THROW( pShape,
"lookupAttributableShape(): no shape found for given XShape" );
- AttributableShapeSharedPtr pRes(
+ AttributableShapeSharedPtr pRes(
::boost::dynamic_pointer_cast< AttributableShape >( pShape ) );
// TODO(E3): Cannot throw here, people might set animation info
@@ -99,7 +99,7 @@ namespace slideshow
return true;
animations::Timing eTiming;
-
+
if( !(rAny >>= eTiming) ||
eTiming != animations::Timing_INDEFINITE )
{
@@ -110,13 +110,13 @@ namespace slideshow
}
/// Extract the node type from the user data
- bool getNodeType( sal_Int16& o_rNodeType,
- const uno::Sequence< beans::NamedValue >& rValues )
+ bool getNodeType( sal_Int16& o_rNodeType,
+ const uno::Sequence< beans::NamedValue >& rValues )
{
beans::NamedValue aNamedValue;
if( findNamedValue( &aNamedValue,
- rValues,
+ rValues,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("node-type") ) ) )
{
if( (aNamedValue.Value >>= o_rNodeType) )
diff --git a/slideshow/source/engine/animationnodes/nodetools.hxx b/slideshow/source/engine/animationnodes/nodetools.hxx
index df120c159ac8..ed02ddc24a06 100644
--- a/slideshow/source/engine/animationnodes/nodetools.hxx
+++ b/slideshow/source/engine/animationnodes/nodetools.hxx
@@ -2,7 +2,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
@@ -56,22 +56,22 @@ namespace slideshow
//=========================================================================
#if defined(VERBOSE) && defined(DBG_UTIL)
- int& debugGetCurrentOffset();
+ int& debugGetCurrentOffset();
void debugNodesShowTree( const BaseNode* );
void debugNodesShowTreeWithin( const BaseNode* );
-#endif
+#endif
/** Look up an AttributableShape from ShapeManager.
This method retrieves an AttributableShape pointer, given
- an XShape and a LayerManager.
+ an XShape and a LayerManager.
Throws a runtime exception if there's no such shape, or if
it does not implement the AttributableShape interface.
*/
- AttributableShapeSharedPtr lookupAttributableShape( const ShapeManagerSharedPtr& rShapeManager,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XShape >& xShape );
+ AttributableShapeSharedPtr lookupAttributableShape( const ShapeManagerSharedPtr& rShapeManager,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape );
/** Predicate whether a Begin, Duration or End timing is
indefinite, i.e. either contains no value, or the
@@ -80,8 +80,8 @@ namespace slideshow
bool isIndefiniteTiming( const ::com::sun::star::uno::Any& rAny );
/// Extract the node type from the user data
- bool getNodeType( sal_Int16& o_rNodeType,
- const ::com::sun::star::uno::Sequence<
+ bool getNodeType( sal_Int16& o_rNodeType,
+ const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::NamedValue >& rValues );
}
}
diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
index 9e5ffa89bc29..766c0e9ad3cb 100644
--- a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
+++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.hxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.hxx
index abeacb7cda6f..3387ca8b64b1 100644
--- a/slideshow/source/engine/animationnodes/paralleltimecontainer.hxx
+++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.hxx
@@ -2,7 +2,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
@@ -34,24 +34,24 @@ namespace slideshow {
namespace internal {
/** This class implements parallel node containers
-
+
All children of this node are played in parallel
*/
class ParallelTimeContainer : public BaseContainerNode
{
public:
ParallelTimeContainer(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode >& xNode,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext )
: BaseContainerNode( xNode, rParent, rContext ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const
{ return "ParallelTimeContainer"; }
#endif
-
+
private:
virtual void activate_st();
virtual void notifyDeactivating( AnimationNodeSharedPtr const& pChildNode );
diff --git a/slideshow/source/engine/animationnodes/propertyanimationnode.cxx b/slideshow/source/engine/animationnodes/propertyanimationnode.cxx
index 669f000bd6c7..288a9b87c11e 100644
--- a/slideshow/source/engine/animationnodes/propertyanimationnode.cxx
+++ b/slideshow/source/engine/animationnodes/propertyanimationnode.cxx
@@ -2,7 +2,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
@@ -46,9 +46,9 @@ AnimationActivitySharedPtr PropertyAnimationNode::createActivity() const
// Create AnimationActivity from common XAnimate parameters:
ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
uno::Reference<animations::XAnimate> const& xAnimateNode =getXAnimateNode();
- rtl::OUString const attrName( xAnimateNode->getAttributeName() );
+ rtl::OUString const attrName( xAnimateNode->getAttributeName() );
AttributableShapeSharedPtr const pShape( getShape() );
-
+
switch (AnimationFactory::classifyAttributeName( attrName )) {
default:
case AnimationFactory::CLASS_UNKNOWN_PROPERTY:
@@ -56,58 +56,58 @@ AnimationActivitySharedPtr PropertyAnimationNode::createActivity() const
false,
"Unexpected attribute class (unknown or empty attribute name)" );
break;
-
+
case AnimationFactory::CLASS_NUMBER_PROPERTY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createNumberPropertyAnimation(
+ AnimationFactory::createNumberPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
xAnimateNode );
-
+
case AnimationFactory::CLASS_ENUM_PROPERTY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createEnumPropertyAnimation(
+ AnimationFactory::createEnumPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
xAnimateNode );
-
+
case AnimationFactory::CLASS_COLOR_PROPERTY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createColorPropertyAnimation(
+ AnimationFactory::createColorPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
xAnimateNode );
-
+
case AnimationFactory::CLASS_STRING_PROPERTY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createStringPropertyAnimation(
+ AnimationFactory::createStringPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
xAnimateNode );
-
+
case AnimationFactory::CLASS_BOOL_PROPERTY:
return ActivitiesFactory::createAnimateActivity(
aParms,
- AnimationFactory::createBoolPropertyAnimation(
+ AnimationFactory::createBoolPropertyAnimation(
attrName,
pShape,
getContext().mpSubsettableShapeManager,
getSlideSize() ),
xAnimateNode );
}
-
+
return AnimationActivitySharedPtr();
}
diff --git a/slideshow/source/engine/animationnodes/propertyanimationnode.hxx b/slideshow/source/engine/animationnodes/propertyanimationnode.hxx
index 66232ccf8063..8c542774dd9b 100644
--- a/slideshow/source/engine/animationnodes/propertyanimationnode.hxx
+++ b/slideshow/source/engine/animationnodes/propertyanimationnode.hxx
@@ -2,7 +2,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
@@ -38,16 +38,16 @@ class PropertyAnimationNode : public AnimationBaseNode
public:
PropertyAnimationNode(
::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
::boost::shared_ptr<BaseContainerNode> const& pParent,
NodeContext const& rContext )
: AnimationBaseNode( xNode, pParent, rContext ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const
{ return "PropertyAnimationNode"; }
#endif
-
+
private:
virtual AnimationActivitySharedPtr createActivity() const;
};
diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
index cf7340cd14fc..1fab09442990 100644
--- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
+++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
@@ -2,7 +2,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
@@ -55,7 +55,7 @@ void SequentialTimeContainer::activate_st()
OSL_ENSURE( false, "### resolving child failed!" );
}
}
-
+
if (isDurationIndefinite() &&
(maChildren.empty() || mnFinishedChildren >= maChildren.size()))
{
@@ -113,20 +113,20 @@ bool SequentialTimeContainer::resolveChild(
mpCurrentSkipEvent->dispose();
if (mpCurrentRewindEvent)
mpCurrentRewindEvent->dispose();
-
+
// event that will deactivate the resolved/running child:
mpCurrentSkipEvent = makeEvent(
- boost::bind( &SequentialTimeContainer::skipEffect,
+ boost::bind( &SequentialTimeContainer::skipEffect,
boost::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ),
pChildNode ),
"SequentialTimeContainer::skipEffect, resolveChild");
// event that will reresolve the resolved/activated child:
mpCurrentRewindEvent = makeEvent(
- boost::bind( &SequentialTimeContainer::rewindEffect,
+ boost::bind( &SequentialTimeContainer::rewindEffect,
boost::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ),
pChildNode ),
"SequentialTimeContainer::rewindEffect, resolveChild");
-
+
// deactivate child node when skip event occurs:
getContext().mrUserEventQueue.registerSkipEffectEvent(
mpCurrentSkipEvent,
@@ -143,13 +143,13 @@ void SequentialTimeContainer::notifyDeactivating(
{
if (notifyDeactivatedChild( rNotifier ))
return;
-
+
OSL_ASSERT( mnFinishedChildren < maChildren.size() );
AnimationNodeSharedPtr const& pNextChild = maChildren[mnFinishedChildren];
OSL_ASSERT( pNextChild->getState() == UNRESOLVED );
-
+
if (! resolveChild( pNextChild )) {
- // could not resolve child - since we risk to
+ // could not resolve child - since we risk to
// stall the chain of events here, play it safe
// and deactivate this node (only if we have
// indefinite duration - otherwise, we'll get a
diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.hxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.hxx
index 003d80333074..878b0f34f4f0 100644
--- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.hxx
+++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.hxx
@@ -2,7 +2,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
@@ -34,37 +34,37 @@ namespace slideshow {
namespace internal {
/** This class implements sequential node containers
-
+
All children of this node are played sequentially
*/
class SequentialTimeContainer : public BaseContainerNode
{
public:
SequentialTimeContainer(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode> const& xNode,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode> const& xNode,
BaseContainerNodeSharedPtr const& pParent,
NodeContext const& rContext )
: BaseContainerNode( xNode, pParent, rContext ) {}
-
+
#if defined(VERBOSE) && defined(DBG_UTIL)
virtual const char* getDescription() const
{ return "SequentialTimeContainer"; }
#endif
-
+
protected:
virtual void dispose();
-
+
private:
virtual void activate_st();
virtual void notifyDeactivating( AnimationNodeSharedPtr const& rNotifier );
-
+
void skipEffect( AnimationNodeSharedPtr const& pChildNode );
void rewindEffect( AnimationNodeSharedPtr const& pChildNode );
-
+
private:
bool resolveChild( AnimationNodeSharedPtr const& pChildNode );
-
+
EventSharedPtr mpCurrentSkipEvent;
EventSharedPtr mpCurrentRewindEvent;
};
diff --git a/slideshow/source/engine/animationnodes/setactivity.hxx b/slideshow/source/engine/animationnodes/setactivity.hxx
index 821971115ea6..76d750f2b337 100644
--- a/slideshow/source/engine/animationnodes/setactivity.hxx
+++ b/slideshow/source/engine/animationnodes/setactivity.hxx
@@ -2,7 +2,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
@@ -43,11 +43,11 @@ namespace slideshow {
namespace internal {
/** Templated setter for animation values
-
+
This template class implements the AnimationActivity
interface, but only the perform() and
setAttributeLayer() methods are functional. To be used for set animations.
-
+
@see AnimationSetNode.
*/
template <class AnimationT>
@@ -56,7 +56,7 @@ class SetActivity : public AnimationActivity
public:
typedef ::boost::shared_ptr< AnimationT > AnimationSharedPtrT;
typedef typename AnimationT::ValueType ValueT;
-
+
SetActivity( const ActivitiesFactory::CommonParameters& rParms,
const AnimationSharedPtrT& rAnimation,
const ValueT& rToValue )
@@ -70,7 +70,7 @@ public:
{
ENSURE_OR_THROW( mpAnimation, "Invalid animation" );
}
-
+
virtual void dispose()
{
mbIsActive = false;
@@ -82,19 +82,19 @@ public:
mpEndEvent->dispose();
mpEndEvent.reset();
}
-
+
virtual double calcTimeLag() const
{
return 0.0;
}
-
+
virtual bool perform()
{
if (! isActive())
return false;
// we're going inactive immediately:
mbIsActive = false;
-
+
if (mpAnimation && mpAttributeLayer && mpShape) {
mpAnimation->start( mpShape, mpAttributeLayer );
(*mpAnimation)(maToValue);
@@ -103,15 +103,15 @@ public:
// fire end event, if any
if (mpEndEvent)
mrEventQueue.addEvent( mpEndEvent );
-
+
return false; // don't reinsert
}
-
+
virtual bool isActive() const
{
return mbIsActive;
}
-
+
virtual void dequeued()
{
}
@@ -120,17 +120,17 @@ public:
{
perform();
}
-
+
virtual void setTargets( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
ENSURE_OR_THROW( rShape, "Invalid shape" );
ENSURE_OR_THROW( rAttrLayer, "Invalid attribute layer" );
-
+
mpShape = rShape;
mpAttributeLayer = rAttrLayer;
}
-
+
private:
AnimationSharedPtrT mpAnimation;
AnimatableShapeSharedPtr mpShape;
diff --git a/slideshow/source/engine/attributemap.cxx b/slideshow/source/engine/attributemap.cxx
index 32131adab310..550961233ca3 100644
--- a/slideshow/source/engine/attributemap.cxx
+++ b/slideshow/source/engine/attributemap.cxx
@@ -2,7 +2,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
@@ -106,20 +106,20 @@ namespace slideshow
false );
AttributeType eAttributeType = ATTRIBUTE_INVALID;
-
- // determine the type from the attribute name
+
+ // determine the type from the attribute name
if( !aMap.lookup( rAttrName,
eAttributeType ) )
{
OSL_TRACE( "mapAttributeName(): attribute name %s not found in map.",
- ::rtl::OUStringToOString( rAttrName,
+ ::rtl::OUStringToOString( rAttrName,
RTL_TEXTENCODING_ASCII_US ).getStr() );
return ATTRIBUTE_INVALID;
}
-
+
return eAttributeType;
}
-
+
}
}
diff --git a/slideshow/source/engine/color.cxx b/slideshow/source/engine/color.cxx
index 78ea55e16c76..f20f17f0d18d 100644
--- a/slideshow/source/engine/color.cxx
+++ b/slideshow/source/engine/color.cxx
@@ -2,7 +2,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
@@ -62,21 +62,21 @@ namespace slideshow
const double nMax( ::std::max(nRed,::std::max(nGreen, nBlue)) );
const double nMin( ::std::min(nRed,::std::min(nGreen, nBlue)) );
-
+
const double nDelta( nMax - nMin );
aRes.mnLuminance = (nMax + nMin) / 2.0;
-
+
if( ::basegfx::fTools::equalZero( nDelta ) )
{
aRes.mnSaturation = 0.0;
-
+
// hue undefined (achromatic case)
aRes.mnHue = 0.0;
}
else
{
- aRes.mnSaturation = aRes.mnLuminance > 0.5 ?
+ aRes.mnSaturation = aRes.mnLuminance > 0.5 ?
nDelta/(2.0-nMax-nMin) :
nDelta/(nMax + nMin);
@@ -111,7 +111,7 @@ namespace slideshow
return nValue2;
else if( nHue < 240.0 )
return nValue1 + (nValue2 - nValue1)*(240.0 - nHue)/60.0;
- else
+ else
return nValue1;
}
@@ -126,9 +126,9 @@ namespace slideshow
RGBColor::RGBTriple aRes;
aRes.mnRed = hsl2rgbHelper( nVal2,
- nVal1,
+ nVal1,
nHue + 120.0 );
- aRes.mnGreen = hsl2rgbHelper( nVal2,
+ aRes.mnGreen = hsl2rgbHelper( nVal2,
nVal1,
nHue );
aRes.mnBlue = hsl2rgbHelper( nVal2,
@@ -141,23 +141,23 @@ namespace slideshow
/// Truncate range of value to [0,1]
double truncateRangeStd( double nVal )
{
- return ::std::max( 0.0,
- ::std::min( 1.0,
+ return ::std::max( 0.0,
+ ::std::min( 1.0,
nVal ) );
}
/// Truncate range of value to [0,360]
double truncateRangeHue( double nVal )
{
- return ::std::max( 0.0,
- ::std::min( 360.0,
+ return ::std::max( 0.0,
+ ::std::min( 360.0,
nVal ) );
}
/// convert RGB color to sal_uInt8, truncate range appropriately before
sal_uInt8 colorToInt( double nCol )
{
- return static_cast< sal_uInt8 >(
+ return static_cast< sal_uInt8 >(
::basegfx::fround( truncateRangeStd( nCol ) * 255.0 ) );
}
}
@@ -180,7 +180,7 @@ namespace slideshow
mnLuminance( nLuminance )
{
}
-
+
HSLColor::HSLColor() :
maHSLTriple( 0.0, 0.0, 0.0 ),
mnMagicValue( getMagic( maHSLTriple.mnLuminance,
@@ -203,16 +203,16 @@ namespace slideshow
maHSLTriple.mnSaturation ) )
{
}
-
+
HSLColor::HSLColor( const RGBColor& rColor ) :
- maHSLTriple( rgb2hsl( truncateRangeStd( rColor.getRed() ),
+ maHSLTriple( rgb2hsl( truncateRangeStd( rColor.getRed() ),
truncateRangeStd( rColor.getGreen() ),
truncateRangeStd( rColor.getBlue() ) ) ),
mnMagicValue( getMagic( maHSLTriple.mnLuminance,
maHSLTriple.mnSaturation ) )
{
}
-
+
double HSLColor::getHue() const
{
return maHSLTriple.mnHue;
@@ -233,8 +233,8 @@ namespace slideshow
if( ::basegfx::fTools::equalZero( getSaturation() ) )
return getLuminance();
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
+ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
+ mnMagicValue,
getHue() + 120.0 );
}
@@ -243,8 +243,8 @@ namespace slideshow
if( ::basegfx::fTools::equalZero( getSaturation() ) )
return getLuminance();
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
+ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
+ mnMagicValue,
getHue() );
}
@@ -253,8 +253,8 @@ namespace slideshow
if( ::basegfx::fTools::equalZero( getSaturation() ) )
return getLuminance();
- return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
- mnMagicValue,
+ return hsl2rgbHelper( 2.0*getLuminance() - mnMagicValue,
+ mnMagicValue,
getHue() - 120.0 );
}
@@ -265,7 +265,7 @@ namespace slideshow
getLuminance() ) );
return RGBColor( aColor.mnRed, aColor.mnGreen, aColor.mnBlue );
}
-
+
RGBColor::RGBColor(const RGBColor& rLHS)
: maRGBTriple( rLHS.maRGBTriple )
{
@@ -277,7 +277,7 @@ namespace slideshow
maRGBTriple.mnGreen = rLHS.getGreen();
maRGBTriple.mnBlue = rLHS.getBlue();
return *this;
- }
+ }
HSLColor operator+( const HSLColor& rLHS, const HSLColor& rRHS )
{
@@ -303,7 +303,7 @@ namespace slideshow
HSLColor interpolate( const HSLColor& rFrom, const HSLColor& rTo, double t, bool bCCW )
{
const double nFromHue( rFrom.getHue() );
- const double nToHue ( rTo.getHue() );
+ const double nToHue ( rTo.getHue() );
double nHue=0.0;
@@ -341,7 +341,7 @@ namespace slideshow
(1.0-t)*rFrom.getLuminance() + t*rTo.getLuminance() );
}
-
+
// RGBColor
// ===============================================
@@ -353,14 +353,14 @@ namespace slideshow
mnBlue()
{
}
-
+
RGBColor::RGBTriple::RGBTriple( double nRed, double nGreen, double nBlue ) :
mnRed( nRed ),
mnGreen( nGreen ),
mnBlue( nBlue )
{
}
-
+
RGBColor::RGBColor() :
maRGBTriple( 0.0, 0.0, 0.0 )
{
@@ -377,14 +377,14 @@ namespace slideshow
maRGBTriple( nRed, nGreen, nBlue )
{
}
-
+
RGBColor::RGBColor( const HSLColor& rColor ) :
- maRGBTriple( hsl2rgb( truncateRangeHue( rColor.getHue() ),
+ maRGBTriple( hsl2rgb( truncateRangeHue( rColor.getHue() ),
truncateRangeStd( rColor.getSaturation() ),
truncateRangeStd( rColor.getLuminance() ) ) )
{
}
-
+
double RGBColor::getHue() const
{
return rgb2hsl( getRed(),
@@ -427,7 +427,7 @@ namespace slideshow
getGreen(),
getBlue() ) );
return HSLColor( aColor.mnHue, aColor.mnSaturation, aColor.mnLuminance );
- }
+ }
::cppcanvas::Color::IntSRGBA RGBColor::getIntegerColor() const
{
@@ -436,7 +436,7 @@ namespace slideshow
colorToInt( getBlue() ),
255 );
}
-
+
RGBColor operator+( const RGBColor& rLHS, const RGBColor& rRHS )
{
return RGBColor( rLHS.getRed() + rRHS.getRed(),
@@ -460,7 +460,7 @@ namespace slideshow
RGBColor interpolate( const RGBColor& rFrom, const RGBColor& rTo, double t )
{
- return RGBColor( (1.0-t)*rFrom.getRed() + t*rTo.getRed(),
+ return RGBColor( (1.0-t)*rFrom.getRed() + t*rTo.getRed(),
(1.0-t)*rFrom.getGreen() + t*rTo.getGreen(),
(1.0-t)*rFrom.getBlue() + t*rTo.getBlue() );
}
diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx
index 4bf3e86b5191..1e5b312db489 100644
--- a/slideshow/source/engine/debug.cxx
+++ b/slideshow/source/engine/debug.cxx
@@ -2,7 +2,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
@@ -66,7 +66,7 @@ public:
-
+
OUString DebugGetDescription (const AnimationNodeSharedPtr& rpNode)
{
if (::boost::dynamic_pointer_cast<BaseContainerNode>(rpNode))
@@ -137,7 +137,7 @@ void DebugShowState (const AnimationNodeSharedPtr& rpNode)
sStateColor = OUString::createFromAscii("slategray3");
break;
}
-
+
const uno::Any aBegin (rpNode->getXAnimationNode()->getBegin());
OUString sTrigger;
if (aBegin.hasValue())
@@ -217,7 +217,7 @@ AnimationNodeSharedPtr DebugGetTreeRoot (const BaseNodeSharedPtr& rpNode)
void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode)
{
DebugTraceScope aTraceScope ("NodeTree");
-
+
DebugShowState(DebugGetTreeRoot(::boost::dynamic_pointer_cast<BaseNode>(rpNode)));
}
@@ -239,7 +239,7 @@ extern "C" {
maTime()
{
}
-
+
int mnIndentation;
FILE* mpFile;
::canvas::tools::ElapsedTime maTime;
@@ -272,7 +272,7 @@ extern "C" {
} // end of anonymous namespace
-
+
} // end of extern "C"
void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...)
@@ -282,7 +282,7 @@ void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...)
DebugTrace(+1,sFormat, args);
va_end(args);
}
-
+
void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...)
{
va_list args;
@@ -306,7 +306,7 @@ DebugTraceScope::DebugTraceScope (const sal_Char* sFormat, ...)
{
va_list args;
va_start(args, sFormat);
-
+
msMessage[mnBufferSize-1] = 0;
snprintf(msMessage, mnBufferSize-1, sFormat, args);
TRACE_BEGIN("[ %s", msMessage);
diff --git a/slideshow/source/engine/delayevent.cxx b/slideshow/source/engine/delayevent.cxx
index 3554d1cd8d6f..5c0defb79574 100644
--- a/slideshow/source/engine/delayevent.cxx
+++ b/slideshow/source/engine/delayevent.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index 9d58ab9f19fd..a6d5c5120d51 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -2,7 +2,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
@@ -111,17 +111,17 @@ void EffectRewinder::initialize (void)
// main sequence effect and if so, increase the respective counter),
// b,c) a slide was started or ended (in which case the effect counter
// is reset.
-
+
mpAnimationStartHandler.reset(
new RewinderAnimationEventHandler(
::boost::bind(&EffectRewinder::notifyAnimationStart, this, _1)));
mrEventMultiplexer.addAnimationStartHandler(mpAnimationStartHandler);
-
+
mpSlideStartHandler.reset(
new RewinderEventHandler(
::boost::bind(&EffectRewinder::resetEffectCount, this)));
mrEventMultiplexer.addSlideStartHandler(mpSlideStartHandler);
-
+
mpSlideEndHandler.reset(
new RewinderEventHandler(
::boost::bind(&EffectRewinder::resetEffectCount, this)));
@@ -146,7 +146,7 @@ void EffectRewinder::dispose (void)
mpAsynchronousRewindEvent->dispose();
mpAsynchronousRewindEvent.reset();
}
-
+
if (mpAnimationStartHandler)
{
mrEventMultiplexer.removeAnimationStartHandler(mpAnimationStartHandler);
@@ -195,7 +195,7 @@ bool EffectRewinder::rewind (
// Abort (and skip over the rest of) any currently active animation.
mrUserEventQueue.callSkipEffectEventHandler();
mrEventQueue.forceEmpty();
-
+
const int nSkipCount (mnMainSequenceEffectCount - 1);
if (nSkipCount < 0)
{
@@ -299,7 +299,7 @@ sal_Int32 EffectRewinder::countMainSequenceEffects (void)
}
return nMainSequenceNodeCount;
-
+
// // Skip all main sequence nodes.
// SkipSomeMainSequenceEffects(nMainSequenceNodeCount);
}
@@ -353,7 +353,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode)
// This notification is only relevant for us when the effect is user
// triggered.
bool bIsUserTriggered (false);
-
+
Reference<animations::XAnimationNode> xNode (rpNode->getXAnimationNode());
if (xNode.is())
{
diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx
index 85b81722f5ef..d61b559c6a9f 100644
--- a/slideshow/source/engine/effectrewinder.hxx
+++ b/slideshow/source/engine/effectrewinder.hxx
@@ -2,7 +2,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
@@ -68,7 +68,7 @@ public:
/** Call Dispose() before the ownder of an EffectRewinder object dies so
that the EffectRewinder can release all references to the owner.
-
+
*/
void dispose (void);
@@ -113,7 +113,7 @@ private:
EventMultiplexer& mrEventMultiplexer;
EventQueue& mrEventQueue;
UserEventQueue& mrUserEventQueue;
-
+
EventHandlerSharedPtr mpSlideStartHandler;
EventHandlerSharedPtr mpSlideEndHandler;
AnimationEventHandlerSharedPtr mpAnimationStartHandler;
@@ -127,12 +127,12 @@ private:
nested rewinds.
*/
EventSharedPtr mpAsynchronousRewindEvent;
-
+
css::uno::Reference<css::animations::XAnimationNode> mxCurrentAnimationRootNode;
::boost::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock;
bool mbNonUserTriggeredMainSequenceEffectSeen;
-
+
void initialize (void);
bool resetEffectCount (void);
@@ -149,7 +149,7 @@ private:
/** Skip the next main sequence effect.
*/
void skipSingleMainSequenceEffects (void);
-
+
/** Skip the specified number of main sequence effects.
*/
void skipSomeMainSequenceEffects (const sal_Int32 nSkipCount);
diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx
index 4013ab966d70..4f5ecd4f8a03 100644
--- a/slideshow/source/engine/eventmultiplexer.cxx
+++ b/slideshow/source/engine/eventmultiplexer.cxx
@@ -2,7 +2,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
@@ -86,26 +86,26 @@ class PrioritizedHandlerEntry
typedef boost::shared_ptr<HandlerT> HandlerSharedPtrT;
HandlerSharedPtrT mpHandler;
double mnPrio;
-
+
public:
- PrioritizedHandlerEntry( HandlerSharedPtrT const& pHandler,
+ PrioritizedHandlerEntry( HandlerSharedPtrT const& pHandler,
double nPrio ) :
- mpHandler(pHandler),
- mnPrio(nPrio)
+ mpHandler(pHandler),
+ mnPrio(nPrio)
{}
-
+
HandlerSharedPtrT const& getHandler() const { return mpHandler; }
-
+
/// To sort according to priority
- bool operator<( PrioritizedHandlerEntry const& rRHS ) const
+ bool operator<( PrioritizedHandlerEntry const& rRHS ) const
{
// reversed order - high prioritized entries
// should be at the beginning of the queue
return mnPrio > rRHS.mnPrio;
}
-
+
/// To permit std::remove in removeHandler template
- bool operator==( PrioritizedHandlerEntry const& rRHS ) const
+ bool operator==( PrioritizedHandlerEntry const& rRHS ) const
{
// ignore prio, for removal, only the handler ptr matters
return mpHandler == rRHS.mpHandler;
@@ -132,13 +132,13 @@ typedef cppu::WeakComponentImplHelper2<
XSlideViews, and passes on the events to the EventMultiplexer (via
EventQueue indirection, to force the events into the main thread)
*/
-class EventMultiplexerListener : private cppu::BaseMutex,
+class EventMultiplexerListener : private cppu::BaseMutex,
public Listener_UnoBase,
private ::boost::noncopyable
{
public:
EventMultiplexerListener( EventQueue& rEventQueue,
- EventMultiplexerImpl& rEventMultiplexer ) :
+ EventMultiplexerImpl& rEventMultiplexer ) :
Listener_UnoBase( m_aMutex ),
mpEventQueue( &rEventQueue ),
mpEventMultiplexer( &rEventMultiplexer )
@@ -147,7 +147,7 @@ public:
// WeakComponentImplHelperBase::disposing
virtual void SAL_CALL disposing();
-
+
private:
virtual void SAL_CALL disposing( const lang::EventObject& Source )
throw (uno::RuntimeException);
@@ -161,13 +161,13 @@ private:
throw (uno::RuntimeException);
virtual void SAL_CALL mouseExited( const awt::MouseEvent& e )
throw (uno::RuntimeException);
-
+
// XMouseMotionListener implementation
virtual void SAL_CALL mouseDragged( const awt::MouseEvent& e )
throw (uno::RuntimeException);
virtual void SAL_CALL mouseMoved( const awt::MouseEvent& e )
throw (uno::RuntimeException);
-
+
EventQueue* mpEventQueue;
EventMultiplexerImpl* mpEventMultiplexer;
@@ -225,7 +225,7 @@ struct EventMultiplexerImpl
void mouseMoved( const awt::MouseEvent& e );
bool isMouseListenerRegistered() const;
-
+
typedef ThreadUnsafeListenerContainer<
PrioritizedHandlerEntry<EventHandler>,
std::vector<
@@ -261,14 +261,14 @@ struct EventMultiplexerImpl
typedef ThreadUnsafeListenerContainer<
PrioritizedHandlerEntry<HyperlinkHandler>,
std::vector<PrioritizedHandlerEntry<HyperlinkHandler> > > ImplHyperLinkHandlers;
-
+
template <typename XSlideShowViewFunc>
void forEachView( XSlideShowViewFunc pViewMethod );
-
+
UnoViewSharedPtr findUnoView(const uno::Reference<
presentation::XSlideShowView>& xView) const;
- template< typename RegisterFunction >
+ template< typename RegisterFunction >
void addMouseHandler( ImplMouseHandlers& rHandlerContainer,
const MouseEventHandlerSharedPtr& rHandler,
double nPriority,
@@ -276,30 +276,30 @@ struct EventMultiplexerImpl
bool notifyAllAnimationHandlers( ImplAnimationHandlers const& rContainer,
AnimationNodeSharedPtr const& rNode );
-
+
bool notifyMouseHandlers(
const ImplMouseHandlers& rQueue,
bool (MouseEventHandler::*pHandlerMethod)(
const awt::MouseEvent& ),
const awt::MouseEvent& e );
-
+
bool notifyNextEffect();
-
- /// Called for automatic nextEffect
+
+ /// Called for automatic nextEffect
void tick();
-
+
/// Schedules a tick event
void scheduleTick();
-
+
/// Schedules tick events, if mbIsAutoMode is true
void handleTicks();
-
+
EventQueue& mrEventQueue;
UnoViewContainer const& mrViewContainer;
::rtl::Reference<
EventMultiplexerListener> mxListener;
-
+
ImplNextEffectHandlers maNextEffectHandlers;
ImplEventHandlers maSlideStartHandlers;
ImplEventHandlers maSlideEndHandlers;
@@ -321,9 +321,9 @@ struct EventMultiplexerImpl
/// automatic next effect mode timeout
double mnTimeout;
-
+
/** Holds ptr to optional tick event weakly
-
+
When event queue is cleansed, the next
setAutomaticMode(true) call is then able to
regenerate the event.
@@ -359,13 +359,13 @@ void SAL_CALL EventMultiplexerListener::mousePressed(
const awt::MouseEvent& e ) throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
-
+
// notify mouse press. Don't call handlers directly, this
// might not be the main thread!
if( mpEventQueue )
mpEventQueue->addEvent(
makeEvent( boost::bind( &EventMultiplexerImpl::mousePressed,
- mpEventMultiplexer,
+ mpEventMultiplexer,
e ),
"EventMultiplexerImpl::mousePressed") );
}
@@ -380,7 +380,7 @@ void SAL_CALL EventMultiplexerListener::mouseReleased(
if( mpEventQueue )
mpEventQueue->addEvent(
makeEvent( boost::bind( &EventMultiplexerImpl::mouseReleased,
- mpEventMultiplexer,
+ mpEventMultiplexer,
e ),
"EventMultiplexerImpl::mouseReleased") );
}
@@ -402,13 +402,13 @@ void SAL_CALL EventMultiplexerListener::mouseDragged(
const awt::MouseEvent& e ) throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
-
+
// notify mouse drag. Don't call handlers directly, this
// might not be the main thread!
if( mpEventQueue )
mpEventQueue->addEvent(
makeEvent( boost::bind( &EventMultiplexerImpl::mouseDragged,
- mpEventMultiplexer,
+ mpEventMultiplexer,
e ),
"EventMultiplexerImpl::mouseDragged") );
}
@@ -423,7 +423,7 @@ void SAL_CALL EventMultiplexerListener::mouseMoved(
if( mpEventQueue )
mpEventQueue->addEvent(
makeEvent( boost::bind( &EventMultiplexerImpl::mouseMoved,
- mpEventMultiplexer,
+ mpEventMultiplexer,
e ),
"EventMultiplexerImpl::mouseMoved") );
}
@@ -433,7 +433,7 @@ void SAL_CALL EventMultiplexerListener::mouseMoved(
bool EventMultiplexerImpl::notifyAllAnimationHandlers( ImplAnimationHandlers const& rContainer,
- AnimationNodeSharedPtr const& rNode )
+ AnimationNodeSharedPtr const& rNode )
{
return rContainer.applyAll(
boost::bind( &AnimationEventHandler::handleAnimationEvent,
@@ -447,7 +447,7 @@ void EventMultiplexerImpl::forEachView( XSlideShowViewFunc pViewMethod )
{
// (un)register mouse listener on all views
for( UnoViewVector::const_iterator aIter( mrViewContainer.begin() ),
- aEnd( mrViewContainer.end() ); aIter != aEnd; ++aIter )
+ aEnd( mrViewContainer.end() ); aIter != aEnd; ++aIter )
{
uno::Reference<presentation::XSlideShowView> xView ((*aIter)->getUnoView());
if (xView.is())
@@ -470,7 +470,7 @@ UnoViewSharedPtr EventMultiplexerImpl::findUnoView(
const UnoViewVector::const_iterator aEnd ( mrViewContainer.end() );
if( (aIter=std::find_if( mrViewContainer.begin(),
aEnd,
- boost::bind(
+ boost::bind(
std::equal_to<uno::Reference<presentation::XSlideShowView> >(),
boost::cref( xView ),
boost::bind( &UnoView::getUnoView, _1 )))) == aEnd )
@@ -482,7 +482,7 @@ UnoViewSharedPtr EventMultiplexerImpl::findUnoView(
return *aIter;
}
-template< typename RegisterFunction >
+template< typename RegisterFunction >
void EventMultiplexerImpl::addMouseHandler(
ImplMouseHandlers& rHandlerContainer,
const MouseEventHandlerSharedPtr& rHandler,
@@ -492,13 +492,13 @@ void EventMultiplexerImpl::addMouseHandler(
ENSURE_OR_THROW(
rHandler,
"EventMultiplexer::addMouseHandler(): Invalid handler" );
-
+
// register mouse listener on all views
forEachView( pRegisterListener );
-
+
// add into sorted container:
- rHandlerContainer.addSorted(
- typename ImplMouseHandlers::container_type::value_type(
+ rHandlerContainer.addSorted(
+ typename ImplMouseHandlers::container_type::value_type(
rHandler,
nPriority ));
}
@@ -513,9 +513,9 @@ void EventMultiplexerImpl::tick()
{
if( !mbIsAutoMode )
return; // this event is just a left-over, ignore
-
+
notifyNextEffect();
-
+
if( !maNextEffectHandlers.isEmpty() )
{
// still handlers left, schedule next timeout
@@ -527,7 +527,7 @@ void EventMultiplexerImpl::tick()
void EventMultiplexerImpl::scheduleTick()
{
EventSharedPtr pEvent(
- makeDelay( boost::bind( &EventMultiplexerImpl::tick,
+ makeDelay( boost::bind( &EventMultiplexerImpl::tick,
this ),
mnTimeout,
"EventMultiplexerImpl::tick with delay"));
@@ -541,7 +541,7 @@ void EventMultiplexerImpl::scheduleTick()
// which will eventually call our tick() method
mrEventQueue.addEventForNextRound( pEvent );
}
-
+
void EventMultiplexerImpl::handleTicks()
{
if( !mbIsAutoMode )
@@ -552,7 +552,7 @@ void EventMultiplexerImpl::handleTicks()
return; // nothing to do, there's already a tick
// pending
- // schedule initial tick (which reschedules itself
+ // schedule initial tick (which reschedules itself
// after that, all by itself)
scheduleTick();
}
@@ -563,7 +563,7 @@ void EventMultiplexerImpl::clear()
// deregister from all views.
if( isMouseListenerRegistered() )
{
- for( UnoViewVector::const_iterator aIter=mrViewContainer.begin(),
+ for( UnoViewVector::const_iterator aIter=mrViewContainer.begin(),
aEnd=mrViewContainer.end();
aIter!=aEnd;
++aIter )
@@ -575,7 +575,7 @@ void EventMultiplexerImpl::clear()
if( !maMouseMoveHandlers.isEmpty() )
{
- for( UnoViewVector::const_iterator aIter=mrViewContainer.begin(),
+ for( UnoViewVector::const_iterator aIter=mrViewContainer.begin(),
aEnd=mrViewContainer.end();
aIter!=aEnd;
++aIter )
@@ -612,7 +612,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers(
{
uno::Reference<presentation::XSlideShowView> xView(
e.Source, uno::UNO_QUERY );
-
+
ENSURE_OR_RETURN_FALSE( xView.is(), "EventMultiplexer::notifyHandlers(): "
"event source is not an XSlideShowView" );
@@ -622,7 +622,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers(
const UnoViewVector::const_iterator aBegin( mrViewContainer.begin() );
const UnoViewVector::const_iterator aEnd ( mrViewContainer.end() );
if( (aIter=::std::find_if(
- aBegin, aEnd,
+ aBegin, aEnd,
boost::bind( std::equal_to< uno::Reference<
presentation::XSlideShowView > >(),
boost::cref( xView ),
@@ -651,8 +651,8 @@ bool EventMultiplexerImpl::notifyMouseHandlers(
return rQueue.apply(
boost::bind(
pHandlerMethod,
- boost::bind(
- &ImplMouseHandlers::container_type::value_type::getHandler,
+ boost::bind(
+ &ImplMouseHandlers::container_type::value_type::getHandler,
_1 ),
aEvent ));
}
@@ -670,7 +670,7 @@ void EventMultiplexerImpl::mousePressed( const awt::MouseEvent& e )
}
// fire single-click events for all remaining clicks
- while( nCurrClickCount > 0 &&
+ while( nCurrClickCount > 0 &&
notifyMouseHandlers( maMouseClickHandlers,
&MouseEventHandler::handleMousePressed,
e ))
@@ -692,7 +692,7 @@ void EventMultiplexerImpl::mouseReleased( const awt::MouseEvent& e )
}
// fire single-click events for all remaining clicks
- while( nCurrClickCount > 0 &&
+ while( nCurrClickCount > 0 &&
notifyMouseHandlers( maMouseClickHandlers,
&MouseEventHandler::handleMouseReleased,
e ))
@@ -703,15 +703,15 @@ void EventMultiplexerImpl::mouseReleased( const awt::MouseEvent& e )
void EventMultiplexerImpl::mouseDragged( const awt::MouseEvent& e )
{
- notifyMouseHandlers( maMouseMoveHandlers,
- &MouseEventHandler::handleMouseDragged,
+ notifyMouseHandlers( maMouseMoveHandlers,
+ &MouseEventHandler::handleMouseDragged,
e );
}
void EventMultiplexerImpl::mouseMoved( const awt::MouseEvent& e )
{
notifyMouseHandlers( maMouseMoveHandlers,
- &MouseEventHandler::handleMouseMoved,
+ &MouseEventHandler::handleMouseMoved,
e );
}
@@ -723,7 +723,7 @@ bool EventMultiplexerImpl::notifyNextEffect()
return maNextEffectHandlers.apply(
boost::bind(
&EventHandler::handleEvent,
- boost::bind(
+ boost::bind(
&ImplNextEffectHandlers::container_type::value_type::getHandler,
_1 )) );
}
@@ -784,7 +784,7 @@ void EventMultiplexer::addNextEffectHandler(
// Enable tick events, if not done already
mpImpl->handleTicks();
}
-
+
void EventMultiplexer::removeNextEffectHandler(
const EventHandlerSharedPtr& rHandler )
{
@@ -957,7 +957,7 @@ void EventMultiplexer::addClickHandler(
void EventMultiplexer::removeClickHandler(
const MouseEventHandlerSharedPtr& rHandler )
{
- mpImpl->maMouseClickHandlers.remove(
+ mpImpl->maMouseClickHandlers.remove(
EventMultiplexerImpl::ImplMouseHandlers::container_type::value_type(
rHandler,
0.0) );
@@ -982,7 +982,7 @@ void EventMultiplexer::addDoubleClickHandler(
void EventMultiplexer::removeDoubleClickHandler(
const MouseEventHandlerSharedPtr& rHandler )
{
- mpImpl->maMouseDoubleClickHandlers.remove(
+ mpImpl->maMouseDoubleClickHandlers.remove(
EventMultiplexerImpl::ImplMouseHandlers::container_type::value_type(
rHandler,
0.0) );
@@ -1007,7 +1007,7 @@ void EventMultiplexer::addMouseMoveHandler(
void EventMultiplexer::removeMouseMoveHandler(
const MouseEventHandlerSharedPtr& rHandler )
{
- mpImpl->maMouseMoveHandlers.remove(
+ mpImpl->maMouseMoveHandlers.remove(
EventMultiplexerImpl::ImplMouseHandlers::container_type::value_type(
rHandler,
0.0) );
@@ -1017,7 +1017,7 @@ void EventMultiplexer::removeMouseMoveHandler(
&presentation::XSlideShowView::removeMouseMotionListener );
}
-void EventMultiplexer::addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler,
+void EventMultiplexer::addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler,
double nPriority )
{
mpImpl->maHyperlinkHandlers.addSorted(
@@ -1028,13 +1028,13 @@ void EventMultiplexer::addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHa
void EventMultiplexer::removeHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler )
{
- mpImpl->maHyperlinkHandlers.remove(
+ mpImpl->maHyperlinkHandlers.remove(
EventMultiplexerImpl::ImplHyperLinkHandlers::container_type::value_type(
rHandler,
0.0) );
}
-bool EventMultiplexer::notifyShapeListenerAdded(
+bool EventMultiplexer::notifyShapeListenerAdded(
const uno::Reference<presentation::XShapeEventListener>& xListener,
const uno::Reference<drawing::XShape>& xShape )
{
@@ -1045,7 +1045,7 @@ bool EventMultiplexer::notifyShapeListenerAdded(
boost::cref(xShape)) );
}
-bool EventMultiplexer::notifyShapeListenerRemoved(
+bool EventMultiplexer::notifyShapeListenerRemoved(
const uno::Reference<presentation::XShapeEventListener>& xListener,
const uno::Reference<drawing::XShape>& xShape )
{
@@ -1056,8 +1056,8 @@ bool EventMultiplexer::notifyShapeListenerRemoved(
boost::cref(xShape)) );
}
-bool EventMultiplexer::notifyShapeCursorChange(
- const uno::Reference<drawing::XShape>& xShape,
+bool EventMultiplexer::notifyShapeCursorChange(
+ const uno::Reference<drawing::XShape>& xShape,
sal_Int16 nPointerShape )
{
return mpImpl->maShapeCursorHandlers.applyAll(
@@ -1108,7 +1108,7 @@ bool EventMultiplexer::notifyEraseAllInk( bool const& rEraseAllInk )
boost::cref(rEraseAllInk)));
}
-//adding erasing features with UserPaintOverlay
+//adding erasing features with UserPaintOverlay
bool EventMultiplexer::notifyEraseInkWidth( sal_Int32 rEraseInkSize )
{
return mpImpl->maUserPaintEventHandlers.applyAll(
@@ -1116,7 +1116,7 @@ bool EventMultiplexer::notifyEraseInkWidth( sal_Int32 rEraseInkSize )
_1,
boost::cref(rEraseInkSize)));
}
-
+
bool EventMultiplexer::notifyNextEffect()
{
return mpImpl->notifyNextEffect();
@@ -1137,14 +1137,14 @@ bool EventMultiplexer::notifySlideEndEvent()
bool EventMultiplexer::notifyAnimationStart(
const AnimationNodeSharedPtr& rNode )
{
- return mpImpl->notifyAllAnimationHandlers( mpImpl->maAnimationStartHandlers,
+ return mpImpl->notifyAllAnimationHandlers( mpImpl->maAnimationStartHandlers,
rNode );
}
bool EventMultiplexer::notifyAnimationEnd(
const AnimationNodeSharedPtr& rNode )
{
- return mpImpl->notifyAllAnimationHandlers( mpImpl->maAnimationEndHandlers,
+ return mpImpl->notifyAllAnimationHandlers( mpImpl->maAnimationEndHandlers,
rNode );
}
@@ -1157,16 +1157,16 @@ bool EventMultiplexer::notifySlideAnimationsEnd()
bool EventMultiplexer::notifyAudioStopped(
const AnimationNodeSharedPtr& rNode )
{
- return mpImpl->notifyAllAnimationHandlers(
- mpImpl->maAudioStoppedHandlers,
+ return mpImpl->notifyAllAnimationHandlers(
+ mpImpl->maAudioStoppedHandlers,
rNode );
}
bool EventMultiplexer::notifyCommandStopAudio(
const AnimationNodeSharedPtr& rNode )
{
- return mpImpl->notifyAllAnimationHandlers(
- mpImpl->maCommandStopAudioHandlers,
+ return mpImpl->notifyAllAnimationHandlers(
+ mpImpl->maCommandStopAudioHandlers,
rNode );
}
@@ -1186,11 +1186,11 @@ bool EventMultiplexer::notifyViewAdded( const UnoViewSharedPtr& rView )
rView->getUnoView() );
if( mpImpl->isMouseListenerRegistered() )
- rUnoView->addMouseListener(
+ rUnoView->addMouseListener(
mpImpl->mxListener.get() );
if( !mpImpl->maMouseMoveHandlers.isEmpty() )
- rUnoView->addMouseMotionListener(
+ rUnoView->addMouseMotionListener(
mpImpl->mxListener.get() );
return mpImpl->maViewHandlers.applyAll(
@@ -1203,17 +1203,17 @@ bool EventMultiplexer::notifyViewRemoved( const UnoViewSharedPtr& rView )
{
ENSURE_OR_THROW( rView,
"EventMultiplexer::removeView(): Invalid view" );
-
- // revoke event listeners
+
+ // revoke event listeners
uno::Reference<presentation::XSlideShowView> const rUnoView(
rView->getUnoView() );
if( mpImpl->isMouseListenerRegistered() )
- rUnoView->removeMouseListener(
+ rUnoView->removeMouseListener(
mpImpl->mxListener.get() );
if( !mpImpl->maMouseMoveHandlers.isEmpty() )
- rUnoView->removeMouseMotionListener(
+ rUnoView->removeMouseMotionListener(
mpImpl->mxListener.get() );
return mpImpl->maViewHandlers.applyAll(
@@ -1246,7 +1246,7 @@ bool EventMultiplexer::notifyViewsChanged()
boost::mem_fn( &ViewEventHandler::viewsChanged ));
}
-bool EventMultiplexer::notifyViewClobbered(
+bool EventMultiplexer::notifyViewClobbered(
const uno::Reference<presentation::XSlideShowView>& xView )
{
UnoViewSharedPtr pView( mpImpl->findUnoView(xView) );
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index 1c72af8c1628..2e8cd72eaf3a 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -2,7 +2,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
@@ -75,20 +75,20 @@ namespace slideshow
// add in all that have been added explicitly for this round:
EventEntryVector::const_iterator const iEnd( maNextEvents.end() );
for ( EventEntryVector::const_iterator iPos( maNextEvents.begin() );
- iPos != iEnd; ++iPos )
+ iPos != iEnd; ++iPos )
{
maEvents.push(*iPos);
}
EventEntryVector().swap( maNextEvents );
-
+
// dispose event queue
while( !maEvents.empty() )
{
- try
+ try
{
maEvents.top().pEvent->dispose();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -109,12 +109,12 @@ namespace slideshow
OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(),
rEvent.get(),
rEvent->getActivationTime(0.0));
-#endif
+#endif
ENSURE_OR_RETURN_FALSE( rEvent,
"EventQueue::addEvent: event ptr NULL" );
// prepare entry
-
+
// A seemingly obvious optimization cannot be used here,
// because it breaks assumed order of notification: zero
// timeout events could be fired() immediately, but that
@@ -126,20 +126,20 @@ namespace slideshow
mpTimer->getElapsedTime()) ) );
return true;
}
-
+
bool EventQueue::addEventForNextRound( EventSharedPtr const& rEvent )
{
::osl::MutexGuard aGuard( maMutex );
-
+
#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS)
OSL_TRACE("adding at %f event [%s] at %x for next round with delay %f\r",
mpTimer->getElapsedTime(),
OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(),
rEvent.get(),
rEvent->getActivationTime(0.0));
-#endif
+#endif
- ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL,
+ ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL,
"EventQueue::addEvent: event ptr NULL" );
maNextEvents.push_back(
EventEntry( rEvent, rEvent->getActivationTime(
@@ -157,10 +157,10 @@ namespace slideshow
OUStringToOString(rpEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(),
rpEvent.get(),
rpEvent->getActivationTime(0.0));
-#endif
+#endif
ENSURE_OR_RETURN_FALSE(
- rpEvent.get() != NULL,
+ rpEvent.get() != NULL,
"EventQueue::addEvent: event ptr NULL");
maNextNextEvents.push(
@@ -170,7 +170,7 @@ namespace slideshow
return true;
}
-
+
void EventQueue::forceEmpty()
{
::osl::MutexGuard aGuard( maMutex );
@@ -184,7 +184,7 @@ namespace slideshow
process_(false);
}
-
+
void EventQueue::process_( bool bFireAllEvents )
{
VERBOSE_TRACE( "EventQueue: heartbeat" );
@@ -196,7 +196,7 @@ namespace slideshow
maEvents.push(*iPos);
}
EventEntryVector().swap( maNextEvents );
-
+
// perform topmost, ready-to-execute event
// =======================================
@@ -235,7 +235,7 @@ namespace slideshow
try
{
#if OSL_DEBUG_LEVEL > 0
- VERBOSE_TRACE( "Firing event: unknown (0x%X), timeout was: %f",
+ VERBOSE_TRACE( "Firing event: unknown (0x%X), timeout was: %f",
event.pEvent.get(),
event.pEvent->getActivationTime(0.0) );
#endif
@@ -261,7 +261,7 @@ namespace slideshow
// circumstance. Although, do _not_
// reinsert an activity that threw
// once.
-
+
// NOTE: we explicitely don't catch(...) here,
// since this will also capture segmentation
// violations and the like. In such a case, we
@@ -269,7 +269,7 @@ namespace slideshow
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch( SlideShowException& )
{
@@ -278,7 +278,7 @@ namespace slideshow
// circumstance. Although, do _not_
// reinsert an activity that threw
// once.
-
+
// NOTE: we explicitely don't catch(...) here,
// since this will also capture segmentation
// violations and the like. In such a case, we
@@ -289,14 +289,14 @@ namespace slideshow
else
{
#if OSL_DEBUG_LEVEL > 0
- VERBOSE_TRACE( "Ignoring discharged event: unknown (0x%X), timeout was: %f",
+ VERBOSE_TRACE( "Ignoring discharged event: unknown (0x%X), timeout was: %f",
event.pEvent.get(),
event.pEvent->getActivationTime(0.0) );
#endif
}
}
}
-
+
bool EventQueue::isEmpty() const
{
::osl::MutexGuard aGuard( maMutex );
@@ -317,7 +317,7 @@ namespace slideshow
nTimeout = ::std::min(nTimeout, maNextEvents.front().nTime - nCurrentTime);
if ( ! maNextNextEvents.empty())
nTimeout = ::std::min(nTimeout, maNextNextEvents.top().nTime - nCurrentTime);
-
+
return nTimeout;
}
diff --git a/slideshow/source/engine/expressionnodefactory.cxx b/slideshow/source/engine/expressionnodefactory.cxx
index f766eafdfabc..14426cb59f21 100644
--- a/slideshow/source/engine/expressionnodefactory.cxx
+++ b/slideshow/source/engine/expressionnodefactory.cxx
@@ -2,7 +2,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
@@ -69,7 +69,7 @@ namespace slideshow
}
private:
- double maValue;
+ double maValue;
};
class TValueExpression : public ExpressionNode
@@ -83,7 +83,7 @@ namespace slideshow
{
return t;
}
-
+
virtual bool isConstant() const
{
return false;
@@ -99,8 +99,8 @@ namespace slideshow
class BinaryExpressionBase : public ExpressionNode
{
public:
- BinaryExpressionBase( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ BinaryExpressionBase( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
mpFirstArg( rFirstArg ),
mpSecondArg( rSecondArg )
{
@@ -108,21 +108,21 @@ namespace slideshow
virtual bool isConstant() const
{
- return
- mpFirstArg->isConstant() &&
+ return
+ mpFirstArg->isConstant() &&
mpSecondArg->isConstant();
}
protected:
- ExpressionNodeSharedPtr mpFirstArg;
+ ExpressionNodeSharedPtr mpFirstArg;
ExpressionNodeSharedPtr mpSecondArg;
};
class PlusExpression : public BinaryExpressionBase
{
public:
- PlusExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ PlusExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -136,8 +136,8 @@ namespace slideshow
class MinusExpression : public BinaryExpressionBase
{
public:
- MinusExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ MinusExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -151,8 +151,8 @@ namespace slideshow
class MultipliesExpression : public BinaryExpressionBase
{
public:
- MultipliesExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ MultipliesExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -160,14 +160,14 @@ namespace slideshow
virtual double operator()( double t ) const
{
return (*mpFirstArg)(t) * (*mpSecondArg)(t);
- }
+ }
};
class DividesExpression : public BinaryExpressionBase
{
public:
- DividesExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ DividesExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -175,14 +175,14 @@ namespace slideshow
virtual double operator()( double t ) const
{
return (*mpFirstArg)(t) / (*mpSecondArg)(t);
- }
+ }
};
class ComposedExpression : public BinaryExpressionBase
{
public:
- ComposedExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ ComposedExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -196,8 +196,8 @@ namespace slideshow
class MinExpression : public BinaryExpressionBase
{
public:
- MinExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ MinExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -211,8 +211,8 @@ namespace slideshow
class MaxExpression : public BinaryExpressionBase
{
public:
- MaxExpression( const ExpressionNodeSharedPtr& rFirstArg,
- const ExpressionNodeSharedPtr& rSecondArg ) :
+ MaxExpression( const ExpressionNodeSharedPtr& rFirstArg,
+ const ExpressionNodeSharedPtr& rSecondArg ) :
BinaryExpressionBase( rFirstArg, rSecondArg )
{
}
@@ -228,54 +228,54 @@ namespace slideshow
{
return ExpressionNodeSharedPtr( new ConstantValueExpression(rConstantValue) );
}
-
+
ExpressionNodeSharedPtr ExpressionNodeFactory::createValueTExpression()
{
return ExpressionNodeSharedPtr( new TValueExpression() );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createPlusExpression( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createPlusExpression( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS )
{
return ExpressionNodeSharedPtr( new PlusExpression(rLHS, rRHS) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createMinusExpression( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createMinusExpression( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS )
{
return ExpressionNodeSharedPtr( new MinusExpression(rLHS, rRHS) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createMultipliesExpression( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createMultipliesExpression( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS )
{
return ExpressionNodeSharedPtr( new MultipliesExpression(rLHS, rRHS) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createDividesExpression( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createDividesExpression( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS )
{
return ExpressionNodeSharedPtr( new DividesExpression(rLHS, rRHS) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction )
{
return ExpressionNodeSharedPtr( new ComposedExpression(rOuterFunction, rInnerFunction) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction )
{
return ExpressionNodeSharedPtr( new MinExpression(rOuterFunction, rInnerFunction) );
}
- ExpressionNodeSharedPtr ExpressionNodeFactory::createMaxExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction )
+ ExpressionNodeSharedPtr ExpressionNodeFactory::createMaxExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction )
{
return ExpressionNodeSharedPtr( new MaxExpression(rOuterFunction, rInnerFunction) );
}
-
+
}
}
diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx
index e91ad5664ac6..6ba5aae1e5de 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -2,7 +2,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
@@ -78,14 +78,14 @@ public:
mpActivity(rActivity),
mrActivityQueue( rActivityQueue )
{}
-
+
virtual void dispose() {}
virtual bool fire()
{
ActivitySharedPtr pActivity( mpActivity.lock() );
if( !pActivity )
return false;
-
+
return mrActivityQueue.addActivity( pActivity );
}
@@ -93,16 +93,16 @@ public:
virtual double getActivationTime( double nCurrentTime ) const
{
const double nElapsedTime( maTimer.getElapsedTime() );
-
+
return ::std::max( nCurrentTime,
nCurrentTime - nElapsedTime + mnNextTime );
- }
+ }
/// Start the internal timer
void start() { maTimer.reset(); }
-
+
/** Set the next timeout this object should generate.
-
+
@param nextTime
Absolute time, measured from the last start() call,
when this event should wakeup the Activity again. If
@@ -110,7 +110,7 @@ public:
every setNextTimeout() call.
*/
void setNextTimeout( double nextTime ) { mnNextTime = nextTime; }
-
+
private:
::canvas::tools::ElapsedTime maTimer;
double mnNextTime;
@@ -118,15 +118,15 @@ private:
ActivitiesQueue& mrActivityQueue;
};
-class RehearseTimingsActivity::MouseHandler : public MouseEventHandler,
+class RehearseTimingsActivity::MouseHandler : public MouseEventHandler,
private boost::noncopyable
{
public:
explicit MouseHandler( RehearseTimingsActivity& rta );
-
+
void reset();
bool hasBeenClicked() const { return mbHasBeenClicked; }
-
+
// MouseEventHandler
virtual bool handleMousePressed( awt::MouseEvent const & evt );
virtual bool handleMouseReleased( awt::MouseEvent const & evt );
@@ -134,7 +134,7 @@ public:
virtual bool handleMouseExited( awt::MouseEvent const & evt );
virtual bool handleMouseDragged( awt::MouseEvent const & evt );
virtual bool handleMouseMoved( awt::MouseEvent const & evt );
-
+
private:
bool isInArea( com::sun::star::awt::MouseEvent const & evt ) const;
void updatePressedState( const bool pressedState ) const;
@@ -194,7 +194,7 @@ RehearseTimingsActivity::~RehearseTimingsActivity()
{
stop();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -209,9 +209,9 @@ boost::shared_ptr<RehearseTimingsActivity> RehearseTimingsActivity::create(
boost::shared_ptr<RehearseTimingsActivity> pActivity(
new RehearseTimingsActivity( rContext ));
- pActivity->mpMouseHandler.reset(
+ pActivity->mpMouseHandler.reset(
new MouseHandler(*pActivity.get()) );
- pActivity->mpWakeUpEvent.reset(
+ pActivity->mpWakeUpEvent.reset(
new WakeupEvent( rContext.mrEventQueue.getTimer(),
pActivity,
rContext.mrActivitiesQueue ));
@@ -309,7 +309,7 @@ void RehearseTimingsActivity::dequeued()
void RehearseTimingsActivity::end()
{
- if (isActive())
+ if (isActive())
{
stop();
mbActive = false;
@@ -318,7 +318,7 @@ void RehearseTimingsActivity::end()
basegfx::B2DRange RehearseTimingsActivity::calcSpriteRectangle( UnoViewSharedPtr const& rView ) const
{
- const Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
+ const Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
UNO_QUERY );
if( !xBitmap.is() )
return basegfx::B2DRange();
@@ -350,10 +350,10 @@ void RehearseTimingsActivity::viewAdded( const UnoViewSharedPtr& rView )
1001.0 )); // sprite should be in front of all
// other sprites
sprite->setAlpha( 0.8 );
- const basegfx::B2DRange spriteRectangle(
+ const basegfx::B2DRange spriteRectangle(
calcSpriteRectangle( rView ) );
sprite->move( basegfx::B2DPoint(
- spriteRectangle.getMinX(),
+ spriteRectangle.getMinX(),
spriteRectangle.getMinY() ) );
if( maViews.empty() )
@@ -383,22 +383,22 @@ void RehearseTimingsActivity::viewChanged( const UnoViewSharedPtr& rView )
// find entry corresponding to modified view
ViewsVecT::iterator aModifiedEntry(
std::find_if(
- maViews.begin(),
+ maViews.begin(),
maViews.end(),
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
- // select view:
+ // select view:
boost::bind( std::select1st<ViewsVecT::value_type>(), _1 ))));
-
+
OSL_ASSERT( aModifiedEntry != maViews.end() );
if( aModifiedEntry == maViews.end() )
return;
// new sprite pos, transformation might have changed:
maSpriteRectangle = calcSpriteRectangle( rView );
-
- // reposition sprite:
+
+ // reposition sprite:
aModifiedEntry->second->move( maSpriteRectangle.getMinimum() );
// sprites changed, need screen update
@@ -408,16 +408,16 @@ void RehearseTimingsActivity::viewChanged( const UnoViewSharedPtr& rView )
void RehearseTimingsActivity::viewsChanged()
{
if( !maViews.empty() )
- {
+ {
// new sprite pos, transformation might have changed:
maSpriteRectangle = calcSpriteRectangle( maViews.front().first );
-
+
// reposition sprites
for_each_sprite( boost::bind( &cppcanvas::Sprite::move,
_1,
boost::cref(maSpriteRectangle.getMinimum())) );
- // sprites changed, need screen update
+ // sprites changed, need screen update
mrScreenUpdater.notifyUpdate();
}
}
@@ -464,13 +464,13 @@ void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas )
Rectangle rect = Rectangle( 0,0,
maSpriteSizePixel.getX(),
maSpriteSizePixel.getY());
- if (mbDrawPressed)
+ if (mbDrawPressed)
{
blackHole.SetTextColor( COL_BLACK );
blackHole.SetFillColor( COL_LIGHTGRAY );
blackHole.SetLineColor( COL_GRAY );
}
- else
+ else
{
blackHole.SetTextColor( COL_BLACK );
blackHole.SetFillColor( COL_WHITE );
diff --git a/slideshow/source/engine/rehearsetimingsactivity.hxx b/slideshow/source/engine/rehearsetimingsactivity.hxx
index 881443fc35a7..2132875911d6 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.hxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.hxx
@@ -2,7 +2,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
@@ -62,7 +62,7 @@ class RehearseTimingsActivity : public Activity,
public:
/** Creates the activity.
*/
- static boost::shared_ptr<RehearseTimingsActivity> create(
+ static boost::shared_ptr<RehearseTimingsActivity> create(
const SlideShowContext& rContext );
virtual ~RehearseTimingsActivity();
@@ -70,7 +70,7 @@ public:
/** Starts and shows the timer; adds to activity queue.
*/
void start();
-
+
/** Stops and hides the timer.
@return elapsed time
*/
@@ -85,7 +85,7 @@ public:
virtual void viewRemoved( const UnoViewSharedPtr& rView );
virtual void viewChanged( const UnoViewSharedPtr& rView );
virtual void viewsChanged();
-
+
// Disposable:
virtual void dispose();
// Activity:
@@ -94,18 +94,18 @@ public:
virtual bool isActive() const;
virtual void dequeued();
virtual void end();
-
+
private:
class WakeupEvent;
explicit RehearseTimingsActivity( const SlideShowContext& rContext );
-
+
void paint( ::cppcanvas::CanvasSharedPtr const & canvas ) const;
void paintAllSprites() const;
-
+
class MouseHandler;
friend class MouseHandler;
-
+
typedef ::std::vector<
::std::pair<UnoViewSharedPtr,
boost::shared_ptr<cppcanvas::CustomSprite> > > ViewsVecT;
@@ -121,7 +121,7 @@ private:
::basegfx::B2DRange calcSpriteRectangle(
UnoViewSharedPtr const & rView ) const;
-
+
EventQueue& mrEventQueue;
ScreenUpdater& mrScreenUpdater;
EventMultiplexer& mrEventMultiplexer;
@@ -129,10 +129,10 @@ private:
canvas::tools::ElapsedTime maElapsedTime;
ViewsVecT maViews;
-
+
/// screen rect of sprite (in view coordinates!)
::basegfx::B2DRange maSpriteRectangle;
-
+
Font maFont;
boost::shared_ptr<WakeupEvent> mpWakeUpEvent;
boost::shared_ptr<MouseHandler> mpMouseHandler;
diff --git a/slideshow/source/engine/screenupdater.cxx b/slideshow/source/engine/screenupdater.cxx
index 307fd127c88c..5d39b23c0901 100644
--- a/slideshow/source/engine/screenupdater.cxx
+++ b/slideshow/source/engine/screenupdater.cxx
@@ -2,7 +2,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
@@ -63,12 +63,12 @@ namespace internal
ViewUpdateSharedPtr,
std::vector<ViewUpdateSharedPtr> > maUpdaters;
- /// Views that have been notified for update
+ /// Views that have been notified for update
UpdateRequestVector maViewUpdateRequests;
/// List of View. Used to issue screen updates on.
UnoViewContainer const& mrViewContainer;
-
+
/// True, if a notifyUpdate() for all views has been issued.
bool mbUpdateAllRequest;
@@ -77,7 +77,7 @@ namespace internal
/// The screen is updated only when mnLockCount==0
sal_Int32 mnLockCount;
-
+
explicit ImplScreenUpdater( UnoViewContainer const& rViewContainer ) :
maUpdaters(),
maViewUpdateRequests(),
@@ -102,11 +102,11 @@ namespace internal
{
mpImpl->mbUpdateAllRequest = true;
}
-
- void ScreenUpdater::notifyUpdate( const UnoViewSharedPtr& rView,
+
+ void ScreenUpdater::notifyUpdate( const UnoViewSharedPtr& rView,
bool bViewClobbered )
{
- mpImpl->maViewUpdateRequests.push_back(
+ mpImpl->maViewUpdateRequests.push_back(
std::make_pair(rView, bViewClobbered) );
if( bViewClobbered )
@@ -117,10 +117,10 @@ namespace internal
{
if (mpImpl->mnLockCount > 0)
return;
-
+
// cases:
//
- // (a) no update necessary at all
+ // (a) no update necessary at all
//
// (b) no ViewUpdate-generated update
// I. update all views requested -> for_each( mrViewContainer )
@@ -131,12 +131,12 @@ namespace internal
// any ViewUpdate-triggered updates?
const bool bViewUpdatesNeeded(
- mpImpl->maUpdaters.apply(
+ mpImpl->maUpdaters.apply(
boost::mem_fn(&ViewUpdate::needsUpdate)) );
if( bViewUpdatesNeeded )
{
- mpImpl->maUpdaters.applyAll(
+ mpImpl->maUpdaters.applyAll(
boost::mem_fn((bool (ViewUpdate::*)())&ViewUpdate::update) );
}
@@ -146,8 +146,8 @@ namespace internal
// unconditionally update all views
std::for_each( mpImpl->mrViewContainer.begin(),
mpImpl->mrViewContainer.end(),
- mpImpl->mbViewClobbered ?
- boost::mem_fn(&View::paintScreen) :
+ mpImpl->mbViewClobbered ?
+ boost::mem_fn(&View::paintScreen) :
boost::mem_fn(&View::updateScreen) );
}
else if( !mpImpl->maViewUpdateRequests.empty() )
diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx
index a86c7c916326..c17da20a408e 100644
--- a/slideshow/source/engine/shapeattributelayer.cxx
+++ b/slideshow/source/engine/shapeattributelayer.cxx
@@ -2,7 +2,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
@@ -56,7 +56,7 @@ namespace slideshow
namespace internal
{
/** Update state ids
-
+
This method updates all state IDs from possible
children. Whenever a child's state ID changed, we
increment ours.
@@ -86,10 +86,10 @@ namespace slideshow
appropriately combining it with children values (by
evaluating the mnAdditiveMode member).
*/
- template< typename T > T ShapeAttributeLayer::calcValue( const T& rCurrValue,
- bool bThisInstanceValid,
+ template< typename T > T ShapeAttributeLayer::calcValue( const T& rCurrValue,
+ bool bThisInstanceValid,
bool (ShapeAttributeLayer::*pIsValid)() const,
- T (ShapeAttributeLayer::*pGetValue)() const ) const
+ T (ShapeAttributeLayer::*pGetValue)() const ) const
{
// deviated from the (*shared_ptr).*mpFuncPtr notation
// here, since gcc does not seem to parse that as a member
@@ -110,10 +110,10 @@ namespace slideshow
case animations::AnimationAdditiveMode::BASE:
// FALTHROUGH intended
case animations::AnimationAdditiveMode::REPLACE:
- // TODO(F2): reverse-engineer the semantics of these
+ // TODO(F2): reverse-engineer the semantics of these
// values
-
- // currently, treat them the same and replace
+
+ // currently, treat them the same and replace
// the child value by our own
return rCurrValue;
@@ -126,16 +126,16 @@ namespace slideshow
}
else
{
- // this object is the only one defining
+ // this object is the only one defining
// the value, so take it
return rCurrValue;
}
}
else
{
- return bChildInstanceValueValid ?
- ((*mpChild).*pGetValue)() :
- T(); // pass on child value, regardless
+ return bChildInstanceValueValid ?
+ ((*mpChild).*pGetValue)() :
+ T(); // pass on child value, regardless
// if it's valid or not. If not, it's
// a default anyway
}
@@ -160,7 +160,7 @@ namespace slideshow
meFillStyle( drawing::FillStyle_NONE ),
meLineStyle( drawing::LineStyle_NONE ),
- meCharPosture( awt::FontSlant_NONE ),
+ meCharPosture( awt::FontSlant_NONE ),
mnUnderlineMode(),
maDimColor(),
@@ -179,33 +179,33 @@ namespace slideshow
mbVisibility( false ),
- mbWidthValid( false ),
- mbHeightValid( false ),
- mbPosXValid( false ),
- mbPosYValid( false ),
- mbClipValid( false ),
+ mbWidthValid( false ),
+ mbHeightValid( false ),
+ mbPosXValid( false ),
+ mbPosYValid( false ),
+ mbClipValid( false ),
- mbFontFamilyValid( false ),
+ mbFontFamilyValid( false ),
- mbRotationAngleValid( false ),
- mbShearXAngleValid( false ),
- mbShearYAngleValid( false ),
+ mbRotationAngleValid( false ),
+ mbShearXAngleValid( false ),
+ mbShearYAngleValid( false ),
- mbAlphaValid( false ),
+ mbAlphaValid( false ),
mbCharRotationAngleValid( false ),
- mbCharScaleValid( false ),
-
- mbDimColorValid( false ),
- mbFillColorValid( false ),
- mbLineColorValid( false ),
- mbCharColorValid( false ),
-
- mbFillStyleValid( false ),
- mbLineStyleValid( false ),
- mbCharWeightValid( false ),
- mbUnderlineModeValid( false ),
- mbCharPostureValid( false ),
+ mbCharScaleValid( false ),
+
+ mbDimColorValid( false ),
+ mbFillColorValid( false ),
+ mbLineColorValid( false ),
+ mbCharColorValid( false ),
+
+ mbFillStyleValid( false ),
+ mbLineStyleValid( false ),
+ mbCharWeightValid( false ),
+ mbUnderlineModeValid( false ),
+ mbCharPostureValid( false ),
mbVisibilityValid( false )
{
}
@@ -223,7 +223,7 @@ namespace slideshow
// we have it - replace by removed child's sibling.
mpChild = rChildLayer->getChildLayer();
- // if we're now the first one, defensively increment _all_
+ // if we're now the first one, defensively increment _all_
// state ids: possibly all underlying attributes have now
// changed to default
if( !haveChild() )
@@ -234,8 +234,8 @@ namespace slideshow
++mnClipState;
++mnAlphaState;
++mnPositionState;
- ++mnContentState;
- ++mnVisibilityState;
+ ++mnContentState;
+ ++mnVisibilityState;
}
}
else
@@ -250,12 +250,12 @@ namespace slideshow
return true;
}
-
+
ShapeAttributeLayerSharedPtr ShapeAttributeLayer::getChildLayer() const
{
return mpChild;
}
-
+
void ShapeAttributeLayer::setAdditiveMode( sal_Int16 nMode )
{
if( mnAdditiveMode != nMode )
@@ -263,15 +263,15 @@ namespace slideshow
// TODO(P1): Check whether it pays off to check more
// detailed, which attributes really change
- // defensively increment all states - possibly each of them
+ // defensively increment all states - possibly each of them
// will change with different additive mode
++mnTransformationState;
++mnClipState;
++mnAlphaState;
++mnPositionState;
- ++mnContentState;
- ++mnVisibilityState;
- }
+ ++mnContentState;
+ ++mnVisibilityState;
+ }
mnAdditiveMode = nMode;
}
@@ -280,13 +280,13 @@ namespace slideshow
{
return mbWidthValid ? true : haveChild() ? mpChild->isWidthValid() : false;
}
-
+
double ShapeAttributeLayer::getWidth() const
{
- return calcValue< double >(
+ return calcValue< double >(
maSize.getX(),
mbWidthValid,
- &ShapeAttributeLayer::isWidthValid,
+ &ShapeAttributeLayer::isWidthValid,
&ShapeAttributeLayer::getWidth );
}
@@ -304,13 +304,13 @@ namespace slideshow
{
return mbHeightValid ? true : haveChild() ? mpChild->isHeightValid() : false;
}
-
+
double ShapeAttributeLayer::getHeight() const
{
- return calcValue< double >(
+ return calcValue< double >(
maSize.getY(),
mbHeightValid,
- &ShapeAttributeLayer::isHeightValid,
+ &ShapeAttributeLayer::isHeightValid,
&ShapeAttributeLayer::getHeight );
}
@@ -342,10 +342,10 @@ namespace slideshow
double ShapeAttributeLayer::getPosX() const
{
- return calcValue< double >(
+ return calcValue< double >(
maPosition.getX(),
mbPosXValid,
- &ShapeAttributeLayer::isPosXValid,
+ &ShapeAttributeLayer::isPosXValid,
&ShapeAttributeLayer::getPosX );
}
@@ -366,10 +366,10 @@ namespace slideshow
double ShapeAttributeLayer::getPosY() const
{
- return calcValue< double >(
+ return calcValue< double >(
maPosition.getY(),
mbPosYValid,
- &ShapeAttributeLayer::isPosYValid,
+ &ShapeAttributeLayer::isPosYValid,
&ShapeAttributeLayer::getPosY );
}
@@ -397,10 +397,10 @@ namespace slideshow
double ShapeAttributeLayer::getRotationAngle() const
{
- return calcValue< double >(
+ return calcValue< double >(
mnRotationAngle,
mbRotationAngleValid,
- &ShapeAttributeLayer::isRotationAngleValid,
+ &ShapeAttributeLayer::isRotationAngleValid,
&ShapeAttributeLayer::getRotationAngle );
}
@@ -421,7 +421,7 @@ namespace slideshow
double ShapeAttributeLayer::getShearXAngle() const
{
- return calcValue( mnShearXAngle,
+ return calcValue( mnShearXAngle,
mbShearXAngleValid,
&ShapeAttributeLayer::isShearXAngleValid,
&ShapeAttributeLayer::getShearXAngle );
@@ -444,7 +444,7 @@ namespace slideshow
double ShapeAttributeLayer::getShearYAngle() const
{
- return calcValue( mnShearYAngle,
+ return calcValue( mnShearYAngle,
mbShearYAngleValid,
&ShapeAttributeLayer::isShearYAngleValid,
&ShapeAttributeLayer::getShearYAngle );
@@ -467,7 +467,7 @@ namespace slideshow
double ShapeAttributeLayer::getAlpha() const
{
- return calcValue( mnAlpha,
+ return calcValue( mnAlpha,
mbAlphaValid,
&ShapeAttributeLayer::isAlphaValid,
&ShapeAttributeLayer::getAlpha );
@@ -482,7 +482,7 @@ namespace slideshow
mbAlphaValid = true;
++mnAlphaState;
}
-
+
bool ShapeAttributeLayer::isClipValid() const
{
return mbClipValid ? true : haveChild() ? mpChild->isClipValid() : false;
@@ -510,10 +510,10 @@ namespace slideshow
{
return mbDimColorValid ? true : haveChild() ? mpChild->isDimColorValid() : false;
}
-
+
RGBColor ShapeAttributeLayer::getDimColor() const
{
- return calcValue( maDimColor,
+ return calcValue( maDimColor,
mbDimColorValid,
&ShapeAttributeLayer::isDimColorValid,
&ShapeAttributeLayer::getDimColor );
@@ -530,10 +530,10 @@ namespace slideshow
{
return mbFillColorValid ? true : haveChild() ? mpChild->isFillColorValid() : false;
}
-
+
RGBColor ShapeAttributeLayer::getFillColor() const
{
- return calcValue( maFillColor,
+ return calcValue( maFillColor,
mbFillColorValid,
&ShapeAttributeLayer::isFillColorValid,
&ShapeAttributeLayer::getFillColor );
@@ -553,7 +553,7 @@ namespace slideshow
RGBColor ShapeAttributeLayer::getLineColor() const
{
- return calcValue( maLineColor,
+ return calcValue( maLineColor,
mbLineColorValid,
&ShapeAttributeLayer::isLineColorValid,
&ShapeAttributeLayer::getLineColor );
@@ -570,10 +570,10 @@ namespace slideshow
{
return mbFillStyleValid ? true : haveChild() ? mpChild->isFillStyleValid() : false;
}
-
+
sal_Int16 ShapeAttributeLayer::getFillStyle() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbFillStyleValid )
return sal::static_int_cast<sal_Int16>(meFillStyle);
@@ -598,7 +598,7 @@ namespace slideshow
sal_Int16 ShapeAttributeLayer::getLineStyle() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbLineStyleValid )
return sal::static_int_cast<sal_Int16>(meLineStyle);
@@ -647,7 +647,7 @@ namespace slideshow
RGBColor ShapeAttributeLayer::getCharColor() const
{
- return calcValue( maCharColor,
+ return calcValue( maCharColor,
mbCharColorValid,
&ShapeAttributeLayer::isCharColorValid,
&ShapeAttributeLayer::getCharColor );
@@ -659,7 +659,7 @@ namespace slideshow
mbCharColorValid = true;
++mnContentState;
}
-
+
bool ShapeAttributeLayer::isCharRotationAngleValid() const
{
return mbCharRotationAngleValid ? true : haveChild() ? mpChild->isCharRotationAngleValid() : false;
@@ -667,7 +667,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharRotationAngle() const
{
- return calcValue( mnCharRotationAngle,
+ return calcValue( mnCharRotationAngle,
mbCharRotationAngleValid,
&ShapeAttributeLayer::isCharRotationAngleValid,
&ShapeAttributeLayer::getCharRotationAngle );
@@ -690,7 +690,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharWeight() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbCharWeightValid )
return mnCharWeight;
@@ -707,7 +707,7 @@ namespace slideshow
mbCharWeightValid = true;
++mnContentState;
}
-
+
bool ShapeAttributeLayer::isUnderlineModeValid() const
{
return mbUnderlineModeValid ? true : haveChild() ? mpChild->isUnderlineModeValid() : false;
@@ -740,7 +740,7 @@ namespace slideshow
::rtl::OUString ShapeAttributeLayer::getFontFamily() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbFontFamilyValid )
return maFontFamily;
@@ -764,7 +764,7 @@ namespace slideshow
sal_Int16 ShapeAttributeLayer::getCharPosture() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbCharPostureValid )
return sal::static_int_cast<sal_Int16>(meCharPosture);
@@ -789,7 +789,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharScale() const
{
- return calcValue( mnCharScale,
+ return calcValue( mnCharScale,
mbCharScaleValid,
&ShapeAttributeLayer::isCharScaleValid,
&ShapeAttributeLayer::getCharScale );
@@ -805,54 +805,54 @@ namespace slideshow
++mnContentState;
}
- State::StateId ShapeAttributeLayer::getTransformationState() const
- {
- return haveChild() ?
+ State::StateId ShapeAttributeLayer::getTransformationState() const
+ {
+ return haveChild() ?
::std::max( mnTransformationState,
- mpChild->getTransformationState() ) :
- mnTransformationState;
+ mpChild->getTransformationState() ) :
+ mnTransformationState;
}
State::StateId ShapeAttributeLayer::getClipState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnClipState,
- mpChild->getClipState() ) :
- mnClipState;
+ mpChild->getClipState() ) :
+ mnClipState;
}
State::StateId ShapeAttributeLayer::getAlphaState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnAlphaState,
- mpChild->getAlphaState() ) :
- mnAlphaState;
+ mpChild->getAlphaState() ) :
+ mnAlphaState;
}
State::StateId ShapeAttributeLayer::getPositionState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnPositionState,
- mpChild->getPositionState() ) :
- mnPositionState;
+ mpChild->getPositionState() ) :
+ mnPositionState;
}
State::StateId ShapeAttributeLayer::getContentState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnContentState,
- mpChild->getContentState() ) :
- mnContentState;
+ mpChild->getContentState() ) :
+ mnContentState;
}
-
+
State::StateId ShapeAttributeLayer::getVisibilityState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnVisibilityState,
- mpChild->getVisibilityState() ) :
- mnVisibilityState;
+ mpChild->getVisibilityState() ) :
+ mnVisibilityState;
}
-
+
}
}
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx
index 4b1cb5398fee..f998e6df704e 100644
--- a/slideshow/source/engine/shapes/appletshape.cxx
+++ b/slideshow/source/engine/shapes/appletshape.cxx
@@ -2,7 +2,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
@@ -28,7 +28,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>
@@ -82,9 +82,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,
@@ -95,11 +95,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
//------------------------------------------------------------------
@@ -161,8 +161,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())) );
}
@@ -174,22 +174,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
@@ -197,14 +197,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,
@@ -212,9 +212,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 ),
@@ -231,7 +231,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool AppletShape::clearAllViewLayers()
{
maViewAppletShapes.clear();
@@ -245,13 +245,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;
}
@@ -260,7 +260,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool AppletShape::implStartIntrinsicAnimation()
{
::std::for_each( maViewAppletShapes.begin(),
@@ -269,12 +269,12 @@ namespace slideshow
_1,
::boost::cref( getBounds() )));
mbIsPlaying = true;
-
+
return true;
}
-
+
// ---------------------------------------------------------------------
-
+
bool AppletShape::implEndIntrinsicAnimation()
{
::std::for_each( maViewAppletShapes.begin(),
@@ -287,7 +287,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool AppletShape::implPauseIntrinsicAnimation()
{
// TODO(F1): any way of temporarily disabling/deactivating
diff --git a/slideshow/source/engine/shapes/appletshape.hxx b/slideshow/source/engine/shapes/appletshape.hxx
index e967b9b381fb..4eb86ee2e378 100644
--- a/slideshow/source/engine/shapes/appletshape.hxx
+++ b/slideshow/source/engine/shapes/appletshape.hxx
@@ -2,7 +2,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
@@ -48,7 +48,7 @@ namespace slideshow
class Shape;
boost::shared_ptr<Shape> createAppletShape(
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
double nPrio,
const ::rtl::OUString& rServiceName,
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx
index 7d13d9247455..4f46d9172fb2 100644
--- a/slideshow/source/engine/shapes/backgroundshape.cxx
+++ b/slideshow/source/engine/shapes/backgroundshape.cxx
@@ -2,7 +2,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
@@ -84,20 +84,20 @@ namespace slideshow
peculiarities of the draw API regarding background
content.
*/
- BackgroundShape( const ::com::sun::star::uno::Reference<
+ BackgroundShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xDrawPage,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xMasterPage,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > getXShape() const;
// View layer methods
//------------------------------------------------------------------
- virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer,
- bool bRedrawLayer );
+ virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer,
+ bool bRedrawLayer );
virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer );
virtual bool clearAllViewLayers();
@@ -110,7 +110,7 @@ namespace slideshow
virtual ::basegfx::B2DRectangle getUpdateArea() const;
virtual bool isVisible() const;
virtual double getPriority() const;
- virtual bool isBackgroundDetached() const;
+ virtual bool isBackgroundDetached() const;
// render methods
@@ -119,17 +119,17 @@ namespace slideshow
virtual bool update() const;
virtual bool render() const;
virtual bool isContentChanged() const;
-
+
private:
/// The metafile actually representing the Shape
- GDIMetaFileSharedPtr mpMtf;
+ GDIMetaFileSharedPtr mpMtf;
// The attributes of this Shape
- ::basegfx::B2DRectangle maBounds; // always needed for rendering
+ ::basegfx::B2DRectangle maBounds; // always needed for rendering
/// the list of active view shapes (one for each registered view layer)
typedef ::std::vector< ViewBackgroundShapeSharedPtr > ViewBackgroundShapeVector;
- ViewBackgroundShapeVector maViewShapes;
+ ViewBackgroundShapeVector maViewShapes;
};
@@ -143,7 +143,7 @@ namespace slideshow
maBounds(),
maViewShapes()
{
- uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
+ uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
uno::UNO_QUERY_THROW );
GDIMetaFileSharedPtr pMtf( new GDIMetaFile() );
@@ -178,15 +178,15 @@ namespace slideshow
return uno::Reference< drawing::XShape >();
}
- void BackgroundShape::addViewLayer( const ViewLayerSharedPtr& rNewLayer,
- bool bRedrawLayer )
+ void BackgroundShape::addViewLayer( const ViewLayerSharedPtr& rNewLayer,
+ bool bRedrawLayer )
{
ViewBackgroundShapeVector::iterator aEnd( maViewShapes.end() );
// already added?
- if( ::std::find_if( maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( ::std::find_if( maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewBackgroundShape::getViewLayer,
_1 ),
@@ -196,8 +196,8 @@ namespace slideshow
return;
}
- maViewShapes.push_back(
- ViewBackgroundShapeSharedPtr(
+ maViewShapes.push_back(
+ ViewBackgroundShapeSharedPtr(
new ViewBackgroundShape( rNewLayer,
maBounds ) ) );
@@ -210,9 +210,9 @@ namespace slideshow
{
const ViewBackgroundShapeVector::iterator aEnd( maViewShapes.end() );
- OSL_ENSURE( ::std::count_if(maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ OSL_ENSURE( ::std::count_if(maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewBackgroundShape::getViewLayer,
_1 ),
@@ -221,9 +221,9 @@ namespace slideshow
ViewBackgroundShapeVector::iterator aIter;
- if( (aIter=::std::remove_if( maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( (aIter=::std::remove_if( maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewBackgroundShape::getViewLayer,
_1 ),
@@ -249,7 +249,7 @@ namespace slideshow
{
return maBounds;
}
-
+
::basegfx::B2DRectangle BackgroundShape::getDomBounds() const
{
return maBounds;
@@ -296,13 +296,13 @@ namespace slideshow
// redraw all view shapes, by calling their render() method
if( ::std::count_if( maViewShapes.begin(),
- maViewShapes.end(),
+ maViewShapes.end(),
::boost::bind( &ViewBackgroundShape::render,
_1,
::boost::cref( mpMtf ) ) )
!= static_cast<ViewBackgroundShapeVector::difference_type>(maViewShapes.size()) )
{
- // at least one of the ViewBackgroundShape::render() calls did return
+ // at least one of the ViewBackgroundShape::render() calls did return
// false - update failed on at least one ViewLayer
return false;
}
@@ -322,13 +322,13 @@ namespace slideshow
//////////////////////////////////////////////////////////
- ShapeSharedPtr createBackgroundShape(
+ ShapeSharedPtr createBackgroundShape(
const uno::Reference< drawing::XDrawPage >& xDrawPage,
const uno::Reference< drawing::XDrawPage >& xMasterPage,
const SlideShowContext& rContext )
{
return ShapeSharedPtr(
- new BackgroundShape(
+ new BackgroundShape(
xDrawPage,
xMasterPage,
rContext ));
diff --git a/slideshow/source/engine/shapes/backgroundshape.hxx b/slideshow/source/engine/shapes/backgroundshape.hxx
index eb495b9b1aec..1de9eaa6e86b 100644
--- a/slideshow/source/engine/shapes/backgroundshape.hxx
+++ b/slideshow/source/engine/shapes/backgroundshape.hxx
@@ -2,7 +2,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
@@ -42,7 +42,7 @@ namespace slideshow
namespace internal
{
class Shape;
- struct SlideShowContext;
+ struct SlideShowContext;
/** Representation of a draw document's background shape.
@@ -51,10 +51,10 @@ namespace slideshow
nor attributable, those more specialized derivations of
the Shape interface are not implemented here.
*/
- boost::shared_ptr<Shape> createBackgroundShape(
- const ::com::sun::star::uno::Reference<
+ boost::shared_ptr<Shape> createBackgroundShape(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xDrawPage,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xMasterPage,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
}
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index a4268599ba38..fdad9fd404d2 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -2,7 +2,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
@@ -83,7 +83,7 @@ class ScrollTextAnimNode
sal_uInt32 mnFrequency; // in ms
// forth and back change at mnRepeat%2:
bool mbAlternate;
-
+
public:
ScrollTextAnimNode(
sal_uInt32 nDuration, sal_uInt32 nRepeat, double fStart, double fStop,
@@ -95,7 +95,7 @@ public:
mnFrequency(nFrequency),
mbAlternate(bAlternate)
{}
-
+
sal_uInt32 GetDuration() const { return mnDuration; }
sal_uInt32 GetRepeat() const { return mnRepeat; }
sal_uInt32 GetFullTime() const { return mnDuration * mnRepeat; }
@@ -103,7 +103,7 @@ public:
double GetStop() const { return mfStop; }
sal_uInt32 GetFrequency() const { return mnFrequency; }
bool DoAlternate() const { return mbAlternate; }
-
+
double GetStateAtRelativeTime(sal_uInt32 nRelativeTime) const;
};
@@ -114,31 +114,31 @@ double ScrollTextAnimNode::GetStateAtRelativeTime(
if( mnDuration == 0 )
return mfStop;
- if(mnRepeat)
+ if(mnRepeat)
{
// ending
const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration);
sal_uInt32 nFrameTime(nRelativeTime - (nRepeatCount * mnDuration));
-
- if(DoAlternate() && (nRepeatCount + 1L) % 2L)
+
+ if(DoAlternate() && (nRepeatCount + 1L) % 2L)
nFrameTime = mnDuration - nFrameTime;
-
+
return mfStart + ((mfStop - mfStart) *
(double(nFrameTime) / mnDuration));
}
- else
+ else
{
// endless
sal_uInt32 nFrameTime(nRelativeTime % mnDuration);
-
- if(DoAlternate())
+
+ if(DoAlternate())
{
const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration);
-
+
if((nRepeatCount + 1L) % 2L)
nFrameTime = mnDuration - nFrameTime;
}
-
+
return mfStart + ((mfStop - mfStart) * (double(nFrameTime) / mnDuration));
}
}
@@ -149,14 +149,14 @@ class ActivityImpl : public Activity,
{
public:
virtual ~ActivityImpl();
-
+
ActivityImpl(
SlideShowContext const& rContext,
boost::shared_ptr<WakeupEvent> const& pWakeupEvent,
boost::shared_ptr<DrawShape> const& pDrawShape );
bool enableAnimations();
-
+
// Disposable:
virtual void dispose();
// Activity:
@@ -166,23 +166,23 @@ public:
virtual void dequeued();
virtual void end();
-private:
+private:
void updateShapeAttributes( double fTime,
basegfx::B2DRectangle const& parentBounds );
-
+
// Access to VisibleWhenSTarted flags
sal_Bool IsVisibleWhenStarted() const { return mbVisibleWhenStarted; }
sal_Bool IsVisibleWhenStopped() const { return mbVisibleWhenStopped; }
-
+
// scroll horizontal? if sal_False, scroll is vertical.
bool ScrollHorizontal() const {
return (drawing::TextAnimationDirection_LEFT == meDirection ||
drawing::TextAnimationDirection_RIGHT == meDirection);
}
-
+
// Access to StepWidth in logical units
sal_uInt32 GetStepWidthLogic() const;
-
+
// is the animation direction opposite?
bool DoScrollForward() const {
return (drawing::TextAnimationDirection_RIGHT == meDirection ||
@@ -191,10 +191,10 @@ private:
// do alternate text directions?
bool DoAlternate() const { return mbAlternate; }
-
+
// do scroll in?
bool DoScrollIn() const { return mbScrollIn; }
-
+
// Scroll helper methods
void ImpForceScrollTextAnimNodes();
ScrollTextAnimNode* ImpGetScrollTextAnimNode(
@@ -206,7 +206,7 @@ private:
double GetMixerState(sal_uInt32 nTime);
////////////////////////////////////////////////////////////////////
-
+
SlideShowContext maContext;
boost::shared_ptr<WakeupEvent> mpWakeupEvent;
boost::weak_ptr<DrawShape> mpParentDrawShape;
@@ -220,38 +220,38 @@ private:
bool mbIsDisposed;
bool mbIsActive;
drawing::TextAnimationKind meAnimKind;
-
+
// The blink frequency in ms
sal_uInt32 mnFrequency;
-
+
// The repeat count, init to 0L which means endless
sal_uInt32 mnRepeat;
-
+
// Flag to decide if text will be shown when animation has ended
bool mbVisibleWhenStopped;
bool mbVisibleWhenStarted;
// Flag decides if TextScroll alternates. Default is sal_False.
bool mbAlternate;
-
+
// Flag to remember if this is a simple scrollin text
bool mbScrollIn;
-
+
// start time for this animation
sal_uInt32 mnStartTime;
-
+
// The AnimationDirection
drawing::TextAnimationDirection meDirection;
-
+
// Get width per Step. Negative means pixel, positive logical units
sal_Int32 mnStepWidth;
-
+
// The single anim steps
std::vector< ScrollTextAnimNode > maVector;
-
+
// the scroll rectangle
Rectangle maScrollRectangleLogic;
-
+
// the paint rectangle
Rectangle maPaintRectangleLogic;
};
@@ -278,60 +278,60 @@ private:
double ActivityImpl::GetMixerState( sal_uInt32 nTime )
{
- if( meAnimKind == drawing::TextAnimationKind_BLINK )
+ if( meAnimKind == drawing::TextAnimationKind_BLINK )
{
// from AInfoBlinkText:
double fRetval(0.0);
sal_Bool bDone(sal_False);
const sal_uInt32 nLoopTime(2 * mnFrequency);
-
- if(mnRepeat)
+
+ if(mnRepeat)
{
const sal_uInt32 nEndTime(mnRepeat * nLoopTime);
-
- if(nTime >= nEndTime)
+
+ if(nTime >= nEndTime)
{
- if(mbVisibleWhenStopped)
+ if(mbVisibleWhenStopped)
fRetval = 0.0;
else
fRetval = 1.0;
-
+
bDone = sal_True;
}
}
-
- if(!bDone)
+
+ if(!bDone)
{
sal_uInt32 nTimeInLoop(nTime % nLoopTime);
fRetval = double(nTimeInLoop) / nLoopTime;
}
-
+
return fRetval;
}
- else
+ else
{
// from AInfoScrollText:
double fRetval(0.0);
ImpForceScrollTextAnimNodes();
-
- if(!maVector.empty())
+
+ if(!maVector.empty())
{
sal_uInt32 nRelativeTime;
ScrollTextAnimNode* pNode =
ImpGetScrollTextAnimNode(nTime, nRelativeTime);
-
- if(pNode)
+
+ if(pNode)
{
// use node
fRetval = pNode->GetStateAtRelativeTime(nRelativeTime);
}
- else
+ else
{
// end of animation, take last entry's end
fRetval = maVector[maVector.size() - 1L].GetStop();
}
}
-
+
return fRetval;
}
}
@@ -341,21 +341,21 @@ sal_uInt32 ActivityImpl::GetStepWidthLogic() const
{
// #i69847# Assuming higher DPI
sal_uInt32 const PIXEL_TO_LOGIC = 30;
-
+
sal_uInt32 nRetval(0L);
-
- if(mnStepWidth < 0L)
+
+ if(mnStepWidth < 0L)
{
// is in pixels, convert to logical units
nRetval = (-mnStepWidth * PIXEL_TO_LOGIC);
}
- else if(mnStepWidth > 0L)
+ else if(mnStepWidth > 0L)
{
// is in logical units
nRetval = mnStepWidth;
}
-
- if(0L == nRetval)
+
+ if(0L == nRetval)
{
// step 1 pixel, canned value
@@ -364,7 +364,7 @@ sal_uInt32 ActivityImpl::GetStepWidthLogic() const
// from ainfoscrolltext.cxx)
nRetval = 100L;
}
-
+
return nRetval;
}
@@ -377,7 +377,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
double fZeroLogic, fOneLogic, fInitLogic, fDistanceLogic;
double fZeroLogicAlternate = 0.0, fOneLogicAlternate = 0.0;
double fZeroRelative, fOneRelative, fInitRelative,fDistanceRelative;
-
+
if(ScrollHorizontal())
{
if(DoAlternate())
@@ -388,18 +388,18 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
fZeroLogicAlternate = maScrollRectangleLogic.Right() - maPaintRectangleLogic.GetWidth();
fOneLogicAlternate = maScrollRectangleLogic.Left();
}
- else
+ else
{
fZeroLogicAlternate = maScrollRectangleLogic.Left();
fOneLogicAlternate = maScrollRectangleLogic.Right() - maPaintRectangleLogic.GetWidth();
}
}
-
+
fZeroLogic = maScrollRectangleLogic.Left() - maPaintRectangleLogic.GetWidth();
fOneLogic = maScrollRectangleLogic.Right();
fInitLogic = maPaintRectangleLogic.Left();
}
- else
+ else
{
if(DoAlternate())
{
@@ -408,22 +408,22 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
fZeroLogicAlternate = maScrollRectangleLogic.Bottom() - maPaintRectangleLogic.GetHeight();
fOneLogicAlternate = maScrollRectangleLogic.Top();
}
- else
+ else
{
fZeroLogicAlternate = maScrollRectangleLogic.Top();
fOneLogicAlternate = maScrollRectangleLogic.Bottom() - maPaintRectangleLogic.GetHeight();
}
}
-
+
fZeroLogic = maScrollRectangleLogic.Top() - maPaintRectangleLogic.GetHeight();
fOneLogic = maScrollRectangleLogic.Bottom();
fInitLogic = maPaintRectangleLogic.Top();
}
-
+
fDistanceLogic = fOneLogic - fZeroLogic;
fInitRelative = (fInitLogic - fZeroLogic) / fDistanceLogic;
-
- if(DoAlternate())
+
+ if(DoAlternate())
{
fZeroRelative =
(fZeroLogicAlternate - fZeroLogic) / fDistanceLogic;
@@ -431,42 +431,42 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
(fOneLogicAlternate - fZeroLogic) / fDistanceLogic;
fDistanceRelative = fOneRelative - fZeroRelative;
}
- else
+ else
{
fZeroRelative = 0.0;
fOneRelative = 1.0;
fDistanceRelative = 1.0;
}
-
- if(mnStartTime)
+
+ if(mnStartTime)
{
// Start time loop
ScrollTextAnimNode aStartNode(
mnStartTime, 1L, 0.0, 0.0, mnStartTime, false);
maVector.push_back(aStartNode);
}
-
- if(IsVisibleWhenStarted())
+
+ if(IsVisibleWhenStarted())
{
double fRelativeStartValue, fRelativeEndValue,fRelativeDistance;
-
- if(DoScrollForward())
+
+ if(DoScrollForward())
{
fRelativeStartValue = fInitRelative;
fRelativeEndValue = fOneRelative;
fRelativeDistance = fRelativeEndValue - fRelativeStartValue;
}
- else
+ else
{
fRelativeStartValue = fInitRelative;
fRelativeEndValue = fZeroRelative;
fRelativeDistance = fRelativeStartValue - fRelativeEndValue;
}
-
+
const double fNumberSteps =
(fRelativeDistance * fDistanceLogic) / GetStepWidthLogic();
nLoopTime = FRound(fNumberSteps * mnFrequency);
-
+
// init loop
ScrollTextAnimNode aInitNode(
nLoopTime, 1L,
@@ -474,31 +474,31 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
mnFrequency, false);
maVector.push_back(aInitNode);
}
-
+
// prepare main loop values
{
double fRelativeStartValue, fRelativeEndValue, fRelativeDistance;
-
- if(DoScrollForward())
+
+ if(DoScrollForward())
{
fRelativeStartValue = fZeroRelative;
fRelativeEndValue = fOneRelative;
fRelativeDistance = fRelativeEndValue - fRelativeStartValue;
}
- else
+ else
{
fRelativeStartValue = fOneRelative;
fRelativeEndValue = fZeroRelative;
fRelativeDistance = fRelativeStartValue - fRelativeEndValue;
}
-
+
const double fNumberSteps =
(fRelativeDistance * fDistanceLogic) / GetStepWidthLogic();
nLoopTime = FRound(fNumberSteps * mnFrequency);
-
- if(0L == mnRepeat)
+
+ if(0L == mnRepeat)
{
- if(!DoScrollIn())
+ if(!DoScrollIn())
{
// endless main loop
ScrollTextAnimNode aMainNode(
@@ -508,13 +508,13 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
maVector.push_back(aMainNode);
}
}
- else
+ else
{
sal_uInt32 nNumRepeat(mnRepeat);
-
+
if(DoAlternate() && (nNumRepeat + 1L) % 2L)
nNumRepeat += 1L;
-
+
// ending main loop
ScrollTextAnimNode aMainNode(
nLoopTime, nNumRepeat,
@@ -523,28 +523,28 @@ void ActivityImpl::ImpForceScrollTextAnimNodes()
maVector.push_back(aMainNode);
}
}
-
- if(IsVisibleWhenStopped())
+
+ if(IsVisibleWhenStopped())
{
double fRelativeStartValue, fRelativeEndValue, fRelativeDistance;
-
- if(DoScrollForward())
+
+ if(DoScrollForward())
{
fRelativeStartValue = fZeroRelative;
fRelativeEndValue = fInitRelative;
fRelativeDistance = fRelativeEndValue - fRelativeStartValue;
}
- else
+ else
{
fRelativeStartValue = fOneRelative;
fRelativeEndValue = fInitRelative;
fRelativeDistance = fRelativeStartValue - fRelativeEndValue;
}
-
+
const double fNumberSteps =
(fRelativeDistance * fDistanceLogic) / GetStepWidthLogic();
nLoopTime = FRound(fNumberSteps * mnFrequency);
-
+
// exit loop
ScrollTextAnimNode aExitNode(
nLoopTime, 1L,
@@ -559,32 +559,32 @@ ScrollTextAnimNode* ActivityImpl::ImpGetScrollTextAnimNode(
{
ScrollTextAnimNode* pRetval = 0L;
ImpForceScrollTextAnimNodes();
-
+
if(!maVector.empty())
{
rRelativeTime = nTime;
-
+
for(sal_uInt32 a(0L); !pRetval && a < maVector.size(); a++)
{
ScrollTextAnimNode & rNode = maVector[a];
- if(!rNode.GetRepeat())
+ if(!rNode.GetRepeat())
{
// endless loop, use it
pRetval = &rNode;
}
- else if(rNode.GetFullTime() > rRelativeTime)
+ else if(rNode.GetFullTime() > rRelativeTime)
{
// ending node
pRetval = &rNode;
}
- else
+ else
{
// look at next
rRelativeTime -= rNode.GetFullTime();
}
}
}
-
+
return pRetval;
}
@@ -592,38 +592,38 @@ sal_uInt32 ActivityImpl::ImpRegisterAgainScrollTextMixerState(sal_uInt32 nTime)
{
sal_uInt32 nRetval(0L);
ImpForceScrollTextAnimNodes();
-
+
if(maVector.size())
{
sal_uInt32 nRelativeTime;
ScrollTextAnimNode* pNode = ImpGetScrollTextAnimNode(nTime, nRelativeTime);
-
+
if(pNode)
{
- // take register time
+ // take register time
nRetval = pNode->GetFrequency();
}
}
else
{
- // #i38135# not initialized, return default
+ // #i38135# not initialized, return default
nRetval = mnFrequency;
}
-
+
return nRetval;
}
-void ActivityImpl::updateShapeAttributes(
+void ActivityImpl::updateShapeAttributes(
double fTime, basegfx::B2DRectangle const& parentBounds )
{
OSL_ASSERT( meAnimKind != drawing::TextAnimationKind_NONE );
if( meAnimKind == drawing::TextAnimationKind_NONE )
return;
-
+
double const fMixerState = GetMixerState(
static_cast<sal_uInt32>(fTime * 1000.0) );
-
- if( meAnimKind == drawing::TextAnimationKind_BLINK )
+
+ if( meAnimKind == drawing::TextAnimationKind_BLINK )
{
// show/hide text:
maShapeAttrLayer.get()->setVisibility( fMixerState < 0.5 );
@@ -633,23 +633,23 @@ void ActivityImpl::updateShapeAttributes(
//
// keep care: the below code is highly sensible to changes...
//
-
+
// rectangle of the pure text:
double const fPaintWidth = maPaintRectangleLogic.GetWidth();
double const fPaintHeight = maPaintRectangleLogic.GetHeight();
// rectangle where the scrolling takes place (-> clipping):
double const fScrollWidth = maScrollRectangleLogic.GetWidth();
double const fScrollHeight = maScrollRectangleLogic.GetHeight();
-
+
basegfx::B2DPoint pos, clipPos;
-
- if(ScrollHorizontal())
+
+ if(ScrollHorizontal())
{
double const fOneEquiv( fScrollWidth );
double const fZeroEquiv( -fPaintWidth );
pos.setX( fZeroEquiv + (fMixerState * (fOneEquiv - fZeroEquiv)) );
-
+
clipPos.setX( -pos.getX() );
clipPos.setY( -pos.getY() );
@@ -658,7 +658,7 @@ void ActivityImpl::updateShapeAttributes(
pos.setX( pos.getX() + (fPaintWidth-fScrollWidth) / 2.0 );
}
else
- {
+ {
// scroll vertical:
double const fOneEquiv( fScrollHeight );
double const fZeroEquiv( -fPaintHeight );
@@ -672,15 +672,15 @@ void ActivityImpl::updateShapeAttributes(
if( fPaintHeight > fScrollHeight )
pos.setY( pos.getY() + (fPaintHeight-fScrollHeight) / 2.0 );
}
-
+
basegfx::B2DPolygon clipPoly(
basegfx::tools::createPolygonFromRect(
basegfx::B2DRectangle( clipPos.getX(),
clipPos.getY(),
clipPos.getX() + fScrollWidth,
clipPos.getY() + fScrollHeight ) ) );
-
- if( !::basegfx::fTools::equalZero( mfRotationAngle ))
+
+ if( !::basegfx::fTools::equalZero( mfRotationAngle ))
{
maShapeAttrLayer.get()->setRotationAngle( mfRotationAngle );
double const fRotate = (mfRotationAngle * M_PI / 180.0);
@@ -689,7 +689,7 @@ void ActivityImpl::updateShapeAttributes(
aTransform.rotate( fRotate );
pos *= aTransform;
}
-
+
pos += parentBounds.getCenter();
maShapeAttrLayer.get()->setPosition( pos );
maShapeAttrLayer.get()->setClip( basegfx::B2DPolyPolygon(clipPoly) );
@@ -700,15 +700,15 @@ bool ActivityImpl::perform()
{
if( !isActive() )
return false;
-
+
ENSURE_OR_RETURN_FALSE(
mpDrawShape,
"ActivityImpl::perform(): still active, but NULL draw shape" );
-
+
DrawShapeSharedPtr const pParentDrawShape( mpParentDrawShape );
if( !pParentDrawShape )
return false; // parent has vanished
-
+
if( pParentDrawShape->isVisible() )
{
if( !mbIsShapeAnimated )
@@ -724,15 +724,15 @@ bool ActivityImpl::perform()
const double nCurrTime( maTimer.getElapsedTime() );
updateShapeAttributes( nCurrTime, parentBounds );
-
- const sal_uInt32 nFrequency(
+
+ const sal_uInt32 nFrequency(
ImpRegisterAgainScrollTextMixerState(
static_cast<sal_uInt32>(nCurrTime * 1000.0)) );
if(nFrequency)
{
mpWakeupEvent->start();
- mpWakeupEvent->setNextTimeout(
+ mpWakeupEvent->setNextTimeout(
std::max(0.1,nFrequency/1000.0) );
maContext.mrEventQueue.addEvent( mpWakeupEvent );
@@ -780,59 +780,59 @@ ActivityImpl::ActivityImpl(
pParentDrawShape->getTreeNode(
nNodes - 1,
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ).getEndIndex());
-
+
// TODO(Q3): Doing this manually, instead of using
// ShapeSubset. This is because of lifetime issues (ShapeSubset
// generates circular references to parent shape)
mpDrawShape = boost::dynamic_pointer_cast<DrawShape>(
- maContext.mpSubsettableShapeManager->getSubsetShape(
- pParentDrawShape,
+ maContext.mpSubsettableShapeManager->getSubsetShape(
+ pParentDrawShape,
scrollTextNode ));
mpMetaFile = mpDrawShape->forceScrollTextMetaFile();
-
+
// make scroll text invisible for slide transition bitmaps
- mpDrawShape->setVisibility(false);
+ mpDrawShape->setVisibility(false);
basegfx::B2DRectangle aScrollRect, aPaintRect;
- ENSURE_OR_THROW( getRectanglesFromScrollMtf( aScrollRect,
+ ENSURE_OR_THROW( getRectanglesFromScrollMtf( aScrollRect,
aPaintRect,
mpMetaFile ),
"ActivityImpl::ActivityImpl(): Could not extract "
"scroll anim rectangles from mtf" );
-
+
maScrollRectangleLogic = vcl::unotools::rectangleFromB2DRectangle(
aScrollRect );
maPaintRectangleLogic = vcl::unotools::rectangleFromB2DRectangle(
aPaintRect );
-
+
maShapeAttrLayer.createAttributeLayer(mpDrawShape);
uno::Reference<drawing::XShape> const xShape( mpDrawShape->getXShape() );
uno::Reference<beans::XPropertySet> const xProps( xShape, uno::UNO_QUERY_THROW );
-
+
getPropertyValue( meAnimKind, xProps, OUSTR("TextAnimationKind") );
- OSL_ASSERT( meAnimKind != drawing::TextAnimationKind_NONE );
+ OSL_ASSERT( meAnimKind != drawing::TextAnimationKind_NONE );
mbAlternate = (meAnimKind == drawing::TextAnimationKind_ALTERNATE);
mbScrollIn = (meAnimKind == drawing::TextAnimationKind_SLIDE);
-
+
// adopted from in AInfoBlinkText::ImplInit():
sal_Int16 nRepeat(0);
getPropertyValue( nRepeat, xProps, OUSTR("TextAnimationCount") );
mnRepeat = nRepeat;
-
- if(mbAlternate)
+
+ if(mbAlternate)
{
// force visible when started for scroll-forth-and-back, because
// slide has been coming in with visible text in the middle:
mbVisibleWhenStarted = true;
}
- else
+ else
{
getPropertyValue( mbVisibleWhenStarted, xProps,
OUSTR("TextAnimationStartInside") );
}
-
+
// set visible when stopped
getPropertyValue( mbVisibleWhenStopped, xProps,
OUSTR("TextAnimatiogonStopInside") );
@@ -840,7 +840,7 @@ ActivityImpl::ActivityImpl(
getPropertyValue( mfRotationAngle, xProps,
OUSTR("RotateAngle") );
mfRotationAngle /= -100.0; // (switching direction)
-
+
// set frequency
sal_Int16 nDelay(0);
getPropertyValue( nDelay, xProps, OUSTR("TextAnimationDelay") );
@@ -849,11 +849,11 @@ ActivityImpl::ActivityImpl(
// default:
meAnimKind == drawing::TextAnimationKind_BLINK
? 250L : 50L );
-
+
// adopted from in AInfoScrollText::ImplInit():
-
+
// If it is a simple m_bScrollIn, reset some parameters
- if( DoScrollIn() )
+ if( DoScrollIn() )
{
// most parameters are set correctly from the dialog logic, but
// eg VisisbleWhenStopped is grayed out and needs to be corrected here.
@@ -861,14 +861,14 @@ ActivityImpl::ActivityImpl(
mbVisibleWhenStarted = false;
mnRepeat = 0L;
}
-
+
// Get animation direction
getPropertyValue( meDirection, xProps, OUSTR("TextAnimationDirection") );
-
+
// Get step width. Negative means pixel, positive logical units
getPropertyValue( mnStepWidth, xProps, OUSTR("TextAnimationAmount") );
- maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler(
+ maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler(
mpListener );
}
@@ -901,7 +901,7 @@ void ActivityImpl::dispose()
// shape)
DrawShapeSharedPtr pParent( mpParentDrawShape.lock() );
if( pParent )
- maContext.mpSubsettableShapeManager->revokeSubset(
+ maContext.mpSubsettableShapeManager->revokeSubset(
pParent,
mpDrawShape );
}
@@ -913,7 +913,7 @@ void ActivityImpl::dispose()
maContext.dispose();
mbIsDisposed = true;
- maContext.mpSubsettableShapeManager->removeIntrinsicAnimationHandler(
+ maContext.mpSubsettableShapeManager->removeIntrinsicAnimationHandler(
mpListener );
}
}
@@ -974,7 +974,7 @@ boost::shared_ptr<Activity> createDrawingLayerAnimActivity(
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
}
return pActivity;
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.hxx b/slideshow/source/engine/shapes/drawinglayeranimation.hxx
index 45d9afe91f03..b1d2bd1c60a3 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.hxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index e018c8015b0a..605532f3673e 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -2,7 +2,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
@@ -92,7 +92,7 @@ namespace slideshow
//#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100%
//metafiles are resolution dependent when bitmaps are contained with is the case for 3D scenes for example
//in addition a chart has resolution dependent content as it might skip points that are not visible for a given resolution (this is done for performance reasons)
- bool local_getMetafileForChart( const uno::Reference< lang::XComponent >& xSource,
+ bool local_getMetafileForChart( const uno::Reference< lang::XComponent >& xSource,
const uno::Reference< drawing::XDrawPage >& xContainingPage,
GDIMetaFile& rMtf )
{
@@ -156,7 +156,7 @@ namespace slideshow
if(nMaxPixWidth>1 && nMaxPixHeight>1)
aPixelPerChart = awt::Size( nMaxPixWidth, nMaxPixHeight );//this is still to much (but costs only seldom performance), correct would be pixel per chart object
}
-
+
try
{
uno::Sequence< beans::PropertyValue > aZoomFactors(4);
@@ -172,7 +172,7 @@ namespace slideshow
xChartViewProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ZoomFactors") ), uno::makeAny( aZoomFactors ));
xChartViewProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Resolution") ), uno::makeAny( aPixelPerChart ));
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -198,7 +198,7 @@ namespace slideshow
//same as getMetafile with an exception for charts
//for charts a metafile with a higher resolution is created, because charts have resolution dependent content
- bool local_getMetaFile_WithSpecialChartHandling( const uno::Reference< lang::XComponent >& xSource,
+ bool local_getMetaFile_WithSpecialChartHandling( const uno::Reference< lang::XComponent >& xSource,
const uno::Reference< drawing::XDrawPage >& xContainingPage,
GDIMetaFile& rMtf,
int mtfLoadFlags,
@@ -221,7 +221,7 @@ namespace slideshow
GDIMetaFileSharedPtr DrawShape::forceScrollTextMetaFile()
{
- if ((mnCurrMtfLoadFlags & MTF_LOAD_SCROLL_TEXT_MTF) != MTF_LOAD_SCROLL_TEXT_MTF)
+ if ((mnCurrMtfLoadFlags & MTF_LOAD_SCROLL_TEXT_MTF) != MTF_LOAD_SCROLL_TEXT_MTF)
{
// reload with added flags:
mpCurrMtf.reset( new GDIMetaFile );
@@ -235,13 +235,13 @@ namespace slideshow
// never contain any verbose text comments. Thus,
// can only display the full mtf content, no
// subsets.
- maSubsetting.reset( mpCurrMtf );
+ maSubsetting.reset( mpCurrMtf );
// adapt maBounds. the requested scroll text metafile
// will typically have dimension different from the
// actual shape
::basegfx::B2DRectangle aScrollRect, aPaintRect;
- ENSURE_OR_THROW( getRectanglesFromScrollMtf( aScrollRect,
+ ENSURE_OR_THROW( getRectanglesFromScrollMtf( aScrollRect,
aPaintRect,
mpCurrMtf ),
"DrawShape::forceScrollTextMetaFile(): Could "
@@ -257,7 +257,7 @@ namespace slideshow
}
return mpCurrMtf;
}
-
+
void DrawShape::updateStateIds() const
{
// Update the states, we've just redrawn or created a new
@@ -350,12 +350,12 @@ namespace slideshow
_1,
::boost::cref( mpCurrMtf ),
::boost::cref(
- getViewRenderArgs() ),
+ getViewRenderArgs() ),
nUpdateFlags,
- isVisible() ) )
+ isVisible() ) )
!= static_cast<ViewShapeVector::difference_type>(maViewShapes.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;
}
@@ -397,7 +397,7 @@ namespace slideshow
nUpdateFlags |= ViewShape::CONTENT;
}
- // TODO(P1): This can be done without conditional branching.
+ // TODO(P1): This can be done without conditional branching.
// See HAKMEM.
if( mpAttributeLayer->getPositionState() != mnAttributePositionState )
{
@@ -412,11 +412,11 @@ namespace slideshow
nUpdateFlags |= ViewShape::CLIP;
}
if( mpAttributeLayer->getTransformationState() != mnAttributeTransformationState )
- {
+ {
nUpdateFlags |= ViewShape::TRANSFORMATION;
}
if( mpAttributeLayer->getContentState() != mnAttributeContentState )
- {
+ {
nUpdateFlags |= ViewShape::CONTENT;
}
}
@@ -430,7 +430,7 @@ namespace slideshow
ENSURE_OR_THROW( !maViewShapes.empty(),
"DrawShape::getActualUnitShapeBounds(): called on DrawShape without views" );
- const VectorOfDocTreeNodes& rSubsets(
+ const VectorOfDocTreeNodes& rSubsets(
maSubsetting.getActiveSubsets() );
const ::basegfx::B2DRectangle aDefaultBounds( 0.0,0.0,1.0,1.0 );
@@ -467,15 +467,15 @@ namespace slideshow
// added or removed). Maybe we should exclude it here,
// always assuming full bounds?
- ::cppcanvas::CanvasSharedPtr pDestinationCanvas(
+ ::cppcanvas::CanvasSharedPtr pDestinationCanvas(
maViewShapes.front()->getViewLayer()->getCanvas() );
// TODO(Q2): Although this _is_ currently
// view-agnostic, it might not stay like
// that. Maybe this method should again be moved
// to the ViewShape
- ::cppcanvas::RendererSharedPtr pRenderer(
- maViewShapes.front()->getRenderer(
+ ::cppcanvas::RendererSharedPtr pRenderer(
+ maViewShapes.front()->getRenderer(
pDestinationCanvas, mpCurrMtf, mpAttributeLayer ) );
// If we cannot not prefetch, be defensive and assume
@@ -485,11 +485,11 @@ namespace slideshow
// temporarily, switch total transformation to identity
// (need the bounds in the [0,1]x[0,1] unit coordinate
// system.
- ::basegfx::B2DHomMatrix aEmptyTransformation;
+ ::basegfx::B2DHomMatrix aEmptyTransformation;
- ::basegfx::B2DHomMatrix aOldTransform( pDestinationCanvas->getTransformation() );
+ ::basegfx::B2DHomMatrix aOldTransform( pDestinationCanvas->getTransformation() );
pDestinationCanvas->setTransformation( aEmptyTransformation );
- pRenderer->setTransformation( aEmptyTransformation );
+ pRenderer->setTransformation( aEmptyTransformation );
// restore old transformation when leaving the scope
const ::comphelper::ScopeGuard aGuard(
@@ -504,16 +504,16 @@ namespace slideshow
// cannot use ::boost::bind, ::basegfx::B2DRange::expand()
// is overloaded.
- VectorOfDocTreeNodes::const_iterator aCurr( rSubsets.begin() );
- const VectorOfDocTreeNodes::const_iterator aEnd( rSubsets.end() );
+ VectorOfDocTreeNodes::const_iterator aCurr( rSubsets.begin() );
+ const VectorOfDocTreeNodes::const_iterator aEnd( rSubsets.end() );
while( aCurr != aEnd )
{
- aTotalBounds.expand( pRenderer->getSubsetArea(
+ aTotalBounds.expand( pRenderer->getSubsetArea(
aCurr->getStartIndex(),
aCurr->getEndIndex() ) );
++aCurr;
}
-
+
OSL_ENSURE( aTotalBounds.getMinX() >= -0.1 &&
aTotalBounds.getMinY() >= -0.1 &&
aTotalBounds.getMaxX() <= 1.1 &&
@@ -524,7 +524,7 @@ namespace slideshow
// original bounds (there _are_ some pathologic cases,
// especially when imported from PPT, that have
// e.g. obscenely large polygon bounds)
- aTotalBounds.intersect(
+ aTotalBounds.intersect(
::basegfx::B2DRange( 0.0, 0.0,
1.0, 1.0 ));
@@ -536,10 +536,10 @@ namespace slideshow
}
}
- DrawShape::DrawShape( const uno::Reference< drawing::XShape >& xShape,
- const uno::Reference< drawing::XDrawPage >& xContainingPage,
- double nPrio,
- bool bForeignSource,
+ DrawShape::DrawShape( const uno::Reference< drawing::XShape >& xShape,
+ const uno::Reference< drawing::XDrawPage >& xContainingPage,
+ double nPrio,
+ bool bForeignSource,
const SlideShowContext& rContext ) :
mxShape( xShape ),
mxPage( xContainingPage ),
@@ -574,16 +574,16 @@ namespace slideshow
{
ENSURE_OR_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" );
ENSURE_OR_THROW( mxPage.is(), "DrawShape::DrawShape(): Invalid containing page" );
-
+
// check for drawing layer animations:
drawing::TextAnimationKind eKind = drawing::TextAnimationKind_NONE;
- uno::Reference<beans::XPropertySet> xPropSet( mxShape,
+ uno::Reference<beans::XPropertySet> xPropSet( mxShape,
uno::UNO_QUERY );
if( xPropSet.is() )
getPropertyValue( eKind, xPropSet,
OUSTR("TextAnimationKind") );
mbDrawingLayerAnim = (eKind != drawing::TextAnimationKind_NONE);
-
+
// must NOT be called from within initializer list, uses
// state from mnCurrMtfLoadFlags!
mpCurrMtf.reset( new GDIMetaFile );
@@ -594,14 +594,14 @@ namespace slideshow
ENSURE_OR_THROW( mpCurrMtf,
"DrawShape::DrawShape(): Invalid metafile" );
maSubsetting.reset( mpCurrMtf );
-
+
prepareHyperlinkIndices();
}
- DrawShape::DrawShape( const uno::Reference< drawing::XShape >& xShape,
- const uno::Reference< drawing::XDrawPage >& xContainingPage,
- double nPrio,
- const Graphic& rGraphic,
+ DrawShape::DrawShape( const uno::Reference< drawing::XShape >& xShape,
+ const uno::Reference< drawing::XDrawPage >& xContainingPage,
+ double nPrio,
+ const Graphic& rGraphic,
const SlideShowContext& rContext ) :
mxShape( xShape ),
mxPage( xContainingPage ),
@@ -651,9 +651,9 @@ namespace slideshow
ENSURE_OR_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" );
}
- DrawShape::DrawShape( const DrawShape& rSrc,
- const DocTreeNode& rTreeNode,
- double nPrio ) :
+ DrawShape::DrawShape( const DrawShape& rSrc,
+ const DocTreeNode& rTreeNode,
+ double nPrio ) :
mxShape( rSrc.mxShape ),
mxPage( rSrc.mxPage ),
maAnimationFrames(), // don't copy animations for subsets,
@@ -690,7 +690,7 @@ namespace slideshow
// xxx todo: currently not implemented for subsetted shapes;
// would mean modifying set of hyperlink regions when
- // subsetting text portions. N.B.: there's already an
+ // subsetting text portions. N.B.: there's already an
// issue for this #i72828#
}
@@ -701,10 +701,10 @@ namespace slideshow
//////////////////////////////////////////////////////////////////////
DrawShapeSharedPtr DrawShape::create(
- const uno::Reference< drawing::XShape >& xShape,
- const uno::Reference< drawing::XDrawPage >& xContainingPage,
- double nPrio,
- bool bForeignSource,
+ const uno::Reference< drawing::XShape >& xShape,
+ const uno::Reference< drawing::XDrawPage >& xContainingPage,
+ double nPrio,
+ bool bForeignSource,
const SlideShowContext& rContext )
{
DrawShapeSharedPtr pShape( new DrawShape(xShape,
@@ -716,10 +716,10 @@ namespace slideshow
if( pShape->hasIntrinsicAnimation() )
{
OSL_ASSERT( pShape->maAnimationFrames.empty() );
- if( pShape->getNumberOfTreeNodes(
+ if( pShape->getNumberOfTreeNodes(
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH) > 0 )
{
- pShape->mpIntrinsicAnimationActivity =
+ pShape->mpIntrinsicAnimationActivity =
createDrawingLayerAnimActivity(
rContext,
pShape);
@@ -732,17 +732,17 @@ namespace slideshow
return pShape;
}
- DrawShapeSharedPtr DrawShape::create(
- const uno::Reference< drawing::XShape >& xShape,
- const uno::Reference< drawing::XDrawPage >& xContainingPage,
- double nPrio,
- const Graphic& rGraphic,
+ DrawShapeSharedPtr DrawShape::create(
+ const uno::Reference< drawing::XShape >& xShape,
+ const uno::Reference< drawing::XDrawPage >& xContainingPage,
+ double nPrio,
+ const Graphic& rGraphic,
const SlideShowContext& rContext )
{
- DrawShapeSharedPtr pShape( new DrawShape(xShape,
- xContainingPage,
- nPrio,
- rGraphic,
+ DrawShapeSharedPtr pShape( new DrawShape(xShape,
+ xContainingPage,
+ nPrio,
+ rGraphic,
rContext) );
if( pShape->hasIntrinsicAnimation() )
@@ -755,12 +755,12 @@ namespace slideshow
pShape->maAnimationFrames.end(),
std::back_insert_iterator< std::vector<double> >( aTimeout ),
boost::mem_fn(&MtfAnimationFrame::getDuration) );
-
+
WakeupEventSharedPtr pWakeupEvent(
new WakeupEvent( rContext.mrEventQueue.getTimer(),
rContext.mrActivitiesQueue ) );
-
- ActivitySharedPtr pActivity =
+
+ ActivitySharedPtr pActivity =
createIntrinsicAnimationActivity(
rContext,
pShape,
@@ -772,7 +772,7 @@ namespace slideshow
pWakeupEvent->setActivity( pActivity );
pShape->mpIntrinsicAnimationActivity = pActivity;
}
-
+
OSL_ENSURE( !pShape->hasHyperlinks(),
"DrawShape::create(): graphic-only shapes must not have hyperlinks!" );
@@ -783,13 +783,13 @@ namespace slideshow
{
try
{
- // dispose intrinsic animation activity, else, it will
- // linger forever
+ // dispose intrinsic animation activity, else, it will
+ // linger forever
ActivitySharedPtr pActivity( mpIntrinsicAnimationActivity.lock() );
if( pActivity )
pActivity->dispose();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -804,14 +804,14 @@ namespace slideshow
}
void DrawShape::addViewLayer( const ViewLayerSharedPtr& rNewLayer,
- bool bRedrawLayer )
+ bool bRedrawLayer )
{
ViewShapeVector::iterator aEnd( maViewShapes.end() );
// already added?
- if( ::std::find_if( maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( ::std::find_if( maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewShape::getViewLayer,
_1 ),
@@ -835,9 +835,9 @@ namespace slideshow
// render the Shape on the newly added ViewLayer
if( bRedrawLayer )
{
- pNewShape->update( mpCurrMtf,
+ pNewShape->update( mpCurrMtf,
getViewRenderArgs(),
- ViewShape::FORCE,
+ ViewShape::FORCE,
isVisible() );
}
}
@@ -846,9 +846,9 @@ namespace slideshow
{
const ViewShapeVector::iterator aEnd( maViewShapes.end() );
- OSL_ENSURE( ::std::count_if(maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ OSL_ENSURE( ::std::count_if(maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewShape::getViewLayer,
_1 ),
@@ -857,9 +857,9 @@ namespace slideshow
ViewShapeVector::iterator aIter;
- if( (aIter=::std::remove_if( maViewShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( (aIter=::std::remove_if( maViewShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewShape::getViewLayer,
_1 ),
@@ -905,8 +905,8 @@ namespace slideshow
bool DrawShape::isContentChanged() const
{
- return mbForceUpdate ?
- true :
+ return mbForceUpdate ?
+ true :
getUpdateFlags() != ViewShape::NONE;
}
@@ -935,7 +935,7 @@ namespace slideshow
*/
class Expander
{
- public:
+ public:
Expander( ::basegfx::B2DSize& rBounds ) :
mrBounds( rBounds )
{
@@ -945,11 +945,11 @@ namespace slideshow
{
const ::basegfx::B2DSize& rShapeBorder( rShape->getAntialiasingBorder() );
- mrBounds.setX(
+ mrBounds.setX(
::std::max(
rShapeBorder.getX(),
mrBounds.getX() ) );
- mrBounds.setY(
+ mrBounds.setY(
::std::max(
rShapeBorder.getY(),
mrBounds.getY() ) );
@@ -1144,7 +1144,7 @@ namespace slideshow
{
return ! maHyperlinkRegions.empty();
}
-
+
HyperlinkArea::HyperlinkRegions DrawShape::getHyperlinkRegions() const
{
OSL_ASSERT( !maViewShapes.empty() );
@@ -1167,13 +1167,13 @@ namespace slideshow
pViewShape->getViewLayer()->getCanvas() );
// reuse Renderer of first view shape:
- cppcanvas::RendererSharedPtr const pRenderer(
+ cppcanvas::RendererSharedPtr const pRenderer(
pViewShape->getRenderer(
pCanvas, mpCurrMtf, mpAttributeLayer ) );
OSL_ASSERT( pRenderer );
- if (pRenderer)
+ if (pRenderer)
{
basegfx::B2DHomMatrix const aOldTransform(
pCanvas->getTransformation() );
@@ -1189,8 +1189,8 @@ namespace slideshow
maBounds.getHeight() );
pRenderer->setTransformation( aTransform );
pRenderer->setClip();
-
- for( std::size_t pos = maHyperlinkRegions.size(); pos--; )
+
+ for( std::size_t pos = maHyperlinkRegions.size(); pos--; )
{
// get region:
HyperlinkIndexPair const& rIndices = maHyperlinkIndices[pos];
@@ -1291,7 +1291,7 @@ namespace slideshow
{
// it's the toplevel layer
mpAttributeLayer = mpAttributeLayer->getChildLayer();
-
+
// force content redraw, all state variables have
// possibly changed
mbAttributeLayerRevoked = true;
@@ -1341,13 +1341,13 @@ namespace slideshow
{
ENSURE_OR_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0,
"DrawShape::getSubset(): subset query on shape with apparently no subsets" );
-
+
// forward to delegate
return maSubsetting.getSubsetShape( rTreeNode );
}
- bool DrawShape::createSubset( AttributableShapeSharedPtr& o_rSubset,
- const DocTreeNode& rTreeNode )
+ bool DrawShape::createSubset( AttributableShapeSharedPtr& o_rSubset,
+ const DocTreeNode& rTreeNode )
{
ENSURE_OR_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0,
"DrawShape::createSubset(): subset query on shape with apparently no subsets" );
@@ -1368,14 +1368,14 @@ namespace slideshow
else
{
// not yet created, init entry
- o_rSubset.reset( new DrawShape( *this,
- rTreeNode,
+ o_rSubset.reset( new DrawShape( *this,
+ rTreeNode,
// TODO(Q3): That's a
// hack. We assume
// that start and end
// index will always
// be less than 65535
- mnPriority +
+ mnPriority +
rTreeNode.getStartIndex()/double(SAL_MAX_INT16) ));
bNewlyCreated = true; // subset newly created
@@ -1384,7 +1384,7 @@ namespace slideshow
// always register shape at DrawShapeSubsetting, to keep
// refcount up-to-date
maSubsetting.addSubsetShape( o_rSubset );
-
+
// flush bounds cache
maCurrentShapeUnitBounds.reset();
@@ -1408,7 +1408,7 @@ namespace slideshow
mbForceUpdate = true;
// #i47428# TEMP FIX: synchronize visibility of subset
- // with parent.
+ // with parent.
// TODO(F3): Remove here, and implement
// TEXT_ONLY/BACKGROUND_ONLY with the proverbial
@@ -1416,7 +1416,7 @@ namespace slideshow
// persistent subset, containing all text/only the
// background respectively. From _that_ object,
// generate the temporary character subset shapes.
- const ShapeAttributeLayerSharedPtr& rAttrLayer(
+ const ShapeAttributeLayerSharedPtr& rAttrLayer(
rShape->getTopmostAttributeLayer() );
if( rAttrLayer &&
rAttrLayer->isVisibilityValid() &&
@@ -1430,7 +1430,7 @@ namespace slideshow
else
mbIsVisible = bVisibility;
}
-
+
// END TEMP FIX
return true;
@@ -1446,8 +1446,8 @@ namespace slideshow
return maSubsetting.getNumberOfTreeNodes( eNodeType );
}
- DocTreeNode DrawShape::getTreeNode( sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException
+ DocTreeNode DrawShape::getTreeNode( sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException
{
ensureVerboseMtfComments();
@@ -1459,7 +1459,7 @@ namespace slideshow
return maSubsetting.getTreeNode( nNodeIndex, eNodeType );
}
- sal_Int32 DrawShape::getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode,
+ sal_Int32 DrawShape::getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode,
DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException
{
ensureVerboseMtfComments();
@@ -1467,9 +1467,9 @@ namespace slideshow
return maSubsetting.getNumberOfSubsetTreeNodes( rParentNode, eNodeType );
}
- DocTreeNode DrawShape::getSubsetTreeNode( const DocTreeNode& rParentNode,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException
+ DocTreeNode DrawShape::getSubsetTreeNode( const DocTreeNode& rParentNode,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const // throw ShapeLoadFailedException
{
ensureVerboseMtfComments();
diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx
index a657d337064e..f7235dd7d87d 100644
--- a/slideshow/source/engine/shapes/drawshape.hxx
+++ b/slideshow/source/engine/shapes/drawshape.hxx
@@ -2,7 +2,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
@@ -89,15 +89,15 @@ namespace slideshow
unsupported content, and, if necessary, returned as a
pre-rendererd bitmap.
*/
- static DrawShapeSharedPtr create(
- const ::com::sun::star::uno::Reference<
+ static DrawShapeSharedPtr create(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xContainingPage,
double nPrio,
bool bForeignSource,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
-
+
/** Create a shape for the given XShape and graphic content
@param xShape
@@ -118,16 +118,16 @@ namespace slideshow
DrawShape will register itself for intrinsic animation
events.
*/
- static DrawShapeSharedPtr create(
- const ::com::sun::star::uno::Reference<
+ static DrawShapeSharedPtr create(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xContainingPage,
double nPrio,
const Graphic& rGraphic,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > getXShape() const;
virtual ~DrawShape();
@@ -149,7 +149,7 @@ namespace slideshow
virtual ShapeAttributeLayerSharedPtr getTopmostAttributeLayer() const;
virtual void setVisibility( bool bVisible );
virtual ::basegfx::B2DRectangle getBounds() const;
- virtual ::basegfx::B2DRectangle getDomBounds() const;
+ virtual ::basegfx::B2DRectangle getDomBounds() const;
virtual ::basegfx::B2DRectangle getUpdateArea() const;
virtual bool isVisible() const;
virtual double getPriority() const;
@@ -177,7 +177,7 @@ namespace slideshow
virtual DocTreeNode getSubsetNode() const;
virtual AttributableShapeSharedPtr getSubset( const DocTreeNode& rTreeNode ) const;
- virtual bool createSubset( AttributableShapeSharedPtr& o_rSubset,
+ virtual bool createSubset( AttributableShapeSharedPtr& o_rSubset,
const DocTreeNode& rTreeNode );
virtual bool revokeSubset( const AttributableShapeSharedPtr& rShape );
@@ -210,13 +210,13 @@ namespace slideshow
animation frame.
*/
bool setIntrinsicAnimationFrame( ::std::size_t nCurrFrame );
-
+
/** forces the drawshape to load and return a specially
crafted metafile, usable to display drawing layer text
animations.
*/
GDIMetaFileSharedPtr forceScrollTextMetaFile();
-
+
private:
/** Create a shape for the given XShape
@@ -238,9 +238,9 @@ namespace slideshow
unsupported content, and, if necessary, returned as a
pre-rendererd bitmap.
*/
- DrawShape( const ::com::sun::star::uno::Reference<
+ DrawShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xContainingPage,
double nPrio,
bool bForeignSource,
@@ -266,9 +266,9 @@ namespace slideshow
DrawShape will register itself for intrinsic animation
events.
*/
- DrawShape( const ::com::sun::star::uno::Reference<
+ DrawShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage >& xContainingPage,
double nPrio,
const Graphic& rGraphic,
@@ -279,7 +279,7 @@ namespace slideshow
Used to create subsetted shapes
*/
DrawShape( const DrawShape&, const DocTreeNode& rTreeNode, double nPrio );
-
+
int getUpdateFlags() const;
bool implRender( int nUpdateFlags ) const;
void updateStateIds() const;
@@ -291,11 +291,11 @@ namespace slideshow
bool hasIntrinsicAnimation() const;
bool hasHyperlinks() const;
void prepareHyperlinkIndices() const;
-
+
/// The associated XShape
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > mxShape;
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage > mxPage;
/** A vector of metafiles actually representing the Shape.
@@ -318,7 +318,7 @@ namespace slideshow
// The attributes of this Shape
const double mnPriority;
::basegfx::B2DRectangle maBounds; // always needed for rendering.
- // for subset shapes, this member
+ // for subset shapes, this member
// might change when views are
// added, as minimal bounds are
// calculated
@@ -341,8 +341,8 @@ namespace slideshow
/// the list of active view shapes (one for each registered view layer)
typedef ::std::vector< ViewShapeSharedPtr > ViewShapeVector;
ViewShapeVector maViewShapes;
-
- ::com::sun::star::uno::Reference<
+
+ ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext> mxComponentContext;
/// hyperlink support
@@ -351,7 +351,7 @@ namespace slideshow
typedef ::std::vector<HyperlinkIndexPair> HyperlinkIndexPairVector;
mutable HyperlinkIndexPairVector maHyperlinkIndices;
mutable HyperlinkRegions maHyperlinkRegions;
-
+
/// Delegated subset handling
mutable DrawShapeSubsetting maSubsetting;
@@ -372,10 +372,10 @@ namespace slideshow
/// Whether attribute layer was revoked (making a redraw necessary)
mutable bool mbAttributeLayerRevoked;
-
+
/// whether a drawing layer animation has to be performed
bool mbDrawingLayerAnim;
-
+
};
}
}
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index 62dc22ea3dc0..889e9566c76e 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -2,7 +2,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
@@ -255,14 +255,14 @@ namespace slideshow
maCurrentSubsets(),
mbNodeTreeInitialized( false )
{
- ENSURE_OR_THROW( mpMtf,
+ ENSURE_OR_THROW( mpMtf,
"DrawShapeSubsetting::DrawShapeSubsetting(): Invalid metafile" );
initCurrentSubsets();
}
- DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
- const GDIMetaFileSharedPtr& rMtf ) :
+ DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
+ const GDIMetaFileSharedPtr& rMtf ) :
maActionClassVector(),
mpMtf( rMtf ),
maSubset( rShapeSubset ),
@@ -272,7 +272,7 @@ namespace slideshow
maCurrentSubsets(),
mbNodeTreeInitialized( false )
{
- ENSURE_OR_THROW( mpMtf,
+ ENSURE_OR_THROW( mpMtf,
"DrawShapeSubsetting::DrawShapeSubsetting(): Invalid metafile" );
initCurrentSubsets();
@@ -333,9 +333,9 @@ namespace slideshow
// subset shape already created for this DocTreeNode?
SubsetEntry aEntry;
-
- aEntry.mnStartActionIndex = rTreeNode.getStartIndex();
- aEntry.mnEndActionIndex = rTreeNode.getEndIndex();
+
+ aEntry.mnStartActionIndex = rTreeNode.getStartIndex();
+ aEntry.mnEndActionIndex = rTreeNode.getEndIndex();
ShapeSet::const_iterator aIter;
if( (aIter=maSubsetShapes.find( aEntry )) != maSubsetShapes.end() )
@@ -354,9 +354,9 @@ namespace slideshow
// subset shape already created for this DocTreeNode?
SubsetEntry aEntry;
const DocTreeNode& rEffectiveSubset( rShape->getSubsetNode() );
-
- aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex();
- aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex();
+
+ aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex();
+ aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex();
ShapeSet::const_iterator aIter;
if( (aIter=maSubsetShapes.find( aEntry )) != maSubsetShapes.end() )
@@ -372,9 +372,9 @@ namespace slideshow
// not yet created, init entry
aEntry.mnSubsetQueriedCount = 1;
aEntry.mpShape = rShape;
-
+
maSubsetShapes.insert( aEntry );
-
+
// update cached subset borders
updateSubsetBounds( aEntry );
updateSubsets();
@@ -388,9 +388,9 @@ namespace slideshow
// lookup subset shape
SubsetEntry aEntry;
const DocTreeNode& rEffectiveSubset( rShape->getSubsetNode() );
-
- aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex();
- aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex();
+
+ aEntry.mnStartActionIndex = rEffectiveSubset.getStartIndex();
+ aEntry.mnEndActionIndex = rEffectiveSubset.getEndIndex();
ShapeSet::iterator aIter;
if( (aIter=maSubsetShapes.find( aEntry )) == maSubsetShapes.end() )
@@ -430,7 +430,7 @@ namespace slideshow
mnMinSubsetActionIndex = SAL_MAX_INT32;
mnMaxSubsetActionIndex = 0;
- // TODO(P2): This is quite expensive, when
+ // TODO(P2): This is quite expensive, when
// after every subset effect end, we have to scan
// the whole shape set
@@ -467,8 +467,8 @@ namespace slideshow
element (i.e. the iterators from the start to the end
of this element).
<pre>
- bool operator()( IndexClassificator eCurrElemClassification
- sal_Int32 nCurrElemCount,
+ bool operator()( IndexClassificator eCurrElemClassification
+ sal_Int32 nCurrElemCount,
const IndexClassificatorVector::const_iterator& rCurrElemBegin,
const IndexClassificatorVector::const_iterator& rCurrElemEnd );
</pre>
@@ -487,7 +487,7 @@ namespace slideshow
@return the number of shapes found in the metafile
*/
template< typename FunctorT > void iterateActionClassifications(
- FunctorT& io_rFunctor,
+ FunctorT& io_rFunctor,
const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin,
const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd )
{
@@ -540,7 +540,7 @@ namespace slideshow
case DrawShapeSubsetting::CLASS_SHAPE_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_SHAPE_END,
- nCurrShapeCount,
+ nCurrShapeCount,
aLastShapeStart,
aNext ) )
{
@@ -552,7 +552,7 @@ namespace slideshow
// ends lines
case DrawShapeSubsetting::CLASS_PARAGRAPH_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_PARAGRAPH_END,
- nCurrParaCount,
+ nCurrParaCount,
aLastParaStart,
aNext ) )
{
@@ -565,7 +565,7 @@ namespace slideshow
// ends line
case DrawShapeSubsetting::CLASS_LINE_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_LINE_END,
- nCurrLineCount,
+ nCurrLineCount,
aLastLineStart,
aNext ) )
{
@@ -592,7 +592,7 @@ namespace slideshow
// FALLTHROUGH intended
case DrawShapeSubsetting::CLASS_SENTENCE_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_SENTENCE_END,
- nCurrSentenceCount,
+ nCurrSentenceCount,
aLastSentenceStart,
aNext ) )
{
@@ -604,7 +604,7 @@ namespace slideshow
// FALLTHROUGH intended
case DrawShapeSubsetting::CLASS_WORD_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_WORD_END,
- nCurrWordCount,
+ nCurrWordCount,
aLastWordStart,
aNext ) )
{
@@ -616,7 +616,7 @@ namespace slideshow
// FALLTHROUGH intended
case DrawShapeSubsetting::CLASS_CHARACTER_CELL_END:
if( !io_rFunctor( DrawShapeSubsetting::CLASS_CHARACTER_CELL_END,
- nCurrCharCount,
+ nCurrCharCount,
aLastCharStart,
aNext ) )
{
@@ -669,16 +669,16 @@ namespace slideshow
class CountClassFunctor
{
public:
- CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) :
+ CountClassFunctor( DrawShapeSubsetting::IndexClassificator eClass ) :
meClass( eClass ),
mnCurrCount(0)
{
}
- bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification,
- sal_Int32 /*nCurrElemCount*/,
- const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemBegin*/,
- const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemEnd*/ )
+ bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification,
+ sal_Int32 /*nCurrElemCount*/,
+ const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemBegin*/,
+ const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& /*rCurrElemEnd*/ )
{
if( eCurrElemClassification == meClass )
++mnCurrCount;
@@ -693,15 +693,15 @@ namespace slideshow
private:
DrawShapeSubsetting::IndexClassificator meClass;
- sal_Int32 mnCurrCount;
+ sal_Int32 mnCurrCount;
};
}
sal_Int32 DrawShapeSubsetting::implGetNumberOfTreeNodes( const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin,
const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd,
- DocTreeNode::NodeType eNodeType ) const
+ DocTreeNode::NodeType eNodeType ) const
{
- const IndexClassificator eRequestedClass(
+ const IndexClassificator eRequestedClass(
mapDocTreeNode( eNodeType ) );
// create a counting functor for the requested class of
@@ -736,17 +736,17 @@ namespace slideshow
class FindNthElementFunctor
{
public:
- FindNthElementFunctor( sal_Int32 nNodeIndex,
- DrawShapeSubsetting::IndexClassificator eClass ) :
+ FindNthElementFunctor( sal_Int32 nNodeIndex,
+ DrawShapeSubsetting::IndexClassificator eClass ) :
mnNodeIndex( nNodeIndex ),
meClass( eClass )
{
}
- bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification,
- sal_Int32 nCurrElemCount,
- const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemBegin,
- const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemEnd )
+ bool operator()( DrawShapeSubsetting::IndexClassificator eCurrElemClassification,
+ sal_Int32 nCurrElemCount,
+ const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemBegin,
+ const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rCurrElemEnd )
{
if( eCurrElemClassification == meClass &&
nCurrElemCount == mnNodeIndex )
@@ -773,16 +773,16 @@ namespace slideshow
}
private:
- sal_Int32 mnNodeIndex;
- DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastBegin;
- DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastEnd;
- DrawShapeSubsetting::IndexClassificator meClass;
+ sal_Int32 mnNodeIndex;
+ DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastBegin;
+ DrawShapeSubsetting::IndexClassificatorVector::const_iterator maLastEnd;
+ DrawShapeSubsetting::IndexClassificator meClass;
};
DocTreeNode makeTreeNode( const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rBegin,
const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rStart,
const DrawShapeSubsetting::IndexClassificatorVector::const_iterator& rEnd,
- DocTreeNode::NodeType eNodeType )
+ DocTreeNode::NodeType eNodeType )
{
return DocTreeNode( ::std::distance(rBegin,
rStart),
@@ -792,12 +792,12 @@ namespace slideshow
}
}
- DocTreeNode DrawShapeSubsetting::implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin,
- const IndexClassificatorVector::const_iterator& rEnd,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const
+ DocTreeNode DrawShapeSubsetting::implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin,
+ const IndexClassificatorVector::const_iterator& rEnd,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const
{
- const IndexClassificator eRequestedClass(
+ const IndexClassificator eRequestedClass(
mapDocTreeNode( eNodeType ) );
// create a nth element functor for the requested class of
@@ -814,8 +814,8 @@ namespace slideshow
eNodeType );
}
- DocTreeNode DrawShapeSubsetting::getTreeNode( sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const
+ DocTreeNode DrawShapeSubsetting::getTreeNode( sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const
{
ensureInitializedNodeTree();
@@ -825,8 +825,8 @@ namespace slideshow
eNodeType );
}
- sal_Int32 DrawShapeSubsetting::getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode,
- DocTreeNode::NodeType eNodeType ) const
+ sal_Int32 DrawShapeSubsetting::getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode,
+ DocTreeNode::NodeType eNodeType ) const
{
ensureInitializedNodeTree();
@@ -840,9 +840,9 @@ namespace slideshow
eNodeType );
}
- DocTreeNode DrawShapeSubsetting::getSubsetTreeNode( const DocTreeNode& rParentNode,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const
+ DocTreeNode DrawShapeSubsetting::getSubsetTreeNode( const DocTreeNode& rParentNode,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const
{
ensureInitializedNodeTree();
@@ -861,7 +861,7 @@ namespace slideshow
{
return maCurrentSubsets;
}
-
+
}
}
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
index 1dc560a9b97c..0177907c1f3d 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
@@ -2,7 +2,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
@@ -56,7 +56,7 @@ namespace slideshow
@param rMtf
Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
+ generated with verbose text comments switched on).
*/
DrawShapeSubsetting();
@@ -67,7 +67,7 @@ namespace slideshow
@param rMtf
Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
+ generated with verbose text comments switched on).
*/
explicit DrawShapeSubsetting( const ::boost::shared_ptr< GDIMetaFile >& rMtf );
@@ -79,10 +79,10 @@ namespace slideshow
@param rMtf
Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
+ generated with verbose text comments switched on).
*/
- DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
- const ::boost::shared_ptr< GDIMetaFile >& rMtf );
+ DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
+ const ::boost::shared_ptr< GDIMetaFile >& rMtf );
/** Reset metafile.
@@ -93,7 +93,7 @@ namespace slideshow
@param rMtf
Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
+ generated with verbose text comments switched on).
*/
void reset( const ::boost::shared_ptr< GDIMetaFile >& rMtf );
@@ -110,7 +110,7 @@ namespace slideshow
@param rMtf
Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
+ generated with verbose text comments switched on).
*/
void reset( const DocTreeNode& rShapeSubset,
const ::boost::shared_ptr< GDIMetaFile >& rMtf );
@@ -120,16 +120,16 @@ namespace slideshow
// ========================================================
/// Return subset node for this shape
- DocTreeNode getSubsetNode () const;
+ DocTreeNode getSubsetNode () const;
/// Return true, if any child subset shapes exist
- bool hasSubsetShapes () const;
+ bool hasSubsetShapes () const;
/// Get subset shape for given node, if any
- AttributableShapeSharedPtr getSubsetShape ( const DocTreeNode& rTreeNode ) const;
+ AttributableShapeSharedPtr getSubsetShape ( const DocTreeNode& rTreeNode ) const;
/// Add child subset shape (or increase use count, if already existent)
- void addSubsetShape ( const AttributableShapeSharedPtr& rShape );
+ void addSubsetShape ( const AttributableShapeSharedPtr& rShape );
/** Revoke subset shape
@@ -147,33 +147,33 @@ namespace slideshow
decremented, or there was no such subset found, in the
first place).
*/
- bool revokeSubsetShape ( const AttributableShapeSharedPtr& rShape );
+ bool revokeSubsetShape ( const AttributableShapeSharedPtr& rShape );
// Doc tree methods
// ========================================================
/// Return overall number of nodes for given type
- sal_Int32 getNumberOfTreeNodes ( DocTreeNode::NodeType eNodeType ) const;
+ sal_Int32 getNumberOfTreeNodes ( DocTreeNode::NodeType eNodeType ) const;
/// Return tree node of given index and given type
- DocTreeNode getTreeNode ( sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const;
+ DocTreeNode getTreeNode ( sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const;
/// Return number of nodes of given type, below parent node
- sal_Int32 getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode,
+ sal_Int32 getNumberOfSubsetTreeNodes ( const DocTreeNode& rParentNode,
DocTreeNode::NodeType eNodeType ) const;
/// Return tree node of given index and given type, relative to parent node
- DocTreeNode getSubsetTreeNode ( const DocTreeNode& rParentNode,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const;
-
+ DocTreeNode getSubsetTreeNode ( const DocTreeNode& rParentNode,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const;
+
// Helper
// ========================================================
/** Return a vector of currently active subsets.
-
+
Needed when rendering a shape, this method provides a
vector of subsets currently visible (the range as
returned by getEffectiveSubset(), minus the parts that
@@ -214,12 +214,12 @@ namespace slideshow
*/
struct SubsetEntry
{
- AttributableShapeSharedPtr mpShape;
- sal_Int32 mnStartActionIndex;
- sal_Int32 mnEndActionIndex;
+ AttributableShapeSharedPtr mpShape;
+ sal_Int32 mnStartActionIndex;
+ sal_Int32 mnEndActionIndex;
/// Number of times this subset was queried, and not yet revoked
- int mnSubsetQueriedCount;
+ int mnSubsetQueriedCount;
sal_Int32 getHashValue() const
{
@@ -235,10 +235,10 @@ namespace slideshow
{
return getHashValue() < rOther.getHashValue();
}
-
+
};
- typedef ::std::set< SubsetEntry > ShapeSet;
+ typedef ::std::set< SubsetEntry > ShapeSet;
void ensureInitializedNodeTree() const;
void updateSubsetBounds( const SubsetEntry& rSubsetEntry );
@@ -246,30 +246,30 @@ namespace slideshow
void initCurrentSubsets();
void reset();
- sal_Int32 implGetNumberOfTreeNodes( const IndexClassificatorVector::const_iterator& rBegin,
- const IndexClassificatorVector::const_iterator& rEnd,
- DocTreeNode::NodeType eNodeType ) const;
- DocTreeNode implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin,
- const IndexClassificatorVector::const_iterator& rEnd,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const;
+ sal_Int32 implGetNumberOfTreeNodes( const IndexClassificatorVector::const_iterator& rBegin,
+ const IndexClassificatorVector::const_iterator& rEnd,
+ DocTreeNode::NodeType eNodeType ) const;
+ DocTreeNode implGetTreeNode( const IndexClassificatorVector::const_iterator& rBegin,
+ const IndexClassificatorVector::const_iterator& rEnd,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const;
- mutable IndexClassificatorVector maActionClassVector;
+ mutable IndexClassificatorVector maActionClassVector;
/// Metafile to retrieve subset info from
- ::boost::shared_ptr< GDIMetaFile > mpMtf;
+ ::boost::shared_ptr< GDIMetaFile > mpMtf;
/// Subset of the metafile represented by this object
DocTreeNode maSubset;
- /// the list of subset shapes spawned from this one.
- ShapeSet maSubsetShapes;
+ /// the list of subset shapes spawned from this one.
+ ShapeSet maSubsetShapes;
/// caches minimal subset index from maSubsetShapes
- sal_Int32 mnMinSubsetActionIndex;
+ sal_Int32 mnMinSubsetActionIndex;
/// caches maximal subset index from maSubsetShapes
- sal_Int32 mnMaxSubsetActionIndex;
+ sal_Int32 mnMaxSubsetActionIndex;
/** Current number of subsets to render (calculated from
maSubset and mnMin/MaxSubsetActionIndex).
@@ -277,10 +277,10 @@ namespace slideshow
Note that this is generally _not_ equivalent to
maSubset, as it excludes all active subset children!
*/
- mutable VectorOfDocTreeNodes maCurrentSubsets;
-
+ mutable VectorOfDocTreeNodes maCurrentSubsets;
+
/// Whether the shape's doc tree has been initialized successfully, or not
- mutable bool mbNodeTreeInitialized;
+ mutable bool mbNodeTreeInitialized;
};
}
diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx
index 7874143ca916..2d70a5bbad8d 100644
--- a/slideshow/source/engine/shapes/externalshapebase.cxx
+++ b/slideshow/source/engine/shapes/externalshapebase.cxx
@@ -2,7 +2,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
@@ -69,13 +69,13 @@ namespace slideshow
virtual void viewAdded( const UnoViewSharedPtr& ) {}
virtual void viewRemoved( const UnoViewSharedPtr& ) {}
- virtual void viewChanged( const UnoViewSharedPtr& rView )
- {
- mrBase.implViewChanged(rView);
+ virtual void viewChanged( const UnoViewSharedPtr& rView )
+ {
+ mrBase.implViewChanged(rView);
}
virtual void viewsChanged()
- {
- mrBase.implViewsChanged();
+ {
+ mrBase.implViewsChanged();
}
@@ -83,20 +83,20 @@ namespace slideshow
// -------------------------------------------------
virtual bool enableAnimations()
- {
- return mrBase.implStartIntrinsicAnimation();
+ {
+ return mrBase.implStartIntrinsicAnimation();
}
virtual bool disableAnimations()
- {
- return mrBase.implEndIntrinsicAnimation();
+ {
+ return mrBase.implEndIntrinsicAnimation();
}
ExternalShapeBase& mrBase;
};
- ExternalShapeBase::ExternalShapeBase( const uno::Reference< drawing::XShape >& xShape,
- double nPrio,
+ ExternalShapeBase::ExternalShapeBase( const uno::Reference< drawing::XShape >& xShape,
+ double nPrio,
const SlideShowContext& rContext ) :
mxComponentContext( rContext.mxComponentContext ),
mxShape( xShape ),
@@ -121,7 +121,7 @@ namespace slideshow
mrEventMultiplexer.removeViewHandler( mpListener );
mpShapeManager->removeIntrinsicAnimationHandler( mpListener );
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -138,7 +138,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
void ExternalShapeBase::play()
{
implStartIntrinsicAnimation();
@@ -159,7 +159,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ExternalShapeBase::isPlaying() const
{
return implIsIntrinsicAnimationPlaying();
@@ -180,7 +180,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ExternalShapeBase::render() const
{
if( maBounds.getRange().equalZero() )
@@ -194,14 +194,14 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ExternalShapeBase::isContentChanged() const
{
return true;
}
// ---------------------------------------------------------------------
-
+
::basegfx::B2DRectangle ExternalShapeBase::getBounds() const
{
return maBounds;
@@ -215,28 +215,28 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
::basegfx::B2DRectangle ExternalShapeBase::getUpdateArea() const
{
return maBounds;
}
// ---------------------------------------------------------------------
-
+
bool ExternalShapeBase::isVisible() const
{
return true;
}
// ---------------------------------------------------------------------
-
+
double ExternalShapeBase::getPriority() const
{
return mnPriority;
}
// ---------------------------------------------------------------------
-
+
bool ExternalShapeBase::isBackgroundDetached() const
{
// external shapes always have their own window/surface
diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx
index ecde71bc7b54..8e415fcc394d 100644
--- a/slideshow/source/engine/shapes/externalshapebase.hxx
+++ b/slideshow/source/engine/shapes/externalshapebase.hxx
@@ -2,7 +2,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
@@ -65,13 +65,13 @@ namespace slideshow
Externally-determined shape priority (used e.g. for
paint ordering). This number _must be_ unique!
*/
- ExternalShapeBase( const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XShape >& xShape,
- double nPrio,
+ ExternalShapeBase( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape,
+ double nPrio,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
virtual ~ExternalShapeBase();
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > getXShape() const;
// animation methods
@@ -93,7 +93,7 @@ namespace slideshow
// Shape attributes
//------------------------------------------------------------------
-
+
virtual ::basegfx::B2DRectangle getBounds() const;
virtual ::basegfx::B2DRectangle getDomBounds() const;
virtual ::basegfx::B2DRectangle getUpdateArea() const;
@@ -102,7 +102,7 @@ namespace slideshow
virtual bool isBackgroundDetached() const;
protected:
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext> mxComponentContext;
private:
@@ -129,7 +129,7 @@ namespace slideshow
/// The associated XShape
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
boost::shared_ptr<ExternalShapeBaseListener> mpListener;
@@ -137,8 +137,8 @@ namespace slideshow
EventMultiplexer& mrEventMultiplexer;
// The attributes of this Shape
- const double mnPriority;
- ::basegfx::B2DRectangle maBounds;
+ const double mnPriority;
+ ::basegfx::B2DRectangle maBounds;
};
}
}
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 9f3252453e30..014433d04e12 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -2,7 +2,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
@@ -68,7 +68,7 @@ using namespace ::com::sun::star;
namespace slideshow
{
-namespace internal
+namespace internal
{
// TODO(E2): Detect the case when svx/drawing layer is not
// in-process, or even not on the same machine, and
@@ -87,8 +87,8 @@ bool hasUnsupportedActions( const GDIMetaFile& rMtf )
MetaAction* pCurrAct;
// TODO(Q3): avoid const-cast
- for( pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction();
- pCurrAct;
+ for( pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction();
+ pCurrAct;
pCurrAct = const_cast<GDIMetaFile&>(rMtf).NextAction() )
{
switch( pCurrAct->GetType() )
@@ -118,12 +118,12 @@ namespace {
typedef ::cppu::WeakComponentImplHelper1< graphic::XGraphicRenderer > DummyRenderer_Base;
-class DummyRenderer :
+class DummyRenderer :
public DummyRenderer_Base,
public cppu::BaseMutex
{
public:
- DummyRenderer() :
+ DummyRenderer() :
DummyRenderer_Base( m_aMutex ),
mxGraphic()
{
@@ -147,18 +147,18 @@ public:
GDIMetaFile getMtf( bool bForeignSource ) const
{
::osl::MutexGuard aGuard( m_aMutex );
-
+
Graphic aGraphic( mxGraphic );
if( aGraphic.GetType() == GRAPHIC_BITMAP ||
- (bForeignSource &&
+ (bForeignSource &&
hasUnsupportedActions(aGraphic.GetGDIMetaFile()) ) )
{
// wrap bitmap into GDIMetafile
- GDIMetaFile aMtf;
- ::Point aEmptyPoint;
+ GDIMetaFile aMtf;
+ ::Point aEmptyPoint;
- ::BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
+ ::BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
aMtf.AddAction( new MetaBmpExAction( aEmptyPoint,
aBmpEx ) );
@@ -174,14 +174,14 @@ public:
}
private:
- uno::Reference< graphic::XGraphic > mxGraphic;
+ uno::Reference< graphic::XGraphic > mxGraphic;
};
} // anon namespace
-
+
// Quick'n'dirty way: tunnel Graphic (only works for
// in-process slideshow, of course)
-bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
+bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
const uno::Reference< drawing::XDrawPage >& xContainingPage,
GDIMetaFile& rMtf,
int mtfLoadFlags,
@@ -196,11 +196,11 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
// TODO(P3): Move creation of DummyRenderer out of the
// loop! Either by making it static, or transforming
// the whole thing here into a class.
- DummyRenderer* pRenderer( new DummyRenderer() );
+ DummyRenderer* pRenderer( new DummyRenderer() );
uno::Reference< graphic::XGraphicRenderer > xRenderer( pRenderer );
// -> stuff that into UnoGraphicExporter.
- uno::Reference<lang::XMultiComponentFactory> xFactory(
+ uno::Reference<lang::XMultiComponentFactory> xFactory(
rxContext->getServiceManager() );
OSL_ENSURE( xFactory.is(), "### no UNO?!" );
@@ -209,7 +209,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
// creating the graphic exporter
uno::Reference< document::XExporter > xExporter(
- xFactory->createInstanceWithContext(
+ xFactory->createInstanceWithContext(
OUSTR("com.sun.star.drawing.GraphicExportFilter"),
rxContext),
uno::UNO_QUERY );
@@ -232,7 +232,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
aFilterData[1].Name = OUSTR("ScrollText");
aFilterData[1].Value <<= ((mtfLoadFlags & MTF_LOAD_SCROLL_TEXT_MTF) != 0);
-
+
aFilterData[2].Name = OUSTR("ExportOnlyBackground");
aFilterData[2].Value <<= ((mtfLoadFlags & MTF_LOAD_BACKGROUND_ONLY) != 0);
@@ -267,7 +267,7 @@ void removeTextActions( GDIMetaFile& rMtf )
MetaAction* pCurrAct;
int nActionIndex(0);
- pCurrAct = rMtf.FirstAction();
+ pCurrAct = rMtf.FirstAction();
while( pCurrAct )
{
switch( pCurrAct->GetType() )
@@ -304,7 +304,7 @@ sal_Int32 getNextActionOffset( MetaAction * pCurrAct )
// Special handling for actions that represent
// more than one indexable action
// ===========================================
-
+
switch (pCurrAct->GetType()) {
case META_TEXT_ACTION: {
MetaTextAction * pAct = static_cast<MetaTextAction *>(pCurrAct);
@@ -348,9 +348,9 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
return false;
// some loop invariants
- Animation aAnimation( rGraphic.GetAnimation() );
+ Animation aAnimation( rGraphic.GetAnimation() );
const Point aEmptyPoint;
- const Size aAnimSize( aAnimation.GetDisplaySizePixel() );
+ const Size aAnimSize( aAnimation.GetDisplaySizePixel() );
// setup VDev, into which all bitmaps are painted (want to
// normalize animations to n bitmaps of same size. An Animation,
@@ -399,24 +399,24 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
{
case DISPOSE_NOT:
{
- aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
+ aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
rAnimBmp.aBmpEx);
Bitmap aMask = rAnimBmp.aBmpEx.GetMask();
if( aMask.IsEmpty() )
{
const Point aEmpty;
- const Rectangle aRect(aEmptyPoint,
+ const Rectangle aRect(aEmptyPoint,
aVDevMask.GetOutputSizePixel());
const Wallpaper aWallpaper(COL_BLACK);
- aVDevMask.DrawWallpaper(aRect,
+ aVDevMask.DrawWallpaper(aRect,
aWallpaper);
}
else
{
- BitmapEx aTmpMask = BitmapEx(aMask,
+ BitmapEx aTmpMask = BitmapEx(aMask,
aMask);
- aVDevMask.DrawBitmapEx(rAnimBmp.aPosPix,
+ aVDevMask.DrawBitmapEx(rAnimBmp.aPosPix,
aTmpMask );
}
break;
@@ -447,16 +447,16 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
case DISPOSE_FULL:
{
- aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
+ aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
rAnimBmp.aBmpEx);
break;
}
case DISPOSE_PREVIOUS :
{
- aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
+ aVDev.DrawBitmapEx(rAnimBmp.aPosPix,
rAnimBmp.aBmpEx);
- aVDevMask.DrawBitmap(rAnimBmp.aPosPix,
+ aVDevMask.DrawBitmap(rAnimBmp.aPosPix,
rAnimBmp.aBmpEx.GetMask());
break;
}
@@ -465,7 +465,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
// extract current aVDev content into a new animation
// frame
GDIMetaFileSharedPtr pMtf( new GDIMetaFile() );
- pMtf->AddAction(
+ pMtf->AddAction(
new MetaBmpExAction( aEmptyPoint,
BitmapEx(
aVDev.GetBitmap(
@@ -491,12 +491,12 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
// time to show first page (whole day)
nWaitTime100thSeconds = 100 * 60 * 60 * 24;
}
-
+
// There are animated GIFs with no WaitTime set. Take 1 sec, then.
if( nWaitTime100thSeconds == 0 )
nWaitTime100thSeconds = 100;
- o_rFrames.push_back( MtfAnimationFrame( pMtf,
+ o_rFrames.push_back( MtfAnimationFrame( pMtf,
nWaitTime100thSeconds / 100.0 ) );
}
@@ -506,7 +506,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
bool getRectanglesFromScrollMtf( ::basegfx::B2DRectangle& o_rScrollRect,
::basegfx::B2DRectangle& o_rPaintRect,
const GDIMetaFileSharedPtr& rMtf )
-{
+{
// extract bounds: scroll rect, paint rect
bool bScrollRectSet(false);
bool bPaintRectSet(false);
diff --git a/slideshow/source/engine/shapes/gdimtftools.hxx b/slideshow/source/engine/shapes/gdimtftools.hxx
index 072880739e14..705c7eb35710 100644
--- a/slideshow/source/engine/shapes/gdimtftools.hxx
+++ b/slideshow/source/engine/shapes/gdimtftools.hxx
@@ -2,7 +2,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
@@ -68,14 +68,14 @@ namespace slideshow
/// retrieve the drawing layer scroll text metafile
MTF_LOAD_SCROLL_TEXT_MTF = 8
};
-
+
// Animation info
// ==============
struct MtfAnimationFrame
{
MtfAnimationFrame( const GDIMetaFileSharedPtr& rMtf,
- double nDuration ) :
+ double nDuration ) :
mpMtf( rMtf ),
mnDuration( nDuration )
{
@@ -87,10 +87,10 @@ namespace slideshow
return mnDuration;
}
- GDIMetaFileSharedPtr mpMtf;
- double mnDuration;
+ GDIMetaFileSharedPtr mpMtf;
+ double mnDuration;
};
-
+
typedef ::std::vector< MtfAnimationFrame > VectorOfMtfAnimationFrames;
@@ -98,7 +98,7 @@ namespace slideshow
@param xShape
XShape to retrieve a metafile for.
-
+
@param xContainingPage
The page that contains this shape. Needed for proper
import (currently, the UnoGraphicExporter needs this
@@ -107,11 +107,11 @@ namespace slideshow
@param o_rMtf
Metafile to extract shape content into
*/
- bool getMetaFile( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xSource,
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xContainingPage,
- GDIMetaFile& o_rMtf,
+ bool getMetaFile( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xSource,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xContainingPage,
+ GDIMetaFile& o_rMtf,
int mtfLoadFlags,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
/** Remove all text actions from the given metafile.
@@ -122,7 +122,7 @@ namespace slideshow
often returns 1.
*/
sal_Int32 getNextActionOffset( MetaAction * pCurrAct );
-
+
/** Extract a vector of animation frames from given Graphic.
@param o_rFrames
diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx
index fb5179545821..e185085a9787 100644
--- a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx
+++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx
@@ -2,7 +2,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
@@ -78,10 +78,10 @@ namespace slideshow
Vector of timeout values, to wait before the next
frame is shown.
*/
- IntrinsicAnimationActivity( const SlideShowContext& rContext,
- const DrawShapeSharedPtr& rDrawShape,
- const WakeupEventSharedPtr& rWakeupEvent,
- const ::std::vector<double>& rTimeouts,
+ IntrinsicAnimationActivity( const SlideShowContext& rContext,
+ const DrawShapeSharedPtr& rDrawShape,
+ const WakeupEventSharedPtr& rWakeupEvent,
+ const ::std::vector<double>& rTimeouts,
::std::size_t nNumLoops,
CycleMode eCycleMode );
@@ -127,10 +127,10 @@ namespace slideshow
//////////////////////////////////////////////////////////////////////
- IntrinsicAnimationActivity::IntrinsicAnimationActivity( const SlideShowContext& rContext,
- const DrawShapeSharedPtr& rDrawShape,
- const WakeupEventSharedPtr& rWakeupEvent,
- const ::std::vector<double>& rTimeouts,
+ IntrinsicAnimationActivity::IntrinsicAnimationActivity( const SlideShowContext& rContext,
+ const DrawShapeSharedPtr& rDrawShape,
+ const WakeupEventSharedPtr& rWakeupEvent,
+ const ::std::vector<double>& rTimeouts,
::std::size_t nNumLoops,
CycleMode eCycleMode ) :
maContext( rContext ),
@@ -143,7 +143,7 @@ namespace slideshow
mnNumLoops(nNumLoops),
mnLoopCount(0),
mbIsActive(false)
- {
+ {
ENSURE_OR_THROW( rContext.mpSubsettableShapeManager,
"IntrinsicAnimationActivity::IntrinsicAnimationActivity(): Invalid shape manager" );
ENSURE_OR_THROW( rDrawShape,
@@ -153,7 +153,7 @@ namespace slideshow
ENSURE_OR_THROW( !rTimeouts.empty(),
"IntrinsicAnimationActivity::IntrinsicAnimationActivity(): Empty timeout vector" );
- maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler(
+ maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler(
mpListener );
}
@@ -170,7 +170,7 @@ namespace slideshow
maTimeouts.clear();
mnCurrIndex = 0;
- maContext.mpSubsettableShapeManager->removeIntrinsicAnimationHandler(
+ maContext.mpSubsettableShapeManager->removeIntrinsicAnimationHandler(
mpListener );
}
@@ -231,13 +231,13 @@ namespace slideshow
mpWakeupEvent->start();
mpWakeupEvent->setNextTimeout( maTimeouts[nTrueIndex] );
-
+
mnLoopCount += (mnCurrIndex + 1) / (2*nNumFrames);
nNewIndex = (mnCurrIndex + 1) % 2*nNumFrames;
break;
}
}
-
+
maContext.mrEventQueue.addEvent( mpWakeupEvent );
maContext.mpSubsettableShapeManager->notifyShapeUpdate( pDrawShape );
mnCurrIndex = nNewIndex;
@@ -272,14 +272,14 @@ namespace slideshow
//////////////////////////////////////////////////////////////////////
ActivitySharedPtr createIntrinsicAnimationActivity(
- const SlideShowContext& rContext,
- const DrawShapeSharedPtr& rDrawShape,
- const WakeupEventSharedPtr& rWakeupEvent,
- const ::std::vector<double>& rTimeouts,
+ const SlideShowContext& rContext,
+ const DrawShapeSharedPtr& rDrawShape,
+ const WakeupEventSharedPtr& rWakeupEvent,
+ const ::std::vector<double>& rTimeouts,
::std::size_t nNumLoops,
CycleMode eCycleMode )
{
- return ActivitySharedPtr(
+ return ActivitySharedPtr(
new IntrinsicAnimationActivity(rContext,
rDrawShape,
rWakeupEvent,
diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx
index a48ae8f1117e..9f626a38f6bb 100644
--- a/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx
+++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx
@@ -2,7 +2,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
@@ -65,10 +65,10 @@ namespace slideshow
frame is shown.
*/
ActivitySharedPtr createIntrinsicAnimationActivity(
- const SlideShowContext& rContext,
- const DrawShapeSharedPtr& rDrawShape,
- const WakeupEventSharedPtr& rWakeupEvent,
- const ::std::vector<double>& rTimeouts,
+ const SlideShowContext& rContext,
+ const DrawShapeSharedPtr& rDrawShape,
+ const WakeupEventSharedPtr& rWakeupEvent,
+ const ::std::vector<double>& rTimeouts,
::std::size_t nNumLoops,
CycleMode eCycleMode );
}
diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx
index 9bcf66a030f6..6d489ee736c9 100644
--- a/slideshow/source/engine/shapes/mediashape.cxx
+++ b/slideshow/source/engine/shapes/mediashape.cxx
@@ -2,7 +2,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
@@ -71,9 +71,9 @@ namespace slideshow
Externally-determined shape priority (used e.g. for
paint ordering). This number _must be_ unique!
*/
- MediaShape( const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XShape >& xShape,
- double nPrio,
+ MediaShape( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape,
+ double nPrio,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
private:
@@ -81,15 +81,15 @@ 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
//------------------------------------------------------------------
-
+
virtual bool implRender( const ::basegfx::B2DRange& rCurrBounds ) const;
virtual void implViewChanged( const UnoViewSharedPtr& rView );
virtual void implViewsChanged();
@@ -107,7 +107,7 @@ namespace slideshow
MediaShape::MediaShape( const uno::Reference< drawing::XShape >& xShape,
- double nPrio,
+ double nPrio,
const SlideShowContext& rContext ) :
ExternalShapeBase( xShape, nPrio, rContext ),
maViewMediaShapes(),
@@ -115,7 +115,7 @@ namespace slideshow
{
}
- // ---------------------------------------------------------------------
+ // ---------------------------------------------------------------------
void MediaShape::implViewChanged( const UnoViewSharedPtr& rView )
{
@@ -138,8 +138,8 @@ namespace slideshow
// resize all ViewShapes
::std::for_each( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
- ::boost::bind(
- &ViewMediaShape::resize,
+ ::boost::bind(
+ &ViewMediaShape::resize,
_1,
::boost::cref( getBounds())) );
}
@@ -147,30 +147,30 @@ namespace slideshow
// ---------------------------------------------------------------------
void MediaShape::addViewLayer( const ViewLayerSharedPtr& rNewLayer,
- bool bRedrawLayer )
+ bool bRedrawLayer )
{
- maViewMediaShapes.push_back(
- ViewMediaShapeSharedPtr( new ViewMediaShape( rNewLayer,
+ maViewMediaShapes.push_back(
+ ViewMediaShapeSharedPtr( new ViewMediaShape( rNewLayer,
getXShape(),
mxComponentContext )));
-
- // push new size to view shape
+
+ // push new size to view shape
maViewMediaShapes.back()->resize( getBounds() );
-
- // render the Shape on the newly added ViewLayer
+
+ // render the Shape on the newly added ViewLayer
if( bRedrawLayer )
maViewMediaShapes.back()->render( getBounds() );
}
// ---------------------------------------------------------------------
-
+
bool MediaShape::removeViewLayer( const ViewLayerSharedPtr& rLayer )
{
const ViewMediaShapeVector::iterator aEnd( maViewMediaShapes.end() );
- OSL_ENSURE( ::std::count_if(maViewMediaShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ OSL_ENSURE( ::std::count_if(maViewMediaShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewMediaShape::getViewLayer, _1 ),
::boost::cref( rLayer ) ) ) < 2,
@@ -178,9 +178,9 @@ namespace slideshow
ViewMediaShapeVector::iterator aIter;
- if( (aIter=::std::remove_if( maViewMediaShapes.begin(),
- aEnd,
- ::boost::bind<bool>(
+ if( (aIter=::std::remove_if( maViewMediaShapes.begin(),
+ aEnd,
+ ::boost::bind<bool>(
::std::equal_to< ViewLayerSharedPtr >(),
::boost::bind( &ViewMediaShape::getViewLayer,
_1 ),
@@ -197,7 +197,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool MediaShape::clearAllViewLayers()
{
maViewMediaShapes.clear();
@@ -211,13 +211,13 @@ namespace slideshow
// redraw all view shapes, by calling their update() method
if( ::std::count_if( maViewMediaShapes.begin(),
maViewMediaShapes.end(),
- ::boost::bind<bool>(
- ::boost::mem_fn( &ViewMediaShape::render ),
+ ::boost::bind<bool>(
+ ::boost::mem_fn( &ViewMediaShape::render ),
_1,
- ::boost::cref( rCurrBounds ) ) )
+ ::boost::cref( rCurrBounds ) ) )
!= static_cast<ViewMediaShapeVector::difference_type>(maViewMediaShapes.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;
}
@@ -226,7 +226,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool MediaShape::implStartIntrinsicAnimation()
{
::std::for_each( maViewMediaShapes.begin(),
@@ -237,9 +237,9 @@ namespace slideshow
return true;
}
-
+
// ---------------------------------------------------------------------
-
+
bool MediaShape::implEndIntrinsicAnimation()
{
::std::for_each( maViewMediaShapes.begin(),
diff --git a/slideshow/source/engine/shapes/mediashape.hxx b/slideshow/source/engine/shapes/mediashape.hxx
index babe30e8b122..bd5b2988265b 100644
--- a/slideshow/source/engine/shapes/mediashape.hxx
+++ b/slideshow/source/engine/shapes/mediashape.hxx
@@ -2,7 +2,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
@@ -46,7 +46,7 @@ namespace slideshow
class Shape;
boost::shared_ptr<Shape> createMediaShape(
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape,
double nPrio,
const SlideShowContext& rContext);
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 959e930c0530..145be6645506 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -2,7 +2,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
@@ -87,46 +87,46 @@ bool importShapeGraphic(
// no or empty property - cannot import shape graphic
return false;
}
-
- rtl::OUString const aVndUrl(
+
+ rtl::OUString const aVndUrl(
RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) );
sal_Int32 nIndex( aURL.indexOf( aVndUrl ) );
-
- if(nIndex != -1)
+
+ if(nIndex != -1)
{
// skip past the end of the "vnd..." prefix
nIndex += aVndUrl.getLength();
-
- if(nIndex >= aURL.getLength())
+
+ if(nIndex >= aURL.getLength())
{
OSL_ENSURE( false, "ShapeImporter::importShape(): "
"embedded graphic has no graphic ID" );
return false;
}
-
+
// unique ID string found in URL, extract
// to separate string
rtl::OUString const aUniqueId(
aURL.copy( nIndex, aURL.getLength() - nIndex ) );
-
+
// TODO(T2): Creating a GraphicObject is not
// thread safe (internally calls VCL, and has
// unguarded internal singleton mpGlobalMgr)
-
+
// fetch already loaded graphic from graphic manager.
ByteString const aOldString( static_cast<String>(aUniqueId),
RTL_TEXTENCODING_UTF8 );
o_rGraphic = GraphicObject( aOldString );
- if( GRAPHIC_DEFAULT == o_rGraphic.GetType()
+ if( GRAPHIC_DEFAULT == o_rGraphic.GetType()
|| GRAPHIC_NONE == o_rGraphic.GetType() )
{
// even the GrfMgr does not seem to know this graphic
return false;
- }
+ }
}
- else
+ else
{
// no special string found, graphic must be
// external. Load via GraphicIm porter
@@ -135,17 +135,17 @@ bool importShapeGraphic(
utl::UcbStreamHelper::CreateStream(
aTmp.GetMainURL( INetURLObject::NO_DECODE ),
STREAM_READ ) );
- if( !pGraphicStream )
+ if( !pGraphicStream )
{
OSL_ENSURE( false, "ShapeImporter::importShape(): "
"cannot create input stream for graphic" );
return false;
}
-
+
Graphic aTmpGraphic;
if( GraphicConverter::Import(
*pGraphicStream, aTmpGraphic ) != ERRCODE_NONE )
- {
+ {
OSL_ENSURE( false, "ShapeImporter::importShape(): "
"Failed to import shape graphic from given URL" );
return false;
@@ -166,7 +166,7 @@ public:
uno::Reference<drawing::XShape> const& xShape,
uno::Reference<beans::XPropertySet> const& xPropSet,
double nPrio );
-
+
// Shape:
virtual uno::Reference<drawing::XShape> getXShape() const;
virtual void addViewLayer( ViewLayerSharedPtr const& pNewLayer,
@@ -182,7 +182,7 @@ public:
virtual bool isVisible() const;
virtual double getPriority() const;
virtual bool isBackgroundDetached() const;
-
+
private:
ShapeSharedPtr const mpGroupShape;
uno::Reference<drawing::XShape> const mxShape;
@@ -196,8 +196,8 @@ ShapeOfGroup::ShapeOfGroup( ShapeSharedPtr const& pGroupSha
uno::Reference<drawing::XShape> const& xShape,
uno::Reference<beans::XPropertySet> const& xPropSet,
double nPrio ) :
- mpGroupShape(pGroupShape),
- mxShape(xShape),
+ mpGroupShape(pGroupShape),
+ mxShape(xShape),
mnPrio(nPrio)
{
// read bound rect
@@ -285,13 +285,13 @@ ShapeSharedPtr ShapeImporter::createShape(
uno::Reference<beans::XPropertySet> const& xPropSet,
rtl::OUString const& shapeType ) const
{
- if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape") ) ||
- shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape") ) )
+ if( shapeType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape") ) ||
+ shapeType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape") ) )
{
// Media shape (video etc.). This is a special object
- return createMediaShape(xCurrShape,
+ return createMediaShape(xCurrShape,
mnAscendingPrio,
mrContext);
}
@@ -299,7 +299,7 @@ ShapeSharedPtr ShapeImporter::createShape(
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape") ))
{
// PropertyValues to copy from XShape to plugin
- static const char* aPropertyValues[] =
+ static const char* aPropertyValues[] =
{
"PluginURL",
"PluginMimeType",
@@ -307,10 +307,10 @@ ShapeSharedPtr ShapeImporter::createShape(
};
// (Netscape)Plugin shape. This is a special object
- return createAppletShape( xCurrShape,
+ return createAppletShape( xCurrShape,
mnAscendingPrio,
- ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.sfx2.PluginObject" )),
aPropertyValues,
sizeof(aPropertyValues)/sizeof(*aPropertyValues),
@@ -320,7 +320,7 @@ ShapeSharedPtr ShapeImporter::createShape(
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape") ))
{
// PropertyValues to copy from XShape to applet
- static const char* aPropertyValues[] =
+ static const char* aPropertyValues[] =
{
"AppletCodeBase",
"AppletName",
@@ -330,10 +330,10 @@ ShapeSharedPtr ShapeImporter::createShape(
};
// (Java)Applet shape. This is a special object
- return createAppletShape( xCurrShape,
+ return createAppletShape( xCurrShape,
mnAscendingPrio,
- ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
+ ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.sfx2.AppletObject" )),
aPropertyValues,
sizeof(aPropertyValues)/sizeof(*aPropertyValues),
@@ -346,7 +346,7 @@ ShapeSharedPtr ShapeImporter::createShape(
{
// #i46224# Mark OLE shapes as foreign content - scan them for
// unsupported actions, and fallback to bitmap, if necessary
- return DrawShape::create( xCurrShape,
+ return DrawShape::create( xCurrShape,
mxPage,
mnAscendingPrio,
true,
@@ -357,10 +357,10 @@ ShapeSharedPtr ShapeImporter::createShape(
"com.sun.star.drawing.GraphicObjectShape") ) ||
shapeType.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.presentation.GraphicObjectShape") ) )
+ "com.sun.star.presentation.GraphicObjectShape") ) )
{
GraphicObject aGraphicObject;
-
+
// to get hold of GIF animations, inspect Graphic
// objects more thoroughly (the plain-jane shape
// metafile of course would only contain the first
@@ -373,21 +373,21 @@ ShapeSharedPtr ShapeImporter::createShape(
if( !aGraphicObject.IsAnimated() )
{
// no animation - simply utilize plain draw shape import
-
+
// import shape as bitmap - either its a bitmap
// anyway, or its a metafile, which currently the
// metafile renderer might not display correctly.
- return DrawShape::create( xCurrShape,
+ return DrawShape::create( xCurrShape,
mxPage,
mnAscendingPrio,
- true,
+ true,
mrContext );
}
-
-
+
+
// now extract relevant shape attributes via API
// ---------------------------------------------
-
+
drawing::ColorMode eColorMode( drawing::ColorMode_STANDARD );
sal_Int16 nLuminance(0);
sal_Int16 nContrast(0);
@@ -397,7 +397,7 @@ ShapeSharedPtr ShapeImporter::createShape(
double nGamma(1.0);
sal_Int16 nTransparency(0);
sal_Int32 nRotation(0);
-
+
getPropertyValue( eColorMode, xPropSet, OUSTR("GraphicColorMode") );
getPropertyValue( nLuminance, xPropSet, OUSTR("AdjustLuminance") );
getPropertyValue( nContrast, xPropSet, OUSTR("AdjustContrast") );
@@ -407,7 +407,7 @@ ShapeSharedPtr ShapeImporter::createShape(
getPropertyValue( nGamma, xPropSet, OUSTR("Gamma") );
getPropertyValue( nTransparency, xPropSet, OUSTR("Transparency") );
getPropertyValue( nRotation, xPropSet, OUSTR("RotateAngle") );
-
+
GraphicAttr aGraphAttrs;
aGraphAttrs.SetDrawMode( (GraphicDrawMode)eColorMode );
aGraphAttrs.SetLuminance( nLuminance );
@@ -418,35 +418,35 @@ ShapeSharedPtr ShapeImporter::createShape(
aGraphAttrs.SetGamma( nGamma );
aGraphAttrs.SetTransparency( static_cast<BYTE>(nTransparency) );
aGraphAttrs.SetRotation( static_cast<USHORT>(nRotation*10) );
-
+
text::GraphicCrop aGraphCrop;
- if( getPropertyValue( aGraphCrop, xPropSet, OUSTR("GraphicCrop") ))
+ if( getPropertyValue( aGraphCrop, xPropSet, OUSTR("GraphicCrop") ))
{
aGraphAttrs.SetCrop( aGraphCrop.Left,
aGraphCrop.Top,
aGraphCrop.Right,
aGraphCrop.Bottom );
}
-
+
// fetch readily transformed and color-modified
// graphic
// ---------------------------------------------
-
- Graphic aGraphic(
+
+ Graphic aGraphic(
aGraphicObject.GetTransformedGraphic(
aGraphicObject.GetPrefSize(),
aGraphicObject.GetPrefMapMode(),
aGraphAttrs ) );
-
- return DrawShape::create( xCurrShape,
+
+ return DrawShape::create( xCurrShape,
mxPage,
mnAscendingPrio,
aGraphic,
mrContext );
}
- else
+ else
{
- return DrawShape::create( xCurrShape,
+ return DrawShape::create( xCurrShape,
mxPage,
mnAscendingPrio,
false,
@@ -463,12 +463,12 @@ bool ShapeImporter::isSkip(
bool bEmpty = false;
if( getPropertyValue( bEmpty,
xPropSet,
- OUSTR("IsEmptyPresentationObject")) &&
+ OUSTR("IsEmptyPresentationObject")) &&
bEmpty )
{
return true;
}
-
+
//skip shapes which corresponds to annotations
if(xLayer.is())
{
@@ -481,17 +481,17 @@ bool ShapeImporter::isSkip(
{
if( layerName.equals(rtl::OUString::createFromAscii("DrawnInSlideshow")))
{
- //Transform shapes into PolyPolygons
+ //Transform shapes into PolyPolygons
importPolygons(xPropSet);
-
+
return true;
}
}
}
-
+
// don't export presentation placeholders on masterpage
// they can be non empty when user edits the default texts
- if(mbConvertingMasterPage)
+ if(mbConvertingMasterPage)
{
if(shapeType.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation."
@@ -506,19 +506,19 @@ bool ShapeImporter::isSkip(
return false;
}
-
+
void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xPropSet) {
drawing::PointSequenceSequence aRetval;
- sal_Int32 nLineColor=0;
- double fLineWidth;
+ sal_Int32 nLineColor=0;
+ double fLineWidth;
getPropertyValue( aRetval, xPropSet, OUSTR("PolyPolygon") );
getPropertyValue( nLineColor, xPropSet, OUSTR("LineColor") );
getPropertyValue( fLineWidth, xPropSet, OUSTR("LineWidth") );
drawing::PointSequence* pOuterSequence = aRetval.getArray();
awt::Point* pInnerSequence = pOuterSequence->getArray();
-
+
::basegfx::B2DPolygon aPoly;
basegfx::B2DPoint aPoint;
for( sal_Int32 nCurrPoly=0; nCurrPoly<pOuterSequence->getLength(); ++nCurrPoly, ++pInnerSequence )
@@ -544,21 +544,21 @@ void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xP
aIter++;
}
}
-
+
ShapeSharedPtr ShapeImporter::importBackgroundShape() // throw (ShapeLoadFailedException)
{
if( maShapesStack.empty() )
throw ShapeLoadFailedException();
XShapesEntry& rTop = maShapesStack.top();
- ShapeSharedPtr pBgShape(
+ ShapeSharedPtr pBgShape(
createBackgroundShape(mxPage,
uno::Reference<drawing::XDrawPage>(
rTop.mxShapes,
uno::UNO_QUERY_THROW),
mrContext) );
mnAscendingPrio += 1.0;
-
+
return pBgShape;
}
@@ -566,20 +566,20 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException)
{
ShapeSharedPtr pRet;
bool bIsGroupShape = false;
-
+
while( !maShapesStack.empty() && !pRet )
{
XShapesEntry& rTop = maShapesStack.top();
if( rTop.mnPos < rTop.mnCount )
- {
+ {
uno::Reference<drawing::XShape> const xCurrShape(
rTop.mxShapes->getByIndex( rTop.mnPos ), uno::UNO_QUERY );
++rTop.mnPos;
uno::Reference<beans::XPropertySet> xPropSet(
xCurrShape, uno::UNO_QUERY );
- if( !xPropSet.is() )
+ if( !xPropSet.is() )
{
- // we definitely need the properties of
+ // we definitely need the properties of
// the shape here. This will also fail,
// if getByIndex did not return a valid
// shape
@@ -593,21 +593,21 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException)
if(xLayerSupplier.is())
{
uno::Reference< container::XNameAccess > xNameAccess = xLayerSupplier->getLayerManager();
-
+
uno::Reference< drawing::XLayerManager > xLayerManager(xNameAccess, uno::UNO_QUERY);
-
+
xDrawnInSlideshow = xLayerManager->getLayerForShape(xCurrShape);
}
rtl::OUString const shapeType( xCurrShape->getShapeType());
-
+
// is this shape presentation-invisible?
if( !isSkip(xPropSet, shapeType, xDrawnInSlideshow) )
{
bIsGroupShape = shapeType.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM(
"com.sun.star.drawing.GroupShape") );
-
+
if( rTop.mpGroupShape ) // in group particle mode?
{
pRet.reset( new ShapeOfGroup(
@@ -615,14 +615,14 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException)
xCurrShape, xPropSet,
mnAscendingPrio ) );
}
- else
+ else
{
pRet = createShape( xCurrShape, xPropSet, shapeType );
}
mnAscendingPrio += 1.0;
}
}
- if( rTop.mnPos >= rTop.mnCount )
+ if( rTop.mnPos >= rTop.mnCount )
{
// group or top-level shapes finished:
maShapesStack.pop();
@@ -633,7 +633,7 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException)
maShapesStack.push( XShapesEntry( pRet ) );
}
}
-
+
return pRet;
}
@@ -646,8 +646,8 @@ PolyPolygonVector ShapeImporter::getPolygons()
{
return maPolygons;
}
-
-ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const& xPage,
+
+ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const& xPage,
uno::Reference<drawing::XDrawPage> const& xActualPage,
uno::Reference<drawing::XDrawPagesSupplier> const& xPagesSupplier,
const SlideShowContext& rContext,
diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx
index f3c87161d78f..1af40d99a742 100644
--- a/slideshow/source/engine/shapes/viewappletshape.cxx
+++ b/slideshow/source/engine/shapes/viewappletshape.cxx
@@ -2,7 +2,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
@@ -87,12 +87,12 @@ namespace slideshow
ENSURE_OR_THROW( mpViewLayer->getCanvas(), "ViewAppletShape::ViewAppletShape(): Invalid ViewLayer canvas" );
ENSURE_OR_THROW( mxComponentContext.is(), "ViewAppletShape::ViewAppletShape(): Invalid component context" );
- uno::Reference<lang::XMultiComponentFactory> xFactory(
+ uno::Reference<lang::XMultiComponentFactory> xFactory(
mxComponentContext->getServiceManager(),
uno::UNO_QUERY_THROW );
mxViewer.set( xFactory->createInstanceWithContext( rServiceName,
- mxComponentContext),
+ mxComponentContext),
uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xShapePropSet( rxShape,
@@ -106,20 +106,20 @@ namespace slideshow
{
aPropName = ::rtl::OUString::createFromAscii( pPropCopyTable[i] );
mxViewerPropSet->setPropertyValue( aPropName,
- xShapePropSet->getPropertyValue(
+ xShapePropSet->getPropertyValue(
aPropName ));
}
}
// ---------------------------------------------------------------------
-
+
ViewAppletShape::~ViewAppletShape()
- {
+ {
try
{
endApplet();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -136,7 +136,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds )
{
ENSURE_OR_RETURN_FALSE( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(),
@@ -144,25 +144,25 @@ namespace slideshow
try
{
::cppcanvas::CanvasSharedPtr pCanvas = mpViewLayer->getCanvas();
-
+
uno::Reference< beans::XPropertySet > xPropSet( pCanvas->getUNOCanvas()->getDevice(),
uno::UNO_QUERY_THROW );
-
- uno::Reference< awt::XWindow2 > xParentWindow(
- xPropSet->getPropertyValue(
+
+ uno::Reference< awt::XWindow2 > xParentWindow(
+ xPropSet->getPropertyValue(
::rtl::OUString::createFromAscii( "Window" )),
uno::UNO_QUERY_THROW );
- uno::Reference<lang::XMultiComponentFactory> xFactory(
+ uno::Reference<lang::XMultiComponentFactory> xFactory(
mxComponentContext->getServiceManager() );
-
+
if( xFactory.is() )
{
// create an awt window to contain the applet
// ==========================================
uno::Reference< awt::XToolkit > xToolkit(
- xFactory->createInstanceWithContext(
+ xFactory->createInstanceWithContext(
::rtl::OUString::createFromAscii( "com.sun.star.awt.Toolkit" ),
mxComponentContext ),
uno::UNO_QUERY_THROW );
@@ -173,12 +173,12 @@ namespace slideshow
uno::UNO_QUERY_THROW),
0,
awt::Rectangle(),
- awt::WindowAttribute::SHOW
+ awt::WindowAttribute::SHOW
| awt::VclWindowPeerAttribute::CLIPCHILDREN );
- uno::Reference< awt::XWindowPeer > xNewWinPeer(
+ uno::Reference< awt::XWindowPeer > xNewWinPeer(
xToolkit->createWindow( aOwnWinDescriptor ));
- uno::Reference< awt::XWindow > xOwnWindow( xNewWinPeer,
+ uno::Reference< awt::XWindow > xOwnWindow( xNewWinPeer,
uno::UNO_QUERY_THROW );
@@ -186,16 +186,16 @@ namespace slideshow
// ===========================================
mxFrame.set(
- xFactory->createInstanceWithContext(
+ xFactory->createInstanceWithContext(
::rtl::OUString::createFromAscii( "com.sun.star.frame.Frame" ),
mxComponentContext ),
uno::UNO_QUERY_THROW );
mxFrame->initialize( xOwnWindow );
- uno::Reference < frame::XSynchronousFrameLoader > xLoader( mxViewer,
+ uno::Reference < frame::XSynchronousFrameLoader > xLoader( mxViewer,
uno::UNO_QUERY_THROW );
- xLoader->load( uno::Sequence < beans::PropertyValue >(),
+ xLoader->load( uno::Sequence < beans::PropertyValue >(),
mxFrame );
@@ -203,29 +203,29 @@ namespace slideshow
// ==========================================================
::basegfx::B2DRange aTmpRange;
- ::canvas::tools::calcTransformedRectBounds( aTmpRange,
- rBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRange,
+ rBounds,
mpViewLayer->getTransformation() );
const ::basegfx::B2IRange& rPixelBounds(
::basegfx::unotools::b2ISurroundingRangeFromB2DRange( aTmpRange ));
uno::Reference< awt::XWindow > xSurroundingWindow( mxFrame->getContainerWindow() );
if( xSurroundingWindow.is() )
- xSurroundingWindow->setPosSize( static_cast<sal_Int32>(rPixelBounds.getMinX()),
+ xSurroundingWindow->setPosSize( static_cast<sal_Int32>(rPixelBounds.getMinX()),
static_cast<sal_Int32>(rPixelBounds.getMinY()),
- static_cast<sal_Int32>(rPixelBounds.getWidth()),
+ static_cast<sal_Int32>(rPixelBounds.getWidth()),
static_cast<sal_Int32>(rPixelBounds.getHeight()),
awt::PosSize::POSSIZE );
uno::Reference< awt::XWindow > xAppletWindow( mxFrame->getComponentWindow() );
if( xAppletWindow.is() )
- xAppletWindow->setPosSize( 0, 0,
- static_cast<sal_Int32>(rPixelBounds.getWidth()),
+ xAppletWindow->setPosSize( 0, 0,
+ static_cast<sal_Int32>(rPixelBounds.getWidth()),
static_cast<sal_Int32>(rPixelBounds.getHeight()),
awt::PosSize::POSSIZE );
}
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
return false;
}
@@ -234,7 +234,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
void ViewAppletShape::endApplet()
{
uno::Reference<util::XCloseable> xCloseable(
@@ -249,11 +249,11 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ViewAppletShape::render( const ::basegfx::B2DRectangle& rBounds ) const
{
::cppcanvas::CanvasSharedPtr pCanvas = mpViewLayer->getCanvas();
-
+
if( !pCanvas )
return false;
@@ -274,24 +274,24 @@ namespace slideshow
return false;
::basegfx::B2DRange aTmpRange;
- ::canvas::tools::calcTransformedRectBounds( aTmpRange,
- rBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRange,
+ rBounds,
mpViewLayer->getTransformation() );
const ::basegfx::B2IRange& rPixelBounds(
::basegfx::unotools::b2ISurroundingRangeFromB2DRange( aTmpRange ));
-
+
uno::Reference< awt::XWindow > xFrameWindow( mxFrame->getContainerWindow() );
if( xFrameWindow.is() )
- xFrameWindow->setPosSize( static_cast<sal_Int32>(rPixelBounds.getMinX()),
- static_cast<sal_Int32>(rPixelBounds.getMinY()),
- static_cast<sal_Int32>(rPixelBounds.getWidth()),
+ xFrameWindow->setPosSize( static_cast<sal_Int32>(rPixelBounds.getMinX()),
+ static_cast<sal_Int32>(rPixelBounds.getMinY()),
+ static_cast<sal_Int32>(rPixelBounds.getWidth()),
static_cast<sal_Int32>(rPixelBounds.getHeight()),
awt::PosSize::POSSIZE );
uno::Reference< awt::XWindow > xAppletWindow( mxFrame->getComponentWindow() );
if( xAppletWindow.is() )
- xAppletWindow->setPosSize( 0, 0,
- static_cast<sal_Int32>(rPixelBounds.getWidth()),
+ xAppletWindow->setPosSize( 0, 0,
+ static_cast<sal_Int32>(rPixelBounds.getWidth()),
static_cast<sal_Int32>(rPixelBounds.getHeight()),
awt::PosSize::POSSIZE );
diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx
index 29e81c4e2bc5..b80b89f51254 100644
--- a/slideshow/source/engine/shapes/viewappletshape.hxx
+++ b/slideshow/source/engine/shapes/viewappletshape.hxx
@@ -2,7 +2,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
@@ -41,7 +41,7 @@ namespace com { namespace sun { namespace star {
namespace frame {
class XSynchronousFrameLoader;
class XFrame;
-}
+}
namespace uno {
class XComponentContext;
}
@@ -81,19 +81,19 @@ namespace slideshow
@param nNumPropEntries
Number of property table entries (in pPropCopyTable)
*/
- ViewAppletShape( const ViewLayerSharedPtr& rViewLayer,
- const ::com::sun::star::uno::Reference<
+ ViewAppletShape( const ViewLayerSharedPtr& rViewLayer,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& rxShape,
const ::rtl::OUString& rServiceName,
const char** pPropCopyTable,
sal_Size nNumPropEntries,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
/** destroy the object
*/
virtual ~ViewAppletShape();
-
+
/** Query the associated view layer of this shape
*/
ViewLayerSharedPtr getViewLayer() const;
@@ -126,14 +126,14 @@ namespace slideshow
/** Render the ViewShape
- This method renders the ViewAppletShape on the associated view.
+ This method renders the ViewAppletShape on the associated view.
@param rBounds
The current applet shape bounds
@return whether the rendering finished successfully.
*/
- bool render( const ::basegfx::B2DRectangle& rBounds ) const;
+ bool render( const ::basegfx::B2DRectangle& rBounds ) const;
/** Resize the ViewShape
@@ -158,7 +158,7 @@ namespace slideshow
/// the frame containing the applet
::com::sun::star::uno::Reference<
::com::sun::star::frame::XFrame> mxFrame;
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext> mxComponentContext;
};
diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
index e8b0930e1940..e849017b00a0 100644
--- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx
+++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
@@ -2,7 +2,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
@@ -64,15 +64,15 @@ namespace slideshow
{
namespace internal
{
-
- bool ViewBackgroundShape::prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf ) const
+
+ bool ViewBackgroundShape::prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" );
ENSURE_OR_RETURN_FALSE( rMtf,
"ViewBackgroundShape::prefetch(): no valid metafile!" );
- const ::basegfx::B2DHomMatrix& rCanvasTransform(
+ const ::basegfx::B2DHomMatrix& rCanvasTransform(
mpViewLayer->getTransformation() );
if( !mxBitmap.is() ||
@@ -83,21 +83,21 @@ namespace slideshow
// determine transformed page bounds
::basegfx::B2DRectangle aTmpRect;
- ::canvas::tools::calcTransformedRectBounds( aTmpRect,
- maBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRect,
+ maBounds,
rCanvasTransform );
// determine pixel size of bitmap (choose it one pixel
// larger, as polygon rendering takes one pixel more
// to the right and to the bottom)
- const ::basegfx::B2ISize aBmpSizePixel(
+ const ::basegfx::B2ISize aBmpSizePixel(
::basegfx::fround( aTmpRect.getRange().getX() + 1),
::basegfx::fround( aTmpRect.getRange().getY() + 1) );
// create a bitmap of appropriate size
- ::cppcanvas::BitmapSharedPtr pBitmap(
- ::cppcanvas::BaseGfxFactory::getInstance().createBitmap(
- rDestinationCanvas,
+ ::cppcanvas::BitmapSharedPtr pBitmap(
+ ::cppcanvas::BaseGfxFactory::getInstance().createBitmap(
+ rDestinationCanvas,
aBmpSizePixel ) );
ENSURE_OR_THROW( pBitmap,
@@ -112,7 +112,7 @@ namespace slideshow
initSlideBackground( pBitmapCanvas,
aBmpSizePixel );
- // apply linear part of destination canvas transformation (linear means in this context:
+ // apply linear part of destination canvas transformation (linear means in this context:
// transformation without any translational components)
::basegfx::B2DHomMatrix aLinearTransform( rCanvasTransform );
aLinearTransform.set( 0, 2, 0.0 );
@@ -124,8 +124,8 @@ namespace slideshow
maBounds.getMinX(), maBounds.getMinY()));
::cppcanvas::RendererSharedPtr pRenderer(
- ::cppcanvas::VCLFactory::getInstance().createRenderer(
- pBitmapCanvas,
+ ::cppcanvas::VCLFactory::getInstance().createRenderer(
+ pBitmapCanvas,
*rMtf.get(),
::cppcanvas::Renderer::Parameters() ) );
@@ -138,14 +138,14 @@ namespace slideshow
mxBitmap = pBitmap->getUNOBitmap();
}
- mpLastMtf = rMtf;
+ mpLastMtf = rMtf;
maLastTransformation = rCanvasTransform;
return mxBitmap.is();
}
- ViewBackgroundShape::ViewBackgroundShape( const ViewLayerSharedPtr& rViewLayer,
- const ::basegfx::B2DRectangle& rShapeBounds ) :
+ ViewBackgroundShape::ViewBackgroundShape( const ViewLayerSharedPtr& rViewLayer,
+ const ::basegfx::B2DRectangle& rShapeBounds ) :
mpViewLayer( rViewLayer ),
mxBitmap(),
mpLastMtf(),
@@ -165,12 +165,12 @@ namespace slideshow
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::draw()" );
- const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas( mpViewLayer->getCanvas() );
-
+ const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas( mpViewLayer->getCanvas() );
+
if( !prefetch( rDestinationCanvas, rMtf ) )
return false;
- ENSURE_OR_RETURN_FALSE( mxBitmap.is(),
+ ENSURE_OR_RETURN_FALSE( mxBitmap.is(),
"ViewBackgroundShape::draw(): Invalid background bitmap" );
::basegfx::B2DHomMatrix aTransform( mpViewLayer->getTransformation() );
@@ -187,13 +187,13 @@ namespace slideshow
rendering::RenderState aRenderState;
::canvas::tools::initRenderState( aRenderState );
-
+
::canvas::tools::setRenderStateTransform( aRenderState, aTransform );
try
{
- rDestinationCanvas->getUNOCanvas()->drawBitmap( mxBitmap,
- rDestinationCanvas->getViewState(),
+ rDestinationCanvas->getUNOCanvas()->drawBitmap( mxBitmap,
+ rDestinationCanvas->getViewState(),
aRenderState );
}
catch( uno::Exception& )
diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.hxx b/slideshow/source/engine/shapes/viewbackgroundshape.hxx
index da7beb7b03be..cd561a7129ec 100644
--- a/slideshow/source/engine/shapes/viewbackgroundshape.hxx
+++ b/slideshow/source/engine/shapes/viewbackgroundshape.hxx
@@ -2,7 +2,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
@@ -65,8 +65,8 @@ namespace slideshow
Bounds of the background shape, in document coordinate
system.
*/
- ViewBackgroundShape( const ViewLayerSharedPtr& rViewLayer,
- const ::basegfx::B2DRectangle& rShapeBounds );
+ ViewBackgroundShape( const ViewLayerSharedPtr& rViewLayer,
+ const ::basegfx::B2DRectangle& rShapeBounds );
/** Query the associated view layer of this shape
*/
@@ -77,24 +77,24 @@ namespace slideshow
private:
/** Prefetch bitmap for given canvas
*/
- bool prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf ) const;
+ bool prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf ) const;
- /** The view layer this object is part of.
+ /** The view layer this object is part of.
*/
- ViewLayerSharedPtr mpViewLayer;
+ ViewLayerSharedPtr mpViewLayer;
/// Generated content bitmap, already with correct output size
- mutable ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap > mxBitmap;
+ mutable ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmap > mxBitmap;
/// The last metafile a render object was generated for
- mutable GDIMetaFileSharedPtr mpLastMtf;
+ mutable GDIMetaFileSharedPtr mpLastMtf;
/// The canvas, mpRenderer is associated with
- mutable ::basegfx::B2DHomMatrix maLastTransformation;
+ mutable ::basegfx::B2DHomMatrix maLastTransformation;
- const ::basegfx::B2DRectangle maBounds;
+ const ::basegfx::B2DRectangle maBounds;
};
typedef ::boost::shared_ptr< ViewBackgroundShape > ViewBackgroundShapeSharedPtr;
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 2155e4161c0c..def413f3167b 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -2,7 +2,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
@@ -106,14 +106,14 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
ViewMediaShape::~ViewMediaShape()
- {
+ {
try
{
endMedia();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -130,7 +130,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ViewMediaShape::startMedia()
{
if( !mxPlayer.is() )
@@ -138,22 +138,22 @@ namespace slideshow
if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) )
mxPlayer->start();
-
+
return true;
}
// ---------------------------------------------------------------------
-
+
void ViewMediaShape::endMedia()
{
// shutdown player window
if( mxPlayerWindow.is() )
{
uno::Reference< lang::XComponent > xComponent( mxPlayerWindow, uno::UNO_QUERY );
-
+
if( xComponent.is() )
xComponent->dispose();
-
+
mxPlayerWindow.clear();
}
@@ -162,23 +162,23 @@ namespace slideshow
#else
mpMediaWindow = ::std::auto_ptr< JavaChildWindow >();
#endif
-
+
// shutdown player
if( mxPlayer.is() )
{
mxPlayer->stop();
uno::Reference< lang::XComponent > xComponent( mxPlayer, uno::UNO_QUERY );
-
+
if( xComponent.is() )
xComponent->dispose();
-
+
mxPlayer.clear();
}
}
// ---------------------------------------------------------------------
-
+
void ViewMediaShape::pauseMedia()
{
if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) )
@@ -194,8 +194,8 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
- bool ViewMediaShape::render( const ::basegfx::B2DRectangle& rBounds ) const
+
+ bool ViewMediaShape::render( const ::basegfx::B2DRectangle& rBounds ) const
{
::cppcanvas::CanvasSharedPtr pCanvas = mpViewLayer->getCanvas();;
@@ -213,7 +213,7 @@ namespace slideshow
return true;
}
- bool ViewMediaShape::resize( const ::basegfx::B2DRectangle& rNewBounds ) const
+ bool ViewMediaShape::resize( const ::basegfx::B2DRectangle& rNewBounds ) const
{
maBounds = rNewBounds;
@@ -227,7 +227,7 @@ namespace slideshow
uno::Reference< beans::XPropertySet > xPropSet( pCanvas->getUNOCanvas()->getDevice(),
uno::UNO_QUERY );
-
+
uno::Reference< awt::XWindow > xParentWindow;
if( xPropSet.is() &&
getPropertyValue( xParentWindow,
@@ -235,97 +235,97 @@ namespace slideshow
::rtl::OUString::createFromAscii( "Window" )) )
{
const awt::Rectangle aRect( xParentWindow->getPosSize() );
-
+
maWindowOffset.X = aRect.X;
maWindowOffset.Y = aRect.Y;
}
::basegfx::B2DRange aTmpRange;
- ::canvas::tools::calcTransformedRectBounds( aTmpRange,
- rNewBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRange,
+ rNewBounds,
mpViewLayer->getTransformation() );
const ::basegfx::B2IRange& rRangePix(
::basegfx::unotools::b2ISurroundingRangeFromB2DRange( aTmpRange ));
-
+
mxPlayerWindow->setEnable( !rRangePix.isEmpty() );
-
+
if( rRangePix.isEmpty() )
- return true;
-
+ return true;
+
const Point aPosPixel( rRangePix.getMinX() + maWindowOffset.X,
rRangePix.getMinY() + maWindowOffset.Y );
- const Size aSizePixel( rRangePix.getMaxX() - rRangePix.getMinX(),
+ const Size aSizePixel( rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );
-
+
if( mpMediaWindow.get() )
{
mpMediaWindow->SetPosSizePixel( aPosPixel, aSizePixel );
- mxPlayerWindow->setPosSize( 0, 0,
- aSizePixel.Width(), aSizePixel.Height(),
+ mxPlayerWindow->setPosSize( 0, 0,
+ aSizePixel.Width(), aSizePixel.Height(),
0 );
}
else
{
- mxPlayerWindow->setPosSize( aPosPixel.X(), aPosPixel.Y(),
- aSizePixel.Width(), aSizePixel.Height(),
+ mxPlayerWindow->setPosSize( aPosPixel.X(), aPosPixel.Y(),
+ aSizePixel.Width(), aSizePixel.Height(),
0 );
}
return true;
}
-
+
// ---------------------------------------------------------------------
-
+
bool ViewMediaShape::implInitialize( const ::basegfx::B2DRectangle& rBounds )
{
if( !mxPlayer.is() && mxShape.is() )
{
- ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(),
+ ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(),
"ViewMediaShape::update(): Invalid layer canvas" );
uno::Reference< rendering::XCanvas > xCanvas( mpViewLayer->getCanvas()->getUNOCanvas() );
if( xCanvas.is() )
{
- uno::Reference< beans::XPropertySet > xPropSet;
- ::rtl::OUString aURL;
-
+ uno::Reference< beans::XPropertySet > xPropSet;
+ ::rtl::OUString aURL;
+
try
{
xPropSet.set( mxShape, uno::UNO_QUERY );
// create Player
- if( xPropSet.is() &&
- ( xPropSet->getPropertyValue(
+ if( xPropSet.is() &&
+ ( xPropSet->getPropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ) ) >>=aURL ) )
{
implInitializeMediaPlayer( aURL );
}
-
+
// create visible object
uno::Sequence< uno::Any > aDeviceParams;
-
+
if( ::canvas::tools::getDeviceInfo( xCanvas, aDeviceParams ).getLength() > 1 )
{
::rtl::OUString aImplName;
-
+
aDeviceParams[ 0 ] >>= aImplName;
-
- if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
+
+ if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("VCL") ) || aImplName.endsWithIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("Cairo") ) )
{
implInitializeVCLBasedPlayerWindow( rBounds, aDeviceParams );
}
- else if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
+ else if( aImplName.endsWithIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("DX")) ||
- aImplName.endsWithIgnoreAsciiCaseAsciiL(
+ aImplName.endsWithIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("DX9")))
{
implInitializeDXBasedPlayerWindow( rBounds, aDeviceParams );
}
}
-
+
// set player properties
implSetMediaProperties( xPropSet );
}
@@ -338,22 +338,22 @@ namespace slideshow
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
}
-
+
return mxPlayer.is() || mxPlayerWindow.is();
}
// ---------------------------------------------------------------------
-
+
void ViewMediaShape::implSetMediaProperties( const uno::Reference< beans::XPropertySet >& rxProps )
{
if( mxPlayer.is() )
{
mxPlayer->setMediaTime( 0.0 );
-
+
if( rxProps.is() )
{
sal_Bool bLoop( false );
@@ -373,7 +373,7 @@ namespace slideshow
rxProps,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VolumeDB" )));
mxPlayer->setVolumeDB( nVolumeDB );
-
+
if( mxPlayerWindow.is() )
{
media::ZoomLevel eZoom(media::ZoomLevel_FIT_TO_WINDOW);
@@ -385,9 +385,9 @@ namespace slideshow
}
}
}
-
+
// ---------------------------------------------------------------------
-
+
void ViewMediaShape::implInitializeMediaPlayer( const ::rtl::OUString& rMediaURL )
{
if( !mxPlayer.is() )
@@ -396,7 +396,7 @@ namespace slideshow
{
if( rMediaURL.getLength() )
{
- mxPlayer.set( avmedia::MediaWindow::createPlayer( rMediaURL ),
+ mxPlayer.set( avmedia::MediaWindow::createPlayer( rMediaURL ),
uno::UNO_QUERY );
}
}
@@ -415,7 +415,7 @@ namespace slideshow
}
// ---------------------------------------------------------------------
-
+
bool ViewMediaShape::implInitializeVCLBasedPlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const uno::Sequence< uno::Any >& rVCLDeviceParams)
{
@@ -425,24 +425,24 @@ namespace slideshow
try
{
sal_Int64 aVal=0;
-
+
rVCLDeviceParams[ 1 ] >>= aVal;
-
+
Window* pWindow = reinterpret_cast< Window* >( aVal );
-
+
if( pWindow )
{
::basegfx::B2DRange aTmpRange;
- ::canvas::tools::calcTransformedRectBounds( aTmpRange,
- rBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRange,
+ rBounds,
mpViewLayer->getTransformation() );
const ::basegfx::B2IRange& rRangePix(
::basegfx::unotools::b2ISurroundingRangeFromB2DRange( aTmpRange ));
-
+
if( !rRangePix.isEmpty() )
{
- uno::Sequence< uno::Any > aArgs( 3 );
- awt::Rectangle aAWTRect( rRangePix.getMinX(),
+ uno::Sequence< uno::Any > aArgs( 3 );
+ awt::Rectangle aAWTRect( rRangePix.getMinX(),
rRangePix.getMinY(),
rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );
@@ -454,9 +454,9 @@ namespace slideshow
mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) );
#endif
mpMediaWindow->SetBackground( Color( COL_BLACK ) );
- mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X,
+ mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X,
aAWTRect.Y ),
- Size( aAWTRect.Width,
+ Size( aAWTRect.Width,
aAWTRect.Height ));
mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
mpMediaWindow->EnableEraseBackground( FALSE );
@@ -464,11 +464,11 @@ namespace slideshow
mpMediaWindow->SetForwardKey( TRUE );
mpMediaWindow->SetMouseTransparent( TRUE );
mpMediaWindow->Show();
-
+
if( mxPlayer.is() )
{
#ifndef GSTREAMER
- aArgs[ 0 ] = uno::makeAny(
+ aArgs[ 0 ] = uno::makeAny(
sal::static_int_cast<sal_IntPtr>(
mpMediaWindow->getParentWindowHandleForJava()) );
#else
@@ -481,9 +481,9 @@ namespace slideshow
OSL_TRACE( "xwindow id: %ld", pSystemData->aWindow );
aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
#endif
-
+
mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
-
+
if( mxPlayerWindow.is() )
{
mxPlayerWindow->setVisible( true );
@@ -502,15 +502,15 @@ namespace slideshow
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
-
+
return mxPlayerWindow.is();
}
-
+
// ---------------------------------------------------------------------
-
+
bool ViewMediaShape::implInitializeDXBasedPlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const uno::Sequence< uno::Any >& rDXDeviceParams )
{
@@ -521,33 +521,33 @@ namespace slideshow
if( rDXDeviceParams.getLength() == 2 )
{
sal_Int64 aWNDVal=0;
-
+
rDXDeviceParams[ 1 ] >>= aWNDVal;
-
+
if( aWNDVal )
{
::basegfx::B2DRange aTmpRange;
- ::canvas::tools::calcTransformedRectBounds( aTmpRange,
- rBounds,
+ ::canvas::tools::calcTransformedRectBounds( aTmpRange,
+ rBounds,
mpViewLayer->getTransformation() );
const ::basegfx::B2IRange& rRangePix(
::basegfx::unotools::b2ISurroundingRangeFromB2DRange( aTmpRange ));
-
+
if( !rRangePix.isEmpty() )
{
- uno::Sequence< uno::Any > aArgs( 2 );
- awt::Rectangle aAWTRect( rRangePix.getMinX() + maWindowOffset.X,
+ uno::Sequence< uno::Any > aArgs( 2 );
+ awt::Rectangle aAWTRect( rRangePix.getMinX() + maWindowOffset.X,
rRangePix.getMinY() + maWindowOffset.Y,
rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );
if( mxPlayer.is() )
{
- aArgs[ 0 ] = uno::makeAny(
+ aArgs[ 0 ] = uno::makeAny(
sal::static_int_cast<sal_Int32>(
aWNDVal) );
aArgs[ 1 ] = uno::makeAny( aAWTRect );
-
+
mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
}
}
@@ -563,10 +563,10 @@ namespace slideshow
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
-
+
return mxPlayerWindow.is();
}
}
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index 4815f2dc9e6a..576688891cf7 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -2,7 +2,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
@@ -42,15 +42,15 @@ class SystemChildWindow;
namespace com { namespace sun { namespace star { namespace drawing {
class XShape;
-}
-namespace media {
+}
+namespace media {
class XPlayer;
class XPlayerWindow;
-}
+}
namespace uno {
class XComponentContext;
}
-namespace beans{
+namespace beans{
class XPropertySet;
} } } }
@@ -72,16 +72,16 @@ namespace slideshow
@param rView
The associated View object.
*/
- ViewMediaShape( const ViewLayerSharedPtr& rViewLayer,
- const ::com::sun::star::uno::Reference<
+ ViewMediaShape( const ViewLayerSharedPtr& rViewLayer,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& rxShape,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
/** destroy the object
*/
virtual ~ViewMediaShape();
-
+
/** Query the associated view layer of this shape
*/
ViewLayerSharedPtr getViewLayer() const;
@@ -125,14 +125,14 @@ namespace slideshow
/** Render the ViewShape
- This method renders the ViewMediaShape on the associated view.
+ This method renders the ViewMediaShape on the associated view.
@param rBounds
The current media shape bounds
@return whether the rendering finished successfully.
*/
- bool render( const ::basegfx::B2DRectangle& rBounds ) const;
+ bool render( const ::basegfx::B2DRectangle& rBounds ) const;
/** Resize the ViewShape
@@ -144,10 +144,10 @@ namespace slideshow
@return whether the resize finished successfully.
*/
- bool resize( const ::basegfx::B2DRectangle& rNewBounds ) const;
+ bool resize( const ::basegfx::B2DRectangle& rNewBounds ) const;
private:
-
+
bool implInitialize( const ::basegfx::B2DRectangle& rBounds );
void implSetMediaProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rxProps );
void implInitializeMediaPlayer( const ::rtl::OUString& rMediaURL );
@@ -155,20 +155,20 @@ namespace slideshow
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rVCLDeviceParams );
bool implInitializeDXBasedPlayerWindow( const ::basegfx::B2DRectangle& rBounds,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams );
-
- ViewLayerSharedPtr mpViewLayer;
+
+ ViewLayerSharedPtr mpViewLayer;
#ifdef GSTREAMER
- ::std::auto_ptr< SystemChildWindow > mpMediaWindow;
+ ::std::auto_ptr< SystemChildWindow > mpMediaWindow;
#else
::std::auto_ptr< JavaChildWindow > mpMediaWindow;
#endif
mutable ::com::sun::star::awt::Point maWindowOffset;
mutable ::basegfx::B2DRectangle maBounds;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
- ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
- ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> mxComponentContext;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
+ ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> mxComponentContext;
bool mbIsSoundEnabled;
};
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index 20b85756f389..319344f4f083 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -2,7 +2,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
@@ -72,10 +72,10 @@ namespace slideshow
// TODO(F2): Provide sensible setup for mtf-related attributes (fill mode,
// char rotation etc.). Do that via mtf argument at this object
- bool ViewShape::prefetch( RendererCacheEntry& io_rCacheEntry,
- const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr ) const
+ bool ViewShape::prefetch( RendererCacheEntry& io_rCacheEntry,
+ const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::prefetch()" );
ENSURE_OR_RETURN_FALSE( rMtf,
@@ -124,9 +124,9 @@ namespace slideshow
// out-of-range values appropriately
// dim color overrides all other colors
- aParms.maFillColor =
- aParms.maLineColor =
- aParms.maTextColor =
+ aParms.maFillColor =
+ aParms.maLineColor =
+ aParms.maTextColor =
rAttr->getDimColor().getIntegerColor();
}
if( rAttr->isFontFamilyValid() )
@@ -175,7 +175,7 @@ namespace slideshow
*rMtf.get(),
aParms );
- io_rCacheEntry.mpMtf = rMtf;
+ io_rCacheEntry.mpMtf = rMtf;
io_rCacheEntry.mpDestinationCanvas = rDestinationCanvas;
// also invalidate alpha compositing bitmap (created
@@ -192,16 +192,16 @@ namespace slideshow
return io_rCacheEntry.mpRenderer;
}
- bool ViewShape::draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr,
- const ::basegfx::B2DHomMatrix& rTransform,
- const ::basegfx::B2DPolyPolygon* pClip,
- const VectorOfDocTreeNodes& rSubsets ) const
+ bool ViewShape::draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr,
+ const ::basegfx::B2DHomMatrix& rTransform,
+ const ::basegfx::B2DPolyPolygon* pClip,
+ const VectorOfDocTreeNodes& rSubsets ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::draw()" );
- ::cppcanvas::RendererSharedPtr pRenderer(
+ ::cppcanvas::RendererSharedPtr pRenderer(
getRenderer( rDestinationCanvas, rMtf, rAttr ) );
ENSURE_OR_RETURN_FALSE( pRenderer, "ViewShape::draw(): Invalid renderer" );
@@ -249,8 +249,8 @@ namespace slideshow
// --------------------------------
bool bRet(true);
- VectorOfDocTreeNodes::const_iterator aIter( rSubsets.begin() );
- const VectorOfDocTreeNodes::const_iterator aEnd ( rSubsets.end() );
+ VectorOfDocTreeNodes::const_iterator aIter( rSubsets.begin() );
+ const VectorOfDocTreeNodes::const_iterator aEnd ( rSubsets.end() );
while( aIter != aEnd )
{
if( !pRenderer->drawSubset( aIter->getStartIndex(),
@@ -267,8 +267,8 @@ namespace slideshow
namespace
{
/// Convert untransformed shape update area to device pixel.
- ::basegfx::B2DRectangle shapeArea2AreaPixel( const ::basegfx::B2DHomMatrix& rCanvasTransformation,
- const ::basegfx::B2DRectangle& rUntransformedArea )
+ ::basegfx::B2DRectangle shapeArea2AreaPixel( const ::basegfx::B2DHomMatrix& rCanvasTransformation,
+ const ::basegfx::B2DRectangle& rUntransformedArea )
{
// convert area to pixel, and add anti-aliasing border
@@ -291,14 +291,14 @@ namespace slideshow
}
/// Convert shape unit rect to device pixel.
- ::basegfx::B2DRectangle calcUpdateAreaPixel( const ::basegfx::B2DRectangle& rUnitBounds,
- const ::basegfx::B2DHomMatrix& rShapeTransformation,
- const ::basegfx::B2DHomMatrix& rCanvasTransformation,
- const ShapeAttributeLayerSharedPtr& pAttr )
+ ::basegfx::B2DRectangle calcUpdateAreaPixel( const ::basegfx::B2DRectangle& rUnitBounds,
+ const ::basegfx::B2DHomMatrix& rShapeTransformation,
+ const ::basegfx::B2DHomMatrix& rCanvasTransformation,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
// calc update area for whole shape (including
// character scaling)
- return shapeArea2AreaPixel( rCanvasTransformation,
+ return shapeArea2AreaPixel( rCanvasTransformation,
getShapeUpdateArea( rUnitBounds,
rShapeTransformation,
pAttr ) );
@@ -306,15 +306,15 @@ namespace slideshow
}
bool ViewShape::renderSprite( const ViewLayerSharedPtr& rViewLayer,
- const GDIMetaFileSharedPtr& rMtf,
- const ::basegfx::B2DRectangle& rOrigBounds,
- const ::basegfx::B2DRectangle& rBounds,
- const ::basegfx::B2DRectangle& rUnitBounds,
- int nUpdateFlags,
- const ShapeAttributeLayerSharedPtr& pAttr,
- const VectorOfDocTreeNodes& rSubsets,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ::basegfx::B2DRectangle& rOrigBounds,
+ const ::basegfx::B2DRectangle& rBounds,
+ const ::basegfx::B2DRectangle& rUnitBounds,
+ int nUpdateFlags,
+ const ShapeAttributeLayerSharedPtr& pAttr,
+ const VectorOfDocTreeNodes& rSubsets,
double nPrio,
- bool bIsVisible ) const
+ bool bIsVisible ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::renderSprite()" );
@@ -344,7 +344,7 @@ namespace slideshow
// else is handled via the sprite transformation
::basegfx::B2DHomMatrix aNonTranslationalShapeTransformation;
aNonTranslationalShapeTransformation.scale( rOrigBounds.getWidth(),
- rOrigBounds.getHeight() );
+ rOrigBounds.getHeight() );
::basegfx::B2DHomMatrix aShapeTransformation( aNonTranslationalShapeTransformation );
aShapeTransformation.translate( rOrigBounds.getMinX(),
rOrigBounds.getMinY() );
@@ -371,11 +371,11 @@ namespace slideshow
// char scaling). NOTE: to cancel the shape translation,
// contained in rSpriteBoundsPixel, this is _without_ any
// translational component (fixed along with #121921#).
- ::basegfx::B2DRectangle aLogShapeBounds;
+ ::basegfx::B2DRectangle aLogShapeBounds;
const ::basegfx::B2DRectangle& rNominalShapeBoundsPixel(
- shapeArea2AreaPixel( rCanvasTransform,
- ::canvas::tools::calcTransformedRectBounds(
- aLogShapeBounds,
+ shapeArea2AreaPixel( rCanvasTransform,
+ ::canvas::tools::calcTransformedRectBounds(
+ aLogShapeBounds,
::basegfx::B2DRectangle(0.0,0.0,1.0,1.0),
aNonTranslationalShapeTransformation ) ) );
@@ -420,7 +420,7 @@ namespace slideshow
// rSpriteBoundsPixel upper, left corner is: the offset we
// have to move sprite output to the right, top (to make
// the desired subset content visible at all)
- const ::basegfx::B2DSize& rSpriteCorrectionOffset(
+ const ::basegfx::B2DSize& rSpriteCorrectionOffset(
rSpriteBoundsPixel.getMinimum() - rNominalShapeBoundsPixel.getMinimum() );
// offset added top, left for anti-aliasing (otherwise,
@@ -439,8 +439,8 @@ namespace slideshow
// NOTE: As for now, sprites are always positioned on
// integer pixel positions on screen, have to round to
// nearest integer here, too (fixed along with #121921#)
- mpSprite->setPixelOffset(
- aAAOffset - ::basegfx::B2DSize(
+ mpSprite->setPixelOffset(
+ aAAOffset - ::basegfx::B2DSize(
::basegfx::fround( rSpriteCorrectionOffset.getX() ),
::basegfx::fround( rSpriteCorrectionOffset.getY() ) ) );
@@ -461,8 +461,8 @@ namespace slideshow
if( mbForceUpdate || (nUpdateFlags & ALPHA) )
{
mpSprite->setAlpha( (pAttr && pAttr->isAlphaValid()) ?
- ::basegfx::clamp(pAttr->getAlpha(),
- 0.0,
+ ::basegfx::clamp(pAttr->getAlpha(),
+ 0.0,
1.0) :
1.0 );
}
@@ -474,7 +474,7 @@ namespace slideshow
// extract linear part of canvas view transformation
// (linear means: without translational components)
- ::basegfx::B2DHomMatrix aViewTransform(
+ ::basegfx::B2DHomMatrix aViewTransform(
mpViewLayer->getTransformation() );
aViewTransform.set( 0, 2, 0.0 );
aViewTransform.set( 1, 2, 0.0 );
@@ -485,11 +485,11 @@ namespace slideshow
(rSpriteSizePixel.getX()-2*::cppcanvas::Canvas::ANTIALIASING_EXTRA_SIZE),
rSpriteSizePixel.getY()/
(rSpriteSizePixel.getY()-2*::cppcanvas::Canvas::ANTIALIASING_EXTRA_SIZE));
-
+
// transform clip polygon from view to device
// coordinate space
aClipPoly.transform( aViewTransform );
-
+
mpSprite->clip( aClipPoly );
}
else
@@ -526,14 +526,14 @@ namespace slideshow
rSubsets );
}
- bool ViewShape::render( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ::basegfx::B2DRectangle& rBounds,
- const ::basegfx::B2DRectangle& rUpdateBounds,
- int nUpdateFlags,
- const ShapeAttributeLayerSharedPtr& pAttr,
- const VectorOfDocTreeNodes& rSubsets,
- bool bIsVisible ) const
+ bool ViewShape::render( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ::basegfx::B2DRectangle& rBounds,
+ const ::basegfx::B2DRectangle& rUpdateBounds,
+ int nUpdateFlags,
+ const ShapeAttributeLayerSharedPtr& pAttr,
+ const VectorOfDocTreeNodes& rSubsets,
+ bool bIsVisible ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::render()" );
@@ -601,7 +601,7 @@ namespace slideshow
// alpha
// -------------------------------------------
- const ::basegfx::B2DHomMatrix aTransform(
+ const ::basegfx::B2DHomMatrix aTransform(
getShapeTransformation( rBounds,
pAttr ) );
@@ -630,7 +630,7 @@ namespace slideshow
// blend effect, have to first render shape as
// a whole, then blit that surface with global
// alpha to the destination)
- const RendererCacheVector::iterator aCompositingSurface(
+ const RendererCacheVector::iterator aCompositingSurface(
getCacheEntry( rDestinationCanvas ) );
if( !aCompositingSurface->mpLastBitmapCanvas ||
@@ -646,17 +646,17 @@ namespace slideshow
"ViewShape::render(): Could not create compositing surface");
aCompositingSurface->mpDestinationCanvas = rDestinationCanvas;
- aCompositingSurface->mpLastBitmap = pBitmap;
- aCompositingSurface->mpLastBitmapCanvas = pBitmap->getBitmapCanvas();
+ aCompositingSurface->mpLastBitmap = pBitmap;
+ aCompositingSurface->mpLastBitmapCanvas = pBitmap->getBitmapCanvas();
}
// buffer aCompositingSurface iterator content
// - said one might get invalidated during
// draw() below.
- ::cppcanvas::BitmapCanvasSharedPtr pBitmapCanvas(
+ ::cppcanvas::BitmapCanvasSharedPtr pBitmapCanvas(
aCompositingSurface->mpLastBitmapCanvas );
- ::cppcanvas::BitmapSharedPtr pBitmap(
+ ::cppcanvas::BitmapSharedPtr pBitmap(
aCompositingSurface->mpLastBitmap);
// setup bitmap canvas transformation -
@@ -727,7 +727,7 @@ namespace slideshow
// retrieve shape transformation, _with_ shape translation
// to actual page position.
- const ::basegfx::B2DHomMatrix aTransform(
+ const ::basegfx::B2DHomMatrix aTransform(
getShapeTransformation( rBounds,
pAttr ) );
@@ -739,7 +739,7 @@ namespace slideshow
rSubsets );
}
-
+
// -------------------------------------------------------------------------------------
ViewShape::ViewShape( const ViewLayerSharedPtr& rViewLayer ) :
@@ -757,16 +757,16 @@ namespace slideshow
return mpViewLayer;
}
- ViewShape::RendererCacheVector::iterator ViewShape::getCacheEntry( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas ) const
+ ViewShape::RendererCacheVector::iterator ViewShape::getCacheEntry( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas ) const
{
// lookup destination canvas - is there already a renderer
// created for that target?
- RendererCacheVector::iterator aIter;
+ RendererCacheVector::iterator aIter;
const RendererCacheVector::iterator aEnd( maRenderers.end() );
// already there?
- if( (aIter=::std::find_if( maRenderers.begin(),
- aEnd,
+ if( (aIter=::std::find_if( maRenderers.begin(),
+ aEnd,
::boost::bind(
::std::equal_to< ::cppcanvas::CanvasSharedPtr >(),
::boost::cref( rDestinationCanvas ),
@@ -795,14 +795,14 @@ namespace slideshow
return aIter;
}
-
- ::cppcanvas::RendererSharedPtr ViewShape::getRenderer( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr ) const
+
+ ::cppcanvas::RendererSharedPtr ViewShape::getRenderer( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr ) const
{
// lookup destination canvas - is there already a renderer
// created for that target?
- const RendererCacheVector::iterator aIter(
+ const RendererCacheVector::iterator aIter(
getCacheEntry( rDestinationCanvas ) );
// now we have a valid entry, either way. call prefetch()
@@ -822,7 +822,7 @@ namespace slideshow
return ::cppcanvas::RendererSharedPtr();
}
}
-
+
void ViewShape::invalidateRenderer() const
{
// simply clear the cache. Subsequent getRenderer() calls
@@ -832,7 +832,7 @@ namespace slideshow
::basegfx::B2DSize ViewShape::getAntialiasingBorder() const
{
- ENSURE_OR_THROW( mpViewLayer->getCanvas(),
+ ENSURE_OR_THROW( mpViewLayer->getCanvas(),
"ViewShape::getAntialiasingBorder(): Invalid ViewLayer canvas" );
const ::basegfx::B2DHomMatrix& rViewTransform(
@@ -864,10 +864,10 @@ namespace slideshow
mbForceUpdate = true;
}
- bool ViewShape::update( const GDIMetaFileSharedPtr& rMtf,
- const RenderArgs& rArgs,
- int nUpdateFlags,
- bool bIsVisible ) const
+ bool ViewShape::update( const GDIMetaFileSharedPtr& rMtf,
+ const RenderArgs& rArgs,
+ int nUpdateFlags,
+ bool bIsVisible ) const
{
RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::update()" );
ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" );
diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx
index 2ab97a27ca98..b92450d5335f 100644
--- a/slideshow/source/engine/shapes/viewshape.hxx
+++ b/slideshow/source/engine/shapes/viewshape.hxx
@@ -2,7 +2,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
@@ -114,13 +114,13 @@ namespace slideshow
enum UpdateFlags
{
- NONE= 0,
- TRANSFORMATION= 1,
- CLIP= 2,
- ALPHA= 4,
- POSITION= 8,
- CONTENT= 16,
- FORCE= 32
+ NONE= 0,
+ TRANSFORMATION= 1,
+ CLIP= 2,
+ ALPHA= 4,
+ POSITION= 8,
+ CONTENT= 16,
+ FORCE= 32
};
struct RenderArgs
@@ -132,7 +132,7 @@ namespace slideshow
@param rUpdateBounds
The area covered by the shape
-
+
@param rBounds
The current shape bounds
@@ -149,12 +149,12 @@ namespace slideshow
@param nPrio
Shape priority
*/
- RenderArgs( const ::basegfx::B2DRectangle& rOrigBounds,
- const ::basegfx::B2DRectangle& rUpdateBounds,
- const ::basegfx::B2DRectangle& rBounds,
- const ::basegfx::B2DRectangle& rUnitBounds,
- const ShapeAttributeLayerSharedPtr& rAttr,
- const VectorOfDocTreeNodes& rSubsets,
+ RenderArgs( const ::basegfx::B2DRectangle& rOrigBounds,
+ const ::basegfx::B2DRectangle& rUpdateBounds,
+ const ::basegfx::B2DRectangle& rBounds,
+ const ::basegfx::B2DRectangle& rUnitBounds,
+ const ShapeAttributeLayerSharedPtr& rAttr,
+ const VectorOfDocTreeNodes& rSubsets,
double nPrio ) :
maOrigBounds( rOrigBounds ),
maUpdateBounds( rUpdateBounds ),
@@ -166,12 +166,12 @@ namespace slideshow
{
}
- const ::basegfx::B2DRectangle maOrigBounds;
- const ::basegfx::B2DRectangle maUpdateBounds;
- const ::basegfx::B2DRectangle maBounds;
- const ::basegfx::B2DRectangle maUnitBounds;
- const ShapeAttributeLayerSharedPtr& mrAttr;
- const VectorOfDocTreeNodes& mrSubsets;
+ const ::basegfx::B2DRectangle maOrigBounds;
+ const ::basegfx::B2DRectangle maUpdateBounds;
+ const ::basegfx::B2DRectangle maBounds;
+ const ::basegfx::B2DRectangle maUnitBounds;
+ const ShapeAttributeLayerSharedPtr& mrAttr;
+ const VectorOfDocTreeNodes& mrSubsets;
const double mnShapePriority;
};
@@ -181,7 +181,7 @@ namespace slideshow
view. If the shape is currently animated, the render
target is the sprite, otherwise the view's
canvas. This method does not render anything, if the
- update flags are 0.
+ update flags are 0.
@param rMtf
The metafile representation of the shape
@@ -198,10 +198,10 @@ namespace slideshow
@return whether the rendering finished successfully.
*/
- bool update( const GDIMetaFileSharedPtr& rMtf,
- const RenderArgs& rArgs,
- int nUpdateFlags,
- bool bIsVisible ) const;
+ bool update( const GDIMetaFileSharedPtr& rMtf,
+ const RenderArgs& rArgs,
+ int nUpdateFlags,
+ bool bIsVisible ) const;
/** Retrieve renderer for given canvas and metafile.
@@ -211,9 +211,9 @@ namespace slideshow
@return a renderer that renders to the given
destination canvas
*/
- ::cppcanvas::RendererSharedPtr getRenderer( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr ) const;
+ ::cppcanvas::RendererSharedPtr getRenderer( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr ) const;
private:
@@ -233,58 +233,58 @@ namespace slideshow
return mpDestinationCanvas;
}
- ::cppcanvas::CanvasSharedPtr mpDestinationCanvas;
- ::cppcanvas::RendererSharedPtr mpRenderer;
- GDIMetaFileSharedPtr mpMtf;
- ::cppcanvas::BitmapSharedPtr mpLastBitmap;
- ::cppcanvas::BitmapCanvasSharedPtr mpLastBitmapCanvas;
+ ::cppcanvas::CanvasSharedPtr mpDestinationCanvas;
+ ::cppcanvas::RendererSharedPtr mpRenderer;
+ GDIMetaFileSharedPtr mpMtf;
+ ::cppcanvas::BitmapSharedPtr mpLastBitmap;
+ ::cppcanvas::BitmapCanvasSharedPtr mpLastBitmapCanvas;
};
- typedef ::std::vector< RendererCacheEntry > RendererCacheVector;
+ typedef ::std::vector< RendererCacheEntry > RendererCacheVector;
/** Prefetch Renderer for given canvas
*/
- bool prefetch( RendererCacheEntry& io_rCacheEntry,
- const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr ) const;
-
+ bool prefetch( RendererCacheEntry& io_rCacheEntry,
+ const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr ) const;
+
/** Draw with prefetched Renderer to stored canvas
This method draws prefetched Renderer to its
associated canvas (which happens to be mpLastCanvas).
*/
- bool draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ShapeAttributeLayerSharedPtr& rAttr,
- const ::basegfx::B2DHomMatrix& rTransform,
- const ::basegfx::B2DPolyPolygon* pClip,
- const VectorOfDocTreeNodes& rSubsets ) const;
+ bool draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ShapeAttributeLayerSharedPtr& rAttr,
+ const ::basegfx::B2DHomMatrix& rTransform,
+ const ::basegfx::B2DPolyPolygon* pClip,
+ const VectorOfDocTreeNodes& rSubsets ) const;
/** Render shape to an active sprite
*/
bool renderSprite( const ViewLayerSharedPtr& rViewLayer,
- const GDIMetaFileSharedPtr& rMtf,
- const ::basegfx::B2DRectangle& rOrigBounds,
- const ::basegfx::B2DRectangle& rBounds,
- const ::basegfx::B2DRectangle& rUnitBounds,
- int nUpdateFlags,
- const ShapeAttributeLayerSharedPtr& pAttr,
- const VectorOfDocTreeNodes& rSubsets,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ::basegfx::B2DRectangle& rOrigBounds,
+ const ::basegfx::B2DRectangle& rBounds,
+ const ::basegfx::B2DRectangle& rUnitBounds,
+ int nUpdateFlags,
+ const ShapeAttributeLayerSharedPtr& pAttr,
+ const VectorOfDocTreeNodes& rSubsets,
double nPrio,
- bool bIsVisible ) const;
+ bool bIsVisible ) const;
/** Render shape to given canvas
*/
- bool render( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
- const GDIMetaFileSharedPtr& rMtf,
- const ::basegfx::B2DRectangle& rBounds,
- const ::basegfx::B2DRectangle& rUpdateBounds,
- int nUpdateFlags,
- const ShapeAttributeLayerSharedPtr& pAttr,
- const VectorOfDocTreeNodes& rSubsets,
- bool bIsVisible ) const;
+ bool render( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ const GDIMetaFileSharedPtr& rMtf,
+ const ::basegfx::B2DRectangle& rBounds,
+ const ::basegfx::B2DRectangle& rUpdateBounds,
+ int nUpdateFlags,
+ const ShapeAttributeLayerSharedPtr& pAttr,
+ const VectorOfDocTreeNodes& rSubsets,
+ bool bIsVisible ) const;
/** Calc sprite size in pixel
@@ -295,7 +295,7 @@ namespace slideshow
Size of the sprite in user coordinate system (doc coordinates)
*/
::basegfx::B2DSize calcSpriteSizePixel( const ::basegfx::B2DSize& rUserSize ) const;
-
+
enum{ MAX_RENDER_CACHE_ENTRIES=2 };
/** Retrieve a valid iterator to renderer cache entry
@@ -311,26 +311,26 @@ namespace slideshow
default-constructed (if newly added)
*/
RendererCacheVector::iterator getCacheEntry( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas ) const;
-
+
void invalidateRenderer() const;
- /** The view layer this object is part of.
+ /** The view layer this object is part of.
Needed for sprite creation
*/
- ViewLayerSharedPtr mpViewLayer;
+ ViewLayerSharedPtr mpViewLayer;
/// A set of cached mtf/canvas combinations
- mutable RendererCacheVector maRenderers;
+ mutable RendererCacheVector maRenderers;
/// The sprite object
- mutable AnimatedSpriteSharedPtr mpSprite;
+ mutable AnimatedSpriteSharedPtr mpSprite;
/// If true, render() calls go to the sprite
- mutable bool mbAnimationMode;
+ mutable bool mbAnimationMode;
/// If true, shape needs full repaint (and the sprite a setup, if any)
- mutable bool mbForceUpdate;
+ mutable bool mbForceUpdate;
};
typedef ::boost::shared_ptr< ViewShape > ViewShapeSharedPtr;
diff --git a/slideshow/source/engine/shapesubset.cxx b/slideshow/source/engine/shapesubset.cxx
index 0c8ad7319a30..2528c4a2279c 100644
--- a/slideshow/source/engine/shapesubset.cxx
+++ b/slideshow/source/engine/shapesubset.cxx
@@ -2,7 +2,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
@@ -44,7 +44,7 @@ namespace slideshow
{
namespace internal
{
- ShapeSubset::ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
+ ShapeSubset::ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
const DocTreeNode& rTreeNode,
const SubsettableShapeManagerSharedPtr& rShapeManager ) :
mpOriginalShape( rOriginalShape ),
@@ -56,10 +56,10 @@ namespace slideshow
"ShapeSubset::ShapeSubset(): Invalid shape manager" );
}
- ShapeSubset::ShapeSubset( const ShapeSubsetSharedPtr& rOriginalSubset,
- const DocTreeNode& rTreeNode ) :
- mpOriginalShape( rOriginalSubset->mpSubsetShape ?
- rOriginalSubset->mpSubsetShape :
+ ShapeSubset::ShapeSubset( const ShapeSubsetSharedPtr& rOriginalSubset,
+ const DocTreeNode& rTreeNode ) :
+ mpOriginalShape( rOriginalSubset->mpSubsetShape ?
+ rOriginalSubset->mpSubsetShape :
rOriginalSubset->mpOriginalShape ),
mpSubsetShape(),
maTreeNode( rTreeNode ),
@@ -73,7 +73,7 @@ namespace slideshow
"ShapeSubset::ShapeSubset(): Subset is bigger than parent" );
}
- ShapeSubset::ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
+ ShapeSubset::ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
const SubsettableShapeManagerSharedPtr& rShapeManager ) :
mpOriginalShape( rOriginalShape ),
mpSubsetShape(),
@@ -88,10 +88,10 @@ namespace slideshow
{
try
{
- // if not done yet: revoke subset from original
+ // if not done yet: revoke subset from original
disableSubsetShape();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -110,8 +110,8 @@ namespace slideshow
if( !mpSubsetShape &&
!maTreeNode.isEmpty() )
{
- mpSubsetShape = mpShapeManager->getSubsetShape(
- mpOriginalShape,
+ mpSubsetShape = mpShapeManager->getSubsetShape(
+ mpOriginalShape,
maTreeNode );
}
@@ -137,7 +137,7 @@ namespace slideshow
{
return maTreeNode;
}
-
+
}
}
diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx
index c345e8012016..b2bca8752385 100644
--- a/slideshow/source/engine/slide/layer.cxx
+++ b/slideshow/source/engine/slide/layer.cxx
@@ -2,7 +2,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
@@ -43,7 +43,7 @@
#include "layer.hxx"
#include <boost/bind.hpp>
-
+
using namespace ::com::sun::star;
@@ -60,7 +60,7 @@ namespace slideshow
mbBoundsDirty(false),
mbBackgroundLayer(true),
mbClipSet(false)
- {
+ {
}
Layer::Layer( const basegfx::B2DRange& rMaxLayerBounds ) :
@@ -71,7 +71,7 @@ namespace slideshow
mbBoundsDirty(false),
mbBackgroundLayer(false),
mbClipSet(false)
- {
+ {
}
ViewLayerSharedPtr Layer::addView( const ViewSharedPtr& rNewView )
@@ -80,9 +80,9 @@ namespace slideshow
ViewEntryVector::iterator aIter;
const ViewEntryVector::iterator aEnd( maViewEntries.end() );
- if( (aIter=std::find_if( maViewEntries.begin(),
+ if( (aIter=std::find_if( maViewEntries.begin(),
aEnd,
- boost::bind<bool>(
+ boost::bind<bool>(
std::equal_to< ViewSharedPtr >(),
boost::bind( &ViewEntry::getView, _1 ),
boost::cref( rNewView )))) != aEnd )
@@ -98,12 +98,12 @@ namespace slideshow
pNewLayer = rNewView;
else
pNewLayer = rNewView->createViewLayer(maBounds);
-
+
// add to local list
- maViewEntries.push_back(
- ViewEntry( rNewView,
+ maViewEntries.push_back(
+ ViewEntry( rNewView,
pNewLayer ));
-
+
return maViewEntries.back().mpViewLayer;
}
@@ -112,10 +112,10 @@ namespace slideshow
OSL_ASSERT( rView );
ViewEntryVector::iterator aIter;
- const ViewEntryVector::iterator aEnd( maViewEntries.end() );
+ const ViewEntryVector::iterator aEnd( maViewEntries.end() );
if( (aIter=std::find_if( maViewEntries.begin(),
aEnd,
- boost::bind<bool>(
+ boost::bind<bool>(
std::equal_to< ViewSharedPtr >(),
boost::bind( &ViewEntry::getView, _1 ),
boost::cref( rView )))) == aEnd )
@@ -126,7 +126,7 @@ namespace slideshow
OSL_ENSURE( std::count_if( maViewEntries.begin(),
aEnd,
- boost::bind<bool>(
+ boost::bind<bool>(
std::equal_to< ViewSharedPtr >(),
boost::bind( &ViewEntry::getView, _1 ),
boost::cref( rView ))) == 1,
@@ -141,13 +141,13 @@ namespace slideshow
void Layer::viewChanged( const ViewSharedPtr& rChangedView )
{
ViewEntryVector::iterator aIter;
- const ViewEntryVector::iterator aEnd( maViewEntries.end() );
- if( (aIter=std::find_if( maViewEntries.begin(),
+ const ViewEntryVector::iterator aEnd( maViewEntries.end() );
+ if( (aIter=std::find_if( maViewEntries.begin(),
aEnd,
- boost::bind<bool>(
+ boost::bind<bool>(
std::equal_to< ViewSharedPtr >(),
boost::bind( &ViewEntry::getView, _1 ),
- boost::cref( rChangedView )))) !=
+ boost::cref( rChangedView )))) !=
aEnd )
{
// adapt size of given ViewLayer - background layer
@@ -202,7 +202,7 @@ namespace slideshow
{
// TODO(Q1): move this to B2DMultiRange
if( !rUpdateRange.isEmpty() )
- maUpdateAreas.appendElement( rUpdateRange,
+ maUpdateAreas.appendElement( rUpdateRange,
basegfx::ORIENTATION_POSITIVE );
}
@@ -212,7 +212,7 @@ namespace slideshow
{
if( !mbBoundsDirty )
maNewBounds.reset();
-
+
maNewBounds.expand( rShape->getUpdateArea() );
}
@@ -246,7 +246,7 @@ namespace slideshow
return true;
}
-
+
void Layer::clearUpdateRanges()
{
maUpdateAreas.clear();
@@ -257,9 +257,9 @@ namespace slideshow
// clear content on all view layers
std::for_each( maViewEntries.begin(),
maViewEntries.end(),
- boost::bind(
+ boost::bind(
&ViewLayer::clear,
- boost::bind(
+ boost::bind(
&ViewEntry::getViewLayer,
_1)));
@@ -288,12 +288,12 @@ namespace slideshow
if( maUpdateAreas.count() )
{
// perform proper layer update. That means, setup proper
- // clipping, and render each shape that intersects with
+ // clipping, and render each shape that intersects with
// the calculated update area
::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() );
aClip = ::basegfx::tools::stripNeutralPolygons(aClip);
aClip = ::basegfx::tools::stripDispensablePolygons(aClip, false);
-
+
// actually, if there happen to be shapes with zero
// update area in the maUpdateAreas vector, the
// resulting clip polygon will be empty.
@@ -302,9 +302,9 @@ namespace slideshow
// set clip to all view layers
std::for_each( maViewEntries.begin(),
maViewEntries.end(),
- boost::bind(
+ boost::bind(
&ViewLayer::setClip,
- boost::bind(
+ boost::bind(
&ViewEntry::getViewLayer,
_1),
boost::cref(aClip)));
@@ -312,9 +312,9 @@ namespace slideshow
// clear update area on all view layers
std::for_each( maViewEntries.begin(),
maViewEntries.end(),
- boost::bind(
+ boost::bind(
&ViewLayer::clear,
- boost::bind(
+ boost::bind(
&ViewEntry::getViewLayer,
_1)));
@@ -334,9 +334,9 @@ namespace slideshow
basegfx::B2DPolyPolygon aEmptyClip;
std::for_each( maViewEntries.begin(),
maViewEntries.end(),
- boost::bind(
+ boost::bind(
&ViewLayer::setClip,
- boost::bind(
+ boost::bind(
&ViewEntry::getViewLayer,
_1),
boost::cref(aEmptyClip)));
@@ -352,7 +352,7 @@ namespace slideshow
LayerSharedPtr Layer::createBackgroundLayer( const basegfx::B2DRange& rMaxLayerBounds )
{
- return LayerSharedPtr(new Layer( rMaxLayerBounds,
+ return LayerSharedPtr(new Layer( rMaxLayerBounds,
BackgroundLayer ));
}
diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx
index 6c257c21125c..20ed39efabaf 100644
--- a/slideshow/source/engine/slide/layer.hxx
+++ b/slideshow/source/engine/slide/layer.hxx
@@ -2,7 +2,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
@@ -304,7 +304,7 @@ namespace slideshow
// layer is the
// special
// background layer
- bool mbClipSet; // true, if beginUpdate set a clip
+ bool mbClipSet; // true, if beginUpdate set a clip
};
typedef ::boost::shared_ptr< Layer > LayerSharedPtr;
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 30ceea4b98cd..0bd52febbb82 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -2,7 +2,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
@@ -59,7 +59,7 @@ namespace slideshow
namespace internal
{
template<typename LayerFunc,
- typename ShapeFunc> void LayerManager::manageViews(
+ typename ShapeFunc> void LayerManager::manageViews(
LayerFunc layerFunc,
ShapeFunc shapeFunc )
{
@@ -75,7 +75,7 @@ namespace slideshow
pCurrLayer = pLayer;
pCurrViewLayer = layerFunc(pCurrLayer);
}
-
+
if( pCurrViewLayer )
shapeFunc(aIter->first,pCurrViewLayer);
@@ -173,7 +173,7 @@ namespace slideshow
{
iShape->second.reset();
}
-
+
if( bMoreThanOneLayer )
maLayers.erase(maLayers.begin()+1,
maLayers.end());
@@ -199,13 +199,13 @@ namespace slideshow
rView->clearAll();
// add View to all registered shapes
- manageViews(
+ manageViews(
boost::bind(&Layer::addView,
_1,
- boost::cref(rView)),
+ boost::cref(rView)),
// repaint on view add
- boost::bind(&Shape::addViewLayer,
- _1,
+ boost::bind(&Shape::addViewLayer,
+ _1,
_2,
true) );
@@ -226,7 +226,7 @@ namespace slideshow
rView) == mrViews.end() );
// remove View from all registered shapes
- manageViews(
+ manageViews(
boost::bind(&Layer::removeView,
_1,
boost::cref(rView)),
@@ -262,12 +262,12 @@ namespace slideshow
return;
// clear view area
- ::std::for_each( mrViews.begin(),
- mrViews.end(),
+ ::std::for_each( mrViews.begin(),
+ mrViews.end(),
::boost::mem_fn(&View::clearAll) );
// TODO(F3): resize and repaint all layers
-
+
// render all shapes
std::for_each( maAllShapes.begin(),
maAllShapes.end(),
@@ -281,12 +281,12 @@ namespace slideshow
ENSURE_OR_THROW( rShape, "LayerManager::addShape(): invalid Shape" );
// add shape to XShape hash map
- if( !maXShapeHash.insert(
+ if( !maXShapeHash.insert(
XShapeHash::value_type( rShape->getXShape(),
rShape) ).second )
{
// entry already present, nothing to do
- return;
+ return;
}
// add shape to appropriate layer
@@ -299,7 +299,7 @@ namespace slideshow
rBgLayer->setShapeViews(rShapeEntry.first);
rShapeEntry.second = rBgLayer;
}
-
+
void LayerManager::implAddShape( const ShapeSharedPtr& rShape )
{
OSL_ASSERT( !maLayers.empty() ); // always at least background layer
@@ -333,7 +333,7 @@ namespace slideshow
return true;
}
-
+
void LayerManager::implRemoveShape( const ShapeSharedPtr& rShape )
{
OSL_ASSERT( !maLayers.empty() ); // always at least background layer
@@ -352,14 +352,14 @@ namespace slideshow
// Actually, also add it if it was listed in
// maUpdateShapes (might have just gone invisible).
if( bShapeUpdateNotified ||
- (rShape->isVisible() &&
+ (rShape->isVisible() &&
!rShape->isBackgroundDetached()) )
{
LayerSharedPtr pLayer = aShapeEntry->second.lock();
if( pLayer )
{
- // store area early, once the shape is removed from
- // the layers, it no longer has any view references
+ // store area early, once the shape is removed from
+ // the layers, it no longer has any view references
pLayer->addUpdateRange( rShape->getUpdateArea() );
}
}
@@ -369,7 +369,7 @@ namespace slideshow
mbLayerAssociationDirty = true;
}
-
+
ShapeSharedPtr LayerManager::lookupShape( const uno::Reference< drawing::XShape >& xShape ) const
{
ENSURE_OR_THROW( xShape.is(), "LayerManager::lookupShape(): invalid Shape" );
@@ -382,8 +382,8 @@ namespace slideshow
return aIter->second;
}
- AttributableShapeSharedPtr LayerManager::getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
- const DocTreeNode& rTreeNode )
+ AttributableShapeSharedPtr LayerManager::getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
+ const DocTreeNode& rTreeNode )
{
OSL_ASSERT( !maLayers.empty() ); // always at least background layer
@@ -494,7 +494,7 @@ namespace slideshow
{
if( !mbActive || mrViews.empty() )
return;
-
+
// hidden sprite-shape needs render() call still, to hide sprite
if( rShape->isVisible() || rShape->isBackgroundDetached() )
maUpdateShapes.insert( rShape );
@@ -527,7 +527,7 @@ namespace slideshow
// maUpdateShapes set, which is _animated_ (i.e. a
// sprite).
const ShapeUpdateSet::const_iterator aEnd=maUpdateShapes.end();
- ShapeUpdateSet::const_iterator aCurrShape=maUpdateShapes.begin();
+ ShapeUpdateSet::const_iterator aCurrShape=maUpdateShapes.begin();
while( aCurrShape != aEnd )
{
if( (*aCurrShape)->isBackgroundDetached() )
@@ -545,8 +545,8 @@ namespace slideshow
// shape/layer association cache, or ptr back to
// layer at the shape?
- // cannot update shape directly, it's not
- // animated and update() calls will prolly
+ // cannot update shape directly, it's not
+ // animated and update() calls will prolly
// overwrite other page content.
addUpdateArea( *aCurrShape );
}
@@ -565,7 +565,7 @@ namespace slideshow
if( !mbActive )
return bRet;
-
+
// going to render - better flush any pending layer reorg
// now
updateShapeLayers(false);
@@ -648,7 +648,7 @@ namespace slideshow
virtual ::cppcanvas::CustomSpriteSharedPtr createSprite( const ::basegfx::B2DSize& /*rSpriteSizePixel*/,
double /*nSpritePrio*/ ) const
{
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"DummyLayer::createSprite(): This method is not supposed to be called!" );
return ::cppcanvas::CustomSpriteSharedPtr();
}
@@ -666,7 +666,7 @@ namespace slideshow
virtual ::basegfx::B2DHomMatrix getSpriteTransformation() const
{
- OSL_ENSURE( false,
+ OSL_ENSURE( false,
"BitmapView::getSpriteTransformation(): This method is not supposed to be called!" );
return ::basegfx::B2DHomMatrix();
}
@@ -705,10 +705,10 @@ namespace slideshow
// ViewLayer. Since we add the shapes in the
// maShapeSet order (which is also the render order),
// this is equivalent to a subsequent render() call)
- aIter->first->addViewLayer( pTmpLayer,
+ aIter->first->addViewLayer( pTmpLayer,
true );
- // and remove again, this is only temporary
+ // and remove again, this is only temporary
aIter->first->removeViewLayer( pTmpLayer );
}
catch( uno::Exception& )
@@ -739,13 +739,13 @@ namespace slideshow
if( aShapeEntry == maAllShapes.end() )
return;
-
+
LayerSharedPtr pLayer = aShapeEntry->second.lock();
if( pLayer )
pLayer->addUpdateRange( rShape->getUpdateArea() );
}
- void LayerManager::commitLayerChanges( std::size_t nCurrLayerIndex,
+ void LayerManager::commitLayerChanges( std::size_t nCurrLayerIndex,
LayerShapeMap::const_iterator aFirstLayerShape,
LayerShapeMap::const_iterator aEndLayerShapes )
{
@@ -762,8 +762,8 @@ namespace slideshow
// need to re-render whole layer - start from
// clean state
rLayer->clearContent();
-
- // render and remove from update set
+
+ // render and remove from update set
while( aFirstLayerShape != aEndLayerShapes )
{
maUpdateShapes.erase(aFirstLayerShape->first);
@@ -780,7 +780,7 @@ namespace slideshow
LayerSharedPtr pLayer( Layer::createLayer(
maPageBounds ));
-
+
// create ViewLayers for all registered views, and add to
// newly created layer.
::std::for_each( mrViews.begin(),
@@ -817,7 +817,7 @@ namespace slideshow
// to avoid tons of temporaries, create weak_ptr to Layers
// beforehand
- std::vector< LayerWeakPtr > aWeakLayers(maLayers.size());
+ std::vector< LayerWeakPtr > aWeakLayers(maLayers.size());
std::copy(maLayers.begin(),maLayers.end(),aWeakLayers.begin());
std::size_t nCurrLayerIndex(0);
@@ -830,7 +830,7 @@ namespace slideshow
while( aCurrShapeEntry != aEndShapeEntry )
{
const ShapeSharedPtr pCurrShape( aCurrShapeEntry->first );
- const bool bThisIsBackgroundDetached(
+ const bool bThisIsBackgroundDetached(
pCurrShape->isBackgroundDetached() );
if( bLastWasBackgroundDetached == true &&
@@ -839,9 +839,9 @@ namespace slideshow
// discontinuity found - current shape needs to
// get into a new layer
// --------------------------------------------
-
+
// commit changes to previous layer
- commitLayerChanges(nCurrLayerIndex,
+ commitLayerChanges(nCurrLayerIndex,
aCurrLayerFirstShapeEntry,
aCurrShapeEntry);
aCurrLayerFirstShapeEntry=aCurrShapeEntry;
@@ -870,7 +870,7 @@ namespace slideshow
{
// mismatch: shape is not contained in current
// layer - move shape to that layer, then.
- maLayers.at(nCurrLayerIndex)->setShapeViews(
+ maLayers.at(nCurrLayerIndex)->setShapeViews(
pCurrShape );
// layer got new shape(s), need full repaint, if
@@ -882,7 +882,7 @@ namespace slideshow
{
// old layer still valid? then we need to
// repaint former shape area
- pOldLayer->addUpdateRange(
+ pOldLayer->addUpdateRange(
pCurrShape->getUpdateArea() );
}
@@ -894,7 +894,7 @@ namespace slideshow
aCurrShapeEntry->second = rCurrWeakLayer;
}
-
+
// update layerbounds regardless of the fact that the
// shape might be contained in said layer
// already. updateBounds() is dumb and needs to
@@ -909,7 +909,7 @@ namespace slideshow
}
// commit very last layer data
- commitLayerChanges(nCurrLayerIndex,
+ commitLayerChanges(nCurrLayerIndex,
aCurrLayerFirstShapeEntry,
aCurrShapeEntry);
diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx
index 726d2a59c136..cf5e01329c4a 100644
--- a/slideshow/source/engine/slide/layermanager.hxx
+++ b/slideshow/source/engine/slide/layermanager.hxx
@@ -2,7 +2,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
@@ -132,7 +132,7 @@ namespace slideshow
This method removes a shape from the shape.
*/
bool removeShape( const ShapeSharedPtr& rShape );
-
+
/** Lookup a Shape from an XShape model object
This method looks up the internal shape map for one
@@ -142,7 +142,7 @@ namespace slideshow
The XShape object, for which the representing Shape
should be looked up.
*/
- ShapeSharedPtr lookupShape( const ::com::sun::star::uno::Reference<
+ ShapeSharedPtr lookupShape( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape ) const;
/** Query a subset of the given original shape
@@ -151,8 +151,8 @@ namespace slideshow
shape, which displays only the given subset of the
original one.
*/
- AttributableShapeSharedPtr getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
- const DocTreeNode& rTreeNode );
+ AttributableShapeSharedPtr getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
+ const DocTreeNode& rTreeNode );
/** Revoke a previously queried subset shape.
@@ -208,7 +208,7 @@ namespace slideshow
frame.
*/
bool isUpdatePending() const;
-
+
/** Update the content
This method updates the content on all layers on all
@@ -240,7 +240,7 @@ namespace slideshow
*/
bool renderTo( const ::cppcanvas::CanvasSharedPtr& rTargetCanvas ) const;
- private:
+ private:
/** A hash map which maps the XShape to the corresponding Shape object.
Provides quicker lookup than ShapeSet for simple mappings
@@ -286,15 +286,15 @@ namespace slideshow
@param aFirstLayerShape
Valid iterator out of maAllShapes, denoting the first
shape from nCurrLayerIndex
-
+
@param aEndLayerShapes
Valid iterator or end iterator out of maAllShapes,
denoting one-behind-the-last shape of nCurrLayerIndex
*/
- void commitLayerChanges( std::size_t nCurrLayerIndex,
+ void commitLayerChanges( std::size_t nCurrLayerIndex,
LayerShapeMap::const_iterator aFirstLayerShape,
LayerShapeMap::const_iterator aEndLayerShapes );
-
+
/** Init Shape layers with background layer.
*/
void putShape2BackgroundLayer( LayerShapeMap::value_type& rShapeEntry );
@@ -314,9 +314,9 @@ namespace slideshow
void implAddShape( const ShapeSharedPtr& rShape );
/** Common stuff when removing a shape
- */
+ */
void implRemoveShape( const ShapeSharedPtr& rShape );
-
+
/** Add or remove views
Sharing duplicate code from viewAdded and viewRemoved
@@ -326,7 +326,7 @@ namespace slideshow
template<typename LayerFunc,
typename ShapeFunc> void manageViews( LayerFunc layerFunc,
ShapeFunc shapeFunc );
-
+
bool updateSprites();
/// Registered views
@@ -337,7 +337,7 @@ namespace slideshow
/** Contains all shapes with their XShape reference as the key
*/
- XShapeHash maXShapeHash;
+ XShapeHash maXShapeHash;
/** Set of shapes this LayerManager own
@@ -350,7 +350,7 @@ namespace slideshow
LayerShapeMap maAllShapes;
/** Set of shapes that have requested an update
-
+
When a shape is member of this set, its maShapes entry
has bNeedsUpdate set to true. We maintain this
redundant information for faster update processing.
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx
index 077c98e72060..bc185689024b 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.cxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx
@@ -2,7 +2,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
@@ -82,7 +82,7 @@ void ShapeManagerImpl::activate( bool bSlideBackgoundPainted )
boost::bind( &ShapeManagerImpl::listenerAdded,
this,
boost::cref(xDummyListener),
- boost::bind(
+ boost::bind(
std::select1st<ShapeEventListenerMap::value_type>(),
_1 )));
@@ -91,10 +91,10 @@ void ShapeManagerImpl::activate( bool bSlideBackgoundPainted )
mrGlobalCursorMap.end(),
boost::bind( &ShapeManagerImpl::cursorChanged,
this,
- boost::bind(
+ boost::bind(
std::select1st<ShapeCursorMap::value_type>(),
_1 ),
- boost::bind(
+ boost::bind(
std::select2nd<ShapeCursorMap::value_type>(),
_1 )));
@@ -124,7 +124,7 @@ void ShapeManagerImpl::deactivate()
void ShapeManagerImpl::dispose()
{
// remove listeners (EventMultiplexer holds shared_ptr on us)
- deactivate();
+ deactivate();
maHyperlinkShapes.clear();
maShapeCursorMap.clear();
@@ -142,7 +142,7 @@ bool ShapeManagerImpl::handleMouseReleased( awt::MouseEvent const& e )
{
if( !mbEnabled || e.Buttons != awt::MouseButton::LEFT)
return false;
-
+
basegfx::B2DPoint const aPosition( e.X, e.Y );
// first check for hyperlinks, because these have
@@ -153,7 +153,7 @@ bool ShapeManagerImpl::handleMouseReleased( awt::MouseEvent const& e )
mrMultiplexer.notifyHyperlinkClicked(hyperlink);
return true; // event consumed
}
-
+
// find matching shape (scan reversely, to coarsely match
// paint order)
ShapeToListenersMap::reverse_iterator aCurrBroadcaster(
@@ -170,25 +170,25 @@ bool ShapeManagerImpl::handleMouseReleased( awt::MouseEvent const& e )
{
// shape hit, and shape is visible. Raise
// event.
-
+
boost::shared_ptr<cppu::OInterfaceContainerHelper> const pCont(
aCurrBroadcaster->second );
uno::Reference<drawing::XShape> const xShape(
aCurrBroadcaster->first->getXShape() );
-
+
// DON'T do anything with /this/ after this point!
pCont->forEach<presentation::XShapeEventListener>(
boost::bind( &presentation::XShapeEventListener::click,
- _1,
- boost::cref(xShape),
+ _1,
+ boost::cref(xShape),
boost::cref(e) ));
-
+
return true; // handled this event
}
-
+
++aCurrBroadcaster;
}
-
+
return false; // did not handle this event
}
@@ -218,7 +218,7 @@ bool ShapeManagerImpl::handleMouseMoved( const awt::MouseEvent& e )
// find hit shape in map
const ::basegfx::B2DPoint aPosition( e.X, e.Y );
sal_Int16 nNewCursor(-1);
-
+
if( checkForHyperlink(aPosition).getLength() > 0 )
{
nNewCursor = awt::SystemPointer::REFHAND;
@@ -244,11 +244,11 @@ bool ShapeManagerImpl::handleMouseMoved( const awt::MouseEvent& e )
nNewCursor = aCurrCursor->second;
break;
}
-
+
++aCurrCursor;
}
}
-
+
if( nNewCursor == -1 )
mrCursorManager.resetCursor();
else
@@ -317,7 +317,7 @@ void ShapeManagerImpl::removeHyperlinkArea( const HyperlinkAreaSharedPtr& rArea
}
AttributableShapeSharedPtr ShapeManagerImpl::getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
- const DocTreeNode& rTreeNode )
+ const DocTreeNode& rTreeNode )
{
if( mpLayerManager )
return mpLayerManager->getSubsetShape(rOrigShape,rTreeNode);
@@ -332,7 +332,7 @@ void ShapeManagerImpl::revokeSubset( const AttributableShapeSharedPtr& rOrigShap
mpLayerManager->revokeSubset(rOrigShape,rSubsetShape);
}
-bool ShapeManagerImpl::listenerAdded(
+bool ShapeManagerImpl::listenerAdded(
const uno::Reference<presentation::XShapeEventListener>& /*xListener*/,
const uno::Reference<drawing::XShape>& xShape )
{
@@ -340,7 +340,7 @@ bool ShapeManagerImpl::listenerAdded(
if( (aIter = mrGlobalListenersMap.find( xShape )) ==
mrGlobalListenersMap.end() )
{
- ENSURE_OR_RETURN_FALSE(false,
+ ENSURE_OR_RETURN_FALSE(false,
"ShapeManagerImpl::listenerAdded(): global "
"shape listener map inconsistency!");
}
@@ -349,16 +349,16 @@ bool ShapeManagerImpl::listenerAdded(
ShapeSharedPtr pShape( lookupShape(xShape) );
if( pShape )
{
- maShapeListenerMap.insert(
+ maShapeListenerMap.insert(
ShapeToListenersMap::value_type(
- pShape,
+ pShape,
aIter->second));
}
return true;
}
-bool ShapeManagerImpl::listenerRemoved(
+bool ShapeManagerImpl::listenerRemoved(
const uno::Reference<presentation::XShapeEventListener>& /*xListener*/,
const uno::Reference<drawing::XShape>& xShape )
{
@@ -366,7 +366,7 @@ bool ShapeManagerImpl::listenerRemoved(
// for the same shape pending...
if( mrGlobalListenersMap.find(xShape) == mrGlobalListenersMap.end() )
{
- // is this one of our shapes? other shapes are ignored.
+ // is this one of our shapes? other shapes are ignored.
ShapeSharedPtr pShape( lookupShape(xShape) );
if( pShape )
maShapeListenerMap.erase(pShape);
@@ -380,7 +380,7 @@ bool ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& x
{
ShapeSharedPtr pShape( lookupShape(xShape) );
- // is this one of our shapes? other shapes are ignored.
+ // is this one of our shapes? other shapes are ignored.
if( !pShape )
return false;
@@ -393,12 +393,12 @@ bool ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& x
{
// included in global map - update local one
ShapeToCursorMap::iterator aIter;
- if( (aIter = maShapeCursorMap.find(pShape))
+ if( (aIter = maShapeCursorMap.find(pShape))
== maShapeCursorMap.end() )
{
maShapeCursorMap.insert(
- ShapeToCursorMap::value_type(
- pShape,
+ ShapeToCursorMap::value_type(
+ pShape,
nCursor ));
}
else
@@ -416,14 +416,14 @@ rtl::OUString ShapeManagerImpl::checkForHyperlink( basegfx::B2DPoint const& hitP
// paint order): set is ordered by priority
AreaSet::const_reverse_iterator iPos( maHyperlinkShapes.rbegin() );
AreaSet::const_reverse_iterator const iEnd( maHyperlinkShapes.rend() );
- for( ; iPos != iEnd; ++iPos )
+ for( ; iPos != iEnd; ++iPos )
{
HyperlinkAreaSharedPtr const& pArea = *iPos;
HyperlinkArea::HyperlinkRegions const linkRegions(
pArea->getHyperlinkRegions() );
- for( std::size_t i = linkRegions.size(); i--; )
+ for( std::size_t i = linkRegions.size(); i--; )
{
basegfx::B2DRange const& region = linkRegions[i].first;
if( region.isInside(hitPos) )
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx
index 3a43e8c0a795..cf5addcc95ad 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.hxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx
@@ -2,7 +2,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
@@ -54,8 +54,8 @@ namespace slideshow {
namespace internal {
/** Listener class for shape events
-
- This helper class registers itself on each view, and
+
+ This helper class registers itself on each view, and
broadcasts the XShapeEventListener events. The mouse motion
events are needed for setting the shape cursor.
*/
@@ -68,7 +68,7 @@ class ShapeManagerImpl : public SubsettableShapeManager,
{
public:
/** Create a shape event broadcaster
-
+
@param rEventMultiplexer
The slideshow-global event source, where this class
registeres its event handlers.
@@ -88,16 +88,16 @@ public:
slide.
*/
void activate( bool bSlideBackgoundPainted );
-
+
/** Disables event listening.
*/
void deactivate();
-
+
// Disposable interface
// ---------------------------------------------------------------
virtual void dispose();
-
+
private:
// MouseEventHandler interface
@@ -132,7 +132,7 @@ private:
virtual void leaveAnimationMode( const AnimatableShapeSharedPtr& rShape );
virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape );
virtual ShapeSharedPtr lookupShape(
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > const & xShape ) const;
virtual void addHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea );
virtual void removeHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea );
@@ -141,16 +141,16 @@ private:
// SubsettableShapeManager interface
// ---------------------------------------------------
- virtual boost::shared_ptr<AttributableShape> getSubsetShape(
+ virtual boost::shared_ptr<AttributableShape> getSubsetShape(
const boost::shared_ptr<AttributableShape>& rOrigShape,
const DocTreeNode& rTreeNode );
- virtual void revokeSubset(
+ virtual void revokeSubset(
const boost::shared_ptr<AttributableShape>& rOrigShape,
const boost::shared_ptr<AttributableShape>& rSubsetShape );
- virtual void addIntrinsicAnimationHandler(
+ virtual void addIntrinsicAnimationHandler(
const IntrinsicAnimationEventHandlerSharedPtr& rHandler );
- virtual void removeIntrinsicAnimationHandler(
+ virtual void removeIntrinsicAnimationHandler(
const IntrinsicAnimationEventHandlerSharedPtr& rHandler );
virtual bool notifyIntrinsicAnimationsEnabled();
virtual bool notifyIntrinsicAnimationsDisabled();
@@ -178,8 +178,8 @@ private:
::rtl::OUString checkForHyperlink( ::basegfx::B2DPoint const& hitPos )const;
-
-
+
+
typedef std::map<ShapeSharedPtr,
boost::shared_ptr< ::cppu::OInterfaceContainerHelper >,
Shape::lessThanShape> ShapeToListenersMap;
diff --git a/slideshow/source/engine/slide/slideanimations.cxx b/slideshow/source/engine/slide/slideanimations.cxx
index 92adddce4108..0e459a8127d3 100644
--- a/slideshow/source/engine/slide/slideanimations.cxx
+++ b/slideshow/source/engine/slide/slideanimations.cxx
@@ -2,7 +2,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
@@ -66,7 +66,7 @@ namespace slideshow
{
mpRootNode->dispose();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -75,10 +75,10 @@ namespace slideshow
}
}
}
-
+
bool SlideAnimations::importAnimations( const uno::Reference< animations::XAnimationNode >& xRootAnimationNode )
{
- mpRootNode = AnimationNodeFactory::createAnimationNode(
+ mpRootNode = AnimationNodeFactory::createAnimationNode(
xRootAnimationNode,
maSlideSize,
maContext );
diff --git a/slideshow/source/engine/slide/slideanimations.hxx b/slideshow/source/engine/slide/slideanimations.hxx
index 698c8b6a6cfc..02bc38fd8c6d 100644
--- a/slideshow/source/engine/slide/slideanimations.hxx
+++ b/slideshow/source/engine/slide/slideanimations.hxx
@@ -2,7 +2,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
@@ -65,7 +65,7 @@ namespace slideshow
Slide show context, passing on common parameters
*/
SlideAnimations( const SlideShowContext& rContext,
- const ::basegfx::B2DVector& rSlideSize );
+ const ::basegfx::B2DVector& rSlideSize );
~SlideAnimations();
/** Import animations from a SMIL root animation node.
@@ -80,8 +80,8 @@ namespace slideshow
XDrawPage's XAnimationNodeSupplier.
*/
- bool importAnimations( const ::com::sun::star::uno::Reference<
- ::com::sun::star::animations::XAnimationNode >& xRootAnimationNode );
+ bool importAnimations( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::animations::XAnimationNode >& xRootAnimationNode );
/** Check, whether imported animations actually contain
any effects.
@@ -116,7 +116,7 @@ namespace slideshow
void dispose();
private:
- SlideShowContext maContext;
+ SlideShowContext maContext;
const basegfx::B2DVector maSlideSize;
AnimationNodeSharedPtr mpRootNode;
};
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index 04d417bc2e50..ba6cee363a04 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -2,7 +2,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
@@ -98,14 +98,14 @@ class SlideImpl : public Slide,
protected ::osl::DebugBase<SlideImpl>
{
public:
- SlideImpl( const uno::Reference<drawing::XDrawPage>& xDrawPage,
- const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPages,
+ SlideImpl( const uno::Reference<drawing::XDrawPage>& xDrawPage,
+ const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPages,
const uno::Reference<animations::XAnimationNode>& xRootNode,
- EventQueue& rEventQueue,
- EventMultiplexer& rEventMultiplexer,
+ EventQueue& rEventQueue,
+ EventMultiplexer& rEventMultiplexer,
ScreenUpdater& rScreenUpdater,
- ActivitiesQueue& rActivitiesQueue,
- UserEventQueue& rUserEventQueue,
+ ActivitiesQueue& rActivitiesQueue,
+ UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
const uno::Reference<uno::XComponentContext>& xContext,
@@ -134,13 +134,13 @@ public:
virtual bool show( bool );
virtual void hide();
- virtual basegfx::B2ISize getSlideSize() const;
+ virtual basegfx::B2ISize getSlideSize() const;
virtual uno::Reference<drawing::XDrawPage > getXDrawPage() const;
virtual uno::Reference<animations::XAnimationNode> getXAnimationNode() const;
virtual PolyPolygonVector getPolygons();
virtual void drawPolygons() const;
virtual bool isPaintOverlayActive() const;
-
+
// TODO(F2): Rework SlideBitmap to no longer be based on XBitmap,
// but on canvas-independent basegfx bitmaps
virtual SlideBitmapSharedPtr getCurrentSlideBitmap( const UnoViewSharedPtr& rView ) const;
@@ -179,14 +179,14 @@ private:
void disablePaintOverlay();
/// Set all Shapes to their initial attributes for slideshow
- bool applyInitialShapeAttributes( const ::com::sun::star::uno::Reference<
+ bool applyInitialShapeAttributes( const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode >& xRootAnimationNode );
/// Renders current slide content to bitmap
SlideBitmapSharedPtr createCurrentSlideBitmap(
const UnoViewSharedPtr& rView,
::basegfx::B2ISize const & rSlideSize ) const;
-
+
/// Prefetch all shapes (not the animations)
bool loadShapes();
@@ -207,7 +207,7 @@ private:
/// Add Polygons to the member maPolygons
void addPolygons(PolyPolygonVector aPolygons);
-
+
// Types
// =====
@@ -236,54 +236,54 @@ private:
/// The page model object
uno::Reference< drawing::XDrawPage > mxDrawPage;
- uno::Reference< drawing::XDrawPagesSupplier > mxDrawPagesSupplier;
+ uno::Reference< drawing::XDrawPagesSupplier > mxDrawPagesSupplier;
uno::Reference< animations::XAnimationNode > mxRootNode;
-
+
LayerManagerSharedPtr mpLayerManager;
boost::shared_ptr<ShapeManagerImpl> mpShapeManager;
boost::shared_ptr<SubsettableShapeManager> mpSubsettableShapeManager;
/// Contains common objects needed throughout the slideshow
- SlideShowContext maContext;
+ SlideShowContext maContext;
/// parent cursor manager
CursorManager& mrCursorManager;
/// Handles the animation and event generation for us
- SlideAnimations maAnimations;
+ SlideAnimations maAnimations;
PolyPolygonVector maPolygons;
-
+
RGBColor maUserPaintColor;
double mdUserPaintStrokeWidth;
- UserPaintOverlaySharedPtr mpPaintOverlay;
-
+ UserPaintOverlaySharedPtr mpPaintOverlay;
+
/// Bitmaps with slide content at various states
mutable VectorOfVectorOfSlideBitmaps maSlideBitmaps;
- SlideAnimationState meAnimationState;
+ SlideAnimationState meAnimationState;
const basegfx::B2ISize maSlideSize;
sal_Int16 mnCurrentCursor;
/// True, when intrinsic shape animations are allowed
- bool mbIntrinsicAnimationsAllowed;
+ bool mbIntrinsicAnimationsAllowed;
/// True, when user paint overlay is enabled
bool mbUserPaintOverlayEnabled;
/// True, if initial load of all page shapes succeeded
- bool mbShapesLoaded;
+ bool mbShapesLoaded;
/// True, if initial load of all animation info succeeded
- bool mbShowLoaded;
+ bool mbShowLoaded;
/** True, if this slide is not static.
If this slide has animated content, this variable will
be true, and false otherwise.
*/
- bool mbHaveAnimations;
+ bool mbHaveAnimations;
/** True, if this slide has a main animation sequence.
@@ -292,11 +292,11 @@ private:
before EventMultiplexer::notifySlideAnimationsEnd() is
called), this member is true.
*/
- bool mbMainSequenceFound;
+ bool mbMainSequenceFound;
/// When true, show() was called. Slide hidden oherwise.
bool mbActive;
-
+
///When true, enablePaintOverlay was called and mbUserPaintOverlay = true
bool mbPaintOverlayActive;
};
@@ -318,11 +318,11 @@ public:
// fully clear view content to background color
rView->clearAll();
- SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( rView ) );
+ SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( rView ) );
::cppcanvas::CanvasSharedPtr pCanvas( rView->getCanvas() );
- const ::basegfx::B2DHomMatrix aViewTransform( rView->getTransformation() );
- const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
+ const ::basegfx::B2DHomMatrix aViewTransform( rView->getTransformation() );
+ const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
// setup a canvas with device coordinate space, the slide
// bitmap already has the correct dimension.
@@ -334,7 +334,7 @@ public:
// clear clip (might have been changed, e.g. from comb
// transition)
- pBitmap->clip( ::basegfx::B2DPolyPolygon() );
+ pBitmap->clip( ::basegfx::B2DPolyPolygon() );
pBitmap->draw( pDevicePixelCanvas );
}
@@ -346,17 +346,17 @@ private:
//////////////////////////////////////////////////////////////////////////////////
-SlideImpl::SlideImpl( const uno::Reference< drawing::XDrawPage >& xDrawPage,
+SlideImpl::SlideImpl( const uno::Reference< drawing::XDrawPage >& xDrawPage,
const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPages,
- const uno::Reference< animations::XAnimationNode >& xRootNode,
- EventQueue& rEventQueue,
- EventMultiplexer& rEventMultiplexer,
+ const uno::Reference< animations::XAnimationNode >& xRootNode,
+ EventQueue& rEventQueue,
+ EventMultiplexer& rEventMultiplexer,
ScreenUpdater& rScreenUpdater,
- ActivitiesQueue& rActivitiesQueue,
- UserEventQueue& rUserEventQueue,
+ ActivitiesQueue& rActivitiesQueue,
+ UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
- const uno::Reference< uno::XComponentContext >& xComponentContext,
+ const uno::Reference< uno::XComponentContext >& xComponentContext,
const ShapeEventListenerMap& rShapeListenerMap,
const ShapeCursorMap& rShapeCursorMap,
const PolyPolygonVector& rPolyPolygonVector,
@@ -368,7 +368,7 @@ SlideImpl::SlideImpl( const uno::Reference< drawing::XDrawPage >& xDra
mxDrawPage( xDrawPage ),
mxDrawPagesSupplier( xDrawPages ),
mxRootNode( xRootNode ),
- mpLayerManager( new LayerManager(
+ mpLayerManager( new LayerManager(
rViewContainer,
getSlideRect(),
bDisableAnimationZOrder) ),
@@ -380,10 +380,10 @@ SlideImpl::SlideImpl( const uno::Reference< drawing::XDrawPage >& xDra
rShapeCursorMap)),
mpSubsettableShapeManager( mpShapeManager ),
maContext( mpSubsettableShapeManager,
- rEventQueue,
+ rEventQueue,
rEventMultiplexer,
rScreenUpdater,
- rActivitiesQueue,
+ rActivitiesQueue,
rUserEventQueue,
*this,
rViewContainer,
@@ -429,7 +429,7 @@ SlideImpl::~SlideImpl()
// TODO(Q3): Make sure LayerManager (and thus Shapes) dies
// first, because SlideShowContext has SubsettableShapeManager
- // as reference member.
+ // as reference member.
mpLayerManager.reset();
}
}
@@ -505,13 +505,13 @@ bool SlideImpl::show( bool bSlideBackgoundPainted )
std::for_each(maContext.mrViewContainer.begin(),
maContext.mrViewContainer.end(),
boost::mem_fn(&View::clearAll));
-
+
std::for_each( maContext.mrViewContainer.begin(),
maContext.mrViewContainer.end(),
SlideRenderer(*this) );
maContext.mrScreenUpdater.notifyUpdate();
}
-
+
// ---------------------------------------------------------------
// fire up animations
@@ -581,7 +581,7 @@ void SlideImpl::hide()
// disable shape management & event broadcasting for shapes of this
// slide. Also disables LayerManager.
- mpShapeManager->deactivate();
+ mpShapeManager->deactivate();
// vanish from view
resetCursor();
@@ -591,7 +591,7 @@ void SlideImpl::hide()
}
basegfx::B2ISize SlideImpl::getSlideSize() const
-{
+{
return maSlideSize;
}
@@ -623,8 +623,8 @@ SlideBitmapSharedPtr SlideImpl::getCurrentSlideBitmap( const UnoViewSharedPtr& r
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
- // select view:
- boost::bind(
+ // select view:
+ boost::bind(
std::select1st<VectorOfVectorOfSlideBitmaps::value_type>(),
_1 )))) == aEnd )
{
@@ -655,7 +655,7 @@ SlideBitmapSharedPtr SlideImpl::getCurrentSlideBitmap( const UnoViewSharedPtr& r
}
SlideBitmapSharedPtr& rBitmap( aIter->second.at( meAnimationState ));
- const ::basegfx::B2ISize& rSlideSize(
+ const ::basegfx::B2ISize& rSlideSize(
getSlideSizePixel( getSlideSize(),
rView ));
@@ -677,8 +677,8 @@ SlideBitmapSharedPtr SlideImpl::getCurrentSlideBitmap( const UnoViewSharedPtr& r
void SlideImpl::viewAdded( const UnoViewSharedPtr& rView )
{
- maSlideBitmaps.push_back(
- std::make_pair( rView,
+ maSlideBitmaps.push_back(
+ std::make_pair( rView,
VectorOfSlideBitmaps(SlideAnimationState_NUM_ENTRIES) ));
if( mpLayerManager )
@@ -697,10 +697,10 @@ void SlideImpl::viewRemoved( const UnoViewSharedPtr& rView )
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
- // select view:
- boost::bind(
+ // select view:
+ boost::bind(
std::select1st<VectorOfVectorOfSlideBitmaps::value_type>(),
- _1 ))),
+ _1 ))),
aEnd );
}
@@ -746,22 +746,22 @@ bool SlideImpl::isAnimated()
return mbHaveAnimations && maAnimations.isAnimated();
}
-SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr& rView,
+SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr& rView,
const ::basegfx::B2ISize& rBmpSize ) const
{
- ENSURE_OR_THROW( rView && rView->getCanvas(),
+ ENSURE_OR_THROW( rView && rView->getCanvas(),
"SlideImpl::createCurrentSlideBitmap(): Invalid view" );
- ENSURE_OR_THROW( mpLayerManager,
+ ENSURE_OR_THROW( mpLayerManager,
"SlideImpl::createCurrentSlideBitmap(): Invalid layer manager" );
- ENSURE_OR_THROW( mbShowLoaded,
+ ENSURE_OR_THROW( mbShowLoaded,
"SlideImpl::createCurrentSlideBitmap(): No show loaded" );
::cppcanvas::CanvasSharedPtr pCanvas( rView->getCanvas() );
// create a bitmap of appropriate size
- ::cppcanvas::BitmapSharedPtr pBitmap(
- ::cppcanvas::BaseGfxFactory::getInstance().createBitmap(
- pCanvas,
+ ::cppcanvas::BitmapSharedPtr pBitmap(
+ ::cppcanvas::BaseGfxFactory::getInstance().createBitmap(
+ pCanvas,
rBmpSize ) );
ENSURE_OR_THROW( pBitmap,
@@ -772,7 +772,7 @@ SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr
ENSURE_OR_THROW( pBitmapCanvas,
"SlideImpl::createCurrentSlideBitmap(): Cannot create page bitmap canvas" );
- // apply linear part of destination canvas transformation (linear means in this context:
+ // apply linear part of destination canvas transformation (linear means in this context:
// transformation without any translational components)
::basegfx::B2DHomMatrix aLinearTransform( rView->getTransformation() );
aLinearTransform.set( 0, 2, 0.0 );
@@ -800,7 +800,7 @@ namespace
void operator()( const uno::Reference< animations::XAnimationNode >& xChildNode )
{
uno::Sequence< beans::NamedValue > aUserData( xChildNode->getUserData() );
-
+
if( findNamedValue( aUserData, maSearchKey ) )
{
maMainSequence = xChildNode;
@@ -813,8 +813,8 @@ namespace
}
private:
- beans::NamedValue maSearchKey;
- uno::Reference< animations::XAnimationNode > maMainSequence;
+ beans::NamedValue maSearchKey;
+ uno::Reference< animations::XAnimationNode > maMainSequence;
};
}
@@ -823,9 +823,9 @@ bool SlideImpl::implPrefetchShow()
if( mbShowLoaded )
return true;
- ENSURE_OR_RETURN_FALSE( mxDrawPage.is(),
+ ENSURE_OR_RETURN_FALSE( mxDrawPage.is(),
"SlideImpl::implPrefetchShow(): Invalid draw page" );
- ENSURE_OR_RETURN_FALSE( mpLayerManager,
+ ENSURE_OR_RETURN_FALSE( mpLayerManager,
"SlideImpl::implPrefetchShow(): Invalid layer manager" );
// fetch desired page content
@@ -851,7 +851,7 @@ bool SlideImpl::implPrefetchShow()
// _although_ some animation nodes are there -
// this is an error (not finding animations at
// all is okay - might be a static slide)
- return false;
+ return false;
}
// now check whether we've got a main sequence (if
@@ -904,12 +904,12 @@ void SlideImpl::drawPolygons() const
if( mbUserPaintOverlayEnabled )
mpPaintOverlay->drawPolygons();
}
-
+
void SlideImpl::addPolygons(PolyPolygonVector aPolygons)
{
if(!aPolygons.empty())
{
- for( PolyPolygonVector::iterator aIter=aPolygons.begin(),
+ for( PolyPolygonVector::iterator aIter=aPolygons.begin(),
aEnd=aPolygons.end();
aIter!=aEnd;
++aIter )
@@ -923,7 +923,7 @@ bool SlideImpl::isPaintOverlayActive() const
{
return mbPaintOverlayActive;
}
-
+
void SlideImpl::disablePaintOverlay()
{
if(mbPaintOverlayActive)
@@ -951,12 +951,12 @@ void SlideImpl::startIntrinsicAnimations()
mpSubsettableShapeManager->notifyIntrinsicAnimationsEnabled();
}
-bool SlideImpl::applyInitialShapeAttributes(
+bool SlideImpl::applyInitialShapeAttributes(
const uno::Reference< animations::XAnimationNode >& xRootAnimationNode )
{
if( !implPrefetchShow() )
return false;
-
+
if( !xRootAnimationNode.is() )
{
meAnimationState = INITIAL_STATE;
@@ -972,28 +972,28 @@ bool SlideImpl::applyInitialShapeAttributes(
ENSURE_OR_RETURN_FALSE( maContext.mxComponentContext.is(),
"SlideImpl::applyInitialShapeAttributes(): Invalid component context" );
- uno::Reference<lang::XMultiComponentFactory> xFac(
+ uno::Reference<lang::XMultiComponentFactory> xFac(
maContext.mxComponentContext->getServiceManager() );
xPropsCreator.set(
xFac->createInstanceWithContext(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.animations.TargetPropertiesCreator") ),
- maContext.mxComponentContext ),
+ maContext.mxComponentContext ),
uno::UNO_QUERY_THROW );
}
catch( uno::RuntimeException& )
{
throw;
}
- catch( uno::Exception& )
+ catch( uno::Exception& )
{
OSL_ENSURE(
false,
rtl::OUStringToOString(
comphelper::anyToString(cppu::getCaughtException()),
RTL_TEXTENCODING_UTF8 ) );
-
+
// could not determine initial shape attributes - this
// is an error, as some effects might then be plainly
// invisible
@@ -1009,15 +1009,15 @@ bool SlideImpl::applyInitialShapeAttributes(
const ::std::size_t nSize( aProps.getLength() );
for( ::std::size_t i=0; i<nSize; ++i )
{
- sal_Int16 nParaIndex( -1 );
+ sal_Int16 nParaIndex( -1 );
uno::Reference< drawing::XShape > xShape( aProps[i].Target,
uno::UNO_QUERY );
- if( !xShape.is() )
+ if( !xShape.is() )
{
// not a shape target. Maybe a ParagraphTarget?
presentation::ParagraphTarget aParaTarget;
-
+
if( (aProps[i].Target >>= aParaTarget) )
{
// yep, ParagraphTarget found - extract shape
@@ -1038,7 +1038,7 @@ bool SlideImpl::applyInitialShapeAttributes(
continue;
}
- AttributableShapeSharedPtr pAttrShape(
+ AttributableShapeSharedPtr pAttrShape(
::boost::dynamic_pointer_cast< AttributableShape >( pShape ) );
if( !pAttrShape )
@@ -1055,7 +1055,7 @@ bool SlideImpl::applyInitialShapeAttributes(
// this up first.
const DocTreeNodeSupplier& rNodeSupplier( pAttrShape->getTreeNodeSupplier() );
- pAttrShape = pAttrShape->getSubset(
+ pAttrShape = pAttrShape->getSubset(
rNodeSupplier.getTreeNode(
nParaIndex,
DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) );
@@ -1102,9 +1102,9 @@ bool SlideImpl::loadShapes()
if( mbShapesLoaded )
return true;
- ENSURE_OR_RETURN_FALSE( mxDrawPage.is(),
+ ENSURE_OR_RETURN_FALSE( mxDrawPage.is(),
"SlideImpl::loadShapes(): Invalid draw page" );
- ENSURE_OR_RETURN_FALSE( mpLayerManager,
+ ENSURE_OR_RETURN_FALSE( mpLayerManager,
"SlideImpl::loadShapes(): Invalid layer manager" );
// fetch desired page content
@@ -1115,12 +1115,12 @@ bool SlideImpl::loadShapes()
uno::Reference< drawing::XShapes > xMasterPageShapes;
sal_Int32 nCurrCount(0);
- uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( mxDrawPage,
+ uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( mxDrawPage,
uno::UNO_QUERY );
if( xMasterPageTarget.is() )
{
xMasterPage = xMasterPageTarget->getMasterPage();
- xMasterPageShapes.set( xMasterPage,
+ xMasterPageShapes.set( xMasterPage,
uno::UNO_QUERY );
if( xMasterPage.is() && xMasterPageShapes.is() )
@@ -1132,25 +1132,25 @@ bool SlideImpl::loadShapes()
{
// load the masterpage shapes
// -------------------------------------------------------------------------
- ShapeImporter aMPShapesFunctor( xMasterPage,
+ ShapeImporter aMPShapesFunctor( xMasterPage,
mxDrawPage,
mxDrawPagesSupplier,
maContext,
0, /* shape num starts at 0 */
true );
- mpLayerManager->addShape(
+ mpLayerManager->addShape(
aMPShapesFunctor.importBackgroundShape() );
while( !aMPShapesFunctor.isImportDone() )
{
- ShapeSharedPtr const& rShape(
+ ShapeSharedPtr const& rShape(
aMPShapesFunctor.importShape() );
if( rShape )
mpLayerManager->addShape( rShape );
}
addPolygons(aMPShapesFunctor.getPolygons());
-
+
nCurrCount = xMasterPageShapes->getCount() + 1;
}
catch( uno::RuntimeException& )
@@ -1170,7 +1170,7 @@ bool SlideImpl::loadShapes()
OSL_ENSURE( false,
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
@@ -1182,16 +1182,16 @@ bool SlideImpl::loadShapes()
// load the normal page shapes
// -------------------------------------------------------------------------
- ShapeImporter aShapesFunctor( mxDrawPage,
+ ShapeImporter aShapesFunctor( mxDrawPage,
mxDrawPage,
mxDrawPagesSupplier,
maContext,
- nCurrCount,
+ nCurrCount,
false );
while( !aShapesFunctor.isImportDone() )
{
- ShapeSharedPtr const& rShape(
+ ShapeSharedPtr const& rShape(
aShapesFunctor.importShape() );
if( rShape )
mpLayerManager->addShape( rShape );
@@ -1225,10 +1225,10 @@ bool SlideImpl::loadShapes()
}
basegfx::B2ISize SlideImpl::getSlideSizeImpl() const
-{
+{
uno::Reference< beans::XPropertySet > xPropSet(
mxDrawPage, uno::UNO_QUERY_THROW );
-
+
sal_Int32 nDocWidth = 0;
sal_Int32 nDocHeight = 0;
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nDocWidth;
@@ -1240,17 +1240,17 @@ basegfx::B2ISize SlideImpl::getSlideSizeImpl() const
} // namespace
-SlideSharedPtr createSlide( const uno::Reference< drawing::XDrawPage >& xDrawPage,
+SlideSharedPtr createSlide( const uno::Reference< drawing::XDrawPage >& xDrawPage,
const uno::Reference<drawing::XDrawPagesSupplier>& xDrawPages,
const uno::Reference< animations::XAnimationNode >& xRootNode,
- EventQueue& rEventQueue,
- EventMultiplexer& rEventMultiplexer,
+ EventQueue& rEventQueue,
+ EventMultiplexer& rEventMultiplexer,
ScreenUpdater& rScreenUpdater,
- ActivitiesQueue& rActivitiesQueue,
- UserEventQueue& rUserEventQueue,
+ ActivitiesQueue& rActivitiesQueue,
+ UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
- const uno::Reference< uno::XComponentContext >& xComponentContext,
+ const uno::Reference< uno::XComponentContext >& xComponentContext,
const ShapeEventListenerMap& rShapeListenerMap,
const ShapeCursorMap& rShapeCursorMap,
const PolyPolygonVector& rPolyPolygonVector,
@@ -1267,7 +1267,7 @@ SlideSharedPtr createSlide( const uno::Reference< drawing::XDrawPage >&
boost::shared_ptr<SlideImpl> pRet( new SlideImpl( xDrawPage, NULL, xRootNode, rEventQueue,
#endif
rEventMultiplexer, rScreenUpdater,
- rActivitiesQueue, rUserEventQueue,
+ rActivitiesQueue, rUserEventQueue,
rCursorManager, rViewContainer,
xComponentContext, rShapeListenerMap,
rShapeCursorMap, rPolyPolygonVector, rUserPaintColor,
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index 45af355700bc..80a033c79261 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -2,7 +2,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
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
namespace slideshow
{
namespace internal
- {
+ {
class PaintOverlayHandler : public MouseEventHandler,
public ViewEventHandler,
public UserPaintEventHandler
@@ -71,7 +71,7 @@ namespace slideshow
ActivitiesQueue& rActivitiesQueue,
ScreenUpdater& rScreenUpdater,
const UnoViewContainer& rViews,
- Slide& rSlide,
+ Slide& rSlide,
const PolyPolygonVector& rPolygons ) :
mrActivitiesQueue( rActivitiesQueue ),
mrScreenUpdater( rScreenUpdater ),
@@ -121,31 +121,31 @@ namespace slideshow
// TODO(F2): for persistent drawings, need to store
// polygon and repaint here.
}
-
+
virtual void viewsChanged()
{
// TODO(F2): for persistent drawings, need to store
// polygon and repaint here.
}
-
+
bool colorChanged( RGBColor const& rUserColor )
{
this->maStrokeColor = rUserColor;
this->mbIsEraseModeActivated = false;
return true;
}
-
+
bool widthChanged( double nUserStrokeWidth )
{
this->mnStrokeWidth = nUserStrokeWidth;
mbIsEraseModeActivated = false;
return true;
}
-
+
bool eraseAllInkChanged( bool const& rEraseAllInk )
{
this->mbIsEraseAllModeActivated= rEraseAllInk;
- // if the erase all mode is activated it will remove all ink from slide,
+ // if the erase all mode is activated it will remove all ink from slide,
// therefor destroy all the polygons stored
if(mbIsEraseAllModeActivated)
{
@@ -160,26 +160,26 @@ namespace slideshow
(*aIter)->getCanvas()->clear();
//get via SlideImpl instance the bitmap of the slide unmodified to redraw it
- SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( (*aIter) ) );
+ SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( (*aIter) ) );
::cppcanvas::CanvasSharedPtr pCanvas( (*aIter)->getCanvas() );
-
- const ::basegfx::B2DHomMatrix aViewTransform( (*aIter)->getTransformation() );
- const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
-
+
+ const ::basegfx::B2DHomMatrix aViewTransform( (*aIter)->getTransformation() );
+ const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
+
// setup a canvas with device coordinate space, the slide
// bitmap already has the correct dimension.
::cppcanvas::CanvasSharedPtr pDevicePixelCanvas( pCanvas->clone() );
-
+
pDevicePixelCanvas->setTransformation( ::basegfx::B2DHomMatrix() );
-
+
// render at given output position
pBitmap->move( aOutPosPixel );
-
+
// clear clip (might have been changed, e.g. from comb
// transition)
- pBitmap->clip( ::basegfx::B2DPolyPolygon() );
+ pBitmap->clip( ::basegfx::B2DPolyPolygon() );
pBitmap->draw( pDevicePixelCanvas );
-
+
mrScreenUpdater.notifyUpdate(*aIter,true);
}
maPolygons.clear();
@@ -187,7 +187,7 @@ namespace slideshow
mbIsEraseAllModeActivated=false;
return true;
}
-
+
bool eraseInkWidthChanged( sal_Int32 rEraseInkSize )
{
// Change the size
@@ -213,10 +213,10 @@ namespace slideshow
{
return true;
}
-
+
//Draw all registered polygons.
void drawPolygons()
- {
+ {
for( PolyPolygonVector::iterator aIter=maPolygons.begin(), aEnd=maPolygons.end();
aIter!=aEnd;
++aIter )
@@ -224,15 +224,15 @@ namespace slideshow
(*aIter)->draw();
}
// screen update necessary to show painting
- mrScreenUpdater.notifyUpdate();
+ mrScreenUpdater.notifyUpdate();
}
-
+
//Retrieve all registered polygons.
PolyPolygonVector getPolygons()
{
- return maPolygons;
+ return maPolygons;
}
-
+
// MouseEventHandler methods
virtual bool handleMousePressed( const awt::MouseEvent& e )
{
@@ -241,10 +241,10 @@ namespace slideshow
mbIsLastPointValid = false;
return false;
}
-
+
if (e.Buttons != awt::MouseButton::LEFT)
return false;
-
+
maLastMouseDownPos.setX( e.X );
maLastMouseDownPos.setY( e.Y );
mbIsLastMouseDownPosValid = true;
@@ -261,10 +261,10 @@ namespace slideshow
mbIsLastPointValid = false;
return false;
}
-
+
if (e.Buttons != awt::MouseButton::LEFT)
return false;
-
+
// check, whether up- and down press are on exactly
// the same pixel. If that's the case, ignore the
// click, and pass on the event to low-prio
@@ -312,66 +312,66 @@ namespace slideshow
//define the last point as an object
//we suppose that there's no way this point could be valid
::basegfx::B2DPolygon aPoly;
-
+
maLastPoint.setX( e.X-mnSize );
maLastPoint.setY( e.Y-mnSize );
-
+
aPoly.append( maLastPoint );
-
+
maLastPoint.setX( e.X-mnSize );
maLastPoint.setY( e.Y+mnSize );
-
+
aPoly.append( maLastPoint );
maLastPoint.setX( e.X+mnSize );
maLastPoint.setY( e.Y+mnSize );
-
+
aPoly.append( maLastPoint );
maLastPoint.setX( e.X+mnSize );
maLastPoint.setY( e.Y-mnSize );
-
+
aPoly.append( maLastPoint );
maLastPoint.setX( e.X-mnSize );
maLastPoint.setY( e.Y-mnSize );
-
+
aPoly.append( maLastPoint );
-
+
//now we have defined a Polygon that is closed
-
- //The point is to redraw the LastPoint the way it was originally on the bitmap,
+
+ //The point is to redraw the LastPoint the way it was originally on the bitmap,
//of the slide
for( UnoViewVector::iterator aIter=maViews.begin(), aEnd=maViews.end();
aIter!=aEnd;
++aIter )
{
-
+
//get via SlideImpl instance the bitmap of the slide unmodified to redraw it
- SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( (*aIter) ) );
+ SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( (*aIter) ) );
::cppcanvas::CanvasSharedPtr pCanvas( (*aIter)->getCanvas() );
-
- ::basegfx::B2DHomMatrix aViewTransform( (*aIter)->getTransformation() );
- const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
-
+
+ ::basegfx::B2DHomMatrix aViewTransform( (*aIter)->getTransformation() );
+ const ::basegfx::B2DPoint aOutPosPixel( aViewTransform * ::basegfx::B2DPoint() );
+
// setup a canvas with device coordinate space, the slide
// bitmap already has the correct dimension.
::cppcanvas::CanvasSharedPtr pDevicePixelCanvas( pCanvas->clone() );
-
+
pDevicePixelCanvas->setTransformation( ::basegfx::B2DHomMatrix() );
-
+
// render at given output position
pBitmap->move( aOutPosPixel );
-
+
::basegfx::B2DPolyPolygon aPolyPoly=::basegfx::B2DPolyPolygon(aPoly);
aViewTransform.translate(-aOutPosPixel.getX(), -aOutPosPixel.getY());
aPolyPoly.transform(aViewTransform);
// set clip so that we just redraw a part of the canvas
- pBitmap->clip(aPolyPoly);
+ pBitmap->clip(aPolyPoly);
pBitmap->draw( pDevicePixelCanvas );
-
+
mrScreenUpdater.notifyUpdate(*aIter,true);
}
-
- }
- else
+
+ }
+ else
{
if( !mbIsLastPointValid )
{
@@ -394,10 +394,10 @@ namespace slideshow
aIter!=aEnd;
++aIter )
{
- ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
- ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( (*aIter)->getCanvas(),
+ ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
+ ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( (*aIter)->getCanvas(),
aPoly ) );
-
+
if( pPolyPoly )
{
pPolyPoly->setStrokeWidth(mnStrokeWidth);
@@ -420,14 +420,14 @@ namespace slideshow
// not used here
return false; // did not handle the event
}
-
-
+
+
private:
ActivitiesQueue& mrActivitiesQueue;
ScreenUpdater& mrScreenUpdater;
UnoViewVector maViews;
- PolyPolygonVector maPolygons;
+ PolyPolygonVector maPolygons;
RGBColor maStrokeColor;
double mnStrokeWidth;
basegfx::B2DPoint maLastPoint;
@@ -435,9 +435,9 @@ namespace slideshow
bool mbIsLastPointValid;
bool mbIsLastMouseDownPosValid;
// added bool for erasing purpose :
- bool mbIsEraseAllModeActivated;
- bool mbIsEraseModeActivated;
- Slide& mrSlide;
+ bool mbIsEraseAllModeActivated;
+ bool mbIsEraseModeActivated;
+ Slide& mrSlide;
sal_Int32 mnSize;
};
@@ -457,8 +457,8 @@ namespace slideshow
UserPaintOverlay::UserPaintOverlay( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
- const PolyPolygonVector& rPolygons ) :
- mpHandler( new PaintOverlayHandler( rStrokeColor,
+ const PolyPolygonVector& rPolygons ) :
+ mpHandler( new PaintOverlayHandler( rStrokeColor,
nStrokeWidth,
rContext.mrActivitiesQueue,
rContext.mrScreenUpdater,
@@ -473,17 +473,17 @@ namespace slideshow
mrMultiplexer.addViewHandler( mpHandler );
mrMultiplexer.addUserPaintHandler(mpHandler);
}
-
+
PolyPolygonVector UserPaintOverlay::getPolygons()
{
return mpHandler->getPolygons();
}
-
+
void UserPaintOverlay::drawPolygons()
{
mpHandler->drawPolygons();
}
-
+
UserPaintOverlay::~UserPaintOverlay()
{
try
@@ -493,7 +493,7 @@ namespace slideshow
mrMultiplexer.removeViewHandler( mpHandler );
mpHandler->dispose();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
diff --git a/slideshow/source/engine/slide/userpaintoverlay.hxx b/slideshow/source/engine/slide/userpaintoverlay.hxx
index 706156466c97..4a9aef115844 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.hxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.hxx
@@ -2,7 +2,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
@@ -74,15 +74,15 @@ namespace slideshow
~UserPaintOverlay();
PolyPolygonVector getPolygons();
void drawPolygons();
-
+
private:
UserPaintOverlay( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
const PolyPolygonVector& rPolygons );
- ::boost::shared_ptr<PaintOverlayHandler> mpHandler;
- EventMultiplexer& mrMultiplexer;
+ ::boost::shared_ptr<PaintOverlayHandler> mpHandler;
+ EventMultiplexer& mrMultiplexer;
};
}
}
diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx
index 469843fad659..4afa0ff07059 100644
--- a/slideshow/source/engine/slidebitmap.cxx
+++ b/slideshow/source/engine/slidebitmap.cxx
@@ -2,7 +2,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
@@ -63,20 +63,20 @@ namespace slideshow
ENSURE_OR_THROW( mxBitmap.is(), "SlideBitmap::SlideBitmap(): Invalid bitmap" );
}
-
+
bool SlideBitmap::draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const
{
- ENSURE_OR_RETURN_FALSE( rCanvas && rCanvas->getUNOCanvas().is(),
+ ENSURE_OR_RETURN_FALSE( rCanvas && rCanvas->getUNOCanvas().is(),
"SlideBitmap::draw(): Invalid canvas" );
// selectively only copy the transformation from current viewstate,
// don't want no clipping here.
rendering::ViewState aViewState;
- aViewState.AffineTransform = rCanvas->getViewState().AffineTransform;
+ aViewState.AffineTransform = rCanvas->getViewState().AffineTransform;
rendering::RenderState aRenderState;
::canvas::tools::initRenderState( aRenderState );
-
+
const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(maOutputPos));
::canvas::tools::setRenderStateTransform( aRenderState, aTranslation );
@@ -84,15 +84,15 @@ namespace slideshow
{
if( maClipPoly.count() )
{
- // TODO(P1): Buffer the clip polygon
- aRenderState.Clip =
- ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
+ // TODO(P1): Buffer the clip polygon
+ aRenderState.Clip =
+ ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
rCanvas->getUNOCanvas()->getDevice(),
maClipPoly );
}
-
- rCanvas->getUNOCanvas()->drawBitmap( mxBitmap,
- aViewState,
+
+ rCanvas->getUNOCanvas()->drawBitmap( mxBitmap,
+ aViewState,
aRenderState );
}
catch( uno::Exception& )
@@ -112,7 +112,7 @@ namespace slideshow
{
return ::basegfx::unotools::b2ISizeFromIntegerSize2D( mxBitmap->getSize() );
}
-
+
void SlideBitmap::move( const ::basegfx::B2DPoint& rNewPos )
{
maOutputPos = rNewPos;
@@ -122,7 +122,7 @@ namespace slideshow
{
maClipPoly = rClipPoly;
}
-
+
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap > SlideBitmap::getXBitmap()
{
diff --git a/slideshow/source/engine/slideshowcontext.cxx b/slideshow/source/engine/slideshowcontext.cxx
index ee2ef90c4619..cbca36848751 100644
--- a/slideshow/source/engine/slideshowcontext.cxx
+++ b/slideshow/source/engine/slideshowcontext.cxx
@@ -2,7 +2,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
@@ -55,7 +55,7 @@ SlideShowContext::SlideShowContext( SubsettableShapeManagerSharedPtr& rSubsettab
UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
- const uno::Reference<
+ const uno::Reference<
uno::XComponentContext>& rComponentContext ) :
mpSubsettableShapeManager( rSubsettableShapeManager ),
mrEventQueue( rEventQueue ),
@@ -68,9 +68,9 @@ SlideShowContext::SlideShowContext( SubsettableShapeManagerSharedPtr& rSubsettab
mxComponentContext( rComponentContext )
{}
-void SlideShowContext::dispose()
-{
- mxComponentContext.clear();
+void SlideShowContext::dispose()
+{
+ mxComponentContext.clear();
}
} // namespace internal
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 4ef0ca09f4f7..41b5f664a341 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2,7 +2,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
@@ -138,7 +138,7 @@ 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.
*/
@@ -191,22 +191,22 @@ 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
multi-threaded rendering, this class relies on <em>very
frequent</em> external update() calls, which will render the
@@ -220,18 +220,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
typedef ::std::map< ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage>,
PolyPolygonVector> PolygonMap;
-
+
class SlideShowImpl : private cppu::BaseMutex,
public CursorManager,
public SlideShowImplBase
@@ -281,7 +281,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);
@@ -290,7 +290,7 @@ 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
*/
@@ -358,32 +358,32 @@ private:
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;
struct PrefetchPropertiesFunc; friend struct PrefetchPropertiesFunc;
-
+
/// Stop currently running show.
void stopShow();
-
+
///Find a polygons vector in maPolygons (map)
PolygonMap::iterator findPolygons( uno::Reference<drawing::XDrawPage> const& xDrawPage);
-
+
/// 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
static bool matches(
SlideSharedPtr const& pSlide,
@@ -396,19 +396,19 @@ private:
else
return (!xSlide.is() && !xNode.is());
}
-
+
/// 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
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(
@@ -416,11 +416,11 @@ 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
helps to avoid intermediate repaints.
-
+
Do not call this method directly. Use WaitSymbolLock instead.
*/
void requestWaitSymbol (void);
@@ -433,7 +433,7 @@ private:
{ mrSlideShowImpl.releaseWaitSymbol(); }
private: SlideShowImpl& mrSlideShowImpl;
};
-
+
/// Filter requested cursor shape against hard slideshow cursors (wait, etc.)
sal_Int16 calcActiveCursor( sal_Int16 nCursorShape ) const;
@@ -445,29 +445,29 @@ private:
/// all registered views
UnoViewContainer maViewContainer;
-
+
/// all registered slide show listeners
cppu::OInterfaceContainerHelper maListenerContainer;
-
+
/// map of vectors, containing all registered listeners for a shape
ShapeEventListenerMap maShapeEventListeners;
/// 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.
PolygonMap maPolygons;
-
+
boost::optional<RGBColor> maUserPaintColor;
-
+
boost::optional<double> maUserPaintStrokeWidth;
-
+
//changed for the eraser project
- boost::optional<bool> maEraseAllInk;
- boost::optional<bool> maSwitchPenMode;
- boost::optional<bool> maSwitchEraserMode;
- boost::optional<sal_Int32> maEraseInk;
+ boost::optional<bool> maEraseAllInk;
+ boost::optional<bool> maSwitchPenMode;
+ boost::optional<bool> maSwitchEraserMode;
+ boost::optional<sal_Int32> maEraseInk;
//end changed
-
+
boost::shared_ptr<canvas::tools::ElapsedTime> mpPresTimer;
ScreenUpdater maScreenUpdater;
EventQueue maEventQueue;
@@ -483,7 +483,7 @@ private:
/// the current slide transition sound object:
SoundPlayerSharedPtr mpCurrentSlideTransitionSound;
-
+
uno::Reference<uno::XComponentContext> mxComponentContext;
uno::Reference<
presentation::XTransitionFactory> mxOptionalTransitionFactory;
@@ -502,7 +502,7 @@ private:
uno::Reference<animations::XAnimationNode> mxPrefetchAnimationNode;
sal_Int16 mnCurrentCursor;
-
+
sal_Int32 mnWaitSymbolRequestCount;
bool mbAutomaticAdvancementMode;
bool mbImageAnimationsAllowed;
@@ -534,12 +534,12 @@ 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
@@ -596,7 +596,7 @@ SlideShowImpl::SlideShowImpl(
maEventMultiplexer( maEventQueue,
maViewContainer ),
maActivitiesQueue( mpPresTimer ),
- maUserEventQueue( maEventMultiplexer,
+ maUserEventQueue( maEventMultiplexer,
maEventQueue,
*this ),
mpDummyPtr(),
@@ -627,8 +627,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() )
@@ -636,10 +636,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&)
@@ -648,7 +648,7 @@ SlideShowImpl::SlideShowImpl(
}
mpListener.reset( new SeparateListenerImpl(
- *this,
+ *this,
maScreenUpdater,
maEventQueue ));
maEventMultiplexer.addSlideAnimationsEndHandler( mpListener );
@@ -664,7 +664,7 @@ void SlideShowImpl::disposing()
osl::MutexGuard const guard( m_aMutex );
maEffectRewinder.dispose();
-
+
// stop slide transition sound, if any:
stopSlideTransitionSound();
@@ -678,13 +678,13 @@ void SlideShowImpl::disposing()
mpWaitSymbol.reset();
- if( mpRehearseTimingsActivity )
+ if( mpRehearseTimingsActivity )
{
mpRehearseTimingsActivity->dispose();
mpRehearseTimingsActivity.reset();
}
- if( mpListener )
+ if( mpListener )
{
maEventMultiplexer.removeSlideAnimationsEndHandler(mpListener);
maEventMultiplexer.removeViewRepaintHandler(mpListener);
@@ -693,7 +693,7 @@ void SlideShowImpl::disposing()
maEventMultiplexer.removeAnimationEndHandler( mpListener );
mpListener.reset();
- }
+ }
maUserEventQueue.clear();
maActivitiesQueue.clear();
@@ -720,7 +720,7 @@ void SlideShowImpl::disposing()
/// stops the current slide transition sound
void SlideShowImpl::stopSlideTransitionSound()
{
- if (mpCurrentSlideTransitionSound)
+ if (mpCurrentSlideTransitionSound)
{
mpCurrentSlideTransitionSound->stopPlayback();
mpCurrentSlideTransitionSound->dispose();
@@ -742,15 +742,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
@@ -771,12 +771,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 );
@@ -797,7 +797,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,
@@ -807,7 +807,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,
@@ -816,7 +816,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,
@@ -836,7 +836,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,
@@ -866,7 +866,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,
@@ -875,12 +875,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,
@@ -911,9 +911,9 @@ PolygonMap::iterator SlideShowImpl::findPolygons( uno::Reference<drawing::XDrawP
// TODO(P2) : Optimze 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;
@@ -922,7 +922,7 @@ PolygonMap::iterator SlideShowImpl::findPolygons( uno::Reference<drawing::XDrawP
}
return aIter;
-}
+}
SlideSharedPtr SlideShowImpl::makeSlide(
uno::Reference<drawing::XDrawPage> const& xDrawPage,
@@ -935,8 +935,8 @@ SlideSharedPtr SlideShowImpl::makeSlide(
//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,
@@ -955,8 +955,8 @@ SlideSharedPtr SlideShowImpl::makeSlide(
!!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();
@@ -979,7 +979,7 @@ void SlideShowImpl::requestWaitSymbol (void)
mpWaitSymbol->show();
}
}
-
+
void SlideShowImpl::releaseWaitSymbol (void)
{
--mnWaitSymbolRequestCount;
@@ -1009,7 +1009,7 @@ sal_Int16 SlideShowImpl::calcActiveCursor( sal_Int16 nCursorShape ) const
return nCursorShape;
}
-
+
void SlideShowImpl::stopShow()
{
@@ -1021,10 +1021,10 @@ void SlideShowImpl::stopShow()
//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();
@@ -1041,7 +1041,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)
@@ -1052,7 +1052,7 @@ void SlideShowImpl::stopShow()
-class SlideShowImpl::PrefetchPropertiesFunc
+class SlideShowImpl::PrefetchPropertiesFunc
{
public:
PrefetchPropertiesFunc( SlideShowImpl * that_,
@@ -1062,13 +1062,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;
@@ -1084,7 +1084,7 @@ public:
{
rProperty.Value >>= mrbSkipSlideTransition;
}
- else
+ else
{
OSL_ENSURE( false, rtl::OUStringToOString(
rProperty.Name, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -1117,8 +1117,8 @@ void SlideShowImpl::displaySlide(
mxDrawPagesSupplier = xDrawPages;
#else
mxDrawPagesSupplier = NULL;
-#endif
-
+#endif
+
stopShow(); // MUST call that: results in
// maUserEventQueue.clear(). What's more,
// stopShow()'s currSlide->hide() call is
@@ -1133,7 +1133,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;
@@ -1141,20 +1141,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 )
@@ -1165,19 +1165,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 (
@@ -1185,7 +1185,7 @@ void SlideShowImpl::displaySlide(
mpCurrentSlide->getXDrawPage(),
mpPreviousSlide,
mpCurrentSlide,
- makeEvent(
+ makeEvent(
boost::bind(
&SlideShowImpl::notifySlideTransitionEnded,
this,
@@ -1200,18 +1200,18 @@ void SlideShowImpl::displaySlide(
// 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,
@@ -1242,15 +1242,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,
@@ -1268,7 +1268,7 @@ sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException)
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1278,14 +1278,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();
@@ -1310,12 +1310,12 @@ void SlideShowImpl::rewindEffectToPreviousSlide (void)
// effect because there are no effects on the current slide or none has
// 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
// 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
// intermediate state of the slide (before the effects are replayed.)
@@ -1357,7 +1357,7 @@ sal_Bool SlideShowImpl::pause( sal_Bool bPauseShow )
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1366,9 +1366,9 @@ sal_Bool SlideShowImpl::pause( sal_Bool bPauseShow )
mpPresTimer->pauseTimer();
else
mpPresTimer->continueTimer();
-
+
maEventMultiplexer.notifyPauseMode(bPauseShow);
-
+
mbShowPaused = bPauseShow;
return true;
}
@@ -1380,7 +1380,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();
@@ -1398,7 +1398,7 @@ sal_Bool SlideShowImpl::addView(
if (isDisposed())
return false;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1406,18 +1406,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();
@@ -1425,7 +1425,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();
@@ -1443,26 +1443,26 @@ 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
if (mpCurrentSlide)
{
@@ -1471,67 +1471,67 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
}
-
+
//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
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())
+ while(aIter!=maPolygons.end())
{
aPolygons = aIter->second;
//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(),
+ 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);
sal_uInt32 nPoints = aPoly.count();
-
+
if( nPoints > 1)
{
//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
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
drawing::PointSequenceSequence aRetval;
@@ -1546,8 +1546,8 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
for( sal_uInt32 n = 0; n < nPoints; n++ )
{
//Create a point from the polygon
- *pInnerSequence++ = awt::Point(
- basegfx::fround(aPoly.getB2DPoint(n).getX()),
+ *pInnerSequence++ = awt::Point(
+ basegfx::fround(aPoly.getB2DPoint(n).getX()),
basegfx::fround(aPoly.getB2DPoint(n).getY()));
}
@@ -1555,37 +1555,37 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
//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
- uno::Any aAny;
- drawing::LineStyle eLS;
+ uno::Any aAny;
+ drawing::LineStyle eLS;
eLS = drawing::LineStyle_SOLID;
aAny <<= eLS;
aXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny );
//LineColor
- sal_uInt32 nLineColor;
+ 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
- double fLineWidth;
+ 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)
{
@@ -1602,19 +1602,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" );
@@ -1623,7 +1623,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maUserPaintColor.reset( unoColor2RGBColor( nColor ) );
maEventMultiplexer.notifyUserPaintColor( *maUserPaintColor );
}
- else
+ else
{
// disable user paint
maUserPaintColor.reset();
@@ -1635,31 +1635,31 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
+
//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 );
}
- else
+ else
{
// disable user paint
maEraseAllInk.reset();
maEventMultiplexer.notifyUserPaintDisabled();
}
-
+
if( mnCurrentCursor == awt::SystemPointer::ARROW )
resetCursor();
-
+
return true;
}
@@ -1667,7 +1667,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" );
@@ -1678,7 +1678,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifySwitchPenMode();
}
}
-
+
if( mnCurrentCursor == awt::SystemPointer::ARROW )
resetCursor();
return true;
@@ -1689,7 +1689,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" );
@@ -1699,7 +1699,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifySwitchEraserMode();
}
}
-
+
if( mnCurrentCursor == awt::SystemPointer::ARROW )
resetCursor();
return true;
@@ -1711,28 +1711,28 @@ 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 );
}
- else
- {
+ else
+ {
// disable user paint
maEraseInk.reset();
maEventMultiplexer.notifyUserPaintDisabled();
}
-
+
if( mnCurrentCursor == awt::SystemPointer::ARROW )
resetCursor();
-
+
return true;
}
-
+
// new Property for pen's width
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("UserPaintStrokeWidth") ))
@@ -1755,27 +1755,27 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
resetCursor();
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") ) )
{
@@ -1793,7 +1793,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return true;
}
-
+
if (rProperty.Name.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("MouseVisible") ))
{
@@ -1804,28 +1804,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,
@@ -1833,7 +1833,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maViewContainer,
mxComponentContext) );
}
- else if (mpRehearseTimingsActivity)
+ else if (mpRehearseTimingsActivity)
{
// removes timer from all views:
mpRehearseTimingsActivity->dispose();
@@ -1841,28 +1841,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;
@@ -1926,7 +1926,7 @@ void SlideShowImpl::addShapeEventListener(
if (isDisposed())
return;
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1935,11 +1935,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
@@ -1956,7 +1956,7 @@ void SlideShowImpl::removeShapeEventListener(
throw (uno::RuntimeException)
{
osl::MutexGuard const guard( m_aMutex );
-
+
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
@@ -1970,7 +1970,7 @@ void SlideShowImpl::removeShapeEventListener(
aIter->second.get(),
"SlideShowImpl::removeShapeEventListener(): "
"listener map contains NULL broadcast helper" );
-
+
aIter->second->removeInterface( xListener );
}
@@ -1986,37 +1986,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);
}
@@ -2027,10 +2027,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;
@@ -2041,10 +2041,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) ));
}
@@ -2055,23 +2055,23 @@ 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
@@ -2113,7 +2113,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();
@@ -2121,15 +2121,15 @@ 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
// like to render another frame.
@@ -2141,7 +2141,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
nNextTimeout = 0;
maFrameSynchronization.Activate();
}
- else
+ else
{
// timer events left:
// difference from current time (nota bene:
@@ -2182,7 +2182,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
uno::Reference< util::XUpdatable > xUpdatable( xView->getCanvas(),
uno::UNO_QUERY_THROW );
xUpdatable->update();
- }
+ }
catch( uno::RuntimeException& )
{
throw;
@@ -2201,7 +2201,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
mbSlideShowIdle = true;
}
#endif
-
+
return bRet;
}
}
@@ -2213,7 +2213,7 @@ void SlideShowImpl::notifySlideTransitionEnded( bool bPaintSlide )
OSL_ENSURE( !isDisposed(), "### already disposed!" );
OSL_ENSURE( mpCurrentSlide,
"notifySlideTransitionEnded(): Invalid current slide" );
- if (mpCurrentSlide)
+ if (mpCurrentSlide)
{
// first init show, to give the animations
// the chance to register SlideStartEvents
@@ -2232,25 +2232,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(
@@ -2266,29 +2266,29 @@ void SlideShowImpl::notifySlideAnimationsEnded()
//Draw polygons above animations
mpCurrentSlide->drawPolygons();
-
+
OSL_ENSURE( !isDisposed(), "### already disposed!" );
-
+
// This struct will receive the (interruptable) 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(),
@@ -2308,37 +2308,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
// 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
// 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
@@ -2346,14 +2346,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
@@ -2372,17 +2372,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"),
@@ -2396,7 +2396,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
@@ -2419,7 +2419,7 @@ bool SlideShowImpl::notifyHyperLinkClicked( rtl::OUString const& hyperLink )
maListenerContainer.forEach<presentation::XSlideShowListener>(
boost::bind( &presentation::XSlideShowListener::hyperLinkClicked,
- _1,
+ _1,
boost::cref(hyperLink) ));
return true;
}
@@ -2438,15 +2438,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();
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 04f840f4458f..376b8a3f7249 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -2,7 +2,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
@@ -156,7 +156,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 );
@@ -164,14 +164,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;
}
@@ -200,8 +200,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 )
@@ -218,7 +218,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 )
{
@@ -244,16 +244,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,
@@ -313,14 +313,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 ));
}
@@ -384,7 +384,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 ));
}
}
@@ -411,7 +411,7 @@ 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
@@ -425,7 +425,7 @@ class SlideViewLayer : public ViewLayer,
/// Current clip polygon in user coordinates
basegfx::B2DPolyPolygon maClip;
-
+
/// Current size of the view in user coordinates
basegfx::B2DSize maUserSize;
@@ -442,7 +442,7 @@ class SlideViewLayer : public ViewLayer,
/// actual output canvas retrieved from a sprite
mutable cppcanvas::CanvasSharedPtr mpOutputCanvas;
-
+
/// ptr back to owning view. needed for isOnView() method
View const* const mpParentView;
@@ -473,7 +473,7 @@ public:
mpSprite(),
mpOutputCanvas(),
mpParentView(pParentView)
- {
+ {
}
void updateView( const basegfx::B2DHomMatrix& rMatrix,
@@ -534,8 +534,8 @@ 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 );
@@ -601,40 +601,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;
}
@@ -647,7 +647,7 @@ private:
maClip = aNewClip;
if(mpOutputCanvas )
- mpOutputCanvas->setClip(
+ mpOutputCanvas->setClip(
createClipPolygon( maClip,
mpOutputCanvas,
maUserSize ));
@@ -669,7 +669,7 @@ private:
// ---------------------------------------------------------
typedef cppu::WeakComponentImplHelper2<
- ::com::sun::star::util::XModifyListener,
+ ::com::sun::star::util::XModifyListener,
::com::sun::star::awt::XPaintListener> SlideViewBase;
/** SlideView class
@@ -729,7 +729,7 @@ private:
void updateClip();
-private:
+private:
typedef std::vector< boost::weak_ptr<SlideViewLayer> > ViewLayerVector;
/// Prune viewlayers from deceased ones, optionally update them
@@ -742,15 +742,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;
@@ -769,19 +769,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() );
@@ -792,12 +792,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 );
@@ -815,7 +815,7 @@ void SlideView::disposing()
mpCanvas.reset();
// additionally, also de-register from XSlideShowView
- if (mxView.is())
+ if (mxView.is())
{
mxView->removeTransformationChangedListener( this );
mxView->removePaintListener( this );
@@ -827,7 +827,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() );
@@ -871,7 +871,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;
@@ -889,7 +889,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;
@@ -923,7 +923,7 @@ cppcanvas::CanvasSharedPtr SlideView::getCanvas() const
{
osl::MutexGuard aGuard( m_aMutex );
- ENSURE_OR_THROW( mpCanvas,
+ ENSURE_OR_THROW( mpCanvas,
"SlideView::getCanvas(): Disposed" );
return mpCanvas;
@@ -931,7 +931,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 );
@@ -975,11 +975,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();
}
}
@@ -1025,7 +1025,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();
@@ -1045,7 +1045,7 @@ void SlideView::modified( const lang::EventObject& /*aEvent*/ )
if( !mxView.is() )
return;
-
+
geometry::AffineMatrix2D aViewTransform(
mxView->getTransformation() );
@@ -1056,25 +1056,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(
@@ -1092,7 +1092,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(
@@ -1103,19 +1103,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 ));
@@ -1126,13 +1126,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 ));
@@ -1144,7 +1144,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
@@ -1153,11 +1153,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 );
@@ -1178,17 +1178,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;
}
diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx
index 535277285d2a..69a61c50ecf4 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -2,7 +2,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
@@ -44,7 +44,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
-// Makes parser a static resource,
+// Makes parser a static resource,
// we're synchronized externally.
// But watch out, the parser might have
// state not visible to this code!
@@ -72,7 +72,7 @@ namespace slideshow
{
namespace
{
- typedef const sal_Char* StringIteratorT;
+ typedef const sal_Char* StringIteratorT;
struct ParserContext
{
@@ -83,14 +83,14 @@ namespace slideshow
// arguments from. If all arguments to an operator are constant,
// the operator pushes a precalculated result on the stack, and
// a composite ExpressionNode otherwise.
- OperandStack maOperandStack;
+ OperandStack maOperandStack;
// bounds of the shape this expression is associated with
- ::basegfx::B2DRectangle maShapeBounds;
+ ::basegfx::B2DRectangle maShapeBounds;
- // when true, enable usage of time-dependent variable '$'
+ // when true, enable usage of time-dependent variable '$'
// in expressions
- bool mbParseAnimationFunction;
+ bool mbParseAnimationFunction;
};
typedef ::boost::shared_ptr< ParserContext > ParserContextSharedPtr;
@@ -99,8 +99,8 @@ namespace slideshow
template< typename Generator > class ShapeBoundsFunctor
{
public:
- ShapeBoundsFunctor( Generator aGenerator,
- const ParserContextSharedPtr& rContext ) :
+ ShapeBoundsFunctor( Generator aGenerator,
+ const ParserContextSharedPtr& rContext ) :
maGenerator( aGenerator ),
mpContext( rContext )
{
@@ -110,19 +110,19 @@ namespace slideshow
void operator()( StringIteratorT, StringIteratorT ) const
{
- mpContext->maOperandStack.push(
- ExpressionNodeFactory::createConstantValueExpression(
+ mpContext->maOperandStack.push(
+ ExpressionNodeFactory::createConstantValueExpression(
maGenerator( mpContext->maShapeBounds ) ) );
}
private:
- Generator maGenerator;
- ParserContextSharedPtr mpContext;
+ Generator maGenerator;
+ ParserContextSharedPtr mpContext;
};
- template< typename Generator > ShapeBoundsFunctor< Generator >
- makeShapeBoundsFunctor( const Generator& rGenerator,
- const ParserContextSharedPtr& rContext )
+ template< typename Generator > ShapeBoundsFunctor< Generator >
+ makeShapeBoundsFunctor( const Generator& rGenerator,
+ const ParserContextSharedPtr& rContext )
{
return ShapeBoundsFunctor<Generator>(rGenerator, rContext);
}
@@ -132,8 +132,8 @@ namespace slideshow
class ConstantFunctor
{
public:
- ConstantFunctor( double rValue,
- const ParserContextSharedPtr& rContext ) :
+ ConstantFunctor( double rValue,
+ const ParserContextSharedPtr& rContext ) :
mnValue( rValue ),
mpContext( rContext )
{
@@ -143,13 +143,13 @@ namespace slideshow
void operator()( StringIteratorT, StringIteratorT ) const
{
- mpContext->maOperandStack.push(
+ mpContext->maOperandStack.push(
ExpressionNodeFactory::createConstantValueExpression( mnValue ) );
}
private:
- const double mnValue;
- ParserContextSharedPtr mpContext;
+ const double mnValue;
+ ParserContextSharedPtr mpContext;
};
/** Generate parse-dependent-but-then-constant value
@@ -167,12 +167,12 @@ namespace slideshow
void operator()( double n ) const
{
// push constant value expression to the stack
- mpContext->maOperandStack.push(
+ mpContext->maOperandStack.push(
ExpressionNodeFactory::createConstantValueExpression( n ) );
}
private:
- ParserContextSharedPtr mpContext;
+ ParserContextSharedPtr mpContext;
};
/** Generate special t value expression node
@@ -197,12 +197,12 @@ namespace slideshow
}
// push special t value expression to the stack
- mpContext->maOperandStack.push(
+ mpContext->maOperandStack.push(
ExpressionNodeFactory::createValueTExpression() );
}
private:
- ParserContextSharedPtr mpContext;
+ ParserContextSharedPtr mpContext;
};
template< typename Functor > class UnaryFunctionFunctor
@@ -214,8 +214,8 @@ namespace slideshow
class UnaryFunctionExpression : public ExpressionNode
{
public:
- UnaryFunctionExpression( const Functor& rFunctor,
- const ExpressionNodeSharedPtr& rArg ) :
+ UnaryFunctionExpression( const Functor& rFunctor,
+ const ExpressionNodeSharedPtr& rArg ) :
maFunctor( rFunctor ),
mpArg( rArg )
{
@@ -225,20 +225,20 @@ namespace slideshow
{
return maFunctor( (*mpArg)(t) );
}
-
+
virtual bool isConstant() const
{
return mpArg->isConstant();
}
private:
- Functor maFunctor;
- ExpressionNodeSharedPtr mpArg;
+ Functor maFunctor;
+ ExpressionNodeSharedPtr mpArg;
};
public:
- UnaryFunctionFunctor( const Functor& rFunctor,
- const ParserContextSharedPtr& rContext ) :
+ UnaryFunctionFunctor( const Functor& rFunctor,
+ const ParserContextSharedPtr& rContext ) :
maFunctor( rFunctor ),
mpContext( rContext )
{
@@ -260,24 +260,24 @@ namespace slideshow
// check for constness
if( pArg->isConstant() )
{
- rNodeStack.push(
+ rNodeStack.push(
ExpressionNodeFactory::createConstantValueExpression(
maFunctor( (*pArg)(0.0) ) ) );
}
else
{
// push complex node, that calcs the value on demand
- rNodeStack.push(
+ rNodeStack.push(
ExpressionNodeSharedPtr(
- new UnaryFunctionExpression(
+ new UnaryFunctionExpression(
maFunctor,
pArg ) ) );
}
}
private:
- Functor maFunctor;
- ParserContextSharedPtr mpContext;
+ Functor maFunctor;
+ ParserContextSharedPtr mpContext;
};
// TODO(Q2): Refactor makeUnaryFunctionFunctor,
@@ -285,19 +285,19 @@ namespace slideshow
// ExpressionNodeFactory, to use a generic
// makeFunctionFunctor template, which is overloaded for
// unary, binary, ternary, etc. function pointers.
- template< typename Functor > UnaryFunctionFunctor<Functor>
- makeUnaryFunctionFunctor( const Functor& rFunctor,
- const ParserContextSharedPtr& rContext )
+ template< typename Functor > UnaryFunctionFunctor<Functor>
+ makeUnaryFunctionFunctor( const Functor& rFunctor,
+ const ParserContextSharedPtr& rContext )
{
return UnaryFunctionFunctor<Functor>( rFunctor, rContext );
}
- // MSVC has problems instantiating above template function with plain function
+ // MSVC has problems instantiating above template function with plain function
// pointers (doesn't like the const reference there). Thus, provide it with
// a dedicated overload here.
- UnaryFunctionFunctor< double (*)(double) >
+ UnaryFunctionFunctor< double (*)(double) >
makeUnaryFunctionFunctor( double (*pFunc)(double),
- const ParserContextSharedPtr& rContext )
+ const ParserContextSharedPtr& rContext )
{
return UnaryFunctionFunctor< double (*)(double) >( pFunc, rContext );
}
@@ -307,13 +307,13 @@ namespace slideshow
@tpl Generator
Generator functor, to generate an ExpressionNode of
appropriate type
-
+
*/
template< class Generator > class BinaryFunctionFunctor
{
public:
- BinaryFunctionFunctor( const Generator& rGenerator,
- const ParserContextSharedPtr& rContext ) :
+ BinaryFunctionFunctor( const Generator& rGenerator,
+ const ParserContextSharedPtr& rContext ) :
maGenerator( rGenerator ),
mpContext( rContext )
{
@@ -343,7 +343,7 @@ namespace slideshow
{
// call the operator() at pNode, store result
// in constant value ExpressionNode.
- rNodeStack.push(
+ rNodeStack.push(
ExpressionNodeFactory::createConstantValueExpression(
(*pNode)( 0.0 ) ) );
}
@@ -355,13 +355,13 @@ namespace slideshow
}
private:
- Generator maGenerator;
- ParserContextSharedPtr mpContext;
+ Generator maGenerator;
+ ParserContextSharedPtr mpContext;
};
- template< typename Generator > BinaryFunctionFunctor<Generator>
- makeBinaryFunctionFunctor( const Generator& rGenerator,
- const ParserContextSharedPtr& rContext )
+ template< typename Generator > BinaryFunctionFunctor<Generator>
+ makeBinaryFunctionFunctor( const Generator& rGenerator,
+ const ParserContextSharedPtr& rContext )
{
return BinaryFunctionFunctor<Generator>( rGenerator, rContext );
}
@@ -369,13 +369,13 @@ namespace slideshow
// Workaround for MSVC compiler anomaly (stack trashing)
//
- // The default ureal_parser_policies implementation of parse_exp
- // triggers a really weird error in MSVC7 (Version 13.00.9466), in
- // that the real_parser_impl::parse_main() call of parse_exp()
+ // The default ureal_parser_policies implementation of parse_exp
+ // triggers a really weird error in MSVC7 (Version 13.00.9466), in
+ // that the real_parser_impl::parse_main() call of parse_exp()
// overwrites the frame pointer _on the stack_ (EBP of the calling
- // function gets overwritten while lying on the stack).
+ // function gets overwritten while lying on the stack).
//
- // For the time being, our parser thus can only read the 1.0E10
+ // For the time being, our parser thus can only read the 1.0E10
// notation, not the 1.0e10 one.
//
// TODO(F1): Also handle the 1.0e10 case here.
@@ -384,9 +384,9 @@ namespace slideshow
template< typename ScannerT >
static typename ::boost::spirit::parser_result< ::boost::spirit::chlit<>, ScannerT >::type
parse_exp(ScannerT& scan)
- {
+ {
// as_lower_d somehow breaks MSVC7
- return ::boost::spirit::ch_p('E').parse(scan);
+ return ::boost::spirit::ch_p('E').parse(scan);
}
};
@@ -394,27 +394,27 @@ namespace slideshow
less literally written down below, only slightly
obfuscated by the parser actions):
- identifier = '$'|'pi'|'e'|'X'|'Y'|'Width'|'Height'
-
+ identifier = '$'|'pi'|'e'|'X'|'Y'|'Width'|'Height'
+
function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'|'acos'|'asin'|'exp'|'log'
- basic_expression =
- number |
- identifier |
- function '(' additive_expression ')' |
- '(' additive_expression ')'
-
- unary_expression =
+ basic_expression =
+ number |
+ identifier |
+ function '(' additive_expression ')' |
+ '(' additive_expression ')'
+
+ unary_expression =
'-' basic_expression |
basic_expression
-
- multiplicative_expression =
- unary_expression ( ( '*' unary_expression )* |
+
+ multiplicative_expression =
+ unary_expression ( ( '*' unary_expression )* |
( '/' unary_expression )* )
-
- additive_expression =
- multiplicative_expression ( ( '+' multiplicative_expression )* |
- ( '-' multiplicative_expression )* )
+
+ additive_expression =
+ multiplicative_expression ( ( '+' multiplicative_expression )* |
+ ( '-' multiplicative_expression )* )
*/
class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar >
@@ -440,54 +440,54 @@ namespace slideshow
using ::boost::spirit::real_parser;
identifier =
- str_p( "$" )[ ValueTFunctor( self.getContext()) ]
- | str_p( "pi" )[ ConstantFunctor(M_PI, self.getContext()) ]
- | str_p( "e" )[ ConstantFunctor(M_E, self.getContext()) ]
- | str_p( "x" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getCenterX),self.getContext()) ]
- | str_p( "y" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getCenterY),self.getContext()) ]
- | str_p( "width" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getWidth), self.getContext()) ]
- | str_p( "height" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getHeight), self.getContext()) ]
+ str_p( "$" )[ ValueTFunctor( self.getContext()) ]
+ | str_p( "pi" )[ ConstantFunctor(M_PI, self.getContext()) ]
+ | str_p( "e" )[ ConstantFunctor(M_E, self.getContext()) ]
+ | str_p( "x" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getCenterX),self.getContext()) ]
+ | str_p( "y" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getCenterY),self.getContext()) ]
+ | str_p( "width" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getWidth), self.getContext()) ]
+ | str_p( "height" )[ makeShapeBoundsFunctor(::std::mem_fun_ref(&::basegfx::B2DRange::getHeight), self.getContext()) ]
;
-
- unaryFunction =
+
+ unaryFunction =
(str_p( "abs" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&fabs, self.getContext()) ]
- | (str_p( "sqrt" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&sqrt, self.getContext()) ]
- | (str_p( "sin" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&sin, self.getContext()) ]
- | (str_p( "cos" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&cos, self.getContext()) ]
- | (str_p( "tan" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&tan, self.getContext()) ]
- | (str_p( "atan" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&atan, self.getContext()) ]
- | (str_p( "acos" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&acos, self.getContext()) ]
- | (str_p( "asin" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&asin, self.getContext()) ]
- | (str_p( "exp" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&exp, self.getContext()) ]
- | (str_p( "log" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&log, self.getContext()) ]
+ | (str_p( "sqrt" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&sqrt, self.getContext()) ]
+ | (str_p( "sin" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&sin, self.getContext()) ]
+ | (str_p( "cos" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&cos, self.getContext()) ]
+ | (str_p( "tan" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&tan, self.getContext()) ]
+ | (str_p( "atan" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&atan, self.getContext()) ]
+ | (str_p( "acos" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&acos, self.getContext()) ]
+ | (str_p( "asin" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&asin, self.getContext()) ]
+ | (str_p( "exp" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&exp, self.getContext()) ]
+ | (str_p( "log" ) >> '(' >> additiveExpression >> ')' )[ makeUnaryFunctionFunctor(&log, self.getContext()) ]
;
- binaryFunction =
+ binaryFunction =
(str_p( "min" ) >> '(' >> additiveExpression >> ',' >> additiveExpression >> ')' )[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createMinExpression, self.getContext()) ]
- | (str_p( "max" ) >> '(' >> additiveExpression >> ',' >> additiveExpression >> ')' )[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createMaxExpression, self.getContext()) ]
+ | (str_p( "max" ) >> '(' >> additiveExpression >> ',' >> additiveExpression >> ')' )[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createMaxExpression, self.getContext()) ]
;
- basicExpression =
+ basicExpression =
real_parser<double, custom_real_parser_policies<double> >()[ DoubleConstantFunctor(self.getContext()) ]
- | identifier
- | unaryFunction
- | binaryFunction
- | '(' >> additiveExpression >> ')'
+ | identifier
+ | unaryFunction
+ | binaryFunction
+ | '(' >> additiveExpression >> ')'
;
-
- unaryExpression =
+
+ unaryExpression =
('-' >> basicExpression)[ makeUnaryFunctionFunctor(::std::negate<double>(), self.getContext()) ]
- | basicExpression
+ | basicExpression
;
- multiplicativeExpression =
+ multiplicativeExpression =
unaryExpression
>> *( ('*' >> unaryExpression)[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createMultipliesExpression, self.getContext()) ]
| ('/' >> unaryExpression)[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createDividesExpression, self.getContext()) ]
)
;
- additiveExpression =
+ additiveExpression =
multiplicativeExpression
>> *( ('+' >> multiplicativeExpression)[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createPlusExpression, self.getContext()) ]
| ('-' >> multiplicativeExpression)[ makeBinaryFunctionFunctor(&ExpressionNodeFactory::createMinusExpression, self.getContext()) ]
@@ -507,18 +507,18 @@ namespace slideshow
{
return additiveExpression;
}
-
+
private:
- // the constituents of the Spirit arithmetic expression grammar.
+ // the constituents of the Spirit arithmetic expression grammar.
// For the sake of readability, without 'ma' prefix.
- ::boost::spirit::rule< ScannerT > additiveExpression;
- ::boost::spirit::rule< ScannerT > multiplicativeExpression;
- ::boost::spirit::rule< ScannerT > unaryExpression;
- ::boost::spirit::rule< ScannerT > basicExpression;
- ::boost::spirit::rule< ScannerT > unaryFunction;
- ::boost::spirit::rule< ScannerT > binaryFunction;
- ::boost::spirit::rule< ScannerT > identifier;
- };
+ ::boost::spirit::rule< ScannerT > additiveExpression;
+ ::boost::spirit::rule< ScannerT > multiplicativeExpression;
+ ::boost::spirit::rule< ScannerT > unaryExpression;
+ ::boost::spirit::rule< ScannerT > basicExpression;
+ ::boost::spirit::rule< ScannerT > unaryFunction;
+ ::boost::spirit::rule< ScannerT > binaryFunction;
+ ::boost::spirit::rule< ScannerT > identifier;
+ };
const ParserContextSharedPtr& getContext() const
{
@@ -526,15 +526,15 @@ namespace slideshow
}
private:
- ParserContextSharedPtr mpParserContext; // might get modified during parsing
+ ParserContextSharedPtr mpParserContext; // might get modified during parsing
};
-
+
#ifdef BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
const ParserContextSharedPtr& getParserContext()
{
static ParserContextSharedPtr lcl_parserContext( new ParserContext() );
- // clear node stack (since we reuse the static object, that's
+ // clear node stack (since we reuse the static object, that's
// the whole point here)
while( !lcl_parserContext->maOperandStack.empty() )
lcl_parserContext->maOperandStack.pop();
@@ -544,13 +544,13 @@ namespace slideshow
#endif
}
- ExpressionNodeSharedPtr SmilFunctionParser::parseSmilValue( const ::rtl::OUString& rSmilValue,
- const ::basegfx::B2DRectangle& rRelativeShapeBounds )
+ ExpressionNodeSharedPtr SmilFunctionParser::parseSmilValue( const ::rtl::OUString& rSmilValue,
+ const ::basegfx::B2DRectangle& rRelativeShapeBounds )
{
- // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
- // gives better conversion robustness here (we might want to map space
+ // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
+ // gives better conversion robustness here (we might want to map space
// etc. to ASCII space here)
- const ::rtl::OString& rAsciiSmilValue(
+ const ::rtl::OString& rAsciiSmilValue(
rtl::OUStringToOString( rSmilValue, RTL_TEXTENCODING_ASCII_US ) );
StringIteratorT aStart( rAsciiSmilValue.getStr() );
@@ -571,7 +571,7 @@ namespace slideshow
ExpressionGrammar aExpressionGrammer( pContext );
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
+ const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
::boost::spirit::parse( aStart,
aEnd,
aExpressionGrammer,
@@ -582,7 +582,7 @@ namespace slideshow
if( !aParseInfo.full )
throw ParseError( "SmilFunctionParser::parseSmilValue(): string not fully parseable" );
- // parser's state stack now must contain exactly _one_ ExpressionNode,
+ // parser's state stack now must contain exactly _one_ ExpressionNode,
// which represents our formula.
if( pContext->maOperandStack.size() != 1 )
throw ParseError( "SmilFunctionParser::parseSmilValue(): incomplete or empty expression" );
@@ -590,13 +590,13 @@ namespace slideshow
return pContext->maOperandStack.top();
}
- ExpressionNodeSharedPtr SmilFunctionParser::parseSmilFunction( const ::rtl::OUString& rSmilFunction,
- const ::basegfx::B2DRectangle& rRelativeShapeBounds )
+ ExpressionNodeSharedPtr SmilFunctionParser::parseSmilFunction( const ::rtl::OUString& rSmilFunction,
+ const ::basegfx::B2DRectangle& rRelativeShapeBounds )
{
- // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
- // gives better conversion robustness here (we might want to map space
+ // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_*
+ // gives better conversion robustness here (we might want to map space
// etc. to ASCII space here)
- const ::rtl::OString& rAsciiSmilFunction(
+ const ::rtl::OString& rAsciiSmilFunction(
rtl::OUStringToOString( rSmilFunction, RTL_TEXTENCODING_ASCII_US ) );
StringIteratorT aStart( rAsciiSmilFunction.getStr() );
@@ -617,7 +617,7 @@ namespace slideshow
ExpressionGrammar aExpressionGrammer( pContext );
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
+ const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
::boost::spirit::parse( aStart,
aEnd,
aExpressionGrammer >> ::boost::spirit::end_p,
@@ -628,7 +628,7 @@ namespace slideshow
if( !aParseInfo.full )
throw ParseError( "SmilFunctionParser::parseSmilFunction(): string not fully parseable" );
- // parser's state stack now must contain exactly _one_ ExpressionNode,
+ // parser's state stack now must contain exactly _one_ ExpressionNode,
// which represents our formula.
if( pContext->maOperandStack.size() != 1 )
throw ParseError( "SmilFunctionParser::parseSmilFunction(): incomplete or empty expression" );
diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx
index f856dc91d241..07b5c57554da 100644
--- a/slideshow/source/engine/soundplayer.cxx
+++ b/slideshow/source/engine/soundplayer.cxx
@@ -2,7 +2,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
@@ -56,11 +56,11 @@ namespace slideshow
namespace internal
{
// TODO(Q3): Move the whole SoundPlayer class to avmedia.
-
+
boost::shared_ptr<SoundPlayer> SoundPlayer::create(
EventMultiplexer & rEventMultiplexer,
const ::rtl::OUString& rSoundURL,
- const uno::Reference< uno::XComponentContext>& rComponentContext )
+ const uno::Reference< uno::XComponentContext>& rComponentContext )
{
boost::shared_ptr<SoundPlayer> pPlayer(
new SoundPlayer( rEventMultiplexer,
@@ -75,7 +75,7 @@ namespace slideshow
{
return bPauseShow ? stopPlayback() : startPlayback();
}
-
+
void SoundPlayer::dispose()
{
if( mThis )
@@ -83,7 +83,7 @@ namespace slideshow
mrEventMultiplexer.removePauseHandler( mThis );
mThis.reset();
}
-
+
if( mxPlayer.is() )
{
mxPlayer->stop();
@@ -94,11 +94,11 @@ namespace slideshow
mxPlayer.clear();
}
}
-
+
SoundPlayer::SoundPlayer(
EventMultiplexer & rEventMultiplexer,
const ::rtl::OUString& rSoundURL,
- const uno::Reference< uno::XComponentContext>& rComponentContext )
+ const uno::Reference< uno::XComponentContext>& rComponentContext )
: mrEventMultiplexer(rEventMultiplexer),
mThis(),
mxPlayer()
@@ -108,7 +108,7 @@ namespace slideshow
try
{
- const INetURLObject aURL( rSoundURL );
+ const INetURLObject aURL( rSoundURL );
mxPlayer.set( avmedia::MediaWindow::createPlayer(
aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ),
uno::UNO_QUERY);
@@ -117,7 +117,7 @@ namespace slideshow
{
throw;
}
- catch( uno::Exception& )
+ catch( uno::Exception& )
{
}
@@ -146,10 +146,10 @@ namespace slideshow
{
if( !mxPlayer.is() )
return 0.0;
-
+
const double nDuration( mxPlayer->getDuration() );
if( mxPlayer->isPlaying() )
- return ::std::max( 0.0,
+ return ::std::max( 0.0,
nDuration - mxPlayer->getMediaTime() );
else
return nDuration;
@@ -163,7 +163,7 @@ namespace slideshow
if( mxPlayer->isPlaying() )
mxPlayer->stop();
- mxPlayer->start();
+ mxPlayer->start();
return true;
}
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index c80a3634167d..25c5b2cff8a8 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx
index 85b2e0323aab..9a74e4114206 100644
--- a/slideshow/source/engine/tools.cxx
+++ b/slideshow/source/engine/tools.cxx
@@ -2,7 +2,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
@@ -83,7 +83,7 @@ namespace slideshow
}
private:
- const ::rtl::OUString& mrSearchString;
+ const ::rtl::OUString& mrSearchString;
};
class NamedValueComparator
@@ -100,14 +100,14 @@ namespace slideshow
}
private:
- const beans::NamedValue& mrKey;
+ const beans::NamedValue& mrKey;
};
- ::basegfx::B2DHomMatrix getAttributedShapeTransformation( const ::basegfx::B2DRectangle& rShapeBounds,
- const ShapeAttributeLayerSharedPtr& pAttr )
+ ::basegfx::B2DHomMatrix getAttributedShapeTransformation( const ::basegfx::B2DRectangle& rShapeBounds,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
- ::basegfx::B2DHomMatrix aTransform;
- const ::basegfx::B2DSize& rSize( rShapeBounds.getRange() );
+ ::basegfx::B2DHomMatrix aTransform;
+ const ::basegfx::B2DSize& rSize( rShapeBounds.getRange() );
const double nShearX( pAttr->isShearXAngleValid() ?
pAttr->getShearXAngle() :
@@ -121,12 +121,12 @@ namespace slideshow
// scale, shear and rotation pivot point is the shape
// center - adapt origin accordingly
- aTransform.translate( -0.5, -0.5 );
+ aTransform.translate( -0.5, -0.5 );
// ensure valid size (zero size will inevitably lead
// to a singular transformation matrix)
aTransform.scale( ::basegfx::pruneScaleValue(
- rSize.getX() ),
+ rSize.getX() ),
::basegfx::pruneScaleValue(
rSize.getY() ) );
@@ -145,7 +145,7 @@ namespace slideshow
if( bNeedRotation )
aTransform.rotate( nRotation );
}
-
+
// move left, top corner back to position of the
// shape. Since we've already translated the
// center of the shape to the origin (the
@@ -162,10 +162,10 @@ namespace slideshow
// =========================
/// extract unary double value from Any
- bool extractValue( double& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& rShape,
- const ::basegfx::B2DVector& rSlideBounds )
+ bool extractValue( double& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& rShape,
+ const ::basegfx::B2DVector& rSlideBounds )
{
// try to extract numeric value (double, or smaller POD, like float or int)
if( (rSourceAny >>= o_rValue) )
@@ -183,7 +183,7 @@ namespace slideshow
try
{
// Parse string into ExpressionNode, eval node at time 0.0
- o_rValue = (*SmilFunctionParser::parseSmilValue(
+ o_rValue = (*SmilFunctionParser::parseSmilValue(
aString,
calcRelativeShapeBounds(rSlideBounds,
rShape->getBounds()) ))(0.0);
@@ -197,10 +197,10 @@ namespace slideshow
}
/// extract enum/constant group value from Any
- bool extractValue( sal_Int32& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& /*rShape*/,
- const ::basegfx::B2DVector& /*rSlideBounds*/ )
+ bool extractValue( sal_Int32& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& /*rShape*/,
+ const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
// try to extract numeric value (int, or smaller POD, like byte)
if( (rSourceAny >>= o_rValue) )
@@ -242,10 +242,10 @@ namespace slideshow
}
/// extract enum/constant group value from Any
- bool extractValue( sal_Int16& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& rShape,
- const ::basegfx::B2DVector& rSlideBounds )
+ bool extractValue( sal_Int16& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& rShape,
+ const ::basegfx::B2DVector& rSlideBounds )
{
sal_Int32 aValue;
if( !extractValue(aValue,rSourceAny,rShape,rSlideBounds) )
@@ -263,10 +263,10 @@ namespace slideshow
}
/// extract color value from Any
- bool extractValue( RGBColor& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& /*rShape*/,
- const ::basegfx::B2DVector& /*rSlideBounds*/ )
+ bool extractValue( RGBColor& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& /*rShape*/,
+ const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
// try to extract numeric value (double, or smaller POD, like float or int)
{
@@ -307,10 +307,10 @@ namespace slideshow
"extractValue(): inappropriate length for RGB color value" );
// truncate to byte
- o_rValue = RGBColor( ::cppcanvas::makeColor(
- static_cast<sal_uInt8>(aTmp[0]),
+ o_rValue = RGBColor( ::cppcanvas::makeColor(
+ static_cast<sal_uInt8>(aTmp[0]),
static_cast<sal_uInt8>(aTmp[1]),
- static_cast<sal_uInt8>(aTmp[2]),
+ static_cast<sal_uInt8>(aTmp[2]),
255 ) );
// succeeded
@@ -345,10 +345,10 @@ namespace slideshow
}
/// extract color value from Any
- bool extractValue( HSLColor& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& /*rShape*/,
- const ::basegfx::B2DVector& /*rSlideBounds*/ )
+ bool extractValue( HSLColor& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& /*rShape*/,
+ const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
// try double sequence
{
@@ -379,15 +379,15 @@ namespace slideshow
return true;
}
}
-
+
return false; // nothing left to try
}
/// extract plain string from Any
- bool extractValue( ::rtl::OUString& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& /*rShape*/,
- const ::basegfx::B2DVector& /*rSlideBounds*/ )
+ bool extractValue( ::rtl::OUString& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& /*rShape*/,
+ const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
// try to extract string
if( !(rSourceAny >>= o_rValue) )
@@ -397,10 +397,10 @@ namespace slideshow
}
/// extract bool value from Any
- bool extractValue( bool& o_rValue,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& /*rShape*/,
- const ::basegfx::B2DVector& /*rSlideBounds*/ )
+ bool extractValue( bool& o_rValue,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& /*rShape*/,
+ const ::basegfx::B2DVector& /*rSlideBounds*/ )
{
sal_Bool nTmp = sal_Bool();
// try to extract bool value
@@ -417,7 +417,7 @@ namespace slideshow
if( !(rSourceAny >>= aString) )
return false; // nothing left to try
- // we also take the strings "true" and "false",
+ // we also take the strings "true" and "false",
// as well as "on" and "off" here
if( aString.equalsIgnoreAsciiCaseAscii("true") ||
aString.equalsIgnoreAsciiCaseAscii("on") )
@@ -437,10 +437,10 @@ namespace slideshow
}
/// extract double 2-tuple from Any
- bool extractValue( ::basegfx::B2DTuple& o_rPair,
- const uno::Any& rSourceAny,
- const ShapeSharedPtr& rShape,
- const ::basegfx::B2DVector& rSlideBounds )
+ bool extractValue( ::basegfx::B2DTuple& o_rPair,
+ const uno::Any& rSourceAny,
+ const ShapeSharedPtr& rShape,
+ const ::basegfx::B2DVector& rSlideBounds )
{
animations::ValuePair aPair;
@@ -461,11 +461,11 @@ namespace slideshow
return true;
}
- bool findNamedValue( uno::Sequence< beans::NamedValue > const& rSequence,
- const beans::NamedValue& rSearchKey )
+ bool findNamedValue( uno::Sequence< beans::NamedValue > const& rSequence,
+ const beans::NamedValue& rSearchKey )
{
- const beans::NamedValue* pArray = rSequence.getConstArray();
- const size_t nLen( rSequence.getLength() );
+ const beans::NamedValue* pArray = rSequence.getConstArray();
+ const size_t nLen( rSequence.getLength() );
if( nLen == 0 )
return false;
@@ -479,13 +479,13 @@ namespace slideshow
return true;
}
-
- bool findNamedValue( beans::NamedValue* o_pRet,
- const uno::Sequence< beans::NamedValue >& rSequence,
- const ::rtl::OUString& rSearchString )
+
+ bool findNamedValue( beans::NamedValue* o_pRet,
+ const uno::Sequence< beans::NamedValue >& rSequence,
+ const ::rtl::OUString& rSearchString )
{
- const beans::NamedValue* pArray = rSequence.getConstArray();
- const size_t nLen( rSequence.getLength() );
+ const beans::NamedValue* pArray = rSequence.getConstArray();
+ const size_t nLen( rSequence.getLength() );
if( nLen == 0 )
return false;
@@ -511,15 +511,15 @@ namespace slideshow
rShapeBounds.getMaxY() / rPageSize.getY() );
}
- // TODO(F2): Currently, the positional attributes DO NOT mirror the XShape properties.
+ // TODO(F2): Currently, the positional attributes DO NOT mirror the XShape properties.
// First and foremost, this is because we must operate with the shape boundrect,
// not position and size (the conversion between logic rect, snap rect and boundrect
// are non-trivial for draw shapes, and I won't duplicate them here). Thus, shapes
// rotated on the page will still have 0.0 rotation angle, as the metafile
// representation fetched over the API is our default zero case.
- ::basegfx::B2DHomMatrix getShapeTransformation( const ::basegfx::B2DRectangle& rShapeBounds,
- const ShapeAttributeLayerSharedPtr& pAttr )
+ ::basegfx::B2DHomMatrix getShapeTransformation( const ::basegfx::B2DRectangle& rShapeBounds,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
if( !pAttr )
{
@@ -536,9 +536,9 @@ namespace slideshow
}
}
- ::basegfx::B2DHomMatrix getSpriteTransformation( const ::basegfx::B2DVector& rPixelSize,
- const ::basegfx::B2DVector& rOrigSize,
- const ShapeAttributeLayerSharedPtr& pAttr )
+ ::basegfx::B2DHomMatrix getSpriteTransformation( const ::basegfx::B2DVector& rPixelSize,
+ const ::basegfx::B2DVector& rOrigSize,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
::basegfx::B2DHomMatrix aTransform;
@@ -557,20 +557,20 @@ namespace slideshow
// scale, shear and rotation pivot point is the
// sprite's pixel center - adapt origin accordingly
aTransform.translate( -0.5*rPixelSize.getX(),
- -0.5*rPixelSize.getY() );
+ -0.5*rPixelSize.getY() );
- const ::basegfx::B2DSize aSize(
+ const ::basegfx::B2DSize aSize(
pAttr->isWidthValid() ? pAttr->getWidth() : rOrigSize.getX(),
pAttr->isHeightValid() ? pAttr->getHeight() : rOrigSize.getY() );
// ensure valid size (zero size will inevitably lead
// to a singular transformation matrix).
aTransform.scale( ::basegfx::pruneScaleValue(
- aSize.getX() /
+ aSize.getX() /
::basegfx::pruneScaleValue(
- rOrigSize.getX() ) ),
+ rOrigSize.getX() ) ),
::basegfx::pruneScaleValue(
- aSize.getY() /
+ aSize.getY() /
::basegfx::pruneScaleValue(
rOrigSize.getY() ) ) );
@@ -594,7 +594,7 @@ namespace slideshow
// the sprite (we've translated the center of the
// sprite to the origin above).
aTransform.translate( 0.5*rPixelSize.getX(),
- 0.5*rPixelSize.getY() );
+ 0.5*rPixelSize.getY() );
}
// return identity transform for un-attributed
@@ -603,9 +603,9 @@ namespace slideshow
return aTransform;
}
- ::basegfx::B2DRectangle getShapeUpdateArea( const ::basegfx::B2DRectangle& rUnitBounds,
- const ::basegfx::B2DHomMatrix& rShapeTransform,
- const ShapeAttributeLayerSharedPtr& pAttr )
+ ::basegfx::B2DRectangle getShapeUpdateArea( const ::basegfx::B2DRectangle& rUnitBounds,
+ const ::basegfx::B2DHomMatrix& rShapeTransform,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
::basegfx::B2DHomMatrix aTransform;
@@ -619,9 +619,9 @@ namespace slideshow
const double nCharScale( pAttr->getCharScale() );
// center of scaling is the middle of the shape
- aTransform.translate( -0.5, -0.5 );
+ aTransform.translate( -0.5, -0.5 );
aTransform.scale( nCharScale, nCharScale );
- aTransform.translate( 0.5, 0.5 );
+ aTransform.translate( 0.5, 0.5 );
}
aTransform *= rShapeTransform;
@@ -629,14 +629,14 @@ namespace slideshow
::basegfx::B2DRectangle aRes;
// apply shape transformation to unit rect
- return ::canvas::tools::calcTransformedRectBounds(
- aRes,
+ return ::canvas::tools::calcTransformedRectBounds(
+ aRes,
rUnitBounds,
aTransform );
}
- ::basegfx::B2DRange getShapeUpdateArea( const ::basegfx::B2DRange& rUnitBounds,
- const ::basegfx::B2DRange& rShapeBounds )
+ ::basegfx::B2DRange getShapeUpdateArea( const ::basegfx::B2DRange& rUnitBounds,
+ const ::basegfx::B2DRange& rShapeBounds )
{
return ::basegfx::B2DRectangle(
basegfx::tools::lerp( rShapeBounds.getMinX(),
@@ -652,9 +652,9 @@ namespace slideshow
rShapeBounds.getMaxY(),
rUnitBounds.getMaxY() ) );
}
-
- ::basegfx::B2DRectangle getShapePosSize( const ::basegfx::B2DRectangle& rOrigBounds,
- const ShapeAttributeLayerSharedPtr& pAttr )
+
+ ::basegfx::B2DRectangle getShapePosSize( const ::basegfx::B2DRectangle& rOrigBounds,
+ const ShapeAttributeLayerSharedPtr& pAttr )
{
// an already empty shape bound need no further
// treatment. In fact, any changes applied below would
@@ -667,7 +667,7 @@ namespace slideshow
}
else
{
- // cannot use maBounds anymore, attributes might have been
+ // cannot use maBounds anymore, attributes might have been
// changed by now.
// Have to use absolute values here, as negative sizes
// (aka mirrored shapes) _still_ have the same bounds,
@@ -691,14 +691,14 @@ namespace slideshow
// the positional attribute retrieved from the
// ShapeAttributeLayer actually denotes the _middle_
// of the shape (do it as the PPTs do...)
- return ::basegfx::B2DRectangle( aPos - 0.5*aSize,
+ return ::basegfx::B2DRectangle( aPos - 0.5*aSize,
aPos + 0.5*aSize );
}
}
RGBColor unoColor2RGBColor( sal_Int32 nColor )
{
- return RGBColor(
+ return RGBColor(
::cppcanvas::makeColor(
// convert from API color to IntSRGBA color
// (0xAARRGGBB -> 0xRRGGBBAA)
@@ -707,7 +707,7 @@ namespace slideshow
static_cast< sal_uInt8 >( nColor ),
static_cast< sal_uInt8 >( nColor >> 24U ) ) );
}
-
+
sal_Int32 RGBAColor2UnoColor( ::cppcanvas::Color::IntSRGBA aColor )
{
return ::cppcanvas::makeColorARGB(
@@ -718,7 +718,7 @@ namespace slideshow
::cppcanvas::getGreen(aColor),
::cppcanvas::getBlue(aColor));
}
-
+
/*sal_Int32 RGBAColor2UnoColor( ::cppcanvas::Color::IntSRGBA aColor )
{
return ::cppcanvas::unMakeColor(
@@ -731,7 +731,7 @@ namespace slideshow
}*/
sal_Int8 unSignedToSigned(sal_Int8 nInt)
- {
+ {
if(nInt < 0 ){
sal_Int8 nInt2 = nInt >> 1U;
return nInt2;
@@ -739,16 +739,16 @@ namespace slideshow
return nInt;
}
}
-
+
void fillRect( const ::cppcanvas::CanvasSharedPtr& rCanvas,
- const ::basegfx::B2DRectangle& rRect,
+ const ::basegfx::B2DRectangle& rRect,
::cppcanvas::Color::IntSRGBA aFillColor )
{
const ::basegfx::B2DPolygon aPoly(
::basegfx::tools::createPolygonFromRect( rRect ));
- ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
- ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( rCanvas,
+ ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
+ ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( rCanvas,
aPoly ) );
if( pPolyPoly )
@@ -759,7 +759,7 @@ namespace slideshow
}
void initSlideBackground( const ::cppcanvas::CanvasSharedPtr& rCanvas,
- const ::basegfx::B2ISize& rSize )
+ const ::basegfx::B2ISize& rSize )
{
::cppcanvas::CanvasSharedPtr pCanvas( rCanvas->clone() );
@@ -771,7 +771,7 @@ namespace slideshow
// pixel, and the bitmap is initialized white,
// depending on the slide content a one pixel wide
// line will show to the bottom and the right.
- fillRect( pCanvas,
+ fillRect( pCanvas,
::basegfx::B2DRectangle( 0.0, 0.0,
rSize.getX(),
rSize.getY() ),
@@ -785,7 +785,7 @@ namespace slideshow
// off. OTOH, every other slide background (solid fill,
// gradient, bitmap) render one pixel less, thus revealing
// ugly white pixel to the right and the bottom.
- fillRect( pCanvas,
+ fillRect( pCanvas,
::basegfx::B2DRectangle( 0.0, 0.0,
rSize.getX()-1,
rSize.getY()-1 ),
@@ -794,37 +794,37 @@ namespace slideshow
::basegfx::B2DRectangle getAPIShapeBounds( const uno::Reference< drawing::XShape >& xShape )
{
- uno::Reference< beans::XPropertySet > xPropSet( xShape,
+ uno::Reference< beans::XPropertySet > xPropSet( xShape,
uno::UNO_QUERY_THROW );
// read bound rect
awt::Rectangle aTmpRect;
- if( !(xPropSet->getPropertyValue(
+ if( !(xPropSet->getPropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BoundRect") ) ) >>= aTmpRect) )
{
ENSURE_OR_THROW( false,
"getAPIShapeBounds(): Could not get \"BoundRect\" property from shape" );
}
- return ::basegfx::B2DRectangle( aTmpRect.X,
+ return ::basegfx::B2DRectangle( aTmpRect.X,
aTmpRect.Y,
- aTmpRect.X+aTmpRect.Width,
+ aTmpRect.X+aTmpRect.Width,
aTmpRect.Y+aTmpRect.Height );
}
double getAPIShapePrio( const uno::Reference< drawing::XShape >& xShape )
{
- uno::Reference< beans::XPropertySet > xPropSet( xShape,
+ uno::Reference< beans::XPropertySet > xPropSet( xShape,
uno::UNO_QUERY_THROW );
// read prio
sal_Int32 nPrio(0);
- if( !(xPropSet->getPropertyValue(
+ if( !(xPropSet->getPropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ) ) >>= nPrio) )
{
ENSURE_OR_THROW( false,
"getAPIShapePrio(): Could not get \"ZOrder\" property from shape" );
}
- // TODO(F2): Check and adapt the range of possible values here.
+ // TODO(F2): Check and adapt the range of possible values here.
// Maybe we can also take the total number of shapes here
return nPrio / 65535.0;
}
@@ -839,17 +839,17 @@ namespace slideshow
rSlideSize.getX(),
rSlideSize.getY() );
basegfx::B2DRange aTmpRect;
- canvas::tools::calcTransformedRectBounds( aTmpRect,
- aRect,
+ canvas::tools::calcTransformedRectBounds( aTmpRect,
+ aRect,
pView->getTransformation() );
// #i42440# Returned slide size is one pixel too small, as
// rendering happens one pixel to the right and below the
// actual bound rect.
- return basegfx::B2IVector(
+ return basegfx::B2IVector(
basegfx::fround( aTmpRect.getRange().getX() ) + 1,
basegfx::fround( aTmpRect.getRange().getY() ) + 1 );
- }
+ }
}
}
diff --git a/slideshow/source/engine/transitions/barndoorwipe.cxx b/slideshow/source/engine/transitions/barndoorwipe.cxx
index e65e94344854..abae768bef81 100644
--- a/slideshow/source/engine/transitions/barndoorwipe.cxx
+++ b/slideshow/source/engine/transitions/barndoorwipe.cxx
@@ -2,7 +2,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
@@ -43,14 +43,14 @@ namespace internal {
{
if (m_doubled)
t /= 2.0;
-
+
basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5));
aTransform.scale( ::basegfx::pruneScaleValue(t), 1.0 );
aTransform.translate( 0.5, 0.5 );
::basegfx::B2DPolygon poly( m_unitRect );
poly.transform( aTransform );
::basegfx::B2DPolyPolygon res(poly);
-
+
if (m_doubled) {
aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5);
aTransform.rotate( M_PI_2 );
@@ -58,7 +58,7 @@ namespace internal {
poly.transform( aTransform );
res.append(poly);
}
-
+
return res;
}
diff --git a/slideshow/source/engine/transitions/barndoorwipe.hxx b/slideshow/source/engine/transitions/barndoorwipe.hxx
index e7c2d74e7b16..b8683e38f857 100644
--- a/slideshow/source/engine/transitions/barndoorwipe.hxx
+++ b/slideshow/source/engine/transitions/barndoorwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/barwipepolypolygon.cxx b/slideshow/source/engine/transitions/barwipepolypolygon.cxx
index c9838530f323..c1d263ffa06b 100644
--- a/slideshow/source/engine/transitions/barwipepolypolygon.cxx
+++ b/slideshow/source/engine/transitions/barwipepolypolygon.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/barwipepolypolygon.hxx b/slideshow/source/engine/transitions/barwipepolypolygon.hxx
index 001d1b940ae7..6c7b78959a23 100644
--- a/slideshow/source/engine/transitions/barwipepolypolygon.hxx
+++ b/slideshow/source/engine/transitions/barwipepolypolygon.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/boxwipe.cxx b/slideshow/source/engine/transitions/boxwipe.cxx
index b4d479de7e43..0ecfe203ecdf 100644
--- a/slideshow/source/engine/transitions/boxwipe.cxx
+++ b/slideshow/source/engine/transitions/boxwipe.cxx
@@ -2,7 +2,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
@@ -48,7 +48,7 @@ namespace internal {
} else {
aTransform.scale( d, d );
}
-
+
::basegfx::B2DPolyPolygon res( m_unitRect );
res.transform( aTransform );
return res;
diff --git a/slideshow/source/engine/transitions/boxwipe.hxx b/slideshow/source/engine/transitions/boxwipe.hxx
index 899d56755acc..fe44113d54a1 100644
--- a/slideshow/source/engine/transitions/boxwipe.hxx
+++ b/slideshow/source/engine/transitions/boxwipe.hxx
@@ -2,7 +2,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
@@ -46,7 +46,7 @@ public:
virtual ::basegfx::B2DPolyPolygon operator () ( double t );
private:
const bool m_topCentered;
- const ::basegfx::B2DPolyPolygon m_unitRect;
+ const ::basegfx::B2DPolyPolygon m_unitRect;
};
}
diff --git a/slideshow/source/engine/transitions/checkerboardwipe.cxx b/slideshow/source/engine/transitions/checkerboardwipe.cxx
index d8b2fbc8cadb..8db1b023c5f9 100644
--- a/slideshow/source/engine/transitions/checkerboardwipe.cxx
+++ b/slideshow/source/engine/transitions/checkerboardwipe.cxx
@@ -2,7 +2,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
@@ -41,9 +41,9 @@ namespace internal {
{
const double d = (1.0 / m_unitsPerEdge);
::basegfx::B2DHomMatrix aTransform;
- aTransform.scale( ::basegfx::pruneScaleValue( d * 2.0 * t ),
+ aTransform.scale( ::basegfx::pruneScaleValue( d * 2.0 * t ),
::basegfx::pruneScaleValue( d ) );
-
+
::basegfx::B2DPolyPolygon res;
for ( sal_Int32 i = m_unitsPerEdge; i--; )
{
diff --git a/slideshow/source/engine/transitions/checkerboardwipe.hxx b/slideshow/source/engine/transitions/checkerboardwipe.hxx
index 06c7e28e240d..df83391e20ee 100644
--- a/slideshow/source/engine/transitions/checkerboardwipe.hxx
+++ b/slideshow/source/engine/transitions/checkerboardwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/clippingfunctor.cxx b/slideshow/source/engine/transitions/clippingfunctor.cxx
index b66cd7b11f84..4b4e148bcee3 100644
--- a/slideshow/source/engine/transitions/clippingfunctor.cxx
+++ b/slideshow/source/engine/transitions/clippingfunctor.cxx
@@ -2,7 +2,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
@@ -40,9 +40,9 @@
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-namespace slideshow
+namespace slideshow
{
- namespace internal
+ namespace internal
{
ClippingFunctor::ClippingFunctor(const ParametricPolyPolygonSharedPtr& rPolygon,
const TransitionInfo& rTransitionInfo,
@@ -59,21 +59,21 @@ namespace slideshow
{
ENSURE_OR_THROW( rPolygon,
"ClippingFunctor::ClippingFunctor(): Invalid parametric polygon" );
-
+
// maBackgroundRect serves as the minuent when
// subtracting a given clip polygon from the
// background. To speed up the clipper algo, avoid
// actual intersections of the generated
// poly-polygon with the minuent - i.e. choose the
// polygon to subtract from sufficiently large.
-
+
// blow up unit rect to (-1,-1),(2,2)
// AW: Not needed, just use range
// ::basegfx::B2DHomMatrix aMatrix;
// aMatrix.scale(3.0,3.0);
// aMatrix.translate(-1.0,-1.0);
// maBackgroundRect.transform( aMatrix );
-
+
// extract modification info from maTransitionInfo
// -----------------------------------------------
@@ -115,18 +115,18 @@ namespace slideshow
false,
"TransitionFactory::TransitionFactory(): Unexpected reverse method" );
break;
-
+
case TransitionInfo::REVERSEMETHOD_IGNORE:
- break;
-
+ break;
+
case TransitionInfo::REVERSEMETHOD_INVERT_SWEEP:
mbForwardParameterSweep = !mbForwardParameterSweep;
break;
-
+
case TransitionInfo::REVERSEMETHOD_SUBTRACT_POLYGON:
mbSubtractPolygon = !mbSubtractPolygon;
break;
-
+
case TransitionInfo::REVERSEMETHOD_SUBTRACT_AND_INVERT:
mbForwardParameterSweep = !mbForwardParameterSweep;
mbSubtractPolygon = !mbSubtractPolygon;
@@ -136,13 +136,13 @@ namespace slideshow
maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI)
* maStaticTransformation;
break;
-
+
case TransitionInfo::REVERSEMETHOD_FLIP_X:
maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)
* maStaticTransformation;
mbFlip = true;
break;
-
+
case TransitionInfo::REVERSEMETHOD_FLIP_Y:
maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)
* maStaticTransformation;
@@ -150,7 +150,7 @@ namespace slideshow
break;
}
}
-
+
if( !bModeIn )
{
// client has requested 'out' mode. Apply
@@ -159,18 +159,18 @@ namespace slideshow
mbForwardParameterSweep = !mbForwardParameterSweep;
else
mbSubtractPolygon = !mbSubtractPolygon;
- }
+ }
}
- ::basegfx::B2DPolyPolygon ClippingFunctor::operator()( double nValue,
- const ::basegfx::B2DSize& rTargetSize )
+ ::basegfx::B2DPolyPolygon ClippingFunctor::operator()( double nValue,
+ const ::basegfx::B2DSize& rTargetSize )
{
// modify clip polygon according to static
// transformation plus current shape size
::basegfx::B2DHomMatrix aMatrix( maStaticTransformation );
-
+
// retrieve current clip polygon
- ::basegfx::B2DPolyPolygon aClipPoly = (*mpParametricPoly)(
+ ::basegfx::B2DPolyPolygon aClipPoly = (*mpParametricPoly)(
mbForwardParameterSweep ? nValue : 1.0 - nValue );
// TODO(Q4): workaround here, better be fixed in cppcanvas
@@ -179,17 +179,17 @@ namespace slideshow
if (mbFlip)
aClipPoly.flip();
-
+
// currently, clipper cannot cope with curves. Subdivide first
// AW: Should be no longer necessary; clipping tools are now bezier-safe
// if( aClipPoly.areControlPointsUsed() )
// aClipPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aClipPoly);
-
+
if( mbSubtractPolygon )
{
// subtract given polygon from background
// rect. Do that before any transformations.
-
+
// calc maBackgroundRect \ aClipPoly
// =================================
@@ -213,7 +213,7 @@ namespace slideshow
aClipPoly = basegfx::tools::solvePolygonOperationDiff(aBackgroundPolyPoly, aClipPoly);
}
}
-
+
// scale polygon up to current shape size
if( mbScaleIsotrophically )
{
@@ -228,10 +228,10 @@ namespace slideshow
aMatrix.scale( rTargetSize.getX(),
rTargetSize.getY() );
}
-
+
// apply cumulative transformation to clip polygon
aClipPoly.transform( aMatrix );
-
+
return aClipPoly;
}
diff --git a/slideshow/source/engine/transitions/clippingfunctor.hxx b/slideshow/source/engine/transitions/clippingfunctor.hxx
index 97a6ee1b62dc..e02af2d148bc 100644
--- a/slideshow/source/engine/transitions/clippingfunctor.hxx
+++ b/slideshow/source/engine/transitions/clippingfunctor.hxx
@@ -2,7 +2,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
@@ -37,18 +37,18 @@
#include <parametricpolypolygon.hxx>
-namespace slideshow
+namespace slideshow
{
- namespace internal
+ namespace internal
{
/** Generates the final clipping polygon.
This class serves as the functor, which generates the
final clipping polygon from a given ParametricPolyPolygon
- and a TransitionInfo.
+ and a TransitionInfo.
The ParametricPolyPolygon can be obtained from the
- ParametricPolyPolygonFactory, see there.
+ ParametricPolyPolygonFactory, see there.
The TransitionInfo further parameterizes the polygon
generated by the ParametricPolyPolygon, with common
@@ -65,7 +65,7 @@ namespace slideshow
const TransitionInfo& rTransitionInfo,
bool bDirectionForward,
bool bModeIn );
-
+
/** Generate clip polygon.
@param nValue
@@ -76,9 +76,9 @@ namespace slideshow
Size the clip polygon should cover. This is typically
the size of the object the effect is applied on.
*/
- ::basegfx::B2DPolyPolygon operator()( double nValue,
+ ::basegfx::B2DPolyPolygon operator()( double nValue,
const ::basegfx::B2DSize& rTargetSize );
-
+
private:
ParametricPolyPolygonSharedPtr mpParametricPoly;
::basegfx::B2DHomMatrix maStaticTransformation;
diff --git a/slideshow/source/engine/transitions/clockwipe.cxx b/slideshow/source/engine/transitions/clockwipe.cxx
index dbcf59abb1f6..4f9773791901 100644
--- a/slideshow/source/engine/transitions/clockwipe.cxx
+++ b/slideshow/source/engine/transitions/clockwipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/clockwipe.hxx b/slideshow/source/engine/transitions/clockwipe.hxx
index 28a5bd8ada10..bfa45cdb9f79 100644
--- a/slideshow/source/engine/transitions/clockwipe.hxx
+++ b/slideshow/source/engine/transitions/clockwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx
index 76d898538a82..3640c0961e38 100644
--- a/slideshow/source/engine/transitions/combtransition.cxx
+++ b/slideshow/source/engine/transitions/combtransition.cxx
@@ -2,7 +2,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
@@ -55,28 +55,28 @@ basegfx::B2DPolyPolygon createClipPolygon(
// create clip polygon in standard orientation (will later
// be rotated to match direction vector)
::basegfx::B2DPolyPolygon aClipPoly;
-
+
// create nNumStrips/2 vertical strips
for( int i=nOffset; i<nNumStrips; i+=2 )
{
- aClipPoly.append(
- ::basegfx::tools::createPolygonFromRect(
+ aClipPoly.append(
+ ::basegfx::tools::createPolygonFromRect(
::basegfx::B2DRectangle( double(i)/nNumStrips, 0.0,
double(i+1)/nNumStrips, 1.0) ) );
-
+
}
-
+
// rotate polygons, such that the strips are parallel to
// the given direction vector
const ::basegfx::B2DVector aUpVec(0.0, 1.0);
basegfx::B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection )));
-
+
// blow up clip polygon to slide size
aMatrix.scale( rSlideSize.getX(),
rSlideSize.getY() );
-
+
aClipPoly.transform( aMatrix );
-
+
return aClipPoly;
}
@@ -100,7 +100,7 @@ CombTransition::CombTransition(
{
}
-void CombTransition::renderComb( double t,
+void CombTransition::renderComb( double t,
const ViewEntry& rViewEntry ) const
{
const SlideBitmapSharedPtr& pEnteringBitmap = getEnteringBitmap(rViewEntry);
@@ -108,7 +108,7 @@ void CombTransition::renderComb( double t,
if( !pEnteringBitmap || !pCanvas_ )
return;
-
+
// calc bitmap offsets. The enter/leaving bitmaps are only
// as large as the actual slides. For scaled-down
// presentations, we have to move the left, top edge of
@@ -116,20 +116,20 @@ void CombTransition::renderComb( double t,
// given view transform. The aBitmapPosPixel local
// variable is already in device coordinate space
// (i.e. pixel).
-
+
// TODO(F2): Properly respect clip here. Might have to be transformed, too.
const basegfx::B2DHomMatrix viewTransform( rViewEntry.mpView->getTransformation() );
const basegfx::B2DPoint pageOrigin( viewTransform * basegfx::B2DPoint() );
-
+
// change transformation on cloned canvas to be in
// device pixel
cppcanvas::CanvasSharedPtr pCanvas( pCanvas_->clone() );
basegfx::B2DPoint p;
-
+
// TODO(Q2): Use basegfx bitmaps here
// TODO(F1): SlideBitmap is not fully portable between different canvases!
- const basegfx::B2DSize enteringSizePixel(
+ const basegfx::B2DSize enteringSizePixel(
getEnteringSlideSizePixel( rViewEntry.mpView) );
const basegfx::B2DVector aPushDirection = basegfx::B2DVector(
@@ -142,9 +142,9 @@ void CombTransition::renderComb( double t,
createClipPolygon( maPushDirectionUnit,
enteringSizePixel,
mnNumStripes, 1 ) );
-
+
SlideBitmapSharedPtr const & pLeavingBitmap = getLeavingBitmap(rViewEntry);
- if( pLeavingBitmap )
+ if( pLeavingBitmap )
{
// render odd strips:
pLeavingBitmap->clip( aClipPolygon1 );
@@ -152,7 +152,7 @@ void CombTransition::renderComb( double t,
p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) );
pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY()));
pLeavingBitmap->draw( pCanvas );
-
+
// render even strips:
pLeavingBitmap->clip( aClipPolygon2 );
// don't modify bitmap object (no move!):
@@ -160,17 +160,17 @@ void CombTransition::renderComb( double t,
pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY()));
pLeavingBitmap->draw( pCanvas );
}
-
+
// TODO(Q2): Use basegfx bitmaps here
// TODO(F1): SlideBitmap is not fully portable between different canvases!
-
+
// render odd strips:
pEnteringBitmap->clip( aClipPolygon1 );
// don't modify bitmap object (no move!):
p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) );
pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY()));
pEnteringBitmap->draw( pCanvas );
-
+
// render even strips:
pEnteringBitmap->clip( aClipPolygon2 );
// don't modify bitmap object (no move!):
@@ -183,9 +183,9 @@ bool CombTransition::operator()( double t )
{
std::for_each( beginViews(),
endViews(),
- boost::bind( &CombTransition::renderComb,
- this,
- t,
+ boost::bind( &CombTransition::renderComb,
+ this,
+ t,
_1 ));
getScreenUpdater().notifyUpdate();
diff --git a/slideshow/source/engine/transitions/combtransition.hxx b/slideshow/source/engine/transitions/combtransition.hxx
index 9016824d84da..e3c594763068 100644
--- a/slideshow/source/engine/transitions/combtransition.hxx
+++ b/slideshow/source/engine/transitions/combtransition.hxx
@@ -2,7 +2,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
@@ -36,7 +36,7 @@ namespace slideshow {
namespace internal {
/** Comb transition class.
-
+
This class provides a SlideChangeAnimation, showing a
comb-like effect (stripes of alternating push effects).
*/
@@ -44,7 +44,7 @@ class CombTransition : public SlideChangeBase
{
public:
/** Create the comb transition effect.
-
+
@param nNumStripes
Number of comb-like stripes to show in this effect
*/
@@ -56,14 +56,14 @@ public:
EventMultiplexer& rEventMultiplexer,
const ::basegfx::B2DVector& rPushDirection,
sal_Int32 nNumStripes );
-
+
// NumberAnimation
virtual bool operator()( double x );
-
+
private:
const ::basegfx::B2DVector maPushDirectionUnit;
sal_Int32 mnNumStripes;
-
+
void renderComb( double t, const ViewEntry& rViewEntry ) const;
};
diff --git a/slideshow/source/engine/transitions/doublediamondwipe.cxx b/slideshow/source/engine/transitions/doublediamondwipe.cxx
index 41b71493c2e3..30ea4cdaf2d5 100644
--- a/slideshow/source/engine/transitions/doublediamondwipe.cxx
+++ b/slideshow/source/engine/transitions/doublediamondwipe.cxx
@@ -2,7 +2,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
@@ -59,7 +59,7 @@ namespace internal {
poly.append( ::basegfx::B2DPoint( 0.5, 0.5 - b ) );
poly.setClosed(true);
res.append(poly);
-
+
return res;
}
diff --git a/slideshow/source/engine/transitions/doublediamondwipe.hxx b/slideshow/source/engine/transitions/doublediamondwipe.hxx
index ca8475130eba..16f1cddd179d 100644
--- a/slideshow/source/engine/transitions/doublediamondwipe.hxx
+++ b/slideshow/source/engine/transitions/doublediamondwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/ellipsewipe.cxx b/slideshow/source/engine/transitions/ellipsewipe.cxx
index 8d2a9f4c7885..3723889d494f 100644
--- a/slideshow/source/engine/transitions/ellipsewipe.cxx
+++ b/slideshow/source/engine/transitions/ellipsewipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/ellipsewipe.hxx b/slideshow/source/engine/transitions/ellipsewipe.hxx
index d1dcd7f3ea20..a4f9701d3e00 100644
--- a/slideshow/source/engine/transitions/ellipsewipe.hxx
+++ b/slideshow/source/engine/transitions/ellipsewipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx
index 3e884f918e33..d15a37e90d8d 100644
--- a/slideshow/source/engine/transitions/fanwipe.cxx
+++ b/slideshow/source/engine/transitions/fanwipe.cxx
@@ -2,7 +2,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
@@ -46,21 +46,21 @@ namespace internal {
::basegfx::B2DPolygon poly(
ClockWipe::calcCenteredClock(
t / ((m_center && m_single) ? 2.0 : 4.0) ) );
-
+
res.append( poly );
// flip on y-axis:
poly.transform(basegfx::tools::createScaleB2DHomMatrix(-1.0, 1.0));
poly.flip();
res.append( poly );
-
- if (m_center)
+
+ if (m_center)
{
res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5));
-
+
if (! m_single)
res.append( flipOnXAxis(res) );
}
- else
+ else
{
OSL_ASSERT( ! m_fanIn );
res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0));
diff --git a/slideshow/source/engine/transitions/fanwipe.hxx b/slideshow/source/engine/transitions/fanwipe.hxx
index 946bc5daab68..955cfe9ef4eb 100644
--- a/slideshow/source/engine/transitions/fanwipe.hxx
+++ b/slideshow/source/engine/transitions/fanwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx
index 73ffbbda17fd..a98faa670b18 100644
--- a/slideshow/source/engine/transitions/figurewipe.cxx
+++ b/slideshow/source/engine/transitions/figurewipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/figurewipe.hxx b/slideshow/source/engine/transitions/figurewipe.hxx
index d9448e5a59c0..366492b8ebad 100644
--- a/slideshow/source/engine/transitions/figurewipe.hxx
+++ b/slideshow/source/engine/transitions/figurewipe.hxx
@@ -2,7 +2,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
@@ -43,7 +43,7 @@ public:
static FigureWipe * createStarWipe( sal_Int32 nPoints );
static FigureWipe * createPentagonWipe();
static FigureWipe * createHexagonWipe();
-
+
virtual ::basegfx::B2DPolyPolygon operator () ( double t );
private:
FigureWipe( ::basegfx::B2DPolygon const & figure ) : m_figure(figure) {}
diff --git a/slideshow/source/engine/transitions/fourboxwipe.cxx b/slideshow/source/engine/transitions/fourboxwipe.cxx
index aaa7b2823a85..015a0507e069 100644
--- a/slideshow/source/engine/transitions/fourboxwipe.cxx
+++ b/slideshow/source/engine/transitions/fourboxwipe.cxx
@@ -2,7 +2,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
@@ -44,17 +44,17 @@ namespace internal {
{
::basegfx::B2DHomMatrix aTransform;
const double d = ::basegfx::pruneScaleValue( t / 2.0 );
- if (m_cornersOut)
+ if (m_cornersOut)
{
aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5);
aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25)
* aTransform;
- }
- else
+ }
+ else
{
aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5);
}
-
+
// top left:
::basegfx::B2DPolygon square( m_unitRect );
square.transform( aTransform );
@@ -76,7 +76,7 @@ namespace internal {
square4.transform( aTransform );
square4.flip(); // flip direction
res.append( square4 );
-
+
aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5);
res.transform( aTransform );
return res;
diff --git a/slideshow/source/engine/transitions/fourboxwipe.hxx b/slideshow/source/engine/transitions/fourboxwipe.hxx
index e4095c89ee27..2d0a066a582e 100644
--- a/slideshow/source/engine/transitions/fourboxwipe.hxx
+++ b/slideshow/source/engine/transitions/fourboxwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/iriswipe.cxx b/slideshow/source/engine/transitions/iriswipe.cxx
index 59aeff8df674..d554e1f7e68b 100644
--- a/slideshow/source/engine/transitions/iriswipe.cxx
+++ b/slideshow/source/engine/transitions/iriswipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/iriswipe.hxx b/slideshow/source/engine/transitions/iriswipe.hxx
index c0d73a52ac16..111c366075b3 100644
--- a/slideshow/source/engine/transitions/iriswipe.hxx
+++ b/slideshow/source/engine/transitions/iriswipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/parametricpolypolygon.hxx b/slideshow/source/engine/transitions/parametricpolypolygon.hxx
index 8f51de7c6440..5f6091edced9 100644
--- a/slideshow/source/engine/transitions/parametricpolypolygon.hxx
+++ b/slideshow/source/engine/transitions/parametricpolypolygon.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx b/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
index e67ddb5b477f..8022a012c8f2 100644
--- a/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
+++ b/slideshow/source/engine/transitions/parametricpolypolygonfactory.cxx
@@ -2,7 +2,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
@@ -69,7 +69,7 @@ namespace slideshow
{
using namespace ::com::sun::star::animations::TransitionType;
using namespace ::com::sun::star::animations::TransitionSubType;
-
+
switch (nType)
{
case BARWIPE:
@@ -287,7 +287,7 @@ namespace slideshow
return ParametricPolyPolygonSharedPtr( new ZigZagWipe(5) );
case BARNZIGZAGWIPE:
return ParametricPolyPolygonSharedPtr( new BarnZigZagWipe(5) );
-
+
case BOWTIEWIPE:
case BARNVEEWIPE:
case EYEWIPE:
@@ -298,15 +298,15 @@ namespace slideshow
// for now, map to barwipe transition
return ParametricPolyPolygonSharedPtr(
new BarWipePolyPolygon );
-
+
default:
case PUSHWIPE:
case SLIDEWIPE:
case FADE:
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"createShapeClipPolyPolygonAnimation(): Transition type mismatch" );
}
-
+
return ParametricPolyPolygonSharedPtr();
}
}
diff --git a/slideshow/source/engine/transitions/parametricpolypolygonfactory.hxx b/slideshow/source/engine/transitions/parametricpolypolygonfactory.hxx
index 0b87b3d4e1e2..979c35bfb6c0 100644
--- a/slideshow/source/engine/transitions/parametricpolypolygonfactory.hxx
+++ b/slideshow/source/engine/transitions/parametricpolypolygonfactory.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/pinwheelwipe.cxx b/slideshow/source/engine/transitions/pinwheelwipe.cxx
index 847189eb9004..78d67b23a580 100644
--- a/slideshow/source/engine/transitions/pinwheelwipe.cxx
+++ b/slideshow/source/engine/transitions/pinwheelwipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/pinwheelwipe.hxx b/slideshow/source/engine/transitions/pinwheelwipe.hxx
index e3347b5298ee..ec60813e5fd2 100644
--- a/slideshow/source/engine/transitions/pinwheelwipe.hxx
+++ b/slideshow/source/engine/transitions/pinwheelwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx
index 424d53093d09..4fdf9fdba0db 100644
--- a/slideshow/source/engine/transitions/randomwipe.cxx
+++ b/slideshow/source/engine/transitions/randomwipe.cxx
@@ -2,7 +2,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
@@ -67,7 +67,7 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars )
aTransform.scale( pedge, pedge );
}
m_rect.transform( aTransform );
-
+
// mix up:
for ( sal_Int32 pos1 = nElements ; pos1-- ; )
{
diff --git a/slideshow/source/engine/transitions/randomwipe.hxx b/slideshow/source/engine/transitions/randomwipe.hxx
index bb8f11cc5da0..473310e638c9 100644
--- a/slideshow/source/engine/transitions/randomwipe.hxx
+++ b/slideshow/source/engine/transitions/randomwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/shapetransitionfactory.cxx b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
index 6d2a43ae7119..755ef8acbca2 100644
--- a/slideshow/source/engine/transitions/shapetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/shapetransitionfactory.cxx
@@ -2,7 +2,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
@@ -74,28 +74,28 @@ public:
bool bModeIn );
~ClippingAnimation();
-
+
// Animation interface
// -------------------
virtual void prefetch( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer );
- virtual void start( const AnimatableShapeSharedPtr& rShape,
+ virtual void start( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer );
virtual void end();
-
+
// NumberAnimation interface
// -----------------------
virtual bool operator()( double nValue );
virtual double getUnderlyingValue() const;
-
+
private:
void end_();
AnimatableShapeSharedPtr mpShape;
ShapeAttributeLayerSharedPtr mpAttrLayer;
ShapeManagerSharedPtr mpShapeManager;
- ClippingFunctor maClippingFunctor;
- bool mbSpriteActive;
+ ClippingFunctor maClippingFunctor;
+ bool mbSpriteActive;
};
ClippingAnimation::ClippingAnimation(
@@ -107,9 +107,9 @@ ClippingAnimation::ClippingAnimation(
mpShape(),
mpAttrLayer(),
mpShapeManager( rShapeManager ),
- maClippingFunctor( rPolygon,
- rTransitionInfo,
- bDirectionForward,
+ maClippingFunctor( rPolygon,
+ rTransitionInfo,
+ bDirectionForward,
bModeIn ),
mbSpriteActive(false)
{
@@ -124,7 +124,7 @@ ClippingAnimation::~ClippingAnimation()
{
end_();
}
- catch (uno::Exception &)
+ catch (uno::Exception &)
{
OSL_ENSURE( false, rtl::OUStringToOString(
comphelper::anyToString(
@@ -138,8 +138,8 @@ void ClippingAnimation::prefetch( const AnimatableShapeSharedPtr&,
{
}
-void ClippingAnimation::start( const AnimatableShapeSharedPtr& rShape,
- const ShapeAttributeLayerSharedPtr& rAttrLayer )
+void ClippingAnimation::start( const AnimatableShapeSharedPtr& rShape,
+ const ShapeAttributeLayerSharedPtr& rAttrLayer )
{
OSL_ENSURE( !mpShape,
"ClippingAnimation::start(): Shape already set" );
@@ -186,14 +186,14 @@ bool ClippingAnimation::operator()( double nValue )
ENSURE_OR_RETURN_FALSE(
mpAttrLayer && mpShape,
"ClippingAnimation::operator(): Invalid ShapeAttributeLayer" );
-
+
// set new clip
mpAttrLayer->setClip( maClippingFunctor( nValue,
mpShape->getDomBounds().getRange() ) );
-
+
if( mpShape->isContentChanged() )
mpShapeManager->notifyShapeUpdate( mpShape );
-
+
return true;
}
@@ -202,8 +202,8 @@ double ClippingAnimation::getUnderlyingValue() const
ENSURE_OR_THROW(
mpAttrLayer,
"ClippingAnimation::getUnderlyingValue(): Invalid ShapeAttributeLayer" );
-
- return 0.0; // though this should be used in concert with
+
+ return 0.0; // though this should be used in concert with
// ActivitiesFactory::createSimpleActivity, better
// explicitely name our start value.
// Permissible range for operator() above is [0,1]
@@ -219,30 +219,30 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
const ::basegfx::B2DVector& rSlideSize,
uno::Reference< animations::XTransitionFilter > const& xTransition )
{
- return createShapeTransition( rParms,
- rShape,
- rShapeManager,
+ return createShapeTransition( rParms,
+ rShape,
+ rShapeManager,
rSlideSize,
- xTransition,
- xTransition->getTransition(),
+ xTransition,
+ xTransition->getTransition(),
xTransition->getSubtype() );
}
AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
- const ActivitiesFactory::CommonParameters& rParms,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ const ActivitiesFactory::CommonParameters& rParms,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XTransitionFilter > const& xTransition,
- sal_Int16 nType,
- sal_Int16 nSubType )
+ sal_Int16 nType,
+ sal_Int16 nSubType )
{
ENSURE_OR_THROW(
xTransition.is(),
"TransitionFactory::createShapeTransition(): Invalid XTransition" );
-
- const TransitionInfo* pTransitionInfo(
+
+ const TransitionInfo* pTransitionInfo(
getTransitionInfo( nType, nSubType ) );
AnimationActivitySharedPtr pGeneratedActivity;
@@ -252,24 +252,24 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
{
default:
case TransitionInfo::TRANSITION_INVALID:
- OSL_ENSURE( false,
+ OSL_ENSURE( false,
"TransitionFactory::createShapeTransition(): Invalid transition type. "
"Don't ask me for a 0 TransitionType, have no XTransitionFilter node instead!" );
return AnimationActivitySharedPtr();
-
+
case TransitionInfo::TRANSITION_CLIP_POLYPOLYGON:
{
// generate parametric poly-polygon
- ParametricPolyPolygonSharedPtr pPoly(
- ParametricPolyPolygonFactory::createClipPolyPolygon(
+ ParametricPolyPolygonSharedPtr pPoly(
+ ParametricPolyPolygonFactory::createClipPolyPolygon(
nType, nSubType ) );
-
+
// create a clip activity from that
pGeneratedActivity = ActivitiesFactory::createSimpleActivity(
rParms,
- NumberAnimationSharedPtr(
- new ClippingAnimation(
+ NumberAnimationSharedPtr(
+ new ClippingAnimation(
pPoly,
rShapeManager,
*pTransitionInfo,
@@ -278,7 +278,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
true );
}
break;
-
+
case TransitionInfo::TRANSITION_SPECIAL:
{
switch( nType )
@@ -289,7 +289,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
// TransitionFactoryTable
const TransitionInfo* pRandomTransitionInfo( getRandomTransitionInfo() );
-
+
ENSURE_OR_THROW( pRandomTransitionInfo != NULL,
"TransitionFactory::createShapeTransition(): Got invalid random transition info" );
@@ -306,12 +306,12 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
pRandomTransitionInfo->mnTransitionSubType );
}
break;
-
+
// TODO(F3): Implement slidewipe for shape
case animations::TransitionType::SLIDEWIPE:
{
sal_Int16 nBarWipeSubType(0);
- bool bDirectionForward(true);
+ bool bDirectionForward(true);
// map slidewipe to BARWIPE, for now
switch( nSubType )
@@ -343,19 +343,19 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
}
// generate parametric poly-polygon
- ParametricPolyPolygonSharedPtr pPoly(
- ParametricPolyPolygonFactory::createClipPolyPolygon(
- animations::TransitionType::BARWIPE,
+ ParametricPolyPolygonSharedPtr pPoly(
+ ParametricPolyPolygonFactory::createClipPolyPolygon(
+ animations::TransitionType::BARWIPE,
nBarWipeSubType ) );
-
+
// create a clip activity from that
pGeneratedActivity = ActivitiesFactory::createSimpleActivity(
rParms,
- NumberAnimationSharedPtr(
- new ClippingAnimation(
+ NumberAnimationSharedPtr(
+ new ClippingAnimation(
pPoly,
rShapeManager,
- *getTransitionInfo( animations::TransitionType::BARWIPE,
+ *getTransitionInfo( animations::TransitionType::BARWIPE,
nBarWipeSubType ),
bDirectionForward,
xTransition->getMode() ) ),
@@ -372,10 +372,10 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
// for now, map all to fade effect
pGeneratedActivity = ActivitiesFactory::createSimpleActivity(
rParms,
- AnimationFactory::createNumberPropertyAnimation(
- ::rtl::OUString(
+ AnimationFactory::createNumberPropertyAnimation(
+ ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("Opacity") ),
- rShape,
+ rShape,
rShapeManager,
rSlideSize ),
xTransition->getMode() );
@@ -389,7 +389,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
if( !pGeneratedActivity )
{
- // No animation generated, maybe no table entry for given
+ // No animation generated, maybe no table entry for given
// transition?
OSL_TRACE(
"TransitionFactory::createShapeTransition(): Unknown type/subtype (%d/%d) "
@@ -401,7 +401,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
"TransitionFactory::createShapeTransition(): Unknown type/subtype "
"combination encountered" );
}
-
+
return pGeneratedActivity;
}
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index 44a2c73504c6..eeef5d9efbdc 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -2,7 +2,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
@@ -55,7 +55,7 @@ SlideChangeBase::SlideChangeBase( boost::optional<SlideSharedPtr> const & leavin
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
EventMultiplexer& rEventMultiplexer,
- bool bCreateLeavingSprites,
+ bool bCreateLeavingSprites,
bool bCreateEnteringSprites ) :
mpSoundPlayer( pSoundPlayer ),
mrEventMultiplexer(rEventMultiplexer),
@@ -78,7 +78,7 @@ SlideChangeBase::SlideChangeBase( boost::optional<SlideSharedPtr> const & leavin
SlideBitmapSharedPtr SlideChangeBase::getLeavingBitmap( const ViewEntry& rViewEntry ) const
{
if( !rViewEntry.mpLeavingBitmap )
- rViewEntry.mpLeavingBitmap = createBitmap(rViewEntry.mpView,
+ rViewEntry.mpLeavingBitmap = createBitmap(rViewEntry.mpView,
maLeavingSlide);
return rViewEntry.mpLeavingBitmap;
@@ -108,25 +108,25 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr&
// sprite to black.
// create empty, black-filled bitmap
- const basegfx::B2ISize slideSizePixel(
+ const basegfx::B2ISize slideSizePixel(
getSlideSizePixel( mpEnteringSlide->getSlideSize(),
- rView ));
+ rView ));
cppcanvas::CanvasSharedPtr pCanvas( rView->getCanvas() );
// create a bitmap of appropriate size
- cppcanvas::BitmapSharedPtr pBitmap(
- cppcanvas::BaseGfxFactory::getInstance().createBitmap(
- pCanvas,
+ cppcanvas::BitmapSharedPtr pBitmap(
+ cppcanvas::BaseGfxFactory::getInstance().createBitmap(
+ pCanvas,
slideSizePixel ) );
-
+
ENSURE_OR_THROW(
pBitmap,
"SlideChangeBase::createBitmap(): Cannot create page bitmap" );
-
+
cppcanvas::BitmapCanvasSharedPtr pBitmapCanvas(
pBitmap->getBitmapCanvas() );
-
+
ENSURE_OR_THROW( pBitmapCanvas,
"SlideChangeBase::createBitmap(): "
"Cannot create page bitmap canvas" );
@@ -140,7 +140,7 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr&
slideSizePixel.getX(),
slideSizePixel.getY() ),
0x000000FFU );
-
+
pRet.reset( new SlideBitmap( pBitmap ));
}
else
@@ -153,13 +153,13 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr&
::basegfx::B2ISize SlideChangeBase::getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const
{
- return getSlideSizePixel( mpEnteringSlide->getSlideSize(),
+ return getSlideSizePixel( mpEnteringSlide->getSlideSize(),
pView );
}
::basegfx::B2ISize SlideChangeBase::getLeavingSlideSizePixel( const UnoViewSharedPtr& pView ) const
{
- return getSlideSizePixel( (*maLeavingSlide)->getSlideSize(),
+ return getSlideSizePixel( (*maLeavingSlide)->getSlideSize(),
pView );
}
@@ -182,7 +182,7 @@ void SlideChangeBase::renderBitmap(
// render at output position, don't modify bitmap object (no move!):
const basegfx::B2DHomMatrix transform(basegfx::tools::createTranslateB2DHomMatrix(
pageOrigin.getX(), pageOrigin.getY()));
-
+
pDevicePixelCanvas->setTransformation( transform );
pSlideBitmap->draw( pDevicePixelCanvas );
}
@@ -276,10 +276,10 @@ bool SlideChangeBase::operator()( double nValue )
{
if( mbFinished )
return false;
-
- const std::size_t nEntries( maViewData.size() );
+
+ const std::size_t nEntries( maViewData.size() );
bool bSpritesVisible( mbSpritesVisible );
-
+
for( ::std::size_t i=0; i<nEntries; ++i )
{
// calc sprite offsets. The enter/leaving bitmaps are only
@@ -294,7 +294,7 @@ bool SlideChangeBase::operator()( double nValue )
const ::cppcanvas::CanvasSharedPtr& rCanvas( rViewEntry.mpView->getCanvas() );
::cppcanvas::CustomSpriteSharedPtr& rInSprite( rViewEntry.mpInSprite );
::cppcanvas::CustomSpriteSharedPtr& rOutSprite( rViewEntry.mpOutSprite );
-
+
// TODO(F2): Properly respect clip here.
// Might have to be transformed, too.
@@ -302,14 +302,14 @@ bool SlideChangeBase::operator()( double nValue )
rViewEntry.mpView->getTransformation() );
const ::basegfx::B2DPoint aSpritePosPixel(
aViewTransform * ::basegfx::B2DPoint() );
-
- // move sprite to final output position, in
+
+ // move sprite to final output position, in
// device coordinates
if( rOutSprite )
rOutSprite->movePixel( aSpritePosPixel );
if( rInSprite )
rInSprite->movePixel( aSpritePosPixel );
-
+
if( !mbSpritesVisible )
{
if( rOutSprite )
@@ -324,14 +324,14 @@ bool SlideChangeBase::operator()( double nValue )
// TODO(F1): SlideBitmap is not fully portable
// between different canvases!
-
+
// render the content
OSL_ASSERT( getLeavingBitmap( rViewEntry ) );
if( getLeavingBitmap( rViewEntry ) )
getLeavingBitmap( rViewEntry )->draw( pOutContentCanvas );
}
}
-
+
if( rInSprite )
{
// only render once: clipping is done
@@ -344,20 +344,20 @@ bool SlideChangeBase::operator()( double nValue )
// TODO(F1): SlideBitmap is not fully portable
// between different canvases!
-
+
// render the content
getEnteringBitmap( rViewEntry )->draw( pInContentCanvas );
}
}
}
-
+
if( rOutSprite )
performOut( rOutSprite, rViewEntry, rCanvas, nValue );
if( rInSprite )
performIn( rInSprite, rViewEntry, rCanvas, nValue );
-
+
// finishing deeds for first run.
- if( !mbSpritesVisible)
+ if( !mbSpritesVisible)
{
// enable sprites:
if( rOutSprite )
@@ -367,10 +367,10 @@ bool SlideChangeBase::operator()( double nValue )
bSpritesVisible = true;
}
} // for_each( sprite )
-
+
mbSpritesVisible = bSpritesVisible;
mrScreenUpdater.notifyUpdate();
-
+
return true;
}
@@ -392,7 +392,7 @@ void SlideChangeBase::performOut(
double SlideChangeBase::getUnderlyingValue() const
{
- return 0.0; // though this should be used in concert with
+ return 0.0; // though this should be used in concert with
// ActivitiesFactory::createSimpleActivity, better
// explicitely name our start value.
// Permissible range for operator() above is [0,1]
@@ -421,7 +421,7 @@ void SlideChangeBase::viewRemoved( const UnoViewSharedPtr& rView )
// erase corresponding entry from maViewData
maViewData.erase(
std::remove_if(
- maViewData.begin(),
+ maViewData.begin(),
maViewData.end(),
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
@@ -440,14 +440,14 @@ void SlideChangeBase::viewChanged( const UnoViewSharedPtr& rView )
// find entry corresponding to modified view
ViewsVecT::iterator aModifiedEntry(
std::find_if(
- maViewData.begin(),
+ maViewData.begin(),
maViewData.end(),
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
// select view:
boost::bind( &ViewEntry::getView, _1 ) )));
-
+
OSL_ASSERT( aModifiedEntry != maViewData.end() );
if( aModifiedEntry == maViewData.end() )
return;
@@ -472,13 +472,13 @@ void SlideChangeBase::viewsChanged()
// resize)
clearViewEntry( *aIter );
addSprites( *aIter );
-
+
++aIter;
}
}
cppcanvas::CustomSpriteSharedPtr SlideChangeBase::createSprite(
- UnoViewSharedPtr const & pView,
+ UnoViewSharedPtr const & pView,
basegfx::B2DSize const & rSpriteSize,
double nPrio ) const
{
@@ -487,7 +487,7 @@ cppcanvas::CustomSpriteSharedPtr SlideChangeBase::createSprite(
pView->createSprite( rSpriteSize,
nPrio ));
- // alpha default is 0.0, which seems to be
+ // alpha default is 0.0, which seems to be
// a bad idea when viewing content...
pSprite->setAlpha( 1.0 );
if (mbSpritesVisible)
@@ -504,28 +504,28 @@ void SlideChangeBase::addSprites( ViewEntry& rEntry )
const basegfx::B2ISize leavingSlideSizePixel(
getLeavingBitmap( rEntry )->getSize() );
- rEntry.mpOutSprite = createSprite( rEntry.mpView,
- leavingSlideSizePixel,
+ rEntry.mpOutSprite = createSprite( rEntry.mpView,
+ leavingSlideSizePixel,
100 );
}
-
- if( mbCreateEnteringSprites )
+
+ if( mbCreateEnteringSprites )
{
// create entering sprite:
const basegfx::B2ISize enteringSlideSizePixel(
getSlideSizePixel( mpEnteringSlide->getSlideSize(),
rEntry.mpView ));
- rEntry.mpInSprite = createSprite( rEntry.mpView,
- enteringSlideSizePixel,
+ rEntry.mpInSprite = createSprite( rEntry.mpView,
+ enteringSlideSizePixel,
101 );
}
}
void SlideChangeBase::clearViewEntry( ViewEntry& rEntry )
{
- // clear stale info (both bitmaps and sprites prolly need a
- // resize)
+ // clear stale info (both bitmaps and sprites prolly need a
+ // resize)
rEntry.mpEnteringBitmap.reset();
rEntry.mpLeavingBitmap.reset();
rEntry.mpInSprite.reset();
diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx
index 98c437671722..bed8630e5327 100644
--- a/slideshow/source/engine/transitions/slidechangebase.hxx
+++ b/slideshow/source/engine/transitions/slidechangebase.hxx
@@ -2,7 +2,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
@@ -43,8 +43,8 @@
#include <boost/optional.hpp>
namespace cppcanvas
-{
- class Canvas;
+{
+ class Canvas;
class CustomSprite;
}
@@ -52,7 +52,7 @@ namespace slideshow {
namespace internal {
/** Base class for all slide change effects.
-
+
This class provides the basic sprite and view handling
functionality. Derived classes should normally only need to
implement the perform() method.
@@ -66,20 +66,20 @@ public:
// NumberAnimation
virtual bool operator()( double x );
virtual double getUnderlyingValue() const;
-
+
// Animation
virtual void prefetch( const AnimatableShapeSharedPtr&,
const ShapeAttributeLayerSharedPtr& );
virtual void start( const AnimatableShapeSharedPtr&,
const ShapeAttributeLayerSharedPtr& );
- virtual void end();
+ virtual void end();
// ViewEventHandler
virtual void viewAdded( const UnoViewSharedPtr& rView );
virtual void viewRemoved( const UnoViewSharedPtr& rView );
virtual void viewChanged( const UnoViewSharedPtr& rView );
virtual void viewsChanged();
-
+
protected:
/** Create a new SlideChanger, for the given leaving and
entering slides.
@@ -91,7 +91,7 @@ protected:
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
EventMultiplexer& rEventMultiplexer,
- bool bCreateLeavingSprites = true,
+ bool bCreateLeavingSprites = true,
bool bCreateEnteringSprites = true );
/// Info on a per-view basis
@@ -99,8 +99,8 @@ protected:
{
ViewEntry() {}
- explicit ViewEntry( const UnoViewSharedPtr& rView ) :
- mpView( rView )
+ explicit ViewEntry( const UnoViewSharedPtr& rView ) :
+ mpView( rView )
{
}
@@ -126,24 +126,24 @@ protected:
SlideBitmapSharedPtr getLeavingBitmap( const ViewEntry& rViewEntry ) const;
SlideBitmapSharedPtr getEnteringBitmap( const ViewEntry& rViewEntry ) const;
-
+
SlideBitmapSharedPtr createBitmap( const UnoViewSharedPtr& pView,
const boost::optional<SlideSharedPtr>& rSlide_ ) const;
-
+
::basegfx::B2ISize getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const;
::basegfx::B2ISize getLeavingSlideSizePixel( const UnoViewSharedPtr& pView ) const;
void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap,
- boost::shared_ptr<cppcanvas::Canvas> const& pCanvas );
-
+ boost::shared_ptr<cppcanvas::Canvas> const& pCanvas );
+
/** Called on derived classes to implement actual slide change.
-
+
This method is called with the sprite of the slide coming 'in'
-
+
@param rSprite
Current sprite to operate on. This is the sprite of the
'entering' slide
-
+
@param t
Current parameter value
*/
@@ -152,15 +152,15 @@ protected:
const ViewEntry& rViewEntry,
const boost::shared_ptr<cppcanvas::Canvas>& rDestinationCanvas,
double t );
-
+
/** Called on derived classes to implement actual slide change.
-
+
This method is called with the sprite of the slide moving 'out'
-
+
@param rSprite
Current sprite to operate on. This is the sprite of the
'leaving' slide
-
+
@param t
Current parameter value
*/
@@ -173,7 +173,7 @@ protected:
ScreenUpdater& getScreenUpdater() const { return mrScreenUpdater; }
private:
-
+
boost::shared_ptr<cppcanvas::CustomSprite> createSprite(
UnoViewSharedPtr const & pView,
::basegfx::B2DSize const & rSpriteSize,
@@ -186,13 +186,13 @@ private:
ViewsVecT::const_iterator lookupView( UnoViewSharedPtr const & pView ) const;
SoundPlayerSharedPtr mpSoundPlayer;
-
+
EventMultiplexer& mrEventMultiplexer;
ScreenUpdater& mrScreenUpdater;
::boost::optional<SlideSharedPtr> maLeavingSlide;
SlideSharedPtr mpEnteringSlide;
-
+
ViewsVecT maViewData;
const UnoViewContainer& mrViewContainer;
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 76996a6098c5..0de2f471590a 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -2,7 +2,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
@@ -85,7 +85,7 @@ void fillPage( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
const ::cppcanvas::CanvasSharedPtr pDevicePixelCanvas(
rDestinationCanvas->clone() );
pDevicePixelCanvas->setTransformation( ::basegfx::B2DHomMatrix() );
-
+
// TODO(F2): Properly respect clip here.
// Might have to be transformed, too.
const ::basegfx::B2DHomMatrix aViewTransform(
@@ -139,7 +139,7 @@ public:
ScreenUpdater& rScreenUpdater,
const uno::Reference<
presentation::XTransitionFactory>& xFactory,
- const SoundPlayerSharedPtr& pSoundPlayer,
+ const SoundPlayerSharedPtr& pSoundPlayer,
EventMultiplexer& rEventMultiplexer) :
SlideChangeBase( leavingSlide_,
pEnteringSlide,
@@ -185,7 +185,7 @@ public:
bool addTransition( const UnoViewSharedPtr& rView )
{
uno::Reference<presentation::XTransition> rTransition = mxFactory->createTransition(
- mnTransitionType,
+ mnTransitionType,
mnTransitionSubType,
rView->getUnoView(),
getLeavingBitmap(ViewEntry(rView))->getXBitmap(),
@@ -198,7 +198,7 @@ public:
return true;
}
-
+
virtual bool operator()( double t )
{
std::for_each(maTransitions.begin(),
@@ -295,7 +295,7 @@ public:
}
}
-private:
+private:
// One transition object per view
std::vector< TransitionViewPair* > maTransitions;
@@ -338,19 +338,19 @@ public:
bDirectionForward,
true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
private:
ClippingFunctor maClippingFunctor;
};
@@ -366,8 +366,8 @@ void ClippedSlideChange::performIn(
// that, getEnteringSizePixel() _guarantees_ to cover the whole
// slide bitmap. There's a catch, though: this removes any effect
// of the view transformation (e.g. rotation) from the transition.
- rSprite->setClipPixel(
- maClippingFunctor( t,
+ rSprite->setClipPixel(
+ maClippingFunctor( t,
getEnteringSlideSizePixel(rViewEntry.mpView) ) );
}
@@ -404,19 +404,19 @@ public:
maFadeColor( rFadeColor ),
mbFirstTurn( true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
private:
const boost::optional< RGBColor > maFadeColor;
bool mbFirstTurn;
@@ -431,7 +431,7 @@ void FadingSlideChange::performIn(
ENSURE_OR_THROW(
rSprite,
"FadingSlideChange::performIn(): Invalid sprite" );
-
+
if( maFadeColor )
// After half of the active time, fade in new slide
rSprite->setAlpha( t > 0.5 ? 2.0*(t-0.5) : 0.0 );
@@ -452,21 +452,21 @@ void FadingSlideChange::performOut(
ENSURE_OR_THROW(
rDestinationCanvas,
"FadingSlideChange::performOut(): Invalid dest canvas" );
-
+
// only needed for color fades
if( maFadeColor )
{
if( mbFirstTurn )
{
mbFirstTurn = false;
-
+
// clear page to given fade color. 'Leaving' slide is
// painted atop of that, but slowly fading out.
fillPage( rDestinationCanvas,
getEnteringSlideSizePixel( rViewEntry.mpView ),
*maFadeColor );
}
-
+
// Until half of the active time, fade out old
// slide. After half of the active time, old slide
// will be invisible.
@@ -561,23 +561,23 @@ class MovingSlideChange : public SlideChangeBase
{
/// Direction vector for leaving slide,
const ::basegfx::B2DVector maLeavingDirection;
-
+
/// Direction vector for entering slide,
const ::basegfx::B2DVector maEnteringDirection;
-
+
bool mbFirstPerformCall;
-
+
public:
/** Create a new SlideChanger, for the given entering slide
bitmaps, which performes a moving slide change effect
-
+
@param rLeavingDirection
Direction vector. The move is performed along this
direction vector, starting at a position where the leaving
slide is fully visible, and ending at a position where the
leaving slide is just not visible. The vector must have
unit length.
-
+
@param rEnteringDirection
Direction vector. The move is performed along this
direction vector, starting at a position where the
@@ -611,13 +611,13 @@ public:
maEnteringDirection( rEnteringDirection ),
mbFirstPerformCall( true )
{}
-
+
virtual void performIn(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
double t );
-
+
virtual void performOut(
const ::cppcanvas::CustomSpriteSharedPtr& rSprite,
const ViewEntry& rViewEntry,
@@ -632,20 +632,20 @@ void MovingSlideChange::performIn(
double t )
{
// intro sprite moves:
-
+
ENSURE_OR_THROW(
rSprite,
"MovingSlideChange::performIn(): Invalid sprite" );
ENSURE_OR_THROW(
rDestinationCanvas,
"MovingSlideChange::performIn(): Invalid dest canvas" );
-
- if (mbFirstPerformCall && maLeavingDirection.equalZero())
+
+ if (mbFirstPerformCall && maLeavingDirection.equalZero())
{
mbFirstPerformCall = false;
renderBitmap( getLeavingBitmap(rViewEntry), rDestinationCanvas );
}
-
+
// TODO(F1): This does not account for non-translational
// transformations! If the canvas is rotated, we still
// move the sprite unrotated (which might or might not
@@ -654,12 +654,12 @@ void MovingSlideChange::performIn(
rDestinationCanvas->getTransformation() );
const basegfx::B2DPoint aPageOrigin(
aViewTransform * basegfx::B2DPoint() );
-
+
// move sprite
rSprite->movePixel(
aPageOrigin +
- ((t - 1.0) *
- ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
+ ((t - 1.0) *
+ ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
maEnteringDirection) );
}
@@ -670,20 +670,20 @@ void MovingSlideChange::performOut(
double t )
{
// outro sprite moves:
-
+
ENSURE_OR_THROW(
rSprite,
"MovingSlideChange::performOut(): Invalid sprite" );
ENSURE_OR_THROW(
rDestinationCanvas,
"MovingSlideChange::performOut(): Invalid dest canvas" );
-
- if (mbFirstPerformCall && maEnteringDirection.equalZero())
+
+ if (mbFirstPerformCall && maEnteringDirection.equalZero())
{
mbFirstPerformCall = false;
renderBitmap( getEnteringBitmap(rViewEntry), rDestinationCanvas );
}
-
+
// TODO(F1): This does not account for non-translational
// transformations! If the canvas is rotated, we still
// move the sprite unrotated (which might or might not
@@ -692,11 +692,11 @@ void MovingSlideChange::performOut(
rDestinationCanvas->getTransformation() );
const basegfx::B2DPoint aPageOrigin(
aViewTransform * basegfx::B2DPoint() );
-
+
// move sprite
rSprite->movePixel(
- aPageOrigin + (t *
- ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
+ aPageOrigin + (t *
+ ::basegfx::B2DSize( getEnteringSlideSizePixel(rViewEntry.mpView) ) *
maLeavingDirection) );
}
@@ -722,7 +722,7 @@ NumberAnimationSharedPtr createPushWipeTransition(
// wipes.
leavingSlide = leavingSlide_;
}
-
+
// setup direction vector
bool bComb( false );
::basegfx::B2DVector aDirection;
@@ -730,55 +730,55 @@ NumberAnimationSharedPtr createPushWipeTransition(
{
default:
OSL_ENSURE(
- false,
+ false,
"createPushWipeTransition(): Unexpected transition "
"subtype for animations::TransitionType::PUSHWIPE "
"transitions" );
return NumberAnimationSharedPtr();
-
+
case animations::TransitionSubType::FROMTOP:
aDirection = ::basegfx::B2DVector( 0.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOM:
aDirection = ::basegfx::B2DVector( 0.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMLEFT:
aDirection = ::basegfx::B2DVector( 1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMLEFT:
aDirection = ::basegfx::B2DVector( 1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPRIGHT:
aDirection = ::basegfx::B2DVector( -1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPLEFT:
aDirection = ::basegfx::B2DVector( 1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::COMBHORIZONTAL:
aDirection = ::basegfx::B2DVector( 1.0, 0.0 );
bComb = true;
break;
-
+
case animations::TransitionSubType::COMBVERTICAL:
aDirection = ::basegfx::B2DVector( 0.0, 1.0 );
bComb = true;
break;
}
-
+
if( bComb )
{
return NumberAnimationSharedPtr(
@@ -788,19 +788,19 @@ NumberAnimationSharedPtr createPushWipeTransition(
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
- aDirection,
+ aDirection,
24 /* comb with 12 stripes */ ));
}
else
{
- return NumberAnimationSharedPtr(
+ return NumberAnimationSharedPtr(
new MovingSlideChange( leavingSlide,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
rScreenUpdater,
rEventMultiplexer,
- aDirection,
+ aDirection,
aDirection ));
}
}
@@ -822,53 +822,53 @@ NumberAnimationSharedPtr createSlideWipeTransition(
{
default:
OSL_ENSURE(
- false,
+ false,
"createSlideWipeTransition(): Unexpected transition "
"subtype for animations::TransitionType::SLIDEWIPE "
"transitions" );
return NumberAnimationSharedPtr();
-
+
case animations::TransitionSubType::FROMTOP:
aInDirection = ::basegfx::B2DVector( 0.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, 0.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOM:
aInDirection = ::basegfx::B2DVector( 0.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMBOTTOMLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, -1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPRIGHT:
aInDirection = ::basegfx::B2DVector( -1.0, 1.0 );
break;
-
+
case animations::TransitionSubType::FROMTOPLEFT:
aInDirection = ::basegfx::B2DVector( 1.0, 1.0 );
break;
}
-
+
if( bTransitionDirection )
{
// normal, 'forward' slide wipe effect. Since the old
// content is still on screen (and does not move), we omit
// the 'leaving' slide.
// =======================================================
-
- return NumberAnimationSharedPtr(
+
+ return NumberAnimationSharedPtr(
new MovingSlideChange(
boost::optional<SlideSharedPtr>() /* no slide */,
pEnteringSlide,
@@ -885,8 +885,8 @@ NumberAnimationSharedPtr createSlideWipeTransition(
// means, that the new slide is in the back, statically,
// and the old one is moving off in the foreground.
// =======================================================
-
- return NumberAnimationSharedPtr(
+
+ return NumberAnimationSharedPtr(
new MovingSlideChange( leavingSlide,
pEnteringSlide,
pSoundPlayer,
@@ -907,10 +907,10 @@ NumberAnimationSharedPtr createPluginTransition(
ScreenUpdater& rScreenUpdater,
const uno::Reference<
presentation::XTransitionFactory>& xFactory,
- const SoundPlayerSharedPtr& pSoundPlayer,
+ const SoundPlayerSharedPtr& pSoundPlayer,
EventMultiplexer& rEventMultiplexer)
{
- PluginSlideChange* pTransition =
+ PluginSlideChange* pTransition =
new PluginSlideChange(
nTransitionType,
nTransitionSubType,
@@ -956,12 +956,12 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
}
return NumberAnimationSharedPtr();
}
-
+
ENSURE_OR_THROW(
pEnteringSlide,
"TransitionFactory::createSlideTransition(): Invalid entering slide" );
-
- if( xOptionalFactory.is() &&
+
+ if( xOptionalFactory.is() &&
xOptionalFactory->hasTransition(nTransitionType, nTransitionSubType) )
{
// #i82460# - optional plugin factory claims this transition. delegate.
@@ -981,7 +981,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
return pTransition;
}
- const TransitionInfo* pTransitionInfo(
+ const TransitionInfo* pTransitionInfo(
getTransitionInfo( nTransitionType, nTransitionSubType ) );
if( pTransitionInfo != NULL )
@@ -997,12 +997,12 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
nTransitionSubType );
return NumberAnimationSharedPtr();
-
+
case TransitionInfo::TRANSITION_CLIP_POLYPOLYGON:
{
// generate parametric poly-polygon
- ParametricPolyPolygonSharedPtr pPoly(
- ParametricPolyPolygonFactory::createClipPolyPolygon(
+ ParametricPolyPolygonSharedPtr pPoly(
+ ParametricPolyPolygonFactory::createClipPolyPolygon(
nTransitionType, nTransitionSubType ) );
// create a clip transition from that
@@ -1016,14 +1016,14 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
bTransitionDirection,
pSoundPlayer ));
}
-
+
case TransitionInfo::TRANSITION_SPECIAL:
{
switch( nTransitionType )
{
default:
OSL_ENSURE(
- false,
+ false,
"TransitionFactory::createSlideTransition(): "
"Unexpected transition type for "
"TRANSITION_SPECIAL transitions" );
@@ -1036,7 +1036,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
const TransitionInfo* pRandomTransitionInfo(
getRandomTransitionInfo() );
-
+
ENSURE_OR_THROW(
pRandomTransitionInfo != NULL,
"TransitionFactory::createSlideTransition(): "
@@ -1150,8 +1150,8 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
break;
}
}
-
- // No animation generated, maybe no table entry for given
+
+ // No animation generated, maybe no table entry for given
// transition?
OSL_TRACE(
"TransitionFactory::createSlideTransition(): "
@@ -1162,7 +1162,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
false,
"TransitionFactory::createSlideTransition(): "
"Unknown type/subtype combination encountered" );
-
+
return NumberAnimationSharedPtr();
}
diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx
index a93e80430af8..86572f7f9abe 100644
--- a/slideshow/source/engine/transitions/snakewipe.cxx
+++ b/slideshow/source/engine/transitions/snakewipe.cxx
@@ -2,7 +2,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
@@ -59,7 +59,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
static_cast<double>(line_) / m_sqrtElements );
const double col = ::basegfx::pruneScaleValue(
(area - (line_ * m_sqrtElements)) / m_sqrtElements );
-
+
if (! ::basegfx::fTools::equalZero( line )) {
::basegfx::B2DPolygon poly;
poly.append( ::basegfx::B2DPoint( 0.0, 0.0 ) );
@@ -86,7 +86,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
poly.setClosed(true);
res.append(poly);
}
-
+
return res;
}
@@ -94,13 +94,13 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
double t, bool in ) const
{
::basegfx::B2DPolyPolygon res;
-
+
if (in) {
const double sqrtArea2 = sqrt( t * m_sqrtElements * m_sqrtElements );
const double edge = ::basegfx::pruneScaleValue(
static_cast<double>( static_cast<sal_Int32>(sqrtArea2) ) /
m_sqrtElements );
-
+
::basegfx::B2DPolygon poly;
if (! ::basegfx::fTools::equalZero( edge )) {
poly.append( ::basegfx::B2DPoint( 0.0, 0.0 ) );
@@ -120,20 +120,20 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) );
poly.setClosed(true);
::basegfx::B2DHomMatrix aTransform;
-
- if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1)
+
+ if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1)
{
// odd line
aTransform = basegfx::tools::createRotateB2DHomMatrix(M_PI_2 + M_PI_4);
aTransform.translate(edge + m_elementEdge, 0.0);
}
- else
+ else
{
aTransform = basegfx::tools::createTranslateB2DHomMatrix(-a, 0.0);
aTransform.rotate( -M_PI_4 );
aTransform.translate( 0.0, edge );
}
-
+
poly.transform( aTransform );
res.append(poly);
}
@@ -143,7 +143,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
const double edge = ::basegfx::pruneScaleValue(
static_cast<double>( static_cast<sal_Int32>(sqrtArea2) ) /
m_sqrtElements );
-
+
::basegfx::B2DPolygon poly;
if (! ::basegfx::fTools::equalZero( edge )) {
poly.append( ::basegfx::B2DPoint( 0.0, 1.0 ) );
@@ -164,15 +164,15 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) );
poly.setClosed(true);
::basegfx::B2DHomMatrix aTransform;
-
- if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1)
+
+ if ((static_cast<sal_Int32>(sqrtArea2) & 1) == 1)
{
// odd line
aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.0, -height);
aTransform.rotate( M_PI_2 + M_PI_4 );
aTransform.translate( 1.0, edge );
}
- else
+ else
{
aTransform = basegfx::tools::createRotateB2DHomMatrix(-M_PI_4);
aTransform.translate( edge, 1.0 );
@@ -180,7 +180,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
poly.transform( aTransform );
res.append(poly);
}
-
+
return res;
}
@@ -237,7 +237,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis )
res.append( flipOnYAxis(half) );
res.append( m_opposite ? flipOnXAxis(half) : half );
}
-
+
return m_flipOnYAxis ? flipOnYAxis(res) : res;
}
diff --git a/slideshow/source/engine/transitions/snakewipe.hxx b/slideshow/source/engine/transitions/snakewipe.hxx
index 7f282aa0557c..3b14944d7d68 100644
--- a/slideshow/source/engine/transitions/snakewipe.hxx
+++ b/slideshow/source/engine/transitions/snakewipe.hxx
@@ -2,7 +2,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
@@ -50,7 +50,7 @@ protected:
::basegfx::B2DPolyPolygon calcSnake( double t ) const;
// topLeftDiagonal:
::basegfx::B2DPolyPolygon calcHalfDiagonalSnake( double t, bool in ) const;
-
+
const sal_Int32 m_sqrtElements;
const double m_elementEdge;
const bool m_diagonal;
diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx
index d7cbd6c7cf32..2ddee7226e91 100644
--- a/slideshow/source/engine/transitions/spiralwipe.cxx
+++ b/slideshow/source/engine/transitions/spiralwipe.cxx
@@ -2,7 +2,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
@@ -55,7 +55,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis )
const double area = (t * m_elements);
const double e = (sqrt(area) / 2.0);
const sal_Int32 edge = (static_cast<sal_Int32>(e) * 2);
-
+
basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5));
const double edge_ = ::basegfx::pruneScaleValue(
static_cast<double>(edge) / m_sqrtElements );
@@ -64,7 +64,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis )
::basegfx::B2DPolygon poly( createUnitRect() );
poly.transform( aTransform );
::basegfx::B2DPolyPolygon res(poly);
-
+
if (! ::basegfx::fTools::equalZero( 1.0 - t )) {
const sal_Int32 edge1 = (edge + 1);
sal_Int32 len = static_cast<sal_Int32>( (e - (edge /2)) * edge1 * 4 );
@@ -88,7 +88,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis )
res.append(poly);
}
}
-
+
return res;
}
@@ -106,7 +106,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis )
::basegfx::B2DPolyPolygon res( createUnitRect() );
::basegfx::B2DPolyPolygon innerSpiral( calcNegSpiral( 1.0 - t ) );
innerSpiral.flip();
-
+
if (m_fourBox) {
::basegfx::B2DHomMatrix aTransform;
aTransform.scale( 0.5, 0.5 );
@@ -124,7 +124,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis )
res.append(innerSpiral);
res.append( flipOnXAxis(innerSpiral) );
}
-
+
return m_flipOnYAxis ? flipOnYAxis(res) : res;
}
diff --git a/slideshow/source/engine/transitions/spiralwipe.hxx b/slideshow/source/engine/transitions/spiralwipe.hxx
index d515a28e5c79..4e11e2df9ed1 100644
--- a/slideshow/source/engine/transitions/spiralwipe.hxx
+++ b/slideshow/source/engine/transitions/spiralwipe.hxx
@@ -2,7 +2,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
@@ -46,7 +46,7 @@ public:
virtual ::basegfx::B2DPolyPolygon operator () ( double t );
protected:
::basegfx::B2DPolyPolygon calcNegSpiral( double t ) const;
-
+
const sal_Int32 m_elements;
const sal_Int32 m_sqrtElements;
const bool m_flipOnYAxis;
diff --git a/slideshow/source/engine/transitions/sweepwipe.cxx b/slideshow/source/engine/transitions/sweepwipe.cxx
index a5e25ac5a5e5..ae743ec23944 100644
--- a/slideshow/source/engine/transitions/sweepwipe.cxx
+++ b/slideshow/source/engine/transitions/sweepwipe.cxx
@@ -2,7 +2,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
@@ -48,27 +48,27 @@ namespace internal {
t /= 2.0;
if (!m_single && !m_oppositeVertical)
t /= 2.0;
-
+
::basegfx::B2DPolygon poly( ClockWipe::calcCenteredClock( 0.25 + t ) );
::basegfx::B2DHomMatrix aTransform;
-
- if (m_center)
+
+ if (m_center)
{
aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.0);
poly.transform( aTransform );
}
::basegfx::B2DPolyPolygon res(poly);
-
- if (! m_single)
+
+ if (! m_single)
{
- if (m_oppositeVertical)
+ if (m_oppositeVertical)
{
aTransform = basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0);
aTransform.translate( 0.0, 1.0 );
poly.transform( aTransform );
poly.flip();
}
- else
+ else
{
aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5);
aTransform.rotate( M_PI );
@@ -77,7 +77,7 @@ namespace internal {
}
res.append(poly);
}
-
+
return m_flipOnYAxis ? flipOnYAxis(res) : res;
}
diff --git a/slideshow/source/engine/transitions/sweepwipe.hxx b/slideshow/source/engine/transitions/sweepwipe.hxx
index 953ed7b9e862..c1e9fc3327b1 100644
--- a/slideshow/source/engine/transitions/sweepwipe.hxx
+++ b/slideshow/source/engine/transitions/sweepwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx b/slideshow/source/engine/transitions/transitionfactorytab.cxx
index a59c6051aa5e..052c0ab045ee 100644
--- a/slideshow/source/engine/transitions/transitionfactorytab.cxx
+++ b/slideshow/source/engine/transitions/transitionfactorytab.cxx
@@ -2,7 +2,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
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_slideshow.hxx"
-#include <boost/current_function.hpp>
+#include <boost/current_function.hpp>
#include <basegfx/numeric/ftools.hxx>
#include <com/sun/star/animations/TransitionType.hpp>
#include <com/sun/star/animations/TransitionSubType.hpp>
@@ -47,7 +47,7 @@ namespace internal {
namespace {
static const TransitionInfo lcl_transitionInfo[] =
-{
+{
{
0,
0,
@@ -108,7 +108,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to BoxWipe:
animations::TransitionType::BOXWIPE,
@@ -205,7 +205,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FourBoxWipe:
animations::TransitionType::FOURBOXWIPE,
@@ -230,7 +230,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to BarnDoorWipe:
animations::TransitionType::BARNDOORWIPE,
@@ -279,7 +279,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to BarWipePolyPolygon:
animations::TransitionType::DIAGONALWIPE,
@@ -305,7 +305,7 @@ static const TransitionInfo lcl_transitionInfo[] =
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::BOWTIEWIPE,
animations::TransitionSubType::VERTICAL,
@@ -330,7 +330,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to BarnDoorWipe (doubled=true):
animations::TransitionType::MISCDIAGONALWIPE,
@@ -355,7 +355,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to VeeWipe:
animations::TransitionType::VEEWIPE,
@@ -403,7 +403,7 @@ static const TransitionInfo lcl_transitionInfo[] =
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::BARNVEEWIPE,
animations::TransitionSubType::TOP,
@@ -452,7 +452,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to ZigZagWipe:
animations::TransitionType::ZIGZAGWIPE,
@@ -501,7 +501,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to IrisWipe:
animations::TransitionType::IRISWIPE,
@@ -527,7 +527,7 @@ static const TransitionInfo lcl_transitionInfo[] =
false // scale isotrophically to target size
},
-
+
{
// mapped to FigureWipe(triangle):
animations::TransitionType::TRIANGLEWIPE,
@@ -576,7 +576,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FigureWipe(arrowHead):
animations::TransitionType::ARROWHEADWIPE,
@@ -625,7 +625,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FigureWipe(pentagon):
animations::TransitionType::PENTAGONWIPE,
@@ -650,7 +650,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FigureWipe(hexagon):
animations::TransitionType::HEXAGONWIPE,
@@ -675,7 +675,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to EllipseWipe:
animations::TransitionType::ELLIPSEWIPE,
@@ -713,7 +713,7 @@ static const TransitionInfo lcl_transitionInfo[] =
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::EYEWIPE,
animations::TransitionSubType::HORIZONTAL,
@@ -762,7 +762,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FigureWipe(star, points=4):
animations::TransitionType::STARWIPE,
@@ -799,7 +799,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::MISCSHAPEWIPE,
animations::TransitionSubType::HEART,
@@ -824,7 +824,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to ClockWipe:
animations::TransitionType::CLOCKWIPE,
@@ -873,7 +873,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to PinWheelWipe:
animations::TransitionType::PINWHEELWIPE,
@@ -946,7 +946,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
true // scale isotrophically to target size, like ppt
},
-
+
{
// mapped to SweepWipe (center=true, single=true):
animations::TransitionType::SINGLESWEEPWIPE,
@@ -1043,7 +1043,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FanWipe(center=true):
animations::TransitionType::FANWIPE,
@@ -1116,7 +1116,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to FanWipe(center=true, single=false, fanIn=false):
animations::TransitionType::DOUBLEFANWIPE,
@@ -1165,7 +1165,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to SweepWipe (center=true, single=false):
animations::TransitionType::DOUBLESWEEPWIPE,
@@ -1240,7 +1240,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::SALOONDOORWIPE,
animations::TransitionSubType::TOP, // (251)
@@ -1337,7 +1337,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to SnakeWipe:
animations::TransitionType::SNAKEWIPE,
@@ -1410,7 +1410,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to SpiralWipe:
animations::TransitionType::SPIRALWIPE,
@@ -1507,7 +1507,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to ParallelSnakesWipe:
animations::TransitionType::PARALLELSNAKESWIPE,
@@ -1629,7 +1629,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to BoxSnakesWipe:
animations::TransitionType::BOXSNAKESWIPE,
@@ -1702,7 +1702,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to WaterfallWipe:
animations::TransitionType::WATERFALLWIPE,
@@ -1751,7 +1751,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
animations::TransitionType::PUSHWIPE,
animations::TransitionSubType::FROMLEFT,
@@ -2030,7 +2030,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to RandomWipe:
animations::TransitionType::RANDOMBARWIPE,
@@ -2055,7 +2055,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
false // scale isotrophically to target size
},
-
+
{
// mapped to CheckerBoard:
animations::TransitionType::CHECKERBOARDWIPE,
@@ -2093,7 +2093,7 @@ static const TransitionInfo lcl_transitionInfo[] =
true, // 'out' by parameter sweep inversion
true // scale isotrophically to target size
},
-
+
/////////////////////////////////////////////////////////
// NOTE: This entry MUST be the last, to keep
// createSlideTransition() from infinite recursion. Because
@@ -2125,7 +2125,7 @@ const TransitionInfo* TransitionFactory::getTransitionInfo(
static const ::std::size_t lcl_tableSize(
sizeof(lcl_transitionInfo)/sizeof(TransitionInfo) );
static const TransitionInfo* pTableEnd = lcl_transitionInfo+lcl_tableSize;
-
+
const TransitionInfo* pRes = ::std::find_if(
lcl_transitionInfo, pTableEnd,
TransitionInfo::Comparator( nTransitionType,
diff --git a/slideshow/source/engine/transitions/transitiontools.cxx b/slideshow/source/engine/transitions/transitiontools.cxx
index c497c91bee68..c2cc7c50bd27 100644
--- a/slideshow/source/engine/transitions/transitiontools.cxx
+++ b/slideshow/source/engine/transitions/transitiontools.cxx
@@ -2,7 +2,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
@@ -46,7 +46,7 @@ namespace internal {
return ::basegfx::tools::createPolygonFromRect(
::basegfx::B2DRectangle(0.0,0.0,
1.0,1.0 ) );
-}
+}
::basegfx::B2DPolyPolygon flipOnYAxis(
::basegfx::B2DPolyPolygon const & polypoly )
diff --git a/slideshow/source/engine/transitions/transitiontools.hxx b/slideshow/source/engine/transitions/transitiontools.hxx
index 6e1acaa525ee..c8c95ad7e48d 100644
--- a/slideshow/source/engine/transitions/transitiontools.hxx
+++ b/slideshow/source/engine/transitions/transitiontools.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/veewipe.cxx b/slideshow/source/engine/transitions/veewipe.cxx
index 7e1484cd93b6..47bc901019c4 100644
--- a/slideshow/source/engine/transitions/veewipe.cxx
+++ b/slideshow/source/engine/transitions/veewipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/veewipe.hxx b/slideshow/source/engine/transitions/veewipe.hxx
index 9106c4d625c6..b25816f6b1dc 100644
--- a/slideshow/source/engine/transitions/veewipe.hxx
+++ b/slideshow/source/engine/transitions/veewipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx
index 2e2349c48979..7ea4539c7227 100644
--- a/slideshow/source/engine/transitions/waterfallwipe.cxx
+++ b/slideshow/source/engine/transitions/waterfallwipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/waterfallwipe.hxx b/slideshow/source/engine/transitions/waterfallwipe.hxx
index 2f373bd3728e..58cf278e2916 100644
--- a/slideshow/source/engine/transitions/waterfallwipe.hxx
+++ b/slideshow/source/engine/transitions/waterfallwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx
index f884be30776b..a0c57db35223 100644
--- a/slideshow/source/engine/transitions/zigzagwipe.cxx
+++ b/slideshow/source/engine/transitions/zigzagwipe.cxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/transitions/zigzagwipe.hxx b/slideshow/source/engine/transitions/zigzagwipe.hxx
index f6a24fa127ce..8126890119fb 100644
--- a/slideshow/source/engine/transitions/zigzagwipe.hxx
+++ b/slideshow/source/engine/transitions/zigzagwipe.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/engine/unoviewcontainer.cxx b/slideshow/source/engine/unoviewcontainer.cxx
index 08bbc1d90ed9..a5db2abd4ab2 100644
--- a/slideshow/source/engine/unoviewcontainer.cxx
+++ b/slideshow/source/engine/unoviewcontainer.cxx
@@ -2,7 +2,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
@@ -56,8 +56,8 @@ namespace slideshow
const UnoViewVector::iterator aEnd( maViews.end() );
// already added?
- if( ::std::find_if( maViews.begin(),
- aEnd,
+ if( ::std::find_if( maViews.begin(),
+ aEnd,
::boost::bind(
::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
::boost::cref( rView->getUnoView() ),
@@ -75,15 +75,15 @@ namespace slideshow
return true;
}
- UnoViewSharedPtr UnoViewContainer::removeView( const uno::Reference< presentation::XSlideShowView >& xView )
+ UnoViewSharedPtr UnoViewContainer::removeView( const uno::Reference< presentation::XSlideShowView >& xView )
{
// check whether same view is already added
const UnoViewVector::iterator aEnd( maViews.end() );
UnoViewVector::iterator aIter;
// added in the first place?
- if( (aIter=::std::find_if( maViews.begin(),
- aEnd,
+ if( (aIter=::std::find_if( maViews.begin(),
+ aEnd,
::boost::bind(
::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
::boost::cref( xView ),
@@ -95,10 +95,10 @@ namespace slideshow
return UnoViewSharedPtr();
}
- OSL_ENSURE(
- ::std::count_if(
- maViews.begin(),
- aEnd,
+ OSL_ENSURE(
+ ::std::count_if(
+ maViews.begin(),
+ aEnd,
::boost::bind(
::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
::boost::cref( xView ),
@@ -120,16 +120,16 @@ namespace slideshow
// remove locally
const UnoViewVector::iterator aEnd( maViews.end() );
UnoViewVector::iterator aIter;
- if( (aIter=::std::find( maViews.begin(),
- aEnd,
+ if( (aIter=::std::find( maViews.begin(),
+ aEnd,
rView )) == aEnd )
{
// view seemingly was not added, failed
return false;
}
- OSL_ENSURE( ::std::count( maViews.begin(),
- aEnd,
+ OSL_ENSURE( ::std::count( maViews.begin(),
+ aEnd,
rView ) == 1,
"UnoViewContainer::removeView(): View was added multiple times" );
@@ -144,7 +144,7 @@ namespace slideshow
::std::for_each( maViews.begin(),
maViews.end(),
::boost::mem_fn(&UnoView::_dispose) );
- maViews.clear();
+ maViews.clear();
}
}
}
diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx
index b1791a47b9a3..48b588a73c32 100644
--- a/slideshow/source/engine/usereventqueue.cxx
+++ b/slideshow/source/engine/usereventqueue.cxx
@@ -2,7 +2,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
@@ -92,7 +92,7 @@ bool fireSingleEvent( ContainerT & rQueue, EventQueue & rEventQueue )
{
EventSharedPtr const pEvent(rQueue.front());
rQueue.pop();
-
+
// skip all inactive events (as the purpose of
// nextEventFromQueue() is to activate the next
// event, and events which return false on
@@ -118,25 +118,25 @@ bool fireAllEvents( ContainerT & rQueue, EventQueue & rEventQueue )
class EventContainer
{
public:
- EventContainer() :
- maEvents()
+ EventContainer() :
+ maEvents()
{}
-
+
void clearContainer()
{
maEvents = ImpEventQueue();
}
-
+
void addEvent( const EventSharedPtr& rEvent )
{
maEvents.push( rEvent );
}
-
+
bool isEmpty()
{
return maEvents.empty();
}
-
+
protected:
ImpEventQueue maEvents;
};
@@ -149,17 +149,17 @@ class PlainEventHandler : public EventHandler,
public:
PlainEventHandler( EventQueue & rEventQueue )
: EventContainer(), mrEventQueue(rEventQueue) {}
-
+
virtual void dispose()
{
clearContainer();
}
-
+
virtual bool handleEvent()
{
return fireAllEvents( maEvents, mrEventQueue );
}
-
+
private:
EventQueue & mrEventQueue;
};
@@ -169,41 +169,41 @@ class AllAnimationEventHandler : public AnimationEventHandler
public:
AllAnimationEventHandler( EventQueue& rEventQueue ) :
mrEventQueue( rEventQueue ),
- maAnimationEventMap()
+ maAnimationEventMap()
{}
-
+
virtual void dispose()
{
maAnimationEventMap.clear();
}
-
+
virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode )
{
ENSURE_OR_RETURN_FALSE(
rNode,
"AllAnimationEventHandler::handleAnimationEvent(): Invalid node" );
-
+
bool bRet( false );
-
+
ImpAnimationEventMap::iterator aIter;
- if( (aIter=maAnimationEventMap.find(
+ if( (aIter=maAnimationEventMap.find(
rNode->getXAnimationNode() )) != maAnimationEventMap.end() )
{
ImpEventVector& rVec( aIter->second );
-
+
bRet = !rVec.empty();
-
+
// registered node found -> fire all events in the vector
std::for_each( rVec.begin(), rVec.end(),
boost::bind( &EventQueue::addEvent,
boost::ref( mrEventQueue ), _1 ) );
-
+
rVec.clear();
}
-
+
return bRet;
}
-
+
void addEvent( const EventSharedPtr& rEvent,
const uno::Reference< animations::XAnimationNode >& xNode )
{
@@ -216,11 +216,11 @@ public:
ImpAnimationEventMap::value_type( xNode,
ImpEventVector() ) ).first;
}
-
+
// add new event to queue
aIter->second.push_back( rEvent );
}
-
+
bool isEmpty()
{
// find at least one animation with a non-empty vector
@@ -230,13 +230,13 @@ public:
{
if( !aCurr->second.empty() )
return false; // at least one non-empty entry found
-
+
++aCurr;
}
-
+
return true; // not a single non-empty entry found
}
-
+
private:
EventQueue& mrEventQueue;
ImpAnimationEventMap maAnimationEventMap;
@@ -250,14 +250,14 @@ public:
ClickEventHandler( EventQueue& rEventQueue ) :
EventContainer(),
mrEventQueue( rEventQueue ),
- mbAdvanceOnClick( true )
+ mbAdvanceOnClick( true )
{}
-
+
void setAdvanceOnClick( bool bAdvanceOnClick )
{
mbAdvanceOnClick = bAdvanceOnClick;
}
-
+
private:
virtual void dispose()
{
@@ -269,13 +269,13 @@ private:
{
return handleEvent_impl();
}
-
+
// triggered by mouse release:
virtual bool handleMouseReleased( const awt::MouseEvent& evt )
{
if(evt.Buttons != awt::MouseButton::LEFT)
return false;
-
+
if( mbAdvanceOnClick ) {
// fire next event
return handleEvent_impl();
@@ -284,14 +284,14 @@ private:
return false; // advance-on-click disabled
}
}
-
+
// triggered by both:
virtual bool handleEvent_impl()
{
// fire next event:
return fireSingleEvent( maEvents, mrEventQueue );
}
-
+
private:
EventQueue& mrEventQueue;
bool mbAdvanceOnClick;
@@ -315,7 +315,7 @@ public:
/// Skip the current effect but do not triggere the next effect.
void skipEffect (void) { handleEvent_impl(false); }
-
+
private:
virtual bool handleEvent_impl()
{
@@ -326,7 +326,7 @@ private:
{
// fire all events, so animation nodes can register their
// next effect listeners:
- if(fireAllEvents( maEvents, mrEventQueue ))
+ if(fireAllEvents( maEvents, mrEventQueue ))
{
if (mbSkipTriggersNextEffect && bNotifyNextEffect)
{
@@ -346,7 +346,7 @@ private:
}
return false;
}
-
+
private:
EventQueue & mrEventQueue;
EventMultiplexer & mrEventMultiplexer;
@@ -359,28 +359,28 @@ class RewindEffectEventHandler : public MouseEventHandler_,
public:
RewindEffectEventHandler( EventQueue & rEventQueue )
: EventContainer(), mrEventQueue(rEventQueue) {}
-
+
private:
virtual void dispose()
{
clearContainer();
}
-
+
virtual bool handleMouseReleased( awt::MouseEvent const& evt )
{
if(evt.Buttons != awt::MouseButton::RIGHT)
return false;
-
+
return fireAllEvents( maEvents, mrEventQueue );
}
-
+
private:
EventQueue & mrEventQueue;
};
/** Base class to share some common code between
ShapeClickEventHandler and MouseMoveHandler
-
+
@derive override necessary MouseEventHandler interface methods,
call sendEvent() method to actually process the event.
*/
@@ -389,16 +389,16 @@ class MouseHandlerBase : public MouseEventHandler_
public:
MouseHandlerBase( EventQueue& rEventQueue ) :
mrEventQueue( rEventQueue ),
- maShapeEventMap()
+ maShapeEventMap()
{}
-
+
virtual void dispose()
{
- // TODO(Q1): Check whether plain vector with swap idiom is
+ // TODO(Q1): Check whether plain vector with swap idiom is
// okay here
maShapeEventMap = ImpShapeEventMap();
}
-
+
void addEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape )
{
@@ -410,11 +410,11 @@ public:
ImpShapeEventMap::value_type( rShape,
ImpEventQueue() ) ).first;
}
-
+
// add new event to queue
aIter->second.push( rEvent );
}
-
+
bool isEmpty()
{
// find at least one shape with a non-empty queue
@@ -424,20 +424,20 @@ public:
{
if( !aCurrShape->second.empty() )
return false; // at least one non-empty entry found
-
+
++aCurrShape;
}
-
+
return true; // not a single non-empty entry found
}
-
+
protected:
bool hitTest( const awt::MouseEvent& e,
ImpShapeEventMap::reverse_iterator& o_rHitShape )
{
// find hit shape in map
const basegfx::B2DPoint aPosition( e.X, e.Y );
-
+
// find matching shape (scan reversely, to coarsely match
// paint order)
ImpShapeEventMap::reverse_iterator aCurrShape(maShapeEventMap.rbegin());
@@ -455,19 +455,19 @@ protected:
o_rHitShape = aCurrShape;
return true;
}
-
+
++aCurrShape;
}
-
+
return false; // nothing hit
}
-
+
bool sendEvent( ImpShapeEventMap::reverse_iterator& io_rHitShape )
{
// take next event from queue
const bool bRet( fireSingleEvent( io_rHitShape->second,
mrEventQueue ) );
-
+
// clear shape entry, if its queue is
// empty. This is important, since the shapes
// are held by shared ptr, and might otherwise
@@ -483,20 +483,20 @@ protected:
// orthogonality, eh?)
maShapeEventMap.erase( io_rHitShape->first );
}
-
+
return bRet;
}
-
+
bool processEvent( const awt::MouseEvent& e )
{
ImpShapeEventMap::reverse_iterator aCurrShape;
-
+
if( hitTest( e, aCurrShape ) )
return sendEvent( aCurrShape );
-
+
return false; // did not handle the event
}
-
+
private:
EventQueue& mrEventQueue;
ImpShapeEventMap maShapeEventMap;
@@ -508,20 +508,20 @@ public:
ShapeClickEventHandler( CursorManager& rCursorManager,
EventQueue& rEventQueue ) :
MouseHandlerBase( rEventQueue ),
- mrCursorManager( rCursorManager )
+ mrCursorManager( rCursorManager )
{}
-
+
virtual bool handleMouseReleased( const awt::MouseEvent& e )
{
if(e.Buttons != awt::MouseButton::LEFT)
return false;
return processEvent( e );
}
-
+
virtual bool handleMouseMoved( const awt::MouseEvent& e )
{
// TODO(P2): Maybe buffer last shape touched
-
+
// if we have a shape click event, and the mouse
// hovers over this shape, change cursor to hand
ImpShapeEventMap::reverse_iterator aDummy;
@@ -531,7 +531,7 @@ public:
return false; // we don't /eat/ this event. Lower prio
// handler should see it, too.
}
-
+
private:
CursorManager& mrCursorManager;
};
@@ -542,12 +542,12 @@ public:
MouseEnterHandler( EventQueue& rEventQueue )
: MouseHandlerBase( rEventQueue ),
mpLastShape() {}
-
+
virtual bool handleMouseMoved( const awt::MouseEvent& e )
{
// TODO(P2): Maybe buffer last shape touched, and
// check against that _first_
-
+
ImpShapeEventMap::reverse_iterator aCurr;
if( hitTest( e, aCurr ) )
{
@@ -565,11 +565,11 @@ public:
// don't hit no shape - thus, last shape is NULL
mpLastShape.reset();
}
-
+
return false; // we don't /eat/ this event. Lower prio
// handler should see it, too.
}
-
+
private:
ShapeSharedPtr mpLastShape;
};
@@ -580,12 +580,12 @@ public:
MouseLeaveHandler( EventQueue& rEventQueue )
: MouseHandlerBase( rEventQueue ),
maLastIter() {}
-
+
virtual bool handleMouseMoved( const awt::MouseEvent& e )
{
// TODO(P2): Maybe buffer last shape touched, and
// check against that _first_
-
+
ImpShapeEventMap::reverse_iterator aCurr;
if( hitTest( e, aCurr ) )
{
@@ -600,21 +600,21 @@ public:
// event
sendEvent( maLastIter );
}
-
+
// in any case, when we hit this else-branch: no
// shape hit, thus have to clear maLastIter
maLastIter = ImpShapeEventMap::reverse_iterator();
}
-
+
return false; // we don't /eat/ this event. Lower prio
// handler should see it, too.
}
-
+
private:
ImpShapeEventMap::reverse_iterator maLastIter;
};
-template< typename Handler, typename Functor >
+template< typename Handler, typename Functor >
void UserEventQueue::registerEvent(
boost::shared_ptr< Handler >& rHandler,
const EventSharedPtr& rEvent,
@@ -622,18 +622,18 @@ void UserEventQueue::registerEvent(
{
ENSURE_OR_THROW( rEvent,
"UserEventQueue::registerEvent(): Invalid event" );
-
+
if( !rHandler ) {
// create handler
- rHandler.reset( new Handler( mrEventQueue ) );
+ rHandler.reset( new Handler( mrEventQueue ) );
// register handler on EventMultiplexer
rRegistrationFunctor( rHandler );
}
-
+
rHandler->addEvent( rEvent );
}
-template< typename Handler, typename Arg, typename Functor >
+template< typename Handler, typename Arg, typename Functor >
void UserEventQueue::registerEvent(
boost::shared_ptr< Handler >& rHandler,
const EventSharedPtr& rEvent,
@@ -642,15 +642,15 @@ void UserEventQueue::registerEvent(
{
ENSURE_OR_THROW( rEvent,
"UserEventQueue::registerEvent(): Invalid event" );
-
+
if( !rHandler ) {
// create handler
rHandler.reset( new Handler( mrEventQueue ) );
-
+
// register handler on EventMultiplexer
rRegistrationFunctor( rHandler );
}
-
+
rHandler->addEvent( rEvent, rArg );
}
@@ -674,7 +674,7 @@ UserEventQueue::UserEventQueue( EventMultiplexer& rMultiplexer,
mpRewindEffectEventHandler(),
mpDoubleClickEventHandler(),
mpMouseEnterHandler(),
- mpMouseLeaveHandler(),
+ mpMouseLeaveHandler(),
mbAdvanceOnClick( true )
{
}
@@ -683,7 +683,7 @@ UserEventQueue::~UserEventQueue()
{
try
{
- // unregister all handlers
+ // unregister all handlers
clear();
}
catch (uno::Exception &) {
@@ -693,16 +693,16 @@ UserEventQueue::~UserEventQueue()
RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
-
+
bool UserEventQueue::isEmpty() const
{
- // TODO(T2): This is not thread safe, the handlers are all
- // only separately synchronized. This poses the danger of
+ // TODO(T2): This is not thread safe, the handlers are all
+ // only separately synchronized. This poses the danger of
// generating false empty status on XSlideShow::update(), such
// that the last events of a slide are not triggered.
-
+
// we're empty iff all handler queues are empty
- return
+ return
(mpStartEventHandler ? mpStartEventHandler->isEmpty() : true) &&
(mpEndEventHandler ? mpEndEventHandler->isEmpty() : true) &&
(mpAnimationStartEventHandler ? mpAnimationStartEventHandler->isEmpty() : true) &&
@@ -783,7 +783,7 @@ void UserEventQueue::clear()
void UserEventQueue::setAdvanceOnClick( bool bAdvanceOnClick )
{
mbAdvanceOnClick = bAdvanceOnClick;
-
+
// forward to handler, if existing. Otherwise, the handler
// creation will do the forwarding.
if( mpClickEventHandler )
@@ -793,7 +793,7 @@ void UserEventQueue::setAdvanceOnClick( bool bAdvanceOnClick )
void UserEventQueue::registerSlideStartEvent( const EventSharedPtr& rEvent )
{
- registerEvent( mpStartEventHandler,
+ registerEvent( mpStartEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addSlideStartHandler,
boost::ref( mrMultiplexer ), _1 ) );
@@ -801,7 +801,7 @@ void UserEventQueue::registerSlideStartEvent( const EventSharedPtr& rEvent )
void UserEventQueue::registerSlideEndEvent( const EventSharedPtr& rEvent )
{
- registerEvent( mpEndEventHandler,
+ registerEvent( mpEndEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addSlideEndHandler,
boost::ref( mrMultiplexer ), _1 ) );
@@ -811,7 +811,7 @@ void UserEventQueue::registerAnimationStartEvent(
const EventSharedPtr& rEvent,
const uno::Reference< animations::XAnimationNode>& xNode )
{
- registerEvent( mpAnimationStartEventHandler,
+ registerEvent( mpAnimationStartEventHandler,
rEvent,
xNode,
boost::bind( &EventMultiplexer::addAnimationStartHandler,
@@ -822,7 +822,7 @@ void UserEventQueue::registerAnimationEndEvent(
const EventSharedPtr& rEvent,
const uno::Reference<animations::XAnimationNode>& xNode )
{
- registerEvent( mpAnimationEndEventHandler,
+ registerEvent( mpAnimationEndEventHandler,
rEvent,
xNode,
boost::bind( &EventMultiplexer::addAnimationEndHandler,
@@ -833,7 +833,7 @@ void UserEventQueue::registerAudioStoppedEvent(
const EventSharedPtr& rEvent,
const uno::Reference<animations::XAnimationNode>& xNode )
{
- registerEvent( mpAudioStoppedEventHandler,
+ registerEvent( mpAudioStoppedEventHandler,
rEvent,
xNode,
boost::bind( &EventMultiplexer::addAudioStoppedHandler,
@@ -846,19 +846,19 @@ void UserEventQueue::registerShapeClickEvent( const EventSharedPtr& rEvent,
ENSURE_OR_THROW(
rEvent,
"UserEventQueue::registerShapeClickEvent(): Invalid event" );
-
+
if( !mpShapeClickEventHandler )
{
// create handler
mpShapeClickEventHandler.reset(
new ShapeClickEventHandler(mrCursorManager,
mrEventQueue) );
-
+
// register handler on EventMultiplexer
mrMultiplexer.addClickHandler( mpShapeClickEventHandler, 1.0 );
mrMultiplexer.addMouseMoveHandler( mpShapeClickEventHandler, 1.0 );
}
-
+
mpShapeClickEventHandler->addEvent( rEvent, rShape );
}
@@ -872,20 +872,20 @@ public:
: mrMultiplexer( rMultiplexer ),
mnPrio(nPrio),
mbAdvanceOnClick( bAdvanceOnClick ) {}
-
+
void operator()( const boost::shared_ptr<ClickEventHandler>& rHandler )const
{
// register the handler on _two_ sources: we want the
// nextEffect events, e.g. space bar, to trigger clicks, as well!
mrMultiplexer.addClickHandler( rHandler, mnPrio );
mrMultiplexer.addNextEffectHandler( rHandler, mnPrio );
-
+
// forward advance-on-click state to newly
// generated handler (that's the only reason why
// we're called here)
rHandler->setAdvanceOnClick( mbAdvanceOnClick );
}
-
+
private:
EventMultiplexer& mrMultiplexer;
double const mnPrio;
@@ -900,7 +900,7 @@ void UserEventQueue::registerNextEffectEvent( const EventSharedPtr& rEvent )
// skip effect (skipping the currently running one)
// rewind effect (rewinding back running one and waiting (again)
// to be started)
- registerEvent( mpClickEventHandler,
+ registerEvent( mpClickEventHandler,
rEvent,
ClickEventRegistrationFunctor( mrMultiplexer,
0.0 /* default prio */,
@@ -911,7 +911,7 @@ void UserEventQueue::registerSkipEffectEvent(
EventSharedPtr const & pEvent,
const bool bSkipTriggersNextEffect)
{
- if(!mpSkipEffectEventHandler)
+ if(!mpSkipEffectEventHandler)
{
mpSkipEffectEventHandler.reset(
new SkipEffectEventHandler( mrEventQueue, mrMultiplexer ) );
@@ -946,27 +946,27 @@ void UserEventQueue::registerShapeDoubleClickEvent(
ENSURE_OR_THROW(
rEvent,
"UserEventQueue::registerShapeDoubleClickEvent(): Invalid event" );
-
+
if( !mpShapeDoubleClickEventHandler )
{
// create handler
mpShapeDoubleClickEventHandler.reset(
new ShapeClickEventHandler(mrCursorManager,
mrEventQueue) );
-
+
// register handler on EventMultiplexer
mrMultiplexer.addDoubleClickHandler( mpShapeDoubleClickEventHandler,
1.0 );
mrMultiplexer.addMouseMoveHandler( mpShapeDoubleClickEventHandler,
1.0 );
}
-
+
mpShapeDoubleClickEventHandler->addEvent( rEvent, rShape );
}
void UserEventQueue::registerDoubleClickEvent( const EventSharedPtr& rEvent )
{
- registerEvent( mpDoubleClickEventHandler,
+ registerEvent( mpDoubleClickEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addDoubleClickHandler,
boost::ref( mrMultiplexer ), _1,
@@ -976,7 +976,7 @@ void UserEventQueue::registerDoubleClickEvent( const EventSharedPtr& rEvent )
void UserEventQueue::registerMouseEnterEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape )
{
- registerEvent( mpMouseEnterHandler,
+ registerEvent( mpMouseEnterHandler,
rEvent,
rShape,
boost::bind( &EventMultiplexer::addMouseMoveHandler,
@@ -987,7 +987,7 @@ void UserEventQueue::registerMouseEnterEvent( const EventSharedPtr& rEvent,
void UserEventQueue::registerMouseLeaveEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape )
{
- registerEvent( mpMouseLeaveHandler,
+ registerEvent( mpMouseLeaveHandler,
rEvent,
rShape,
boost::bind( &EventMultiplexer::addMouseMoveHandler,
diff --git a/slideshow/source/engine/waitsymbol.cxx b/slideshow/source/engine/waitsymbol.cxx
index aa472e363cc2..8e36df48775a 100644
--- a/slideshow/source/engine/waitsymbol.cxx
+++ b/slideshow/source/engine/waitsymbol.cxx
@@ -2,7 +2,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
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_slideshow.hxx"
-#include <boost/current_function.hpp>
+#include <boost/current_function.hpp>
#include <canvas/canvastools.hxx>
#include <comphelper/anytostring.hxx>
@@ -59,11 +59,11 @@ WaitSymbolSharedPtr WaitSymbol::create( const uno::Reference<rendering::XBitmap>
EventMultiplexer& rEventMultiplexer,
const UnoViewContainer& rViewContainer )
{
- WaitSymbolSharedPtr pRet(
- new WaitSymbol( xBitmap,
- rScreenUpdater,
+ WaitSymbolSharedPtr pRet(
+ new WaitSymbol( xBitmap,
+ rScreenUpdater,
rViewContainer ));
-
+
rEventMultiplexer.addViewHandler( pRet );
return pRet;
@@ -86,7 +86,7 @@ WaitSymbol::WaitSymbol( uno::Reference<rendering::XBitmap> const & xBitmap,
void WaitSymbol::setVisible( const bool bVisible )
{
- if( mbVisible != bVisible )
+ if( mbVisible != bVisible )
{
mbVisible = bVisible;
@@ -113,7 +113,7 @@ void WaitSymbol::setVisible( const bool bVisible )
basegfx::B2DPoint WaitSymbol::calcSpritePos(
UnoViewSharedPtr const & rView ) const
{
- const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
+ const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
uno::UNO_QUERY_THROW );
const geometry::IntegerSize2D realSize( xBitmap->getSize() );
return basegfx::B2DPoint(
@@ -126,12 +126,12 @@ void WaitSymbol::viewAdded( const UnoViewSharedPtr& rView )
{
cppcanvas::CustomSpriteSharedPtr sprite;
- try
+ try
{
const geometry::IntegerSize2D spriteSize( mxBitmap->getSize() );
sprite = rView->createSprite( basegfx::B2DVector( spriteSize.Width,
spriteSize.Height ),
- 1000.0 ); // sprite should be in front of all
+ 1000.0 ); // sprite should be in front of all
// other sprites
rendering::ViewState viewState;
canvas::tools::initViewState( viewState );
@@ -151,7 +151,7 @@ void WaitSymbol::viewAdded( const UnoViewSharedPtr& rView )
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
- }
+ }
maViews.push_back( ViewsVecT::value_type( rView, sprite ) );
}
@@ -174,12 +174,12 @@ void WaitSymbol::viewChanged( const UnoViewSharedPtr& rView )
// find entry corresponding to modified view
ViewsVecT::iterator aModifiedEntry(
std::find_if(
- maViews.begin(),
+ maViews.begin(),
maViews.end(),
boost::bind(
std::equal_to<UnoViewSharedPtr>(),
rView,
- // select view:
+ // select view:
boost::bind( std::select1st<ViewsVecT::value_type>(), _1 ))));
OSL_ASSERT( aModifiedEntry != maViews.end() );
@@ -187,7 +187,7 @@ void WaitSymbol::viewChanged( const UnoViewSharedPtr& rView )
return;
if( aModifiedEntry->second )
- aModifiedEntry->second->movePixel(
+ aModifiedEntry->second->movePixel(
calcSpritePos(aModifiedEntry->first) );
}
diff --git a/slideshow/source/engine/waitsymbol.hxx b/slideshow/source/engine/waitsymbol.hxx
index 98d913500d11..f23cb2864c7a 100644
--- a/slideshow/source/engine/waitsymbol.hxx
+++ b/slideshow/source/engine/waitsymbol.hxx
@@ -2,7 +2,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
@@ -57,7 +57,7 @@ public:
ScreenUpdater& rScreenUpdater,
EventMultiplexer& rEventMultiplexer,
const UnoViewContainer& rViewContainer );
-
+
/** Shows the wait symbol.
*/
void show() { setVisible(true); }
diff --git a/slideshow/source/engine/wakeupevent.cxx b/slideshow/source/engine/wakeupevent.cxx
index 4cf70774f23f..9cab96a302f2 100644
--- a/slideshow/source/engine/wakeupevent.cxx
+++ b/slideshow/source/engine/wakeupevent.cxx
@@ -2,7 +2,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
@@ -52,7 +52,7 @@ namespace slideshow
mrActivityQueue( rActivityQueue )
{
}
-
+
void WakeupEvent::dispose()
{
mpActivity.reset();
@@ -62,25 +62,25 @@ namespace slideshow
{
if( !mpActivity )
return false;
-
+
return mrActivityQueue.addActivity( mpActivity );
}
-
+
bool WakeupEvent::isCharged() const
{
// this event won't expire, we fire everytime we're
// re-inserted into the event queue.
return true;
}
-
+
double WakeupEvent::getActivationTime( double nCurrentTime ) const
{
const double nElapsedTime( maTimer.getElapsedTime() );
-
+
return ::std::max( nCurrentTime,
nCurrentTime - nElapsedTime + mnNextTime );
- }
-
+ }
+
void WakeupEvent::start()
{
// start timer
@@ -91,7 +91,7 @@ namespace slideshow
{
mnNextTime = rNextTime;
}
-
+
void WakeupEvent::setActivity( const ActivitySharedPtr& rActivity )
{
mpActivity = rActivity;
diff --git a/slideshow/source/inc/activitiesfactory.hxx b/slideshow/source/inc/activitiesfactory.hxx
index e55911f39bf7..c32e57720ffc 100644
--- a/slideshow/source/inc/activitiesfactory.hxx
+++ b/slideshow/source/inc/activitiesfactory.hxx
@@ -2,7 +2,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
@@ -82,17 +82,17 @@ public:
mpShape( rShape ),
maSlideBounds( rSlideBounds ),
mbAutoReverse( bAutoReverse ) {}
-
+
/// End event to fire when animation is over
EventSharedPtr mpEndEvent;
-
+
/// Event queue to insert the end event into.
EventQueue& mrEventQueue;
/// Event queue to insert the end event into.
ActivitiesQueue& mrActivitiesQueue;
-
+
/** Simple duration of the activity
-
+
Specifies the minimal simple duration of the
activity (minimal, because mnMinNumberOfFrames
might prolongue the activity). According to SMIL,
@@ -102,9 +102,9 @@ public:
animation over time).
*/
double mnMinDuration;
-
+
/** Minimal number of frames for this activity.
-
+
This specifies the minimal number of frames this
activity will display per simple duration. If less
than this number are displayed until mnMinDuration
@@ -112,9 +112,9 @@ public:
mnMinNumberOfFrames are rendered.
*/
sal_uInt32 mnMinNumberOfFrames;
-
+
/** Number of repeats for the simple duration
-
+
This specified the number of repeats. The
mnMinDuration times maRepeats yields the total
duration of this activity. If this value is
@@ -122,197 +122,197 @@ public:
indefinitely.
*/
::boost::optional<double> const maRepeats;
-
+
/// Fraction of simple time to accelerate animation
double mnAcceleration;
-
+
/// Fraction of simple time to decelerate animation
double mnDeceleration;
-
+
/// Shape, to get bounds from
ShapeSharedPtr mpShape;
-
+
/// LayerManager, to get page size from
::basegfx::B2DVector maSlideBounds;
-
+
/// When true, activity is played reversed after mnDuration.
bool mbAutoReverse;
};
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a double value.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const NumberAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const NumberAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a double value.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const EnumAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const EnumAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a color value.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const ColorAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const ColorAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a color value.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const HSLColorAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const HSLColorAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimateColor >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a pair of double values.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const PairAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const PairAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a string.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const StringAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const StringAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create an activity from an XAnimate node.
-
+
This method creates an animated activity from the
given XAnimate node, extracting all necessary
animation parameters from that. Note that due to the
animator parameter, the animation values must be
convertible to a bool value.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param xNode
The SMIL animation node to animate
*/
static AnimationActivitySharedPtr createAnimateActivity(
const CommonParameters& rParms,
- const BoolAnimationSharedPtr& rAnimator,
- const ::com::sun::star::uno::Reference<
+ const BoolAnimationSharedPtr& rAnimator,
+ const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimate >& xNode );
-
+
/** Create a simple activity for the given animator
-
+
This method is suited to create activities for custom
animations, which need a simple double value and lasts
a given timespan. This activity always generates values
from the [0,1] range.
-
+
@param rParms
Factory parameter structure
-
+
@param rAnimator
Animator sub-object
-
+
@param bDirectionForward
If true, the activity goes 'forward', i.e. from 0 to
1. With false, the direction is reversed.
@@ -321,7 +321,7 @@ public:
const CommonParameters& rParms,
const NumberAnimationSharedPtr& rAnimator,
bool bDirectionForward );
-
+
private:
// default: constructor/destructor disabed
ActivitiesFactory();
diff --git a/slideshow/source/inc/activitiesqueue.hxx b/slideshow/source/inc/activitiesqueue.hxx
index e89ead5fd5f0..fe434e5c2db7 100644
--- a/slideshow/source/inc/activitiesqueue.hxx
+++ b/slideshow/source/inc/activitiesqueue.hxx
@@ -2,7 +2,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
@@ -61,7 +61,7 @@ namespace slideshow
adjusting and holding global presentation time.
*/
ActivitiesQueue(
- const ::boost::shared_ptr< ::canvas::tools::ElapsedTime >& pPresTimer );
+ const ::boost::shared_ptr< ::canvas::tools::ElapsedTime >& pPresTimer );
~ActivitiesQueue();
/** Add the given activity to the queue.
@@ -98,22 +98,22 @@ namespace slideshow
/** returns number of all activities, waiting, reinserted and dequeued
*/
std::size_t size() const
- {
+ {
return maCurrentActivitiesWaiting.size() + maCurrentActivitiesReinsert.size() + maDequeuedActivities.size();
}
-
+
private:
::boost::shared_ptr< ::canvas::tools::ElapsedTime > mpTimer;
-
+
typedef ::std::deque< ActivitySharedPtr > ActivityQueue;
- ActivityQueue maCurrentActivitiesWaiting; // currently running
- // activities, that still
+ ActivityQueue maCurrentActivitiesWaiting; // currently running
+ // activities, that still
// await processing for this
// round
- ActivityQueue maCurrentActivitiesReinsert; // currently running
- // activities, that are
+ ActivityQueue maCurrentActivitiesReinsert; // currently running
+ // activities, that are
// already processed for
// this round, and wants
// to be reinserted next
diff --git a/slideshow/source/inc/activity.hxx b/slideshow/source/inc/activity.hxx
index 77db4bfc6fdd..07df027a46f5 100644
--- a/slideshow/source/inc/activity.hxx
+++ b/slideshow/source/inc/activity.hxx
@@ -2,7 +2,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
@@ -59,12 +59,12 @@ namespace slideshow
If this method returns a time lag greater than 0.0,
the ActivitiesQueue will adjust the global slideshow
time, by subtracting the given amount of lag.
-
+
@return time lag or 0.0. Value must be greater or
equal than zero.
*/
virtual double calcTimeLag() const = 0;
-
+
/** Query whether this activity is still continuing
@return true, if this activity still
@@ -86,7 +86,7 @@ namespace slideshow
shape.
*/
virtual void dequeued() = 0;
-
+
/** Forces this activity deactivate and get to its end state
(if possible), but does _not_ dispose.
*/
diff --git a/slideshow/source/inc/animatableshape.hxx b/slideshow/source/inc/animatableshape.hxx
index d7cf85ece993..1c84d289a523 100644
--- a/slideshow/source/inc/animatableshape.hxx
+++ b/slideshow/source/inc/animatableshape.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/animatedsprite.hxx b/slideshow/source/inc/animatedsprite.hxx
index 578b78bcf309..aae92dd5c125 100644
--- a/slideshow/source/inc/animatedsprite.hxx
+++ b/slideshow/source/inc/animatedsprite.hxx
@@ -2,7 +2,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
@@ -74,8 +74,8 @@ namespace slideshow
Priority of the sprite. Must remain static over the
lifetime of this object
*/
- AnimatedSprite( const ViewLayerSharedPtr& rViewLayer,
- const ::basegfx::B2DSize& rSpriteSizePixel,
+ AnimatedSprite( const ViewLayerSharedPtr& rViewLayer,
+ const ::basegfx::B2DSize& rSpriteSizePixel,
double nSpritePrio );
/** Resize the sprite.
@@ -94,10 +94,10 @@ namespace slideshow
canvas by the specified amount of device pixel (for
subsequent render operations).
*/
- void setPixelOffset( const ::basegfx::B2DSize& rPixelOffset );
+ void setPixelOffset( const ::basegfx::B2DSize& rPixelOffset );
/// Retrieve current pixel offset for content output.
- ::basegfx::B2DSize getPixelOffset() const;
+ ::basegfx::B2DSize getPixelOffset() const;
/// Show the sprite
void show();
@@ -160,23 +160,23 @@ namespace slideshow
@param rPrio
The new sprite prio. Must be in the range [0,1]
- */
+ */
void setPriority( double rPrio );
private:
- ViewLayerSharedPtr mpViewLayer;
+ ViewLayerSharedPtr mpViewLayer;
- ::cppcanvas::CustomSpriteSharedPtr mpSprite;
- ::basegfx::B2DSize maEffectiveSpriteSizePixel;
- ::basegfx::B2DSize maContentPixelOffset;
+ ::cppcanvas::CustomSpriteSharedPtr mpSprite;
+ ::basegfx::B2DSize maEffectiveSpriteSizePixel;
+ ::basegfx::B2DSize maContentPixelOffset;
double mnSpritePrio;
- double mnAlpha;
+ double mnAlpha;
::boost::optional< ::basegfx::B2DPoint > maPosPixel;
::boost::optional< ::basegfx::B2DPolyPolygon > maClip;
::boost::optional< ::basegfx::B2DHomMatrix > maTransform;
- bool mbSpriteVisible;
+ bool mbSpriteVisible;
};
typedef ::boost::shared_ptr< AnimatedSprite > AnimatedSpriteSharedPtr;
diff --git a/slideshow/source/inc/animation.hxx b/slideshow/source/inc/animation.hxx
index b7e59fc0c3ec..fe5e20112f00 100644
--- a/slideshow/source/inc/animation.hxx
+++ b/slideshow/source/inc/animation.hxx
@@ -2,7 +2,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
@@ -82,7 +82,7 @@ namespace slideshow
@param rAttrLayer
Attribute layer to play the animation on.
*/
- virtual void start( const AnimatableShapeSharedPtr& rShape,
+ virtual void start( const AnimatableShapeSharedPtr& rShape,
const ShapeAttributeLayerSharedPtr& rAttrLayer ) = 0;
/** Notify that the animation is about to end.
diff --git a/slideshow/source/inc/animationactivity.hxx b/slideshow/source/inc/animationactivity.hxx
index 5c1794c47560..f364e29f54e3 100644
--- a/slideshow/source/inc/animationactivity.hxx
+++ b/slideshow/source/inc/animationactivity.hxx
@@ -2,7 +2,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
@@ -64,8 +64,8 @@ namespace slideshow
@param rAttrLayer
Attribute layer to change the animated values on.
*/
- virtual void setTargets( const AnimatableShapeSharedPtr& rShape,
- const ShapeAttributeLayerSharedPtr& rAttrLayer ) = 0;
+ virtual void setTargets( const AnimatableShapeSharedPtr& rShape,
+ const ShapeAttributeLayerSharedPtr& rAttrLayer ) = 0;
};
typedef ::boost::shared_ptr< AnimationActivity > AnimationActivitySharedPtr;
diff --git a/slideshow/source/inc/animationeventhandler.hxx b/slideshow/source/inc/animationeventhandler.hxx
index 2e0debc1e5c9..af11d0800863 100644
--- a/slideshow/source/inc/animationeventhandler.hxx
+++ b/slideshow/source/inc/animationeventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/animationfactory.hxx b/slideshow/source/inc/animationfactory.hxx
index 9699909e6365..16bdb33823f0 100644
--- a/slideshow/source/inc/animationfactory.hxx
+++ b/slideshow/source/inc/animationfactory.hxx
@@ -2,7 +2,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
@@ -62,7 +62,7 @@ namespace slideshow
Given a SMIL XAnimate node, this factory generates the
appropriate Animation object from that, which will modify
the attribute as specified.
- */
+ */
class AnimationFactory : private boost::noncopyable
{
public:
@@ -98,23 +98,23 @@ namespace slideshow
FLAG_NO_SPRITE = 1
};
- static NumberAnimationSharedPtr createNumberPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static NumberAnimationSharedPtr createNumberPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0 );
+ int nFlags=0 );
- static EnumAnimationSharedPtr createEnumPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static EnumAnimationSharedPtr createEnumPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0 );
+ int nFlags=0 );
- static ColorAnimationSharedPtr createColorPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static ColorAnimationSharedPtr createColorPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0 );
+ int nFlags=0 );
/** Create scale or move animation
@@ -123,30 +123,30 @@ namespace slideshow
animations::AnimationTransformType::TRANSLATE or
animations::AnimationTransformType::SCALE.
*/
- static PairAnimationSharedPtr createPairPropertyAnimation( const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static PairAnimationSharedPtr createPairPropertyAnimation( const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- sal_Int16 nTransformType,
- int nFlags=0 );
+ sal_Int16 nTransformType,
+ int nFlags=0 );
- static StringAnimationSharedPtr createStringPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static StringAnimationSharedPtr createStringPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0 );
+ int nFlags=0 );
- static BoolAnimationSharedPtr createBoolPropertyAnimation( const ::rtl::OUString& rAttrName,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static BoolAnimationSharedPtr createBoolPropertyAnimation( const ::rtl::OUString& rAttrName,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0 );
+ int nFlags=0 );
- static NumberAnimationSharedPtr createPathMotionAnimation( const ::rtl::OUString& rSVGDPath,
- sal_Int16 nAdditive,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ static NumberAnimationSharedPtr createPathMotionAnimation( const ::rtl::OUString& rSVGDPath,
+ sal_Int16 nAdditive,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- int nFlags=0);
+ int nFlags=0);
private:
// default: constructor/destructor disabed
AnimationFactory();
diff --git a/slideshow/source/inc/animationfunction.hxx b/slideshow/source/inc/animationfunction.hxx
index 9695fdfcb4cb..2e94bc193a30 100644
--- a/slideshow/source/inc/animationfunction.hxx
+++ b/slideshow/source/inc/animationfunction.hxx
@@ -2,7 +2,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
@@ -52,7 +52,7 @@ namespace slideshow
/** Operator to calculate function value.
This method calculates the function value for the
- given time instant t.
+ given time instant t.
@param t
Current time instant, must be in the range [0,1]
diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx
index c8fe33c15df8..3f341fcb5695 100644
--- a/slideshow/source/inc/animationnode.hxx
+++ b/slideshow/source/inc/animationnode.hxx
@@ -2,7 +2,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
@@ -36,7 +36,7 @@
namespace slideshow {
namespace internal {
-/** This interface is used to mirror every XAnimateNode object
+/** This interface is used to mirror every XAnimateNode object
in the presentation core.
*/
class AnimationNode : public Disposable
@@ -59,27 +59,27 @@ public:
/// and any effect is removed from the document
ENDED =16
};
-
+
/** Query the corresponding XAnimationNode.
*/
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode >
getXAnimationNode() const = 0;
-
+
/** Init this node
-
+
If this node is not in state INVALID, init() sets up the
node state and schedules necessary events.
If this node has children, they have their init() called, too.
You will call this method whenever a slide is going to be
shown.
-
+
@return true, if init was successful; state has changed to UNRESOLVED
*/
virtual bool init() = 0;
-
+
/** Resolve node start time
-
+
Nodes can have unresolved start times, i.e. indefinite
start time for container nodes, or child nodes whose
parent has not yet started. Calling this method fixes
@@ -87,32 +87,32 @@ public:
node immediately starts its animations, that is only
the case for begin=0.0. The node will change its state
to RESOLVED.
-
+
@return true, if a start event was successfully scheduled.
*/
virtual bool resolve() = 0;
-
+
/** Immediately start this node
-
+
This method starts the animation on this node, without
begin timeout. The node will change its state to ACTIVE.
-
+
@return true, if start was successful. This method
might return false, if e.g. a restart is not permitted
on this node.
*/
virtual bool activate() = 0;
-
+
/** Immediately stop this node
-
+
This method stops the animation on this node. The node
will change its state to either ENDED or FROZEN,
depending on XAnimationNode attributes.
*/
virtual void deactivate() = 0;
-
+
/** End the animation on this node
-
+
This method force-ends animation on this node. Parents
may call this for their children, if their active
duration ends. An ended animation will no longer have
@@ -120,34 +120,34 @@ public:
change its state to ENDED.
*/
virtual void end() = 0;
-
+
/** Query node state
-
+
@return the current state of this animation node.
*/
virtual NodeState getState() const = 0;
-
+
/** Register a deactivating listener
-
+
This method registers another AnimationNode as an
deactivating listener, which gets notified via a
notifyDeactivating() call. The node calls all
registered listener, when it leaves the ACTIVE state.
-
+
@param rNotifee AnimationNode to notify
*/
virtual bool registerDeactivatingListener(
const ::boost::shared_ptr< AnimationNode >& rNotifee ) = 0;
-
+
/** Called to notify another AnimationNode's deactivation
-
+
@param rNotifier The instance who calls this method.
*/
virtual void notifyDeactivating(
const ::boost::shared_ptr< AnimationNode >& rNotifier ) = 0;
-
+
/** Query node whether it has an animation pending.
-
+
@return true, if this node (or at least one of its children)
has an animation pending. Used to determine if the main
sequence is actually empty, or contains effects
diff --git a/slideshow/source/inc/animationnodefactory.hxx b/slideshow/source/inc/animationnodefactory.hxx
index 30a278e9f57a..bc0c64314d2d 100644
--- a/slideshow/source/inc/animationnodefactory.hxx
+++ b/slideshow/source/inc/animationnodefactory.hxx
@@ -2,7 +2,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
@@ -55,19 +55,19 @@ namespace slideshow
public:
/** Create an AnimatioNode for the given XAnimationNode
*/
- static AnimationNodeSharedPtr createAnimationNode( const ::com::sun::star::uno::Reference<
+ static AnimationNodeSharedPtr createAnimationNode( const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode >& xNode,
const ::basegfx::B2DVector& rSlideSize,
- const SlideShowContext& rContext );
-
+ const SlideShowContext& rContext );
+
#if defined(VERBOSE) && defined(DBG_UTIL)
static void showTree( AnimationNodeSharedPtr& pRootNode );
# define SHOW_NODE_TREE(a) AnimationNodeFactory::showTree(a)
#else
# define SHOW_NODE_TREE(a)
#endif
-
+
private:
// default: constructor/destructor disabled
AnimationNodeFactory();
diff --git a/slideshow/source/inc/attributableshape.hxx b/slideshow/source/inc/attributableshape.hxx
index ee20974c2a13..1efba90b7205 100644
--- a/slideshow/source/inc/attributableshape.hxx
+++ b/slideshow/source/inc/attributableshape.hxx
@@ -2,7 +2,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
@@ -118,7 +118,7 @@ namespace slideshow
@return the topmost layer
*/
virtual ShapeAttributeLayerSharedPtr getTopmostAttributeLayer() const = 0;
-
+
/** Change default shape visibility
@@ -130,8 +130,8 @@ namespace slideshow
When true, shape will be visible, when false,
invisible (modulo attribute layer overrides).
*/
- virtual void setVisibility( bool bVisible ) = 0;
-
+ virtual void setVisibility( bool bVisible ) = 0;
+
// Sub-item handling
//------------------------------------------------------------------
@@ -142,7 +142,7 @@ namespace slideshow
to request specific tree nodes for this shape.
*/
virtual const DocTreeNodeSupplier& getTreeNodeSupplier() const = 0;
- virtual DocTreeNodeSupplier& getTreeNodeSupplier() = 0;
+ virtual DocTreeNodeSupplier& getTreeNodeSupplier() = 0;
/** Query the subset this shape displays.
@@ -192,7 +192,7 @@ namespace slideshow
@attention To maintain view integrity, this method
should only be called from the LayerManager
-
+
@param o_rSubset
The requested Shape
@@ -203,8 +203,8 @@ namespace slideshow
@return true, if the shape was newly created, and
false, if an already existing subset is returned.
*/
- virtual bool createSubset( AttributableShapeSharedPtr& o_rSubset,
- const DocTreeNode& rTreeNode ) = 0;
+ virtual bool createSubset( AttributableShapeSharedPtr& o_rSubset,
+ const DocTreeNode& rTreeNode ) = 0;
/** Revoke a previously generated shape subset.
diff --git a/slideshow/source/inc/attributemap.hxx b/slideshow/source/inc/attributemap.hxx
index 1722ee566dde..24db268a352b 100644
--- a/slideshow/source/inc/attributemap.hxx
+++ b/slideshow/source/inc/attributemap.hxx
@@ -2,7 +2,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
@@ -39,7 +39,7 @@ namespace slideshow
{
/** Type of to-be-animated attribute.
- This enum describes the type of an animated
+ This enum describes the type of an animated
attribute.
*/
enum AttributeType
diff --git a/slideshow/source/inc/boolanimation.hxx b/slideshow/source/inc/boolanimation.hxx
index 4b576669e535..c7d951ee14fa 100644
--- a/slideshow/source/inc/boolanimation.hxx
+++ b/slideshow/source/inc/boolanimation.hxx
@@ -2,7 +2,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
@@ -49,7 +49,7 @@ namespace slideshow
{
public:
typedef bool ValueType;
-
+
/** Set the animation to the given value
@param bValue
diff --git a/slideshow/source/inc/coloranimation.hxx b/slideshow/source/inc/coloranimation.hxx
index 795f9a13fb9e..d7c149dc2ee0 100644
--- a/slideshow/source/inc/coloranimation.hxx
+++ b/slideshow/source/inc/coloranimation.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/cursormanager.hxx b/slideshow/source/inc/cursormanager.hxx
index 3f58717156ab..4b06e963f201 100644
--- a/slideshow/source/inc/cursormanager.hxx
+++ b/slideshow/source/inc/cursormanager.hxx
@@ -2,7 +2,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
@@ -49,7 +49,7 @@ namespace slideshow
{
public:
virtual ~CursorManager() {}
-
+
/** Request different cursor shape.
@param nCursorShape
diff --git a/slideshow/source/inc/debug.hxx b/slideshow/source/inc/debug.hxx
index 17742121981f..4bf7d43a4696 100644
--- a/slideshow/source/inc/debug.hxx
+++ b/slideshow/source/inc/debug.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx
index 4086aa2aba77..c4db6e66b178 100644
--- a/slideshow/source/inc/delayevent.hxx
+++ b/slideshow/source/inc/delayevent.hxx
@@ -2,7 +2,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
@@ -43,7 +43,7 @@ class Delay : public Event, private ::boost::noncopyable
{
public:
typedef ::boost::function0<void> FunctorT;
-
+
template <typename FuncT>
Delay( FuncT const& func,
double nTimeout
@@ -54,7 +54,7 @@ public:
) :
#endif
mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {}
-
+
Delay( const boost::function0<void>& func,
double nTimeout
#if OSL_DEBUG_LEVEL > 1
@@ -66,16 +66,16 @@ public:
mnTimeout(nTimeout),
maFunc(func),
mbWasFired(false) {}
-
+
// Event:
virtual bool fire();
virtual bool isCharged() const;
virtual double getActivationTime( double nCurrentTime ) const;
// Disposable:
virtual void dispose();
-
+
private:
- double const mnTimeout;
+ double const mnTimeout;
FunctorT maFunc;
bool mbWasFired;
};
@@ -83,13 +83,13 @@ private:
#if OSL_DEBUG_LEVEL <= 1
/** Generate delay event
-
+
@param func
Functor to call when the event fires.
-
+
@param nTimeout
Timeout in seconds, to wait until functor is called.
-
+
@return generated delay event
*/
template <typename FuncT>
@@ -99,10 +99,10 @@ inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout )
}
/** Generate immediate event
-
+
@param func
Functor to call when the event fires.
-
+
@return generated immediate event.
*/
template <typename FuncT>
@@ -127,7 +127,7 @@ public:
: Delay(func, nTimeout, rsDescription),
FROM_FUNCTION(from_function),
FROM_FILE(from_file), FROM_LINE(from_line) {}
-
+
char const* const FROM_FUNCTION;
char const* const FROM_FILE;
int const FROM_LINE;
diff --git a/slideshow/source/inc/disposable.hxx b/slideshow/source/inc/disposable.hxx
index 9d934d1575d3..5e3c4f4d765e 100644
--- a/slideshow/source/inc/disposable.hxx
+++ b/slideshow/source/inc/disposable.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/doctreenode.hxx b/slideshow/source/inc/doctreenode.hxx
index 33591c10dba0..c8ad37f9f109 100644
--- a/slideshow/source/inc/doctreenode.hxx
+++ b/slideshow/source/inc/doctreenode.hxx
@@ -2,7 +2,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
@@ -49,7 +49,7 @@ namespace slideshow
represented in a tree structure, with DocTreeNodes as the
nodes. Instances of this class can be queried from the
DocTreeNodeSupplier interface.
-
+
This class has nothing to do with the Draw document tree.
*/
class DocTreeNode
@@ -83,7 +83,7 @@ namespace slideshow
/** Create empty tree node
*/
- DocTreeNode() :
+ DocTreeNode() :
mnStartIndex(-1),
mnEndIndex(-1),
meType(NODETYPE_INVALID)
@@ -92,7 +92,7 @@ namespace slideshow
/** Create tree node from start and end index.
- Create a tree node for the given range and type.
+ Create a tree node for the given range and type.
@param nStartIndex
Start index
@@ -103,23 +103,23 @@ namespace slideshow
@param eType
Node type
*/
- DocTreeNode( sal_Int32 nStartIndex,
- sal_Int32 nEndIndex,
- NodeType eType ) :
+ DocTreeNode( sal_Int32 nStartIndex,
+ sal_Int32 nEndIndex,
+ NodeType eType ) :
mnStartIndex(nStartIndex),
mnEndIndex(nEndIndex),
meType(eType)
{
}
- bool isEmpty() const { return mnStartIndex == mnEndIndex; }
+ bool isEmpty() const { return mnStartIndex == mnEndIndex; }
- sal_Int32 getStartIndex() const { return mnStartIndex; }
- sal_Int32 getEndIndex() const { return mnEndIndex; }
- void setStartIndex( sal_Int32 nIndex ) { mnStartIndex = nIndex; }
- void setEndIndex( sal_Int32 nIndex ) { mnEndIndex = nIndex; }
+ sal_Int32 getStartIndex() const { return mnStartIndex; }
+ sal_Int32 getEndIndex() const { return mnEndIndex; }
+ void setStartIndex( sal_Int32 nIndex ) { mnStartIndex = nIndex; }
+ void setEndIndex( sal_Int32 nIndex ) { mnEndIndex = nIndex; }
- NodeType getType() const { return meType; }
+ NodeType getType() const { return meType; }
void reset()
{
@@ -129,9 +129,9 @@ namespace slideshow
}
private:
- sal_Int32 mnStartIndex;
- sal_Int32 mnEndIndex;
- NodeType meType;
+ sal_Int32 mnStartIndex;
+ sal_Int32 mnEndIndex;
+ NodeType meType;
};
diff --git a/slideshow/source/inc/doctreenodesupplier.hxx b/slideshow/source/inc/doctreenodesupplier.hxx
index 971ad028cb03..0dd0125502ef 100644
--- a/slideshow/source/inc/doctreenodesupplier.hxx
+++ b/slideshow/source/inc/doctreenodesupplier.hxx
@@ -2,7 +2,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
@@ -92,9 +92,9 @@ namespace slideshow
@throws ShapeLoadFailedException, if tree node structure
cannot be determined.
- */
- virtual DocTreeNode getTreeNode( sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
+ */
+ virtual DocTreeNode getTreeNode( sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
/** Query number of tree nodes of the given type this
subset contains.
@@ -114,7 +114,7 @@ namespace slideshow
@throws ShapeLoadFailedException, if tree node structure
cannot be determined.
*/
- virtual sal_Int32 getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode,
+ virtual sal_Int32 getNumberOfSubsetTreeNodes( const DocTreeNode& rParentNode,
DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
/** Create DocTreeNode from shape subset.
@@ -140,10 +140,10 @@ namespace slideshow
@throws ShapeLoadFailedException, if tree node structure
cannot be determined.
- */
- virtual DocTreeNode getSubsetTreeNode( const DocTreeNode& rParentNode,
- sal_Int32 nNodeIndex,
- DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
+ */
+ virtual DocTreeNode getSubsetTreeNode( const DocTreeNode& rParentNode,
+ sal_Int32 nNodeIndex,
+ DocTreeNode::NodeType eNodeType ) const = 0; // throw ShapeLoadFailedException;
};
}
diff --git a/slideshow/source/inc/enumanimation.hxx b/slideshow/source/inc/enumanimation.hxx
index 6934cf4ebec2..56dda31685ec 100644
--- a/slideshow/source/inc/enumanimation.hxx
+++ b/slideshow/source/inc/enumanimation.hxx
@@ -2,7 +2,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
@@ -63,7 +63,7 @@ namespace slideshow
This is necessary for pure To or By animations, as the
Activity cannot determine a sensible start value
- otherwise.
+ otherwise.
@attention Note that you are only permitted to query
for the underlying value, if the animation has actually
diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx
index 9f3199f294ce..2c0c338b2ff1 100644
--- a/slideshow/source/inc/event.hxx
+++ b/slideshow/source/inc/event.hxx
@@ -2,7 +2,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
@@ -47,30 +47,30 @@ public:
#endif
/** Execute the event.
-
+
@return true, if event was successfully executed.
*/
virtual bool fire() = 0;
-
+
/** Query whether this event is still charged, i.e. able
to fire.
-
+
Inactive events are ignored by the normal event
containers (EventQueue, UserEventQueue etc.), and no
explicit fire() is called upon them.
-
+
@return true, if this event has already been fired.
*/
virtual bool isCharged() const = 0;
-
+
/** Query the activation time instant this event shall be
fired, if it was inserted at instant nCurrentTime into
the queue.
-
+
@param nCurrentTime
The time from which the activation time is to be
calculated from.
-
+
@return the time instant in seconds, on which this
event is to be fired.
*/
diff --git a/slideshow/source/inc/eventhandler.hxx b/slideshow/source/inc/eventhandler.hxx
index 7ec4af9088bd..87a30a943443 100644
--- a/slideshow/source/inc/eventhandler.hxx
+++ b/slideshow/source/inc/eventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx
index d07e1b20fc05..23b550adb8e7 100644
--- a/slideshow/source/inc/eventmultiplexer.hxx
+++ b/slideshow/source/inc/eventmultiplexer.hxx
@@ -2,7 +2,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
@@ -54,7 +54,7 @@ struct EventMultiplexerImpl;
/** This class multiplexes user-activated and
slide-show global events.
-
+
This class listens at the XSlideShowView and fires events
registered for certain user actions. Furthermore, global
slide show state changes (such as start or end of a slide)
@@ -68,7 +68,7 @@ class EventMultiplexer : private ::boost::noncopyable
{
public:
/** Create an event multiplexer
-
+
@param rEventQueue
Reference to the main event queue. Since we hold this
object by plain reference, it must live longer than we
@@ -90,49 +90,49 @@ public:
UnoViewContainer const& rViewContainer );
~EventMultiplexer();
-
+
// Management methods
// =========================================================
-
+
/** Clear all registered handlers.
*/
void clear();
-
+
// Automatic mode methods
// =========================================================
-
+
/** Change automatic mode.
-
+
@param bIsAuto
When true, events will be fired automatically, not
only triggered by UI events. When false, auto events
will quit.
*/
void setAutomaticMode( bool bIsAuto );
-
+
/** Get automatic mode setting.
*/
bool getAutomaticMode() const;
-
+
/** Set the timeout for automatic mode.
-
+
@param nTimeout
Timeout, between end of effect until start of next
effect.
*/
void setAutomaticTimeout( double nTimeout );
-
+
/** Get automatic mode timeout value.
*/
double getAutomaticTimeout() const;
-
+
// Handler registration methods
// =========================================================
-
+
/** Register an event handler that will be called when views are
changed.
-
+
For each view added, viewAdded() will be called on the
handler. For each view removed, viewRemoved() will be
called. Each modified view will cause a viewChanged() call on
@@ -140,19 +140,19 @@ public:
You don't need to deregister the handler, it will be
automatically removed, once the pointee becomes stale.
-
+
@param rHandler
Handler to call.
*/
void addViewHandler( const ViewEventHandlerWeakPtr& rHandler );
void removeViewHandler( const ViewEventHandlerWeakPtr& rHandler );
-
+
/** Register an event handler that will be called when a view gets
clobbered.
-
+
Note that <em>all</em> registered handlers will be called when
the event. This is in contrast to the mouse events below.
-
+
@param rHandler
Handler to call when a view needs a repaint
*/
@@ -161,7 +161,7 @@ public:
/** Register an event handler that will be called when
XShapeListeners are changed.
-
+
@param rHandler
Handler to call when a shape listener changes
*/
@@ -170,7 +170,7 @@ public:
/** Register an event handler that will be called when
XShapeListeners are changed.
-
+
@param rHandler
Handler to call when a shape listener changes
*/
@@ -179,7 +179,7 @@ public:
/** Register an event handler that will be called when
user paint parameters change.
-
+
@param rHandler
Handler to call when a shape listener changes
*/
@@ -188,15 +188,15 @@ public:
/** Register an event handler that will be called when the
user requests the next effect.
-
+
For every nextEffect event, only one of the handlers
registered here is called. The handlers are considered
with decreasing priority, i.e. the handler with the
currently highest priority will be called.
-
+
@param rHandler
Handler to call when the next effect should start
-
+
@param nPriority
Priority with which the handlers are called. The
higher the priority, the earlier this handler will be
@@ -205,40 +205,40 @@ public:
void addNextEffectHandler( const EventHandlerSharedPtr& rHandler,
double nPriority );
void removeNextEffectHandler( const EventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when the
slide is just shown.
-
+
Note that <em>all</em> registered handlers will be called
when the slide start occurs. This is in contrast to
the mouse events below.
-
+
@param rHandler
Handler to call when the next slide starts
*/
void addSlideStartHandler( const EventHandlerSharedPtr& rHandler );
void removeSlideStartHandler( const EventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when the
slide is about to vanish.
-
+
Note that <em>all</em> registered handlers will be
called when the slide end occurs. This is in contrast
to the mouse events below.
-
+
@param rHandler
Handler to call when the current slide ends
*/
void addSlideEndHandler( const EventHandlerSharedPtr& rHandler );
void removeSlideEndHandler( const EventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when an
XAnimationNode starts its active duration.
-
+
Note that <em>all</em> registered handlers will be called
when the animation start occurs. This is in contrast to
the mouse events below.
-
+
@param rHandler
Handler to call when the animation start
*/
@@ -246,14 +246,14 @@ public:
const AnimationEventHandlerSharedPtr& rHandler );
void removeAnimationStartHandler(
const AnimationEventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when an
XAnimationNode ends its active duration.
-
+
Note that <em>all</em> registered handlers will be called
when the animation end occurs. This is in contrast to
the mouse events below.
-
+
@param rHandler
Handler to call when the animation ends
*/
@@ -265,11 +265,11 @@ public:
/** Register an event handler that will be called when the
main animation sequence of a slide ends its active
duration.
-
+
Note that <em>all</em> registered handlers will be
called when the animation end occurs. This is in
contrast to the mouse events below.
-
+
@param rHandler
Handler to call when the animation ends
*/
@@ -277,14 +277,14 @@ public:
const EventHandlerSharedPtr& rHandler );
void removeSlideAnimationsEndHandler(
const EventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when an
XAudio node's sound stops playing.
-
+
Note that <em>all</em> registered handlers will be
called when the audio stops. This is in contrast to
the mouse events below.
-
+
@param rHandler
Handler to call when the audio stops
*/
@@ -292,14 +292,14 @@ public:
const AnimationEventHandlerSharedPtr& rHandler );
void removeAudioStoppedHandler(
const AnimationEventHandlerSharedPtr& rHandler );
-
+
/** Register an event handler that will be called when an
XCommand node's with the command STOPAUDIO is activated.
-
+
Note that <em>all</em> registered handlers will be
called when the audio stops. This is in contrast to
the mouse events below.
-
+
@param rHandler
Handler to call when command is activated
*/
@@ -307,20 +307,20 @@ public:
const AnimationEventHandlerSharedPtr& rHandler );
void removeCommandStopAudioHandler(
const AnimationEventHandlerSharedPtr& rHandler );
-
+
/** Register a handler that is called when the show enters
or exits pause mode.
*/
void addPauseHandler( const PauseEventHandlerSharedPtr& rHandler );
void removePauseHandler( const PauseEventHandlerSharedPtr& rHandler );
-
+
/** Register a mouse handler that is called on mouse click
-
+
For every mouse click, only one of the handlers
registered here is called. The handlers are considered
with decreasing priority, i.e. the handler with the
currently highest priority will be called.
-
+
Since the handlers can reject down and up events
individually, handlers should expect to be called with
non-matching down and up-press counts. If your handler
@@ -330,15 +330,15 @@ public:
void addClickHandler( const MouseEventHandlerSharedPtr& rHandler,
double nPriority );
void removeClickHandler( const MouseEventHandlerSharedPtr& rHandler );
-
+
/** Register a mouse handler that is called on a double
mouse click
-
+
For every mouse double click, only one of the handlers
registered here is called. The handlers are considered
with decreasing priority, i.e. the handler with the
currently highest priority will be called.
-
+
Since the handlers can reject down and up events
individually, handlers should expect to be called with
non-matching down and up-press counts. If your handler
@@ -348,9 +348,9 @@ public:
void addDoubleClickHandler( const MouseEventHandlerSharedPtr& rHandler,
double nPriority );
void removeDoubleClickHandler( const MouseEventHandlerSharedPtr& rHandler );
-
+
/** Register a mouse handler that is called for mouse moves.
-
+
For every mouse move, only one of the handlers
registered here is called. The handlers are considered
with decreasing priority, i.e. the handler with the
@@ -360,7 +360,7 @@ public:
double nPriority );
void removeMouseMoveHandler( const MouseEventHandlerSharedPtr& rHandler );
-
+
/** Registers a hyperlink click handler.
For every hyperlink click, only one of the handlers registered
@@ -371,31 +371,31 @@ public:
@param rHandler
@param nPriority
*/
- void addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler,
+ void addHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler,
double nPriority );
void removeHyperlinkHandler( const HyperlinkHandlerSharedPtr& rHandler );
-
-
+
+
// External event notifications
// =========================================================
-
+
/** View added.
-
+
This method adds another view, which the show is
displayed on. On every added view, the EventMultiplexer
registers mouse and motion event listeners.
*/
bool notifyViewAdded( const UnoViewSharedPtr& rView );
-
+
/** View removed
-
+
This method removes a view. Registered mouse and
motion event listeners are revoked.
*/
bool notifyViewRemoved( const UnoViewSharedPtr& rView );
-
+
/** View changed
-
+
This method announces a changed view to all view
listeners. View changes include size and transformation.
@@ -403,9 +403,9 @@ public:
View that has changed
*/
bool notifyViewChanged( const UnoViewSharedPtr& rView );
-
+
/** View changed
-
+
This method announces a changed view to all view
listeners. View changes include size and transformation.
@@ -416,15 +416,15 @@ public:
::com::sun::star::presentation::XSlideShowView>& xView );
/** All Views changed
-
+
This method announces to all view listeners that
<em>every</em> known view has changed. View changes include
size and transformation.
*/
bool notifyViewsChanged();
-
+
/** View clobbered
-
+
This method announces that the given view has been clobbered
by something external to the slideshow, and needs an update.
@@ -469,11 +469,11 @@ public:
the notification.
*/
bool notifyShapeCursorChange( const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XShape>& xShape,
+ ::com::sun::star::drawing::XShape>& xShape,
sal_Int16 nPointerShape );
/** Notify a new user paint color
-
+
Sending this notification also implies that user paint is
enabled. User paint denotes the feature to draw colored lines
on top of the slide content.
@@ -485,23 +485,23 @@ public:
bool notifyUserPaintColor( RGBColor const& rUserColor );
/** Notify a new user paint width
-
+
Sending this notification also implies that user paint is
enabled. .
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyUserPaintStrokeWidth( double rUserStrokeWidth );
-
-
+
+
/** Notify a new user paint erase all ink mode
-
+
Sending this notification also implies that user paint is
enabled. User paint denotes the feature to draw colored lines
on top of the slide content.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
@@ -510,9 +510,9 @@ public:
bool notifySwitchPenMode();
bool notifySwitchEraserMode();
bool notifyEraseInkWidth( sal_Int32 rEraseInkSize );
-
+
/** Notify that user paint is disabled
-
+
User paint denotes the feature to draw colored lines on top of
the slide content.
@@ -523,120 +523,120 @@ public:
bool notifyUserPaintDisabled();
/** Notify that the user requested the next effect.
-
+
This requests the slideshow to display the next
effect, or move to the next slide, if none are left.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyNextEffect();
-
- /** Notify that a new slide is about to be displayed
+
+ /** Notify that a new slide is about to be displayed
*/
bool notifySlideTransitionStarted();
/** Notify that a new slide has started
-
+
This method is to be used from the Presentation object
to signal that a new slide is starting now. This will
invoke all registered slide start handlers.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifySlideStartEvent();
-
+
/** Notify that a slide has ended
-
+
This method is to be used from the Presentation object
to signal that a slide is ending now. This will invoke
all registered slide end handlers.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifySlideEndEvent();
-
+
/** Notify that the given node enters its active duration.
-
+
This method is to be used from the AnimationNode
objects to signal that the active duration
begins. This will invoke all registered animation
start handlers.
-
+
@param rNode
Node which enters active duration.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyAnimationStart( const boost::shared_ptr<AnimationNode>& rNode );
-
+
/** Notify that the given node leaves its active duration.
-
+
This method is to be used from the AnimationNode
objects to signal that the active duration
ends now. This will invoke all registered animation
end handlers.
-
+
@param rNode
Node which leaves active duration.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyAnimationEnd( const boost::shared_ptr<AnimationNode>& rNode );
-
+
/** Notify that the slide animations sequence leaves its
active duration.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifySlideAnimationsEnd();
-
+
/** Notify that for the given node, audio output has stopped.
-
+
This method is to be used from the AnimationNode
objects to signal that audio playback has just
stopped. This will invoke all registered audio
stopped andlers.
-
+
@param rNode
Node for which audio has stopped.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyAudioStopped( const boost::shared_ptr<AnimationNode>& rNode );
-
+
/** Notify that the show has entered or exited pause mode
-
+
This method is to be used from the Presentation object
to signal that a slide is entering (bPauseShow=true)
or exiting (bPauseShow=false) pause mode. This will
invoke all registered slide end handlers.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyPauseMode( bool bPauseShow );
-
+
/** Notify that all audio has to be stoped.
-
+
This method is used by XCommand nodes and all sound
playing nodes should listen for this command and
stop theire sounds when its fired.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
@@ -644,13 +644,13 @@ public:
bool notifyCommandStopAudio( const boost::shared_ptr<AnimationNode>& rNode );
/** Botifies that a hyperlink has been clicked.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
bool notifyHyperlinkClicked( ::rtl::OUString const& hyperLink );
-
+
private:
boost::scoped_ptr<EventMultiplexerImpl> mpImpl;
};
diff --git a/slideshow/source/inc/eventqueue.hxx b/slideshow/source/inc/eventqueue.hxx
index e948b4f2379f..19f3358f1298 100644
--- a/slideshow/source/inc/eventqueue.hxx
+++ b/slideshow/source/inc/eventqueue.hxx
@@ -2,7 +2,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
@@ -76,7 +76,7 @@ namespace slideshow
even when they schedule new regular events without delay.
*/
bool addEventWhenQueueIsEmpty (const EventSharedPtr& rpEvent);
-
+
/** Process the event queue.
This method executes all events whose timeout has
@@ -97,7 +97,7 @@ namespace slideshow
bool isEmpty() const;
/** Query timeout for the topmost event in the queue.
-
+
@return Timeout in seconds, until the next event is
ready. The time returned here is relative to the pres
timer (i.e. the timer specified at the EventQueue
@@ -119,19 +119,19 @@ namespace slideshow
@attention do only call from event loop, this calls process_()!
*/
void forceEmpty();
-
+
/** Gets the queue's timer object.
*/
::boost::shared_ptr< ::canvas::tools::ElapsedTime > const &
getTimer() const { return mpTimer; }
-
+
private:
mutable ::osl::Mutex maMutex;
struct EventEntry : public ::std::unary_function<EventEntry, bool>
{
- EventSharedPtr pEvent;
- double nTime;
+ EventSharedPtr pEvent;
+ double nTime;
bool operator<( const EventEntry& ) const; // to leverage priority_queue's default compare
@@ -140,12 +140,12 @@ namespace slideshow
};
typedef ::std::priority_queue< EventEntry > ImplQueueType;
- ImplQueueType maEvents;
+ ImplQueueType maEvents;
typedef ::std::vector<EventEntry> EventEntryVector;
EventEntryVector maNextEvents;
ImplQueueType maNextNextEvents;
void process_( bool bFireAllEvents );
-
+
// perform timing of events via relative time
// measurements. The world time starts, when the
// EventQueue object is created
diff --git a/slideshow/source/inc/expressionnode.hxx b/slideshow/source/inc/expressionnode.hxx
index b6c4c4627ae3..47cb6abf0898 100644
--- a/slideshow/source/inc/expressionnode.hxx
+++ b/slideshow/source/inc/expressionnode.hxx
@@ -2,7 +2,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
@@ -47,7 +47,7 @@ namespace slideshow
{
public:
/** Predicate whether this node is constant.
-
+
This predicate returns true, if this node is
neither time- nor ViewInfo dependent. This allows
for certain obtimizations, i.e. not the full
diff --git a/slideshow/source/inc/expressionnodefactory.hxx b/slideshow/source/inc/expressionnodefactory.hxx
index f064b68cb9f0..b0ea5e9a2205 100644
--- a/slideshow/source/inc/expressionnodefactory.hxx
+++ b/slideshow/source/inc/expressionnodefactory.hxx
@@ -2,7 +2,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
@@ -52,30 +52,30 @@ namespace slideshow
public:
static ExpressionNodeSharedPtr createConstantValueExpression( double rConstantValue );
- static ExpressionNodeSharedPtr createValueTExpression ();
+ static ExpressionNodeSharedPtr createValueTExpression ();
- static ExpressionNodeSharedPtr createPlusExpression ( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS );
- static ExpressionNodeSharedPtr createMinusExpression ( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS );
- static ExpressionNodeSharedPtr createMultipliesExpression( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS );
- static ExpressionNodeSharedPtr createDividesExpression ( const ExpressionNodeSharedPtr& rLHS,
- const ExpressionNodeSharedPtr& rRHS );
+ static ExpressionNodeSharedPtr createPlusExpression ( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS );
+ static ExpressionNodeSharedPtr createMinusExpression ( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS );
+ static ExpressionNodeSharedPtr createMultipliesExpression( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS );
+ static ExpressionNodeSharedPtr createDividesExpression ( const ExpressionNodeSharedPtr& rLHS,
+ const ExpressionNodeSharedPtr& rRHS );
/** Composes two ExpressionNode function.
The resulting expression will calculate
rOuterFunction( rInnerFunction(t) ).
*/
- static ExpressionNodeSharedPtr createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction );
+ static ExpressionNodeSharedPtr createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction );
- static ExpressionNodeSharedPtr createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction );
+ static ExpressionNodeSharedPtr createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction );
- static ExpressionNodeSharedPtr createMaxExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
- const ExpressionNodeSharedPtr& rInnerFunction );
+ static ExpressionNodeSharedPtr createMaxExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
+ const ExpressionNodeSharedPtr& rInnerFunction );
};
}
}
diff --git a/slideshow/source/inc/externalmediashape.hxx b/slideshow/source/inc/externalmediashape.hxx
index 9e5c412c4815..fa1ccc3922ef 100644
--- a/slideshow/source/inc/externalmediashape.hxx
+++ b/slideshow/source/inc/externalmediashape.hxx
@@ -2,7 +2,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
@@ -52,7 +52,7 @@ namespace slideshow
/** Notify the Shape that it should start with playback
This method enters playback mode on all registered
- views. It makes the media initially visible (for videos).
+ views. It makes the media initially visible (for videos).
*/
virtual void play() = 0;
diff --git a/slideshow/source/inc/framerate.hxx b/slideshow/source/inc/framerate.hxx
index c8e7c0dcd68b..4ffe891b31fc 100644
--- a/slideshow/source/inc/framerate.hxx
+++ b/slideshow/source/inc/framerate.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/hslcolor.hxx b/slideshow/source/inc/hslcolor.hxx
index db14268ea893..a2bd8e918bd0 100644
--- a/slideshow/source/inc/hslcolor.hxx
+++ b/slideshow/source/inc/hslcolor.hxx
@@ -2,7 +2,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
@@ -40,7 +40,7 @@ namespace slideshow
{
class RGBColor;
- /** HSL color space class.
+ /** HSL color space class.
*/
class HSLColor
{
@@ -51,19 +51,19 @@ namespace slideshow
explicit HSLColor( const RGBColor& rColor );
/** Hue of the color.
-
+
@return hue, is in the range [0,360]
*/
double getHue() const;
/** Saturation of the color.
-
+
@return saturation, is in the range [0,1]
*/
double getSaturation() const;
/** Luminance of the color.
-
+
@return luminance, is in the range [0,1]
*/
double getLuminance() const;
@@ -96,21 +96,21 @@ namespace slideshow
private:
// default copy/assignment are okay
- // HSLColor(const HSLColor&);
+ // HSLColor(const HSLColor&);
// HSLColor& operator=( const HSLColor& );
- HSLTriple maHSLTriple;
+ HSLTriple maHSLTriple;
/// Pre-calculated value, needed for conversion back to RGB
- double mnMagicValue;
- };
+ double mnMagicValue;
+ };
HSLColor operator+( const HSLColor& rLHS, const HSLColor& rRHS );
HSLColor operator*( const HSLColor& rLHS, const HSLColor& rRHS );
HSLColor operator*( double nFactor, const HSLColor& rRHS );
/** HSL color linear interpolator.
-
+
@param t
As usual, t must be in the [0,1] range
diff --git a/slideshow/source/inc/hslcoloranimation.hxx b/slideshow/source/inc/hslcoloranimation.hxx
index b35f25e3f13f..b86e801eaeed 100644
--- a/slideshow/source/inc/hslcoloranimation.hxx
+++ b/slideshow/source/inc/hslcoloranimation.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/hyperlinkarea.hxx b/slideshow/source/inc/hyperlinkarea.hxx
index 14a1064b51d4..07be394a540e 100644
--- a/slideshow/source/inc/hyperlinkarea.hxx
+++ b/slideshow/source/inc/hyperlinkarea.hxx
@@ -2,7 +2,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
@@ -67,7 +67,7 @@ namespace slideshow
virtual HyperlinkRegions getHyperlinkRegions() const = 0;
/** Retrieve priority of link area
-
+
@return the priority of the link area. Link areas with
higher priority will receive hyperlink clicks in favor
of areas with less priority, if they cover the same
@@ -86,12 +86,12 @@ namespace slideshow
// make functor adaptable (to boost::bind)
typedef bool result_type;
- bool operator()(const boost::shared_ptr< HyperlinkArea >& rLHS,
+ bool operator()(const boost::shared_ptr< HyperlinkArea >& rLHS,
const boost::shared_ptr< HyperlinkArea >& rRHS) const
{
const double nPrioL( rLHS->getHyperlinkPriority() );
const double nPrioR( rRHS->getHyperlinkPriority() );
-
+
// if prios are equal, tie-break on ptr value
return nPrioL == nPrioR ? rLHS.get() < rRHS.get() : nPrioL < nPrioR;
}
diff --git a/slideshow/source/inc/hyperlinkhandler.hxx b/slideshow/source/inc/hyperlinkhandler.hxx
index 0d3ccfd2ed0d..25b0d5bc4843 100644
--- a/slideshow/source/inc/hyperlinkhandler.hxx
+++ b/slideshow/source/inc/hyperlinkhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/interruptabledelayevent.hxx b/slideshow/source/inc/interruptabledelayevent.hxx
index 4319024365f8..baa074ca8625 100644
--- a/slideshow/source/inc/interruptabledelayevent.hxx
+++ b/slideshow/source/inc/interruptabledelayevent.hxx
@@ -2,7 +2,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
@@ -45,8 +45,8 @@ namespace slideshow
class DelayFacade : public Event
{
public:
- DelayFacade( const EventSharedPtr& rEvent,
- double nTimeout ) :
+ DelayFacade( const EventSharedPtr& rEvent,
+ double nTimeout ) :
#if OSL_DEBUG_LEVEL > 1
Event(::rtl::OUString::createFromAscii("DelayFacade")),
#endif
@@ -89,8 +89,8 @@ namespace slideshow
}
private:
- EventSharedPtr mpEvent;
- double mnTimeout;
+ EventSharedPtr mpEvent;
+ double mnTimeout;
};
/// Return value for makeInterruptableDelay()
@@ -100,14 +100,14 @@ namespace slideshow
event. When enqueued, this event will fire the
requested action only after the specified timeout.
*/
- EventSharedPtr mpTimeoutEvent;
+ EventSharedPtr mpTimeoutEvent;
/** This member contains a pointer to the interruption
event. When enqueued, this event will fire
immediately, interrupting a potentially waiting
timeout event.
*/
- EventSharedPtr mpImmediateEvent;
+ EventSharedPtr mpImmediateEvent;
};
/** Generate an interruptable delay event.
@@ -134,8 +134,8 @@ namespace slideshow
specified amount of time, and the other fires the given
functor immediately.
*/
- template< typename Functor > InterruptableEventPair makeInterruptableDelay( const Functor& rFunctor,
- double nTimeout )
+ template< typename Functor > InterruptableEventPair makeInterruptableDelay( const Functor& rFunctor,
+ double nTimeout )
{
InterruptableEventPair aRes;
diff --git a/slideshow/source/inc/intrinsicanimationeventhandler.hxx b/slideshow/source/inc/intrinsicanimationeventhandler.hxx
index 6df41d704900..40935d910a23 100644
--- a/slideshow/source/inc/intrinsicanimationeventhandler.hxx
+++ b/slideshow/source/inc/intrinsicanimationeventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx
index 1468c5c40e9a..533f04ff6420 100644
--- a/slideshow/source/inc/listenercontainer.hxx
+++ b/slideshow/source/inc/listenercontainer.hxx
@@ -2,7 +2,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
@@ -39,10 +39,10 @@ namespace slideshow {
namespace internal {
/** Container for objects that can be notified.
-
+
This templatized container holds listener objects, than can get
notified (by calling certain methods on them).
-
+
@tpl Listener
Type for the listener objects to be held
@@ -92,8 +92,8 @@ public:
Guard aGuard(*this);
const typename container_type::const_iterator aEnd( maListeners.end() );
- if( std::find( maListeners.begin(),
- aEnd,
+ if( std::find( maListeners.begin(),
+ aEnd,
rListener ) != aEnd )
{
return true; // already added
@@ -155,7 +155,7 @@ public:
if( maListeners.size() > 1 )
{
std::inplace_merge(
- maListeners.begin(),
+ maListeners.begin(),
boost::prior(maListeners.end()),
maListeners.end() );
}
@@ -181,24 +181,24 @@ public:
const typename container_type::iterator aEnd( maListeners.end() );
typename container_type::iterator aIter;
- if( (aIter=std::remove(maListeners.begin(),
- aEnd,
+ if( (aIter=std::remove(maListeners.begin(),
+ aEnd,
rListener)) == aEnd )
{
return false; // listener not found
}
-
+
maListeners.erase( aIter, aEnd );
return true;
}
/// Removes all listeners in one go
- void clear()
+ void clear()
{
Guard aGuard(*this);
-
- maListeners.clear();
+
+ maListeners.clear();
}
/** Apply functor to one listener
@@ -224,7 +224,7 @@ public:
const bool bRet(
ListenerOperations<ListenerT>::notifySingleListener(
- local,
+ local,
func ));
{
@@ -260,7 +260,7 @@ public:
const bool bRet(
ListenerOperations<ListenerT>::notifyAllListeners(
- local,
+ local,
func ));
{
@@ -287,7 +287,7 @@ private:
listeners.
*/
template< typename ListenerT,
- typename ContainerT=std::vector<ListenerT> >
+ typename ContainerT=std::vector<ListenerT> >
class ThreadSafeListenerContainer : public ListenerContainerBase<ListenerT,
MutexBase,
ContainerT>
@@ -302,7 +302,7 @@ class ThreadSafeListenerContainer : public ListenerContainerBase<ListenerT,
multi-threaded scenario, but has less overhead.
*/
template< typename ListenerT,
- typename ContainerT=std::vector<ListenerT> >
+ typename ContainerT=std::vector<ListenerT> >
class ThreadUnsafeListenerContainer : public ListenerContainerBase<ListenerT,
EmptyBase,
ContainerT>
diff --git a/slideshow/source/inc/listenercontainerimpl.hxx b/slideshow/source/inc/listenercontainerimpl.hxx
index 6a8b3f756e1d..cecffec7b647 100644
--- a/slideshow/source/inc/listenercontainerimpl.hxx
+++ b/slideshow/source/inc/listenercontainerimpl.hxx
@@ -2,7 +2,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
@@ -41,29 +41,29 @@ struct EmptyBase
struct EmptyGuard{ explicit EmptyGuard(EmptyBase) {} };
struct EmptyClearableGuard
{
- explicit EmptyClearableGuard(EmptyBase) {}
- void clear() {}
- void reset() {}
+ explicit EmptyClearableGuard(EmptyBase) {}
+ void clear() {}
+ void reset() {}
};
typedef EmptyGuard Guard;
typedef EmptyClearableGuard ClearableGuard;
};
-
+
class MutexBase
{
public:
- struct Guard : public osl::MutexGuard
- {
- explicit Guard(MutexBase const& rBase) :
- osl::MutexGuard(rBase.maMutex)
- {}
+ struct Guard : public osl::MutexGuard
+ {
+ explicit Guard(MutexBase const& rBase) :
+ osl::MutexGuard(rBase.maMutex)
+ {}
};
struct ClearableGuard : public osl::ClearableMutexGuard
- {
- explicit ClearableGuard(MutexBase const& rBase) :
- osl::ClearableMutexGuard(rBase.maMutex)
- {}
+ {
+ explicit ClearableGuard(MutexBase const& rBase) :
+ osl::ClearableMutexGuard(rBase.maMutex)
+ {}
};
mutable osl::Mutex maMutex;
@@ -73,7 +73,7 @@ public:
template< typename result_type, typename ListenerTargetT > struct FunctionApply
{
- template<typename FuncT> static bool apply(
+ template<typename FuncT> static bool apply(
FuncT func,
ListenerTargetT const& rArg )
{
@@ -83,7 +83,7 @@ template< typename result_type, typename ListenerTargetT > struct FunctionApply
template<typename ListenerTargetT> struct FunctionApply<void,ListenerTargetT>
{
- template<typename FuncT> static bool apply(
+ template<typename FuncT> static bool apply(
FuncT func,
ListenerTargetT const& rArg )
{
@@ -97,7 +97,7 @@ template<typename ListenerTargetT> struct FunctionApply<void,ListenerTargetT>
template< typename ListenerT > struct ListenerOperations
{
/// Notify a single one of the listeners
- template< typename ContainerT,
+ template< typename ContainerT,
typename FuncT >
static bool notifySingleListener( ContainerT& rContainer,
FuncT func )
@@ -106,13 +106,13 @@ template< typename ListenerT > struct ListenerOperations
// true: a handler in this queue processed the event
// false: no handler in this queue finally processed the event
- return (std::find_if( rContainer.begin(),
+ return (std::find_if( rContainer.begin(),
aEnd,
func ) != aEnd);
}
/// Notify all listeners
- template< typename ContainerT,
+ template< typename ContainerT,
typename FuncT >
static bool notifyAllListeners( ContainerT& rContainer,
FuncT func )
@@ -129,7 +129,7 @@ template< typename ListenerT > struct ListenerOperations
{
bRet = true;
}
-
+
++aCurr;
}
@@ -147,10 +147,10 @@ template< typename ListenerT > struct ListenerOperations
// specializations for weak_ptr
// ----------------------------
-template< typename ListenerTargetT >
+template< typename ListenerTargetT >
struct ListenerOperations< boost::weak_ptr<ListenerTargetT> >
{
- template< typename ContainerT,
+ template< typename ContainerT,
typename FuncT >
static bool notifySingleListener( ContainerT& rContainer,
FuncT func )
@@ -160,17 +160,17 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> >
while( aCurr != aEnd )
{
boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() );
-
+
if( pListener && func(pListener) )
return true;
-
+
++aCurr;
}
return false;
}
- template< typename ContainerT,
+ template< typename ContainerT,
typename FuncT >
static bool notifyAllListeners( ContainerT& rContainer,
FuncT func )
@@ -181,14 +181,14 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> >
while( aCurr != aEnd )
{
boost::shared_ptr<ListenerTargetT> pListener( aCurr->lock() );
-
- if( pListener.get() &&
+
+ if( pListener.get() &&
FunctionApply< typename FuncT::result_type,
boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) )
{
bRet = true;
}
-
+
++aCurr;
}
@@ -204,7 +204,7 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> >
ContainerT aAliveListeners;
aAliveListeners.reserve(rContainer.size());
-
+
typename ContainerT::const_iterator aCurr( rContainer.begin() );
typename ContainerT::const_iterator const aEnd ( rContainer.end() );
while( aCurr != aEnd )
diff --git a/slideshow/source/inc/mouseeventhandler.hxx b/slideshow/source/inc/mouseeventhandler.hxx
index 8cd1aefafe60..f601490cde4a 100644
--- a/slideshow/source/inc/mouseeventhandler.hxx
+++ b/slideshow/source/inc/mouseeventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/numberanimation.hxx b/slideshow/source/inc/numberanimation.hxx
index 8d0185a8fc85..b841ef1c865e 100644
--- a/slideshow/source/inc/numberanimation.hxx
+++ b/slideshow/source/inc/numberanimation.hxx
@@ -2,7 +2,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
@@ -63,7 +63,7 @@ namespace slideshow
This is necessary for pure To or By animations, as the
Activity cannot determine a sensible start value
- otherwise.
+ otherwise.
@attention Note that you are only permitted to query
for the underlying value, if the animation has actually
diff --git a/slideshow/source/inc/pairanimation.hxx b/slideshow/source/inc/pairanimation.hxx
index aefef79b0ebf..c913a338df7e 100644
--- a/slideshow/source/inc/pairanimation.hxx
+++ b/slideshow/source/inc/pairanimation.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/pauseeventhandler.hxx b/slideshow/source/inc/pauseeventhandler.hxx
index d830ee0d5f46..144f9c45ee72 100644
--- a/slideshow/source/inc/pauseeventhandler.hxx
+++ b/slideshow/source/inc/pauseeventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/rgbcolor.hxx b/slideshow/source/inc/rgbcolor.hxx
index 80ac2a11d945..fd27859b305f 100644
--- a/slideshow/source/inc/rgbcolor.hxx
+++ b/slideshow/source/inc/rgbcolor.hxx
@@ -2,7 +2,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
@@ -36,11 +36,11 @@
namespace slideshow
{
- namespace internal
+ namespace internal
{
class HSLColor;
- /** RGB color space class.
+ /** RGB color space class.
*/
class RGBColor
{
@@ -51,19 +51,19 @@ namespace slideshow
explicit RGBColor( const HSLColor& rColor );
/** Hue of the color.
-
+
@return hue, is in the range [0,360]
*/
double getHue() const;
/** Saturation of the color.
-
+
@return saturation, is in the range [0,1]
*/
double getSaturation() const;
/** Luminance of the color.
-
+
@return luminance, is in the range [0,1]
*/
double getLuminance() const;
@@ -87,9 +87,9 @@ namespace slideshow
/** Create an integer sRGBA color.
*/
::cppcanvas::Color::IntSRGBA getIntegerColor() const;
-
+
RGBColor(const RGBColor& rLHS);
- RGBColor& operator=( const RGBColor& rLHS);
+ RGBColor& operator=( const RGBColor& rLHS);
struct RGBTriple
{
@@ -103,19 +103,19 @@ namespace slideshow
private:
// default copy/assignment are okay
- // RGBColor(const RGBColor&);
+ // RGBColor(const RGBColor&);
// RGBColor& operator=( const RGBColor& );
- RGBTriple maRGBTriple;
- };
+ RGBTriple maRGBTriple;
+ };
RGBColor operator+( const RGBColor& rLHS, const RGBColor& rRHS );
RGBColor operator*( const RGBColor& rLHS, const RGBColor& rRHS );
RGBColor operator*( double nFactor, const RGBColor& rRHS );
-
+
/** RGB color linear interpolator.
-
+
@param t
As usual, t must be in the [0,1] range
*/
diff --git a/slideshow/source/inc/screenupdater.hxx b/slideshow/source/inc/screenupdater.hxx
index 15ed1e26f3fe..d2ce2a4f054e 100644
--- a/slideshow/source/inc/screenupdater.hxx
+++ b/slideshow/source/inc/screenupdater.hxx
@@ -2,7 +2,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
@@ -58,20 +58,20 @@ namespace slideshow
~ScreenUpdater();
/** Notify screen update
-
+
This method records a screen content update request
for all views.
*/
void notifyUpdate();
-
+
/** Notify screen update
-
+
This method records a screen content update request
for the given view.
@param rView
The view that needs an update
-
+
@param bViewClobbered
When true, notifies update that view content is
clobbered by external circumstances (e.g. by another
diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx
index e4063089fa08..74ea15921634 100644
--- a/slideshow/source/inc/shape.hxx
+++ b/slideshow/source/inc/shape.hxx
@@ -2,7 +2,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
@@ -74,7 +74,7 @@ namespace slideshow
direct corresponding XShape (the background comes to
mind here).
*/
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > getXShape() const = 0;
@@ -92,15 +92,15 @@ namespace slideshow
@param bRedrawLayer
Redraw shape on given layer
*/
- virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer,
- bool bRedrawLayer ) = 0;
+ virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer,
+ bool bRedrawLayer ) = 0;
/** Withdraw the shape from a view layer
This method removes the shape from the given view
layer.
- @return true, if the shape was successfully removed
+ @return true, if the shape was successfully removed
*/
virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ) = 0;
@@ -230,23 +230,23 @@ namespace slideshow
// make functor adaptable (to boost::bind)
typedef bool result_type;
- // since the ZOrder property on the XShape has somewhat
+ // since the ZOrder property on the XShape has somewhat
// peculiar attributes (it's basically the index of the shapes
// in the drawing layer's SdrObjList - which means, it starts
- // from 0 for children of group objects), we cannot use it to determine
- // drawing order. Thus, we rely on importer-provided order values here,
+ // from 0 for children of group objects), we cannot use it to determine
+ // drawing order. Thus, we rely on importer-provided order values here,
// which is basically a running counter during shape import (i.e. denotes
// the order of shape import). This is the correct order, at least for the
// current drawing core.
//
- // If, someday, the above proposition is no longer true, one directly use
+ // If, someday, the above proposition is no longer true, one directly use
// the shape's ZOrder property
//
static bool compare(const Shape* pLHS, const Shape* pRHS)
{
const double nPrioL( pLHS->getPriority() );
const double nPrioR( pRHS->getPriority() );
-
+
// if prios are equal, tie-break on ptr value
return nPrioL == nPrioR ? pLHS < pRHS : nPrioL < nPrioR;
}
@@ -267,7 +267,7 @@ namespace slideshow
/** A set which contains all shapes in an ordered fashion.
*/
- typedef ::std::set< ShapeSharedPtr, Shape::lessThanShape > ShapeSet;
+ typedef ::std::set< ShapeSharedPtr, Shape::lessThanShape > ShapeSet;
}
}
diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx
index 277b9a686905..73346430abd3 100644
--- a/slideshow/source/inc/shapeattributelayer.hxx
+++ b/slideshow/source/inc/shapeattributelayer.hxx
@@ -2,7 +2,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
@@ -265,7 +265,7 @@ namespace slideshow
New alpha value, must be in the [0,1] range
*/
void setAlpha( const double& rNewValue );
-
+
/** Query whether the clip attribute is valid
*/
bool isClipValid() const;
@@ -280,7 +280,7 @@ namespace slideshow
with the origin of the clip polygon).
*/
void setClip( const ::basegfx::B2DPolyPolygon& rNewClip );
-
+
/** Query whether the dim color attribute is valid
The dim color globally 'dims' the shape towards that
@@ -336,7 +336,7 @@ namespace slideshow
*/
bool isLineStyleValid() const;
/** Get the current line mode for line drawing.
-
+
@returns the current line style
*/
sal_Int16 getLineStyle() const;
@@ -368,7 +368,7 @@ namespace slideshow
/** Set the text color globally for the whole shape.
*/
void setCharColor( const RGBColor& nNewColor );
-
+
/** Query whether the char rotation angle attribute is valid
*/
bool isCharRotationAngleValid() const;
@@ -400,7 +400,7 @@ namespace slideshow
::com::sun::star::awt::FontWeight constant group.
*/
void setCharWeight( const double& rStyle );
-
+
/** Query whether the underline mode attribute is valid
*/
bool isUnderlineModeValid() const;
@@ -479,76 +479,76 @@ namespace slideshow
bool haveChild() const { return mpChild; }
void updateStateIds();
- template< typename T > T calcValue( const T& rCurrValue,
- bool bThisInstanceValid,
+ template< typename T > T calcValue( const T& rCurrValue,
+ bool bThisInstanceValid,
bool (ShapeAttributeLayer::*pIsValid)() const,
- T (ShapeAttributeLayer::*pGetValue)() const ) const;
-
- ShapeAttributeLayerSharedPtr mpChild; // may be NULL
-
- ::basegfx::B2DSize maSize;
- ::basegfx::B2DPoint maPosition;
- ::basegfx::B2DPolyPolygon maClip;
-
- ::rtl::OUString maFontFamily;
-
- double mnRotationAngle;
- double mnShearXAngle;
- double mnShearYAngle;
- double mnAlpha;
- double mnCharRotationAngle;
- double mnCharScale;
- double mnCharWeight;
-
- ::com::sun::star::drawing::FillStyle meFillStyle;
- ::com::sun::star::drawing::LineStyle meLineStyle;
- ::com::sun::star::awt::FontSlant meCharPosture;
- sal_Int16 mnUnderlineMode;
-
- RGBColor maDimColor;
- RGBColor maFillColor;
- RGBColor maLineColor;
- RGBColor maCharColor;
-
- State::StateId mnTransformationState;
- State::StateId mnClipState;
- State::StateId mnAlphaState;
- State::StateId mnPositionState;
- State::StateId mnContentState;
- State::StateId mnVisibilityState;
-
- sal_Int16 mnAdditiveMode;
-
- bool mbVisibility : 1;
-
- bool mbWidthValid : 1;
- bool mbHeightValid : 1;
- bool mbPosXValid : 1;
- bool mbPosYValid : 1;
- bool mbClipValid : 1;
-
- bool mbFontFamilyValid : 1;
-
- bool mbRotationAngleValid : 1;
- bool mbShearXAngleValid : 1;
- bool mbShearYAngleValid : 1;
-
- bool mbAlphaValid : 1;
-
- bool mbCharRotationAngleValid: 1;
- bool mbCharScaleValid : 1;
-
- bool mbDimColorValid : 1;
- bool mbFillColorValid : 1;
- bool mbLineColorValid : 1;
- bool mbCharColorValid : 1;
-
- bool mbFillStyleValid : 1;
- bool mbLineStyleValid : 1;
- bool mbCharWeightValid : 1;
- bool mbUnderlineModeValid : 1;
- bool mbCharPostureValid : 1;
- bool mbVisibilityValid : 1;
+ T (ShapeAttributeLayer::*pGetValue)() const ) const;
+
+ ShapeAttributeLayerSharedPtr mpChild; // may be NULL
+
+ ::basegfx::B2DSize maSize;
+ ::basegfx::B2DPoint maPosition;
+ ::basegfx::B2DPolyPolygon maClip;
+
+ ::rtl::OUString maFontFamily;
+
+ double mnRotationAngle;
+ double mnShearXAngle;
+ double mnShearYAngle;
+ double mnAlpha;
+ double mnCharRotationAngle;
+ double mnCharScale;
+ double mnCharWeight;
+
+ ::com::sun::star::drawing::FillStyle meFillStyle;
+ ::com::sun::star::drawing::LineStyle meLineStyle;
+ ::com::sun::star::awt::FontSlant meCharPosture;
+ sal_Int16 mnUnderlineMode;
+
+ RGBColor maDimColor;
+ RGBColor maFillColor;
+ RGBColor maLineColor;
+ RGBColor maCharColor;
+
+ State::StateId mnTransformationState;
+ State::StateId mnClipState;
+ State::StateId mnAlphaState;
+ State::StateId mnPositionState;
+ State::StateId mnContentState;
+ State::StateId mnVisibilityState;
+
+ sal_Int16 mnAdditiveMode;
+
+ bool mbVisibility : 1;
+
+ bool mbWidthValid : 1;
+ bool mbHeightValid : 1;
+ bool mbPosXValid : 1;
+ bool mbPosYValid : 1;
+ bool mbClipValid : 1;
+
+ bool mbFontFamilyValid : 1;
+
+ bool mbRotationAngleValid : 1;
+ bool mbShearXAngleValid : 1;
+ bool mbShearYAngleValid : 1;
+
+ bool mbAlphaValid : 1;
+
+ bool mbCharRotationAngleValid: 1;
+ bool mbCharScaleValid : 1;
+
+ bool mbDimColorValid : 1;
+ bool mbFillColorValid : 1;
+ bool mbLineColorValid : 1;
+ bool mbCharColorValid : 1;
+
+ bool mbFillStyleValid : 1;
+ bool mbLineStyleValid : 1;
+ bool mbCharWeightValid : 1;
+ bool mbUnderlineModeValid : 1;
+ bool mbCharPostureValid : 1;
+ bool mbVisibilityValid : 1;
};
}
diff --git a/slideshow/source/inc/shapeattributelayerholder.hxx b/slideshow/source/inc/shapeattributelayerholder.hxx
index cdf7a330b45b..989e306bd3b5 100644
--- a/slideshow/source/inc/shapeattributelayerholder.hxx
+++ b/slideshow/source/inc/shapeattributelayerholder.hxx
@@ -2,7 +2,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
@@ -91,7 +91,7 @@ namespace slideshow
if( mpShape )
mpAttributeLayer = mpShape->createAttributeLayer();
-
+
return mpAttributeLayer;
}
@@ -101,8 +101,8 @@ namespace slideshow
}
private:
- AttributableShapeSharedPtr mpShape;
- ShapeAttributeLayerSharedPtr mpAttributeLayer;
+ AttributableShapeSharedPtr mpShape;
+ ShapeAttributeLayerSharedPtr mpAttributeLayer;
};
}
diff --git a/slideshow/source/inc/shapecursoreventhandler.hxx b/slideshow/source/inc/shapecursoreventhandler.hxx
index 1d7380d2617a..298ce67e1da2 100644
--- a/slideshow/source/inc/shapecursoreventhandler.hxx
+++ b/slideshow/source/inc/shapecursoreventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/shapeimporter.hxx b/slideshow/source/inc/shapeimporter.hxx
index c9fd7b738c2d..0e7023b5cbc3 100644
--- a/slideshow/source/inc/shapeimporter.hxx
+++ b/slideshow/source/inc/shapeimporter.hxx
@@ -2,7 +2,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
@@ -45,25 +45,25 @@ namespace internal {
struct SlideShowContext;
typedef ::std::vector< ::cppcanvas::PolyPolygonSharedPtr> PolyPolygonVector;
-typedef ::boost::shared_ptr< UnoView > UnoViewSharedPtr;
-typedef ::std::vector< UnoViewSharedPtr > UnoViewVector;
-
+typedef ::boost::shared_ptr< UnoView > UnoViewSharedPtr;
+typedef ::std::vector< UnoViewSharedPtr > UnoViewVector;
+
/** This class imports all shapes from a given XShapes object
*/
-class ShapeImporter
+class ShapeImporter
{
public:
/** Create shape importer.
-
+
@param xPage
Page containing the shapes
-
+
@param xActualPage
Actual page that's imported - if xPage is a master
page, this argument must refer to the using, i.e the
page that embeds this specific masterpage. Otherwise,
this argument is probably equal to xPage.
-
+
@param nOrdNumStart
Each shape receives a z order number, in order of
import (which relies on the fact that the API returns
@@ -71,33 +71,33 @@ public:
currently). Since we might mix several pages on screen
(e.g. master page and foreground page), this value can
be used as an offset to distinguish those pages.
-
+
@param bConvertingMasterPage
When true, then the master page is imported. Otherwise, this
object imports the draw page.
*/
- ShapeImporter( const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPage >& xPage,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPage >& xActualPage,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPagesSupplier>& xPagesSupplier,
+ ShapeImporter( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage >& xPage,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage >& xActualPage,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPagesSupplier>& xPagesSupplier,
const SlideShowContext& rContext,
sal_Int32 nOrdNumStart,
bool bConvertingMasterPage );
-
+
/** This method imports the presentation background shape
*/
ShapeSharedPtr importBackgroundShape(); // throw (ShapeLoadFailedException)
/** This method imports presentation-visible shapes (and skips all others).
-
+
@return the generated Shape, or NULL for no more shapes.
*/
ShapeSharedPtr importShape(); // throw (ConversionFailedException)
-
+
/** Test whether import is done.
-
+
@return true, if all shapes are imported via the
importShape() call.
*/
@@ -108,25 +108,25 @@ private:
::com::sun::star::beans::XPropertySet> const& xPropSet,
::rtl::OUString const& shapeType,
::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XLayer> const& xLayer);
-
+ ::com::sun::star::drawing::XLayer> const& xLayer);
+
ShapeSharedPtr createShape(
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape> const& xCurrShape,
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet> const& xPropSet,
::rtl::OUString const& shapeType ) const;
-
+
void importPolygons(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > const& xPropSet) ;
-
- struct XShapesEntry
+
+ struct XShapesEntry
{
ShapeSharedPtr const mpGroupShape;
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShapes> const mxShapes;
sal_Int32 const mnCount;
sal_Int32 mnPos;
-
+
explicit XShapesEntry( ShapeSharedPtr const& pGroupShape )
: mpGroupShape(pGroupShape),
mxShapes( pGroupShape->getXShape(),
@@ -138,11 +138,11 @@ private:
mnCount(xShapes->getCount()), mnPos(0) {}
};
typedef ::std::stack<XShapesEntry> XShapesStack;
-
+
::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPage> mxPage;
+ ::com::sun::star::drawing::XDrawPage> mxPage;
::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPagesSupplier> mxPagesSupplier;
+ ::com::sun::star::drawing::XDrawPagesSupplier> mxPagesSupplier;
const SlideShowContext& mrContext;
PolyPolygonVector maPolygons;
XShapesStack maShapesStack;
diff --git a/slideshow/source/inc/shapelistenereventhandler.hxx b/slideshow/source/inc/shapelistenereventhandler.hxx
index 95c39221b354..df8b63f80a87 100644
--- a/slideshow/source/inc/shapelistenereventhandler.hxx
+++ b/slideshow/source/inc/shapelistenereventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/shapemanager.hxx b/slideshow/source/inc/shapemanager.hxx
index 5268dcb9cd0e..b6790460095f 100644
--- a/slideshow/source/inc/shapemanager.hxx
+++ b/slideshow/source/inc/shapemanager.hxx
@@ -2,7 +2,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
@@ -98,7 +98,7 @@ namespace slideshow
should be looked up.
*/
virtual boost::shared_ptr<Shape> lookupShape(
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape > const & xShape ) const = 0;
/** Register given shape as a hyperlink target
diff --git a/slideshow/source/inc/shapemaps.hxx b/slideshow/source/inc/shapemaps.hxx
index ebafcae08de1..a6987a46cfa5 100644
--- a/slideshow/source/inc/shapemaps.hxx
+++ b/slideshow/source/inc/shapemaps.hxx
@@ -2,7 +2,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
@@ -49,10 +49,10 @@ namespace slideshow
/// Maps XShape to shape listener
typedef ::std::map< ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape>,
- boost::shared_ptr< ::cppu::OInterfaceContainerHelper >
+ boost::shared_ptr< ::cppu::OInterfaceContainerHelper >
> ShapeEventListenerMap;
- /// Maps XShape to mouse cursor
+ /// Maps XShape to mouse cursor
typedef ::std::map< ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape>,
sal_Int16> ShapeCursorMap;
diff --git a/slideshow/source/inc/shapesubset.hxx b/slideshow/source/inc/shapesubset.hxx
index a68e8e446e6b..2ae2196c1158 100644
--- a/slideshow/source/inc/shapesubset.hxx
+++ b/slideshow/source/inc/shapesubset.hxx
@@ -2,7 +2,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
@@ -69,8 +69,8 @@ namespace slideshow
Manager object, where subsets are
registered/unregistered
*/
- ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
- const DocTreeNode& rTreeNode,
+ ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
+ const DocTreeNode& rTreeNode,
const SubsettableShapeManagerSharedPtr& rSubsetManager );
/** Create a subset from another subset.
@@ -86,8 +86,8 @@ namespace slideshow
@param rTreeNode
Subset of the original subset
*/
- ShapeSubset( const ShapeSubsetSharedPtr& rOriginalSubset,
- const DocTreeNode& rTreeNode );
+ ShapeSubset( const ShapeSubsetSharedPtr& rOriginalSubset,
+ const DocTreeNode& rTreeNode );
/** Create full set for the given shape.
@@ -95,7 +95,7 @@ namespace slideshow
Original shape, which will be represented as a whole
by this object
*/
- ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
+ ShapeSubset( const AttributableShapeSharedPtr& rOriginalShape,
const SubsettableShapeManagerSharedPtr& rShapeManager );
~ShapeSubset();
@@ -105,7 +105,7 @@ namespace slideshow
If the subset is currently revoked, this method
returns the original shape.
*/
- AttributableShapeSharedPtr getSubsetShape() const;
+ AttributableShapeSharedPtr getSubsetShape() const;
/** Enable the subset shape.
@@ -116,7 +116,7 @@ namespace slideshow
@return true, if subsetting was successfully enabled.
*/
- bool enableSubsetShape();
+ bool enableSubsetShape();
/** Disable the subset shape.
@@ -124,7 +124,7 @@ namespace slideshow
shape. That means, the original shape will again show
the hidden range.
*/
- void disableSubsetShape();
+ void disableSubsetShape();
/** Query whether this subset actually is none, but
contains the whole original shape's content
@@ -140,7 +140,7 @@ namespace slideshow
//ShapeSubset(const ShapeSubset&);
//ShapeSubset& operator=( const ShapeSubset& );
- AttributableShapeSharedPtr mpOriginalShape;
+ AttributableShapeSharedPtr mpOriginalShape;
AttributableShapeSharedPtr mpSubsetShape;
DocTreeNode maTreeNode;
SubsettableShapeManagerSharedPtr mpShapeManager;
diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx
index e0d3464c747e..7d6e0a17da25 100644
--- a/slideshow/source/inc/slide.hxx
+++ b/slideshow/source/inc/slide.hxx
@@ -2,7 +2,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
@@ -42,7 +42,7 @@ namespace com { namespace sun { namespace star {
class XDrawPage;
class XDrawPagesSupplier;
}
- namespace uno {
+ namespace uno {
class XComponentContext;
}
namespace animations {
@@ -62,7 +62,7 @@ namespace slideshow
{
class RGBColor;
class ScreenUpdater;
- typedef ::std::vector< ::cppcanvas::PolyPolygonSharedPtr> PolyPolygonVector;
+ typedef ::std::vector< ::cppcanvas::PolyPolygonSharedPtr> PolyPolygonVector;
class Slide
{
public:
@@ -106,25 +106,25 @@ namespace slideshow
This value is retrieved from the XDrawPage properties.
*/
- virtual basegfx::B2IVector getSlideSize() const = 0;
+ virtual basegfx::B2IVector getSlideSize() const = 0;
/// Gets the underlying API page
virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage > getXDrawPage() const = 0;
-
+
/// Gets the animation node.
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode > getXAnimationNode() const = 0;
///Gets the slide Polygons
virtual PolyPolygonVector getPolygons() = 0;
-
+
///Draw the slide Polygons
virtual void drawPolygons() const = 0;
-
+
///Check if slide is already active
virtual bool isPaintOverlayActive() const = 0;
-
+
// Slide bitmaps
// -------------------------------------------------------------------
@@ -148,7 +148,7 @@ namespace slideshow
that the view must have been added to this slide
before via viewAdded().
*/
- virtual SlideBitmapSharedPtr
+ virtual SlideBitmapSharedPtr
getCurrentSlideBitmap( const UnoViewSharedPtr& rView ) const = 0;
};
@@ -160,7 +160,7 @@ namespace slideshow
class ActivitiesQueue;
class UserEventQueue;
class RGBColor;
-
+
/** Construct from XDrawPage
The Slide object generally works in XDrawPage model
@@ -168,7 +168,7 @@ namespace slideshow
height as specified in the XDrawPage's property
set. The top, left corner of the page will be rendered
at (0,0) in the given canvas' view coordinate system.
-
+
Does not render anything initially
@param xDrawPage
@@ -189,20 +189,20 @@ namespace slideshow
@param rUserEventQueue
UserEeventQueue
*/
- SlideSharedPtr createSlide( const ::com::sun::star::uno::Reference<
- ::com::sun::star::drawing::XDrawPage >& xDrawPage,
+ SlideSharedPtr createSlide( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage >& xDrawPage,
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPagesSupplier >& xDrawPages,
const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode >& xRootNode,
- EventQueue& rEventQueue,
- EventMultiplexer& rEventMultiplexer,
+ EventQueue& rEventQueue,
+ EventMultiplexer& rEventMultiplexer,
ScreenUpdater& rScreenUpdater,
- ActivitiesQueue& rActivitiesQueue,
- UserEventQueue& rUserEventQueue,
+ ActivitiesQueue& rActivitiesQueue,
+ UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& xContext,
const ShapeEventListenerMap& rShapeListenerMap,
const ShapeCursorMap& rShapeCursorMap,
diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx
index a80751a1e677..5f7f5e4d693a 100644
--- a/slideshow/source/inc/slidebitmap.hxx
+++ b/slideshow/source/inc/slidebitmap.hxx
@@ -2,7 +2,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
@@ -71,22 +71,22 @@ namespace slideshow
public:
SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap );
- bool draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const;
- ::basegfx::B2ISize getSize() const;
+ bool draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const;
+ ::basegfx::B2ISize getSize() const;
::basegfx::B2DPoint getOutputPos() const{return maOutputPos;}
- void move( const ::basegfx::B2DPoint& rNewPos );
- void clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
-
+ void move( const ::basegfx::B2DPoint& rNewPos );
+ void clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
+
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap > getXBitmap();
private:
- ::basegfx::B2DPoint maOutputPos;
- ::basegfx::B2DPolyPolygon maClipPoly;
+ ::basegfx::B2DPoint maOutputPos;
+ ::basegfx::B2DPolyPolygon maClipPoly;
// TODO(Q2): Remove UNO bitmap as the transport medium
::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap > mxBitmap;
+ ::com::sun::star::rendering::XBitmap > mxBitmap;
};
typedef ::boost::shared_ptr< SlideBitmap > SlideBitmapSharedPtr;
diff --git a/slideshow/source/inc/slideshowcontext.hxx b/slideshow/source/inc/slideshowcontext.hxx
index 8a7dab61e7c1..72681993d862 100644
--- a/slideshow/source/inc/slideshowcontext.hxx
+++ b/slideshow/source/inc/slideshowcontext.hxx
@@ -2,7 +2,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
@@ -63,16 +63,16 @@ namespace slideshow
@param rShapeManager
ShapeManager, which handles all shapes
-
+
@param rEventQueue
Event queue, where time-based events are to be
scheduled. A node must not schedule events there
before it's not resolved.
-
+
@param rEventMultiplexer
Event multiplexer. Clients can register there for
about any event that happens in the slideshow
-
+
@param rScreenUpdater
Screen updater. Gets notified of necessary screen
updates.
@@ -80,9 +80,9 @@ namespace slideshow
@param rActivitiesQueue
Activities queue, where repeating activities are
to be scheduled.
-
+
@param rUserEventQueue
- User event queue
+ User event queue
@param rViewContainer
Holds all views added to slideshow
@@ -98,20 +98,20 @@ namespace slideshow
UserEventQueue& rUserEventQueue,
CursorManager& rCursorManager,
const UnoViewContainer& rViewContainer,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext>& rComponentContext );
void dispose();
boost::shared_ptr<SubsettableShapeManager>& mpSubsettableShapeManager;
- EventQueue& mrEventQueue;
- EventMultiplexer& mrEventMultiplexer;
+ EventQueue& mrEventQueue;
+ EventMultiplexer& mrEventMultiplexer;
ScreenUpdater& mrScreenUpdater;
- ActivitiesQueue& mrActivitiesQueue;
- UserEventQueue& mrUserEventQueue;
+ ActivitiesQueue& mrActivitiesQueue;
+ UserEventQueue& mrUserEventQueue;
CursorManager& mrCursorManager;
const UnoViewContainer& mrViewContainer;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::uno::XComponentContext> mxComponentContext;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> mxComponentContext;
};
}
}
diff --git a/slideshow/source/inc/slideshowexceptions.hxx b/slideshow/source/inc/slideshowexceptions.hxx
index c7affe72ee50..f0e1656f39a0 100644
--- a/slideshow/source/inc/slideshowexceptions.hxx
+++ b/slideshow/source/inc/slideshowexceptions.hxx
@@ -2,7 +2,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
@@ -47,7 +47,7 @@ namespace slideshow
{
ParseError() {}
explicit ParseError( const char* ) {}
- };
+ };
}
diff --git a/slideshow/source/inc/slideview.hxx b/slideshow/source/inc/slideview.hxx
index 9a6c0f5b5a54..f791f15a132a 100644
--- a/slideshow/source/inc/slideview.hxx
+++ b/slideshow/source/inc/slideview.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/smilfunctionparser.hxx b/slideshow/source/inc/smilfunctionparser.hxx
index 03148d74d05f..c99550ec6656 100644
--- a/slideshow/source/inc/smilfunctionparser.hxx
+++ b/slideshow/source/inc/smilfunctionparser.hxx
@@ -2,7 +2,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
@@ -51,7 +51,7 @@ namespace slideshow
{
public:
/** Parse a string containing a SMIL value.
-
+
This method parses a string representing
a fixed value (i.e. a value that does not
change by time). Due to the dynamic view
@@ -59,38 +59,38 @@ namespace slideshow
this value can sometimes only be determined
during runtime of the animation (because
e.g. mixed screen/view coordinates are
- involved), and is thus still returned as an
- ExpressionNode object. An example for
+ involved), and is thus still returned as an
+ ExpressionNode object. An example for
such a case is the "Width+1.0" string, which
- contains the width of the shape in user
+ contains the width of the shape in user
coordinate space, and the screen width
in device coordinate space.
The following grammar is accepted by this method:
<code>
- identifier = 'pi'|'e'|'X'|'Y'|'Width'|'Height'
-
+ identifier = 'pi'|'e'|'X'|'Y'|'Width'|'Height'
+
function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'|'acos'|'asin'|'exp'|'log'
- basic_expression =
- number |
- identifier |
- function '(' additive_expression ')' |
- '(' additive_expression ')'
-
- unary_expression =
+ basic_expression =
+ number |
+ identifier |
+ function '(' additive_expression ')' |
+ '(' additive_expression ')'
+
+ unary_expression =
'-' basic_expression |
basic_expression
-
- multiplicative_expression =
- unary_expression ( ( '*' unary_expression )* |
+
+ multiplicative_expression =
+ unary_expression ( ( '*' unary_expression )* |
( '/' unary_expression )* )
+
+ additive_expression =
+ multiplicative_expression ( ( '+' multiplicative_expression )* |
+ ( '-' multiplicative_expression )* )
- additive_expression =
- multiplicative_expression ( ( '+' multiplicative_expression )* |
- ( '-' multiplicative_expression )* )
-
- </code>
+ </code>
@param rSmilValue
The string to parse
@@ -101,44 +101,44 @@ namespace slideshow
the page the shape is part of, i.e. within the [0,1]
range. This is necessary, since the string might
contain symbolic references to the shape bounding box.
-
+
@throws ParseError if an invalid expression is given.
@return the generated function object.
*/
- static ExpressionNodeSharedPtr parseSmilValue( const ::rtl::OUString& rSmilValue,
- const ::basegfx::B2DRectangle& rRelativeShapeBounds ); // throw ParseError
+ static ExpressionNodeSharedPtr parseSmilValue( const ::rtl::OUString& rSmilValue,
+ const ::basegfx::B2DRectangle& rRelativeShapeBounds ); // throw ParseError
/** Parse a string containing a SMIL function.
-
+
This method parses a string representing
a possibly time-varying SMIL function.
The following grammar is accepted by this method:
<code>
- identifier = 't'|'pi'|'e'|'X'|'Y'|'Width'|'Height'
-
+ identifier = 't'|'pi'|'e'|'X'|'Y'|'Width'|'Height'
+
function = 'abs'|'sqrt'|'sin'|'cos'|'tan'|'atan'|'acos'|'asin'|'exp'|'log'
- basic_expression =
- number |
- identifier |
- function '(' additive_expression ')' |
- '(' additive_expression ')'
-
- unary_expression =
+ basic_expression =
+ number |
+ identifier |
+ function '(' additive_expression ')' |
+ '(' additive_expression ')'
+
+ unary_expression =
'-' basic_expression |
basic_expression
-
- multiplicative_expression =
- unary_expression ( ( '*' unary_expression )* |
+
+ multiplicative_expression =
+ unary_expression ( ( '*' unary_expression )* |
( '/' unary_expression )* )
+
+ additive_expression =
+ multiplicative_expression ( ( '+' multiplicative_expression )* |
+ ( '-' multiplicative_expression )* )
- additive_expression =
- multiplicative_expression ( ( '+' multiplicative_expression )* |
- ( '-' multiplicative_expression )* )
-
- </code>
+ </code>
@param rSmilFunction
The string to parse
@@ -154,11 +154,11 @@ namespace slideshow
@return the generated function object.
*/
- static ExpressionNodeSharedPtr parseSmilFunction( const ::rtl::OUString& rSmilFunction,
- const ::basegfx::B2DRectangle& rRelativeShapeBounds ); // throw ParseError
+ static ExpressionNodeSharedPtr parseSmilFunction( const ::rtl::OUString& rSmilFunction,
+ const ::basegfx::B2DRectangle& rRelativeShapeBounds ); // throw ParseError
private:
- // disabled constructor/destructor, since this is
+ // disabled constructor/destructor, since this is
// supposed to be a singleton
SmilFunctionParser();
};
diff --git a/slideshow/source/inc/soundplayer.hxx b/slideshow/source/inc/soundplayer.hxx
index b33e8a1445b2..edebe5f97905 100644
--- a/slideshow/source/inc/soundplayer.hxx
+++ b/slideshow/source/inc/soundplayer.hxx
@@ -2,7 +2,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
@@ -60,7 +60,7 @@ namespace slideshow
/** Create a sound player object.
@param rSoundURL
- URL to a sound file.
+ URL to a sound file.
@param rComponentContext
Reference to a component context, used to create the
@@ -73,7 +73,7 @@ namespace slideshow
static ::boost::shared_ptr<SoundPlayer> create(
EventMultiplexer & rEventMultiplexer,
const ::rtl::OUString& rSoundURL,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext>& rComponentContext );
virtual ~SoundPlayer();
@@ -102,7 +102,7 @@ namespace slideshow
SoundPlayer(
EventMultiplexer & rEventMultiplexer,
const ::rtl::OUString& rSoundURL,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext>& rComponentContext );
EventMultiplexer & mrEventMultiplexer;
@@ -110,7 +110,7 @@ namespace slideshow
// is available
::boost::shared_ptr<SoundPlayer> mThis;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
- };
+ };
typedef ::boost::shared_ptr< SoundPlayer > SoundPlayerSharedPtr;
}
diff --git a/slideshow/source/inc/state.hxx b/slideshow/source/inc/state.hxx
index d00080ca4739..d48f7a492c70 100644
--- a/slideshow/source/inc/state.hxx
+++ b/slideshow/source/inc/state.hxx
@@ -2,7 +2,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
@@ -52,7 +52,7 @@ namespace slideshow
public:
virtual ~State() {}
- /// Abstract, numerically encoded state ID
+ /// Abstract, numerically encoded state ID
typedef ::std::size_t StateId;
/** This method returns a numerical state identifier.
@@ -62,7 +62,7 @@ namespace slideshow
clients can assume that the object's state has
changed.
- @return an abstract, numerical state ID.
+ @return an abstract, numerical state ID.
*/
virtual StateId getStateId() const = 0;
};
diff --git a/slideshow/source/inc/stringanimation.hxx b/slideshow/source/inc/stringanimation.hxx
index 13b0d2460ff3..4b3457deb6bd 100644
--- a/slideshow/source/inc/stringanimation.hxx
+++ b/slideshow/source/inc/stringanimation.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/subsettableshapemanager.hxx b/slideshow/source/inc/subsettableshapemanager.hxx
index 060649bed82a..b4b4a8819f32 100644
--- a/slideshow/source/inc/subsettableshapemanager.hxx
+++ b/slideshow/source/inc/subsettableshapemanager.hxx
@@ -2,7 +2,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
@@ -71,7 +71,7 @@ namespace slideshow
@param rSubsetShape
The subset to display in the generated shape.
*/
- virtual boost::shared_ptr<AttributableShape> getSubsetShape(
+ virtual boost::shared_ptr<AttributableShape> getSubsetShape(
const boost::shared_ptr<AttributableShape>& rOrigShape,
const DocTreeNode& rTreeNode ) = 0;
@@ -88,7 +88,7 @@ namespace slideshow
@param rSubsetShape
The subset created from rOrigShape
*/
- virtual void revokeSubset(
+ virtual void revokeSubset(
const boost::shared_ptr<AttributableShape>& rOrigShape,
const boost::shared_ptr<AttributableShape>& rSubsetShape ) = 0;
@@ -96,7 +96,7 @@ namespace slideshow
/** Register an event handler that will be called when
user paint parameters change.
-
+
@param rHandler
Handler to call when a shape listener changes
*/
@@ -104,7 +104,7 @@ namespace slideshow
virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) = 0;
/** Notify that shape-intrinsic animations are now enabled.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
@@ -112,7 +112,7 @@ namespace slideshow
virtual bool notifyIntrinsicAnimationsEnabled() = 0;
/** Notify that shape-intrinsic animations are now disabled.
-
+
@return true, if this event was processed by
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index daccc61470fe..706d26dc60ba 100644
--- a/slideshow/source/inc/tools.hxx
+++ b/slideshow/source/inc/tools.hxx
@@ -2,7 +2,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
@@ -54,9 +54,9 @@
namespace com { namespace sun { namespace star { namespace beans {
struct NamedValue;
} } } }
-namespace basegfx
-{
- class B2DRange;
+namespace basegfx
+{
+ class B2DRange;
class B2DVector;
class B2IVector;
class B2DHomMatrix;
@@ -91,7 +91,7 @@ namespace slideshow
reinterpret_cast< ::std::ptrdiff_t >(p) );
return d + (d >> 3);
}
-
+
// xxx todo: shift to namespace com::sun::star::uno when
// 1.33 is available
template <typename T>
@@ -115,68 +115,68 @@ namespace slideshow
/// loop, but play backwards from end to start
CYCLE_PINGPONGLOOP
};
-
-
+
+
// Value extraction from Any
// =========================
/// extract unary double value from Any
- bool extractValue( double& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( double& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract int from Any
- bool extractValue( sal_Int32& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( sal_Int32& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract enum/constant group value from Any
- bool extractValue( sal_Int16& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( sal_Int16& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract color value from Any
- bool extractValue( RGBColor& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( RGBColor& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract color value from Any
- bool extractValue( HSLColor& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( HSLColor& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract plain string from Any
- bool extractValue( ::rtl::OUString& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( ::rtl::OUString& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract bool value from Any
- bool extractValue( bool& o_rValue,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( bool& o_rValue,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/// extract double 2-tuple from Any
- bool extractValue( basegfx::B2DTuple& o_rPair,
- const ::com::sun::star::uno::Any& rSourceAny,
- const boost::shared_ptr<Shape>& rShape,
- const basegfx::B2DVector& rSlideBounds );
+ bool extractValue( basegfx::B2DTuple& o_rPair,
+ const ::com::sun::star::uno::Any& rSourceAny,
+ const boost::shared_ptr<Shape>& rShape,
+ const basegfx::B2DVector& rSlideBounds );
/** Search a sequence of NamedValues for a given element.
@return true, if the sequence contains the specified
element.
*/
- bool findNamedValue( ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::NamedValue > const& rSequence,
- const ::com::sun::star::beans::NamedValue& rSearchKey );
-
+ bool findNamedValue( ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::NamedValue > const& rSequence,
+ const ::com::sun::star::beans::NamedValue& rSearchKey );
+
/** Search a sequence of NamedValues for an element with a given name.
@param o_pRet
@@ -186,10 +186,10 @@ namespace slideshow
@return true, if the sequence contains the specified
element.
*/
- bool findNamedValue( ::com::sun::star::beans::NamedValue* o_pRet,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::NamedValue >& rSequence,
- const ::rtl::OUString& rSearchString );
+ bool findNamedValue( ::com::sun::star::beans::NamedValue* o_pRet,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::NamedValue >& rSequence,
+ const ::rtl::OUString& rSearchString );
basegfx::B2DRange calcRelativeShapeBounds( const basegfx::B2DVector& rPageSize,
const basegfx::B2DRange& rShapeBounds );
@@ -199,12 +199,12 @@ namespace slideshow
@param rBounds
Original shape bound rect (to substitute default attribute
layer values)
-
+
@param pAttr
Attribute set. Might be NULL (then, rBounds is used to set
a simple scale and translate of the unit rect to rBounds).
*/
- basegfx::B2DHomMatrix getShapeTransformation(
+ basegfx::B2DHomMatrix getShapeTransformation(
const basegfx::B2DRange& rBounds,
const boost::shared_ptr<ShapeAttributeLayer>& pAttr );
@@ -212,7 +212,7 @@ namespace slideshow
@param rPixelSize
Pixel size of the sprite
-
+
@param rOrigSize
Original shape size (i.e. the size of the actual sprite
content, in the user coordinate system)
@@ -223,7 +223,7 @@ namespace slideshow
@return the transformation to be applied to the sprite.
*/
- basegfx::B2DHomMatrix getSpriteTransformation(
+ basegfx::B2DHomMatrix getSpriteTransformation(
const basegfx::B2DVector& rPixelSize,
const basegfx::B2DVector& rOrigSize,
const boost::shared_ptr<ShapeAttributeLayer>& pAttr );
@@ -246,9 +246,9 @@ namespace slideshow
@param pAttr
Current shape attributes
*/
- basegfx::B2DRange getShapeUpdateArea(
+ basegfx::B2DRange getShapeUpdateArea(
const basegfx::B2DRange& rUnitBounds,
- const basegfx::B2DHomMatrix& rShapeTransform,
+ const basegfx::B2DHomMatrix& rShapeTransform,
const boost::shared_ptr<ShapeAttributeLayer>& pAttr );
/** Calc update area for a shape.
@@ -280,7 +280,7 @@ namespace slideshow
it as if aBounds.getMinimum() is the output position and
aBounds.getRange() the scaling of the shape.
*/
- basegfx::B2DRange getShapePosSize(
+ basegfx::B2DRange getShapePosSize(
const basegfx::B2DRange& rOrigBounds,
const boost::shared_ptr<ShapeAttributeLayer>& pAttr );
@@ -290,7 +290,7 @@ namespace slideshow
/** Convert an IntSRGBA to plain UNO API 32 bit int
*/
sal_Int32 RGBAColor2UnoColor( cppcanvas::Color::IntSRGBA );
-
+
/** Fill a plain rectangle on the given canvas with the given color
*/
void fillRect( const boost::shared_ptr< cppcanvas::Canvas >& rCanvas,
@@ -301,14 +301,14 @@ namespace slideshow
*/
void initSlideBackground( const boost::shared_ptr< cppcanvas::Canvas >& rCanvas,
const basegfx::B2IVector& rSize );
-
+
/// Gets a random ordinal [0,n)
inline ::std::size_t getRandomOrdinal( const ::std::size_t n )
{
return static_cast< ::std::size_t >(
double(n) * rand() / (RAND_MAX + 1.0) );
}
-
+
/// To work around ternary operator in initializer lists
/// (Solaris compiler problems)
template <typename T>
@@ -320,12 +320,12 @@ namespace slideshow
else
return arg2;
}
-
+
template <typename ValueType>
inline bool getPropertyValue(
- ValueType & rValue,
+ ValueType & rValue,
com::sun::star::uno::Reference<
- com::sun::star::beans::XPropertySet> const & xPropSet,
+ com::sun::star::beans::XPropertySet> const & xPropSet,
rtl::OUString const & propName )
{
try {
@@ -343,11 +343,11 @@ namespace slideshow
#endif
return bRet;
}
- catch (com::sun::star::uno::RuntimeException &)
+ catch (com::sun::star::uno::RuntimeException &)
{
throw;
}
- catch (com::sun::star::uno::Exception &)
+ catch (com::sun::star::uno::Exception &)
{
return false;
}
@@ -355,18 +355,18 @@ namespace slideshow
template <typename ValueType>
inline bool getPropertyValue(
- com::sun::star::uno::Reference< ValueType >& rIfc,
+ com::sun::star::uno::Reference< ValueType >& rIfc,
com::sun::star::uno::Reference<
- com::sun::star::beans::XPropertySet> const & xPropSet,
+ com::sun::star::beans::XPropertySet> const & xPropSet,
rtl::OUString const & propName )
{
- try
+ try
{
- const com::sun::star::uno::Any& a(
+ const com::sun::star::uno::Any& a(
xPropSet->getPropertyValue( propName ));
rIfc.set( a,
com::sun::star::uno::UNO_QUERY );
-
+
bool const bRet = rIfc.is();
#if OSL_DEBUG_LEVEL > 0
if( !bRet )
@@ -379,22 +379,22 @@ namespace slideshow
#endif
return bRet;
}
- catch (com::sun::star::uno::RuntimeException &)
+ catch (com::sun::star::uno::RuntimeException &)
{
throw;
}
- catch (com::sun::star::uno::Exception &)
+ catch (com::sun::star::uno::Exception &)
{
return false;
}
}
/// Get the content of the BoundRect shape property
- basegfx::B2DRange getAPIShapeBounds( const ::com::sun::star::uno::Reference<
+ basegfx::B2DRange getAPIShapeBounds( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape );
/// Get the content of the ZOrder shape property
- double getAPIShapePrio( const ::com::sun::star::uno::Reference<
+ double getAPIShapePrio( const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XShape >& xShape );
basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize,
diff --git a/slideshow/source/inc/transitionfactory.hxx b/slideshow/source/inc/transitionfactory.hxx
index 9fba9b0d6a1a..33296c5bacd4 100644
--- a/slideshow/source/inc/transitionfactory.hxx
+++ b/slideshow/source/inc/transitionfactory.hxx
@@ -2,7 +2,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
@@ -74,11 +74,11 @@ namespace slideshow
transition effect
*/
static AnimationActivitySharedPtr createShapeTransition(
- const ActivitiesFactory::CommonParameters& rParms,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ const ActivitiesFactory::CommonParameters& rParms,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XTransitionFilter > const& xTransition );
@@ -116,29 +116,29 @@ namespace slideshow
ScreenUpdater& rScreenUpdater,
EventMultiplexer& rEventMultiplexer,
const com::sun::star::uno::Reference<
- com::sun::star::presentation::XTransitionFactory>&
+ com::sun::star::presentation::XTransitionFactory>&
xOptionalFactory,
sal_Int16 nTransitionType,
sal_Int16 nTransitionSubType,
bool bTransitionDirection,
const RGBColor& rTransitionFadeColor,
const SoundPlayerSharedPtr& rSoundPlayer );
-
+
private:
static const TransitionInfo* getTransitionInfo(
sal_Int16 nTransitionType, sal_Int16 nTransitionSubType );
static const TransitionInfo* getRandomTransitionInfo();
static AnimationActivitySharedPtr createShapeTransition(
- const ActivitiesFactory::CommonParameters& rParms,
- const AnimatableShapeSharedPtr& rShape,
- const ShapeManagerSharedPtr& rShapeManager,
+ const ActivitiesFactory::CommonParameters& rParms,
+ const AnimatableShapeSharedPtr& rShape,
+ const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::animations::XTransitionFilter > const& xTransition,
- sal_Int16 nTransitionType,
- sal_Int16 nTransitionSubType );
-
+ sal_Int16 nTransitionType,
+ sal_Int16 nTransitionSubType );
+
// static factory
TransitionFactory();
~TransitionFactory();
diff --git a/slideshow/source/inc/transitioninfo.hxx b/slideshow/source/inc/transitioninfo.hxx
index 861d609f09cb..a6b60a09da70 100644
--- a/slideshow/source/inc/transitioninfo.hxx
+++ b/slideshow/source/inc/transitioninfo.hxx
@@ -2,7 +2,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
@@ -36,47 +36,47 @@ namespace slideshow {
namespace internal {
struct TransitionInfo
-{
+{
// the following two member serve as the search key
// for an incoming XTransitionFilter node
//
// {
-
+
sal_Int16 mnTransitionType;
sal_Int16 mnTransitionSubType;
-
+
// }
//
-
+
/** This enum classifies a transition type
*/
enum TransitionClass
- {
+ {
/// Invalid type
TRANSITION_INVALID,
-
+
/// Transition expressed by parametric clip polygon
TRANSITION_CLIP_POLYPOLYGON,
-
+
/// Transition expressed by hand-crafted function
TRANSITION_SPECIAL
};
-
+
/// class of effect handling
TransitionClass meTransitionClass;
-
+
/// Rotation angle of clip polygon
double mnRotationAngle;
-
+
/// X scaling of clip polygon (negative values mirror)
double mnScaleX;
-
+
/// Y scaling of clip polygon (negative values mirror)
double mnScaleY;
-
+
/** This enum determines the method how to reverse
a parametric clip polygon transition.
-
+
A reversed transition runs in the geometrically
opposite direction. For a left-to-right bar wipe, the
reversed transition is a right-to-left wipe, whereas
@@ -90,39 +90,39 @@ struct TransitionInfo
(if it has no sensible meaning for this transition)
*/
REVERSEMETHOD_IGNORE,
-
+
/** Revert by changing the direction of the parameter sweep
(from 1->0 instead of 0->1)
*/
REVERSEMETHOD_INVERT_SWEEP,
-
+
/** Revert by subtracting the generated polygon from the
target bound rect
*/
REVERSEMETHOD_SUBTRACT_POLYGON,
-
+
/** Combination of REVERSEMETHOD_INVERT_SWEEP and
REVERSEMETHOD_SUBTRACT_POLYGON.
*/
REVERSEMETHOD_SUBTRACT_AND_INVERT,
-
+
/// Reverse by rotating polygon 180 degrees
REVERSEMETHOD_ROTATE_180,
-
+
/// Reverse by flipping polygon at the y (!) axis
REVERSEMETHOD_FLIP_X,
-
+
/// Reverse by flipping polygon at the x (!) axis
REVERSEMETHOD_FLIP_Y
};
-
+
/** Indicating the method to use when transition
should be 'reversed'.
-
+
@see ReverseMethod
*/
ReverseMethod meReverseMethod;
-
+
/** When true, transition 'out' effects are realized
by inverting the parameter sweep direction (1->0
instead of 0->1). Otherwise, 'out' effects are
@@ -130,14 +130,14 @@ struct TransitionInfo
the parametric poly-polygon.
*/
bool mbOutInvertsSweep;
-
+
/** when true, scale clip polygon isotrophically to
target size. when false, scale is
anisotrophically.
*/
bool mbScaleIsotrophically;
-
-
+
+
/// Compare against type and subtype
class Comparator
{
diff --git a/slideshow/source/inc/unoview.hxx b/slideshow/source/inc/unoview.hxx
index 51c638cf311d..6ac02b6d220a 100644
--- a/slideshow/source/inc/unoview.hxx
+++ b/slideshow/source/inc/unoview.hxx
@@ -2,7 +2,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
@@ -58,9 +58,9 @@ namespace slideshow
/** Retrieve the underlying UNO slide view.
*/
virtual ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XSlideShowView > getUnoView() const = 0;
-
+
/** Dispose view
-
+
This needs to be different from Disposable interface,
as the UNO XComponent also provides a dispose() (only
with a different calling convention under Windows).
@@ -78,8 +78,8 @@ namespace slideshow
virtual void setIsSoundEnabled (const bool bValue) = 0;
};
- typedef ::boost::shared_ptr< UnoView > UnoViewSharedPtr;
- typedef ::std::vector< UnoViewSharedPtr > UnoViewVector;
+ typedef ::boost::shared_ptr< UnoView > UnoViewSharedPtr;
+ typedef ::std::vector< UnoViewSharedPtr > UnoViewVector;
}
}
diff --git a/slideshow/source/inc/unoviewcontainer.hxx b/slideshow/source/inc/unoviewcontainer.hxx
index 16016cde55aa..994a72504407 100644
--- a/slideshow/source/inc/unoviewcontainer.hxx
+++ b/slideshow/source/inc/unoviewcontainer.hxx
@@ -2,7 +2,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
@@ -39,7 +39,7 @@
#include "unoview.hxx"
-namespace com { namespace sun { namespace star { namespace presentation
+namespace com { namespace sun { namespace star { namespace presentation
{
class XSlideShowView;
} } } }
@@ -78,7 +78,7 @@ namespace slideshow
removed, and an empty shared_ptr otherwise (e.g. if
this view wasn't added in the first place)
*/
- UnoViewSharedPtr removeView( const ::com::sun::star::uno::Reference<
+ UnoViewSharedPtr removeView( const ::com::sun::star::uno::Reference<
::com::sun::star::presentation::XSlideShowView >& xView );
/// Dispose all stored views. Implies clear().
@@ -92,15 +92,15 @@ namespace slideshow
void clear() { maViews.clear(); }
-
- UnoViewVector::iterator begin() { return maViews.begin(); }
- UnoViewVector::const_iterator begin() const { return maViews.begin(); }
- UnoViewVector::iterator end() { return maViews.end(); }
- UnoViewVector::const_iterator end() const { return maViews.end(); }
+
+ UnoViewVector::iterator begin() { return maViews.begin(); }
+ UnoViewVector::const_iterator begin() const { return maViews.begin(); }
+ UnoViewVector::iterator end() { return maViews.end(); }
+ UnoViewVector::const_iterator end() const { return maViews.end(); }
private:
/// All added views
- UnoViewVector maViews;
+ UnoViewVector maViews;
};
typedef ::boost::shared_ptr< UnoViewContainer > UnoViewContainerSharedPtr;
diff --git a/slideshow/source/inc/usereventqueue.hxx b/slideshow/source/inc/usereventqueue.hxx
index bef6ccc824ce..c1d1f6cfbad2 100644
--- a/slideshow/source/inc/usereventqueue.hxx
+++ b/slideshow/source/inc/usereventqueue.hxx
@@ -2,7 +2,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
@@ -53,14 +53,14 @@ class MouseEnterHandler;
class MouseLeaveHandler;
/** This class schedules user-activated events.
-
+
This class registeres at the EventMultiplexer and fires
events registered for certain user actions. Note that all
events will not be fired immediately after the user action
occured, but always added to the EventQueue (and fired the
next time that queue is processed). Which is actually a
feature.
-
+
Conceptually, an event is an object that typically is
fired only once. After that, the event is exhausted, and
should be discarded. Therefore, all events registered on
@@ -71,11 +71,11 @@ class UserEventQueue : private ::boost::noncopyable
{
public:
/** Create a user event queue
-
+
@param rEventMultiplexer
The slideshow-global event source, where this class
registeres its event handlers.
-
+
@param rEventQueue
Reference to the main event queue. Since we hold this
object by plain reference, it must live longer than we
@@ -92,22 +92,22 @@ public:
EventQueue& rEventQueue,
CursorManager& rCursorManager );
~UserEventQueue();
-
+
/** Query whether there are any events still pending.
*/
bool isEmpty() const;
-
+
/** Clear all registered events.
-
+
This method clears all registered, but
not-yet-executed events. This comes in handy when
force-ending a slide, to avoid interference with the
next slide's event registration.
*/
void clear();
-
+
/** Set advance on click behaviour.
-
+
@param bAdvanceOnClick
When true, a click somewhere on the slide will also
generate next effect event. In this case, it is
@@ -115,28 +115,28 @@ public:
i.e. the shape need not be hit by the mouse.
*/
void setAdvanceOnClick( bool bAdvanceOnClick );
-
+
/** Register an event that will be fired when the slide is
just shown.
-
+
Note that <em>all</em> registered events will be fired
when the slide start occurs. This is in contrast to
the mouse events below.
*/
void registerSlideStartEvent( const EventSharedPtr& rEvent );
-
+
/** Register an event that will be fired when the slide is
about to vanish.
-
+
Note that <em>all</em> registered events will be fired
when the slide end occurs. This is in contrast to
the mouse events below.
*/
void registerSlideEndEvent( const EventSharedPtr& rEvent );
-
+
/** Register an event that will be fired when the given
animation node starts.
-
+
Note that <em>all</em> registered events will be fired
when the animation start occurs. This is in contrast to
the mouse events below.
@@ -145,10 +145,10 @@ public:
const EventSharedPtr& rEvent,
const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode>& xNode );
-
+
/** Register an event that will be fired when the given
animation node ends its active duration.
-
+
Note that <em>all</em> registered events will be fired
when the animation end occurs. This is in contrast to
the mouse events below.
@@ -157,10 +157,10 @@ public:
const EventSharedPtr& rEvent,
const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode>& xNode );
-
+
/** Register an event that will be fired when audio output
stopped for the given animation node.
-
+
Note that <em>all</em> registered events will be fired
when the audio stopping occurs. This is in contrast to
the mouse events below.
@@ -169,9 +169,9 @@ public:
const EventSharedPtr& rEvent,
const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode>& xNode );
-
+
/** Register an event that is fired when a shape is clicked
-
+
For every mouse click, only one of the events
registered here is fired. The order of fired events is
the order of registration, i.e. the first event
@@ -180,7 +180,7 @@ public:
*/
void registerShapeClickEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape );
-
+
/** Registes an event that is fired when the current effects(s)
are skipped, .e.g. when the left mouse button is pressed.
Then, all registered events are fired and removed from this
@@ -196,16 +196,16 @@ public:
void registerSkipEffectEvent(
EventSharedPtr const& pEvent,
const bool bSkipTriggersNextEffect);
-
+
/** Registes an event that is fired when the current effects(s)
are rewound, .e.g. when the right mouse button is pressed.
Then, all registered events are fired and removed from this
queue.
*/
void registerRewindEffectEvent( EventSharedPtr const& rEvent );
-
+
/** Register an event that is fired to show the next event
-
+
For every next effect event, only one of the events
registered here is fired. The order of fired events is
the order of registration, i.e. the first event
@@ -218,10 +218,10 @@ public:
not be hit by the mouse.
*/
void registerNextEffectEvent( const EventSharedPtr& rEvent );
-
+
/** Register an event that is fired on a double mouse
click on a shape
-
+
For every mouse double click, only one of the events
registered here is fired. The order of fired events is
the order of registration, i.e. the first event
@@ -232,9 +232,9 @@ public:
*/
void registerShapeDoubleClickEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape );
-
+
/** Register an event that is fired on a double mouse click
-
+
For every mouse double click, only one of the events
registered here is fired. The order of fired events is
the order of registration, i.e. the first event
@@ -244,10 +244,10 @@ public:
the mouse.
*/
void registerDoubleClickEvent( const EventSharedPtr& rEvent );
-
+
/** Register an event that is fired when the mouse enters
the area of the given shape
-
+
For every enter, only one of the events registered
here is fired. The order of fired events is the order
of registration, i.e. the first event registered will
@@ -256,10 +256,10 @@ public:
*/
void registerMouseEnterEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape );
-
+
/** Register an event that is fired when the mouse leaves
the area of the given shape
-
+
For every leave, only one of the events registered
here is fired. The order of fired events is the order
of registration, i.e. the first event registered will
@@ -277,29 +277,29 @@ public:
private:
/** Generically register an event on one of the handlers.
-
+
If the handler is not yet created, do that and
register it via the Functor
*/
- template< typename Handler, typename Functor >
+ template< typename Handler, typename Functor >
void registerEvent( ::boost::shared_ptr< Handler >& rHandler,
const EventSharedPtr& rEvent,
const Functor& rRegistrationFunctor );
-
+
/** Generically register an event on one of the handlers.
-
+
If the handler is not yet created, do that and
register it via the Functor. This version of the
registerEvent method takes an additional parameter
rArg, which is passed as the second argument to
rHandler's addEvent() method.
*/
- template< typename Handler, typename Arg, typename Functor >
+ template< typename Handler, typename Arg, typename Functor >
void registerEvent( ::boost::shared_ptr< Handler >& rHandler,
const EventSharedPtr& rEvent,
const Arg& rArg,
const Functor& rRegistrationFunctor );
-
+
EventMultiplexer& mrMultiplexer;
EventQueue& mrEventQueue;
CursorManager& mrCursorManager;
@@ -317,7 +317,7 @@ private:
::boost::shared_ptr<ClickEventHandler> mpDoubleClickEventHandler;
::boost::shared_ptr<MouseEnterHandler> mpMouseEnterHandler;
::boost::shared_ptr<MouseLeaveHandler> mpMouseLeaveHandler;
-
+
bool mbAdvanceOnClick;
};
diff --git a/slideshow/source/inc/userpainteventhandler.hxx b/slideshow/source/inc/userpainteventhandler.hxx
index 045bf438f8d1..c7a56fc3613c 100644
--- a/slideshow/source/inc/userpainteventhandler.hxx
+++ b/slideshow/source/inc/userpainteventhandler.hxx
@@ -2,7 +2,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
@@ -38,7 +38,7 @@ namespace slideshow
namespace internal
{
class RGBColor;
-
+
/** Interface for handling user paint state changes.
Classes implementing this interface can be added to an
diff --git a/slideshow/source/inc/view.hxx b/slideshow/source/inc/view.hxx
index 9ab6ac79576a..43fc5f90db05 100644
--- a/slideshow/source/inc/view.hxx
+++ b/slideshow/source/inc/view.hxx
@@ -2,7 +2,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
@@ -48,7 +48,7 @@ namespace slideshow
{
public:
/** Create a new view layer for this view
-
+
@param rLayerBounds
Specifies the bound rect of the layer relative to the
user view coordinate system.
@@ -80,7 +80,7 @@ namespace slideshow
virtual void setViewSize( const ::basegfx::B2DVector& ) = 0;
/** Change the view's mouse cursor.
-
+
@param nPointerShape
One of the ::com::sun::star::awt::SystemPointer
constant group members.
@@ -88,8 +88,8 @@ namespace slideshow
virtual void setCursorShape( sal_Int16 nPointerShape ) = 0;
};
- typedef ::boost::shared_ptr< View > ViewSharedPtr;
- typedef ::std::vector< ViewSharedPtr > ViewVector;
+ typedef ::boost::shared_ptr< View > ViewSharedPtr;
+ typedef ::std::vector< ViewSharedPtr > ViewVector;
}
}
diff --git a/slideshow/source/inc/vieweventhandler.hxx b/slideshow/source/inc/vieweventhandler.hxx
index 09a64dc42532..1b97d613a32a 100644
--- a/slideshow/source/inc/vieweventhandler.hxx
+++ b/slideshow/source/inc/vieweventhandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/viewlayer.hxx b/slideshow/source/inc/viewlayer.hxx
index b9debe945cac..c2351a517f3a 100644
--- a/slideshow/source/inc/viewlayer.hxx
+++ b/slideshow/source/inc/viewlayer.hxx
@@ -2,7 +2,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
@@ -32,17 +32,17 @@
#include <sal/config.h>
#include <boost/shared_ptr.hpp>
-namespace basegfx
-{
- class B1DRange;
- class B2DRange;
+namespace basegfx
+{
+ class B1DRange;
+ class B2DRange;
class B2DVector;
class B2DHomMatrix;
class B2DPolyPolygon;
}
namespace cppcanvas
-{
- class Canvas;
+{
+ class Canvas;
class CustomSprite;
}
@@ -117,7 +117,7 @@ namespace slideshow
layer, i.e. the z position in relation to other layers
on the parent view. The higher the priority range, the
further in front the layer resides.
-
+
@param rRange
Priority range, must be in the range [0,1]
*/
diff --git a/slideshow/source/inc/viewrepainthandler.hxx b/slideshow/source/inc/viewrepainthandler.hxx
index c8850de17a8e..a361825a12aa 100644
--- a/slideshow/source/inc/viewrepainthandler.hxx
+++ b/slideshow/source/inc/viewrepainthandler.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/viewupdate.hxx b/slideshow/source/inc/viewupdate.hxx
index 332b5b36cb09..7cddf1cbecd1 100644
--- a/slideshow/source/inc/viewupdate.hxx
+++ b/slideshow/source/inc/viewupdate.hxx
@@ -2,7 +2,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
diff --git a/slideshow/source/inc/wakeupevent.hxx b/slideshow/source/inc/wakeupevent.hxx
index e834ff8c46fc..602993ebd98f 100644
--- a/slideshow/source/inc/wakeupevent.hxx
+++ b/slideshow/source/inc/wakeupevent.hxx
@@ -2,7 +2,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
@@ -41,7 +41,7 @@ namespace internal {
/** Little helper class, used to set Activities active again
after some sleep period.
-
+
Clients can use this class to schedule wakeup events at
the EventQueue, to avoid busy-waiting for the next
discrete time instant.
@@ -53,17 +53,17 @@ public:
WakeupEvent(
::boost::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase,
ActivitiesQueue & rActivityQueue );
-
+
virtual void dispose();
virtual bool fire();
virtual bool isCharged() const;
virtual double getActivationTime( double nCurrentTime ) const;
-
+
/// Start the internal timer
void start();
-
+
/** Set the next timeout this object should generate.
-
+
@param nextTime
Absolute time, measured from the last start() call,
when this event should wakeup the Activity again. If
@@ -71,14 +71,14 @@ public:
every setNextTimeout() call.
*/
void setNextTimeout( double nextTime );
-
+
/** Set activity to wakeup.
-
+
The activity given here will be reinserted into the
ActivitiesQueue, once the timeout is reached.
*/
void setActivity( const ActivitySharedPtr& rActivity );
-
+
private:
::canvas::tools::ElapsedTime maTimer;
double mnNextTime;
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 254544a24e46..2ea4c233026e 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -2,7 +2,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
@@ -32,7 +32,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/servicefactory.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/compbase1.hxx>
#include <cppuhelper/compbase2.hxx>
@@ -79,11 +79,11 @@ using namespace ::com::sun::star;
namespace {
typedef ::cppu::WeakComponentImplHelper1< presentation::XSlideShowView > ViewBase;
-class View : public ::comphelper::OBaseMutex,
+class View : public ::comphelper::OBaseMutex,
public ViewBase
{
public:
- explicit View( const uno::Reference< rendering::XSpriteCanvas >& rCanvas ) :
+ explicit View( const uno::Reference< rendering::XSpriteCanvas >& rCanvas ) :
ViewBase( m_aMutex ),
mxCanvas( rCanvas ),
maPaintListeners( m_aMutex ),
@@ -102,7 +102,7 @@ public:
maTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(
nSize, nSize, (rNewSize.Width() - nSize) / 2, (rNewSize.Height() - nSize) / 2);
- lang::EventObject aEvent( *this );
+ lang::EventObject aEvent( *this );
maTransformationListeners.notifyEach( &util::XModifyListener::modified,
aEvent );
}
@@ -111,7 +111,7 @@ public:
{
awt::PaintEvent aEvent( *this,
awt::Rectangle(),
- 0 );
+ 0 );
maPaintListeners.notifyEach( &awt::XPaintListener::windowPaint,
aEvent );
}
@@ -130,12 +130,12 @@ private:
::basegfx::B2DRectangle(0.0,0.0,
maSize.Width(),
maSize.Height() )));
- ::cppcanvas::SpriteCanvasSharedPtr pCanvas(
+ ::cppcanvas::SpriteCanvasSharedPtr pCanvas(
::cppcanvas::VCLFactory::getInstance().createSpriteCanvas( mxCanvas ));
if( !pCanvas )
return;
- ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
+ ::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCanvas,
aPoly ) );
if( !pPolyPoly )
@@ -151,7 +151,7 @@ private:
virtual geometry::AffineMatrix2D SAL_CALL getTransformation( ) throw (uno::RuntimeException)
{
geometry::AffineMatrix2D aRes;
- return basegfx::unotools::affineMatrixFromHomMatrix( aRes,
+ return basegfx::unotools::affineMatrixFromHomMatrix( aRes,
maTransform );
}
@@ -208,9 +208,9 @@ private:
Size maSize;
};
-typedef ::cppu::WeakComponentImplHelper2< drawing::XDrawPage,
+typedef ::cppu::WeakComponentImplHelper2< drawing::XDrawPage,
beans::XPropertySet > SlideBase;
-class DummySlide : public ::comphelper::OBaseMutex,
+class DummySlide : public ::comphelper::OBaseMutex,
public SlideBase
{
public:
@@ -252,7 +252,7 @@ private:
return uno::Reference< beans::XPropertySetInfo >();
}
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& /*aPropertyName*/,
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& /*aPropertyName*/,
const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
}
@@ -276,29 +276,29 @@ private:
sizeof(lcl_propertyMap)/sizeof(*lcl_propertyMap),
true );
- sal_Int16 aRes;
+ sal_Int16 aRes;
if( !aMap.lookup( PropertyName, aRes ))
return uno::Any();
-
+
return uno::makeAny(aRes);
}
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/,
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*xListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/,
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& /*aPropertyName*/,
const uno::Reference< beans::XPropertyChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/,
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/,
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
}
@@ -309,7 +309,7 @@ class DemoApp : public Application
{
public:
virtual void Main();
- virtual USHORT Exception( USHORT nError );
+ virtual USHORT Exception( USHORT nError );
};
class ChildWindow : public Window
@@ -321,7 +321,7 @@ public:
virtual void Resize();
void setShow( const uno::Reference< presentation::XSlideShow >& rShow ) { mxShow = rShow; init(); }
-
+
private:
void init();
@@ -352,7 +352,7 @@ void ChildWindow::init()
{
uno::Reference< rendering::XCanvas > xCanvas( GetCanvas(),
uno::UNO_QUERY_THROW );
- uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas( xCanvas,
+ uno::Reference< rendering::XSpriteCanvas > xSpriteCanvas( xCanvas,
uno::UNO_QUERY_THROW );
mpView = new View( xSpriteCanvas );
mpView->resize( GetSizePixel() );
@@ -364,7 +364,7 @@ void ChildWindow::init()
catch (const uno::Exception &e)
{
OSL_TRACE( "Exception '%s' thrown\n" ,
- (const sal_Char*)::rtl::OUStringToOString( e.Message,
+ (const sal_Char*)::rtl::OUStringToOString( e.Message,
RTL_TEXTENCODING_UTF8 ));
}
}
@@ -379,7 +379,7 @@ void ChildWindow::Paint( const Rectangle& /*rRect*/ )
catch (const uno::Exception &e)
{
OSL_TRACE( "Exception '%s' thrown\n" ,
- (const sal_Char*)::rtl::OUStringToOString( e.Message,
+ (const sal_Char*)::rtl::OUStringToOString( e.Message,
RTL_TEXTENCODING_UTF8 ));
}
}
@@ -396,20 +396,20 @@ public:
DemoWindow();
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
-
+
private:
void init();
DECL_LINK( updateHdl, Timer* );
- ChildWindow maLeftChild;
- ChildWindow maRightTopChild;
- ChildWindow maRightBottomChild;
+ ChildWindow maLeftChild;
+ ChildWindow maRightTopChild;
+ ChildWindow maRightBottomChild;
uno::Reference< presentation::XSlideShow > mxShow;
AutoTimer maUpdateTimer;
bool mbSlideDisplayed;
};
-DemoWindow::DemoWindow() :
+DemoWindow::DemoWindow() :
Dialog((Window*)NULL),
maLeftChild( this ),
maRightTopChild( this ),
@@ -438,14 +438,14 @@ void DemoWindow::init()
{
if( !mxShow.is() )
{
- uno::Reference< lang::XMultiServiceFactory > xFactory(
+ uno::Reference< lang::XMultiServiceFactory > xFactory(
::comphelper::getProcessServiceFactory(),
uno::UNO_QUERY_THROW );
- uno::Reference< uno::XInterface > xInt( xFactory->createInstance(
+ uno::Reference< uno::XInterface > xInt( xFactory->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SlideShow")) ));
- mxShow.set( xInt,
+ mxShow.set( xInt,
uno::UNO_QUERY_THROW );
maLeftChild.setShow( mxShow );
@@ -457,9 +457,9 @@ void DemoWindow::init()
{
uno::Reference< drawing::XDrawPage > xSlide( new DummySlide );
mxShow->displaySlide( xSlide,
- uno::Reference< animations::XAnimationNode >(),
+ uno::Reference< animations::XAnimationNode >(),
uno::Sequence< beans::PropertyValue >() );
- mxShow->setProperty( beans::PropertyValue(
+ mxShow->setProperty( beans::PropertyValue(
rtl::OUString::createFromAscii("RehearseTimings"),
0,
uno::makeAny( sal_True ),
@@ -470,7 +470,7 @@ void DemoWindow::init()
catch (const uno::Exception &e)
{
OSL_TRACE( "Exception '%s' thrown\n" ,
- (const sal_Char*)::rtl::OUStringToOString( e.Message,
+ (const sal_Char*)::rtl::OUStringToOString( e.Message,
RTL_TEXTENCODING_UTF8 ));
}
}
@@ -531,7 +531,7 @@ void DemoApp::Main()
try
{
uno::Reference< uno::XComponentContext > xCtx = ::cppu::defaultBootstrap_InitialComponentContext();
- xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(),
+ xFactory = uno::Reference< lang::XMultiServiceFactory >( xCtx->getServiceManager(),
uno::UNO_QUERY );
if( xFactory.is() )
::comphelper::setProcessServiceFactory( xFactory );
diff --git a/slideshow/test/export.map b/slideshow/test/export.map
index 7321bbca16ad..f313c44bd7ad 100644
--- a/slideshow/test/export.map
+++ b/slideshow/test/export.map
@@ -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
diff --git a/slideshow/test/slidetest.cxx b/slideshow/test/slidetest.cxx
index b3a33f2823d5..f868b8fef6af 100644
--- a/slideshow/test/slidetest.cxx
+++ b/slideshow/test/slidetest.cxx
@@ -2,7 +2,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
@@ -196,34 +196,34 @@ public:
mpLayerManager->isUpdatePending() );
CPPUNIT_ASSERT_MESSAGE( "Update failed on LayerManager #2",
mpLayerManager->update() );
- CPPUNIT_ASSERT_MESSAGE( "Shape 1 must be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 1 must be on background layer",
mpTestShape->getViewLayers().at(0).first == mpTestView );
- CPPUNIT_ASSERT_MESSAGE( "Shape 2 must be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 2 must be on background layer",
pShape2->getViewLayers().at(0).first == mpTestView );
- CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have one layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have one layer",
pShape3->getViewLayers().size() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 3 must be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 3 must be on background layer",
pShape3->getViewLayers().at(0).first == mpTestView );
- CPPUNIT_ASSERT_MESSAGE( "Shape 4 must be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 4 must be on background layer",
pShape4->getViewLayers().at(0).first == mpTestView );
// checking deactivation (all layers except background layer
// must vanish)
mpLayerManager->enterAnimationMode(pShape3);
- CPPUNIT_ASSERT_MESSAGE( "No update pending on LayerManager",
+ CPPUNIT_ASSERT_MESSAGE( "No update pending on LayerManager",
mpLayerManager->isUpdatePending() );
- CPPUNIT_ASSERT_MESSAGE( "Update failed on LayerManager",
+ CPPUNIT_ASSERT_MESSAGE( "Update failed on LayerManager",
mpLayerManager->update() );
- CPPUNIT_ASSERT_MESSAGE( "Shape 4 must not be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 4 must not be on background layer",
pShape4->getViewLayers().at(0).first != mpTestView );
mpLayerManager->leaveAnimationMode(pShape3);
- CPPUNIT_ASSERT_MESSAGE( "Update failed on LayerManager",
+ CPPUNIT_ASSERT_MESSAGE( "Update failed on LayerManager",
mpLayerManager->update() );
- CPPUNIT_ASSERT_MESSAGE( "Shape 4 must be on background layer",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 4 must be on background layer",
pShape4->getViewLayers().at(0).first == mpTestView );
mpLayerManager->deactivate();
- CPPUNIT_ASSERT_MESSAGE( "Update pending on deactivated LayerManager",
+ CPPUNIT_ASSERT_MESSAGE( "Update pending on deactivated LayerManager",
!mpLayerManager->isUpdatePending() );
}
@@ -252,45 +252,45 @@ public:
mpLayerManager->activate( false );
mpLayerManager->update();
- CPPUNIT_ASSERT_MESSAGE( "First shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "First shape not rendered",
mpTestShape->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered",
pShape2->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered",
pShape3->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered",
pShape4->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered",
pShape5->getNumRenders() == 1 );
-
+
mpLayerManager->enterAnimationMode(pShape4);
mpLayerManager->update();
- CPPUNIT_ASSERT_MESSAGE( "First shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "First shape not rendered",
mpTestShape->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered",
pShape2->getNumRenders() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered",
pShape3->getNumRenders() == 2 );
- CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered",
pShape4->getNumRenders() == 2 );
- CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered",
+ CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered",
pShape5->getNumRenders() == 2 );
mpLayerManager->leaveAnimationMode(pShape2);
mpLayerManager->leaveAnimationMode(pShape4);
mpLayerManager->update();
- CPPUNIT_ASSERT_MESSAGE( "First shape not rendered #2",
+ CPPUNIT_ASSERT_MESSAGE( "First shape not rendered #2",
mpTestShape->getNumRenders() == 2 );
- CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered #2",
+ CPPUNIT_ASSERT_MESSAGE( "Second shape not rendered #2",
pShape2->getNumRenders() == 2 );
- CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered #2",
+ CPPUNIT_ASSERT_MESSAGE( "Third shape not rendered #2",
pShape3->getNumRenders() == 3 );
- CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered #2",
- pShape4->getNumRenders() == 3 );
- CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered #2",
- pShape5->getNumRenders() == 3 );
+ CPPUNIT_ASSERT_MESSAGE( "Fourth shape not rendered #2",
+ pShape4->getNumRenders() == 3 );
+ CPPUNIT_ASSERT_MESSAGE( "Fifth shape not rendered #2",
+ pShape5->getNumRenders() == 3 );
}
void testRefCounting()
@@ -315,13 +315,13 @@ public:
mpLayerManager->removeShape(pShape3);
mpLayerManager->removeShape(pShape4);
- CPPUNIT_ASSERT_MESSAGE( "Shape 1 must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 1 must have refcount of 1",
mpTestShape.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 2 must have refcount of ",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 2 must have refcount of ",
pShape2.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have refcount of 1",
pShape3.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 4 must have refcount of",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 4 must have refcount of",
pShape4.use_count() == 1 );
@@ -338,18 +338,18 @@ public:
mpLayerManager->removeShape(pShape3);
mpLayerManager->removeShape(pShape4);
- CPPUNIT_ASSERT_MESSAGE( "Shape 1 must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 1 must have refcount of 1",
mpTestShape.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 2 must have refcount of ",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 2 must have refcount of ",
pShape2.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 3 must have refcount of 1",
pShape3.use_count() == 1 );
- CPPUNIT_ASSERT_MESSAGE( "Shape 4 must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "Shape 4 must have refcount of 1",
pShape4.use_count() == 1 );
maViews.removeView(mpTestView);
mpLayerManager->viewRemoved(mpTestView);
- CPPUNIT_ASSERT_MESSAGE( "View must have refcount of 1",
+ CPPUNIT_ASSERT_MESSAGE( "View must have refcount of 1",
mpTestView.use_count() == 1 );
}
diff --git a/slideshow/test/tests.hxx b/slideshow/test/tests.hxx
index 44509acfe0c4..bce515445373 100644
--- a/slideshow/test/tests.hxx
+++ b/slideshow/test/tests.hxx
@@ -2,7 +2,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
diff --git a/slideshow/test/testshape.cxx b/slideshow/test/testshape.cxx
index 92fd95d466d4..0dee26cb9def 100644
--- a/slideshow/test/testshape.cxx
+++ b/slideshow/test/testshape.cxx
@@ -2,7 +2,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
@@ -216,7 +216,7 @@ private:
TestShapeSharedPtr createTestShape(const basegfx::B2DRange& rRect,
double nPrio)
{
- return TestShapeSharedPtr(
+ return TestShapeSharedPtr(
comphelper::make_shared_from_UNO(
new ImplTestShape(rRect,nPrio)) );
}
diff --git a/slideshow/test/testview.cxx b/slideshow/test/testview.cxx
index 036fc05d948d..0f47670fc2ac 100644
--- a/slideshow/test/testview.cxx
+++ b/slideshow/test/testview.cxx
@@ -2,7 +2,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
@@ -281,7 +281,7 @@ public:
TestViewSharedPtr createTestView()
{
- return TestViewSharedPtr(
+ return TestViewSharedPtr(
comphelper::make_shared_from_UNO(
new ImplTestView()) );
}
diff --git a/slideshow/test/views.cxx b/slideshow/test/views.cxx
index f9bb13ee1c37..c04adc71826f 100644
--- a/slideshow/test/views.cxx
+++ b/slideshow/test/views.cxx
@@ -2,7 +2,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