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: init.cxx,v $
10 * $Revision: 1.66.138.1 $
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_sw.hxx"
33 #include <hintids.hxx>
34 #include <tools/globname.hxx>
35 #include <vcl/mapmod.hxx>
36 #include <svx/xmlcnitm.hxx>
37 #include <svtools/macitem.hxx>
38 #include <svx/pbinitem.hxx>
39 #include <svx/keepitem.hxx>
40 #include <svx/nlbkitem.hxx>
41 #include <svx/hyznitem.hxx>
42 #include <svx/protitem.hxx>
43 #include <svx/ulspitem.hxx>
44 #include <svx/prszitem.hxx>
45 #include <svx/opaqitem.hxx>
46 #include <svx/shaditem.hxx>
47 #include <svx/prntitem.hxx>
48 #include <svx/brkitem.hxx>
49 #include <svx/tstpitem.hxx>
50 #include <svx/langitem.hxx>
51 #include <svx/wrlmitem.hxx>
52 #include <svx/kernitem.hxx>
53 #include <svx/escpitem.hxx>
54 #include <svx/cscoitem.hxx>
55 #include <svx/lrspitem.hxx>
56 #include <svx/orphitem.hxx>
57 #include <svx/widwitem.hxx>
58 #include <svx/nhypitem.hxx>
59 #include <svx/spltitem.hxx>
60 #include <svx/lspcitem.hxx>
61 #include <svx/blnkitem.hxx>
62 #include <svx/akrnitem.hxx>
63 #include <svx/emphitem.hxx>
64 #include <svx/twolinesitem.hxx>
65 #include <svx/scriptspaceitem.hxx>
66 #include <svx/hngpnctitem.hxx>
67 #include <svx/cmapitem.hxx>
68 #include <svx/charscaleitem.hxx>
69 #include <svx/charrotateitem.hxx>
70 #include <svx/charreliefitem.hxx>
71 #include <svx/frmdiritem.hxx>
72 #ifndef _SVX_DIALOGS_HRC
73 #include <svx/dialogs.hrc>
75 #include <svx/swafopt.hxx>
76 #include <svx/svxacorr.hxx>
77 #include <unotools/charclass.hxx>
78 #include <svx/unolingu.hxx>
79 #include <svx/forbiddenruleitem.hxx>
80 #include <svx/paravertalignitem.hxx>
81 #include <svx/pgrditem.hxx>
82 #include <svx/charhiddenitem.hxx>
83 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
84 #include <comphelper/processfactory.hxx>
85 #include <unotools/collatorwrapper.hxx>
86 #include <svtools/syslocale.hxx>
87 #include <com/sun/star/i18n/CollatorOptions.hpp>
88 #include <unotools/transliterationwrapper.hxx>
89 #include <svx/acorrcfg.hxx>
90 #include <vcl/svapp.hxx>
91 #include <fmtanchr.hxx>
92 #include <fmtornt.hxx>
93 #include <fmtsrnd.hxx>
94 #include <fmtfsize.hxx>
96 #include <fmtrfmrk.hxx>
97 #include <fmtlsplt.hxx>
98 #include <fmtrowsplt.hxx>
99 #include <fmteiro.hxx>
100 #include <fmtclds.hxx>
101 #include <fmturl.hxx>
102 #include <fmtcntnt.hxx>
103 #include <fmthdft.hxx>
104 #include <fmtpdsc.hxx>
105 #include <fmtftn.hxx>
106 #include <fmtfordr.hxx>
107 #include <fmtflcnt.hxx>
108 #include <fchrfmt.hxx>
109 #include <fmtautofmt.hxx>
110 #include <fmtinfmt.hxx>
111 #include <fmtcnct.hxx>
112 #include <fmtline.hxx>
113 #include <fmtftntx.hxx>
114 #include <fmtruby.hxx>
115 #include <fmtautofmt.hxx>
116 #include <tgrditem.hxx>
117 #include <hfspacingitem.hxx>
118 #include <editsh.hxx>
121 #include <paratr.hxx>
122 #include <grfatr.hxx>
124 #include <cellatr.hxx>
125 #include <tblafmt.hxx>
126 #include <viscrs.hxx>
127 #include <fntcache.hxx>
129 #include <acmplwrd.hxx>
130 #include <fmtclbl.hxx>
132 #include <breakit.hxx>
133 #include <checkit.hxx>
134 #include <swcalwrp.hxx>
135 #include <SwStyleNameMapper.hxx>
137 // OD 09.10.2003 #i18732#
138 #include <fmtfollowtextflow.hxx>
139 // OD 2004-05-05 #i28701#
140 #include <fmtwrapinfluenceonobjpos.hxx>
142 #include <fmtmeta.hxx>
145 using namespace ::com::sun::star
;
147 extern void _FrmFinit();
148 extern void ClearFEShellTabCols();
150 /*************************************************************************
151 |* einige Bereiche fuer die Set in Collections / Nodes
152 |*************************************************************************/
153 // AttrSet-Range fuer die 2 Break-Attribute
154 USHORT __FAR_DATA aBreakSetRange
[] = {
155 RES_PAGEDESC
, RES_BREAK
,
158 // AttrSet-Range fuer die TxtFmtColl
159 // OD 2008-02-27 #refactorlists# :
160 // list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
161 // included in the paragraph style's itemset.
162 USHORT __FAR_DATA aTxtFmtCollSetRange
[] = {
163 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
164 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
165 RES_PARATR_BEGIN
, RES_PARATR_END
-1,
166 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
170 // AttrSet-Range fuer die GrfFmtColl
171 USHORT __FAR_DATA aGrfFmtCollSetRange
[] = {
172 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
173 RES_GRFATR_BEGIN
, RES_GRFATR_END
-1,
174 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
178 // AttrSet-Range fuer die TextNode
179 USHORT __FAR_DATA aTxtNodeSetRange
[] = {
180 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
181 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
182 RES_PARATR_BEGIN
, RES_PARATR_END
-1,
183 // --> OD 2008-02-25 #refactorlists#
184 RES_PARATR_LIST_BEGIN
, RES_PARATR_LIST_END
-1,
186 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
190 // AttrSet-Range fuer die NoTxtNode
191 USHORT __FAR_DATA aNoTxtNodeSetRange
[] = {
192 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
193 RES_GRFATR_BEGIN
, RES_GRFATR_END
-1,
194 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
198 USHORT __FAR_DATA aTableSetRange
[] = {
199 RES_FILL_ORDER
, RES_FRM_SIZE
,
200 RES_LR_SPACE
, RES_BREAK
,
201 RES_BACKGROUND
, RES_SHADOW
,
202 RES_HORI_ORIENT
, RES_HORI_ORIENT
,
204 RES_LAYOUT_SPLIT
, RES_LAYOUT_SPLIT
,
205 RES_FRAMEDIR
, RES_FRAMEDIR
,
206 // --> collapsing borders FME 2005-05-27 #i29550#
207 RES_COLLAPSING_BORDERS
, RES_COLLAPSING_BORDERS
,
209 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
213 USHORT __FAR_DATA aTableLineSetRange
[] = {
214 RES_FILL_ORDER
, RES_FRM_SIZE
,
215 RES_LR_SPACE
, RES_UL_SPACE
,
216 RES_BACKGROUND
, RES_SHADOW
,
217 RES_ROW_SPLIT
, RES_ROW_SPLIT
,
218 RES_PROTECT
, RES_PROTECT
,
219 RES_VERT_ORIENT
, RES_VERT_ORIENT
,
220 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
224 USHORT __FAR_DATA aTableBoxSetRange
[] = {
225 RES_FILL_ORDER
, RES_FRM_SIZE
,
226 RES_LR_SPACE
, RES_UL_SPACE
,
227 RES_BACKGROUND
, RES_SHADOW
,
228 RES_PROTECT
, RES_PROTECT
,
229 RES_VERT_ORIENT
, RES_VERT_ORIENT
,
230 RES_FRAMEDIR
, RES_FRAMEDIR
,
231 RES_BOXATR_BEGIN
, RES_BOXATR_END
-1,
232 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
236 // AttrSet-Range fuer die SwFrmFmt
237 USHORT __FAR_DATA aFrmFmtSetRange
[] = {
238 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
239 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
243 // AttrSet-Range fuer die SwCharFmt
244 USHORT __FAR_DATA aCharFmtSetRange
[] = {
245 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
246 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
250 // AttrSet-Range fuer die character autostyles
251 USHORT __FAR_DATA aCharAutoFmtSetRange
[] = {
252 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
253 RES_TXTATR_UNKNOWN_CONTAINER
, RES_TXTATR_UNKNOWN_CONTAINER
,
254 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
258 // AttrSet-Range fuer die SwPageDescFmt
259 USHORT __FAR_DATA aPgFrmFmtSetRange
[] = {
260 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
261 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
265 /******************************************************************************
266 * lege eine Tabelle fuer einen Zugriff auf die
267 * Default-Format-Attribute an
268 ******************************************************************************/
269 SwDfltAttrTab __FAR_DATA aAttrTab
;
271 SfxItemInfo __FAR_DATA aSlotTab
[] =
273 { SID_ATTR_CHAR_CASEMAP
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CASEMAP
274 { SID_ATTR_CHAR_CHARSETCOLOR
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CHARSETCOLOR
275 { SID_ATTR_CHAR_COLOR
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_COLOR
276 { SID_ATTR_CHAR_CONTOUR
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CONTOUR
277 { SID_ATTR_CHAR_STRIKEOUT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CROSSEDOUT
278 { SID_ATTR_CHAR_ESCAPEMENT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_ESCAPEMENT
279 { SID_ATTR_CHAR_FONT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_FONT
280 { SID_ATTR_CHAR_FONTHEIGHT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_FONTSIZE
281 { SID_ATTR_CHAR_KERNING
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_KERNING
282 { SID_ATTR_CHAR_LANGUAGE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_LANGUAGE
283 { SID_ATTR_CHAR_POSTURE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_POSTURE
284 { SID_ATTR_CHAR_PROPSIZE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_PROPORTIONALFONTSIZE
285 { SID_ATTR_CHAR_SHADOWED
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_SHADOWED
286 { SID_ATTR_CHAR_UNDERLINE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_UNDERLINE
287 { SID_ATTR_CHAR_WEIGHT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_WEIGHT
288 { SID_ATTR_CHAR_WORDLINEMODE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_WORDLINEMODE
289 { SID_ATTR_CHAR_AUTOKERN
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_AUTOKERN
290 { SID_ATTR_FLASH
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_BLINK
291 { 0, SFX_ITEM_POOLABLE
}, // RES_CHRATR_NOLINEBREAK
292 { 0, SFX_ITEM_POOLABLE
}, // RES_CHRATR_NOHYPHEN
293 { SID_ATTR_BRUSH_CHAR
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_BACKGROUND
294 { SID_ATTR_CHAR_CJK_FONT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CJK_FONT
295 { SID_ATTR_CHAR_CJK_FONTHEIGHT
, SFX_ITEM_POOLABLE
},// RES_CHRATR_CJK_FONTSIZE
296 { SID_ATTR_CHAR_CJK_LANGUAGE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CJK_LANGUAGE
297 { SID_ATTR_CHAR_CJK_POSTURE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CJK_POSTURE
298 { SID_ATTR_CHAR_CJK_WEIGHT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CJK_WEIGHT
299 { SID_ATTR_CHAR_CTL_FONT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CTL_FONT
300 { SID_ATTR_CHAR_CTL_FONTHEIGHT
, SFX_ITEM_POOLABLE
},// RES_CHRATR_CTL_FONTSIZE
301 { SID_ATTR_CHAR_CTL_LANGUAGE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CTL_LANGUAGE
302 { SID_ATTR_CHAR_CTL_POSTURE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CTL_POSTURE
303 { SID_ATTR_CHAR_CTL_WEIGHT
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_CTL_WEIGHT
304 { SID_ATTR_CHAR_ROTATED
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_ROTATE
305 { SID_ATTR_CHAR_EMPHASISMARK
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_EMPHASIS_MARK
306 { SID_ATTR_CHAR_TWO_LINES
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_TWO_LINES
307 { SID_ATTR_CHAR_SCALEWIDTH
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_SCALEW
308 { SID_ATTR_CHAR_RELIEF
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_RELIEF
309 { SID_ATTR_CHAR_HIDDEN
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_HIDDEN
310 { SID_ATTR_CHAR_OVERLINE
, SFX_ITEM_POOLABLE
}, // RES_CHRATR_OVERLINE
311 { 0, SFX_ITEM_POOLABLE
}, // RES_CHRATR_DUMMY1
312 { 0, SFX_ITEM_POOLABLE
}, // RES_CHRATR_DUMMY2
314 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_AUTOFMT
315 { FN_TXTATR_INET
, 0 }, // RES_TXTATR_INETFMT
316 { 0, 0 }, // RES_TXTATR_REFMARK
317 { 0, 0 }, // RES_TXTATR_TOXMARK
318 { 0, 0 }, // RES_TXTATR_CHARFMT
319 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_DUMMY5
320 { SID_ATTR_CHAR_CJK_RUBY
, 0 }, // RES_TXTATR_CJK_RUBY,
321 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_UNKNOWN_CONTAINER,
322 { 0, 0 }, // RES_TXTATR_META,
323 { 0, 0 }, // RES_TXTATR_METAFIELD,
325 { 0, 0 }, // RES_TXTATR_FIELD
326 { 0, 0 }, // RES_TXTATR_FLYCNT
327 { 0, 0 }, // RES_TXTATR_FTN
328 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_DUMMY4
329 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_DUMMY3
330 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_DUMMY1
331 { 0, SFX_ITEM_POOLABLE
}, // RES_TXTATR_DUMMY2
333 { SID_ATTR_PARA_LINESPACE
, SFX_ITEM_POOLABLE
}, // RES_PARATR_LINESPACING
334 { SID_ATTR_PARA_ADJUST
, SFX_ITEM_POOLABLE
}, // RES_PARATR_ADJUST
335 { SID_ATTR_PARA_SPLIT
, SFX_ITEM_POOLABLE
}, // RES_PARATR_SPLIT
336 { SID_ATTR_PARA_ORPHANS
, SFX_ITEM_POOLABLE
}, // RES_PARATR_ORPHANS
337 { SID_ATTR_PARA_WIDOWS
, SFX_ITEM_POOLABLE
}, // RES_PARATR_WIDOWS
338 { SID_ATTR_TABSTOP
, SFX_ITEM_POOLABLE
}, // RES_PARATR_TABSTOP
339 { SID_ATTR_PARA_HYPHENZONE
, SFX_ITEM_POOLABLE
}, // RES_PARATR_HYPHENZONE
340 { FN_FORMAT_DROPCAPS
, 0 }, // RES_PARATR_DROP
341 { SID_ATTR_PARA_REGISTER
, SFX_ITEM_POOLABLE
}, // RES_PARATR_REGISTER
342 // --> OD 2008-03-04 #refactorlists#
343 // RES_PARATR_NUMRULE is now poolable
344 { SID_ATTR_PARA_NUMRULE
, SFX_ITEM_POOLABLE
}, // RES_PARATR_NUMRULE
346 { SID_ATTR_PARA_SCRIPTSPACE
, SFX_ITEM_POOLABLE
}, // RES_PARATR_SCRIPTSPACE
347 { SID_ATTR_PARA_HANGPUNCTUATION
, SFX_ITEM_POOLABLE
},// RES_PARATR_HANGINGPUNCTUATION
349 { SID_ATTR_PARA_FORBIDDEN_RULES
, SFX_ITEM_POOLABLE
},// RES_PARATR_FORBIDDEN_RULES
350 { SID_PARA_VERTALIGN
, SFX_ITEM_POOLABLE
}, // RES_PARATR_VERTALIGN
351 { SID_ATTR_PARA_SNAPTOGRID
, SFX_ITEM_POOLABLE
}, // RES_PARATR_SNAPTOGRID
352 { SID_ATTR_BORDER_CONNECT
, SFX_ITEM_POOLABLE
}, // RES_PARATR_CONNECT_BORDER
354 { SID_ATTR_PARA_OUTLINE_LEVEL
, SFX_ITEM_POOLABLE
}, // RES_PARATR_OUTLINELEVEL //#outline level,zhaojianwei
356 // --> OD 2008-02-19 #refactorlists#
357 { 0, SFX_ITEM_POOLABLE
}, // RES_PARATR_LIST_ID
358 { 0, SFX_ITEM_POOLABLE
}, // RES_PARATR_LIST_LEVEL
359 { 0, SFX_ITEM_POOLABLE
}, // RES_PARATR_LIST_ISRESTART
360 { 0, SFX_ITEM_POOLABLE
}, // RES_PARATR_LIST_RESTARTVALUE
361 { 0, SFX_ITEM_POOLABLE
}, // RES_PARATR_LIST_ISCOUNTED
364 { 0, SFX_ITEM_POOLABLE
}, // RES_FILL_ORDER
365 { 0, SFX_ITEM_POOLABLE
}, // RES_FRM_SIZE
366 { SID_ATTR_PAGE_PAPERBIN
, SFX_ITEM_POOLABLE
}, // RES_PAPER_BIN
367 { SID_ATTR_LRSPACE
, SFX_ITEM_POOLABLE
}, // RES_LR_SPACE
368 { SID_ATTR_ULSPACE
, SFX_ITEM_POOLABLE
}, // RES_UL_SPACE
369 { 0, 0 }, // RES_PAGEDESC
370 { SID_ATTR_PARA_PAGEBREAK
, SFX_ITEM_POOLABLE
}, // RES_BREAK
371 { 0, 0 }, // RES_CNTNT
372 { 0, SFX_ITEM_POOLABLE
}, // RES_HEADER
373 { 0, SFX_ITEM_POOLABLE
}, // RES_FOOTER
374 { 0, SFX_ITEM_POOLABLE
}, // RES_PRINT
375 { FN_OPAQUE
, SFX_ITEM_POOLABLE
}, // RES_OPAQUE
376 { FN_SET_PROTECT
, SFX_ITEM_POOLABLE
}, // RES_PROTECT
377 { FN_SURROUND
, SFX_ITEM_POOLABLE
}, // RES_SURROUND
378 { FN_VERT_ORIENT
, SFX_ITEM_POOLABLE
}, // RES_VERT_ORIENT
379 { FN_HORI_ORIENT
, SFX_ITEM_POOLABLE
}, // RES_HORI_ORIENT
380 { 0, 0 }, // RES_ANCHOR
381 { SID_ATTR_BRUSH
, SFX_ITEM_POOLABLE
}, // RES_BACKGROUND
382 { SID_ATTR_BORDER_OUTER
, SFX_ITEM_POOLABLE
}, // RES_BOX
383 { SID_ATTR_BORDER_SHADOW
, SFX_ITEM_POOLABLE
}, // RES_SHADOW
384 { SID_ATTR_MACROITEM
, SFX_ITEM_POOLABLE
}, // RES_FRMMACRO
385 { FN_ATTR_COLUMNS
, SFX_ITEM_POOLABLE
}, // RES_COL
386 { SID_ATTR_PARA_KEEP
, SFX_ITEM_POOLABLE
}, // RES_KEEP
387 { 0, SFX_ITEM_POOLABLE
}, // RES_URL
388 { 0, SFX_ITEM_POOLABLE
}, // RES_EDIT_IN_READONLY
390 { 0, SFX_ITEM_POOLABLE
}, // RES_LAYOUT_SPLIT
391 { 0, 0 }, // RES_CHAIN
392 { 0, SFX_ITEM_POOLABLE
}, // RES_TEXTGRID
393 { FN_FORMAT_LINENUMBER
, SFX_ITEM_POOLABLE
}, // RES_LINENUMBER
394 { 0, SFX_ITEM_POOLABLE
}, // RES_FTN_AT_TXTEND
395 { 0, SFX_ITEM_POOLABLE
}, // RES_END_AT_TXTEND
396 { 0, SFX_ITEM_POOLABLE
}, // RES_COLUMNBALANCE
398 { SID_ATTR_FRAMEDIRECTION
, SFX_ITEM_POOLABLE
}, // RES_FRAMEDIR
400 { SID_ATTR_HDFT_DYNAMIC_SPACING
, SFX_ITEM_POOLABLE
}, // RES_HEADER_FOOTER_EAT_SPACING
401 { FN_TABLE_ROW_SPLIT
, SFX_ITEM_POOLABLE
}, // RES_ROW_SPLIT
402 // DVO, OD 18.09.2003 #i18732# - use slot-id define in svx
403 { SID_SW_FOLLOW_TEXT_FLOW
, SFX_ITEM_POOLABLE
}, // RES_FOLLOW_TEXT_FLOW
404 // --> collapsing borders FME 2005-05-27 #i29550#
405 { SID_SW_COLLAPSING_BORDERS
, SFX_ITEM_POOLABLE
}, // RES_COLLAPSING_BORDERS
407 // OD 2004-05-04 #i28701#
408 { SID_SW_WRAP_INFLUENCE_ON_OBJPOS
, SFX_ITEM_POOLABLE
}, // RES_WRAP_INFLUENCE_ON_OBJPOS
409 { 0, 0 }, // RES_AUTO_STYLE
410 { 0, SFX_ITEM_POOLABLE
}, // RES_FRMATR_STYLE_NAME
411 { 0, SFX_ITEM_POOLABLE
}, // RES_FRMATR_CONDITIONAL_STYLE_NAME
413 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_MIRRORGRF
414 { SID_ATTR_GRAF_CROP
, SFX_ITEM_POOLABLE
}, // RES_GRFATR_CROPGRF
415 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_ROTATION,
416 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_LUMINANCE,
417 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_CONTRAST,
418 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_CHANNELR,
419 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_CHANNELG,
420 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_CHANNELB,
421 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_GAMMA,
422 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_INVERT,
423 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_TRANSPARENCY,
424 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY1,
425 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY2,
426 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY3,
427 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY4,
428 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY5,
429 { 0, SFX_ITEM_POOLABLE
}, // RES_GRFATR_DUMMY6,
431 { 0, SFX_ITEM_POOLABLE
}, // RES_BOXATR_FORMAT
432 { 0, 0 }, // RES_BOXATR_FORMULA,
433 { 0, SFX_ITEM_POOLABLE
}, // RES_BOXATR_VALUE
435 { 0, SFX_ITEM_POOLABLE
} // RES_UNKNOWNATR_CONTAINER
439 USHORT
* SwAttrPool::pVersionMap1
= 0;
440 USHORT
* SwAttrPool::pVersionMap2
= 0;
441 USHORT
* SwAttrPool::pVersionMap3
= 0;
442 USHORT
* SwAttrPool::pVersionMap4
= 0;
443 // OD 2004-01-21 #i18732#
444 USHORT
* SwAttrPool::pVersionMap5
= 0;
445 USHORT
* SwAttrPool::pVersionMap6
= 0;
446 SwIndexReg
* SwIndexReg::pEmptyIndexArray
= 0;
448 const sal_Char
* __FAR_DATA pMarkToTable
= "table";
449 const sal_Char
* __FAR_DATA pMarkToFrame
= "frame";
450 const sal_Char
* __FAR_DATA pMarkToRegion
= "region";
451 const sal_Char
* __FAR_DATA pMarkToText
= "text";
452 const sal_Char
* __FAR_DATA pMarkToOutline
= "outline";
453 const sal_Char
* __FAR_DATA pMarkToGraphic
= "graphic";
454 const sal_Char
* __FAR_DATA pMarkToOLE
= "ole";
456 SvPtrarr
*pGlobalOLEExcludeList
= 0;
458 SwAutoCompleteWord
* SwDoc::pACmpltWords
= 0;
460 SwCheckIt
* pCheckIt
= 0;
461 CharClass
* pAppCharClass
= 0;
463 CollatorWrapper
* pCollator
= 0, *pCaseCollator
= 0;
464 ::utl::TransliterationWrapper
* pTransWrp
= 0;
466 /******************************************************************************
468 ******************************************************************************/
469 salhelper::SingletonRef
<SwCalendarWrapper
>* s_getCalendarWrapper()
471 static salhelper::SingletonRef
<SwCalendarWrapper
> aCalendarWrapper
;
472 return &aCalendarWrapper
;
478 // erstmal alle Attribut-Pointer auf 0 setzen
479 memset( aAttrTab
, 0, (POOLATTR_END
- POOLATTR_BEGIN
) *
480 sizeof( SfxPoolItem
* ) );
482 aAttrTab
[ RES_CHRATR_CASEMAP
- POOLATTR_BEGIN
] = new SvxCaseMapItem( SVX_CASEMAP_NOT_MAPPED
, RES_CHRATR_CASEMAP
);
483 aAttrTab
[ RES_CHRATR_CHARSETCOLOR
- POOLATTR_BEGIN
] = new SvxCharSetColorItem(RES_CHRATR_CHARSETCOLOR
);
484 aAttrTab
[ RES_CHRATR_COLOR
- POOLATTR_BEGIN
] = new SvxColorItem(RES_CHRATR_COLOR
);
485 aAttrTab
[ RES_CHRATR_CONTOUR
- POOLATTR_BEGIN
] = new SvxContourItem( sal_False
, RES_CHRATR_CONTOUR
);
486 aAttrTab
[ RES_CHRATR_CROSSEDOUT
- POOLATTR_BEGIN
] = new SvxCrossedOutItem( STRIKEOUT_NONE
, RES_CHRATR_CROSSEDOUT
);
487 aAttrTab
[ RES_CHRATR_ESCAPEMENT
- POOLATTR_BEGIN
] = new SvxEscapementItem( RES_CHRATR_ESCAPEMENT
);
488 aAttrTab
[ RES_CHRATR_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_FONT
);
490 aAttrTab
[ RES_CHRATR_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_FONTSIZE
);
491 aAttrTab
[ RES_CHRATR_KERNING
- POOLATTR_BEGIN
] = new SvxKerningItem( 0, RES_CHRATR_KERNING
);
492 aAttrTab
[ RES_CHRATR_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_LANGUAGE
);
493 aAttrTab
[ RES_CHRATR_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem( ITALIC_NONE
, RES_CHRATR_POSTURE
);
494 aAttrTab
[ RES_CHRATR_PROPORTIONALFONTSIZE
- POOLATTR_BEGIN
] = new SvxPropSizeItem( 100, RES_CHRATR_PROPORTIONALFONTSIZE
);
495 aAttrTab
[ RES_CHRATR_SHADOWED
- POOLATTR_BEGIN
] = new SvxShadowedItem( sal_False
, RES_CHRATR_SHADOWED
);
496 aAttrTab
[ RES_CHRATR_UNDERLINE
- POOLATTR_BEGIN
] = new SvxUnderlineItem( UNDERLINE_NONE
, RES_CHRATR_UNDERLINE
);
497 aAttrTab
[ RES_CHRATR_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_WEIGHT
);
498 aAttrTab
[ RES_CHRATR_WORDLINEMODE
- POOLATTR_BEGIN
] = new SvxWordLineModeItem( sal_False
, RES_CHRATR_WORDLINEMODE
);
499 aAttrTab
[ RES_CHRATR_AUTOKERN
- POOLATTR_BEGIN
] = new SvxAutoKernItem( sal_False
, RES_CHRATR_AUTOKERN
);
500 aAttrTab
[ RES_CHRATR_BLINK
- POOLATTR_BEGIN
] = new SvxBlinkItem( FALSE
, RES_CHRATR_BLINK
);
501 aAttrTab
[ RES_CHRATR_NOHYPHEN
- POOLATTR_BEGIN
] = new SvxNoHyphenItem( TRUE
, RES_CHRATR_NOHYPHEN
);
502 aAttrTab
[ RES_CHRATR_NOLINEBREAK
- POOLATTR_BEGIN
] = new SvxNoLinebreakItem( TRUE
, RES_CHRATR_NOLINEBREAK
);
503 aAttrTab
[ RES_CHRATR_BACKGROUND
- POOLATTR_BEGIN
] = new SvxBrushItem( RES_CHRATR_BACKGROUND
);
506 aAttrTab
[ RES_CHRATR_CJK_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_CJK_FONT
);
507 aAttrTab
[ RES_CHRATR_CJK_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_CJK_FONTSIZE
);
508 aAttrTab
[ RES_CHRATR_CJK_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_CJK_LANGUAGE
);
509 aAttrTab
[ RES_CHRATR_CJK_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem(ITALIC_NONE
, RES_CHRATR_CJK_POSTURE
);
510 aAttrTab
[ RES_CHRATR_CJK_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_CJK_WEIGHT
);
513 aAttrTab
[ RES_CHRATR_CTL_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_CTL_FONT
);
514 aAttrTab
[ RES_CHRATR_CTL_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_CTL_FONTSIZE
);
515 aAttrTab
[ RES_CHRATR_CTL_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_CTL_LANGUAGE
);
516 aAttrTab
[ RES_CHRATR_CTL_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem(ITALIC_NONE
, RES_CHRATR_CTL_POSTURE
);
517 aAttrTab
[ RES_CHRATR_CTL_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_CTL_WEIGHT
);
519 aAttrTab
[ RES_CHRATR_ROTATE
- POOLATTR_BEGIN
] = new SvxCharRotateItem( 0, sal_False
, RES_CHRATR_ROTATE
);
520 aAttrTab
[ RES_CHRATR_EMPHASIS_MARK
- POOLATTR_BEGIN
] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE
, RES_CHRATR_EMPHASIS_MARK
);
521 aAttrTab
[ RES_CHRATR_TWO_LINES
- POOLATTR_BEGIN
] = new SvxTwoLinesItem( FALSE
, 0, 0, RES_CHRATR_TWO_LINES
);
522 aAttrTab
[ RES_CHRATR_SCALEW
- POOLATTR_BEGIN
] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW
);
523 aAttrTab
[ RES_CHRATR_RELIEF
- POOLATTR_BEGIN
] = new SvxCharReliefItem( RELIEF_NONE
, RES_CHRATR_RELIEF
);
524 aAttrTab
[ RES_CHRATR_HIDDEN
- POOLATTR_BEGIN
] = new SvxCharHiddenItem( FALSE
, RES_CHRATR_HIDDEN
);
525 aAttrTab
[ RES_CHRATR_OVERLINE
- POOLATTR_BEGIN
] = new SvxOverlineItem( UNDERLINE_NONE
, RES_CHRATR_OVERLINE
);
527 // CharakterAttr - Dummies
528 aAttrTab
[ RES_CHRATR_DUMMY1
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_CHRATR_DUMMY1
);
529 aAttrTab
[ RES_CHRATR_DUMMY2
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_CHRATR_DUMMY2
);
530 // CharakterAttr - Dummies
532 aAttrTab
[ RES_TXTATR_AUTOFMT
- POOLATTR_BEGIN
] = new SwFmtAutoFmt
;
533 aAttrTab
[ RES_TXTATR_INETFMT
- POOLATTR_BEGIN
] = new SwFmtINetFmt( aEmptyStr
, aEmptyStr
);
534 aAttrTab
[ RES_TXTATR_REFMARK
- POOLATTR_BEGIN
] = new SwFmtRefMark( aEmptyStr
);
535 aAttrTab
[ RES_TXTATR_TOXMARK
- POOLATTR_BEGIN
] = new SwTOXMark
;
536 aAttrTab
[ RES_TXTATR_CHARFMT
- POOLATTR_BEGIN
] = new SwFmtCharFmt( 0 );
537 aAttrTab
[ RES_TXTATR_CJK_RUBY
- POOLATTR_BEGIN
] = new SwFmtRuby( aEmptyStr
);
538 aAttrTab
[ RES_TXTATR_UNKNOWN_CONTAINER
- POOLATTR_BEGIN
] = new SvXMLAttrContainerItem( RES_TXTATR_UNKNOWN_CONTAINER
);
539 aAttrTab
[ RES_TXTATR_META
- POOLATTR_BEGIN
] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_META
);
540 aAttrTab
[ RES_TXTATR_METAFIELD
- POOLATTR_BEGIN
] = SwFmtMeta::CreatePoolDefault(RES_TXTATR_METAFIELD
);
542 aAttrTab
[ RES_TXTATR_FIELD
- POOLATTR_BEGIN
] = new SwFmtFld
;
543 aAttrTab
[ RES_TXTATR_FLYCNT
- POOLATTR_BEGIN
] = new SwFmtFlyCnt( 0 );
544 aAttrTab
[ RES_TXTATR_FTN
- POOLATTR_BEGIN
] = new SwFmtFtn
;
546 // TextAttr - Dummies
547 aAttrTab
[ RES_TXTATR_DUMMY4
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY4
);
548 aAttrTab
[ RES_TXTATR_DUMMY3
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY3
);
549 aAttrTab
[ RES_TXTATR_DUMMY1
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY1
);
550 aAttrTab
[ RES_TXTATR_DUMMY2
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY2
);
551 aAttrTab
[ RES_TXTATR_DUMMY5
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY5
);
552 // TextAttr - Dummies
554 aAttrTab
[ RES_PARATR_LINESPACING
- POOLATTR_BEGIN
] = new SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT
, RES_PARATR_LINESPACING
);
555 aAttrTab
[ RES_PARATR_ADJUST
- POOLATTR_BEGIN
] = new SvxAdjustItem( SVX_ADJUST_LEFT
, RES_PARATR_ADJUST
);
556 aAttrTab
[ RES_PARATR_SPLIT
- POOLATTR_BEGIN
] = new SvxFmtSplitItem( sal_True
, RES_PARATR_SPLIT
);
557 aAttrTab
[ RES_PARATR_WIDOWS
- POOLATTR_BEGIN
] = new SvxWidowsItem( 0, RES_PARATR_WIDOWS
);
558 aAttrTab
[ RES_PARATR_ORPHANS
- POOLATTR_BEGIN
] = new SvxOrphansItem( 0, RES_PARATR_ORPHANS
);
559 aAttrTab
[ RES_PARATR_TABSTOP
- POOLATTR_BEGIN
] = new SvxTabStopItem( 1, SVX_TAB_DEFDIST
, SVX_TAB_ADJUST_DEFAULT
, RES_PARATR_TABSTOP
);
561 pItem
= new SvxHyphenZoneItem( sal_False
, RES_PARATR_HYPHENZONE
);
562 ((SvxHyphenZoneItem
*)pItem
)->GetMaxHyphens() = 0; // Default z.Z. auf 0
563 aAttrTab
[ RES_PARATR_HYPHENZONE
- POOLATTR_BEGIN
] = pItem
;
565 aAttrTab
[ RES_PARATR_DROP
- POOLATTR_BEGIN
] = new SwFmtDrop
;
566 aAttrTab
[ RES_PARATR_REGISTER
- POOLATTR_BEGIN
] = new SwRegisterItem( FALSE
);
567 aAttrTab
[ RES_PARATR_NUMRULE
- POOLATTR_BEGIN
] = new SwNumRuleItem( aEmptyStr
);
569 aAttrTab
[ RES_PARATR_SCRIPTSPACE
- POOLATTR_BEGIN
] = new SvxScriptSpaceItem( TRUE
, RES_PARATR_SCRIPTSPACE
);
570 aAttrTab
[ RES_PARATR_HANGINGPUNCTUATION
- POOLATTR_BEGIN
] = new SvxHangingPunctuationItem( TRUE
, RES_PARATR_HANGINGPUNCTUATION
);
571 aAttrTab
[ RES_PARATR_FORBIDDEN_RULES
- POOLATTR_BEGIN
] = new SvxForbiddenRuleItem( TRUE
, RES_PARATR_FORBIDDEN_RULES
);
572 aAttrTab
[ RES_PARATR_VERTALIGN
- POOLATTR_BEGIN
] = new SvxParaVertAlignItem( 0, RES_PARATR_VERTALIGN
);
573 aAttrTab
[ RES_PARATR_SNAPTOGRID
- POOLATTR_BEGIN
] = new SvxParaGridItem( sal_True
, RES_PARATR_SNAPTOGRID
);
574 aAttrTab
[ RES_PARATR_CONNECT_BORDER
- POOLATTR_BEGIN
] = new SwParaConnectBorderItem
;
576 aAttrTab
[ RES_PARATR_OUTLINELEVEL
- POOLATTR_BEGIN
] = new SfxUInt16Item( RES_PARATR_OUTLINELEVEL
, 0 );//#outline level,zhaojianwei
578 // --> OD 2008-02-19 #refactorlists#
579 aAttrTab
[ RES_PARATR_LIST_ID
- POOLATTR_BEGIN
] = new SfxStringItem( RES_PARATR_LIST_ID
, aEmptyStr
);
580 aAttrTab
[ RES_PARATR_LIST_LEVEL
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_PARATR_LIST_LEVEL
, 0 );
581 aAttrTab
[ RES_PARATR_LIST_ISRESTART
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART
, FALSE
);
582 aAttrTab
[ RES_PARATR_LIST_RESTARTVALUE
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_PARATR_LIST_RESTARTVALUE
, 1 );
583 aAttrTab
[ RES_PARATR_LIST_ISCOUNTED
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED
, TRUE
);
586 aAttrTab
[ RES_FILL_ORDER
- POOLATTR_BEGIN
] = new SwFmtFillOrder
;
587 aAttrTab
[ RES_FRM_SIZE
- POOLATTR_BEGIN
] = new SwFmtFrmSize
;
588 aAttrTab
[ RES_PAPER_BIN
- POOLATTR_BEGIN
] = new SvxPaperBinItem( RES_PAPER_BIN
);
589 aAttrTab
[ RES_LR_SPACE
- POOLATTR_BEGIN
] = new SvxLRSpaceItem( RES_LR_SPACE
);
590 aAttrTab
[ RES_UL_SPACE
- POOLATTR_BEGIN
] = new SvxULSpaceItem( RES_UL_SPACE
);
591 aAttrTab
[ RES_PAGEDESC
- POOLATTR_BEGIN
] = new SwFmtPageDesc
;
592 aAttrTab
[ RES_BREAK
- POOLATTR_BEGIN
] = new SvxFmtBreakItem( SVX_BREAK_NONE
, RES_BREAK
);
593 aAttrTab
[ RES_CNTNT
- POOLATTR_BEGIN
] = new SwFmtCntnt
;
594 aAttrTab
[ RES_HEADER
- POOLATTR_BEGIN
] = new SwFmtHeader
;
595 aAttrTab
[ RES_FOOTER
- POOLATTR_BEGIN
] = new SwFmtFooter
;
596 aAttrTab
[ RES_PRINT
- POOLATTR_BEGIN
] = new SvxPrintItem( RES_PRINT
);
597 aAttrTab
[ RES_OPAQUE
- POOLATTR_BEGIN
] = new SvxOpaqueItem( RES_OPAQUE
);
598 aAttrTab
[ RES_PROTECT
- POOLATTR_BEGIN
] = new SvxProtectItem( RES_PROTECT
);
599 aAttrTab
[ RES_SURROUND
- POOLATTR_BEGIN
] = new SwFmtSurround
;
600 aAttrTab
[ RES_VERT_ORIENT
- POOLATTR_BEGIN
] = new SwFmtVertOrient
;
601 aAttrTab
[ RES_HORI_ORIENT
- POOLATTR_BEGIN
] = new SwFmtHoriOrient
;
602 aAttrTab
[ RES_ANCHOR
- POOLATTR_BEGIN
] = new SwFmtAnchor
;
603 aAttrTab
[ RES_BACKGROUND
- POOLATTR_BEGIN
] = new SvxBrushItem( RES_BACKGROUND
);
604 aAttrTab
[ RES_BOX
- POOLATTR_BEGIN
] = new SvxBoxItem( RES_BOX
);
605 aAttrTab
[ RES_SHADOW
- POOLATTR_BEGIN
] = new SvxShadowItem( RES_SHADOW
);
606 aAttrTab
[ RES_FRMMACRO
- POOLATTR_BEGIN
] = new SvxMacroItem( RES_FRMMACRO
);
607 aAttrTab
[ RES_COL
- POOLATTR_BEGIN
] = new SwFmtCol
;
608 aAttrTab
[ RES_KEEP
- POOLATTR_BEGIN
] = new SvxFmtKeepItem( FALSE
, RES_KEEP
);
609 aAttrTab
[ RES_URL
- POOLATTR_BEGIN
] = new SwFmtURL();
610 aAttrTab
[ RES_EDIT_IN_READONLY
- POOLATTR_BEGIN
] = new SwFmtEditInReadonly
;
611 aAttrTab
[ RES_LAYOUT_SPLIT
- POOLATTR_BEGIN
] = new SwFmtLayoutSplit
;
612 aAttrTab
[ RES_CHAIN
- POOLATTR_BEGIN
] = new SwFmtChain
;
613 aAttrTab
[ RES_TEXTGRID
- POOLATTR_BEGIN
] = new SwTextGridItem
;
614 aAttrTab
[ RES_HEADER_FOOTER_EAT_SPACING
- POOLATTR_BEGIN
] = new SwHeaderAndFooterEatSpacingItem
;
615 aAttrTab
[ RES_LINENUMBER
- POOLATTR_BEGIN
] = new SwFmtLineNumber
;
616 aAttrTab
[ RES_FTN_AT_TXTEND
- POOLATTR_BEGIN
] = new SwFmtFtnAtTxtEnd
;
617 aAttrTab
[ RES_END_AT_TXTEND
- POOLATTR_BEGIN
] = new SwFmtEndAtTxtEnd
;
618 aAttrTab
[ RES_COLUMNBALANCE
- POOLATTR_BEGIN
] = new SwFmtNoBalancedColumns
;
619 aAttrTab
[ RES_FRAMEDIR
- POOLATTR_BEGIN
] = new SvxFrameDirectionItem( FRMDIR_ENVIRONMENT
, RES_FRAMEDIR
);
620 aAttrTab
[ RES_ROW_SPLIT
- POOLATTR_BEGIN
] = new SwFmtRowSplit
;
622 // OD 18.09.2003 #i18732#
623 aAttrTab
[ RES_FOLLOW_TEXT_FLOW
- POOLATTR_BEGIN
] = new SwFmtFollowTextFlow( TRUE
);
624 // --> collapsing borders FME 2005-05-27 #i29550#
625 aAttrTab
[ RES_COLLAPSING_BORDERS
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_COLLAPSING_BORDERS
, FALSE
);
627 // OD 2004-05-04 #i28701#
628 // --> OD 2004-10-18 #i35017# - constant name has changed
629 aAttrTab
[ RES_WRAP_INFLUENCE_ON_OBJPOS
- POOLATTR_BEGIN
] =
630 new SwFmtWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT
);
633 aAttrTab
[ RES_AUTO_STYLE
- POOLATTR_BEGIN
] = new SwFmtAutoFmt( RES_AUTO_STYLE
);
634 aAttrTab
[ RES_FRMATR_STYLE_NAME
- POOLATTR_BEGIN
] = new SfxStringItem( RES_FRMATR_STYLE_NAME
, aEmptyStr
);
635 aAttrTab
[ RES_FRMATR_CONDITIONAL_STYLE_NAME
- POOLATTR_BEGIN
] = new SfxStringItem( RES_FRMATR_CONDITIONAL_STYLE_NAME
, aEmptyStr
);
638 aAttrTab
[ RES_GRFATR_MIRRORGRF
- POOLATTR_BEGIN
] = new SwMirrorGrf
;
639 aAttrTab
[ RES_GRFATR_CROPGRF
- POOLATTR_BEGIN
] = new SwCropGrf
;
640 aAttrTab
[ RES_GRFATR_ROTATION
- POOLATTR_BEGIN
] = new SwRotationGrf
;
641 aAttrTab
[ RES_GRFATR_LUMINANCE
- POOLATTR_BEGIN
] = new SwLuminanceGrf
;
642 aAttrTab
[ RES_GRFATR_CONTRAST
- POOLATTR_BEGIN
] = new SwContrastGrf
;
643 aAttrTab
[ RES_GRFATR_CHANNELR
- POOLATTR_BEGIN
] = new SwChannelRGrf
;
644 aAttrTab
[ RES_GRFATR_CHANNELG
- POOLATTR_BEGIN
] = new SwChannelGGrf
;
645 aAttrTab
[ RES_GRFATR_CHANNELB
- POOLATTR_BEGIN
] = new SwChannelBGrf
;
646 aAttrTab
[ RES_GRFATR_GAMMA
- POOLATTR_BEGIN
] = new SwGammaGrf
;
647 aAttrTab
[ RES_GRFATR_INVERT
- POOLATTR_BEGIN
] = new SwInvertGrf
;
648 aAttrTab
[ RES_GRFATR_TRANSPARENCY
- POOLATTR_BEGIN
] = new SwTransparencyGrf
;
649 aAttrTab
[ RES_GRFATR_DRAWMODE
- POOLATTR_BEGIN
] = new SwDrawModeGrf
;
651 // GraphicAttr - Dummies
652 aAttrTab
[ RES_GRFATR_DUMMY1
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY1
);
653 aAttrTab
[ RES_GRFATR_DUMMY2
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY2
);
654 aAttrTab
[ RES_GRFATR_DUMMY3
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY3
);
655 aAttrTab
[ RES_GRFATR_DUMMY4
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY4
);
656 aAttrTab
[ RES_GRFATR_DUMMY5
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY5
);
657 // GraphicAttr - Dummies
659 aAttrTab
[ RES_BOXATR_FORMAT
- POOLATTR_BEGIN
] = new SwTblBoxNumFormat
;
660 aAttrTab
[ RES_BOXATR_FORMULA
- POOLATTR_BEGIN
] = new SwTblBoxFormula( aEmptyStr
);
661 aAttrTab
[ RES_BOXATR_VALUE
- POOLATTR_BEGIN
] = new SwTblBoxValue
;
663 aAttrTab
[ RES_UNKNOWNATR_CONTAINER
- POOLATTR_BEGIN
] =
664 new SvXMLAttrContainerItem( RES_UNKNOWNATR_CONTAINER
);
666 // get the correct fonts:
667 ::GetDefaultFonts( *(SvxFontItem
*)aAttrTab
[ RES_CHRATR_FONT
- POOLATTR_BEGIN
],
668 *(SvxFontItem
*)aAttrTab
[ RES_CHRATR_CJK_FONT
- POOLATTR_BEGIN
],
669 *(SvxFontItem
*)aAttrTab
[ RES_CHRATR_CTL_FONT
- POOLATTR_BEGIN
] );
671 // 1. Version - neue Attribute:
672 // - RES_CHRATR_BLINK
673 // - RES_CHRATR_NOHYPHEN
674 // - RES_CHRATR_NOLINEBREAK
675 // - RES_PARATR_REGISTER
676 // + 2 Dummies fuer die einzelnen "Bereiche"
677 SwAttrPool::pVersionMap1
= new USHORT
[ 60 ];
679 for( i
= 1; i
<= 17; i
++ )
680 SwAttrPool::pVersionMap1
[ i
-1 ] = i
;
681 for ( i
= 18; i
<= 27; ++i
)
682 SwAttrPool::pVersionMap1
[ i
-1 ] = i
+ 5;
683 for ( i
= 28; i
<= 35; ++i
)
684 SwAttrPool::pVersionMap1
[ i
-1 ] = i
+ 7;
685 for ( i
= 36; i
<= 58; ++i
)
686 SwAttrPool::pVersionMap1
[ i
-1 ] = i
+ 10;
687 for ( i
= 59; i
<= 60; ++i
)
688 SwAttrPool::pVersionMap1
[ i
-1 ] = i
+ 12;
690 // 2. Version - neue Attribute:
691 // 10 Dummies fuer den Frame "Bereich"
692 SwAttrPool::pVersionMap2
= new USHORT
[ 75 ];
693 for( i
= 1; i
<= 70; i
++ )
694 SwAttrPool::pVersionMap2
[ i
-1 ] = i
;
695 for ( i
= 71; i
<= 75; ++i
)
696 SwAttrPool::pVersionMap2
[ i
-1 ] = i
+ 10;
698 // 3. Version - neue Attribute:
699 // neue Attribute und Dummies fuer die CJK-Version
700 // und neue Grafik-Attribute
701 SwAttrPool::pVersionMap3
= new USHORT
[ 86 ];
702 for( i
= 1; i
<= 21; i
++ )
703 SwAttrPool::pVersionMap3
[ i
-1 ] = i
;
704 for ( i
= 22; i
<= 27; ++i
)
705 SwAttrPool::pVersionMap3
[ i
-1 ] = i
+ 15;
706 for ( i
= 28; i
<= 82; ++i
)
707 SwAttrPool::pVersionMap3
[ i
-1 ] = i
+ 20;
708 for ( i
= 83; i
<= 86; ++i
)
709 SwAttrPool::pVersionMap3
[ i
-1 ] = i
+ 35;
711 // 4. Version - neue Paragraph Attribute fuer die CJK-Version
712 SwAttrPool::pVersionMap4
= new USHORT
[ 121 ];
713 for( i
= 1; i
<= 65; i
++ )
714 SwAttrPool::pVersionMap4
[ i
-1 ] = i
;
715 for ( i
= 66; i
<= 121; ++i
)
716 SwAttrPool::pVersionMap4
[ i
-1 ] = i
+ 9;
718 // OD 2004-01-21 #i18732# - setup new version map due to extension of
719 // the frame attributes (RES_FRMATR_*) for binary filters.
720 SwAttrPool::pVersionMap5
= new USHORT
[ 130 ];
721 for( i
= 1; i
<= 109; i
++ )
722 SwAttrPool::pVersionMap5
[ i
-1 ] = i
;
723 for ( i
= 110; i
<= 130; ++i
)
724 SwAttrPool::pVersionMap5
[ i
-1 ] = i
+ 6;
726 // 6. Version - new character attribute for overlining plus 2 dummies
727 SwAttrPool::pVersionMap6
= new USHORT
[ 136 ];
728 for( i
= 1; i
<= 37; i
++ )
729 SwAttrPool::pVersionMap6
[ i
-1 ] = i
;
730 for ( i
= 38; i
<= 136; ++i
)
731 SwAttrPool::pVersionMap6
[ i
-1 ] = i
+ 3;
734 lang::XMultiServiceFactory
> xMSF
=
735 ::comphelper::getProcessServiceFactory();
737 SwBreakIt::_Create( xMSF
);
739 /*pAppCharClass = new CharClass(
740 xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));*/
741 //pCalendarWrapper = new SwCalendarWrapper( xMSF );
746 SwSelPaintRects::pMapMode
= new MapMode
;
747 SwFntObj::pPixMap
= new MapMode
;
749 SwIndexReg::pEmptyIndexArray
= new SwIndexReg
;
751 pGlobalOLEExcludeList
= new SvPtrarr
;
753 const SvxSwAutoFmtFlags
& rAFlags
= SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
754 SwDoc::pACmpltWords
= new SwAutoCompleteWord( rAFlags
.nAutoCmpltListLen
,
755 rAFlags
.nAutoCmpltWordLen
);
758 /******************************************************************************
760 ******************************************************************************/
769 SwBreakIt::_Delete();
771 delete pAppCharClass
;
773 delete pCaseCollator
;
775 // das default TableAutoFormat zerstoeren
776 delete SwTableAutoFmt::pDfltBoxAutoFmt
;
778 delete SwSelPaintRects::pMapMode
;
779 delete SwFntObj::pPixMap
;
781 delete SwEditShell::pAutoFmtFlags
;
784 //Defaultattribut freigeben lassen um asserts zu vermeiden.
785 if ( aAttrTab
[0]->GetRefCount() )
786 SfxItemPool::ReleaseDefaults( aAttrTab
, POOLATTR_END
-POOLATTR_BEGIN
, FALSE
);
788 delete SwDoc::pACmpltWords
;
790 delete SwStyleNameMapper::pTextUINameArray
;
791 delete SwStyleNameMapper::pListsUINameArray
;
792 delete SwStyleNameMapper::pExtraUINameArray
;
793 delete SwStyleNameMapper::pRegisterUINameArray
;
794 delete SwStyleNameMapper::pDocUINameArray
;
795 delete SwStyleNameMapper::pHTMLUINameArray
;
796 delete SwStyleNameMapper::pFrmFmtUINameArray
;
797 delete SwStyleNameMapper::pChrFmtUINameArray
;
798 delete SwStyleNameMapper::pHTMLChrFmtUINameArray
;
799 delete SwStyleNameMapper::pPageDescUINameArray
;
800 delete SwStyleNameMapper::pNumRuleUINameArray
;
802 // Delete programmatic name arrays also
803 delete SwStyleNameMapper::pTextProgNameArray
;
804 delete SwStyleNameMapper::pListsProgNameArray
;
805 delete SwStyleNameMapper::pExtraProgNameArray
;
806 delete SwStyleNameMapper::pRegisterProgNameArray
;
807 delete SwStyleNameMapper::pDocProgNameArray
;
808 delete SwStyleNameMapper::pHTMLProgNameArray
;
809 delete SwStyleNameMapper::pFrmFmtProgNameArray
;
810 delete SwStyleNameMapper::pChrFmtProgNameArray
;
811 delete SwStyleNameMapper::pHTMLChrFmtProgNameArray
;
812 delete SwStyleNameMapper::pPageDescProgNameArray
;
813 delete SwStyleNameMapper::pNumRuleProgNameArray
;
815 // And finally, any hash tables that we used
816 delete SwStyleNameMapper::pParaUIMap
;
817 delete SwStyleNameMapper::pCharUIMap
;
818 delete SwStyleNameMapper::pPageUIMap
;
819 delete SwStyleNameMapper::pFrameUIMap
;
820 delete SwStyleNameMapper::pNumRuleUIMap
;
822 delete SwStyleNameMapper::pParaProgMap
;
823 delete SwStyleNameMapper::pCharProgMap
;
824 delete SwStyleNameMapper::pPageProgMap
;
825 delete SwStyleNameMapper::pFrameProgMap
;
826 delete SwStyleNameMapper::pNumRuleProgMap
;
829 // loesche alle default-Attribute
831 for( USHORT n
= 0; n
< POOLATTR_END
- POOLATTR_BEGIN
; n
++ )
832 if( 0 != ( pHt
= aAttrTab
[n
] ))
835 ::ClearFEShellTabCols();
837 delete SwIndexReg::pEmptyIndexArray
;
838 delete[] SwAttrPool::pVersionMap1
;
839 delete[] SwAttrPool::pVersionMap2
;
840 delete[] SwAttrPool::pVersionMap3
;
841 delete[] SwAttrPool::pVersionMap4
;
842 // OD 2004-01-21 #i18732#
843 delete[] SwAttrPool::pVersionMap5
;
844 delete[] SwAttrPool::pVersionMap6
;
846 for ( USHORT i
= 0; i
< pGlobalOLEExcludeList
->Count(); ++i
)
847 delete (SvGlobalName
*)(*pGlobalOLEExcludeList
)[i
];
848 delete pGlobalOLEExcludeList
;
851 // returns the APP - CharClass instance - used for all ToUpper/ToLower/...
852 CharClass
& GetAppCharClass()
854 if ( !pAppCharClass
)
856 uno::Reference
< lang::XMultiServiceFactory
> xMSF
= ::comphelper::getProcessServiceFactory();
857 pAppCharClass
= new CharClass(
858 xMSF
, SwBreakIt::Get()->GetLocale( (LanguageType
)GetAppLanguage() ));
860 return *pAppCharClass
;
863 void SwCalendarWrapper::LoadDefaultCalendar( USHORT eLang
)
867 loadDefaultCalendar( SvxCreateLocale( nLang
= eLang
));
870 LanguageType
GetAppLanguage()
872 return Application::GetSettings().GetLanguage();
875 CollatorWrapper
& GetAppCollator()
879 const lang::Locale
& rLcl
= pBreakIt
->GetLocale(
880 (LanguageType
)GetAppLanguage() );
882 lang::XMultiServiceFactory
> xMSF
=
883 ::comphelper::getProcessServiceFactory();
885 pCollator
= new CollatorWrapper( xMSF
);
886 pCollator
->loadDefaultCollator( rLcl
, SW_COLLATOR_IGNORES
);
890 CollatorWrapper
& GetAppCaseCollator()
894 const lang::Locale
& rLcl
= pBreakIt
->GetLocale(
895 (LanguageType
)GetAppLanguage() );
897 lang::XMultiServiceFactory
> xMSF
=
898 ::comphelper::getProcessServiceFactory();
900 pCaseCollator
= new CollatorWrapper( xMSF
);
901 pCaseCollator
->loadDefaultCollator( rLcl
, 0 );
903 return *pCaseCollator
;
906 const ::utl::TransliterationWrapper
& GetAppCmpStrIgnore()
911 lang::XMultiServiceFactory
> xMSF
=
912 ::comphelper::getProcessServiceFactory();
914 pTransWrp
= new ::utl::TransliterationWrapper( xMSF
,
915 i18n::TransliterationModules_IGNORE_CASE
|
916 i18n::TransliterationModules_IGNORE_KANA
|
917 i18n::TransliterationModules_IGNORE_WIDTH
);
918 pTransWrp
->loadModuleIfNeeded( static_cast<sal_uInt16
>(GetAppLanguage()) );