summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterPane.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-05-13 13:32:49 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-05-13 13:32:49 +0000
commitffac298e03876e593c25bcb28dcb8e22f2f1efa9 (patch)
tree7186afcb0c1429c4032df9bb3aacd33ca0725863 /sdext/source/presenter/PresenterPane.cxx
parent86e2d05df422741039799e330f225869078f0038 (diff)
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.
Diffstat (limited to 'sdext/source/presenter/PresenterPane.cxx')
-rw-r--r--sdext/source/presenter/PresenterPane.cxx84
1 files changed, 47 insertions, 37 deletions
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 <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/drawing/CanvasFeature.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
@@ -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<OUString> PresenterPane::getSupportedServiceNames_static (void)
-{
- static const ::rtl::OUString sServiceName(
- ::rtl::OUString::createFromAscii("com.sun.star.drawing.PresenterPane"));
- return Sequence<rtl::OUString>(&sServiceName, 1);
-}
-
-
-
-
-Reference<XInterface> PresenterPane::Create (const Reference<uno::XComponentContext>& rxContext)
- SAL_THROW((css::uno::Exception))
-{
- return Reference<XInterface>(static_cast<XWeak*>(new PresenterPane(rxContext)));
-}
-
-
-
-
//===== PresenterPane =========================================================
-PresenterPane::PresenterPane (const Reference<XComponentContext>& rxContext)
- : PresenterPaneBase(rxContext)
+PresenterPane::PresenterPane (
+ const Reference<XComponentContext>& rxContext,
+ const ::rtl::Reference<PresenterController>& rpPresenterController)
+ : PresenterPaneBase(rxContext, rpPresenterController),
+ maBoundingBox()
{
Reference<lang::XMultiComponentFactory> 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