LibreOffice Module sw (master) 1
SwStyleNameMapper.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 <SwStyleNameMapper.hxx>
21#include <poolfmt.hxx>
22#include <strings.hrc>
23#include <swtypes.hxx>
26#include <map>
27
28#ifdef _NEED_TO_DEBUG_MAPPING
29#include <stdlib.h>
30#endif
31
32namespace
33{
34
35const OUString &
36lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
37{
38 const std::vector<OUString>& rExtraArr = bIsUIName
40 : SwStyleNameMapper::GetExtraProgNameArray();
41 static const sal_uInt16 nIds[] =
42 {
48 0
49 };
50 const sal_uInt16 * pIds;
51 for ( pIds = nIds; *pIds; ++pIds)
52 {
53 if (rExtraName == rExtraArr[ *pIds ])
54 {
55 return bIsUIName
58 }
59 }
60 return rExtraName;
61}
62
63bool lcl_SuffixIsUser(const OUString & rString)
64{
65 const sal_Unicode *pChar = rString.getStr();
66 sal_Int32 nLen = rString.getLength();
67 bool bRet = false;
68 if( nLen > 8 &&
69 pChar[nLen-7] == ' ' &&
70 pChar[nLen-6] == '(' &&
71 pChar[nLen-5] == 'u' &&
72 pChar[nLen-4] == 's' &&
73 pChar[nLen-3] == 'e' &&
74 pChar[nLen-2] == 'r' &&
75 pChar[nLen-1] == ')' )
76 bRet = true;
77 return bRet;
78}
79
80void lcl_CheckSuffixAndDelete(OUString & rString)
81{
82 if (lcl_SuffixIsUser(rString))
83 {
84 rString = rString.copy(0, rString.getLength() - 7);
85 }
86}
87
88NameToIdHash HashFromRange(sal_uInt16 nAcc) { return NameToIdHash(nAcc); }
89template <typename... Rest>
90NameToIdHash HashFromRange(sal_uInt16 nAcc, sal_uInt16 nBegin, sal_uInt16 nEnd,
91 const std::vector<OUString>& (*pFunc)(), Rest... rest)
92{
93 NameToIdHash hash(HashFromRange(nAcc + nEnd - nBegin, rest...));
94 sal_uInt16 nIndex, nId;
95 const std::vector<OUString>& rStrings = pFunc();
96 for (nIndex = 0, nId = nBegin; nId < nEnd; nId++, nIndex++)
97 hash[rStrings[nIndex]] = nId;
98 return hash;
99}
100
101template <auto initFunc> struct TablePair
102{
103 static const NameToIdHash& getMap(bool bProgName)
104 {
105 if (bProgName)
106 {
107 static const NameToIdHash s_aProgMap(initFunc(true));
108 return s_aProgMap;
109 }
110
111 SvtSysLocale aSysLocale;
112 const LanguageTag& rCurrentLanguage = aSysLocale.GetUILanguageTag();
113 static std::map<LanguageTag, NameToIdHash> s_aUIMap;
114
115 auto it = s_aUIMap.find(rCurrentLanguage);
116 if (it == s_aUIMap.end())
117 it = s_aUIMap.emplace(rCurrentLanguage, initFunc(false)).first;
118
119 return it->second;
120 }
121};
122
123NameToIdHash GetParaMap (bool bProgName)
124{
125 return HashFromRange(0,
132 );
133};
134
135NameToIdHash GetCharMap(bool bProgName)
136{
137 return HashFromRange(0,
140 );
141};
142
143NameToIdHash GetFrameMap(bool bProgName)
144{
145 return HashFromRange(0,
147 );
148};
149
150NameToIdHash GetPageMap(bool bProgName)
151{
152 return HashFromRange(0,
154 );
155};
156
157NameToIdHash GetNumRuleMap(bool bProgName)
158{
159 return HashFromRange(0,
161 );
162};
163
164NameToIdHash GetTableStyleMap(bool bProgName)
165{
166 return HashFromRange(0,
168 );
169};
170
171NameToIdHash GetCellStyleMap(bool bProgName)
172{
173 return HashFromRange(0,
175 );
176};
177
178} // namespace
179
180#ifdef _NEED_TO_DEBUG_MAPPING
181void SwStyleNameMapper::testNameTable( SwGetPoolIdFromName const nFamily, sal_uInt16 const nStartIndex, sal_uInt16 const nEndIndex )
182{
183 sal_uInt16 nIndex;
184 sal_uInt16 nId;
185
186 for ( nIndex = 0, nId = nStartIndex ; nId < nEndIndex ; nId++,nIndex++ )
187 {
188 OUString aString, bString;
189 FillUIName ( nId, aString );
190 bString = GetProgName ( nFamily, aString );
191 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nFamily );
192 FillProgName ( nNewId, aString );
193 bString = GetUIName ( aString, nFamily );
194 nNewId = GetPoolIdFromUIName ( aString, nFamily );
195 if ( nNewId != nId )
196 abort();
197 }
198}
199#endif
200
202{
203#ifdef _NEED_TO_DEBUG_MAPPING
204 static bool bTested = false;
205 if ( !bTested )
206 {
207 bTested = true;
208
220 }
221#endif
222
223 switch ( eFlags )
224 {
226 return TablePair<GetParaMap>::getMap(bProgName);
228 return TablePair<GetCharMap>::getMap(bProgName);
230 return TablePair<GetFrameMap>::getMap(bProgName);
232 return TablePair<GetPageMap>::getMap(bProgName);
234 return TablePair<GetNumRuleMap>::getMap(bProgName);
236 return TablePair<GetTableStyleMap>::getMap(bProgName);
238 return TablePair<GetCellStyleMap>::getMap(bProgName);
239 }
240
241 assert(false); // must not reach here
242 abort();
243}
244
245// This gets the UI name from the programmatic name
246const OUString& SwStyleNameMapper::GetUIName(const OUString& rName,
247 SwGetPoolIdFromName const eFlags)
248{
249 sal_uInt16 nId = GetPoolIdFromProgName ( rName, eFlags );
250 return nId != USHRT_MAX ? GetUIName( nId, rName ) : rName;
251}
252
253// Get the programmatic name from the UI name
255 const OUString& rName, SwGetPoolIdFromName const eFlags)
256{
257 sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
258 return nId != USHRT_MAX ? GetProgName( nId, rName ) : rName;
259}
260
261// Get the programmatic name from the UI name in rName and put it into rFillName
263 const OUString& rName, OUString& rFillName,
264 SwGetPoolIdFromName const eFlags)
265{
266 sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
267 if ( nId == USHRT_MAX )
268 {
269 // rName isn't in our UI name table...check if it's in the programmatic one
270 nId = GetPoolIdFromProgName ( rName, eFlags );
271
272 rFillName = rName;
273 if (nId == USHRT_MAX )
274 {
275 // It isn't ...make sure the suffix isn't already " (user)"...if it is,
276 // we need to add another one
277 if (lcl_SuffixIsUser(rFillName))
278 rFillName += " (user)";
279 }
280 else
281 {
282 // It's in the programmatic name table...append suffix
283 rFillName += " (user)";
284 }
285 }
286 else
287 {
288 // If we aren't trying to disambiguate, then just do a normal fill
289 fillNameFromId(nId, rFillName, true);
290 }
291
292 if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == SwResId(STR_POOLCHR_STANDARD))
293 rFillName = "Standard";
294}
295
296// Get the UI name from the programmatic name in rName and put it into rFillName
298 const OUString& rName, OUString& rFillName,
299 SwGetPoolIdFromName const eFlags)
300{
301 OUString aName = rName;
302 if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == "Standard")
303 aName = SwResId(STR_POOLCHR_STANDARD);
304
305 sal_uInt16 nId = GetPoolIdFromProgName ( aName, eFlags );
306 if ( nId == USHRT_MAX )
307 {
308 rFillName = aName;
309 // aName isn't in our Prog name table...check if it has a " (user)" suffix, if so remove it
310 lcl_CheckSuffixAndDelete ( rFillName );
311 }
312 else
313 {
314 // If we aren't trying to disambiguate, then just do a normal fill
315 fillNameFromId(nId, rFillName, false);
316 }
317}
318
320 sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
321{
322 sal_uInt16 nStt = 0;
323 const std::vector<OUString>* pStrArr = nullptr;
324
326 {
327 case COLL_TEXT_BITS:
329 {
330 pStrArr = bProgName ? &GetTextProgNameArray() : &GetTextUINameArray();
332 }
333 break;
334 case COLL_LISTS_BITS:
336 {
337 pStrArr = bProgName ? &GetListsProgNameArray() : &GetListsUINameArray();
339 }
340 break;
341 case COLL_EXTRA_BITS:
343 {
344 pStrArr = bProgName ? &GetExtraProgNameArray() : &GetExtraUINameArray();
346 }
347 break;
350 {
351 pStrArr = bProgName ? &GetRegisterProgNameArray() : &GetRegisterUINameArray();
353 }
354 break;
355 case COLL_DOC_BITS:
357 {
358 pStrArr = bProgName ? &GetDocProgNameArray() : &GetDocUINameArray();
360 }
361 break;
362 case COLL_HTML_BITS:
364 {
365 pStrArr = bProgName ? &GetHTMLProgNameArray() : &GetHTMLUINameArray();
367 }
368 break;
369 case POOLGRP_CHARFMT:
371 {
372 pStrArr = bProgName ? &GetChrFormatProgNameArray() : &GetChrFormatUINameArray();
374 }
376 {
379 }
380 break;
381 case POOLGRP_FRAMEFMT:
383 {
384 pStrArr = bProgName ? &GetFrameFormatProgNameArray() : &GetFrameFormatUINameArray();
385 nStt = RES_POOLFRM_BEGIN;
386 }
387 break;
388 case POOLGRP_PAGEDESC:
390 {
391 pStrArr = bProgName ? &GetPageDescProgNameArray() : &GetPageDescUINameArray();
392 nStt = RES_POOLPAGE_BEGIN;
393 }
394 break;
395 case POOLGRP_NUMRULE:
397 {
398 pStrArr = bProgName ? &GetNumRuleProgNameArray() : &GetNumRuleUINameArray();
400 }
401 break;
402 case POOLGRP_TABSTYLE:
404 {
405 pStrArr = bProgName ? &GetTableStyleProgNameArray() : &GetTableStyleUINameArray();
407 }
408 break;
409 }
410 return pStrArr ? pStrArr->operator[](nId - nStt) : rFillName;
411}
412
414 sal_uInt16 const nId, OUString& rFillName, bool bProgName)
415{
416 rFillName = getNameFromId(nId, rFillName, bProgName);
417}
418
419// Get the UI name from the pool ID
420void SwStyleNameMapper::FillUIName(sal_uInt16 const nId, OUString& rFillName)
421{
422 fillNameFromId(nId, rFillName, false);
423}
424
425// Get the UI name from the pool ID
427 sal_uInt16 const nId, const OUString& rName)
428{
429 return getNameFromId(nId, rName, false);
430}
431
432// Get the programmatic name from the pool ID
433void SwStyleNameMapper::FillProgName(sal_uInt16 nId, OUString& rFillName)
434{
435 fillNameFromId(nId, rFillName, true);
436}
437
438// Get the programmatic name from the pool ID
439const OUString&
440SwStyleNameMapper::GetProgName(sal_uInt16 const nId, const OUString& rName)
441{
442 return getNameFromId(nId, rName, true);
443}
444
445// This gets the PoolId from the UI Name
447 const OUString& rName, SwGetPoolIdFromName const eFlags)
448{
449 const NameToIdHash & rHashMap = getHashTable ( eFlags, false );
450 NameToIdHash::const_iterator aIter = rHashMap.find(rName);
451 return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
452}
453
454// Get the Pool ID from the programmatic name
456 const OUString& rName, SwGetPoolIdFromName const eFlags)
457{
458 const NameToIdHash & rHashMap = getHashTable ( eFlags, true );
459 NameToIdHash::const_iterator aIter = rHashMap.find(rName);
460 return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
461}
462
463// Hard coded Programmatic Name tables
464
466const std::vector<OUString>& SwStyleNameMapper::GetCellStyleUINameArray()
467{
468 static const std::vector<OUString> s_aCellStyleUINameArray;
469 return s_aCellStyleUINameArray;
470}
471
472const std::vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
473{
474 static const std::vector<OUString> s_aTextProgNameArray = {
475 "Standard", // RES_POOLCOLL_STANDARD
476 "Text body",
477 "First line indent",
478 "Hanging indent",
479 "Text body indent",
480 "Salutation",
481 "Signature",
482 "List Indent", // RES_POOLCOLL_CONFRONTATION
483 "Marginalia",
484 "Heading",
485 "Heading 1",
486 "Heading 2",
487 "Heading 3",
488 "Heading 4",
489 "Heading 5",
490 "Heading 6",
491 "Heading 7",
492 "Heading 8",
493 "Heading 9",
494 "Heading 10", // RES_POOLCOLL_TEXT_END
495 };
496 return s_aTextProgNameArray;
497}
498
499const std::vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
500{
501 static const std::vector<OUString> s_aListsProgNameArray = {
502 "List", // STR_POCO_PRGM_NUMBER_BULLET_BASE
503 "Numbering 1 Start", // STR_POCO_PRGM_NUM_LEVEL1S
504 "Numbering 1",
505 "Numbering 1 End",
506 "Numbering 1 Cont.",
507 "Numbering 2 Start",
508 "Numbering 2",
509 "Numbering 2 End",
510 "Numbering 2 Cont.",
511 "Numbering 3 Start",
512 "Numbering 3",
513 "Numbering 3 End",
514 "Numbering 3 Cont.",
515 "Numbering 4 Start",
516 "Numbering 4",
517 "Numbering 4 End",
518 "Numbering 4 Cont.",
519 "Numbering 5 Start",
520 "Numbering 5",
521 "Numbering 5 End",
522 "Numbering 5 Cont.",
523 "List 1 Start",
524 "List 1",
525 "List 1 End",
526 "List 1 Cont.",
527 "List 2 Start",
528 "List 2",
529 "List 2 End",
530 "List 2 Cont.",
531 "List 3 Start",
532 "List 3",
533 "List 3 End",
534 "List 3 Cont.",
535 "List 4 Start",
536 "List 4",
537 "List 4 End",
538 "List 4 Cont.",
539 "List 5 Start",
540 "List 5",
541 "List 5 End",
542 "List 5 Cont.", // STR_POCO_PRGM_BULLET_NONUM5
543 };
544 return s_aListsProgNameArray;
545}
546
547const std::vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
548{
549 static const std::vector<OUString> s_aExtraProgNameArray = {
550 "Header and Footer", // RES_POOLCOLL_EXTRA_BEGIN
551 "Header",
552 "Header left",
553 "Header right",
554 "Footer",
555 "Footer left",
556 "Footer right",
557 "Table Contents",
558 "Table Heading",
559 "Caption",
560 "Illustration",
561 "Table",
562 "Text",
563 "Figure", // RES_POOLCOLL_LABEL_FIGURE
564 "Frame contents",
565 "Footnote",
566 "Addressee",
567 "Sender",
568 "Endnote",
569 "Drawing", // RES_POOLCOLL_LABEL_DRAWING
570 };
571 return s_aExtraProgNameArray;
572}
573
575{
576 static const std::vector<OUString> s_aRegisterProgNameArray = {
577 "Index", // STR_POCO_PRGM_REGISTER_BASE
578 "Index Heading", // STR_POCO_PRGM_TOX_IDXH
579 "Index 1",
580 "Index 2",
581 "Index 3",
582 "Index Separator",
583 "Contents Heading",
584 "Contents 1",
585 "Contents 2",
586 "Contents 3",
587 "Contents 4",
588 "Contents 5",
589 "User Index Heading",
590 "User Index 1",
591 "User Index 2",
592 "User Index 3",
593 "User Index 4",
594 "User Index 5",
595 "Contents 6",
596 "Contents 7",
597 "Contents 8",
598 "Contents 9",
599 "Contents 10",
600 "Figure Index Heading",
601 "Figure Index 1",
602 "Object index heading",
603 "Object index 1",
604 "Table index heading",
605 "Table index 1",
606 "Bibliography Heading",
607 "Bibliography 1",
608 "User Index 6",
609 "User Index 7",
610 "User Index 8",
611 "User Index 9",
612 "User Index 10", // STR_POCO_PRGM_TOX_USER10
613 };
614 return s_aRegisterProgNameArray;
615}
616
617const std::vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
618{
619 static const std::vector<OUString> s_aDocProgNameArray = {
620 "Title", // STR_POCO_PRGM_DOC_TITLE
621 "Subtitle",
622 "Appendix",
623 };
624 return s_aDocProgNameArray;
625}
626
627const std::vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
628{
629 static const std::vector<OUString> s_aHTMLProgNameArray = {
630 "Quotations",
631 "Preformatted Text",
632 "Horizontal Line",
633 "List Contents",
634 "List Heading", // STR_POCO_PRGM_HTML_DT
635 };
636 return s_aHTMLProgNameArray;
637}
638
640{
641 static const std::vector<OUString> s_aFrameFormatProgNameArray = {
642 "Frame", // RES_POOLFRM_FRAME
643 "Graphics",
644 "OLE",
645 "Formula",
646 "Marginalia",
647 "Watermark",
648 "Labels", // RES_POOLFRM_LABEL
649 };
650 return s_aFrameFormatProgNameArray;
651}
652
654{
655 static const std::vector<OUString> s_aChrFormatProgNameArray = {
656 "Footnote Symbol", // RES_POOLCHR_FOOTNOTE
657 "Page Number",
658 "Caption characters",
659 "Drop Caps",
660 "Numbering Symbols",
661 "Bullet Symbols",
662 "Internet link",
663 "Visited Internet Link",
664 "Placeholder",
665 "Index Link",
666 "Endnote Symbol",
667 "Line numbering",
668 "Main index entry",
669 "Footnote anchor",
670 "Endnote anchor",
671 "Rubies", // RES_POOLCHR_RUBYTEXT
672 "Vertical Numbering Symbols", // RES_POOLCHR_VERT_NUMBER
673 };
674 return s_aChrFormatProgNameArray;
675}
676
678{
679 static const std::vector<OUString> s_aHTMLChrFormatProgNameArray = {
680 "Emphasis", // RES_POOLCHR_HTML_EMPHASIS
681 "Citation",
682 "Strong Emphasis",
683 "Source Text",
684 "Example",
685 "User Entry",
686 "Variable",
687 "Definition",
688 "Teletype", // RES_POOLCHR_HTML_TELETYPE
689 };
690 return s_aHTMLChrFormatProgNameArray;
691}
692
694{
695 static const std::vector<OUString> s_aPageDescProgNameArray = {
696 "Standard", // STR_POOLPAGE_PRGM_STANDARD
697 "First Page",
698 "Left Page",
699 "Right Page",
700 "Envelope",
701 "Index",
702 "HTML",
703 "Footnote",
704 "Endnote", // STR_POOLPAGE_PRGM_ENDNOTE
705 "Landscape",
706 };
707 return s_aPageDescProgNameArray;
708}
709
710const std::vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
711{
712 static const std::vector<OUString> s_aNumRuleProgNameArray = {
713 "No List",
714 "Numbering 123", // STR_POOLNUMRULE_PRGM_NUM1
715 "Numbering ABC",
716 "Numbering abc",
717 "Numbering IVX",
718 "Numbering ivx",
719 "List 1",
720 "List 2",
721 "List 3",
722 "List 4",
723 "List 5", // STR_POOLNUMRULE_PRGM_BUL5
724 };
725 return s_aNumRuleProgNameArray;
726}
727
729{
730 // XXX MUST match the entries of STR_TABSTYLE_ARY in
731 // sw/source/core/doc/DocumentStylePoolManager.cxx and MUST match the order of
732 // RES_POOL_TABLESTYLE_TYPE in sw/inc/poolfmt.hxx
733 static const std::vector<OUString> s_aTableStyleProgNameArray = {
734 "Default Style", // RES_POOLTABLESTYLE_DEFAULT
735 "3D", // RES_POOLTABLESTYLE_3D
736 "Black 1", // RES_POOLTABLESTYLE_BLACK1
737 "Black 2", // RES_POOLTABLESTYLE_BLACK2
738 "Blue", // RES_POOLTABLESTYLE_BLUE
739 "Brown", // RES_POOLTABLESTYLE_BROWN
740 "Currency", // RES_POOLTABLESTYLE_CURRENCY
741 "Currency 3D", // RES_POOLTABLESTYLE_CURRENCY_3D
742 "Currency Gray", // RES_POOLTABLESTYLE_CURRENCY_GRAY
743 "Currency Lavender", // RES_POOLTABLESTYLE_CURRENCY_LAVENDER
744 "Currency Turquoise", // RES_POOLTABLESTYLE_CURRENCY_TURQUOISE
745 "Gray", // RES_POOLTABLESTYLE_GRAY
746 "Green", // RES_POOLTABLESTYLE_GREEN
747 "Lavender", // RES_POOLTABLESTYLE_LAVENDER
748 "Red", // RES_POOLTABLESTYLE_RED
749 "Turquoise", // RES_POOLTABLESTYLE_TURQUOISE
750 "Yellow", // RES_POOLTABLESTYLE_YELLOW
751 "Academic", // RES_POOLTABLESTYLE_LO6_ACADEMIC
752 "Box List Blue", // RES_POOLTABLESTYLE_LO6_BOX_LIST_BLUE
753 "Box List Green", // RES_POOLTABLESTYLE_LO6_BOX_LIST_GREEN
754 "Box List Red", // RES_POOLTABLESTYLE_LO6_BOX_LIST_RED
755 "Box List Yellow", // RES_POOLTABLESTYLE_LO6_BOX_LIST_YELLOW
756 "Elegant", // RES_POOLTABLESTYLE_LO6_ELEGANT
757 "Financial", // RES_POOLTABLESTYLE_LO6_FINANCIAL
758 "Simple Grid Columns", // RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_COLUMNS
759 "Simple Grid Rows", // RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_ROWS
760 "Simple List Shaded", // RES_POOLTABLESTYLE_LO6_SIMPLE_LIST_SHADED
761 };
762 return s_aTableStyleProgNameArray;
763}
764
767{
768 static const std::vector<OUString> s_aCellStyleProgNameArray;
769 return s_aCellStyleProgNameArray;
770}
771
772const OUString &
774{
775 return lcl_GetSpecialExtraName( rExtraUIName, true );
776}
777
778const OUString &
779SwStyleNameMapper::GetSpecialExtraUIName(const OUString& rExtraProgName)
780{
781 return lcl_GetSpecialExtraName( rExtraProgName, false );
782}
783
784/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwGetPoolIdFromName
std::unordered_map< OUString, sal_uInt16 > NameToIdHash
This class holds all data about the names of styles used in the user interface (UI names....
const LanguageTag & GetUILanguageTag() const
static const std::vector< OUString > & GetListsProgNameArray()
static const std::vector< OUString > & GetHTMLProgNameArray()
static const std::vector< OUString > & GetCellStyleProgNameArray()
returns an empty array because Cell Names aren't translated
static const std::vector< OUString > & GetFrameFormatProgNameArray()
static const std::vector< OUString > & GetCellStyleUINameArray()
returns an empty array because Cell Names aren't translated
static const std::vector< OUString > & GetPageDescProgNameArray()
static const NameToIdHash & getHashTable(SwGetPoolIdFromName, bool bProgName)
static const std::vector< OUString > & GetHTMLChrFormatProgNameArray()
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetChrFormatUINameArray()
static const std::vector< OUString > & GetTableStyleUINameArray()
static const std::vector< OUString > & GetDocProgNameArray()
static const std::vector< OUString > & GetExtraUINameArray()
static const std::vector< OUString > & GetHTMLUINameArray()
static const std::vector< OUString > & GetListsUINameArray()
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetPageDescUINameArray()
static const std::vector< OUString > & GetNumRuleUINameArray()
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetHTMLChrFormatUINameArray()
static void fillNameFromId(sal_uInt16 nId, OUString &rName, bool bProgName)
static const std::vector< OUString > & GetTableStyleProgNameArray()
static sal_uInt16 GetPoolIdFromProgName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static const std::vector< OUString > & GetTextProgNameArray()
static const std::vector< OUString > & GetRegisterProgNameArray()
static SW_DLLPUBLIC const OUString & GetSpecialExtraProgName(const OUString &rExtraUIName)
static const std::vector< OUString > & GetChrFormatProgNameArray()
static const std::vector< OUString > & GetFrameFormatUINameArray()
static const std::vector< OUString > & GetTextUINameArray()
static const std::vector< OUString > & GetRegisterUINameArray()
static const OUString & getNameFromId(sal_uInt16 nId, const OUString &rName, bool bProgName)
static const std::vector< OUString > & GetNumRuleProgNameArray()
static const std::vector< OUString > & GetExtraProgNameArray()
static const std::vector< OUString > & GetDocUINameArray()
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static const OUString & GetSpecialExtraUIName(const OUString &rExtraProgName)
sal_Int32 nIndex
OUString aName
sal_Int16 nId
const sal_uInt16 POOLGRP_TABSTYLE
Definition: poolfmt.hxx:79
const sal_uInt16 COLL_DOC_BITS
Definition: poolfmt.hxx:69
@ RES_POOLCOLL_LABEL_DRAWING
Label drawing objects.
Definition: poolfmt.hxx:358
@ RES_POOLCOLL_REGISTER_BEGIN
Group indices.
Definition: poolfmt.hxx:362
@ RES_POOLCOLL_HTML_BEGIN
Group HTML-styles.
Definition: poolfmt.hxx:430
@ RES_POOLCOLL_HTML_END
End of text styles collection.
Definition: poolfmt.hxx:438
@ RES_POOLCOLL_TEXT_END
Definition: poolfmt.hxx:273
@ RES_POOLCOLL_TEXT_BEGIN
Definition: poolfmt.hxx:248
@ RES_POOLCOLL_EXTRA_BEGIN
Special ranges.
Definition: poolfmt.hxx:327
@ RES_POOLCOLL_LABEL_FRAME
Label frame.
Definition: poolfmt.hxx:348
@ RES_POOLCOLL_LABEL_FIGURE
Label figure.
Definition: poolfmt.hxx:349
@ RES_POOLCOLL_REGISTER_END
Definition: poolfmt.hxx:418
@ RES_POOLCOLL_LABEL_TABLE
Label table.
Definition: poolfmt.hxx:347
@ RES_POOLCOLL_LABEL_ABB
Label illustration.
Definition: poolfmt.hxx:346
@ RES_POOLCOLL_DOC_END
Definition: poolfmt.hxx:427
@ RES_POOLCOLL_LISTS_BEGIN
Group lists.
Definition: poolfmt.hxx:276
@ RES_POOLCOLL_LISTS_END
Definition: poolfmt.hxx:324
@ RES_POOLCOLL_EXTRA_END
Definition: poolfmt.hxx:359
@ RES_POOLCOLL_DOC_BEGIN
Group chapter / document.
Definition: poolfmt.hxx:421
const sal_uInt16 POOLGRP_FRAMEFMT
Definition: poolfmt.hxx:76
@ RES_POOLNUMRULE_BEGIN
Definition: poolfmt.hxx:187
@ RES_POOLNUMRULE_END
Definition: poolfmt.hxx:199
@ RES_POOLPAGE_END
Definition: poolfmt.hxx:181
@ RES_POOLPAGE_BEGIN
Definition: poolfmt.hxx:168
@ RES_POOLCHR_NORMAL_END
Definition: poolfmt.hxx:132
@ RES_POOLCHR_HTML_END
Definition: poolfmt.hxx:144
@ RES_POOLCHR_HTML_BEGIN
HTML-styles.
Definition: poolfmt.hxx:134
@ RES_POOLCHR_NORMAL_BEGIN
Definition: poolfmt.hxx:111
const sal_uInt16 POOLGRP_NOCOLLID
POOLCOLL-IDs: +-—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ !User! Range ! 0 ! Offset ! +-—+—+—+—+—+—+—+—+—+—+—+...
Definition: poolfmt.hxx:59
const sal_uInt16 COLL_GET_RANGE_BITS
Definition: poolfmt.hxx:71
@ RES_POOLCELLSTYLE_BEGIN
Definition: poolfmt.hxx:240
@ RES_POOLCELLSTYLE_END
Definition: poolfmt.hxx:241
const sal_uInt16 POOLGRP_NUMRULE
Definition: poolfmt.hxx:78
const sal_uInt16 COLL_REGISTER_BITS
Definition: poolfmt.hxx:68
@ RES_POOLTABLESTYLE_END
Definition: poolfmt.hxx:235
@ RES_POOLTABLESTYLE_BEGIN
Definition: poolfmt.hxx:205
const sal_uInt16 COLL_TEXT_BITS
Definition: poolfmt.hxx:65
const sal_uInt16 USER_FMT
POLLCOLL-groups:
Definition: poolfmt.hxx:63
const sal_uInt16 POOLGRP_CHARFMT
Other groups:
Definition: poolfmt.hxx:75
const sal_uInt16 POOLGRP_PAGEDESC
Definition: poolfmt.hxx:77
@ RES_POOLFRM_END
Definition: poolfmt.hxx:162
@ RES_POOLFRM_BEGIN
Definition: poolfmt.hxx:152
const sal_uInt16 COLL_HTML_BITS
Definition: poolfmt.hxx:70
const sal_uInt16 COLL_LISTS_BITS
Definition: poolfmt.hxx:66
const sal_uInt16 COLL_EXTRA_BITS
Definition: poolfmt.hxx:67
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:164
sal_uInt16 sal_Unicode
const char * pChar