summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drawview.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-04-03 14:09:22 +0000
committerKurt Zenker <kz@openoffice.org>2008-04-03 14:09:22 +0000
commitb64a8f0f103343206ea9e87128228c7b52b19cd3 (patch)
treec2a8110aa67313592967037c9f53be62919c78a4 /sd/source/ui/view/drawview.cxx
parentd2076884b9b4f7b4e241fce196d149e72b64ac44 (diff)
INTEGRATION: CWS presenterview (1.45.40); FILE MERGED
2008/03/26 10:47:07 cl 1.45.40.2: RESYNC: (1.45-1.47); FILE MERGED 2008/01/09 18:28:26 cl 1.45.40.1: #i15900# slideshow api consolidation
Diffstat (limited to 'sd/source/ui/view/drawview.cxx')
-rw-r--r--sd/source/ui/view/drawview.cxx54
1 files changed, 20 insertions, 34 deletions
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 998fc10ef975..0994939adc6b 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drawview.cxx,v $
*
- * $Revision: 1.48 $
+ * $Revision: 1.49 $
*
- * last change: $Author: kz $ $Date: 2008-04-02 09:49:29 $
+ * last change: $Author: kz $ $Date: 2008-04-03 15:09:22 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -159,7 +159,6 @@
#include <svx/sdr/contact/displayinfo.hxx>
#endif
-#include "ShowWindow.hxx"
#include "undo/undomanager.hxx"
using namespace ::com::sun::star;
@@ -176,16 +175,12 @@ TYPEINIT1(DrawView, View);
|*
\************************************************************************/
-DrawView::DrawView (
- DrawDocShell* pDocSh,
- OutputDevice* pOutDev,
- DrawViewShell* pShell)
- : ::sd::View(pDocSh->GetDoc(), pOutDev, pShell),
- mpDocShell(pDocSh),
- mpDrawViewShell(pShell),
- mpVDev(NULL),
- mnPOCHSmph(0),
- mpSlideShow(NULL)
+DrawView::DrawView( DrawDocShell* pDocSh, OutputDevice* pOutDev, DrawViewShell* pShell)
+: ::sd::View(pDocSh->GetDoc(), pOutDev, pShell)
+, mpDocShell(pDocSh)
+, mpDrawViewShell(pShell)
+, mpVDev(NULL)
+, mnPOCHSmph(0)
{
SetCurrentObj(OBJ_RECT, SdrInventor);
}
@@ -199,9 +194,6 @@ DrawView::DrawView (
DrawView::~DrawView()
{
delete mpVDev;
-
- if( mpSlideShow )
- mpSlideShow->dispose();
}
/*************************************************************************
@@ -584,18 +576,13 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, USHORT
BOOL bStandardPaint = TRUE;
SdDrawDocument* pDoc = mpDocShell->GetDoc();
- if(pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
+ if( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
{
- sd::Slideshow* pSlideShow = mpSlideShow;
-
- // Paint-Event fuer eine Praesentation im Vollbildmodus oder Fenster?
- if(!pSlideShow && mpViewSh)
- pSlideShow = mpViewSh->GetSlideShow();
-
- if(pSlideShow)
+ rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( pDoc ) );
+ if(xSlideshow.is() && xSlideshow->isRunning())
{
- OutputDevice* pShowWindow = ( OutputDevice* )pSlideShow->getShowWindow();
- if (pShowWindow == pOutDev || pSlideShow->getAnimationMode() == ANIMATIONMODE_PREVIEW)
+ OutputDevice* pShowWindow = ( OutputDevice* )xSlideshow->getShowWindow();
+ if( (pShowWindow == pOutDev) || (xSlideshow->getAnimationMode() == ANIMATIONMODE_PREVIEW) )
{
if( pShowWindow == pOutDev )
PresPaint(rReg);
@@ -604,7 +591,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, USHORT
}
}
- if (bStandardPaint)
+ if(bStandardPaint)
{
::sd::View::CompleteRedraw(pOutDev, rReg, nPaintMode, pRedirector);
}
@@ -655,13 +642,12 @@ void DrawViewRedirector::PaintObject(::sdr::contact::ViewObjectContact& rOrigina
void DrawView::PresPaint(const Region& rRegion)
{
- Slideshow* pSlideShow = mpSlideShow;
-
- if(!pSlideShow && mpViewSh)
- pSlideShow = mpViewSh->GetSlideShow();
-
- if( pSlideShow )
- pSlideShow->paint( rRegion.GetBoundRect() );
+ if(mpViewSh)
+ {
+ rtl::Reference< SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) );
+ if( xSlideshow.is() && xSlideshow->isRunning() )
+ xSlideshow->paint( rRegion.GetBoundRect() );
+ }
}
/*************************************************************************