From c3b8a2b1c7f9cd4f4b3b869a1b2e7cb12e279d69 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 3 Apr 2007 15:32:01 +0000 Subject: INTEGRATION: CWS components1 (1.30.42); FILE MERGED 2007/02/14 09:59:12 af 1.30.42.8: #i68075# A full screen show can be started without a view shell. 2007/01/25 15:40:50 af 1.30.42.7: RESYNC: (1.33-1.36); FILE MERGED 2006/11/21 16:30:15 af 1.30.42.6: RESYNC: (1.32-1.33); FILE MERGED 2006/11/21 09:41:48 af 1.30.42.5: RESYNC: (1.31-1.32); FILE MERGED 2006/09/25 17:48:23 af 1.30.42.4: RESYNC: (1.30-1.31); FILE MERGED 2006/09/15 13:44:49 af 1.30.42.3: #i67056# The new PresentationViewShell is initialized with a copy of the FrameView. 2006/09/15 09:45:36 af 1.30.42.2: #i68075# Added parent window argument to SlideShow constructor. 2006/08/22 13:33:54 af 1.30.42.1: #i68075# Adaption to change of signature of ViewShellBase::Get(Main)ViewShell(). --- sd/source/ui/view/presvish.cxx | 57 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 11 deletions(-) (limited to 'sd/source') diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index f54c2792db0d..1118c0edf8e3 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -4,9 +4,9 @@ * * $RCSfile: presvish.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: kz $ $Date: 2006-12-14 17:48:55 $ + * last change: $Author: rt $ $Date: 2007-04-03 16:32:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -85,7 +85,6 @@ #include "app.hrc" #include "strings.hrc" #include "glob.hrc" -#include "PaneManager.hxx" #ifndef SD_VIEW_SHELL_BASE_HXX #include "ViewShellBase.hxx" #endif @@ -218,7 +217,8 @@ void PresentationViewShell::FinishInitialization ( SwitchPage (nPageNumber); WriteFrameViewData(); - mpSlideShow = new sd::Slideshow( this, GetView(), GetDoc() ); + mpSlideShow = new sd::Slideshow( this, GetView(), GetDoc(), + GetViewShellBase().GetViewWindow() ); mpSlideShow->setRehearseTimings( rRequest.GetSlot() == SID_REHEARSE_TIMINGS ); GetActiveWindow()->GrabFocus(); @@ -232,6 +232,7 @@ void PresentationViewShell::FinishInitialization ( mpSlideShow = 0; } + Resize(); GetViewFrame()->Show(); Activate(TRUE); @@ -298,19 +299,46 @@ void PresentationViewShell::Paint( const Rectangle& rRect, ::sd::Window* ) +void PresentationViewShell::CreateFullScreenShow ( + ViewShellBase& rViewShellBase, + SfxRequest& rRequest) +{ + CreateFullScreenShow( + rViewShellBase.GetDocument(), + rViewShellBase.GetDocument()->GetSdPage(0, PK_STANDARD), + NULL, + rRequest); +} + + + + void PresentationViewShell::CreateFullScreenShow ( ViewShell* pOriginShell, SfxRequest& rRequest) { - SdDrawDocument* pDoc = pOriginShell->GetDoc(); - SdPage* pCurrentPage = pOriginShell->GetActualPage(); + CreateFullScreenShow( + pOriginShell->GetDoc(), + pOriginShell->GetActualPage(), + pOriginShell->GetFrameView(), + rRequest); +} + + + +void PresentationViewShell::CreateFullScreenShow ( + SdDrawDocument* pDocument, + SdPage* pCurrentPage, + FrameView* pFrameView, + SfxRequest& rRequest) +{ SFX_REQUEST_ARG (rRequest, pAlwaysOnTop, SfxBoolItem, ATTR_PRESENT_ALWAYS_ON_TOP, FALSE); bool bAlwaysOnTop = ((rRequest.GetSlot() != SID_REHEARSE_TIMINGS) && pAlwaysOnTop ) ? pAlwaysOnTop->GetValue() - : pDoc->getPresentationSettings().mbAlwaysOnTop; + : pDocument->getPresentationSettings().mbAlwaysOnTop; SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS); @@ -349,7 +377,7 @@ void PresentationViewShell::CreateFullScreenShow ( // the new view shell--a prerequisite to process slot calls and // initialize its panes--a GrabFocus() has to be called later on. SfxTopFrame* pNewFrame = SfxTopFrame::Create ( - pDoc->GetDocSh(), + pDocument->GetDocSh(), pWorkWindow, PRESENTATION_FACTORY_ID, TRUE); @@ -367,18 +395,25 @@ void PresentationViewShell::CreateFullScreenShow ( if (pCurrentPage != NULL) nStartPage = (pCurrentPage->GetPageNum() - 1) / 2; -// pBase->GetViewFrame()->Show(); // The following GrabFocus() is responsible for activating the // new view shell. Without it the screen remains blank (under // Windows and some Linux variants.) pBase->GetWindow()->GrabFocus(); - PresentationViewShell* pShell = PTR_CAST(PresentationViewShell, pBase->GetMainViewShell()); + PresentationViewShell* pShell = dynamic_cast( + pBase->GetMainViewShell().get()); if (pShell != NULL) + { + // Initialize the new presentation view shell with a copy of + // the frame view of the current view shell. This avoids + // that changes made by the presentation have an effect on + // the other view shells. + FrameView* pFrameViewCopy = new FrameView(pDocument, pFrameView); pShell->FinishInitialization ( - pOriginShell->GetFrameView(), + pFrameViewCopy, rRequest, nStartPage); + } } } } -- cgit