LibreOffice Module sw (master)  1
init.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <memory>
21 #include <acmplwrd.hxx>
22 #include <breakit.hxx>
23 #include <cellatr.hxx>
24 #include <checkit.hxx>
25 #include <cmdid.h>
26 #include <fesh.hxx>
28 #include <doc.hxx>
29 #include <editeng/acorrcfg.hxx>
30 #include <editeng/autokernitem.hxx>
31 #include <editeng/blinkitem.hxx>
32 #include <editeng/boxitem.hxx>
33 #include <editeng/brushitem.hxx>
39 #include <editeng/cmapitem.hxx>
40 #include <editeng/colritem.hxx>
41 #include <editeng/contouritem.hxx>
45 #include <editeng/fontitem.hxx>
46 #include <editeng/fhgtitem.hxx>
48 #include <editeng/frmdiritem.hxx>
49 #include <editeng/hngpnctitem.hxx>
51 #include <editeng/keepitem.hxx>
52 #include <editeng/kernitem.hxx>
53 #include <editeng/langitem.hxx>
54 #include <editeng/lrspitem.hxx>
55 #include <editeng/lspcitem.hxx>
56 #include <editeng/nhypitem.hxx>
57 #include <editeng/opaqitem.hxx>
58 #include <editeng/orphitem.hxx>
60 #include <editeng/pbinitem.hxx>
61 #include <editeng/pgrditem.hxx>
62 #include <editeng/prntitem.hxx>
63 #include <editeng/protitem.hxx>
64 #include <editeng/postitem.hxx>
65 #include <editeng/rsiditem.hxx>
66 #include <svl/grabbagitem.hxx>
68 #include <editeng/shaditem.hxx>
69 #include <editeng/shdditem.hxx>
70 #include <editeng/spltitem.hxx>
71 #include <editeng/svxacorr.hxx>
72 #include <editeng/swafopt.hxx>
73 #include <editeng/tstpitem.hxx>
74 #include <editeng/twolinesitem.hxx>
75 #include <editeng/ulspitem.hxx>
76 #include <editeng/udlnitem.hxx>
77 #include <editeng/unolingu.hxx>
78 #include <editeng/wghtitem.hxx>
79 #include <editeng/widwitem.hxx>
80 #include <editeng/wrlmitem.hxx>
81 #include <editeng/xmlcnitm.hxx>
82 #include <editsh.hxx>
83 #include <fchrfmt.hxx>
84 #include <fmtanchr.hxx>
85 #include <fmtautofmt.hxx>
86 #include <fmtclbl.hxx>
87 #include <fmtclds.hxx>
88 #include <fmtcnct.hxx>
89 #include <fmtcntnt.hxx>
90 #include <fmteiro.hxx>
91 #include <fmtflcnt.hxx>
92 #include <fmtfld.hxx>
93 #include <fmtfollowtextflow.hxx>
94 #include <fmtfordr.hxx>
95 #include <fmtfsize.hxx>
96 #include <fmtftn.hxx>
97 #include <fmtftntx.hxx>
98 #include <fmthdft.hxx>
99 #include <fmtinfmt.hxx>
100 #include <fmtline.hxx>
101 #include <fmtlsplt.hxx>
102 #include <fmtmeta.hxx>
103 #include <fmtornt.hxx>
104 #include <fmtpdsc.hxx>
105 #include <fmtrfmrk.hxx>
106 #include <fmtrowsplt.hxx>
107 #include <fmtruby.hxx>
108 #include <fmtsrnd.hxx>
109 #include <fmturl.hxx>
111 #include <fntcache.hxx>
112 #include <grfatr.hxx>
113 #include <hfspacingitem.hxx>
114 #include <hintids.hxx>
115 #include <init.hxx>
116 #include <pam.hxx>
117 #include <paratr.hxx>
118 #include <proofreadingiterator.hxx>
119 #include <editeng/editids.hrc>
120 #include <svx/svxids.hrc>
121 #include <rtl/instance.hxx>
122 #include <svl/macitem.hxx>
123 #include <svx/xfillit0.hxx>
124 #include <svx/xflgrit.hxx>
125 #include <svx/sdtaitm.hxx>
126 #include <swcalwrp.hxx>
127 #include <SwStyleNameMapper.hxx>
128 #include <tblafmt.hxx>
129 #include <tgrditem.hxx>
130 #include <tools/globname.hxx>
131 #include <tox.hxx>
132 #include <unotools/charclass.hxx>
133 #include <unotools/configmgr.hxx>
135 #include <unotools/syslocale.hxx>
137 #include <vcl/mapmod.hxx>
138 #include <vcl/svapp.hxx>
139 #include <vcl/settings.hxx>
141 #include <viscrs.hxx>
142 
143 using namespace ::com::sun::star;
144 
145 // some ranges for sets in collections/ nodes
146 
147 // AttrSet range for the 2 break attributes
148 sal_uInt16 const aBreakSetRange[] = {
150  0
151 };
152 
153 // AttrSet range for TextFormatColl
154 // list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
155 // included in the paragraph style's itemset.
156 sal_uInt16 const aTextFormatCollSetRange[] = {
161 
162  // FillAttribute support
164 
165  0
166 };
167 
168 // AttrSet range for GrfFormatColl
169 sal_uInt16 const aGrfFormatCollSetRange[] = {
173  0
174 };
175 
176 // AttrSet range for TextNode
177 sal_uInt16 const aTextNodeSetRange[] = {
183 
184  // FillAttribute support (paragraph FillStyle)
186 
187  0
188 };
189 
190 // AttrSet range for NoTextNode
191 sal_uInt16 const aNoTextNodeSetRange[] = {
195  0
196 };
197 
198 sal_uInt16 const aTableSetRange[] = {
206  // #i29550#
208  // <-- collapsing
211  0
212 };
213 
214 sal_uInt16 const aTableLineSetRange[] = {
223  0
224 };
225 
226 sal_uInt16 const aTableBoxSetRange[] = {
236  0
237 };
238 
239 // AttrSet range for SwFrameFormat
240 sal_uInt16 const aFrameFormatSetRange[] = {
243 
244  // FillAttribute support (TextFrame, OLE, Writer GraphicObject)
246 
247  0
248 };
249 
250 // AttrSet range for SwCharFormat
251 sal_uInt16 const aCharFormatSetRange[] = {
254  0
255 };
256 
257 // AttrSet range for character autostyles
258 sal_uInt16 const aCharAutoFormatSetRange[] = {
262  0
263 };
264 
265 // AttrSet range for SwPageDescFormat
266 sal_uInt16 const aPgFrameFormatSetRange[] = {
269  0
270 };
271 
272 // create table for accessing default format attributes
274 
276 {
277  { SID_ATTR_CHAR_CASEMAP, true }, // RES_CHRATR_CASEMAP
278  { SID_ATTR_CHAR_CHARSETCOLOR, true }, // RES_CHRATR_CHARSETCOLOR
279  { SID_ATTR_CHAR_COLOR, true }, // RES_CHRATR_COLOR
280  { SID_ATTR_CHAR_CONTOUR, true }, // RES_CHRATR_CONTOUR
281  { SID_ATTR_CHAR_STRIKEOUT, true }, // RES_CHRATR_CROSSEDOUT
282  { SID_ATTR_CHAR_ESCAPEMENT, true }, // RES_CHRATR_ESCAPEMENT
283  { SID_ATTR_CHAR_FONT, true }, // RES_CHRATR_FONT
284  { SID_ATTR_CHAR_FONTHEIGHT, true }, // RES_CHRATR_FONTSIZE
285  { SID_ATTR_CHAR_KERNING, true }, // RES_CHRATR_KERNING
286  { SID_ATTR_CHAR_LANGUAGE, true }, // RES_CHRATR_LANGUAGE
287  { SID_ATTR_CHAR_POSTURE, true }, // RES_CHRATR_POSTURE
288  { 0, true }, // RES_CHRATR_UNUSED1
289  { SID_ATTR_CHAR_SHADOWED, true }, // RES_CHRATR_SHADOWED
290  { SID_ATTR_CHAR_UNDERLINE, true }, // RES_CHRATR_UNDERLINE
291  { SID_ATTR_CHAR_WEIGHT, true }, // RES_CHRATR_WEIGHT
292  { SID_ATTR_CHAR_WORDLINEMODE, true }, // RES_CHRATR_WORDLINEMODE
293  { SID_ATTR_CHAR_AUTOKERN, true }, // RES_CHRATR_AUTOKERN
294  { SID_ATTR_FLASH, true }, // RES_CHRATR_BLINK
295  { 0, true }, // RES_CHRATR_UNUSED2
296  { 0, true }, // RES_CHRATR_NOHYPHEN
297  { SID_ATTR_BRUSH_CHAR, true }, // RES_CHRATR_BACKGROUND
298  { SID_ATTR_CHAR_CJK_FONT, true }, // RES_CHRATR_CJK_FONT
299  { SID_ATTR_CHAR_CJK_FONTHEIGHT, true },// RES_CHRATR_CJK_FONTSIZE
300  { SID_ATTR_CHAR_CJK_LANGUAGE, true }, // RES_CHRATR_CJK_LANGUAGE
301  { SID_ATTR_CHAR_CJK_POSTURE, true }, // RES_CHRATR_CJK_POSTURE
302  { SID_ATTR_CHAR_CJK_WEIGHT, true }, // RES_CHRATR_CJK_WEIGHT
303  { SID_ATTR_CHAR_CTL_FONT, true }, // RES_CHRATR_CTL_FONT
304  { SID_ATTR_CHAR_CTL_FONTHEIGHT, true },// RES_CHRATR_CTL_FONTSIZE
305  { SID_ATTR_CHAR_CTL_LANGUAGE, true }, // RES_CHRATR_CTL_LANGUAGE
306  { SID_ATTR_CHAR_CTL_POSTURE, true }, // RES_CHRATR_CTL_POSTURE
307  { SID_ATTR_CHAR_CTL_WEIGHT, true }, // RES_CHRATR_CTL_WEIGHT
308  { SID_ATTR_CHAR_ROTATED, true }, // RES_CHRATR_ROTATE
309  { SID_ATTR_CHAR_EMPHASISMARK, true }, // RES_CHRATR_EMPHASIS_MARK
310  { SID_ATTR_CHAR_TWO_LINES, true }, // RES_CHRATR_TWO_LINES
311  { SID_ATTR_CHAR_SCALEWIDTH, true }, // RES_CHRATR_SCALEW
312  { SID_ATTR_CHAR_RELIEF, true }, // RES_CHRATR_RELIEF
313  { SID_ATTR_CHAR_HIDDEN, true }, // RES_CHRATR_HIDDEN
314  { SID_ATTR_CHAR_OVERLINE, true }, // RES_CHRATR_OVERLINE
315  { 0, true }, // RES_CHRATR_RSID
316  { SID_ATTR_CHAR_BOX, true }, // RES_CHRATR_BOX
317  { SID_ATTR_CHAR_SHADOW, true }, // RES_CHRATR_SHADOW
318  { 0, true }, // RES_CHRATR_HIGHLIGHT
319  { SID_ATTR_CHAR_GRABBAG, true }, // RES_CHRATR_GRABBAG
320  { 0, true }, // RES_CHRATR_BIDIRTL
321  { 0, true }, // RES_CHRATR_IDCTHINT
322 
323  { 0, false }, // RES_TXTATR_REFMARK
324  { 0, false }, // RES_TXTATR_TOXMARK
325  { 0, false }, // RES_TXTATR_META
326  { 0, false }, // RES_TXTATR_METAFIELD
327  { 0, true }, // RES_TXTATR_AUTOFMT
328  { FN_TXTATR_INET, false }, // RES_TXTATR_INETFMT
329  { 0, false }, // RES_TXTATR_CHARFMT
330  { SID_ATTR_CHAR_CJK_RUBY, false }, // RES_TXTATR_CJK_RUBY
331  { 0, true }, // RES_TXTATR_UNKNOWN_CONTAINER
332  { 0, false }, // RES_TXTATR_INPUTFIELD
333 
334  { 0, false }, // RES_TXTATR_FIELD
335  { 0, false }, // RES_TXTATR_FLYCNT
336  { 0, false }, // RES_TXTATR_FTN
337  { 0, false }, // RES_TXTATR_ANNOTATION
338  { 0, true }, // RES_TXTATR_DUMMY3
339  { 0, true }, // RES_TXTATR_DUMMY1
340  { 0, true }, // RES_TXTATR_DUMMY2
341 
342  { SID_ATTR_PARA_LINESPACE, true }, // RES_PARATR_LINESPACING
343  { SID_ATTR_PARA_ADJUST, true }, // RES_PARATR_ADJUST
344  { SID_ATTR_PARA_SPLIT, true }, // RES_PARATR_SPLIT
345  { SID_ATTR_PARA_ORPHANS, true }, // RES_PARATR_ORPHANS
346  { SID_ATTR_PARA_WIDOWS, true }, // RES_PARATR_WIDOWS
347  { SID_ATTR_TABSTOP, true }, // RES_PARATR_TABSTOP
348  { SID_ATTR_PARA_HYPHENZONE, true }, // RES_PARATR_HYPHENZONE
349  { FN_FORMAT_DROPCAPS, false }, // RES_PARATR_DROP
350  { SID_ATTR_PARA_REGISTER, true }, // RES_PARATR_REGISTER
351  { SID_ATTR_PARA_NUMRULE, true }, // RES_PARATR_NUMRULE
352  { SID_ATTR_PARA_SCRIPTSPACE, true }, // RES_PARATR_SCRIPTSPACE
353  { SID_ATTR_PARA_HANGPUNCTUATION, true },// RES_PARATR_HANGINGPUNCTUATION
354 
355  { SID_ATTR_PARA_FORBIDDEN_RULES, true },// RES_PARATR_FORBIDDEN_RULES
356  { SID_PARA_VERTALIGN, true }, // RES_PARATR_VERTALIGN
357  { SID_ATTR_PARA_SNAPTOGRID, true }, // RES_PARATR_SNAPTOGRID
358  { SID_ATTR_BORDER_CONNECT, true }, // RES_PARATR_CONNECT_BORDER
359 
360  { SID_ATTR_PARA_OUTLINE_LEVEL, true }, // RES_PARATR_OUTLINELEVEL //#outline level
361  { 0, true }, // RES_PARATR_RSID
362  { 0, true }, // RES_PARATR_GRABBAG
363  { 0, true }, // RES_PARATR_LIST_ID
364  { 0, true }, // RES_PARATR_LIST_LEVEL
365  { 0, true }, // RES_PARATR_LIST_ISRESTART
366  { 0, true }, // RES_PARATR_LIST_RESTARTVALUE
367  { 0, true }, // RES_PARATR_LIST_ISCOUNTED
368 
369  { 0, true }, // RES_FILL_ORDER
370  { 0, true }, // RES_FRM_SIZE
371  { SID_ATTR_PAGE_PAPERBIN, true }, // RES_PAPER_BIN
372  { SID_ATTR_LRSPACE, true }, // RES_LR_SPACE
373  { SID_ATTR_ULSPACE, true }, // RES_UL_SPACE
374  { 0, false }, // RES_PAGEDESC
375  { SID_ATTR_PARA_PAGEBREAK, true }, // RES_BREAK
376  { 0, false }, // RES_CNTNT
377  { 0, true }, // RES_HEADER
378  { 0, true }, // RES_FOOTER
379  { 0, true }, // RES_PRINT
380  { FN_OPAQUE, true }, // RES_OPAQUE
381  { FN_SET_PROTECT, true }, // RES_PROTECT
382  { FN_SURROUND, true }, // RES_SURROUND
383  { FN_VERT_ORIENT, true }, // RES_VERT_ORIENT
384  { FN_HORI_ORIENT, true }, // RES_HORI_ORIENT
385  { 0, false }, // RES_ANCHOR
386  { SID_ATTR_BRUSH, true }, // RES_BACKGROUND
387  { SID_ATTR_BORDER_OUTER, true }, // RES_BOX
388  { SID_ATTR_BORDER_SHADOW, true }, // RES_SHADOW
389  { SID_ATTR_MACROITEM, true }, // RES_FRMMACRO
390  { FN_ATTR_COLUMNS, true }, // RES_COL
391  { SID_ATTR_PARA_KEEP, true }, // RES_KEEP
392  { 0, true }, // RES_URL
393  { 0, true }, // RES_EDIT_IN_READONLY
394 
395  { 0, true }, // RES_LAYOUT_SPLIT
396  { 0, false }, // RES_CHAIN
397  { 0, true }, // RES_TEXTGRID
398  { FN_FORMAT_LINENUMBER, true }, // RES_LINENUMBER
399  { 0, true }, // RES_FTN_AT_TXTEND
400  { 0, true }, // RES_END_AT_TXTEND
401  { 0, true }, // RES_COLUMNBALANCE
402 
403  { SID_ATTR_FRAMEDIRECTION, true }, // RES_FRAMEDIR
404 
405  { SID_ATTR_HDFT_DYNAMIC_SPACING, true },// RES_HEADER_FOOTER_EAT_SPACING
406  { FN_TABLE_ROW_SPLIT, true }, // RES_ROW_SPLIT
407  // #i18732# - use slot-id define in svx
408  { SID_SW_FOLLOW_TEXT_FLOW, true }, // RES_FOLLOW_TEXT_FLOW
409  // #i29550#
410  { SID_SW_COLLAPSING_BORDERS, true }, // RES_COLLAPSING_BORDERS
411  // #i28701#
412  { SID_SW_WRAP_INFLUENCE_ON_OBJPOS, true },// RES_WRAP_INFLUENCE_ON_OBJPOS
413  { 0, false }, // RES_AUTO_STYLE
414  { 0, true }, // RES_FRMATR_STYLE_NAME
415  { 0, true }, // RES_FRMATR_CONDITIONAL_STYLE_NAME
416  { 0, true }, // RES_FRMATR_GRABBAG
417  { 0, true }, // RES_TEXT_VERT_ADJUST
418 
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_DUMMY1,
431  { 0, true }, // RES_GRFATR_DUMMY2,
432  { 0, true }, // RES_GRFATR_DUMMY3,
433  { 0, true }, // RES_GRFATR_DUMMY4,
434  { 0, true }, // RES_GRFATR_DUMMY5,
435  { 0, true }, // RES_GRFATR_DUMMY6,
436 
437  { 0, true }, // RES_BOXATR_FORMAT
438  { 0, false }, // RES_BOXATR_FORMULA,
439  { 0, true }, // RES_BOXATR_VALUE
440 
441  { 0, true } // RES_UNKNOWNATR_CONTAINER
442 };
443 
444 std::vector<SvGlobalName> *pGlobalOLEExcludeList = nullptr;
445 
447 
448 SwCheckIt* pCheckIt = nullptr;
449 static CharClass* pAppCharClass = nullptr;
450 
451 static CollatorWrapper* pCollator = nullptr,
452  *pCaseCollator = nullptr;
453 
455 {
456  static salhelper::SingletonRef<SwCalendarWrapper> aCalendarWrapper;
457  return &aCalendarWrapper;
458 }
459 
460 void InitCore()
461 {
462  SfxPoolItem* pItem;
463 
471 
487 
488  // CJK-Attributes
494 
495  // CTL-Attributes
501 
513 
514 // CharacterAttr - MSWord weak char direction/script override emulation
517 
523  aAttrTab[ RES_TXTATR_INETFMT - POOLATTR_BEGIN ] = new SwFormatINetFormat( OUString(), OUString() );
525  aAttrTab[ RES_TXTATR_CJK_RUBY - POOLATTR_BEGIN ] = new SwFormatRuby( OUString() );
528 
533 
534 // TextAttr - Dummies
538 
545 
546  pItem = new SvxHyphenZoneItem( false, RES_PARATR_HYPHENZONE );
547  static_cast<SvxHyphenZoneItem*>(pItem)->GetMaxHyphens() = 0; // Default: 0
549 
552  aAttrTab[ RES_PARATR_NUMRULE - POOLATTR_BEGIN ] = new SwNumRuleItem( OUString() );
553 
560 
564 
570 
577  aAttrTab[ RES_BREAK- POOLATTR_BEGIN ] = new SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK);
604  aAttrTab[ RES_FRAMEDIR - POOLATTR_BEGIN ] = new SvxFrameDirectionItem( SvxFrameDirection::Environment, RES_FRAMEDIR );
606 
607  // #i18732#
609  // collapsing borders #i29550#
611  // #i28701#
612  // #i35017# - constant name has changed
613  aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] = new SwFormatWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
614 
620 
633 
634 // GraphicAttr - Dummies
640 
644 
647 
648  // get the correct fonts:
649  ::GetDefaultFonts( *static_cast<SvxFontItem*>(aAttrTab[ RES_CHRATR_FONT- POOLATTR_BEGIN ]),
650  *static_cast<SvxFontItem*>(aAttrTab[ RES_CHRATR_CJK_FONT - POOLATTR_BEGIN ]),
651  *static_cast<SvxFontItem*>(aAttrTab[ RES_CHRATR_CTL_FONT - POOLATTR_BEGIN ]) );
652 
654  pCheckIt = nullptr;
655 
656  FrameInit();
657  TextInit_();
658 
661 
662  pGlobalOLEExcludeList = new std::vector<SvGlobalName>;
663 
665  {
667  SwDoc::s_pAutoCompleteWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen,
668  rAFlags.nAutoCmpltWordLen );
669  }
670  else
671  {
672  SwDoc::s_pAutoCompleteWords = new SwAutoCompleteWord( 0, 0 );
673  }
674 }
675 
676 void FinitCore()
677 {
678  FrameFinit();
679  TextFinit();
680 
683  delete pCheckIt;
684  delete pAppCharClass;
685  delete pCollator;
686  delete pCaseCollator;
687 
688  // destroy default TableAutoFormat
690 
692  delete SwFntObj::pPixMap;
693 
695 
696 #if OSL_DEBUG_LEVEL > 0
697  // free defaults to prevent assertions
698  if ( aAttrTab[0]->GetRefCount() )
700 #endif
702 
714 
715  // Delete programmatic name arrays also
727 
728  // And finally, any hash tables that we used
734 
740 
741  // delete all default attributes
742  for(SfxPoolItem* pHt : aAttrTab)
743  {
744  delete pHt;
745  }
746 
747  delete pGlobalOLEExcludeList;
748 }
749 
750 // returns the APP - CharClass instance - used for all ToUpper/ToLower/...
752 {
753  if ( !pAppCharClass )
754  {
755  pAppCharClass = new CharClass(
757  SwBreakIt::Get()->GetLanguageTag( GetAppLanguageTag() ));
758  }
759  return *pAppCharClass;
760 }
761 
763 {
764  if( eLang != m_nLang )
765  {
766  m_nLang = eLang;
768  }
769 }
770 
772 {
775  return LANGUAGE_ENGLISH_US;
776 }
777 
779 {
781 }
782 
784 {
785  if( !pCollator )
786  {
787  const lang::Locale& rLcl = g_pBreakIt->GetLocale( GetAppLanguage() );
788 
790  pCollator->loadDefaultCollator( rLcl, SW_COLLATOR_IGNORES );
791  }
792  return *pCollator;
793 }
794 
796 {
797  if( !pCaseCollator )
798  {
799  const lang::Locale& rLcl = g_pBreakIt->GetLocale( GetAppLanguage() );
800 
803  }
804  return *pCaseCollator;
805 }
806 
807 namespace
808 {
809  class TransWrp
810  {
811  private:
812  std::unique_ptr<utl::TransliterationWrapper> m_xTransWrp;
813  public:
814  TransWrp()
815  {
816  uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
817 
818  m_xTransWrp.reset(new ::utl::TransliterationWrapper( xContext,
819  TransliterationFlags::IGNORE_CASE |
820  TransliterationFlags::IGNORE_KANA |
821  TransliterationFlags::IGNORE_WIDTH ));
822 
823  m_xTransWrp->loadModuleIfNeeded( GetAppLanguage() );
824  }
825  const ::utl::TransliterationWrapper& getTransliterationWrapper() const
826  {
827  return *m_xTransWrp;
828  }
829  };
830 
831  class theTransWrp : public rtl::Static<TransWrp, theTransWrp> {};
832 }
833 
834 const ::utl::TransliterationWrapper& GetAppCmpStrIgnore()
835 {
836  return theTransWrp::get().getTransliterationWrapper();
837 }
838 
839 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
static SwBoxAutoFormat * pDfltBoxAutoFormat
Definition: tblafmt.hxx:156
static NameToIdHash * s_pNumRuleUIMap
const ::utl::TransliterationWrapper & GetAppCmpStrIgnore()
Definition: init.cxx:834
#define FN_HORI_ORIENT
Definition: cmdid.h:825
#define RES_FTN_AT_TXTEND
Definition: hintids.hxx:222
#define RES_CHRATR_WEIGHT
Definition: hintids.hxx:83
#define RES_BOXATR_BEGIN
Definition: hintids.hxx:260
static SwFormatMeta * CreatePoolDefault(const sal_uInt16 i_nWhich)
Definition: fmtatr2.cxx:528
#define RES_GRFATR_END
Definition: hintids.hxx:258
#define RES_FRM_SIZE
Definition: hintids.hxx:194
SDRTEXTVERTADJUST_TOP
#define RES_COL
Definition: hintids.hxx:214
#define RES_GRFATR_DUMMY2
Definition: hintids.hxx:254
static NameToIdHash * s_pCharProgMap
#define RES_URL
Definition: hintids.hxx:216
void TextFinit()
Definition: txtinit.cxx:62
void LoadDefaultCalendar(LanguageType nLang)
Definition: init.cxx:762
static SvxAutoCorrCfg & Get()
SwDfltAttrTab aAttrTab(POOLATTR_END-POOLATTR_BEGIN, nullptr)
#define RES_EDIT_IN_READONLY
Definition: hintids.hxx:217
#define RES_END_AT_TXTEND
Definition: hintids.hxx:223
#define FN_FORMAT_LINENUMBER
Definition: cmdid.h:446
#define RES_CHRATR_CJK_LANGUAGE
Definition: hintids.hxx:92
#define RES_HEADER
Definition: hintids.hxx:201
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
#define LINE_SPACE_DEFAULT_HEIGHT
#define RES_CHRATR_FONTSIZE
Definition: hintids.hxx:76
void FrameFinit()
Definition: newfrm.cxx:308
#define RES_CHRATR_LANGUAGE
Definition: hintids.hxx:78
#define RES_TXTATR_CJK_RUBY
Definition: hintids.hxx:143
#define RES_CHRATR_RELIEF
Definition: hintids.hxx:104
#define LANGUAGE_ENGLISH_US
#define RES_PARATR_GRABBAG
Definition: hintids.hxx:179
#define RES_TXTATR_METAFIELD
Definition: hintids.hxx:139
#define RES_HORI_ORIENT
Definition: hintids.hxx:208
#define RES_FRMATR_GRABBAG
Definition: hintids.hxx:234
sal_uInt16 const aTextNodeSetRange[]
Definition: init.cxx:177
LanguageType getLanguageType(bool bResolveSystem=true) const
static CharClass * pAppCharClass
Definition: init.cxx:449
#define RES_CHRATR_CJK_POSTURE
Definition: hintids.hxx:93
void FrameInit()
Definition: newfrm.cxx:297
#define RES_SHADOW
Definition: hintids.hxx:212
#define RES_CHRATR_WORDLINEMODE
Definition: hintids.hxx:84
#define RES_CHRATR_CHARSETCOLOR
Definition: hintids.hxx:70
#define RES_PARATR_VERTALIGN
Definition: hintids.hxx:174
#define RES_PARATR_FORBIDDEN_RULES
Definition: hintids.hxx:173
#define RES_FRAMEDIR
Definition: hintids.hxx:225
static const AllSettings & GetSettings()
#define RES_SURROUND
Definition: hintids.hxx:206
#define RES_FRMATR_END
Definition: hintids.hxx:236
#define RES_GRFATR_DUMMY3
Definition: hintids.hxx:255
If text in multi-column sections should be evenly distributed.
Definition: fmtclbl.hxx:28
void TextInit_()
Definition: txtinit.cxx:49
#define RES_TXTATR_UNKNOWN_CONTAINER
Definition: hintids.hxx:144
#define RES_CHRATR_CJK_WEIGHT
Definition: hintids.hxx:94
#define RES_GRFATR_CHANNELB
Definition: hintids.hxx:247
#define RES_CHRATR_FONT
Definition: hintids.hxx:75
static CollatorWrapper * pCaseCollator
Definition: init.cxx:452
#define RES_PARATR_LIST_ID
Definition: hintids.hxx:185
#define RES_PARATR_LIST_ISCOUNTED
Definition: hintids.hxx:189
#define RES_PARATR_REGISTER
Definition: hintids.hxx:169
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:31
#define RES_PARATR_LIST_END
Definition: hintids.hxx:190
#define RES_CHRATR_BLINK
Definition: hintids.hxx:86
static std::vector< OUString > * s_pExtraProgNameArray
#define RES_CHRATR_CJK_FONT
Definition: hintids.hxx:90
static NameToIdHash * s_pFrameUIMap
static NameToIdHash * s_pNumRuleProgMap
#define RES_CHRATR_CJK_FONTSIZE
Definition: hintids.hxx:91
#define RES_TXTATR_CHARFMT
Definition: hintids.hxx:142
sal_uInt16 const aNoTextNodeSetRange[]
Definition: init.cxx:191
#define RES_WRAP_INFLUENCE_ON_OBJPOS
Definition: hintids.hxx:230
static std::vector< OUString > * s_pListsProgNameArray
#define RES_PARATR_SPLIT
Definition: hintids.hxx:163
#define RES_CNTNT
Definition: hintids.hxx:200
#define RES_PROTECT
Definition: hintids.hxx:205
static void Delete_()
Definition: breakit.cxx:42
#define RES_UNKNOWNATR_CONTAINER
Definition: hintids.hxx:267
sal_uInt16 const aTextFormatCollSetRange[]
Definition: init.cxx:156
static std::vector< OUString > * s_pHTMLChrFormatUINameArray
#define RES_CHRATR_TWO_LINES
Definition: hintids.hxx:102
#define RES_GRFATR_MIRRORGRF
Definition: hintids.hxx:239
#define RES_CHRATR_IDCTHINT
Definition: hintids.hxx:113
std::vector< SvGlobalName > * pGlobalOLEExcludeList
Definition: init.cxx:444
#define FN_VERT_ORIENT
Definition: cmdid.h:824
void ReleaseDefaults(bool bDelete=false)
#define RES_PARATR_HANGINGPUNCTUATION
Definition: hintids.hxx:172
#define RES_PARATR_LIST_ISRESTART
Definition: hintids.hxx:187
#define RES_PARATR_CONNECT_BORDER
Definition: hintids.hxx:176
#define RES_TXTATR_META
Definition: hintids.hxx:138
#define RES_COLUMNBALANCE
Definition: hintids.hxx:224
#define POOLATTR_END
Definition: hintids.hxx:64
#define RES_CHAIN
Definition: hintids.hxx:219
#define RES_CHRATR_END
Definition: hintids.hxx:114
static SwAutoCompleteWord * s_pAutoCompleteWords
Definition: doc.hxx:323
salhelper::SingletonRef< SwCalendarWrapper > * s_getCalendarWrapper()
Definition: init.cxx:454
#define XATTR_FILL_LAST
LINESTYLE_NONE
#define RES_CHRATR_CTL_FONTSIZE
Definition: hintids.hxx:96
#define XATTR_FILL_FIRST
#define RES_PARATR_TABSTOP
Definition: hintids.hxx:166
SwBreakIt * g_pBreakIt
Definition: breakit.cxx:34
static bool IsFuzzing()
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
static std::vector< OUString > * s_pPageDescUINameArray
#define RES_GRFATR_LUMINANCE
Definition: hintids.hxx:243
#define RES_PAPER_BIN
Definition: hintids.hxx:195
#define RES_UL_SPACE
Definition: hintids.hxx:197
SvxSwAutoFormatFlags & GetSwFlags()
#define RES_PARATR_NUMRULE
Definition: hintids.hxx:170
#define RES_PARATR_BEGIN
Definition: hintids.hxx:160
#define RES_FRMATR_CONDITIONAL_STYLE_NAME
Definition: hintids.hxx:233
LanguageType m_nLang
Definition: swcalwrp.hxx:34
#define RES_TXTATR_DUMMY2
Definition: hintids.hxx:156
#define RES_CHRATR_CASEMAP
Definition: hintids.hxx:69
#define RES_PARATR_SNAPTOGRID
Definition: hintids.hxx:175
#define RES_PRINT
Definition: hintids.hxx:203
#define RES_GRFATR_CONTRAST
Definition: hintids.hxx:244
#define RES_GRFATR_INVERT
Definition: hintids.hxx:249
#define RES_FOLLOW_TEXT_FLOW
Definition: hintids.hxx:228
const LanguageTag & GetLanguageTag() const
#define RES_ROW_SPLIT
Definition: hintids.hxx:227
#define RES_BACKGROUND
Definition: hintids.hxx:210
#define POOLATTR_BEGIN
Definition: hintids.hxx:63
static MapMode * s_pMapMode
Definition: viscrs.hxx:73
#define RES_CHRATR_COLOR
Definition: hintids.hxx:71
sal_uInt16 const aTableSetRange[]
Definition: init.cxx:198
#define RES_CHRATR_NOHYPHEN
Definition: hintids.hxx:87
#define RES_FILL_ORDER
Definition: hintids.hxx:193
#define RES_GRFATR_DRAWMODE
Definition: hintids.hxx:251
static NameToIdHash * s_pCharUIMap
sal_uInt16 nAutoCmpltWordLen
#define RES_CHRATR_OVERLINE
Definition: hintids.hxx:106
#define RES_GRFATR_CHANNELG
Definition: hintids.hxx:246
#define RES_CHRATR_BACKGROUND
Definition: hintids.hxx:89
#define RES_ANCHOR
Definition: hintids.hxx:209
#define RES_CHRATR_CTL_FONT
Definition: hintids.hxx:95
sal_uInt16 const aGrfFormatCollSetRange[]
Definition: init.cxx:169
#define RES_CHRATR_BOX
Definition: hintids.hxx:108
#define RES_GRFATR_DUMMY5
Definition: hintids.hxx:257
sal_uInt16 nAutoCmpltListLen
#define RES_TXTATR_FTN
Definition: hintids.hxx:152
static std::vector< OUString > * s_pFrameFormatProgNameArray
#define RES_GRFATR_ROTATION
Definition: hintids.hxx:242
#define RES_GRFATR_GAMMA
Definition: hintids.hxx:248
#define RES_VERT_ORIENT
Definition: hintids.hxx:207
void FinitCore()
Definition: init.cxx:676
SvxAutoCorrect * GetAutoCorrect()
static std::vector< OUString > * s_pRegisterUINameArray
static std::vector< OUString > * s_pTextProgNameArray
FlyAnchors.
Definition: fmtanchr.hxx:34
#define RES_PARATR_HYPHENZONE
Definition: hintids.hxx:167
#define RES_PARATR_ORPHANS
Definition: hintids.hxx:164
#define FN_SET_PROTECT
Definition: cmdid.h:822
#define RES_BOXATR_END
Definition: hintids.hxx:264
sal_Int32 loadDefaultCollator(const css::lang::Locale &rLocale, sal_Int32 nOption)
#define RES_PARATR_SCRIPTSPACE
Definition: hintids.hxx:171
WEIGHT_NORMAL
#define RES_TXTATR_DUMMY1
Definition: hintids.hxx:155
#define RES_LAYOUT_SPLIT
Definition: hintids.hxx:218
#define RES_CHRATR_BEGIN
Definition: hintids.hxx:68
#define FN_SURROUND
Definition: cmdid.h:823
#define LANGUAGE_DONTKNOW
sal_uInt16 const aCharAutoFormatSetRange[]
Definition: init.cxx:258
#define RES_CHRATR_UNDERLINE
Definition: hintids.hxx:82
static CollatorWrapper * pCollator
Definition: init.cxx:451
sal_uInt16 const aTableBoxSetRange[]
Definition: init.cxx:226
#define RES_TXTATR_TOXMARK
Definition: hintids.hxx:137
Connection (text flow) between two FlyFrames.
Definition: fmtcnct.hxx:31
#define RES_CHRATR_ESCAPEMENT
Definition: hintids.hxx:74
#define RES_LINENUMBER
Definition: hintids.hxx:221
#define RES_UNKNOWNATR_BEGIN
Definition: hintids.hxx:266
#define RES_BOXATR_VALUE
Definition: hintids.hxx:263
ITALIC_NONE
#define RES_PARATR_LIST_BEGIN
Definition: hintids.hxx:184
static std::vector< OUString > * s_pHTMLProgNameArray
static NameToIdHash * s_pFrameProgMap
#define RES_TXTATR_INETFMT
Definition: hintids.hxx:141
static std::vector< OUString > * s_pDocUINameArray
#define RES_CHRATR_BIDIRTL
Definition: hintids.hxx:112
#define RES_CHRATR_CONTOUR
Definition: hintids.hxx:72
sal_uInt16 const aTableLineSetRange[]
Definition: init.cxx:214
static NameToIdHash * s_pParaProgMap
#define RES_GRFATR_BEGIN
Definition: hintids.hxx:238
#define RES_CHRATR_UNUSED2
Definition: hintids.hxx:88
static SvxSwAutoFormatFlags * s_pAutoFormatFlags
Definition: editsh.hxx:142
#define RES_CHRATR_KERNING
Definition: hintids.hxx:77
#define RES_LR_SPACE
Definition: hintids.hxx:196
static NameToIdHash * s_pPageProgMap
#define RES_FOOTER
Definition: hintids.hxx:202
sal_uInt16 const aFrameFormatSetRange[]
Definition: init.cxx:240
SwCheckIt * pCheckIt
Definition: init.cxx:448
const LanguageTag & GetAppLanguageTag()
Definition: init.cxx:778
#define RES_CHRATR_EMPHASIS_MARK
Definition: hintids.hxx:101
#define RES_CHRATR_SHADOW
Definition: hintids.hxx:109
static std::vector< OUString > * s_pHTMLChrFormatProgNameArray
const css::lang::Locale & GetLocale(const LanguageType aLang)
Definition: breakit.hxx:67
#define RES_CHRATR_ROTATE
Definition: hintids.hxx:100
void InitCore()
Definition: init.cxx:460
#define FN_TABLE_ROW_SPLIT
Definition: cmdid.h:456
#define RES_TXTATR_FIELD
Definition: hintids.hxx:150
#define FN_ATTR_COLUMNS
Definition: cmdid.h:130
#define RES_TXTATR_AUTOFMT
Definition: hintids.hxx:140
SfxItemInfo aSlotTab[]
Definition: init.cxx:275
#define RES_TEXTGRID
Definition: hintids.hxx:220
static std::vector< OUString > * s_pExtraUINameArray
static std::vector< OUString > * s_pDocProgNameArray
static std::vector< OUString > * s_pFrameFormatUINameArray
#define RES_PARATR_LIST_LEVEL
Definition: hintids.hxx:186
#define RES_CHRATR_CTL_LANGUAGE
Definition: hintids.hxx:97
#define RES_CHRATR_POSTURE
Definition: hintids.hxx:79
#define RES_CHRATR_CTL_WEIGHT
Definition: hintids.hxx:99
#define RES_CHRATR_CTL_POSTURE
Definition: hintids.hxx:98
#define RES_TXTATR_ANNOTATION
Definition: hintids.hxx:153
#define RES_GRFATR_CHANNELR
Definition: hintids.hxx:245
static MapMode * pPixMap
Definition: fntcache.hxx:100
static std::vector< OUString > * s_pTextUINameArray
static std::vector< OUString > * s_pRegisterProgNameArray
#define RES_OPAQUE
Definition: hintids.hxx:204
#define RES_HEADER_FOOTER_EAT_SPACING
Definition: hintids.hxx:226
#define SVX_TAB_DEFDIST
LanguageType GetAppLanguage()
Definition: init.cxx:771
static std::vector< OUString > * s_pChrFormatProgNameArray
sal_uInt16 const aCharFormatSetRange[]
Definition: init.cxx:251
static std::vector< OUString > * s_pPageDescProgNameArray
#define RES_KEEP
Definition: hintids.hxx:215
#define RES_CHRATR_HIGHLIGHT
Definition: hintids.hxx:110
#define RES_GRFATR_CROPGRF
Definition: hintids.hxx:240
Reference< XComponentContext > getProcessComponentContext()
#define RES_PARATR_ADJUST
Definition: hintids.hxx:162
static NameToIdHash * s_pPageUIMap
#define RES_GRFATR_TRANSPARENCY
Definition: hintids.hxx:250
#define RES_TXTATR_FLYCNT
Definition: hintids.hxx:151
#define RES_TXTATR_REFMARK
Definition: hintids.hxx:136
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
Format of a fly content.
Definition: fmtflcnt.hxx:32
#define FN_TXTATR_INET
Definition: cmdid.h:708
#define RES_CHRATR_SHADOWED
Definition: hintids.hxx:81
void loadDefaultCalendar(const css::lang::Locale &rLocale, bool bTimeZoneUTC=true)
static std::vector< OUString > * s_pListsUINameArray
#define RES_PARATR_WIDOWS
Definition: hintids.hxx:165
#define RES_PARATR_RSID
Definition: hintids.hxx:178
#define RES_CHRATR_AUTOKERN
Definition: hintids.hxx:85
#define RES_CHRATR_HIDDEN
Definition: hintids.hxx:105
#define RES_BOX
Definition: hintids.hxx:211
#define RES_PARATR_OUTLINELEVEL
Definition: hintids.hxx:177
static std::vector< OUString > * s_pNumRuleProgNameArray
#define RES_GRFATR_DUMMY4
Definition: hintids.hxx:256
#define RES_CHRATR_CROSSEDOUT
Definition: hintids.hxx:73
#define RES_CHRATR_UNUSED1
Definition: hintids.hxx:80
std::vector< SfxPoolItem * > SwDfltAttrTab
Definition: hintids.hxx:396
#define RES_PARATR_DROP
Definition: hintids.hxx:168
#define RES_TXTATR_DUMMY3
Definition: hintids.hxx:154
#define RES_COLLAPSING_BORDERS
Definition: hintids.hxx:229
static std::vector< OUString > * s_pNumRuleUINameArray
static NameToIdHash * s_pParaUIMap
static std::vector< OUString > * s_pChrFormatUINameArray
#define RES_UNKNOWNATR_END
Definition: hintids.hxx:268
static void Create_(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: breakit.cxx:36
sal_uInt16 const aPgFrameFormatSetRange[]
Definition: init.cxx:266
#define RES_AUTO_STYLE
Definition: hintids.hxx:231
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:50
STRIKEOUT_NONE
#define RES_FRMMACRO
Definition: hintids.hxx:213
#define RES_CHRATR_SCALEW
Definition: hintids.hxx:103
#define RES_PAGEDESC
Definition: hintids.hxx:198
#define RES_BREAK
Definition: hintids.hxx:199
sal_uInt16 const aBreakSetRange[]
Definition: init.cxx:148
CharClass & GetAppCharClass()
Definition: init.cxx:751
#define RES_CHRATR_GRABBAG
Definition: hintids.hxx:111
#define FN_OPAQUE
Definition: cmdid.h:821
#define RES_FRMATR_BEGIN
Definition: hintids.hxx:192
#define RES_GRFATR_DUMMY1
Definition: hintids.hxx:253
#define RES_TXTATR_INPUTFIELD
Definition: hintids.hxx:145
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:795
static SwBreakIt * Get()
Definition: breakit.cxx:48
#define RES_FRMATR_STYLE_NAME
Definition: hintids.hxx:232
static std::vector< OUString > * s_pHTMLUINameArray
#define RES_PARATR_LIST_RESTARTVALUE
Definition: hintids.hxx:188
#define SW_COLLATOR_IGNORES
Definition: swtypes.hxx:193
#define RES_BOXATR_FORMAT
Definition: hintids.hxx:261
#define RES_TEXT_VERT_ADJUST
Definition: hintids.hxx:235
#define FN_FORMAT_DROPCAPS
Definition: cmdid.h:300
#define RES_PARATR_END
Definition: hintids.hxx:180
#define RES_PARATR_LINESPACING
Definition: hintids.hxx:161
CollatorWrapper & GetAppCollator()
Definition: init.cxx:783
#define RES_BOXATR_FORMULA
Definition: hintids.hxx:262
#define RES_CHRATR_RSID
Definition: hintids.hxx:107
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)