merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / view / showview.cxx
blob39836a141ff46c13ad7b2a6355b665288bc17260
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: showview.cxx,v $
10 * $Revision: 1.15 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
34 #include "showview.hxx"
35 #include <svx/svdmodel.hxx>
36 #include <svx/fmview.hxx>
39 #include "drawdoc.hxx"
40 #include "sdpage.hxx"
41 #include "ViewShell.hxx"
42 #include "FrameView.hxx"
44 namespace sd {
46 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
47 #define SO2_DECL_SVINPLACEOBJECT_DEFINED
48 SO2_DECL_REF(SvInPlaceObject)
49 #endif
50 #ifndef SO2_DECL_SVINPLACECLIENT_DEFINED
51 #define SO2_DECL_SVINPLACECLIENT_DEFINED
52 SO2_DECL_REF(SvInPlaceClient)
53 #endif
55 /*************************************************************************
57 |* der Konstruktor setzt den MapMode und arrangiert die einzelnen Seiten
59 \************************************************************************/
61 ShowView::ShowView (
62 SdDrawDocument* pDoc,
63 OutputDevice* pOut,
64 ViewShell* pViewShell,
65 ::Window* pWin)
66 : FmFormView(pDoc, pOut),
67 pDrDoc(pDoc),
68 mpViewSh(pViewShell),
69 pWindowForPlugIns(pWin),
70 nAllowInvalidateSmph(0),
71 bAllowMasterPageCaching(TRUE)
73 // #i73602# Use default from the configuration
74 SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress());
76 // #i74769#, #i75172# Use default from the configuration
77 SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
79 EnableExtendedKeyInputDispatcher(FALSE);
80 EnableExtendedMouseEventDispatcher(FALSE);
81 EnableExtendedCommandEventDispatcher(FALSE);
84 /*************************************************************************
86 |* Destruktor
88 \************************************************************************/
90 ShowView::~ShowView()
94 /*************************************************************************
96 |* Zaehler fuer Invalidierungserlaubnis hoch- oder runter zaehlen
98 \************************************************************************/
100 void ShowView::SetAllowInvalidate(BOOL bFlag)
102 if (!bFlag)
104 nAllowInvalidateSmph++;
106 else if (nAllowInvalidateSmph > 0)
108 nAllowInvalidateSmph--;
112 /*************************************************************************
114 |* ermittelt, ob invalidiert werden darf
116 \************************************************************************/
118 BOOL ShowView::IsInvalidateAllowed() const
120 return (nAllowInvalidateSmph == 0);
123 /*************************************************************************
125 |* Invalidate abfangen
127 \************************************************************************/
129 void ShowView::InvalidateOneWin (::Window& rWin)
131 if (IsInvalidateAllowed())
133 FmFormView::InvalidateOneWin(rWin);
137 /*************************************************************************
139 |* Invalidate abfangen
141 \************************************************************************/
143 void ShowView::InvalidateOneWin (::Window& rWin, const Rectangle& rRect)
145 if (IsInvalidateAllowed())
147 FmFormView::InvalidateOneWin(rWin, rRect);
151 /*************************************************************************
153 |* Paint-Methode: das Ereignis wird an die View weitergeleitet
155 \************************************************************************/
157 void ShowView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
159 FmFormView::CompleteRedraw(pOutDev, rReg, pRedirector);
162 /*************************************************************************
164 |* DoConnect
166 \************************************************************************/
168 void ShowView::DoConnect(SdrOle2Obj* )
170 // connected wird jetzt in FuSlideShow::ShowPlugIns()
173 } // end of namespace sd