1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*efeef26fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*efeef26fSAndrew Rist * distributed with this work for additional information
6*efeef26fSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*efeef26fSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist * with the License. You may obtain a copy of the License at
10*efeef26fSAndrew Rist *
11*efeef26fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist *
13*efeef26fSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist * KIND, either express or implied. See the License for the
17*efeef26fSAndrew Rist * specific language governing permissions and limitations
18*efeef26fSAndrew Rist * under the License.
19*efeef26fSAndrew Rist *
20*efeef26fSAndrew Rist *************************************************************/
21*efeef26fSAndrew Rist
22*efeef26fSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir #include <sfx2/printer.hxx>
29cdf0e10cSrcweir #include <rtl/logfile.hxx>
30cdf0e10cSrcweir #include <doc.hxx>
31cdf0e10cSrcweir #include <IDocumentUndoRedo.hxx>
32cdf0e10cSrcweir #include <docsh.hxx>
33cdf0e10cSrcweir #include <viewsh.hxx>
34cdf0e10cSrcweir #include <rootfrm.hxx>
35cdf0e10cSrcweir #include <viewimp.hxx>
36cdf0e10cSrcweir #include <viewopt.hxx>
37cdf0e10cSrcweir #include <txtfrm.hxx> // Zugriff auf TxtCache
38cdf0e10cSrcweir #include <notxtfrm.hxx>
39cdf0e10cSrcweir #include <fntcache.hxx>
40cdf0e10cSrcweir #include <docufld.hxx>
41cdf0e10cSrcweir #include <ptqueue.hxx>
42cdf0e10cSrcweir #include <dview.hxx> // SdrView
43cdf0e10cSrcweir #include <ndgrf.hxx>
44cdf0e10cSrcweir #include <ndindex.hxx>
45cdf0e10cSrcweir #include <accessibilityoptions.hxx>
46cdf0e10cSrcweir #include <switerator.hxx>
47cdf0e10cSrcweir
48cdf0e10cSrcweir /*************************************************************************
49cdf0e10cSrcweir |*
50cdf0e10cSrcweir |* ViewShell::Init()
51cdf0e10cSrcweir |*************************************************************************/
52cdf0e10cSrcweir
Init(const SwViewOption * pNewOpt)53cdf0e10cSrcweir void ViewShell::Init( const SwViewOption *pNewOpt )
54cdf0e10cSrcweir {
55cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::Init" );
56cdf0e10cSrcweir
57cdf0e10cSrcweir bDocSizeChgd = sal_False;
58cdf0e10cSrcweir
59cdf0e10cSrcweir // Wir gehen auf Nummer sicher:
60cdf0e10cSrcweir // Wir muessen die alten Fontinformationen wegschmeissen,
61cdf0e10cSrcweir // wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
62cdf0e10cSrcweir // Init() und Reformat() sind die sichersten Stellen.
63cdf0e10cSrcweir pFntCache->Flush( );
64cdf0e10cSrcweir
65cdf0e10cSrcweir // ViewOptions werden dynamisch angelegt
66cdf0e10cSrcweir if( !pOpt )
67cdf0e10cSrcweir {
68cdf0e10cSrcweir pOpt = new SwViewOption;
69cdf0e10cSrcweir
70cdf0e10cSrcweir // Ein ApplyViewOptions braucht nicht gerufen zu werden
71cdf0e10cSrcweir if( pNewOpt )
72cdf0e10cSrcweir {
73cdf0e10cSrcweir *pOpt = *pNewOpt;
74cdf0e10cSrcweir // Der Zoomfaktor muss eingestellt werden, weil in der CTOR-
75cdf0e10cSrcweir // phase aus Performancegruenden kein ApplyViewOptions gerufen wird.
76cdf0e10cSrcweir if( GetWin() && 100 != pOpt->GetZoom() )
77cdf0e10cSrcweir {
78cdf0e10cSrcweir MapMode aMode( pWin->GetMapMode() );
79cdf0e10cSrcweir const Fraction aNewFactor( pOpt->GetZoom(), 100 );
80cdf0e10cSrcweir aMode.SetScaleX( aNewFactor );
81cdf0e10cSrcweir aMode.SetScaleY( aNewFactor );
82cdf0e10cSrcweir pWin->SetMapMode( aMode );
83cdf0e10cSrcweir }
84cdf0e10cSrcweir }
85cdf0e10cSrcweir }
86cdf0e10cSrcweir
87cdf0e10cSrcweir SwDocShell* pDShell = pDoc->GetDocShell();
88cdf0e10cSrcweir pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
89cdf0e10cSrcweir
90cdf0e10cSrcweir // JP 02.02.99: Bug 61335 - Readonly-Flag an den ViewOptions setzen,
91cdf0e10cSrcweir // bevor das Layout angelegt wird. Ansonsten muesste man
92cdf0e10cSrcweir // nochmals durchformatieren!!
93cdf0e10cSrcweir if( pDShell && pDShell->IsReadOnly() )
94cdf0e10cSrcweir pOpt->SetReadonly( sal_True );
95cdf0e10cSrcweir
96cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - before InitPrt" );
97cdf0e10cSrcweir
98cdf0e10cSrcweir // --> FME 2007-11-06 #i82967#
99cdf0e10cSrcweir OutputDevice* pPDFOut = 0;
100cdf0e10cSrcweir if ( pOut && pOut->GetPDFWriter() )
101cdf0e10cSrcweir pPDFOut = pOut;
102cdf0e10cSrcweir // <--
103cdf0e10cSrcweir
104cdf0e10cSrcweir // --> FME 2005-01-21 #i41075#
105cdf0e10cSrcweir // Only setup the printer if we need one:
106cdf0e10cSrcweir const bool bBrowseMode = pOpt->getBrowseMode();
107cdf0e10cSrcweir if( pPDFOut )
108cdf0e10cSrcweir InitPrt( pPDFOut );
109cdf0e10cSrcweir // <--
110cdf0e10cSrcweir
111cdf0e10cSrcweir // --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
112cdf0e10cSrcweir // page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
113cdf0e10cSrcweir if ( !bBrowseMode )
114cdf0e10cSrcweir {
115cdf0e10cSrcweir pDoc->CheckDefaultPageFmt();
116cdf0e10cSrcweir }
117cdf0e10cSrcweir // <--
118cdf0e10cSrcweir
119cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - after InitPrt" );
120cdf0e10cSrcweir
121cdf0e10cSrcweir if( GetWin() )
122cdf0e10cSrcweir {
123cdf0e10cSrcweir pOpt->Init( GetWin() );
124cdf0e10cSrcweir GetWin()->SetFillColor();
125cdf0e10cSrcweir GetWin()->SetBackground();
126cdf0e10cSrcweir GetWin()->SetLineColor();
127cdf0e10cSrcweir }
128cdf0e10cSrcweir
129cdf0e10cSrcweir // Create a new layout, if there is no one available
130cdf0e10cSrcweir if( !pLayout )
131cdf0e10cSrcweir {
132cdf0e10cSrcweir // Here's the code which disables the usage of "multiple" layouts at the moment
133cdf0e10cSrcweir // If the problems with controls and groups objects are solved,
134cdf0e10cSrcweir // this code can be removed...
135cdf0e10cSrcweir ViewShell *pCurrShell = GetDoc()->GetCurrentViewShell();
136cdf0e10cSrcweir if( pCurrShell )
137cdf0e10cSrcweir pLayout = pCurrShell->pLayout;
138cdf0e10cSrcweir // end of "disable multiple layouts"
139cdf0e10cSrcweir if( !pLayout )
140cdf0e10cSrcweir {
141cdf0e10cSrcweir // switched to two step construction because creating the layout in SwRootFrm needs a valid pLayout set
142cdf0e10cSrcweir pLayout = SwRootFrmPtr(new SwRootFrm( pDoc->GetDfltFrmFmt(), this ));//swmod081016
143cdf0e10cSrcweir pLayout->Init( pDoc->GetDfltFrmFmt() );
1448bfab1dfSMathias Bauer
1458bfab1dfSMathias Bauer // mba: the layout refactoring overlooked an important detail
1468bfab1dfSMathias Bauer // prior to that change, the layout always was destroyed in the dtor of swdoc
1478bfab1dfSMathias Bauer // it is necessary to suppress notifications in the layout when the layout is discarded in its dtor
1488bfab1dfSMathias Bauer // unfortunately this was done by asking whether the doc is in dtor - though the correct question should
1498bfab1dfSMathias Bauer // have been if the rootfrm is in dtor (or even better: discard the layout before the SwRootFrm is destroyed!)
1508bfab1dfSMathias Bauer // SwDoc::IsInDtor() is used at several places all over the code that need to be checked whether
1518bfab1dfSMathias Bauer // "pDoc->IsInDtor()" means what is says or in fact should check for "pRootFrm->IsInDtor()". As this will take some time, I decided
1528bfab1dfSMathias Bauer // to postpone that investigations and the changes it will bring to the 3.5 release and for 3.4 make sure
1538bfab1dfSMathias Bauer // that the layout still gets destroyed in the doc dtor. This is done by sharing "the" layout (that we still have) with the doc.
1548bfab1dfSMathias Bauer GetDoc()->ShareLayout( pLayout );
155cdf0e10cSrcweir }
156cdf0e10cSrcweir }
157cdf0e10cSrcweir SizeChgNotify(); //swmod 071108
158cdf0e10cSrcweir
159cdf0e10cSrcweir // --> #i31958#
160cdf0e10cSrcweir // XForms mode: initialize XForms mode, based on design mode (draw view)
161cdf0e10cSrcweir // MakeDrawView() requires layout
162cdf0e10cSrcweir if( GetDoc()->isXForms() )
163cdf0e10cSrcweir {
164cdf0e10cSrcweir if( ! HasDrawView() )
165cdf0e10cSrcweir MakeDrawView();
166cdf0e10cSrcweir pOpt->SetFormView( ! GetDrawView()->IsDesignMode() );
167cdf0e10cSrcweir }
168cdf0e10cSrcweir // <-- #i31958#
169cdf0e10cSrcweir }
170cdf0e10cSrcweir
171cdf0e10cSrcweir /*************************************************************************
172cdf0e10cSrcweir |*
173cdf0e10cSrcweir |* ViewShell::ViewShell() CTor fuer die erste Shell.
174cdf0e10cSrcweir |*************************************************************************/
175cdf0e10cSrcweir
ViewShell(SwDoc & rDocument,Window * pWindow,const SwViewOption * pNewOpt,OutputDevice * pOutput,long nFlags)176cdf0e10cSrcweir ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
177cdf0e10cSrcweir const SwViewOption *pNewOpt, OutputDevice *pOutput,
178cdf0e10cSrcweir long nFlags )
179cdf0e10cSrcweir :
180cdf0e10cSrcweir aBrowseBorder(),
181cdf0e10cSrcweir pSfxViewShell( 0 ),
182cdf0e10cSrcweir pImp( new SwViewImp( this ) ),
183cdf0e10cSrcweir pWin( pWindow ),
184cdf0e10cSrcweir pOut( pOutput ? pOutput
185cdf0e10cSrcweir : pWindow ? (OutputDevice*)pWindow
186cdf0e10cSrcweir : (OutputDevice*)rDocument.getPrinter( true )),
187cdf0e10cSrcweir mpTmpRef( 0 ),
188cdf0e10cSrcweir pOpt( 0 ),
189cdf0e10cSrcweir pAccOptions( new SwAccessibilityOptions ),
190cdf0e10cSrcweir mpTargetPaintWindow(0), // #i74769#
191cdf0e10cSrcweir mpBufferedOut(0), // #i74769#
192cdf0e10cSrcweir pDoc( &rDocument ),
193cdf0e10cSrcweir nStartAction( 0 ),
194cdf0e10cSrcweir nLockPaint( 0 ),
195cdf0e10cSrcweir mnPrePostPaintCount(0L), // #i72754#
196cdf0e10cSrcweir mpPrePostOutDev(0), // #i72754#
197cdf0e10cSrcweir maPrePostMapMode()
198cdf0e10cSrcweir {
199cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
200cdf0e10cSrcweir
201cdf0e10cSrcweir // OD 2004-06-01 #i26791# - in order to suppress event handling in
202cdf0e10cSrcweir // <SwDrawContact::Changed> during contruction of <ViewShell> instance
203cdf0e10cSrcweir mbInConstructor = true;
204cdf0e10cSrcweir
205cdf0e10cSrcweir bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
206cdf0e10cSrcweir bEndActionByVirDev = sal_False;
207cdf0e10cSrcweir bPaintWorks = bEnableSmooth = sal_True;
208cdf0e10cSrcweir bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
209cdf0e10cSrcweir
210cdf0e10cSrcweir // --> OD 2005-02-11 #i38810# - Do not reset modified state of document,
211cdf0e10cSrcweir // if it's already been modified.
212cdf0e10cSrcweir const bool bIsDocModified( pDoc->IsModified() );
213cdf0e10cSrcweir // <--
214cdf0e10cSrcweir pDoc->acquire();
215cdf0e10cSrcweir pOutput = pOut;
216cdf0e10cSrcweir Init( pNewOpt ); //verstellt ggf. das Outdev (InitPrt())
217cdf0e10cSrcweir pOut = pOutput;
218cdf0e10cSrcweir
219cdf0e10cSrcweir // OD 28.03.2003 #108470# - initialize print preview layout after layout
220cdf0e10cSrcweir // is created in <ViewShell::Init(..)> - called above.
221cdf0e10cSrcweir if ( bPreView )
222cdf0e10cSrcweir {
223cdf0e10cSrcweir // OD 12.12.2002 #103492# - init page preview layout
224cdf0e10cSrcweir pImp->InitPagePreviewLayout();
225cdf0e10cSrcweir }
226cdf0e10cSrcweir
227cdf0e10cSrcweir SET_CURR_SHELL( this );
228cdf0e10cSrcweir
229cdf0e10cSrcweir ((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
230cdf0e10cSrcweir SetHiddenFlag( !pOpt->IsShowHiddenField() );
231cdf0e10cSrcweir
232cdf0e10cSrcweir //In Init wird ein Standard-FrmFmt angelegt.
233cdf0e10cSrcweir // --> OD 2005-02-11 #i38810#
234cdf0e10cSrcweir if ( !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified()
235cdf0e10cSrcweir && !bIsDocModified )
236cdf0e10cSrcweir // <--
237cdf0e10cSrcweir {
238cdf0e10cSrcweir pDoc->ResetModified();
239cdf0e10cSrcweir }
240cdf0e10cSrcweir
241cdf0e10cSrcweir //Format-Cache erweitern.
242cdf0e10cSrcweir if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
243cdf0e10cSrcweir SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
244cdf0e10cSrcweir if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
245cdf0e10cSrcweir Imp()->MakeDrawView();
246cdf0e10cSrcweir
247cdf0e10cSrcweir // OD 2004-06-01 #i26791#
248cdf0e10cSrcweir mbInConstructor = false;
249cdf0e10cSrcweir }
250cdf0e10cSrcweir
251cdf0e10cSrcweir /*************************************************************************
252cdf0e10cSrcweir |*
253cdf0e10cSrcweir |* ViewShell::ViewShell() CTor fuer weitere Shells auf ein Dokument.
254cdf0e10cSrcweir |*************************************************************************/
255cdf0e10cSrcweir
ViewShell(ViewShell & rShell,Window * pWindow,OutputDevice * pOutput,long nFlags)256cdf0e10cSrcweir ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
257cdf0e10cSrcweir OutputDevice *pOutput, long nFlags ) :
258cdf0e10cSrcweir Ring( &rShell ),
259cdf0e10cSrcweir aBrowseBorder( rShell.aBrowseBorder ),
260cdf0e10cSrcweir pSfxViewShell( 0 ),
261cdf0e10cSrcweir pImp( new SwViewImp( this ) ),
262cdf0e10cSrcweir pWin( pWindow ),
263cdf0e10cSrcweir pOut( pOutput ? pOutput
264cdf0e10cSrcweir : pWindow ? (OutputDevice*)pWindow
265cdf0e10cSrcweir : (OutputDevice*)rShell.GetDoc()->getPrinter( true )),
266cdf0e10cSrcweir mpTmpRef( 0 ),
267cdf0e10cSrcweir pOpt( 0 ),
268cdf0e10cSrcweir pAccOptions( new SwAccessibilityOptions ),
269cdf0e10cSrcweir mpTargetPaintWindow(0), // #i74769#
270cdf0e10cSrcweir mpBufferedOut(0), // #i74769#
271cdf0e10cSrcweir pDoc( rShell.GetDoc() ),
272cdf0e10cSrcweir nStartAction( 0 ),
273cdf0e10cSrcweir nLockPaint( 0 ),
274cdf0e10cSrcweir mnPrePostPaintCount(0L), // #i72754#
275cdf0e10cSrcweir mpPrePostOutDev(0), // #i72754#
276cdf0e10cSrcweir maPrePostMapMode()
277cdf0e10cSrcweir {
278cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
279cdf0e10cSrcweir
280cdf0e10cSrcweir // OD 2004-06-01 #i26791# - in order to suppress event handling in
281cdf0e10cSrcweir // <SwDrawContact::Changed> during contruction of <ViewShell> instance
282cdf0e10cSrcweir mbInConstructor = true;
283cdf0e10cSrcweir
284cdf0e10cSrcweir bPaintWorks = bEnableSmooth = sal_True;
285cdf0e10cSrcweir bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
286cdf0e10cSrcweir bEndActionByVirDev = sal_False;
287cdf0e10cSrcweir bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
288cdf0e10cSrcweir if( nFlags & VSHELLFLAG_SHARELAYOUT ) //swmod 080125
289cdf0e10cSrcweir pLayout = rShell.pLayout;//swmod 080125
290cdf0e10cSrcweir
291cdf0e10cSrcweir SET_CURR_SHELL( this );
292cdf0e10cSrcweir
293cdf0e10cSrcweir pDoc->acquire();
294cdf0e10cSrcweir sal_Bool bModified = pDoc->IsModified();
295cdf0e10cSrcweir
296cdf0e10cSrcweir pOutput = pOut;
297cdf0e10cSrcweir Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt())
298cdf0e10cSrcweir pOut = pOutput;
299cdf0e10cSrcweir
300cdf0e10cSrcweir // OD 12.12.2002 #103492#
301cdf0e10cSrcweir if ( bPreView )
302cdf0e10cSrcweir pImp->InitPagePreviewLayout();
303cdf0e10cSrcweir
304cdf0e10cSrcweir ((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
305cdf0e10cSrcweir SetHiddenFlag( !pOpt->IsShowHiddenField() );
306cdf0e10cSrcweir
307cdf0e10cSrcweir // in Init wird ein Standard-FrmFmt angelegt
308cdf0e10cSrcweir if( !bModified && !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified() )
309cdf0e10cSrcweir {
310cdf0e10cSrcweir pDoc->ResetModified();
311cdf0e10cSrcweir }
312cdf0e10cSrcweir
313cdf0e10cSrcweir //Format-Cache erweitern.
314cdf0e10cSrcweir if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
315cdf0e10cSrcweir SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
316cdf0e10cSrcweir if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
317cdf0e10cSrcweir Imp()->MakeDrawView();
318cdf0e10cSrcweir
319cdf0e10cSrcweir // OD 2004-06-01 #i26791#
320cdf0e10cSrcweir mbInConstructor = false;
321cdf0e10cSrcweir
322cdf0e10cSrcweir }
323cdf0e10cSrcweir
324cdf0e10cSrcweir /******************************************************************************
325cdf0e10cSrcweir |*
326cdf0e10cSrcweir |* ViewShell::~ViewShell()
327cdf0e10cSrcweir |*
328cdf0e10cSrcweir ******************************************************************************/
329cdf0e10cSrcweir
~ViewShell()330cdf0e10cSrcweir ViewShell::~ViewShell()
331cdf0e10cSrcweir {
332cdf0e10cSrcweir {
333cdf0e10cSrcweir SET_CURR_SHELL( this );
334cdf0e10cSrcweir bPaintWorks = sal_False;
335cdf0e10cSrcweir
336cdf0e10cSrcweir // FME 2004-06-21 #i9684# Stopping the animated graphics is not
337cdf0e10cSrcweir // necessary during printing or pdf export, because the animation
338cdf0e10cSrcweir // has not been started in this case.
339cdf0e10cSrcweir if( pDoc && GetWin() )
340cdf0e10cSrcweir {
341cdf0e10cSrcweir SwNodes& rNds = pDoc->GetNodes();
342cdf0e10cSrcweir SwGrfNode *pGNd;
343cdf0e10cSrcweir
344cdf0e10cSrcweir SwStartNode *pStNd;
345cdf0e10cSrcweir SwNodeIndex aIdx( *rNds.GetEndOfAutotext().StartOfSectionNode(), 1 );
346cdf0e10cSrcweir while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
347cdf0e10cSrcweir {
348cdf0e10cSrcweir aIdx++;
349cdf0e10cSrcweir if ( 0 != ( pGNd = aIdx.GetNode().GetGrfNode() ) )
350cdf0e10cSrcweir {
351cdf0e10cSrcweir if( pGNd->IsAnimated() )
352cdf0e10cSrcweir {
353cdf0e10cSrcweir SwIterator<SwFrm,SwGrfNode> aIter( *pGNd );
354cdf0e10cSrcweir for( SwFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
355cdf0e10cSrcweir {
356cdf0e10cSrcweir ASSERT( pFrm->IsNoTxtFrm(), "GraphicNode with Text?" );
357cdf0e10cSrcweir ((SwNoTxtFrm*)pFrm)->StopAnimation( pOut );
358cdf0e10cSrcweir }
359cdf0e10cSrcweir }
360cdf0e10cSrcweir }
361cdf0e10cSrcweir aIdx.Assign( *pStNd->EndOfSectionNode(), +1 );
362cdf0e10cSrcweir }
363cdf0e10cSrcweir
364cdf0e10cSrcweir GetDoc()->StopNumRuleAnimations( pOut );
365cdf0e10cSrcweir }
366cdf0e10cSrcweir
367cdf0e10cSrcweir delete pImp; //Erst loeschen, damit die LayoutViews vernichtet werden.
368cdf0e10cSrcweir pImp = 0; // Set to zero, because ~SwFrm relies on it.
369cdf0e10cSrcweir
370cdf0e10cSrcweir if ( pDoc )
371cdf0e10cSrcweir {
372cdf0e10cSrcweir if( !pDoc->release() )
373cdf0e10cSrcweir delete pDoc, pDoc = 0;
374cdf0e10cSrcweir else
375cdf0e10cSrcweir GetLayout()->ResetNewLayout();
376cdf0e10cSrcweir }//swmod 080317
377cdf0e10cSrcweir
378cdf0e10cSrcweir delete pOpt;
379cdf0e10cSrcweir
380cdf0e10cSrcweir //Format-Cache zurueckschrauben.
381cdf0e10cSrcweir if ( SwTxtFrm::GetTxtCache()->GetCurMax() > 250 )
382cdf0e10cSrcweir SwTxtFrm::GetTxtCache()->DecreaseMax( 100 );
383cdf0e10cSrcweir
384cdf0e10cSrcweir //Ggf. aus der PaintQueue entfernen lassen
385cdf0e10cSrcweir SwPaintQueue::Remove( this );
386cdf0e10cSrcweir
387cdf0e10cSrcweir ASSERT( !nStartAction, "EndAction() pending." );
388cdf0e10cSrcweir }
389cdf0e10cSrcweir
390cdf0e10cSrcweir if ( pDoc )
391cdf0e10cSrcweir {
392cdf0e10cSrcweir GetLayout()->DeRegisterShell( this );
393cdf0e10cSrcweir if(pDoc->GetCurrentViewShell()==this)
394cdf0e10cSrcweir pDoc->SetCurrentViewShell( this->GetNext()!=this ?
395cdf0e10cSrcweir (ViewShell*)this->GetNext() : NULL );
396cdf0e10cSrcweir }
397cdf0e10cSrcweir
398cdf0e10cSrcweir delete mpTmpRef;
399cdf0e10cSrcweir delete pAccOptions;
400cdf0e10cSrcweir }
401cdf0e10cSrcweir
HasDrawView() const402cdf0e10cSrcweir sal_Bool ViewShell::HasDrawView() const
403cdf0e10cSrcweir {
404cdf0e10cSrcweir return Imp() ? Imp()->HasDrawView() : 0;
405cdf0e10cSrcweir }
406cdf0e10cSrcweir
MakeDrawView()407cdf0e10cSrcweir void ViewShell::MakeDrawView()
408cdf0e10cSrcweir {
409cdf0e10cSrcweir Imp()->MakeDrawView( );
410cdf0e10cSrcweir }
411cdf0e10cSrcweir
GetDrawView()412cdf0e10cSrcweir SdrView* ViewShell::GetDrawView()
413cdf0e10cSrcweir {
414cdf0e10cSrcweir return Imp()->GetDrawView();
415cdf0e10cSrcweir }
416cdf0e10cSrcweir
GetDrawViewWithValidMarkList()417cdf0e10cSrcweir SdrView* ViewShell::GetDrawViewWithValidMarkList()
418cdf0e10cSrcweir {
419cdf0e10cSrcweir SwDrawView* pDView = Imp()->GetDrawView();
420cdf0e10cSrcweir pDView->ValidateMarkList();
421cdf0e10cSrcweir return pDView;
422cdf0e10cSrcweir }
423