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 // Interesting, why the rest must be longer than 1 character? It is so
66 // since commit 4fbc9dd48b7cebb304010e7337b1bbc3936c7923 (2001-08-16)
67 return rString.getLength() > 8 && rString.endsWith(" (user)");
68}
69
70void lcl_CheckSuffixAndDelete(OUString & rString)
71{
72 if (lcl_SuffixIsUser(rString))
73 {
74 rString = rString.copy(0, rString.getLength() - 7);
75 }
76}
77
78NameToIdHash HashFromRange(sal_uInt16 nAcc) { return NameToIdHash(nAcc); }
79template <typename... Rest>
80NameToIdHash HashFromRange(sal_uInt16 nAcc, sal_uInt16 nBegin, sal_uInt16 nEnd,
81 const std::vector<OUString>& (*pFunc)(), Rest... rest)
82{
83 NameToIdHash hash(HashFromRange(nAcc + nEnd - nBegin, rest...));
84 sal_uInt16 nIndex, nId;
85 const std::vector<OUString>& rStrings = pFunc();
86 for (nIndex = 0, nId = nBegin; nId < nEnd; nId++, nIndex++)
87 hash[rStrings[nIndex]] = nId;
88 return hash;
89}
90
91template <auto initFunc> struct TablePair
92{
93 static const NameToIdHash& getMap(bool bProgName)
94 {
95 if (bProgName)
96 {
97 static const NameToIdHash s_aProgMap(initFunc(true));
98 return s_aProgMap;
99 }
100
101 SvtSysLocale aSysLocale;
102 const LanguageTag& rCurrentLanguage = aSysLocale.GetUILanguageTag();
103 static std::map<LanguageTag, NameToIdHash> s_aUIMap;
104
105 auto it = s_aUIMap.find(rCurrentLanguage);
106 if (it == s_aUIMap.end())
107 it = s_aUIMap.emplace(rCurrentLanguage, initFunc(false)).first;
108
109 return it->second;
110 }
111};
112
113NameToIdHash GetParaMap (bool bProgName)
114{
115 return HashFromRange(0,
122 );
123};
124
125NameToIdHash GetCharMap(bool bProgName)
126{
127 return HashFromRange(0,
130 );
131};
132
133NameToIdHash GetFrameMap(bool bProgName)
134{
135 return HashFromRange(0,
137 );
138};
139
140NameToIdHash GetPageMap(bool bProgName)
141{
142 return HashFromRange(0,
144 );
145};
146
147NameToIdHash GetNumRuleMap(bool bProgName)
148{
149 return HashFromRange(0,
151 );
152};
153
154NameToIdHash GetTableStyleMap(bool bProgName)
155{
156 return HashFromRange(0,
158 );
159};
160
161NameToIdHash GetCellStyleMap(bool bProgName)
162{
163 return HashFromRange(0,
165 );
166};
167
168} // namespace
169
170#ifdef _NEED_TO_DEBUG_MAPPING
171void SwStyleNameMapper::testNameTable( SwGetPoolIdFromName const nFamily, sal_uInt16 const nStartIndex, sal_uInt16 const nEndIndex )
172{
173 sal_uInt16 nIndex;
174 sal_uInt16 nId;
175
176 for ( nIndex = 0, nId = nStartIndex ; nId < nEndIndex ; nId++,nIndex++ )
177 {
178 OUString aString, bString;
179 FillUIName ( nId, aString );
180 bString = GetProgName ( nFamily, aString );
181 sal_uInt16 nNewId = GetPoolIdFromProgName ( bString, nFamily );
182 FillProgName ( nNewId, aString );
183 bString = GetUIName ( aString, nFamily );
184 nNewId = GetPoolIdFromUIName ( aString, nFamily );
185 if ( nNewId != nId )
186 abort();
187 }
188}
189#endif
190
192{
193#ifdef _NEED_TO_DEBUG_MAPPING
194 static bool bTested = false;
195 if ( !bTested )
196 {
197 bTested = true;
198
210 }
211#endif
212
213 switch ( eFlags )
214 {
216 return TablePair<GetParaMap>::getMap(bProgName);
218 return TablePair<GetCharMap>::getMap(bProgName);
220 return TablePair<GetFrameMap>::getMap(bProgName);
222 return TablePair<GetPageMap>::getMap(bProgName);
224 return TablePair<GetNumRuleMap>::getMap(bProgName);
226 return TablePair<GetTableStyleMap>::getMap(bProgName);
228 return TablePair<GetCellStyleMap>::getMap(bProgName);
229 }
230
231 assert(false); // must not reach here
232 abort();
233}
234
235// This gets the UI name from the programmatic name
236const OUString& SwStyleNameMapper::GetUIName(const OUString& rName,
237 SwGetPoolIdFromName const eFlags)
238{
239 sal_uInt16 nId = GetPoolIdFromProgName ( rName, eFlags );
240 return nId != USHRT_MAX ? GetUIName( nId, rName ) : rName;
241}
242
243// Get the programmatic name from the UI name
245 const OUString& rName, SwGetPoolIdFromName const eFlags)
246{
247 sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
248 return nId != USHRT_MAX ? GetProgName( nId, rName ) : rName;
249}
250
251// Get the programmatic name from the UI name in rName and put it into rFillName
253 const OUString& rName, OUString& rFillName,
254 SwGetPoolIdFromName const eFlags)
255{
256 sal_uInt16 nId = GetPoolIdFromUIName ( rName, eFlags );
257 if ( nId == USHRT_MAX )
258 {
259 // rName isn't in our UI name table...check if it's in the programmatic one
260 nId = GetPoolIdFromProgName ( rName, eFlags );
261
262 rFillName = rName;
263 if (nId == USHRT_MAX )
264 {
265 // It isn't ...make sure the suffix isn't already " (user)"...if it is,
266 // we need to add another one
267 if (lcl_SuffixIsUser(rFillName))
268 rFillName += " (user)";
269 }
270 else
271 {
272 // It's in the programmatic name table...append suffix
273 rFillName += " (user)";
274 }
275 }
276 else
277 {
278 // If we aren't trying to disambiguate, then just do a normal fill
279 fillNameFromId(nId, rFillName, true);
280 }
281
282 if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == SwResId(STR_POOLCHR_STANDARD))
283 rFillName = "Standard";
284}
285
286// Get the UI name from the programmatic name in rName and put it into rFillName
288 const OUString& rName, OUString& rFillName,
289 SwGetPoolIdFromName const eFlags)
290{
291 OUString aName = rName;
292 if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == "Standard")
293 aName = SwResId(STR_POOLCHR_STANDARD);
294
295 sal_uInt16 nId = GetPoolIdFromProgName ( aName, eFlags );
296 if ( nId == USHRT_MAX )
297 {
298 rFillName = aName;
299 // aName isn't in our Prog name table...check if it has a " (user)" suffix, if so remove it
300 lcl_CheckSuffixAndDelete ( rFillName );
301 }
302 else
303 {
304 // If we aren't trying to disambiguate, then just do a normal fill
305 fillNameFromId(nId, rFillName, false);
306 }
307}
308
310 sal_uInt16 const nId, const OUString& rFillName, bool const bProgName)
311{
312 sal_uInt16 nStt = 0;
313 const std::vector<OUString>* pStrArr = nullptr;
314
316 {
317 case COLL_TEXT_BITS:
319 {
320 pStrArr = bProgName ? &GetTextProgNameArray() : &GetTextUINameArray();
322 }
323 break;
324 case COLL_LISTS_BITS:
326 {
327 pStrArr = bProgName ? &GetListsProgNameArray() : &GetListsUINameArray();
329 }
330 break;
331 case COLL_EXTRA_BITS:
333 {
334 pStrArr = bProgName ? &GetExtraProgNameArray() : &GetExtraUINameArray();
336 }
337 break;
340 {
341 pStrArr = bProgName ? &GetRegisterProgNameArray() : &GetRegisterUINameArray();
343 }
344 break;
345 case COLL_DOC_BITS:
347 {
348 pStrArr = bProgName ? &GetDocProgNameArray() : &GetDocUINameArray();
350 }
351 break;
352 case COLL_HTML_BITS:
354 {
355 pStrArr = bProgName ? &GetHTMLProgNameArray() : &GetHTMLUINameArray();
357 }
358 break;
359 case POOLGRP_CHARFMT:
361 {
362 pStrArr = bProgName ? &GetChrFormatProgNameArray() : &GetChrFormatUINameArray();
364 }
366 {
369 }
370 break;
371 case POOLGRP_FRAMEFMT:
373 {
374 pStrArr = bProgName ? &GetFrameFormatProgNameArray() : &GetFrameFormatUINameArray();
375 nStt = RES_POOLFRM_BEGIN;
376 }
377 break;
378 case POOLGRP_PAGEDESC:
380 {
381 pStrArr = bProgName ? &GetPageDescProgNameArray() : &GetPageDescUINameArray();
382 nStt = RES_POOLPAGE_BEGIN;
383 }
384 break;
385 case POOLGRP_NUMRULE:
387 {
388 pStrArr = bProgName ? &GetNumRuleProgNameArray() : &GetNumRuleUINameArray();
390 }
391 break;
392 case POOLGRP_TABSTYLE:
394 {
395 pStrArr = bProgName ? &GetTableStyleProgNameArray() : &GetTableStyleUINameArray();
397 }
398 break;
399 }
400 return pStrArr ? pStrArr->operator[](nId - nStt) : rFillName;
401}
402
404 sal_uInt16 const nId, OUString& rFillName, bool bProgName)
405{
406 rFillName = getNameFromId(nId, rFillName, bProgName);
407}
408
409// Get the UI name from the pool ID
410void SwStyleNameMapper::FillUIName(sal_uInt16 const nId, OUString& rFillName)
411{
412 fillNameFromId(nId, rFillName, false);
413}
414
415// Get the UI name from the pool ID
417 sal_uInt16 const nId, const OUString& rName)
418{
419 return getNameFromId(nId, rName, false);
420}
421
422// Get the programmatic name from the pool ID
423void SwStyleNameMapper::FillProgName(sal_uInt16 nId, OUString& rFillName)
424{
425 fillNameFromId(nId, rFillName, true);
426}
427
428// Get the programmatic name from the pool ID
429const OUString&
430SwStyleNameMapper::GetProgName(sal_uInt16 const nId, const OUString& rName)
431{
432 return getNameFromId(nId, rName, true);
433}
434
435// This gets the PoolId from the UI Name
437 const OUString& rName, SwGetPoolIdFromName const eFlags)
438{
439 const NameToIdHash & rHashMap = getHashTable ( eFlags, false );
440 NameToIdHash::const_iterator aIter = rHashMap.find(rName);
441 return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
442}
443
444// Get the Pool ID from the programmatic name
446 const OUString& rName, SwGetPoolIdFromName const eFlags)
447{
448 const NameToIdHash & rHashMap = getHashTable ( eFlags, true );
449 NameToIdHash::const_iterator aIter = rHashMap.find(rName);
450 return aIter != rHashMap.end() ? (*aIter).second : USHRT_MAX;
451}
452
453// Hard coded Programmatic Name tables
454
456const std::vector<OUString>& SwStyleNameMapper::GetCellStyleUINameArray()
457{
458 static const std::vector<OUString> s_aCellStyleUINameArray;
459 return s_aCellStyleUINameArray;
460}
461
462const std::vector<OUString>& SwStyleNameMapper::GetTextProgNameArray()
463{
464 static const std::vector<OUString> s_aTextProgNameArray = {
465 "Standard", // RES_POOLCOLL_STANDARD
466 "Text body",
467 "First line indent",
468 "Hanging indent",
469 "Text body indent",
470 "Salutation",
471 "Signature",
472 "List Indent", // RES_POOLCOLL_CONFRONTATION
473 "Marginalia",
474 "Heading",
475 "Heading 1",
476 "Heading 2",
477 "Heading 3",
478 "Heading 4",
479 "Heading 5",
480 "Heading 6",
481 "Heading 7",
482 "Heading 8",
483 "Heading 9",
484 "Heading 10", // RES_POOLCOLL_TEXT_END
485 };
486 return s_aTextProgNameArray;
487}
488
489const std::vector<OUString>& SwStyleNameMapper::GetListsProgNameArray()
490{
491 static const std::vector<OUString> s_aListsProgNameArray = {
492 "List", // STR_POCO_PRGM_NUMBER_BULLET_BASE
493 "Numbering 1 Start", // STR_POCO_PRGM_NUM_LEVEL1S
494 "Numbering 1",
495 "Numbering 1 End",
496 "Numbering 1 Cont.",
497 "Numbering 2 Start",
498 "Numbering 2",
499 "Numbering 2 End",
500 "Numbering 2 Cont.",
501 "Numbering 3 Start",
502 "Numbering 3",
503 "Numbering 3 End",
504 "Numbering 3 Cont.",
505 "Numbering 4 Start",
506 "Numbering 4",
507 "Numbering 4 End",
508 "Numbering 4 Cont.",
509 "Numbering 5 Start",
510 "Numbering 5",
511 "Numbering 5 End",
512 "Numbering 5 Cont.",
513 "List 1 Start",
514 "List 1",
515 "List 1 End",
516 "List 1 Cont.",
517 "List 2 Start",
518 "List 2",
519 "List 2 End",
520 "List 2 Cont.",
521 "List 3 Start",
522 "List 3",
523 "List 3 End",
524 "List 3 Cont.",
525 "List 4 Start",
526 "List 4",
527 "List 4 End",
528 "List 4 Cont.",
529 "List 5 Start",
530 "List 5",
531 "List 5 End",
532 "List 5 Cont.", // STR_POCO_PRGM_BULLET_NONUM5
533 };
534 return s_aListsProgNameArray;
535}
536
537const std::vector<OUString>& SwStyleNameMapper::GetExtraProgNameArray()
538{
539 static const std::vector<OUString> s_aExtraProgNameArray = {
540 "Header and Footer", // RES_POOLCOLL_EXTRA_BEGIN
541 "Header",
542 "Header left",
543 "Header right",
544 "Footer",
545 "Footer left",
546 "Footer right",
547 "Table Contents",
548 "Table Heading",
549 "Caption",
550 "Illustration",
551 "Table",
552 "Text",
553 "Figure", // RES_POOLCOLL_LABEL_FIGURE
554 "Frame contents",
555 "Footnote",
556 "Addressee",
557 "Sender",
558 "Endnote",
559 "Drawing",
560 "Comment", // RES_POOLCOLL_COMMENT
561 };
562 return s_aExtraProgNameArray;
563}
564
566{
567 static const std::vector<OUString> s_aRegisterProgNameArray = {
568 "Index", // STR_POCO_PRGM_REGISTER_BASE
569 "Index Heading", // STR_POCO_PRGM_TOX_IDXH
570 "Index 1",
571 "Index 2",
572 "Index 3",
573 "Index Separator",
574 "Contents Heading",
575 "Contents 1",
576 "Contents 2",
577 "Contents 3",
578 "Contents 4",
579 "Contents 5",
580 "User Index Heading",
581 "User Index 1",
582 "User Index 2",
583 "User Index 3",
584 "User Index 4",
585 "User Index 5",
586 "Contents 6",
587 "Contents 7",
588 "Contents 8",
589 "Contents 9",
590 "Contents 10",
591 "Figure Index Heading",
592 "Figure Index 1",
593 "Object index heading",
594 "Object index 1",
595 "Table index heading",
596 "Table index 1",
597 "Bibliography Heading",
598 "Bibliography 1",
599 "User Index 6",
600 "User Index 7",
601 "User Index 8",
602 "User Index 9",
603 "User Index 10", // STR_POCO_PRGM_TOX_USER10
604 };
605 return s_aRegisterProgNameArray;
606}
607
608const std::vector<OUString>& SwStyleNameMapper::GetDocProgNameArray()
609{
610 static const std::vector<OUString> s_aDocProgNameArray = {
611 "Title", // STR_POCO_PRGM_DOC_TITLE
612 "Subtitle",
613 "Appendix",
614 };
615 return s_aDocProgNameArray;
616}
617
618const std::vector<OUString>& SwStyleNameMapper::GetHTMLProgNameArray()
619{
620 static const std::vector<OUString> s_aHTMLProgNameArray = {
621 "Quotations",
622 "Preformatted Text",
623 "Horizontal Line",
624 "List Contents",
625 "List Heading", // STR_POCO_PRGM_HTML_DT
626 };
627 return s_aHTMLProgNameArray;
628}
629
631{
632 static const std::vector<OUString> s_aFrameFormatProgNameArray = {
633 "Frame", // RES_POOLFRM_FRAME
634 "Graphics",
635 "OLE",
636 "Formula",
637 "Marginalia",
638 "Watermark",
639 "Labels", // RES_POOLFRM_LABEL
640 };
641 return s_aFrameFormatProgNameArray;
642}
643
645{
646 static const std::vector<OUString> s_aChrFormatProgNameArray = {
647 "Footnote Symbol", // RES_POOLCHR_FOOTNOTE
648 "Page Number",
649 "Caption characters",
650 "Drop Caps",
651 "Numbering Symbols",
652 "Bullet Symbols",
653 "Internet link",
654 "Visited Internet Link",
655 "Placeholder",
656 "Index Link",
657 "Endnote Symbol",
658 "Line numbering",
659 "Main index entry",
660 "Footnote anchor",
661 "Endnote anchor",
662 "Rubies", // RES_POOLCHR_RUBYTEXT
663 "Vertical Numbering Symbols", // RES_POOLCHR_VERT_NUMBER
664 };
665 return s_aChrFormatProgNameArray;
666}
667
669{
670 static const std::vector<OUString> s_aHTMLChrFormatProgNameArray = {
671 "Emphasis", // RES_POOLCHR_HTML_EMPHASIS
672 "Citation",
673 "Strong Emphasis",
674 "Source Text",
675 "Example",
676 "User Entry",
677 "Variable",
678 "Definition",
679 "Teletype", // RES_POOLCHR_HTML_TELETYPE
680 };
681 return s_aHTMLChrFormatProgNameArray;
682}
683
685{
686 static const std::vector<OUString> s_aPageDescProgNameArray = {
687 "Standard", // STR_POOLPAGE_PRGM_STANDARD
688 "First Page",
689 "Left Page",
690 "Right Page",
691 "Envelope",
692 "Index",
693 "HTML",
694 "Footnote",
695 "Endnote", // STR_POOLPAGE_PRGM_ENDNOTE
696 "Landscape",
697 };
698 return s_aPageDescProgNameArray;
699}
700
701const std::vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
702{
703 static const std::vector<OUString> s_aNumRuleProgNameArray = {
704 "No List",
705 "Numbering 123", // STR_POOLNUMRULE_PRGM_NUM1
706 "Numbering ABC",
707 "Numbering abc",
708 "Numbering IVX",
709 "Numbering ivx",
710 "List 1",
711 "List 2",
712 "List 3",
713 "List 4",
714 "List 5", // STR_POOLNUMRULE_PRGM_BUL5
715 };
716 return s_aNumRuleProgNameArray;
717}
718
720{
721 // XXX MUST match the entries of STR_TABSTYLE_ARY in
722 // sw/source/core/doc/DocumentStylePoolManager.cxx and MUST match the order of
723 // RES_POOL_TABLESTYLE_TYPE in sw/inc/poolfmt.hxx
724 static const std::vector<OUString> s_aTableStyleProgNameArray = {
725 "Default Style", // RES_POOLTABLESTYLE_DEFAULT
726 "3D", // RES_POOLTABLESTYLE_3D
727 "Black 1", // RES_POOLTABLESTYLE_BLACK1
728 "Black 2", // RES_POOLTABLESTYLE_BLACK2
729 "Blue", // RES_POOLTABLESTYLE_BLUE
730 "Brown", // RES_POOLTABLESTYLE_BROWN
731 "Currency", // RES_POOLTABLESTYLE_CURRENCY
732 "Currency 3D", // RES_POOLTABLESTYLE_CURRENCY_3D
733 "Currency Gray", // RES_POOLTABLESTYLE_CURRENCY_GRAY
734 "Currency Lavender", // RES_POOLTABLESTYLE_CURRENCY_LAVENDER
735 "Currency Turquoise", // RES_POOLTABLESTYLE_CURRENCY_TURQUOISE
736 "Gray", // RES_POOLTABLESTYLE_GRAY
737 "Green", // RES_POOLTABLESTYLE_GREEN
738 "Lavender", // RES_POOLTABLESTYLE_LAVENDER
739 "Red", // RES_POOLTABLESTYLE_RED
740 "Turquoise", // RES_POOLTABLESTYLE_TURQUOISE
741 "Yellow", // RES_POOLTABLESTYLE_YELLOW
742 "Academic", // RES_POOLTABLESTYLE_LO6_ACADEMIC
743 "Box List Blue", // RES_POOLTABLESTYLE_LO6_BOX_LIST_BLUE
744 "Box List Green", // RES_POOLTABLESTYLE_LO6_BOX_LIST_GREEN
745 "Box List Red", // RES_POOLTABLESTYLE_LO6_BOX_LIST_RED
746 "Box List Yellow", // RES_POOLTABLESTYLE_LO6_BOX_LIST_YELLOW
747 "Elegant", // RES_POOLTABLESTYLE_LO6_ELEGANT
748 "Financial", // RES_POOLTABLESTYLE_LO6_FINANCIAL
749 "Simple Grid Columns", // RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_COLUMNS
750 "Simple Grid Rows", // RES_POOLTABLESTYLE_LO6_SIMPLE_GRID_ROWS
751 "Simple List Shaded", // RES_POOLTABLESTYLE_LO6_SIMPLE_LIST_SHADED
752 };
753 return s_aTableStyleProgNameArray;
754}
755
758{
759 static const std::vector<OUString> s_aCellStyleProgNameArray;
760 return s_aCellStyleProgNameArray;
761}
762
763const OUString &
765{
766 return lcl_GetSpecialExtraName( rExtraUIName, true );
767}
768
769const OUString &
770SwStyleNameMapper::GetSpecialExtraUIName(const OUString& rExtraProgName)
771{
772 return lcl_GetSpecialExtraName( rExtraProgName, false );
773}
774
775/* 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:364
@ RES_POOLCOLL_HTML_BEGIN
Group HTML-styles.
Definition: poolfmt.hxx:432
@ RES_POOLCOLL_HTML_END
End of text styles collection.
Definition: poolfmt.hxx:440
@ 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:420
@ 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:429
@ 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:361
@ RES_POOLCOLL_DOC_BEGIN
Group chapter / document.
Definition: poolfmt.hxx:423
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:168