diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-03-30 09:29:49 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-03-30 09:29:49 +0000 |
commit | 3c1c5664bc297bf23bdcb2023926c6747f50020e (patch) | |
tree | 033aad74c51b6267fe0b5cbe345d500a67923573 /sd/source/ui/dlg/docprev.cxx | |
parent | 37b23f26a9b84e4a1ece1b4b7851f68eb189cbd6 (diff) |
INTEGRATION: CWS impress40 (1.14.78); FILE MERGED
2005/03/17 11:21:58 cl 1.14.78.1: #i45157# fixed wizard preview
Diffstat (limited to 'sd/source/ui/dlg/docprev.cxx')
-rw-r--r-- | sd/source/ui/dlg/docprev.cxx | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 23082df4b54f..756c13543679 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docprev.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: kz $ $Date: 2005-01-21 16:33:51 $ + * last change: $Author: rt $ $Date: 2005-03-30 10:29:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -145,7 +145,8 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId ) mpSlideShow = 0; SetBorderStyle( WINDOW_BORDER_MONO ); svtools::ColorConfig aColorConfig; - SetBackground( Wallpaper( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) ) ); + Wallpaper aEmpty; + SetBackground( aEmpty ); } SdDocPreviewWin::SdDocPreviewWin( Window* pParent ) @@ -154,11 +155,18 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent ) mpSlideShow = 0; SetBorderStyle( WINDOW_BORDER_MONO ); svtools::ColorConfig aColorConfig; - SetBackground( Wallpaper( Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ) ) ); + Wallpaper aEmpty; + SetBackground( aEmpty ); Resize(); Show(); } +SdDocPreviewWin::~SdDocPreviewWin() +{ + delete mpSlideShow; + delete pMetaFile; +} + void SdDocPreviewWin::Resize() { Invalidate(); @@ -221,19 +229,26 @@ void SdDocPreviewWin::ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev ) void SdDocPreviewWin::Paint( const Rectangle& rRect ) { - SvtAccessibilityOptions aAccOptions; - bool bUseContrast = aAccOptions.GetIsForPagePreviews() && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); - SetDrawMode( bUseContrast - ? ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST - : ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR ); + if(( mpSlideShow == 0) || (mpSlideShow->isTerminated() ) ) + { + SvtAccessibilityOptions aAccOptions; + bool bUseContrast = aAccOptions.GetIsForPagePreviews() && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + SetDrawMode( bUseContrast + ? ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST + : ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR ); + + ImpPaint( pMetaFile, (VirtualDevice*)this ); - ImpPaint( pMetaFile, (VirtualDevice*)this ); + } } void SdDocPreviewWin::startPreview() { if( mpSlideShow ) + { delete mpSlideShow; + mpSlideShow = 0; + } ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell * >( mpObj ); if( mpObj ) @@ -244,7 +259,7 @@ void SdDocPreviewWin::startPreview() { SdPage* pPage = pDoc->GetSdPage( mnShowPage, PK_STANDARD ); - if( pPage ) + if( pPage && (pPage->getTransitionType() != 0) ) { std::auto_ptr<sd::Slideshow> pSlideShow( new sd::Slideshow( 0, 0, pDoc ) ); |