diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-11 12:41:37 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-11 12:41:37 +0000 |
commit | e7be3e965c80fa376c4acfb9d6ca75ebe081e286 (patch) | |
tree | 63940bc7319aa3e0a68740956c70b54cfe89c9c8 /sdext | |
parent | fc2a63a67b2a620795238b8714d027428201f2c4 (diff) |
INTEGRATION: CWS presenterfixes (1.4.2); FILE MERGED
2008/06/09 09:34:45 af 1.4.2.2: #i90512# Improved the ForceRepaint() method.
2008/05/27 07:41:30 af 1.4.2.1: #i88854# Added ReleaseView to CachablePresenterView.
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterSlideShowView.cxx | 93 |
1 files changed, 50 insertions, 43 deletions
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index c2eecd0829af..cd82e4300cfc 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -8,7 +8,7 @@ * * $RCSfile: PresenterSlideShowView.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -211,15 +211,7 @@ void PresenterSlideShowView::disposing (void) mxWindow = NULL; } mxSlideShowController = NULL; - if (mxSlideShow.is()) - { - if (mbIsViewAdded) - { - mxSlideShow->removeView(this); - mbIsViewAdded = false; - } - mxSlideShow = NULL; - } + mxSlideShow = NULL; if (mxViewCanvas.is()) { Reference<XComponent> xComponent (mxViewCanvas, UNO_QUERY); @@ -234,8 +226,38 @@ void PresenterSlideShowView::disposing (void) if (xComponent.is()) xComponent->dispose(); } + if (mxPointer.is()) + { + Reference<XComponent> xComponent (mxPointer, UNO_QUERY); + mxPointer = NULL; + if (xComponent.is()) + xComponent->dispose(); + } + if (mxBackgroundPolygon1.is()) + { + Reference<XComponent> xComponent (mxBackgroundPolygon1, UNO_QUERY); + mxBackgroundPolygon1 = NULL; + if (xComponent.is()) + xComponent->dispose(); + } + if (mxBackgroundPolygon2.is()) + { + Reference<XComponent> xComponent (mxBackgroundPolygon2, UNO_QUERY); + mxBackgroundPolygon2 = NULL; + if (xComponent.is()) + xComponent->dispose(); + } mxComponentContext = NULL; + mpPresenterController = NULL; + mxViewId = NULL; + mxController = NULL; + mxCanvas = NULL; + mpBackground.reset(); + msClickToExitPresentationText = OUString(); + msClickToExitPresentationTitle = OUString(); + msTitleTemplate = OUString(); + mxCurrentSlide = NULL; } @@ -298,6 +320,20 @@ css::uno::Reference<css::drawing::XDrawPage> SAL_CALL PresenterSlideShowView::ge +//----- CachablePresenterView ------------------------------------------------- + +void PresenterSlideShowView::ReleaseView (void) +{ + if (mxSlideShow.is() && mbIsViewAdded) + { + mxSlideShow->removeView(this); + mbIsViewAdded = false; + } +} + + + + //----- XSlideShowView -------------------------------------------------------- Reference<rendering::XSpriteCanvas> SAL_CALL PresenterSlideShowView::getCanvas (void) @@ -868,7 +904,7 @@ void PresenterSlideShowView::PaintEndSlide (const awt::Rectangle& rRepaintBox) void PresenterSlideShowView::PaintInnerWindow (const awt::PaintEvent& rEvent) { - // Forward windowpaint to listeners. + // Forward window paint to listeners. awt::PaintEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator @@ -881,14 +917,6 @@ void PresenterSlideShowView::PaintInnerWindow (const awt::PaintEvent& rEvent) if (mbIsForcedPaintPending) ForceRepaint(); - // Schedule the processing of the events caused by the previous notifies. - if (mxSlideShow.is()) - { - double nTimeToNextUpdateCall (0); - mxSlideShow->update(nTimeToNextUpdateCall); - // We do not call update regularly, so we ignore the returned values. - } - // Finally, in double buffered environments, request the changes to be // made visible. Reference<rendering::XSpriteCanvas> mxSpriteCanvas (mxCanvas, UNO_QUERY); @@ -1019,32 +1047,11 @@ void PresenterSlideShowView::Resize (void) void PresenterSlideShowView::ForceRepaint (void) { - // The modify listeners are called twice. The first time the - // mbIsInModifyNotification flag leads to a slightly modified - // transformation returned by getTransformation(). With this hack we - // get past the optimization that otherwise prevents a proper repaint - // when the size of the preview does not change. - mbIsInModifyNotification = true; - try - { - lang::EventObject aEvent; - aEvent.Source = static_cast<XWeak*>(this); - ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<util::XModifyListener>*)NULL)); - if (pIterator != NULL) - pIterator->notifyEach(&util::XModifyListener::modified, aEvent); - } - catch (Exception&) + if (mxSlideShow.is() && mbIsViewAdded) { + mxSlideShow->removeView(this); + mxSlideShow->addView(this); } - mbIsInModifyNotification = false; - - lang::EventObject aEvent; - aEvent.Source = static_cast<XWeak*>(this); - ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<util::XModifyListener>*)NULL)); - if (pIterator != NULL) - pIterator->notifyEach(&util::XModifyListener::modified, aEvent); } |