1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: prevwsh2.cxx,v $
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_sc.hxx"
36 //------------------------------------------------------------------
40 #define _SFXMULTISEL_HXX
49 //#define _ERRCODE_HXX
59 #define _SVMEMPOOL_HXX
64 //#define _DATETIME_HXX
70 #define _SV_MULTISEL_HXX
73 //#define _CLIP_HXX ***
100 //#define _WRKWIN_HXX
102 //#define _FLOATWIN_HXX
103 //#define _DOCKWIN_HXX
105 //#define _SCRBAR_HXX
106 //#define _BUTTON_HXX
107 //#define _IMAGEBTN_HXX
111 //#define _COMBOBOX_HXX
112 //#define _LSTBOX_HXX
113 //#define _SELENG_HXX ***
117 //#define _MOREBTN_HXX ***
118 //#define _TOOLBOX_HXX
119 //#define _STATUS_HXX ***
120 //#define _DIALOG_HXX
121 //#define _MSGBOX_HXX
122 //#define _SYSDLG_HXX
123 //#define _PRNDLG_HXX
125 //#define _TABDLG_HXX
126 //#define _GDIMTF_HXX
139 //#define _TABBAR_HXX
140 //#define _VALUESET_HXX
142 //#define _STDCTRL_HXX
143 //#define _CTRLBOX_HXX
144 #define _CTRLTOOL_HXX
150 //#define _SVTREELIST_HXX ***
152 //#define _SVLBOXITM_HXX ***
153 //#define _SVTREEBOX_HXX ***
158 //#define _SFXINIMGR_HXX ***
159 //#define _SFXCFGITEM_HXX
160 //#define _SFX_PRINTER_HXX
161 #define _SFXGENLINK_HXX
162 #define _SFXHINTPOST_HXX
163 #define _SFXDOCINF_HXX
164 #define _SFXLINKHDL_HXX
165 //#define _SFX_PROGRESS_HXX
168 //#define _SFX_SHELL_HXX
169 //#define _SFXAPP_HXX
170 //#define _SFXDISPATCH_HXX
171 //#define _SFXMSG_HXX ***
172 //#define _SFXOBJFACE_HXX ***
173 //#define _SFXREQUEST_HXX
174 #define _SFXMACRO_HXX
177 //#define _SFXAPPWIN_HXX ***
178 #define _SFX_SAVEOPT_HXX
179 //#define _SFX_CHILDWIN_HXX
180 //#define _SFXCTRLITEM_HXX
181 #define _SFXPRNMON_HXX
183 #define _SFXMSGDESCR_HXX
184 #define _SFXMSGPOOL_HXX
185 #define _SFXFILEDLG_HXX
187 #define _SFXTBXCTRL_HXX
188 #define _SFXSTBITEM_HXX
189 #define _SFXMNUITEM_HXX
190 #define _SFXIMGMGR_HXX
191 #define _SFXTBXMGR_HXX
192 #define _SFXSTBMGR_HXX
193 #define _SFX_MINFITEM_HXX
194 #define _SFXEVENT_HXX
197 //#define _SFX_OBJSH_HXX
198 //#define _SFX_CLIENTSH_HXX
199 //#define _SFXDOCINF_HXX
200 //#define _SFX_OBJFAC_HXX
201 #define _SFX_DOCFILT_HXX
202 //#define _SFXDOCFILE_HXX ***
203 //define _VIEWFAC_HXX
204 //#define _SFXVIEWFRM_HXX
205 //#define _SFXVIEWSH_HXX
206 //#define _MDIFRM_HXX ***
207 #define _SFX_IPFRM_HXX
208 //#define _SFX_INTERNO_HXX
211 //#define _SFXTABDLG_HXX
212 //#define _BASEDLGS_HXX ***
213 #define _SFX_DINFDLG_HXX
214 #define _SFXDINFEDT_HXX
215 #define _SFX_MGETEMPL_HXX
216 #define _SFX_TPLPITEM_HXX
217 //#define _SFX_STYLEDLG_HXX
218 #define _NEWSTYLE_HXX
219 //#define _SFXDOCTEMPL_HXX ***
220 //#define _SFXDOCTDLG_HXX ***
221 //#define _SFX_TEMPLDLG_HXX ***
222 //#define _SFXNEW_HXX ***
223 #define _SFXDOCMAN_HXX
224 #define _SFXDOCKWIN_HXX
227 #define _SFX_WHMAP_HXX
228 //#define _ARGS_HXX ***
229 //#define _SFXPOOLITEM_HXX
230 //#define _SFXINTITEM_HXX
231 //#define _SFXENUMITEM_HXX
232 #define _SFXFLAGITEM_HXX
233 //#define _SFXSTRITEM_HXX
234 #define _SFXPTITEM_HXX
235 #define _SFXRECTITEM_HXX
236 //#define _SFXITEMPOOL_HXX
237 //#define _SFXITEMSET_HXX
238 #define _SFXITEMITER_HXX
239 #define _SFX_WHITER_HXX
240 #define _SFXPOOLCACH_HXX
241 //#define _AEITEM_HXX
242 #define _SFXRNGITEM_HXX
243 //#define _SFXSLSTITM_HXX
244 //#define _SFXSTYLE_HXX
252 //#define _XTABLE_HXX
257 #define _SDR_NOTRANSFORM
258 //#define _SDR_NOOBJECTS
259 //#define _SDR_NOVIEWS
260 #define _SDR_NOTRANSFORM
261 #define _SDR_NOVIEWMARKER
262 #define _SDR_NODRAGMETHODS
264 #define _SDR_NOXOUTDEV
269 #define _SI_NOSBXCONTROLS
270 //#define _VCATTR_HXX
273 #define _SI_NOOTHERFORMS
275 //#define _VCDRWOBJ_HXX
276 #define _SI_NOCONTROL
279 #define _SI_NOSBXCONTROLS
280 //#define _SIDLL_HXX ***
282 #define _SVX_DAILDLL_HXX
283 #define _SVX_HYPHEN_HXX
284 #define _SVX_IMPGRF_HXX
285 #define _SVX_OPTITEMS_HXX
286 #define _SVX_OPTGERL_HXX
287 #define _SVX_OPTSAVE_HXX
288 #define _SVX_OPTSPELL_HXX
289 #define _SVX_OPTPATH_HXX
290 #define _SVX_OPTLINGU_HXX
291 #define _SVX_RULER_HXX
292 #define _SVX_RULRITEM_HXX
293 #define _SVX_SPLWRAP_HXX
294 #define _SVX_SPLDLG_HXX
295 #define _SVX_THESDLG_HXX
300 // INCLUDE ---------------------------------------------------------------
302 #include <svx/svdmodel.hxx>
303 #include <svtools/smplhint.hxx>
305 #include "prevwsh.hxx"
307 #include "preview.hxx"
311 // STATIC DATA -----------------------------------------------------------
313 // -----------------------------------------------------------------------
315 void __EXPORT
ScPreviewShell::Notify( SfxBroadcaster
&, const SfxHint
& rHint
)
317 BOOL bDataChanged
= FALSE
;
319 if (rHint
.ISA(SfxSimpleHint
))
321 ULONG nSlot
= ((const SfxSimpleHint
&)rHint
).GetId();
324 case FID_DATACHANGED
:
325 case SID_SCPRINTOPTIONS
:
328 case SC_HINT_DRWLAYER_NEW
:
330 SfxBroadcaster
* pDrawBC
= pDocShell
->GetDocument()->GetDrawBroadcaster();
332 StartListening(*pDrawBC
);
337 else if (rHint
.ISA(ScPaintHint
))
339 if ( ((const ScPaintHint
&)rHint
).GetPrintFlag() )
341 USHORT nParts
= ((const ScPaintHint
&)rHint
).GetParts();
342 if (nParts
& ( PAINT_GRID
| PAINT_LEFT
| PAINT_TOP
| PAINT_SIZE
))
346 else if (rHint
.ISA(SdrHint
))
348 // SdrHints are no longer used for invalidating, thus react on objectchange instead
349 if(HINT_OBJCHG
== ((const SdrHint
&)rHint
).GetKind())
354 pPreview
->DataChanged(TRUE
);