summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/shapes
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/shapes')
-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
27 files changed, 1006 insertions, 1006 deletions
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;