1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <acmplwrd.hxx>
22 #include <breakit.hxx>
23 #include <cellatr.hxx>
24 #include <checkit.hxx>
26 #include <comphelper/processfactory.hxx>
28 #include <editeng/acorrcfg.hxx>
29 #include <editeng/autokernitem.hxx>
30 #include <editeng/blinkitem.hxx>
31 #include <editeng/boxitem.hxx>
32 #include <editeng/brushitem.hxx>
33 #include <editeng/formatbreakitem.hxx>
34 #include <editeng/charhiddenitem.hxx>
35 #include <editeng/charreliefitem.hxx>
36 #include <editeng/charrotateitem.hxx>
37 #include <editeng/charscaleitem.hxx>
38 #include <editeng/cmapitem.hxx>
39 #include <editeng/colritem.hxx>
40 #include <editeng/contouritem.hxx>
41 #include <editeng/crossedoutitem.hxx>
42 #include <editeng/emphasismarkitem.hxx>
43 #include <editeng/escapementitem.hxx>
44 #include <editeng/fontitem.hxx>
45 #include <editeng/fhgtitem.hxx>
46 #include <editeng/forbiddenruleitem.hxx>
47 #include <editeng/frmdiritem.hxx>
48 #include <editeng/hngpnctitem.hxx>
49 #include <editeng/hyphenzoneitem.hxx>
50 #include <editeng/keepitem.hxx>
51 #include <editeng/kernitem.hxx>
52 #include <editeng/langitem.hxx>
53 #include <editeng/lrspitem.hxx>
54 #include <editeng/lspcitem.hxx>
55 #include <editeng/nhypitem.hxx>
56 #include <editeng/opaqitem.hxx>
57 #include <editeng/orphitem.hxx>
58 #include <editeng/paravertalignitem.hxx>
59 #include <editeng/pbinitem.hxx>
60 #include <editeng/pgrditem.hxx>
61 #include <editeng/prntitem.hxx>
62 #include <editeng/protitem.hxx>
63 #include <editeng/postitem.hxx>
64 #include <editeng/rsiditem.hxx>
65 #include <svl/grabbagitem.hxx>
66 #include <editeng/scriptspaceitem.hxx>
67 #include <editeng/shaditem.hxx>
68 #include <editeng/shdditem.hxx>
69 #include <editeng/spltitem.hxx>
70 #include <editeng/svxacorr.hxx>
71 #include <editeng/swafopt.hxx>
72 #include <editeng/tstpitem.hxx>
73 #include <editeng/twolinesitem.hxx>
74 #include <editeng/ulspitem.hxx>
75 #include <editeng/udlnitem.hxx>
76 #include <editeng/wghtitem.hxx>
77 #include <editeng/widwitem.hxx>
78 #include <editeng/wrlmitem.hxx>
79 #include <editeng/xmlcnitm.hxx>
80 #include <i18nutil/transliteration.hxx>
82 #include <fchrfmt.hxx>
83 #include <fmtanchr.hxx>
84 #include <fmtautofmt.hxx>
85 #include <fmtclbl.hxx>
86 #include <fmtclds.hxx>
87 #include <fmtcnct.hxx>
88 #include <fmtcntnt.hxx>
89 #include <fmteiro.hxx>
90 #include <fmtflcnt.hxx>
92 #include <fmtfollowtextflow.hxx>
93 #include <fmtfordr.hxx>
94 #include <fmtfsize.hxx>
96 #include <fmtftntx.hxx>
97 #include <formatlinebreak.hxx>
98 #include <fmthdft.hxx>
99 #include <fmtinfmt.hxx>
100 #include <fmtline.hxx>
101 #include <fmtlsplt.hxx>
102 #include <fmtmeta.hxx>
103 #include <formatcontentcontrol.hxx>
104 #include <fmtornt.hxx>
105 #include <fmtpdsc.hxx>
106 #include <fmtrfmrk.hxx>
107 #include <fmtrowsplt.hxx>
108 #include <formatflysplit.hxx>
109 #include <fmtruby.hxx>
110 #include <fmtsrnd.hxx>
111 #include <fmturl.hxx>
112 #include <fmtwrapinfluenceonobjpos.hxx>
113 #include <fntcache.hxx>
114 #include <grfatr.hxx>
115 #include <hfspacingitem.hxx>
116 #include <hintids.hxx>
118 #include <paratr.hxx>
119 #include <proofreadingiterator.hxx>
120 #include <editeng/editids.hrc>
121 #include <svl/macitem.hxx>
122 #include <svx/sdtaitm.hxx>
123 #include <swcalwrp.hxx>
124 #include <SwStyleNameMapper.hxx>
125 #include <tblafmt.hxx>
126 #include <tgrditem.hxx>
127 #include <tools/globname.hxx>
129 #include <unotools/charclass.hxx>
130 #include <unotools/configmgr.hxx>
131 #include <unotools/collatorwrapper.hxx>
132 #include <unotools/transliterationwrapper.hxx>
133 #include <vcl/mapmod.hxx>
134 #include <vcl/svapp.hxx>
135 #include <vcl/settings.hxx>
136 #include <salhelper/singletonref.hxx>
137 #include <viscrs.hxx>
139 using namespace ::com::sun::star
;
141 // some ranges for sets in collections/ nodes
143 // AttrSet range for the 2 break attributes
144 WhichRangesContainer
const aBreakSetRange(svl::Items
<
145 RES_PAGEDESC
, RES_BREAK
148 // AttrSet range for TextFormatColl
149 // list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
150 // included in the paragraph style's itemset.
151 WhichRangesContainer
const aTextFormatCollSetRange(svl::Items
<
152 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
153 RES_PARATR_BEGIN
, RES_PARATR_END
-1,
154 RES_PARATR_LIST_LEVEL
, RES_PARATR_LIST_LEVEL
,
155 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
156 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
158 // FillAttribute support
159 XATTR_FILL_FIRST
, XATTR_FILL_LAST
163 // AttrSet range for GrfFormatColl
164 WhichRangesContainer
const aGrfFormatCollSetRange(svl::Items
<
165 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
166 RES_GRFATR_BEGIN
, RES_GRFATR_END
-1,
167 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
170 // AttrSet range for TextNode
171 WhichRangesContainer
const aTextNodeSetRange(svl::Items
<
172 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
173 RES_PARATR_BEGIN
, RES_PARATR_END
-1,
174 RES_PARATR_LIST_BEGIN
, RES_PARATR_LIST_END
-1,
175 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
176 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
178 // FillAttribute support (paragraph FillStyle)
179 XATTR_FILL_FIRST
, XATTR_FILL_LAST
183 // AttrSet range for NoTextNode
184 WhichRangesContainer
const aNoTextNodeSetRange(svl::Items
<
185 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
186 RES_GRFATR_BEGIN
, RES_GRFATR_END
-1,
187 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
190 WhichRangesContainer
const aTableSetRange(svl::Items
<
191 RES_FILL_ORDER
, RES_FRM_SIZE
,
192 RES_LR_SPACE
, RES_BREAK
,
193 RES_HORI_ORIENT
, RES_HORI_ORIENT
,
194 RES_BACKGROUND
, RES_SHADOW
,
196 RES_LAYOUT_SPLIT
, RES_LAYOUT_SPLIT
,
197 RES_FRAMEDIR
, RES_FRAMEDIR
,
199 RES_COLLAPSING_BORDERS
, RES_COLLAPSING_BORDERS
,
201 RES_FRMATR_GRABBAG
, RES_FRMATR_GRABBAG
,
202 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
205 WhichRangesContainer
const aTableLineSetRange(svl::Items
<
206 RES_FILL_ORDER
, RES_FRM_SIZE
,
207 RES_LR_SPACE
, RES_UL_SPACE
,
208 // HasTextChangesOnly
209 RES_PRINT
, RES_PRINT
,
210 RES_PROTECT
, RES_PROTECT
,
211 RES_VERT_ORIENT
, RES_VERT_ORIENT
,
212 RES_BACKGROUND
, RES_SHADOW
,
213 RES_ROW_SPLIT
, RES_ROW_SPLIT
,
214 RES_FRMATR_GRABBAG
, RES_FRMATR_GRABBAG
,
215 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
218 WhichRangesContainer
const aTableBoxSetRange(svl::Items
<
219 RES_FILL_ORDER
, RES_FRM_SIZE
,
220 RES_LR_SPACE
, RES_UL_SPACE
,
221 // HasTextChangesOnly
222 RES_PRINT
, RES_PRINT
,
223 RES_PROTECT
, RES_PROTECT
,
224 RES_VERT_ORIENT
, RES_VERT_ORIENT
,
225 RES_BACKGROUND
, RES_SHADOW
,
226 RES_FRAMEDIR
, RES_FRAMEDIR
,
227 RES_FRMATR_GRABBAG
, RES_FRMATR_GRABBAG
,
228 RES_BOXATR_BEGIN
, RES_BOXATR_END
-1,
229 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
232 // AttrSet range for SwFrameFormat
233 WhichRangesContainer
const aFrameFormatSetRange(svl::Items
<
234 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
235 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1,
237 // FillAttribute support (TextFrame, OLE, Writer GraphicObject)
238 XATTR_FILL_FIRST
, XATTR_FILL_LAST
242 // AttrSet range for SwCharFormat
243 WhichRangesContainer
const aCharFormatSetRange(svl::Items
<
244 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
245 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
248 // AttrSet range for character autostyles
249 WhichRangesContainer
const aCharAutoFormatSetRange(svl::Items
<
250 RES_CHRATR_BEGIN
, RES_CHRATR_END
-1,
251 RES_TXTATR_UNKNOWN_CONTAINER
, RES_TXTATR_UNKNOWN_CONTAINER
,
252 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
255 // AttrSet range for SwPageDescFormat
256 WhichRangesContainer
const aPgFrameFormatSetRange(svl::Items
<
257 RES_FRMATR_BEGIN
, RES_FRMATR_END
-1,
258 RES_UNKNOWNATR_BEGIN
, RES_UNKNOWNATR_END
-1
261 // create table for accessing default format attributes
262 SwDfltAttrTab
aAttrTab( POOLATTR_END
- POOLATTR_BEGIN
, nullptr );
264 SfxItemInfo aSlotTab
[] =
266 { SID_ATTR_CHAR_CASEMAP
, true }, // RES_CHRATR_CASEMAP
267 { SID_ATTR_CHAR_CHARSETCOLOR
, true }, // RES_CHRATR_CHARSETCOLOR
268 { SID_ATTR_CHAR_COLOR
, true }, // RES_CHRATR_COLOR
269 { SID_ATTR_CHAR_CONTOUR
, true }, // RES_CHRATR_CONTOUR
270 { SID_ATTR_CHAR_STRIKEOUT
, true }, // RES_CHRATR_CROSSEDOUT
271 { SID_ATTR_CHAR_ESCAPEMENT
, true }, // RES_CHRATR_ESCAPEMENT
272 { SID_ATTR_CHAR_FONT
, true }, // RES_CHRATR_FONT
273 { SID_ATTR_CHAR_FONTHEIGHT
, true }, // RES_CHRATR_FONTSIZE
274 { SID_ATTR_CHAR_KERNING
, true }, // RES_CHRATR_KERNING
275 { SID_ATTR_CHAR_LANGUAGE
, true }, // RES_CHRATR_LANGUAGE
276 { SID_ATTR_CHAR_POSTURE
, true }, // RES_CHRATR_POSTURE
277 { 0, true }, // RES_CHRATR_UNUSED1
278 { SID_ATTR_CHAR_SHADOWED
, true }, // RES_CHRATR_SHADOWED
279 { SID_ATTR_CHAR_UNDERLINE
, true }, // RES_CHRATR_UNDERLINE
280 { SID_ATTR_CHAR_WEIGHT
, true }, // RES_CHRATR_WEIGHT
281 { SID_ATTR_CHAR_WORDLINEMODE
, true }, // RES_CHRATR_WORDLINEMODE
282 { SID_ATTR_CHAR_AUTOKERN
, true }, // RES_CHRATR_AUTOKERN
283 { SID_ATTR_FLASH
, true }, // RES_CHRATR_BLINK
284 { 0, true }, // RES_CHRATR_UNUSED2
285 { 0, true }, // RES_CHRATR_NOHYPHEN
286 { SID_ATTR_BRUSH_CHAR
, true }, // RES_CHRATR_BACKGROUND
287 { SID_ATTR_CHAR_CJK_FONT
, true }, // RES_CHRATR_CJK_FONT
288 { SID_ATTR_CHAR_CJK_FONTHEIGHT
, true },// RES_CHRATR_CJK_FONTSIZE
289 { SID_ATTR_CHAR_CJK_LANGUAGE
, true }, // RES_CHRATR_CJK_LANGUAGE
290 { SID_ATTR_CHAR_CJK_POSTURE
, true }, // RES_CHRATR_CJK_POSTURE
291 { SID_ATTR_CHAR_CJK_WEIGHT
, true }, // RES_CHRATR_CJK_WEIGHT
292 { SID_ATTR_CHAR_CTL_FONT
, true }, // RES_CHRATR_CTL_FONT
293 { SID_ATTR_CHAR_CTL_FONTHEIGHT
, true },// RES_CHRATR_CTL_FONTSIZE
294 { SID_ATTR_CHAR_CTL_LANGUAGE
, true }, // RES_CHRATR_CTL_LANGUAGE
295 { SID_ATTR_CHAR_CTL_POSTURE
, true }, // RES_CHRATR_CTL_POSTURE
296 { SID_ATTR_CHAR_CTL_WEIGHT
, true }, // RES_CHRATR_CTL_WEIGHT
297 { SID_ATTR_CHAR_ROTATED
, true }, // RES_CHRATR_ROTATE
298 { SID_ATTR_CHAR_EMPHASISMARK
, true }, // RES_CHRATR_EMPHASIS_MARK
299 { SID_ATTR_CHAR_TWO_LINES
, true }, // RES_CHRATR_TWO_LINES
300 { SID_ATTR_CHAR_SCALEWIDTH
, true }, // RES_CHRATR_SCALEW
301 { SID_ATTR_CHAR_RELIEF
, true }, // RES_CHRATR_RELIEF
302 { SID_ATTR_CHAR_HIDDEN
, true }, // RES_CHRATR_HIDDEN
303 { SID_ATTR_CHAR_OVERLINE
, true }, // RES_CHRATR_OVERLINE
304 { 0, true }, // RES_CHRATR_RSID
305 { SID_ATTR_CHAR_BOX
, true }, // RES_CHRATR_BOX
306 { SID_ATTR_CHAR_SHADOW
, true }, // RES_CHRATR_SHADOW
307 { 0, true }, // RES_CHRATR_HIGHLIGHT
308 { SID_ATTR_CHAR_GRABBAG
, true }, // RES_CHRATR_GRABBAG
309 { 0, true }, // RES_CHRATR_BIDIRTL
310 { 0, true }, // RES_CHRATR_IDCTHINT
312 { 0, false }, // RES_TXTATR_REFMARK
313 { 0, false }, // RES_TXTATR_TOXMARK
314 { 0, false }, // RES_TXTATR_META
315 { 0, false }, // RES_TXTATR_METAFIELD
316 { 0, true }, // RES_TXTATR_AUTOFMT
317 { FN_TXTATR_INET
, false }, // RES_TXTATR_INETFMT
318 { 0, false }, // RES_TXTATR_CHARFMT
319 { SID_ATTR_CHAR_CJK_RUBY
, false }, // RES_TXTATR_CJK_RUBY
320 { 0, true }, // RES_TXTATR_UNKNOWN_CONTAINER
321 { 0, false }, // RES_TXTATR_INPUTFIELD
322 { 0, false }, // RES_TXTATR_CONTENTCONTROL
324 { 0, false }, // RES_TXTATR_FIELD
325 { 0, false }, // RES_TXTATR_FLYCNT
326 { 0, false }, // RES_TXTATR_FTN
327 { 0, false }, // RES_TXTATR_ANNOTATION
328 { 0, false }, // RES_TXTATR_LINEBREAK
329 { 0, true }, // RES_TXTATR_DUMMY1
331 { SID_ATTR_PARA_LINESPACE
, true }, // RES_PARATR_LINESPACING
332 { SID_ATTR_PARA_ADJUST
, true }, // RES_PARATR_ADJUST
333 { SID_ATTR_PARA_SPLIT
, true }, // RES_PARATR_SPLIT
334 { SID_ATTR_PARA_ORPHANS
, true }, // RES_PARATR_ORPHANS
335 { SID_ATTR_PARA_WIDOWS
, true }, // RES_PARATR_WIDOWS
336 { SID_ATTR_TABSTOP
, true }, // RES_PARATR_TABSTOP
337 { SID_ATTR_PARA_HYPHENZONE
, true }, // RES_PARATR_HYPHENZONE
338 { FN_FORMAT_DROPCAPS
, false }, // RES_PARATR_DROP
339 { SID_ATTR_PARA_REGISTER
, true }, // RES_PARATR_REGISTER
340 { SID_ATTR_PARA_NUMRULE
, true }, // RES_PARATR_NUMRULE
341 { SID_ATTR_PARA_SCRIPTSPACE
, true }, // RES_PARATR_SCRIPTSPACE
342 { SID_ATTR_PARA_HANGPUNCTUATION
, true },// RES_PARATR_HANGINGPUNCTUATION
344 { SID_ATTR_PARA_FORBIDDEN_RULES
, true },// RES_PARATR_FORBIDDEN_RULES
345 { SID_PARA_VERTALIGN
, true }, // RES_PARATR_VERTALIGN
346 { SID_ATTR_PARA_SNAPTOGRID
, true }, // RES_PARATR_SNAPTOGRID
347 { SID_ATTR_BORDER_CONNECT
, true }, // RES_PARATR_CONNECT_BORDER
349 { SID_ATTR_PARA_OUTLINE_LEVEL
, true }, // RES_PARATR_OUTLINELEVEL //#outline level
350 { 0, true }, // RES_PARATR_RSID
351 { SID_ATTR_PARA_GRABBAG
, true }, // RES_PARATR_GRABBAG
352 { 0, true }, // RES_PARATR_LIST_ID
353 { 0, true }, // RES_PARATR_LIST_LEVEL
354 { 0, true }, // RES_PARATR_LIST_ISRESTART
355 { 0, true }, // RES_PARATR_LIST_RESTARTVALUE
356 { 0, true }, // RES_PARATR_LIST_ISCOUNTED
357 { 0, true }, // RES_PARATR_LIST_AUTOFMT
359 { 0, true }, // RES_FILL_ORDER
360 { 0, true }, // RES_FRM_SIZE
361 { SID_ATTR_PAGE_PAPERBIN
, true }, // RES_PAPER_BIN
362 { SID_ATTR_PARA_FIRSTLINESPACE
, true }, // RES_MARGIN_FIRSTLINE
363 { SID_ATTR_PARA_LEFTSPACE
, true }, // RES_MARGIN_TEXTLEFT
364 { SID_ATTR_PARA_RIGHTSPACE
, true }, // RES_MARGIN_RIGHT
365 { 0, true }, // RES_MARGIN_LEFT
366 { 0, true }, // RES_MARGIN_GUTTER
367 { 0, true }, // RES_MARGIN_GUTTER_RIGHT
368 { SID_ATTR_LRSPACE
, true }, // RES_LR_SPACE
369 { SID_ATTR_ULSPACE
, true }, // RES_UL_SPACE
370 { 0, false }, // RES_PAGEDESC
371 { SID_ATTR_PARA_PAGEBREAK
, true }, // RES_BREAK
372 { 0, false }, // RES_CNTNT
373 { 0, true }, // RES_HEADER
374 { 0, true }, // RES_FOOTER
375 { 0, true }, // RES_PRINT
376 { FN_OPAQUE
, true }, // RES_OPAQUE
377 { FN_SET_PROTECT
, true }, // RES_PROTECT
378 { FN_SURROUND
, true }, // RES_SURROUND
379 { FN_VERT_ORIENT
, true }, // RES_VERT_ORIENT
380 { FN_HORI_ORIENT
, true }, // RES_HORI_ORIENT
381 { 0, false }, // RES_ANCHOR
382 { SID_ATTR_BRUSH
, true }, // RES_BACKGROUND
383 { SID_ATTR_BORDER_OUTER
, true }, // RES_BOX
384 { SID_ATTR_BORDER_SHADOW
, true }, // RES_SHADOW
385 { SID_ATTR_MACROITEM
, true }, // RES_FRMMACRO
386 { FN_ATTR_COLUMNS
, true }, // RES_COL
387 { SID_ATTR_PARA_KEEP
, true }, // RES_KEEP
388 { 0, true }, // RES_URL
389 { 0, true }, // RES_EDIT_IN_READONLY
391 { 0, true }, // RES_LAYOUT_SPLIT
392 { 0, false }, // RES_CHAIN
393 { 0, true }, // RES_TEXTGRID
394 { FN_FORMAT_LINENUMBER
, true }, // RES_LINENUMBER
395 { 0, true }, // RES_FTN_AT_TXTEND
396 { 0, true }, // RES_END_AT_TXTEND
397 { 0, true }, // RES_COLUMNBALANCE
399 { SID_ATTR_FRAMEDIRECTION
, true }, // RES_FRAMEDIR
401 { SID_ATTR_HDFT_DYNAMIC_SPACING
, true },// RES_HEADER_FOOTER_EAT_SPACING
402 { FN_TABLE_ROW_SPLIT
, true }, // RES_ROW_SPLIT
403 { 0, true } , // RES_FLY_SPLIT
404 // #i18732# - use slot-id define in svx
405 { SID_SW_FOLLOW_TEXT_FLOW
, true }, // RES_FOLLOW_TEXT_FLOW
407 { SID_SW_COLLAPSING_BORDERS
, true }, // RES_COLLAPSING_BORDERS
409 { SID_SW_WRAP_INFLUENCE_ON_OBJPOS
, true },// RES_WRAP_INFLUENCE_ON_OBJPOS
410 { 0, false }, // RES_AUTO_STYLE
411 { 0, true }, // RES_FRMATR_STYLE_NAME
412 { 0, true }, // RES_FRMATR_CONDITIONAL_STYLE_NAME
413 { 0, true }, // RES_FRMATR_GRABBAG
414 { 0, true }, // RES_TEXT_VERT_ADJUST
415 { 0, true }, // RES_BACKGROUND_FULL_SIZE
416 { 0, true }, // RES_RTL_GUTTER
417 { 0, true }, // RES_DECORATIVE
419 { 0, true }, // RES_GRFATR_MIRRORGRF
420 { SID_ATTR_GRAF_CROP
, true }, // RES_GRFATR_CROPGRF
421 { 0, true }, // RES_GRFATR_ROTATION,
422 { 0, true }, // RES_GRFATR_LUMINANCE,
423 { 0, true }, // RES_GRFATR_CONTRAST,
424 { 0, true }, // RES_GRFATR_CHANNELR,
425 { 0, true }, // RES_GRFATR_CHANNELG,
426 { 0, true }, // RES_GRFATR_CHANNELB,
427 { 0, true }, // RES_GRFATR_GAMMA,
428 { 0, true }, // RES_GRFATR_INVERT,
429 { 0, true }, // RES_GRFATR_TRANSPARENCY,
430 { 0, true }, // RES_GRFATR_DUMMY3,
431 { 0, true }, // RES_GRFATR_DUMMY4,
432 { 0, true }, // RES_GRFATR_DUMMY5,
433 { 0, true }, // RES_GRFATR_DUMMY6,
435 { 0, true }, // RES_BOXATR_FORMAT
436 { 0, false }, // RES_BOXATR_FORMULA,
437 { 0, true }, // RES_BOXATR_VALUE
439 { 0, true } // RES_UNKNOWNATR_CONTAINER
442 std::vector
<SvGlobalName
> *pGlobalOLEExcludeList
= nullptr;
444 SwAutoCompleteWord
* SwDoc::s_pAutoCompleteWords
= nullptr;
445 SwDoc
* SwDoc::s_pLast
= nullptr;
447 SwCheckIt
* pCheckIt
= nullptr;
448 static CharClass
* pAppCharClass
= nullptr;
450 static CollatorWrapper
* pCollator
= nullptr,
451 *pCaseCollator
= nullptr;
453 SwCalendarWrapper
& s_getCalendarWrapper()
455 static SwCalendarWrapper aCalendarWrapper
;
456 return aCalendarWrapper
;
463 aAttrTab
[ RES_CHRATR_CASEMAP
- POOLATTR_BEGIN
] = new SvxCaseMapItem( SvxCaseMap::NotMapped
, RES_CHRATR_CASEMAP
);
464 aAttrTab
[ RES_CHRATR_CHARSETCOLOR
- POOLATTR_BEGIN
] = new SvxColorItem(RES_CHRATR_CHARSETCOLOR
);
465 aAttrTab
[ RES_CHRATR_COLOR
- POOLATTR_BEGIN
] = new SvxColorItem(RES_CHRATR_COLOR
);
466 aAttrTab
[ RES_CHRATR_CONTOUR
- POOLATTR_BEGIN
] = new SvxContourItem( false, RES_CHRATR_CONTOUR
);
467 aAttrTab
[ RES_CHRATR_CROSSEDOUT
- POOLATTR_BEGIN
] = new SvxCrossedOutItem( STRIKEOUT_NONE
, RES_CHRATR_CROSSEDOUT
);
468 aAttrTab
[ RES_CHRATR_ESCAPEMENT
- POOLATTR_BEGIN
] = new SvxEscapementItem( RES_CHRATR_ESCAPEMENT
);
469 aAttrTab
[ RES_CHRATR_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_FONT
);
471 aAttrTab
[ RES_CHRATR_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_FONTSIZE
);
472 aAttrTab
[ RES_CHRATR_KERNING
- POOLATTR_BEGIN
] = new SvxKerningItem( 0, RES_CHRATR_KERNING
);
473 aAttrTab
[ RES_CHRATR_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_LANGUAGE
);
474 aAttrTab
[ RES_CHRATR_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem( ITALIC_NONE
, RES_CHRATR_POSTURE
);
475 aAttrTab
[ RES_CHRATR_UNUSED1
- POOLATTR_BEGIN
] = new SfxVoidItem( RES_CHRATR_UNUSED1
);
476 aAttrTab
[ RES_CHRATR_SHADOWED
- POOLATTR_BEGIN
] = new SvxShadowedItem( false, RES_CHRATR_SHADOWED
);
477 aAttrTab
[ RES_CHRATR_UNDERLINE
- POOLATTR_BEGIN
] = new SvxUnderlineItem( LINESTYLE_NONE
, RES_CHRATR_UNDERLINE
);
478 aAttrTab
[ RES_CHRATR_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_WEIGHT
);
479 aAttrTab
[ RES_CHRATR_RSID
- POOLATTR_BEGIN
] = new SvxRsidItem( 0, RES_CHRATR_RSID
);
480 aAttrTab
[ RES_CHRATR_WORDLINEMODE
- POOLATTR_BEGIN
] = new SvxWordLineModeItem( false, RES_CHRATR_WORDLINEMODE
);
481 aAttrTab
[ RES_CHRATR_AUTOKERN
- POOLATTR_BEGIN
] = new SvxAutoKernItem( false, RES_CHRATR_AUTOKERN
);
482 aAttrTab
[ RES_CHRATR_BLINK
- POOLATTR_BEGIN
] = new SvxBlinkItem( false, RES_CHRATR_BLINK
);
483 aAttrTab
[ RES_CHRATR_NOHYPHEN
- POOLATTR_BEGIN
] = new SvxNoHyphenItem( RES_CHRATR_NOHYPHEN
);
484 aAttrTab
[ RES_CHRATR_UNUSED2
- POOLATTR_BEGIN
] = new SfxVoidItem( RES_CHRATR_UNUSED2
);
485 aAttrTab
[ RES_CHRATR_BACKGROUND
- POOLATTR_BEGIN
] = new SvxBrushItem( RES_CHRATR_BACKGROUND
);
488 aAttrTab
[ RES_CHRATR_CJK_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_CJK_FONT
);
489 aAttrTab
[ RES_CHRATR_CJK_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_CJK_FONTSIZE
);
490 aAttrTab
[ RES_CHRATR_CJK_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_CJK_LANGUAGE
);
491 aAttrTab
[ RES_CHRATR_CJK_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem(ITALIC_NONE
, RES_CHRATR_CJK_POSTURE
);
492 aAttrTab
[ RES_CHRATR_CJK_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_CJK_WEIGHT
);
495 aAttrTab
[ RES_CHRATR_CTL_FONT
- POOLATTR_BEGIN
] = new SvxFontItem( RES_CHRATR_CTL_FONT
);
496 aAttrTab
[ RES_CHRATR_CTL_FONTSIZE
- POOLATTR_BEGIN
] = new SvxFontHeightItem( 240, 100, RES_CHRATR_CTL_FONTSIZE
);
497 aAttrTab
[ RES_CHRATR_CTL_LANGUAGE
- POOLATTR_BEGIN
] = new SvxLanguageItem(LANGUAGE_DONTKNOW
, RES_CHRATR_CTL_LANGUAGE
);
498 aAttrTab
[ RES_CHRATR_CTL_POSTURE
- POOLATTR_BEGIN
] = new SvxPostureItem(ITALIC_NONE
, RES_CHRATR_CTL_POSTURE
);
499 aAttrTab
[ RES_CHRATR_CTL_WEIGHT
- POOLATTR_BEGIN
] = new SvxWeightItem( WEIGHT_NORMAL
, RES_CHRATR_CTL_WEIGHT
);
501 aAttrTab
[ RES_CHRATR_ROTATE
- POOLATTR_BEGIN
] = new SvxCharRotateItem( 0_deg10
, false, RES_CHRATR_ROTATE
);
502 aAttrTab
[ RES_CHRATR_EMPHASIS_MARK
- POOLATTR_BEGIN
] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE
, RES_CHRATR_EMPHASIS_MARK
);
503 aAttrTab
[ RES_CHRATR_TWO_LINES
- POOLATTR_BEGIN
] = new SvxTwoLinesItem( false, 0, 0, RES_CHRATR_TWO_LINES
);
504 aAttrTab
[ RES_CHRATR_SCALEW
- POOLATTR_BEGIN
] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW
);
505 aAttrTab
[ RES_CHRATR_RELIEF
- POOLATTR_BEGIN
] = new SvxCharReliefItem( FontRelief::NONE
, RES_CHRATR_RELIEF
);
506 aAttrTab
[ RES_CHRATR_HIDDEN
- POOLATTR_BEGIN
] = new SvxCharHiddenItem( false, RES_CHRATR_HIDDEN
);
507 aAttrTab
[ RES_CHRATR_OVERLINE
- POOLATTR_BEGIN
] = new SvxOverlineItem( LINESTYLE_NONE
, RES_CHRATR_OVERLINE
);
508 aAttrTab
[ RES_CHRATR_BOX
- POOLATTR_BEGIN
] = new SvxBoxItem( RES_CHRATR_BOX
);
509 aAttrTab
[ RES_CHRATR_SHADOW
- POOLATTR_BEGIN
] = new SvxShadowItem( RES_CHRATR_SHADOW
);
510 aAttrTab
[ RES_CHRATR_HIGHLIGHT
- POOLATTR_BEGIN
] = new SvxBrushItem( RES_CHRATR_HIGHLIGHT
);
511 aAttrTab
[ RES_CHRATR_GRABBAG
- POOLATTR_BEGIN
] = new SfxGrabBagItem( RES_CHRATR_GRABBAG
);
513 // CharacterAttr - MSWord weak char direction/script override emulation
514 aAttrTab
[ RES_CHRATR_BIDIRTL
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_CHRATR_BIDIRTL
, sal_Int16(-1) );
515 aAttrTab
[ RES_CHRATR_IDCTHINT
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_CHRATR_IDCTHINT
, sal_Int16(-1) );
517 aAttrTab
[ RES_TXTATR_REFMARK
- POOLATTR_BEGIN
] = new SwFormatRefMark( OUString() );
518 aAttrTab
[ RES_TXTATR_TOXMARK
- POOLATTR_BEGIN
] = new SwTOXMark
;
519 aAttrTab
[ RES_TXTATR_META
- POOLATTR_BEGIN
] = SwFormatMeta::CreatePoolDefault(RES_TXTATR_META
);
520 aAttrTab
[ RES_TXTATR_METAFIELD
- POOLATTR_BEGIN
] = SwFormatMeta::CreatePoolDefault(RES_TXTATR_METAFIELD
);
521 aAttrTab
[ RES_TXTATR_AUTOFMT
- POOLATTR_BEGIN
] = new SwFormatAutoFormat
;
522 aAttrTab
[ RES_TXTATR_INETFMT
- POOLATTR_BEGIN
] = new SwFormatINetFormat( OUString(), OUString() );
523 aAttrTab
[ RES_TXTATR_CHARFMT
- POOLATTR_BEGIN
] = new SwFormatCharFormat( nullptr );
524 aAttrTab
[ RES_TXTATR_CJK_RUBY
- POOLATTR_BEGIN
] = new SwFormatRuby( OUString() );
525 aAttrTab
[ RES_TXTATR_UNKNOWN_CONTAINER
- POOLATTR_BEGIN
] = new SvXMLAttrContainerItem( RES_TXTATR_UNKNOWN_CONTAINER
);
526 aAttrTab
[ RES_TXTATR_INPUTFIELD
- POOLATTR_BEGIN
] = new SwFormatField( RES_TXTATR_INPUTFIELD
);
527 aAttrTab
[ RES_TXTATR_CONTENTCONTROL
- POOLATTR_BEGIN
] = new SwFormatContentControl( RES_TXTATR_CONTENTCONTROL
);
529 aAttrTab
[ RES_TXTATR_FIELD
- POOLATTR_BEGIN
] = new SwFormatField( RES_TXTATR_FIELD
);
530 aAttrTab
[ RES_TXTATR_FLYCNT
- POOLATTR_BEGIN
] = new SwFormatFlyCnt( nullptr );
531 aAttrTab
[ RES_TXTATR_FTN
- POOLATTR_BEGIN
] = new SwFormatFootnote
;
532 aAttrTab
[ RES_TXTATR_ANNOTATION
- POOLATTR_BEGIN
] = new SwFormatField( RES_TXTATR_ANNOTATION
);
533 aAttrTab
[RES_TXTATR_LINEBREAK
- POOLATTR_BEGIN
] = new SwFormatLineBreak(SwLineBreakClear::NONE
);
535 // TextAttr - Dummies
536 aAttrTab
[ RES_TXTATR_DUMMY1
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_TXTATR_DUMMY1
);
538 aAttrTab
[ RES_PARATR_LINESPACING
- POOLATTR_BEGIN
] = new SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT
, RES_PARATR_LINESPACING
);
539 aAttrTab
[ RES_PARATR_ADJUST
- POOLATTR_BEGIN
] = new SvxAdjustItem( SvxAdjust::Left
, RES_PARATR_ADJUST
);
540 aAttrTab
[ RES_PARATR_SPLIT
- POOLATTR_BEGIN
] = new SvxFormatSplitItem( true, RES_PARATR_SPLIT
);
541 aAttrTab
[ RES_PARATR_WIDOWS
- POOLATTR_BEGIN
] = new SvxWidowsItem( 0, RES_PARATR_WIDOWS
);
542 aAttrTab
[ RES_PARATR_ORPHANS
- POOLATTR_BEGIN
] = new SvxOrphansItem( 0, RES_PARATR_ORPHANS
);
543 aAttrTab
[ RES_PARATR_TABSTOP
- POOLATTR_BEGIN
] = new SvxTabStopItem( 1, SVX_TAB_DEFDIST
, SvxTabAdjust::Default
, RES_PARATR_TABSTOP
);
545 pItem
= new SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE
);
546 static_cast<SvxHyphenZoneItem
*>(pItem
)->GetMaxHyphens() = 0; // Default: 0
547 aAttrTab
[ RES_PARATR_HYPHENZONE
- POOLATTR_BEGIN
] = pItem
;
549 aAttrTab
[ RES_PARATR_DROP
- POOLATTR_BEGIN
] = new SwFormatDrop
;
550 aAttrTab
[ RES_PARATR_REGISTER
- POOLATTR_BEGIN
] = new SwRegisterItem( false );
551 aAttrTab
[ RES_PARATR_NUMRULE
- POOLATTR_BEGIN
] = new SwNumRuleItem( OUString() );
553 aAttrTab
[ RES_PARATR_SCRIPTSPACE
- POOLATTR_BEGIN
] = new SvxScriptSpaceItem( true, RES_PARATR_SCRIPTSPACE
);
554 aAttrTab
[ RES_PARATR_HANGINGPUNCTUATION
- POOLATTR_BEGIN
] = new SvxHangingPunctuationItem( true, RES_PARATR_HANGINGPUNCTUATION
);
555 aAttrTab
[ RES_PARATR_FORBIDDEN_RULES
- POOLATTR_BEGIN
] = new SvxForbiddenRuleItem( true, RES_PARATR_FORBIDDEN_RULES
);
556 aAttrTab
[ RES_PARATR_VERTALIGN
- POOLATTR_BEGIN
] = new SvxParaVertAlignItem( SvxParaVertAlignItem::Align::Automatic
, RES_PARATR_VERTALIGN
);
557 aAttrTab
[ RES_PARATR_SNAPTOGRID
- POOLATTR_BEGIN
] = new SvxParaGridItem( true, RES_PARATR_SNAPTOGRID
);
558 aAttrTab
[ RES_PARATR_CONNECT_BORDER
- POOLATTR_BEGIN
] = new SwParaConnectBorderItem
;
560 aAttrTab
[ RES_PARATR_OUTLINELEVEL
- POOLATTR_BEGIN
] = new SfxUInt16Item( RES_PARATR_OUTLINELEVEL
, 0 );
561 aAttrTab
[ RES_PARATR_RSID
- POOLATTR_BEGIN
] = new SvxRsidItem( 0, RES_PARATR_RSID
);
562 aAttrTab
[ RES_PARATR_GRABBAG
- POOLATTR_BEGIN
] = new SfxGrabBagItem( RES_PARATR_GRABBAG
);
564 aAttrTab
[ RES_PARATR_LIST_ID
- POOLATTR_BEGIN
] = new SfxStringItem( RES_PARATR_LIST_ID
, OUString() );
565 aAttrTab
[ RES_PARATR_LIST_LEVEL
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_PARATR_LIST_LEVEL
, 0 );
566 aAttrTab
[ RES_PARATR_LIST_ISRESTART
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART
, false );
567 aAttrTab
[ RES_PARATR_LIST_RESTARTVALUE
- POOLATTR_BEGIN
] = new SfxInt16Item( RES_PARATR_LIST_RESTARTVALUE
, 1 );
568 aAttrTab
[ RES_PARATR_LIST_ISCOUNTED
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED
, true );
569 aAttrTab
[ RES_PARATR_LIST_AUTOFMT
- POOLATTR_BEGIN
] = new SwFormatAutoFormat(RES_PARATR_LIST_AUTOFMT
);//new SfxSetItem(RES_PARATR_LIST_AUTOFMT, std::make_unique<SfxItemSet>(aCharAutoFormatSetRange));
571 aAttrTab
[ RES_FILL_ORDER
- POOLATTR_BEGIN
] = new SwFormatFillOrder
;
572 aAttrTab
[ RES_FRM_SIZE
- POOLATTR_BEGIN
] = new SwFormatFrameSize
;
573 aAttrTab
[ RES_PAPER_BIN
- POOLATTR_BEGIN
] = new SvxPaperBinItem( RES_PAPER_BIN
);
574 aAttrTab
[ RES_MARGIN_FIRSTLINE
- POOLATTR_BEGIN
] = new SvxFirstLineIndentItem(RES_MARGIN_FIRSTLINE
);
575 aAttrTab
[ RES_MARGIN_TEXTLEFT
- POOLATTR_BEGIN
] = new SvxTextLeftMarginItem(RES_MARGIN_TEXTLEFT
);
576 aAttrTab
[ RES_MARGIN_RIGHT
- POOLATTR_BEGIN
] = new SvxRightMarginItem(RES_MARGIN_RIGHT
);
577 aAttrTab
[ RES_MARGIN_LEFT
- POOLATTR_BEGIN
] = new SvxLeftMarginItem(RES_MARGIN_LEFT
);
578 aAttrTab
[ RES_MARGIN_GUTTER
- POOLATTR_BEGIN
] = new SvxGutterLeftMarginItem(RES_MARGIN_GUTTER
);
579 aAttrTab
[ RES_MARGIN_GUTTER_RIGHT
- POOLATTR_BEGIN
] = new SvxGutterRightMarginItem(RES_MARGIN_GUTTER_RIGHT
);
580 aAttrTab
[ RES_LR_SPACE
- POOLATTR_BEGIN
] = new SvxLRSpaceItem( RES_LR_SPACE
);
581 aAttrTab
[ RES_UL_SPACE
- POOLATTR_BEGIN
] = new SvxULSpaceItem( RES_UL_SPACE
);
582 aAttrTab
[ RES_PAGEDESC
- POOLATTR_BEGIN
] = new SwFormatPageDesc
;
583 aAttrTab
[ RES_BREAK
- POOLATTR_BEGIN
] = new SvxFormatBreakItem( SvxBreak::NONE
, RES_BREAK
);
584 aAttrTab
[ RES_CNTNT
- POOLATTR_BEGIN
] = new SwFormatContent
;
585 aAttrTab
[ RES_HEADER
- POOLATTR_BEGIN
] = new SwFormatHeader
;
586 aAttrTab
[ RES_FOOTER
- POOLATTR_BEGIN
] = new SwFormatFooter
;
587 aAttrTab
[ RES_PRINT
- POOLATTR_BEGIN
] = new SvxPrintItem( RES_PRINT
);
588 aAttrTab
[ RES_OPAQUE
- POOLATTR_BEGIN
] = new SvxOpaqueItem( RES_OPAQUE
);
589 aAttrTab
[ RES_PROTECT
- POOLATTR_BEGIN
] = new SvxProtectItem( RES_PROTECT
);
590 aAttrTab
[ RES_SURROUND
- POOLATTR_BEGIN
] = new SwFormatSurround
;
591 aAttrTab
[ RES_VERT_ORIENT
- POOLATTR_BEGIN
] = new SwFormatVertOrient
;
592 aAttrTab
[ RES_HORI_ORIENT
- POOLATTR_BEGIN
] = new SwFormatHoriOrient
;
593 aAttrTab
[ RES_ANCHOR
- POOLATTR_BEGIN
] = new SwFormatAnchor
;
594 aAttrTab
[ RES_BACKGROUND
- POOLATTR_BEGIN
] = new SvxBrushItem( RES_BACKGROUND
);
595 aAttrTab
[ RES_BOX
- POOLATTR_BEGIN
] = new SvxBoxItem( RES_BOX
);
596 aAttrTab
[ RES_SHADOW
- POOLATTR_BEGIN
] = new SvxShadowItem( RES_SHADOW
);
597 aAttrTab
[ RES_FRMMACRO
- POOLATTR_BEGIN
] = new SvxMacroItem( RES_FRMMACRO
);
598 aAttrTab
[ RES_COL
- POOLATTR_BEGIN
] = new SwFormatCol
;
599 aAttrTab
[ RES_KEEP
- POOLATTR_BEGIN
] = new SvxFormatKeepItem( false, RES_KEEP
);
600 aAttrTab
[ RES_URL
- POOLATTR_BEGIN
] = new SwFormatURL();
601 aAttrTab
[ RES_EDIT_IN_READONLY
- POOLATTR_BEGIN
] = new SwFormatEditInReadonly
;
602 aAttrTab
[ RES_LAYOUT_SPLIT
- POOLATTR_BEGIN
] = new SwFormatLayoutSplit
;
603 aAttrTab
[ RES_CHAIN
- POOLATTR_BEGIN
] = new SwFormatChain
;
604 aAttrTab
[ RES_TEXTGRID
- POOLATTR_BEGIN
] = new SwTextGridItem
;
605 aAttrTab
[ RES_HEADER_FOOTER_EAT_SPACING
- POOLATTR_BEGIN
] = new SwHeaderAndFooterEatSpacingItem
;
606 aAttrTab
[ RES_LINENUMBER
- POOLATTR_BEGIN
] = new SwFormatLineNumber
;
607 aAttrTab
[ RES_FTN_AT_TXTEND
- POOLATTR_BEGIN
] = new SwFormatFootnoteAtTextEnd
;
608 aAttrTab
[ RES_END_AT_TXTEND
- POOLATTR_BEGIN
] = new SwFormatEndAtTextEnd
;
609 aAttrTab
[ RES_COLUMNBALANCE
- POOLATTR_BEGIN
] = new SwFormatNoBalancedColumns
;
610 aAttrTab
[ RES_FRAMEDIR
- POOLATTR_BEGIN
] = new SvxFrameDirectionItem( SvxFrameDirection::Environment
, RES_FRAMEDIR
);
611 aAttrTab
[ RES_ROW_SPLIT
- POOLATTR_BEGIN
] = new SwFormatRowSplit
;
612 aAttrTab
[ RES_FLY_SPLIT
- POOLATTR_BEGIN
] = new SwFormatFlySplit
;
615 aAttrTab
[ RES_FOLLOW_TEXT_FLOW
- POOLATTR_BEGIN
] = new SwFormatFollowTextFlow(false);
616 // collapsing borders #i29550#
617 aAttrTab
[ RES_COLLAPSING_BORDERS
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_COLLAPSING_BORDERS
, false );
619 // #i35017# - constant name has changed
620 aAttrTab
[ RES_WRAP_INFLUENCE_ON_OBJPOS
- POOLATTR_BEGIN
] = new SwFormatWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT
);
622 aAttrTab
[ RES_AUTO_STYLE
- POOLATTR_BEGIN
] = new SwFormatAutoFormat( RES_AUTO_STYLE
);
623 aAttrTab
[ RES_FRMATR_STYLE_NAME
- POOLATTR_BEGIN
] = new SfxStringItem( RES_FRMATR_STYLE_NAME
, OUString());
624 aAttrTab
[ RES_FRMATR_CONDITIONAL_STYLE_NAME
- POOLATTR_BEGIN
] = new SfxStringItem( RES_FRMATR_CONDITIONAL_STYLE_NAME
, OUString() );
625 aAttrTab
[ RES_FRMATR_GRABBAG
- POOLATTR_BEGIN
] = new SfxGrabBagItem(RES_FRMATR_GRABBAG
);
626 aAttrTab
[ RES_TEXT_VERT_ADJUST
- POOLATTR_BEGIN
] = new SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP
,RES_TEXT_VERT_ADJUST
);
627 aAttrTab
[ RES_BACKGROUND_FULL_SIZE
- POOLATTR_BEGIN
] = new SfxBoolItem(RES_BACKGROUND_FULL_SIZE
, true);
628 aAttrTab
[ RES_RTL_GUTTER
- POOLATTR_BEGIN
] = new SfxBoolItem(RES_RTL_GUTTER
, false);
629 aAttrTab
[ RES_DECORATIVE
- POOLATTR_BEGIN
] = new SfxBoolItem(RES_DECORATIVE
, false);
631 aAttrTab
[ RES_GRFATR_MIRRORGRF
- POOLATTR_BEGIN
] = new SwMirrorGrf
;
632 aAttrTab
[ RES_GRFATR_CROPGRF
- POOLATTR_BEGIN
] = new SwCropGrf
;
633 aAttrTab
[ RES_GRFATR_ROTATION
- POOLATTR_BEGIN
] = new SwRotationGrf
;
634 aAttrTab
[ RES_GRFATR_LUMINANCE
- POOLATTR_BEGIN
] = new SwLuminanceGrf
;
635 aAttrTab
[ RES_GRFATR_CONTRAST
- POOLATTR_BEGIN
] = new SwContrastGrf
;
636 aAttrTab
[ RES_GRFATR_CHANNELR
- POOLATTR_BEGIN
] = new SwChannelRGrf
;
637 aAttrTab
[ RES_GRFATR_CHANNELG
- POOLATTR_BEGIN
] = new SwChannelGGrf
;
638 aAttrTab
[ RES_GRFATR_CHANNELB
- POOLATTR_BEGIN
] = new SwChannelBGrf
;
639 aAttrTab
[ RES_GRFATR_GAMMA
- POOLATTR_BEGIN
] = new SwGammaGrf
;
640 aAttrTab
[ RES_GRFATR_INVERT
- POOLATTR_BEGIN
] = new SwInvertGrf
;
641 aAttrTab
[ RES_GRFATR_TRANSPARENCY
- POOLATTR_BEGIN
] = new SwTransparencyGrf
;
642 aAttrTab
[ RES_GRFATR_DRAWMODE
- POOLATTR_BEGIN
] = new SwDrawModeGrf
;
644 // GraphicAttr - Dummies
645 aAttrTab
[ RES_GRFATR_DUMMY3
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY3
);
646 aAttrTab
[ RES_GRFATR_DUMMY4
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY4
);
647 aAttrTab
[ RES_GRFATR_DUMMY5
- POOLATTR_BEGIN
] = new SfxBoolItem( RES_GRFATR_DUMMY5
);
649 aAttrTab
[ RES_BOXATR_FORMAT
- POOLATTR_BEGIN
] = new SwTableBoxNumFormat
;
650 aAttrTab
[ RES_BOXATR_FORMULA
- POOLATTR_BEGIN
] = new SwTableBoxFormula( OUString() );
651 aAttrTab
[ RES_BOXATR_VALUE
- POOLATTR_BEGIN
] = new SwTableBoxValue
;
653 aAttrTab
[ RES_UNKNOWNATR_CONTAINER
- POOLATTR_BEGIN
] =
654 new SvXMLAttrContainerItem( RES_UNKNOWNATR_CONTAINER
);
656 // get the correct fonts:
657 ::GetDefaultFonts( (aAttrTab
[ RES_CHRATR_FONT
- POOLATTR_BEGIN
])->StaticWhichCast(RES_CHRATR_FONT
),
658 (aAttrTab
[ RES_CHRATR_CJK_FONT
- POOLATTR_BEGIN
])->StaticWhichCast(RES_CHRATR_CJK_FONT
),
659 (aAttrTab
[ RES_CHRATR_CTL_FONT
- POOLATTR_BEGIN
])->StaticWhichCast(RES_CHRATR_CTL_FONT
) );
661 SwBreakIt::Create_( ::comphelper::getProcessComponentContext() );
667 SwSelPaintRects::s_pMapMode
= new MapMode
;
668 SwFntObj::s_pPixMap
= new MapMode
;
670 pGlobalOLEExcludeList
= new std::vector
<SvGlobalName
>;
672 if (!utl::ConfigManager::IsFuzzing())
674 const SvxSwAutoFormatFlags
& rAFlags
= SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
675 SwDoc::s_pAutoCompleteWords
= new SwAutoCompleteWord( rAFlags
.nAutoCmpltListLen
,
676 rAFlags
.nAutoCmpltWordLen
);
680 SwDoc::s_pAutoCompleteWords
= new SwAutoCompleteWord( 0, 0 );
689 sw::proofreadingiterator::dispose();
690 SwBreakIt::Delete_();
692 delete pAppCharClass
;
694 delete pCaseCollator
;
696 // destroy default TableAutoFormat
697 delete SwTableAutoFormat::s_pDefaultBoxAutoFormat
;
699 delete SwSelPaintRects::s_pMapMode
;
700 delete SwFntObj::s_pPixMap
;
702 delete SwEditShell::s_pAutoFormatFlags
;
704 #if OSL_DEBUG_LEVEL > 0
705 // free defaults to prevent assertions
706 if ( aAttrTab
[0]->GetRefCount() )
707 SfxItemPool::ReleaseDefaults( &aAttrTab
);
709 delete SwDoc::s_pAutoCompleteWords
;
711 // delete all default attributes
712 for(SfxPoolItem
* pHt
: aAttrTab
)
717 delete pGlobalOLEExcludeList
;
720 // returns the APP - CharClass instance - used for all ToUpper/ToLower/...
721 CharClass
& GetAppCharClass()
723 if ( !pAppCharClass
)
725 pAppCharClass
= new CharClass(
726 ::comphelper::getProcessComponentContext(),
727 SwBreakIt::Get()->GetLanguageTag( GetAppLanguageTag() ));
729 return *pAppCharClass
;
732 void SwCalendarWrapper::LoadDefaultCalendar( LanguageType eLang
)
734 if( eLang
!= m_nLang
)
737 loadDefaultCalendar( LanguageTag::convertToLocale( m_nLang
));
741 LanguageType
GetAppLanguage()
743 if (!utl::ConfigManager::IsFuzzing())
744 return Application::GetSettings().GetLanguageTag().getLanguageType();
745 return LANGUAGE_ENGLISH_US
;
748 const LanguageTag
& GetAppLanguageTag()
750 return Application::GetSettings().GetLanguageTag();
753 CollatorWrapper
& GetAppCollator()
757 const lang::Locale
& rLcl
= g_pBreakIt
->GetLocale( GetAppLanguage() );
759 pCollator
= new CollatorWrapper( ::comphelper::getProcessComponentContext() );
760 pCollator
->loadDefaultCollator( rLcl
, SW_COLLATOR_IGNORES
);
765 CollatorWrapper
& GetAppCaseCollator()
769 const lang::Locale
& rLcl
= g_pBreakIt
->GetLocale( GetAppLanguage() );
771 pCaseCollator
= new CollatorWrapper( ::comphelper::getProcessComponentContext() );
772 pCaseCollator
->loadDefaultCollator( rLcl
, 0 );
774 return *pCaseCollator
;
782 std::unique_ptr
<utl::TransliterationWrapper
> m_xTransWrp
;
786 uno::Reference
< uno::XComponentContext
> xContext
= ::comphelper::getProcessComponentContext();
788 m_xTransWrp
.reset(new ::utl::TransliterationWrapper( xContext
,
789 TransliterationFlags::IGNORE_CASE
|
790 TransliterationFlags::IGNORE_KANA
|
791 TransliterationFlags::IGNORE_WIDTH
));
793 m_xTransWrp
->loadModuleIfNeeded( GetAppLanguage() );
795 const ::utl::TransliterationWrapper
& getTransliterationWrapper() const
802 const ::utl::TransliterationWrapper
& GetAppCmpStrIgnore()
804 static TransWrp theTransWrp
;
805 return theTransWrp
.getTransliterationWrapper();
808 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */