From ffac298e03876e593c25bcb28dcb8e22f2f1efa9 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 13 May 2008 13:32:49 +0000 Subject: INTEGRATION: CWS presenterscreen (1.2.4); FILE MERGED 2008/04/22 08:26:39 af 1.2.4.2: RESYNC: (1.2-1.3); FILE MERGED 2008/04/16 15:40:47 af 1.2.4.1: #i18486# Improved invalidation of covered area on resizes and translations. --- sdext/source/presenter/PresenterPane.cxx | 84 ++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 37 deletions(-) (limited to 'sdext') diff --git a/sdext/source/presenter/PresenterPane.cxx b/sdext/source/presenter/PresenterPane.cxx index ffc863264b7a..ed80487ddaeb 100644 --- a/sdext/source/presenter/PresenterPane.cxx +++ b/sdext/source/presenter/PresenterPane.cxx @@ -8,7 +8,7 @@ * * $RCSfile: PresenterPane.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -30,7 +30,9 @@ ************************************************************************/ #include "PresenterPane.hxx" - +#include "PresenterController.hxx" +#include "PresenterPaintManager.hxx" +#include #include #include #include @@ -43,39 +45,13 @@ using ::rtl::OUString; namespace sdext { namespace presenter { -//----- Service --------------------------------------------------------------- - -OUString PresenterPane::getImplementationName_static (void) -{ - return OUString::createFromAscii("com.sun.star.comp.Draw.PresenterPane"); -} - - - - -Sequence PresenterPane::getSupportedServiceNames_static (void) -{ - static const ::rtl::OUString sServiceName( - ::rtl::OUString::createFromAscii("com.sun.star.drawing.PresenterPane")); - return Sequence(&sServiceName, 1); -} - - - - -Reference PresenterPane::Create (const Reference& rxContext) - SAL_THROW((css::uno::Exception)) -{ - return Reference(static_cast(new PresenterPane(rxContext))); -} - - - - //===== PresenterPane ========================================================= -PresenterPane::PresenterPane (const Reference& rxContext) - : PresenterPaneBase(rxContext) +PresenterPane::PresenterPane ( + const Reference& rxContext, + const ::rtl::Reference& rpPresenterController) + : PresenterPaneBase(rxContext, rpPresenterController), + maBoundingBox() { Reference xFactory ( mxComponentContext->getServiceManager(), UNO_QUERY_THROW); @@ -124,9 +100,15 @@ void SAL_CALL PresenterPane::windowResized (const awt::WindowEvent& rEvent) throw (RuntimeException) { (void)rEvent; - ThrowIfDisposed(); + PresenterPaneBase::windowResized(rEvent); + + Invalidate(maBoundingBox); + LayoutContextWindow(); ToTop(); + + UpdateBoundingBox(); + Invalidate(maBoundingBox); } @@ -137,8 +119,14 @@ void SAL_CALL PresenterPane::windowMoved (const awt::WindowEvent& rEvent) throw (RuntimeException) { (void)rEvent; - ThrowIfDisposed(); + PresenterPaneBase::windowMoved(rEvent); + + Invalidate(maBoundingBox); + ToTop(); + + UpdateBoundingBox(); + Invalidate(maBoundingBox); } @@ -148,7 +136,7 @@ void SAL_CALL PresenterPane::windowShown (const lang::EventObject& rEvent) throw (RuntimeException) { (void)rEvent; - ThrowIfDisposed(); + PresenterPaneBase::windowShown(rEvent); ToTop(); @@ -157,6 +145,9 @@ void SAL_CALL PresenterPane::windowShown (const lang::EventObject& rEvent) LayoutContextWindow(); mxContentWindow->setVisible(sal_True); } + + UpdateBoundingBox(); + Invalidate(maBoundingBox); } @@ -166,7 +157,7 @@ void SAL_CALL PresenterPane::windowHidden (const lang::EventObject& rEvent) throw (RuntimeException) { (void)rEvent; - ThrowIfDisposed(); + PresenterPaneBase::windowHidden(rEvent); if (mxContentWindow.is()) mxContentWindow->setVisible(sal_False); @@ -222,4 +213,23 @@ void PresenterPane::CreateCanvases ( +void PresenterPane::Invalidate (const css::awt::Rectangle& rRepaintBox) +{ + // Invalidate the parent window to be able to invalidate an area outside + // the current window area. + mpPresenterController->GetPaintManager()->Invalidate(mxParentWindow, rRepaintBox); +} + + + + +void PresenterPane::UpdateBoundingBox (void) +{ + if (mxBorderWindow.is() && IsVisible()) + maBoundingBox = mxBorderWindow->getPosSize(); + else + maBoundingBox = awt::Rectangle(); +} + + } } // end of namespace ::sd::presenter -- cgit