1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SW_INC_HINTIDS_HXX
#define INCLUDED_SW_INC_HINTIDS_HXX
#include <sal/types.h>
#include <svx/xdef.hxx>
#include "swdllapi.h"
#include <svl/typedwhich.hxx>
#include <vector>
class SfxStringItem;
class SwFormatChg;
class SwUpdateAttr;
class SwAttrSetChg;
class SwDocPosUpdate;
class SwFormatMeta;
class SvXMLAttrContainerItem;
class SwMsgPoolItem;
class SwPtrMsgPoolItem;
class SfxBoolItem;
class SvxColorItem;
class SvxLRSpaceItem;
class SdrTextVertAdjustItem;
class SfxGrabBagItem;
class SfxInt16Item;
class SfxUInt16Item;
class SvxAdjustItem;
class SvxAutoKernItem;
class SvxBlinkItem;
class SvxBoxItem;
class SvxBrushItem;
class SvxCaseMapItem;
class SvxCharHiddenItem;
class SvxCharReliefItem;
class SvxCharRotateItem;
class SvxCharScaleWidthItem;
class SvxContourItem;
class SvxCrossedOutItem;
class SvxEmphasisMarkItem;
class SvxEscapementItem;
class SvxFontHeightItem;
class SvxFontItem;
class SvxForbiddenRuleItem;
class SvxFormatBreakItem;
class SvxFormatKeepItem;
class SvxFormatSplitItem;
class SvxFrameDirectionItem;
class SvxHangingPunctuationItem;
class SvxHyphenZoneItem;
class SvxKerningItem;
class SvxLanguageItem;
class SvxLineSpacingItem;
class SvxNoHyphenItem;
class SvxOpaqueItem;
class SvxOrphansItem;
class SvxOverlineItem;
class SvxPaperBinItem;
class SvxParaGridItem;
class SvxParaVertAlignItem;
class SvxPostureItem;
class SvxPrintItem;
class SvxProtectItem;
class SvxRsidItem;
class SvxScriptSpaceItem;
class SvxShadowedItem;
class SvxShadowItem;
class SvxTabStopItem;
class SvxTwoLinesItem;
class SvxULSpaceItem;
class SvxUnderlineItem;
class SvxWeightItem;
class SvxWidowsItem;
class SvxWordLineModeItem;
class SwChannelBGrf;
class SwChannelGGrf;
class SwChannelRGrf;
class SwContrastGrf;
class SwCropGrf;
class SwDrawModeGrf;
class SwFormatAnchor;
class SwFormatAutoFormat;
class SwFormatChain;
class SwFormatCharFormat;
class SwFormatCol;
class SwFormatDrop;
class SwFormatEditInReadonly;
class SwFormatEndAtTextEnd;
class SwFormatFlyCnt;
class SwFormatFollowTextFlow;
class SwFormatFootnoteAtTextEnd;
class SwFormatFrameSize;
class SwFormatHoriOrient;
class SwFormatINetFormat;
class SwFormatLayoutSplit;
class SwFormatLineNumber;
class SwFormatNoBalancedColumns;
class SwFormatPageDesc;
class SwFormatRowSplit;
class SwFormatSurround;
class SwFormatURL;
class SwFormatVertOrient;
class SwFormatWrapInfluenceOnObjPos;
class SwGammaGrf;
class SwHeaderAndFooterEatSpacingItem;
class SwInvertGrf;
class SwLuminanceGrf;
class SwMirrorGrf;
class SwNumRuleItem;
class SwParaConnectBorderItem;
class SwRegisterItem;
class SwRotationGrf;
class SwTableBoxNumFormat;
class SwTextGridItem;
class SwTransparencyGrf;
class SwFormatRuby;
class SwInsText;
class SwDelChr;
class SwDelText;
class SwRefMarkFieldUpdate;
class SwTableFormulaUpdate;
class SwAutoFormatGetDocNode;
class SwCondCollCondChg;
class SwVirtPageNumInfo;
class SwFindNearestNode;
class SwStringMsgPoolItem;
class SwFltAnchor;
class SwFltTOX;
class SwFltRedline;
class SwFltRDFMark;
class SwCharFormat;
class SwConditionTextFormatColl;
class SwDrawFrameFormat;
class SwFlyFrameFormat;
class SwFormatField;
class SwFormatFootnote;
class SwFormatRefMark;
class SwGrfFormatColl;
class SwTextFormatColl;
class SwTOXMark;
class CntUInt16Item;
class SwFormatFillOrder;
class SwFormatHeader;
class SwFormatFooter;
class SwFormatContent;
class SvxMacroItem;
class SwTableBoxFormula;
class SwTableBoxValue;
class SwFrameFormat;
class SfxVoidItem;
// For SwTextHints without end index the following char is added:
#define CH_TXTATR_BREAKWORD u'\x0001'
#define CH_TXTATR_INWORD u'\xFFF9'
#define CH_TXTATR_TAB u'\t'
#define CH_TXTATR_NEWLINE u'\n'
#define CH_TXT_ATR_INPUTFIELDSTART u'\x0004'
#define CH_TXT_ATR_INPUTFIELDEND u'\x0005'
#define CH_TXT_ATR_FORMELEMENT u'\x0006'
#define CH_TXT_ATR_FIELDSTART u'\x0007'
#define CH_TXT_ATR_FIELDSEP u'\x0003'
#define CH_TXT_ATR_FIELDEND u'\x0008'
#define CH_TXT_ATR_SUBST_FIELDSTART ("[")
#define CH_TXT_ATR_SUBST_FIELDEND ("]")
/*
* Enums for the hints
*/
constexpr sal_uInt16 HINT_BEGIN = 1;
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN);
// Ranges for the IDs of the format-attributes.
// Which-values for character-format attributes.
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN);
constexpr TypedWhichId<SvxCaseMapItem> RES_CHRATR_CASEMAP (RES_CHRATR_BEGIN); // 1
constexpr TypedWhichId<SvxColorItem> RES_CHRATR_CHARSETCOLOR (2);
constexpr TypedWhichId<SvxColorItem> RES_CHRATR_COLOR (3);
constexpr TypedWhichId<SvxContourItem> RES_CHRATR_CONTOUR (4);
constexpr TypedWhichId<SvxCrossedOutItem> RES_CHRATR_CROSSEDOUT (5);
constexpr TypedWhichId<SvxEscapementItem> RES_CHRATR_ESCAPEMENT (6);
constexpr TypedWhichId<SvxFontItem> RES_CHRATR_FONT (7);
constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_FONTSIZE (8);
constexpr TypedWhichId<SvxKerningItem> RES_CHRATR_KERNING (9);
constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_LANGUAGE (10);
constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_POSTURE (11);
constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED1 (12);
constexpr TypedWhichId<SvxShadowedItem> RES_CHRATR_SHADOWED (13);
constexpr TypedWhichId<SvxUnderlineItem> RES_CHRATR_UNDERLINE (14);
constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_WEIGHT (15);
constexpr TypedWhichId<SvxWordLineModeItem> RES_CHRATR_WORDLINEMODE (16);
constexpr TypedWhichId<SvxAutoKernItem> RES_CHRATR_AUTOKERN (17);
constexpr TypedWhichId<SvxBlinkItem> RES_CHRATR_BLINK (18);
constexpr TypedWhichId<SvxNoHyphenItem> RES_CHRATR_NOHYPHEN (19);
constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED2 (20);
constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_BACKGROUND (21);
constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CJK_FONT (22);
constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CJK_FONTSIZE (23);
constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CJK_LANGUAGE (24);
constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CJK_POSTURE (25);
constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CJK_WEIGHT (26);
constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CTL_FONT (27);
constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CTL_FONTSIZE (28);
constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CTL_LANGUAGE (29);
constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CTL_POSTURE (30);
constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CTL_WEIGHT (31);
constexpr TypedWhichId<SvxCharRotateItem> RES_CHRATR_ROTATE (32);
constexpr TypedWhichId<SvxEmphasisMarkItem> RES_CHRATR_EMPHASIS_MARK (33);
constexpr TypedWhichId<SvxTwoLinesItem> RES_CHRATR_TWO_LINES (34);
constexpr TypedWhichId<SvxCharScaleWidthItem> RES_CHRATR_SCALEW (35);
constexpr TypedWhichId<SvxCharReliefItem> RES_CHRATR_RELIEF (36);
constexpr TypedWhichId<SvxCharHiddenItem> RES_CHRATR_HIDDEN (37);
constexpr TypedWhichId<SvxOverlineItem> RES_CHRATR_OVERLINE (38);
constexpr TypedWhichId<SvxRsidItem> RES_CHRATR_RSID (39);
constexpr TypedWhichId<SvxBoxItem> RES_CHRATR_BOX (40);
constexpr TypedWhichId<SvxShadowItem> RES_CHRATR_SHADOW (41);
constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_HIGHLIGHT (42);
constexpr TypedWhichId<SfxGrabBagItem> RES_CHRATR_GRABBAG (43);
constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_BIDIRTL (44);
constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_IDCTHINT (45);
constexpr sal_uInt16 RES_CHRATR_END(46);
// this Attribute used only in a TextNodes SwpAttr-Array
constexpr sal_uInt16 RES_TXTATR_BEGIN(RES_CHRATR_END);
/** text attributes with start and end.
#i105453#:
Hints (SwTextAttr) with the same start and end position are sorted by
WhichId, i.e., the TXTATR constants defined here.
The text formatting (SwAttrIter) poses some requirements on TXTATR order:
- AUTOFMT must precede CHARFMT, so that auto style can overwrite char style.
- INETFMT must precede CHARFMT, so that link style can overwrite char style.
(this is actually surprising: CHARFMT hints are not split at INETFMT
hints on insertion, but on exporting to ODF. if CHARFMT would precede
INETFMT, then exporting and importing will effectively change precedence)
Nesting hints (SwTextAttrNesting) also have requirements on TXTATR order,
to ensure proper nesting (because CJK_RUBY and INETFMT have no CH_TXTATR):
- INETFMT should precede CJK_RUBY (for UNO API it does not matter...)
- META and METAFIELD must precede CJK_RUBY and INETFMT
*/
constexpr sal_uInt16 RES_TXTATR_WITHEND_BEGIN(RES_TXTATR_BEGIN);
constexpr TypedWhichId<SwFormatRefMark> RES_TXTATR_REFMARK (RES_TXTATR_WITHEND_BEGIN); // 46
constexpr TypedWhichId<SwTOXMark> RES_TXTATR_TOXMARK (47);
constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_META (48);
constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_METAFIELD (49);
constexpr TypedWhichId<SwFormatAutoFormat> RES_TXTATR_AUTOFMT (50);
constexpr TypedWhichId<SwFormatINetFormat> RES_TXTATR_INETFMT (51);
constexpr TypedWhichId<SwFormatCharFormat> RES_TXTATR_CHARFMT (52);
constexpr TypedWhichId<SwFormatRuby> RES_TXTATR_CJK_RUBY (53);
constexpr TypedWhichId<SvXMLAttrContainerItem> RES_TXTATR_UNKNOWN_CONTAINER (54);
constexpr TypedWhichId<SwFormatField> RES_TXTATR_INPUTFIELD (55);
constexpr sal_uInt16 RES_TXTATR_WITHEND_END(56);
// all TextAttributes without an end
constexpr sal_uInt16 RES_TXTATR_NOEND_BEGIN(RES_TXTATR_WITHEND_END);
constexpr TypedWhichId<SwFormatField> RES_TXTATR_FIELD (RES_TXTATR_NOEND_BEGIN); // 56
constexpr TypedWhichId<SwFormatFlyCnt> RES_TXTATR_FLYCNT (57);
constexpr TypedWhichId<SwFormatFootnote> RES_TXTATR_FTN (58);
constexpr TypedWhichId<SwFormatField> RES_TXTATR_ANNOTATION (59);
constexpr TypedWhichId<SfxBoolItem> RES_TXTATR_DUMMY3 (60);
constexpr TypedWhichId<SfxBoolItem> RES_TXTATR_DUMMY1 (61);
constexpr TypedWhichId<SfxBoolItem> RES_TXTATR_DUMMY2 (62);
constexpr sal_uInt16 RES_TXTATR_NOEND_END(63);
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END);
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END);
constexpr TypedWhichId<SvxLineSpacingItem> RES_PARATR_LINESPACING (RES_PARATR_BEGIN); // 63
constexpr TypedWhichId<SvxAdjustItem> RES_PARATR_ADJUST (64);
constexpr TypedWhichId<SvxFormatSplitItem> RES_PARATR_SPLIT (65);
constexpr TypedWhichId<SvxOrphansItem> RES_PARATR_ORPHANS (66);
constexpr TypedWhichId<SvxWidowsItem> RES_PARATR_WIDOWS (67);
constexpr TypedWhichId<SvxTabStopItem> RES_PARATR_TABSTOP (68);
constexpr TypedWhichId<SvxHyphenZoneItem> RES_PARATR_HYPHENZONE (69);
constexpr TypedWhichId<SwFormatDrop> RES_PARATR_DROP (70);
constexpr TypedWhichId<SwRegisterItem> RES_PARATR_REGISTER (71);
constexpr TypedWhichId<SwNumRuleItem> RES_PARATR_NUMRULE (72);
constexpr TypedWhichId<SvxScriptSpaceItem> RES_PARATR_SCRIPTSPACE (73);
constexpr TypedWhichId<SvxHangingPunctuationItem> RES_PARATR_HANGINGPUNCTUATION (74);
constexpr TypedWhichId<SvxForbiddenRuleItem> RES_PARATR_FORBIDDEN_RULES (75);
constexpr TypedWhichId<SvxParaVertAlignItem> RES_PARATR_VERTALIGN (76);
constexpr TypedWhichId<SvxParaGridItem> RES_PARATR_SNAPTOGRID (77);
constexpr TypedWhichId<SwParaConnectBorderItem> RES_PARATR_CONNECT_BORDER (78);
constexpr TypedWhichId<SfxUInt16Item> RES_PARATR_OUTLINELEVEL (79);
constexpr TypedWhichId<SvxRsidItem> RES_PARATR_RSID (80);
constexpr TypedWhichId<SfxGrabBagItem> RES_PARATR_GRABBAG (81);
constexpr sal_uInt16 RES_PARATR_END(82);
// list attributes for paragraphs.
// intentionally these list attributes are not contained in paragraph styles
constexpr sal_uInt16 RES_PARATR_LIST_BEGIN(RES_PARATR_END);
constexpr TypedWhichId<SfxStringItem> RES_PARATR_LIST_ID (RES_PARATR_LIST_BEGIN); // 82
constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_LEVEL (83);
constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISRESTART (84);
constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_RESTARTVALUE (85);
constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISCOUNTED (86);
constexpr TypedWhichId<SwFormatAutoFormat> RES_PARATR_LIST_AUTOFMT (87);//TypedWhichId<SfxSetItem>(87)
constexpr sal_uInt16 RES_PARATR_LIST_END(88);
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END);
constexpr TypedWhichId<SwFormatFillOrder> RES_FILL_ORDER (RES_FRMATR_BEGIN);
constexpr TypedWhichId<SwFormatFrameSize> RES_FRM_SIZE (89);
constexpr TypedWhichId<SvxPaperBinItem> RES_PAPER_BIN (90);
constexpr TypedWhichId<SvxLRSpaceItem> RES_LR_SPACE (91);
constexpr TypedWhichId<SvxULSpaceItem> RES_UL_SPACE (92);
constexpr TypedWhichId<SwFormatPageDesc> RES_PAGEDESC (93);
constexpr TypedWhichId<SvxFormatBreakItem> RES_BREAK (94);
constexpr TypedWhichId<SwFormatContent> RES_CNTNT (95);
constexpr TypedWhichId<SwFormatHeader> RES_HEADER (96);
constexpr TypedWhichId<SwFormatFooter> RES_FOOTER (97);
constexpr TypedWhichId<SvxPrintItem> RES_PRINT (98);
constexpr TypedWhichId<SvxOpaqueItem> RES_OPAQUE (99);
constexpr TypedWhichId<SvxProtectItem> RES_PROTECT (100);
constexpr TypedWhichId<SwFormatSurround> RES_SURROUND (101);
constexpr TypedWhichId<SwFormatVertOrient> RES_VERT_ORIENT (102);
constexpr TypedWhichId<SwFormatHoriOrient> RES_HORI_ORIENT (103);
constexpr TypedWhichId<SwFormatAnchor> RES_ANCHOR (104);
constexpr TypedWhichId<SvxBrushItem> RES_BACKGROUND (105);
constexpr TypedWhichId<SvxBoxItem> RES_BOX (106);
constexpr TypedWhichId<SvxShadowItem> RES_SHADOW (107);
constexpr TypedWhichId<SvxMacroItem> RES_FRMMACRO (108);
constexpr TypedWhichId<SwFormatCol> RES_COL (109);
constexpr TypedWhichId<SvxFormatKeepItem> RES_KEEP (110);
constexpr TypedWhichId<SwFormatURL> RES_URL (111);
constexpr TypedWhichId<SwFormatEditInReadonly> RES_EDIT_IN_READONLY (112);
constexpr TypedWhichId<SwFormatLayoutSplit> RES_LAYOUT_SPLIT (113);
constexpr TypedWhichId<SwFormatChain> RES_CHAIN (114);
constexpr TypedWhichId<SwTextGridItem> RES_TEXTGRID (115);
constexpr TypedWhichId<SwFormatLineNumber> RES_LINENUMBER (116);
constexpr TypedWhichId<SwFormatFootnoteAtTextEnd> RES_FTN_AT_TXTEND (117);
constexpr TypedWhichId<SwFormatEndAtTextEnd> RES_END_AT_TXTEND (118);
constexpr TypedWhichId<SwFormatNoBalancedColumns> RES_COLUMNBALANCE (119);
constexpr TypedWhichId<SvxFrameDirectionItem> RES_FRAMEDIR (120);
constexpr TypedWhichId<SwHeaderAndFooterEatSpacingItem> RES_HEADER_FOOTER_EAT_SPACING (121);
constexpr TypedWhichId<SwFormatRowSplit> RES_ROW_SPLIT (122);
constexpr TypedWhichId<SwFormatFollowTextFlow> RES_FOLLOW_TEXT_FLOW (123);
constexpr TypedWhichId<SfxBoolItem> RES_COLLAPSING_BORDERS (124);
constexpr TypedWhichId<SwFormatWrapInfluenceOnObjPos> RES_WRAP_INFLUENCE_ON_OBJPOS (125);
constexpr TypedWhichId<SwFormatAutoFormat> RES_AUTO_STYLE (126);
constexpr TypedWhichId<SfxStringItem> RES_FRMATR_STYLE_NAME (127);
constexpr TypedWhichId<SfxStringItem> RES_FRMATR_CONDITIONAL_STYLE_NAME (128);
constexpr TypedWhichId<SfxGrabBagItem> RES_FRMATR_GRABBAG (129);
constexpr TypedWhichId<SdrTextVertAdjustItem> RES_TEXT_VERT_ADJUST (130);
constexpr sal_uInt16 RES_FRMATR_END(131);
constexpr sal_uInt16 RES_GRFATR_BEGIN(RES_FRMATR_END);
constexpr TypedWhichId<SwMirrorGrf> RES_GRFATR_MIRRORGRF (RES_GRFATR_BEGIN); // 131
constexpr TypedWhichId<SwCropGrf> RES_GRFATR_CROPGRF (132);
constexpr TypedWhichId<SwRotationGrf> RES_GRFATR_ROTATION (133);
constexpr TypedWhichId<SwLuminanceGrf> RES_GRFATR_LUMINANCE (134);
constexpr TypedWhichId<SwContrastGrf> RES_GRFATR_CONTRAST (135);
constexpr TypedWhichId<SwChannelRGrf> RES_GRFATR_CHANNELR (136);
constexpr TypedWhichId<SwChannelGGrf> RES_GRFATR_CHANNELG (137);
constexpr TypedWhichId<SwChannelBGrf> RES_GRFATR_CHANNELB (138);
constexpr TypedWhichId<SwGammaGrf> RES_GRFATR_GAMMA (139);
constexpr TypedWhichId<SwInvertGrf> RES_GRFATR_INVERT (140);
constexpr TypedWhichId<SwTransparencyGrf> RES_GRFATR_TRANSPARENCY (141);
constexpr TypedWhichId<SwDrawModeGrf> RES_GRFATR_DRAWMODE (142);
constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY1 (143);
constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY2 (144);
constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY3 (145);
constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY4 (146);
constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY5 (147);
constexpr sal_uInt16 RES_GRFATR_END(148);
constexpr sal_uInt16 RES_BOXATR_BEGIN(RES_GRFATR_END);
constexpr TypedWhichId<SwTableBoxNumFormat> RES_BOXATR_FORMAT (RES_BOXATR_BEGIN); // 148
constexpr TypedWhichId<SwTableBoxFormula> RES_BOXATR_FORMULA (149);
constexpr TypedWhichId<SwTableBoxValue> RES_BOXATR_VALUE (150);
constexpr sal_uInt16 RES_BOXATR_END(151);
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END);
constexpr TypedWhichId<SvXMLAttrContainerItem> RES_UNKNOWNATR_CONTAINER (RES_UNKNOWNATR_BEGIN);// 151
constexpr sal_uInt16 RES_UNKNOWNATR_END(152);
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END);
// Format IDs
constexpr sal_uInt16 RES_FMT_BEGIN(RES_UNKNOWNATR_END);
constexpr TypedWhichId<SwCharFormat> RES_CHRFMT (RES_FMT_BEGIN); // 152
constexpr TypedWhichId<SwFrameFormat> RES_FRMFMT (153);
constexpr TypedWhichId<SwFlyFrameFormat> RES_FLYFRMFMT (154);
constexpr TypedWhichId<SwTextFormatColl> RES_TXTFMTCOLL (155);
constexpr TypedWhichId<SwGrfFormatColl> RES_GRFFMTCOLL (156);
constexpr TypedWhichId<SwDrawFrameFormat> RES_DRAWFRMFMT (157);
constexpr TypedWhichId<SwConditionTextFormatColl> RES_CONDTXTFMTCOLL (158);
constexpr sal_uInt16 RES_FMT_END(159);
// ID's for Messages in the Formats
constexpr sal_uInt16 RES_MSG_BEGIN(RES_FMT_END);
constexpr TypedWhichId<SwPtrMsgPoolItem> RES_OBJECTDYING (RES_MSG_BEGIN); // 159
constexpr TypedWhichId<SwFormatChg> RES_FMT_CHG (160);
constexpr TypedWhichId<SwAttrSetChg> RES_ATTRSET_CHG (161);
constexpr TypedWhichId<SwInsText> RES_INS_TXT (162);
constexpr TypedWhichId<SwDelChr> RES_DEL_CHR (163);
constexpr TypedWhichId<SwDelText> RES_DEL_TXT (164);
constexpr TypedWhichId<SwUpdateAttr> RES_UPDATE_ATTR (165);
constexpr TypedWhichId<SwRefMarkFieldUpdate> RES_REFMARKFLD_UPDATE (166);
constexpr TypedWhichId<SwDocPosUpdate> RES_DOCPOS_UPDATE (167);
constexpr TypedWhichId<SwTableFormulaUpdate> RES_TABLEFML_UPDATE (168);
constexpr TypedWhichId<SwMsgPoolItem> RES_UPDATEDDETBL (169);
constexpr TypedWhichId<SwMsgPoolItem> RES_TBLHEADLINECHG (170);
constexpr TypedWhichId<SwAutoFormatGetDocNode> RES_AUTOFMT_DOCNODE (171);
constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_HIDDEN (172);
constexpr TypedWhichId<SwMsgPoolItem> RES_SECTION_NOT_HIDDEN (173);
constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_ARRIVED (174);
constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_PIECE_ARRIVED (175);
constexpr TypedWhichId<SwMsgPoolItem> RES_HIDDENPARA_PRINT (176);
constexpr TypedWhichId<SwCondCollCondChg> RES_CONDCOLL_CONDCHG (177);
constexpr TypedWhichId<SwVirtPageNumInfo> RES_VIRTPAGENUM_INFO (178);
constexpr TypedWhichId<SwPtrMsgPoolItem> RES_REMOVE_UNO_OBJECT (179);
constexpr TypedWhichId<SwMsgPoolItem> RES_GRF_REREAD_AND_INCACHE (180);
// empty
constexpr TypedWhichId<SwFindNearestNode> RES_FINDNEARESTNODE (182);
constexpr TypedWhichId<SwPtrMsgPoolItem> RES_CONTENT_VISIBLE (183);
constexpr TypedWhichId<SwMsgPoolItem> RES_GRAPHIC_SWAPIN (184);
constexpr TypedWhichId<SwStringMsgPoolItem> RES_NAME_CHANGED (185);
constexpr TypedWhichId<SwStringMsgPoolItem> RES_TITLE_CHANGED (186);
constexpr TypedWhichId<SwStringMsgPoolItem> RES_DESCRIPTION_CHANGED (187);
constexpr TypedWhichId<SwMsgPoolItem> RES_LINKED_GRAPHIC_STREAM_ARRIVED (187);
constexpr sal_uInt16 RES_MSG_END(188);
// An ID for the RTF-reader. The stylesheets are treated like attributes,
// i.e. there is a StyleSheet-attribute. To avoid collision with other
// Which()-values, the value is listed here. (The help system too defines
// new attributes!)
constexpr sal_uInt16 RES_FLTRATTR_BEGIN(RES_MSG_END);
constexpr TypedWhichId<SfxStringItem> RES_FLTR_BOOKMARK (RES_FLTRATTR_BEGIN);
constexpr TypedWhichId<SwFltAnchor> RES_FLTR_ANCHOR (189);
constexpr TypedWhichId<SfxStringItem> RES_FLTR_NUMRULE (190);
constexpr TypedWhichId<SwFltTOX> RES_FLTR_TOX (191);
constexpr TypedWhichId<SwFltRedline> RES_FLTR_REDLINE (192);
constexpr TypedWhichId<CntUInt16Item> RES_FLTR_ANNOTATIONMARK (193);
constexpr TypedWhichId<SwFltRDFMark> RES_FLTR_RDFMARK (194);
constexpr sal_uInt16 RES_FLTRATTR_END(195);
constexpr sal_uInt16 RES_TBX_DUMMY(RES_FLTRATTR_END + 1);
constexpr sal_uInt16 HINT_END(RES_TBX_DUMMY);
// Error recognition!!
constexpr sal_uInt16 INVALID_HINT(HINT_END);
constexpr sal_uInt16 RES_WHICHHINT_END(HINT_END);
inline bool isATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
inline bool isCHRATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
}
inline bool isTXTATR_WITHEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
&& (RES_TXTATR_WITHEND_END > nWhich);
}
inline bool isTXTATR_NOEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_NOEND_BEGIN <= nWhich)
&& (RES_TXTATR_NOEND_END > nWhich);
}
inline bool isTXTATR(const sal_uInt16 nWhich)
{
return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
}
inline bool isPARATR(const sal_uInt16 nWhich)
{
return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
}
inline bool isPARATR_LIST(const sal_uInt16 nWhich)
{
return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich);
}
inline bool isFRMATR(const sal_uInt16 nWhich)
{
return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
}
inline bool isDrawingLayerAttribute(const sal_uInt16 nWhich)
{
return (XATTR_START <= nWhich) && (XATTR_END > nWhich);
}
inline bool isGRFATR(const sal_uInt16 nWhich)
{
return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
}
inline bool isBOXATR(const sal_uInt16 nWhich)
{
return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
}
inline bool isUNKNOWNATR(const sal_uInt16 nWhich)
{
return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
// Take the respective default attribute from the statistical default
// attributes table over the Which-value.
// If none exists, return a 0 pointer!!!
// This function is implemented in Init.cxx. It is declared here as external
// in order to allow the formats to access it.
// Inline in PRODUCT.
class SfxPoolItem;
struct SfxItemInfo;
typedef std::vector<SfxPoolItem*> SwDfltAttrTab;
extern SwDfltAttrTab aAttrTab;
extern SfxItemInfo aSlotTab[];
/** Get the default attribute from corresponding default attribute table.
@param[in] nWhich Position in table
@return Attribute if found, null pointer otherwise
*/
SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich );
template<class T> inline const T* GetDfltAttr( TypedWhichId<T> nWhich )
{ return static_cast<const T*>(GetDfltAttr(sal_uInt16(nWhich))); }
SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript );
// return for the given TextAttribute without an end the correct character.
// This function returns
// CH_TXTATR_BREAKWORD for Textattribute which breaks a word (default)
// CH_TXTATR_INWORD for Textattribute which doesn't breaks a word
class SwTextAttr;
sal_Unicode GetCharOfTextAttr( const SwTextAttr& rAttr );
// all Sets defined in init.cxx
// AttrSet-Range for the 3 Break-Attribute
extern sal_uInt16 const aBreakSetRange[];
// AttrSet-Range for TextFormatColl
extern sal_uInt16 const aTextFormatCollSetRange[];
// AttrSet-Range for GrfFormatColl
extern sal_uInt16 const aGrfFormatCollSetRange[];
// AttrSet-Range for TextNode
SW_DLLPUBLIC extern sal_uInt16 const aTextNodeSetRange[];
// AttrSet-Range for NoTextNode
extern sal_uInt16 const aNoTextNodeSetRange[];
// AttrSet-Range for SwTable
extern sal_uInt16 const aTableSetRange[];
// AttrSet-Range for SwTableLine
extern sal_uInt16 const aTableLineSetRange[];
// AttrSet-Range for SwTableBox
extern sal_uInt16 const aTableBoxSetRange[];
// AttrSet-Range for SwFrameFormat
SW_DLLPUBLIC extern sal_uInt16 const aFrameFormatSetRange[];
// AttrSet-Range for SwCharFormat
extern sal_uInt16 const aCharFormatSetRange[];
// AttrSet-Range for the autostyles
extern sal_uInt16 const aCharAutoFormatSetRange[];
// AttrSet-Range for SwPageDescFormat
extern sal_uInt16 const aPgFrameFormatSetRange[];
// check if ID is InRange of AttrSet-Ids
bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|