merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / drawfunc / futext2.cxx
bloba52b8b9ce4524280ffbb5fcd4563db3aa8842a69
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: futext2.cxx,v $
10 * $Revision: 1.7 $
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 //------------------------------------------------------------------------
38 // TOOLS
39 #define _BIGINT_HXX
40 #define _SFXMULTISEL_HXX
41 #define _STACK_HXX
42 #define _QUEUE_HXX
43 #define _DYNARR_HXX
44 #define _TREELIST_HXX
45 #define _CACHESTR_HXX
46 #define _NEW_HXX
47 //#define _SHL_HXX
48 //#define _LINK_HXX
49 //#define _ERRCODE_HXX
50 //#define _GEN_HXX
51 //#define _FRACT_HXX
52 //#define _STRING_HXX
53 //#define _MTF_HXX
54 //#define _CONTNR_HXX
55 //#define _LIST_HXX
56 //#define _TABLE_HXX
57 #define _DYNARY_HXX
58 //#define _UNQIDX_HXX
59 #define _SVMEMPOOL_HXX
60 //#define _UNQID_HXX
61 //#define _DEBUG_HXX
62 //#define _DATE_HXX
63 //#define _TIME_HXX
64 //#define _DATETIME_HXX
65 //#define _INTN_HXX
66 //#define _WLDCRD_HXX
67 //#define _FSYS_HXX
68 //#define _STREAM_HXX
69 #define _CACHESTR_HXX
70 #define _SV_MULTISEL_HXX
72 //SV
73 //#define _CLIP_HXX ***
74 #define _CONFIG_HXX
75 #define _CURSOR_HXX
76 #define _FONTDLG_HXX
77 #define _PRVWIN_HXX
78 //#define _COLOR_HXX
79 //#define _PAL_HXX
80 //#define _BITMAP_HXX
81 //#define _GDIOBJ_HXX
82 //#define _POINTR_HXX
83 //#define _ICON_HXX
84 //#define _IMAGE_HXX
85 //#define _KEYCOD_HXX
86 //#define _EVENT_HXX
87 #define _HELP_HXX
88 //#define _APP_HXX
89 //#define _MDIAPP_HXX
90 //#define _TIMER_HXX
91 //#define _METRIC_HXX
92 //#define _REGION_HXX
93 //#define _OUTDEV_HXX
94 //#define _SYSTEM_HXX
95 //#define _VIRDEV_HXX
96 //#define _JOBSET_HXX
97 //#define _PRINT_HXX
98 //#define _WINDOW_HXX
99 //#define _SYSWIN_HXX
100 //#define _WRKWIN_HXX
101 #define _MDIWIN_HXX
102 //#define _FLOATWIN_HXX
103 //#define _DOCKWIN_HXX
104 //#define _CTRL_HXX
105 //#define _SCRBAR_HXX
106 //#define _BUTTON_HXX
107 //#define _IMAGEBTN_HXX
108 //#define _FIXED_HXX
109 //#define _GROUP_HXX
110 //#define _EDIT_HXX
111 //#define _COMBOBOX_HXX
112 //#define _LSTBOX_HXX
113 //#define _SELENG_HXX ***
114 //#define _SPLIT_HXX
115 #define _SPIN_HXX
116 //#define _FIELD_HXX
117 //#define _MOREBTN_HXX ***
118 //#define _TOOLBOX_HXX
119 #define _STATUS_HXX
120 #define _SVTCTRL3_HXX
121 //#define _DIALOG_HXX
122 //#define _MSGBOX_HXX
123 //#define _SYSDLG_HXX
124 //#define _FILDLG_HXX ***
125 //#define _PRNDLG_HXX
126 #define _COLDLG_HXX
127 //#define _TABDLG_HXX
128 //#define _MENU_HXX ***
129 //#define _GDIMTF_HXX
130 //#define _POLY_HXX
131 //#define _ACCEL_HXX
132 //#define _GRAPH_HXX
133 #define _SOUND_HXX
135 #if defined WIN
136 #define _MENUBTN_HXX
137 #endif
139 //svtools
140 #define _SCRWIN_HXX
141 #define _RULER_HXX
142 //#define _TABBAR_HXX
143 //#define _VALUESET_HXX
144 #define _STDMENU_HXX
145 //#define _STDCTRL_HXX
146 //#define _CTRLBOX_HXX
147 #define _CTRLTOOL_HXX
148 #define _EXTATTR_HXX
149 #define _FRM3D_HXX
150 #define _EXTATTR_HXX
152 //SVTOOLS
153 //#define _SVTREELIST_HXX
154 #define _FILTER_HXX
155 //#define _SVLBOXITM_HXX
156 //#define _SVTREEBOX_HXX
157 #define _SVICNVW_HXX
158 #define _SVTABBX_HXX
160 //sfxcore.hxx
161 //#define _SFXINIMGR_HXX
162 //#define _SFXCFGITEM_HXX
163 //#define _SFX_PRINTER_HXX
164 #define _SFXGENLINK_HXX
165 #define _SFXHINTPOST_HXX
166 #define _SFXDOCINF_HXX
167 #define _SFXLINKHDL_HXX
168 //#define _SFX_PROGRESS_HXX
170 //sfxsh.hxx
171 //#define _SFX_SHELL_HXX
172 //#define _SFXAPP_HXX
173 //#define _SFXDISPATCH_HXX
174 //#define _SFXMSG_HXX
175 //#define _SFXOBJFACE_HXX
176 //#define _SFXREQUEST_HXX
177 #define _SFXMACRO_HXX
179 // SFX
180 //#define _SFXAPPWIN_HXX
181 #define _SFX_SAVEOPT_HXX
182 //#define _SFX_CHILDWIN_HXX
183 //#define _SFXCTRLITEM_HXX
184 #define _SFXPRNMON_HXX
185 #define _INTRO_HXX
186 #define _SFXMSGDESCR_HXX
187 #define _SFXMSGPOOL_HXX
188 #define _SFXFILEDLG_HXX
189 #define _PASSWD_HXX
190 #define _SFXTBXCTRL_HXX
191 #define _SFXSTBITEM_HXX
192 #define _SFXMNUITEM_HXX
193 #define _SFXIMGMGR_HXX
194 #define _SFXTBXMGR_HXX
195 #define _SFXSTBMGR_HXX
196 #define _SFX_MINFITEM_HXX
197 #define _SFXEVENT_HXX
199 //sfxdoc.hxx
200 //#define _SFX_OBJSH_HXX
201 //#define _SFX_CLIENTSH_HXX
202 //#define _SFXDOCINF_HXX
203 //#define _SFX_OBJFAC_HXX
204 #define _SFX_DOCFILT_HXX
205 //#define _SFXDOCFILE_HXX
206 //define _VIEWFAC_HXX
207 //#define _SFXVIEWFRM_HXX
208 //#define _SFXVIEWSH_HXX
209 //#define _MDIFRM_HXX
210 #define _SFX_IPFRM_HXX
211 //#define _SFX_INTERNO_HXX
213 //sfxdlg.hxx
214 //#define _SFXTABDLG_HXX
215 //#define _BASEDLGS_HXX
216 #define _SFX_DINFDLG_HXX
217 #define _SFXDINFEDT_HXX
218 #define _SFX_MGETEMPL_HXX
219 #define _SFX_TPLPITEM_HXX
220 //#define _SFX_STYLEDLG_HXX
221 #define _NEWSTYLE_HXX
222 //#define _SFXDOCTEMPL_HXX
223 //#define _SFXDOCTDLG_HXX
224 //#define _SFX_TEMPLDLG_HXX
225 //#define _SFXNEW_HXX
226 #define _SFXDOCMAN_HXX
227 //#define _SFXDOCKWIN_HXX **
229 //sfxitems.hxx
230 #define _SFX_WHMAP_HXX
231 //#define _ARGS_HXX ***
232 //#define _SFXPOOLITEM_HXX
233 //#define _SFXINTITEM_HXX
234 //#define _SFXENUMITEM_HXX
235 #define _SFXFLAGITEM_HXX
236 //#define _SFXSTRITEM_HXX
237 #define _SFXPTITEM_HXX
238 #define _SFXRECTITEM_HXX
239 //#define _SFXITEMPOOL_HXX
240 //#define _SFXITEMSET_HXX
241 #define _SFXITEMITER_HXX
242 #define _SFX_WHITER_HXX
243 #define _SFXPOOLCACH_HXX
244 //#define _AEITEM_HXX
245 #define _SFXRNGITEM_HXX
246 //#define _SFXSLSTITM_HXX
247 //#define _SFXSTYLE_HXX
249 //xout.hxx
250 //#define _XENUM_HXX
251 //#define _XPOLY_HXX
252 //#define _XATTR_HXX
253 //#define _XOUTX_HXX
254 //#define _XPOOL_HXX
255 //#define _XTABLE_HXX
257 //svdraw.hxx
258 #define _SDR_NOITEMS
259 #define _SDR_NOTOUCH
260 #define _SDR_NOTRANSFORM
261 //#define _SDR_NOOBJECTS
262 //#define _SDR_NOVIEWS
264 //#define SI_NOITEMS
265 //#define SI_NODRW
266 #define _SI_NOSBXCONTROLS
267 #define _VCATTR_HXX
268 #define _VCONT_HXX
269 //#define _VCSBX_HXX ***
270 #define _SI_NOOTHERFORMS
271 #define _VCTRLS_HXX
272 //#define _VCDRWOBJ_HXX ***
273 #define _SI_NOCONTROL
274 #define _SETBRW_HXX
275 #define _VCBRW_HXX
276 #define _SI_NOSBXCONTROLS
277 #define _SIDLL_HXX
279 //------------------------------------------------------------------------
281 #include <svx/svdmodel.hxx>
282 #include <svx/svdoutl.hxx>
283 #include <svx/svdetc.hxx>
285 #include "futext.hxx"
286 #include "tabvwsh.hxx"
288 //------------------------------------------------------------------------
290 SdrOutliner* FuText::MakeOutliner()
292 ScViewData* pViewData = pViewShell->GetViewData();
293 SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, pDrDoc);
295 pViewData->UpdateOutlinerFlags(*pOutl);
297 // Die EditEngine benutzt beim RTF Export (Clipboard / Drag&Drop)
298 // den MapMode des RefDevices, um die Fontgroesse zu setzen
300 // #i10426# The ref device isn't set to the EditEngine before SdrBeginTextEdit now,
301 // so the device must be taken from the model here.
302 OutputDevice* pRef = pDrDoc->GetRefDevice();
303 if (pRef && pRef != pWindow)
304 pRef->SetMapMode( MapMode(MAP_100TH_MM) );
306 return pOutl;