diff options
Diffstat (limited to 'sdext/source/presenter/PresenterPaneAnimator.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterPaneAnimator.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/sdext/source/presenter/PresenterPaneAnimator.cxx b/sdext/source/presenter/PresenterPaneAnimator.cxx index ecf7989bf5b2..fe4ad2046552 100644 --- a/sdext/source/presenter/PresenterPaneAnimator.cxx +++ b/sdext/source/presenter/PresenterPaneAnimator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,7 +82,7 @@ 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; @@ -92,7 +92,7 @@ namespace { bool mbDoAnimation; EndActions maShowEndActions; EndActions maHideEndActions; - + void DeactivatePanes (void); void ResizePane ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId, @@ -111,9 +111,9 @@ namespace { const bool bAnimate, const EndActions& rShowEndActions, const EndActions& rEndEndActions); - + virtual ~UnfoldInCenterAnimator (void); - + virtual void ShowPane (void); virtual void HidePane (void); @@ -137,10 +137,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; @@ -165,10 +165,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); @@ -227,7 +227,7 @@ namespace { awt::Rectangle maOriginalBoundingBox; css::geometry::RealRectangle2D maCurrentBoundingBox; ::boost::shared_ptr<PresenterSprite> mpSubstitution; - + }; typedef ::boost::shared_ptr<PaneGroup> SharedPaneGroup; @@ -388,7 +388,7 @@ void PresenterPaneAnimatorBase::DeactivatePanes (void) (*iGroup)->DeactivatePanes(); (*iGroup)->HidePanes(); } - + mpWindowManager->Update(); } @@ -512,9 +512,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 @@ -583,7 +583,7 @@ void UnfoldInCenterAnimator::ShowPane (void) nY0, maCenterPaneBox.Y1, _1)); - + // Call updateScreen after each animation step. if (xCanvas.is()) pMultiAnimation->AddAnimation( @@ -610,14 +610,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 ( @@ -628,7 +628,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)); @@ -645,7 +645,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); @@ -672,7 +672,7 @@ void UnfoldInCenterAnimator::HidePane (void) EndActions::const_iterator iAction; for (iAction=maHideEndActions.begin(); iAction!=maHideEndActions.end(); ++iAction) pMultiAnimation->AddEndCallback(*iAction); - + pAnimator->AddAnimation(SharedPresenterAnimation(pMultiAnimation)); } @@ -710,7 +710,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); @@ -797,7 +797,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 ( @@ -806,7 +806,7 @@ void MoveInFromBottomAnimator::ShowPane (void) { if (pDescriptor->mxBorderWindow.is()) pDescriptor->mxBorderWindow->setVisible(sal_True); - + maNewPaneSprite = pDescriptor->maSpriteProvider(); if (maNewPaneSprite.get() != NULL) { @@ -833,7 +833,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; @@ -846,13 +846,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( @@ -872,7 +872,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)); } @@ -979,7 +979,7 @@ void TransparentOverlayAnimator::ShowPane (void) pAllPanes->DeactivatePanes(); mpWindowManager->Update(); } - + PresenterPaneContainer::SharedPaneDescriptor pDescriptor ( mpPaneContainer->FindPaneId(mxCenterPaneId)); if (pDescriptor.get() != NULL) @@ -1039,7 +1039,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()) @@ -1113,7 +1113,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); @@ -1324,7 +1324,7 @@ template<typename T> const T aFinalValue) { const double nQ (1 - nP); - + rSetter(T(nQ * aInitialValue + nP * aFinalValue)); } @@ -1343,7 +1343,7 @@ void SpriteTransform( const double nP) { OSL_ASSERT(rpPaintManager.get()!=NULL); - + PresenterPaneContainer::SharedPaneDescriptor pDescriptor ( rpPaneContainer->FindPaneId(rxPaneId)); if (pDescriptor.get() != NULL @@ -1364,7 +1364,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, |