summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterPaneAnimator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/presenter/PresenterPaneAnimator.cxx')
-rw-r--r--sdext/source/presenter/PresenterPaneAnimator.cxx64
1 files changed, 32 insertions, 32 deletions
diff --git a/sdext/source/presenter/PresenterPaneAnimator.cxx b/sdext/source/presenter/PresenterPaneAnimator.cxx
index a37b58e55c60..4ad652f7d824 100644
--- a/sdext/source/presenter/PresenterPaneAnimator.cxx
+++ b/sdext/source/presenter/PresenterPaneAnimator.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,7 +81,7 @@ namespace {
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
void RestoreFrozenWindows (void);
void FreezePanes (const Reference<rendering::XSpriteCanvas>& rxCanvas);
-
+
protected:
::rtl::Reference<PresenterController> mpPresenterController;
::rtl::Reference<PresenterPaneContainer> mpPaneContainer;
@@ -91,7 +91,7 @@ namespace {
bool mbDoAnimation;
EndActions maShowEndActions;
EndActions maHideEndActions;
-
+
void DeactivatePanes (void);
void ResizePane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
@@ -110,9 +110,9 @@ namespace {
const bool bAnimate,
const EndActions& rShowEndActions,
const EndActions& rEndEndActions);
-
+
virtual ~UnfoldInCenterAnimator (void);
-
+
virtual void ShowPane (void);
virtual void HidePane (void);
@@ -136,10 +136,10 @@ namespace {
const EndActions& rShowEndActions,
const EndActions& rEndEndActions);
virtual ~MoveInFromBottomAnimator (void);
-
+
virtual void ShowPane (void);
virtual void HidePane (void);
-
+
private:
::boost::shared_ptr<PresenterSprite> maNewPaneSprite;
geometry::RealRectangle2D maCenterPaneBox;
@@ -164,10 +164,10 @@ namespace {
const EndActions& rShowEndActions,
const EndActions& rEndEndActions);
virtual ~TransparentOverlayAnimator (void);
-
+
virtual void ShowPane (void);
virtual void HidePane (void);
-
+
private:
PresenterSprite maBackgroundSprite;
void CreateBackgroundSprite (void);
@@ -226,7 +226,7 @@ namespace {
awt::Rectangle maOriginalBoundingBox;
css::geometry::RealRectangle2D maCurrentBoundingBox;
::boost::shared_ptr<PresenterSprite> mpSubstitution;
-
+
};
typedef ::boost::shared_ptr<PaneGroup> SharedPaneGroup;
@@ -387,7 +387,7 @@ void PresenterPaneAnimatorBase::DeactivatePanes (void)
(*iGroup)->DeactivatePanes();
(*iGroup)->HidePanes();
}
-
+
mpWindowManager->Update();
}
@@ -511,9 +511,9 @@ void UnfoldInCenterAnimator::ShowPane (void)
// Create two pane groups that will be moved together. One contains the
// notes view, the other group contains all other panes.
SetupPaneGroups();
-
+
// Setup the places where the two pane groups are moved to.
- maCenterPaneBox
+ maCenterPaneBox
= MovePanesAway(geometry::RealRectangle2D(0,200,aWindowBox.Width, aWindowBox.Height-200));
// Setup the final size of the new pane so that it fits into the space
@@ -582,7 +582,7 @@ void UnfoldInCenterAnimator::ShowPane (void)
nY0,
maCenterPaneBox.Y1,
_1));
-
+
// Call updateScreen after each animation step.
if (xCanvas.is())
pMultiAnimation->AddAnimation(
@@ -609,14 +609,14 @@ void UnfoldInCenterAnimator::ShowPane (void)
void UnfoldInCenterAnimator::HidePane (void)
{
OSL_ASSERT(mpWindowManager.get()!=NULL);
-
+
Reference<awt::XWindow> xParentWindow (mpWindowManager->GetParentWindow(), UNO_QUERY);
if ( ! xParentWindow.is())
return;
DeactivatePanes();
DeactivatePane(mxCenterPaneId);
-
+
::boost::shared_ptr<PresenterAnimator> pAnimator (mpPresenterController->GetAnimator());
const awt::Rectangle aWindowBox (xParentWindow->getPosSize());
const rendering::ViewState aViewState (
@@ -627,7 +627,7 @@ void UnfoldInCenterAnimator::HidePane (void)
NULL,
Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
-
+
// Animate the uppder and lower window bitmaps.
Reference<rendering::XSpriteCanvas> xSpriteCanvas (mpWindowManager->GetParentCanvas(), UNO_QUERY);
::boost::shared_ptr<MultiAnimation> pMultiAnimation (new MultiAnimation(mbDoAnimation ? 500 : 1));
@@ -644,7 +644,7 @@ void UnfoldInCenterAnimator::HidePane (void)
GetLocation((*iGroup)->GetCurrentBoundingBox()),
GetLocation((*iGroup)->GetOriginalBoundingBox())));
}
-
+
// Animate the new center pane to collapse.
const double nY0 ((maPaneGroups[0]->GetOriginalBoundingBox().Y2
+ maPaneGroups[1]->GetOriginalBoundingBox().Y1) / 2);
@@ -671,7 +671,7 @@ void UnfoldInCenterAnimator::HidePane (void)
EndActions::const_iterator iAction;
for (iAction=maHideEndActions.begin(); iAction!=maHideEndActions.end(); ++iAction)
pMultiAnimation->AddEndCallback(*iAction);
-
+
pAnimator->AddAnimation(SharedPresenterAnimation(pMultiAnimation));
}
@@ -709,7 +709,7 @@ geometry::RealRectangle2D UnfoldInCenterAnimator::MovePanesAway (
{
SharedPaneGroup aUpperPanes = maPaneGroups[0];
SharedPaneGroup aLowerPanes = maPaneGroups[1];
-
+
// Move upper pane group out of the way.
const double nTop (rFreeCenterArea.Y1);
const double nUpperVerticalOffset (nTop - aUpperPanes->GetOriginalBoundingBox().Y2);
@@ -796,7 +796,7 @@ void MoveInFromBottomAnimator::ShowPane (void)
geometry::RealPoint2D aStartLocation (maCenterPaneBox.X1, aWindowBox.Height);
geometry::RealPoint2D aEndLocation (maCenterPaneBox.X1, maCenterPaneBox.Y1);
-
+
// Get the sprite of the new pane, make it visible and move it to the
// start location.
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
@@ -805,7 +805,7 @@ void MoveInFromBottomAnimator::ShowPane (void)
{
if (pDescriptor->mxBorderWindow.is())
pDescriptor->mxBorderWindow->setVisible(sal_True);
-
+
maNewPaneSprite = pDescriptor->maSpriteProvider();
if (maNewPaneSprite.get() != NULL)
{
@@ -832,7 +832,7 @@ void MoveInFromBottomAnimator::ShowPane (void)
void MoveInFromBottomAnimator::HidePane (void)
{
OSL_ASSERT(mpWindowManager.get()!=NULL);
-
+
Reference<awt::XWindow> xParentWindow (mpWindowManager->GetParentWindow(), UNO_QUERY);
if ( ! xParentWindow.is())
return;
@@ -845,13 +845,13 @@ void MoveInFromBottomAnimator::HidePane (void)
DeactivatePane(mxCenterPaneId);
SharedPaneGroup aPanes (maPaneGroups[0]);
-
+
aPanes->ShowPanes();
::boost::shared_ptr<MultiAnimation> pMultiAnimation (
new MultiAnimation(mbDoAnimation ? 500 : 0));
awt::Rectangle aWindowBox (xParentWindow->getPosSize());
-
+
// Animate the new center pane to collapse.
pMultiAnimation->AddAnimation(
::boost::bind(
@@ -871,7 +871,7 @@ void MoveInFromBottomAnimator::HidePane (void)
EndActions::const_iterator iAction;
for (iAction=maHideEndActions.begin(); iAction!=maHideEndActions.end(); ++iAction)
pMultiAnimation->AddEndCallback(*iAction);
-
+
::boost::shared_ptr<PresenterAnimator> pAnimator (mpPresenterController->GetAnimator());
pAnimator->AddAnimation(SharedPresenterAnimation(pMultiAnimation));
}
@@ -978,7 +978,7 @@ void TransparentOverlayAnimator::ShowPane (void)
pAllPanes->DeactivatePanes();
mpWindowManager->Update();
}
-
+
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
mpPaneContainer->FindPaneId(mxCenterPaneId));
if (pDescriptor.get() != NULL)
@@ -1038,7 +1038,7 @@ void TransparentOverlayAnimator::CreateBackgroundSprite (void)
Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x80808080));
-
+
Reference<rendering::XPolyPolygon2D> xPolygon (
PresenterGeometryHelper::CreatePolygon(aWindowBox, xCanvas->getDevice()));
if (xPolygon.is())
@@ -1112,7 +1112,7 @@ void PaneGroup::CreateSubstitution (const Reference<rendering::XSpriteCanvas>& r
NULL,
Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
-
+
Reference<rendering::XCanvas> xSpriteCanvas (mpSubstitution->GetCanvas());
if (xSpriteCanvas.is())
xSpriteCanvas->drawBitmap(xBackgroundBitmap, aViewState, aRenderState);
@@ -1323,7 +1323,7 @@ template<typename T>
const T aFinalValue)
{
const double nQ (1 - nP);
-
+
rSetter(T(nQ * aInitialValue + nP * aFinalValue));
}
@@ -1342,7 +1342,7 @@ void SpriteTransform(
const double nP)
{
OSL_ASSERT(rpPaintManager.get()!=NULL);
-
+
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
rpPaneContainer->FindPaneId(rxPaneId));
if (pDescriptor.get() != NULL
@@ -1363,7 +1363,7 @@ void SpriteTransform(
sal::static_int_cast<sal_Int32>(pSprite->GetLocation().Y),
sal::static_int_cast<sal_Int32>(pSprite->GetSize().Width),
sal::static_int_cast<sal_Int32>(pSprite->GetSize().Height)));
-
+
const double nYScale (bAppear ? nP : 1-nP);
pSprite->Transform(geometry::AffineMatrix2D(
1, 0, 0,