LibreOffice Module sw (master) 1
txmsrt.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 <com/sun/star/uri/UriReferenceFactory.hpp>
21
23#include <osl/diagnose.h>
24#include <tools/urlobj.hxx>
26#include <officecfg/Office/Common.hxx>
27#include <txtfld.hxx>
28#include <doc.hxx>
31#include <cntfrm.hxx>
32#include <txtfrm.hxx>
33#include <rootfrm.hxx>
34#include <modeltoviewhelper.hxx>
35#include <node.hxx>
36#include <pam.hxx>
37#include <txttxmrk.hxx>
38#include <frmfmt.hxx>
39#include <fmtfld.hxx>
40#include <txmsrt.hxx>
41#include <ndtxt.hxx>
42#include <swtable.hxx>
43#include <expfld.hxx>
44#include <authfld.hxx>
45#include <toxwrap.hxx>
46
47#include <strings.hrc>
48#include <reffld.hxx>
49#include <docsh.hxx>
50#include <utility>
51
52using namespace ::com::sun::star;
53using namespace ::com::sun::star::uno;
54
55// Initialize strings
57
59 OUString aSortAlgorithm ) :
60 m_eLang( nLang ),
61 m_sSortAlgorithm(std::move(aSortAlgorithm)),
62 m_nOptions( nOpt )
63{
64 Init();
65}
66
68 m_eLang( rIntl.m_eLang ),
69 m_sSortAlgorithm(rIntl.m_sSortAlgorithm),
70 m_nOptions( rIntl.m_nOptions )
71{
72 Init();
73}
74
76{
78
79 const lang::Locale aLcl( LanguageTag::convertToLocale( m_eLang ) );
80 m_pIndexWrapper->SetLocale( aLcl );
81
82 if(m_sSortAlgorithm.isEmpty())
83 {
84 Sequence < OUString > aSeq( m_pIndexWrapper->GetAlgorithmList( aLcl ));
85 if(aSeq.hasElements())
86 m_sSortAlgorithm = aSeq.getConstArray()[0];
87 }
88
90 m_pIndexWrapper->LoadAlgorithm( aLcl, m_sSortAlgorithm, 0 );
91 else
93
94 m_oCharClass.emplace( LanguageTag( aLcl ) );
95
96}
97
99{
100 m_oCharClass.reset();
101 m_pIndexWrapper.reset();
102}
103
104OUString SwTOXInternational::ToUpper( const OUString& rStr, sal_Int32 nPos ) const
105{
106 return m_oCharClass->uppercase( rStr, nPos, 1 );
107}
108
109bool SwTOXInternational::IsNumeric( const OUString& rStr ) const
110{
111 return m_oCharClass->isNumeric( rStr );
112}
113
115 const lang::Locale& rLocale1,
116 const TextAndReading& rTaR2,
117 const lang::Locale& rLocale2 ) const
118{
119 return m_pIndexWrapper->CompareIndexEntry( rTaR1.sText, rTaR1.sReading, rLocale1,
120 rTaR2.sText, rTaR2.sReading, rLocale2 );
121}
122
124 const lang::Locale& rLocale ) const
125{
126 return m_pIndexWrapper->GetIndexKey( rTaR.sText, rTaR.sReading, rLocale );
127}
128
129OUString SwTOXInternational::GetFollowingText( bool bMorePages ) const
130{
131 return m_pIndexWrapper->GetFollowingText( bMorePages );
132}
133
134// SortElement for TOX entries
136 const SwTextTOXMark* pMark,
137 const SwTOXInternational* pInter,
138 const lang::Locale* pLocale )
139 : pTOXNd( nullptr ), pTextMark( pMark ), pTOXIntl( pInter ),
140 nPos( 0 ), nCntPos( 0 ), nType( o3tl::narrowing<sal_uInt16>(nTyp) )
141 , m_bValidText( false )
142{
143 if ( pLocale )
144 aLocale = *pLocale;
145
146 if( !pNd )
147 return;
148
149 sal_Int32 n = 0;
150 if( pTextMark )
151 n = pTextMark->GetStart();
153 aTOXSources.push_back(aTmp);
154
155 nPos = pNd->GetIndex();
156
157 switch( nTyp )
158 {
159 case TOX_SORT_CONTENT:
160 case TOX_SORT_PARA:
161 case TOX_SORT_TABLE:
162 // If they are in a special areas, we should get the position at the
163 // body
164 if( nPos < pNd->GetNodes().GetEndOfExtras().GetIndex() )
165 {
166 // Then get the 'anchor' (body) position
167 Point aPt;
168 std::pair<Point, bool> tmp(aPt, false);
169 const SwContentFrame *const pFrame = pNd->getLayoutFrame(
171 nullptr, &tmp);
172 if( pFrame )
173 {
174 SwPosition aPos( *pNd );
175 const SwDoc& rDoc = pNd->GetDoc();
176 bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame );
177 OSL_ENSURE(bResult, "where is the text node");
178 nPos = aPos.GetNodeIndex();
179 nCntPos = aPos.GetContentIndex();
180 }
181 }
182 else
183 nCntPos = n;
184 break;
185 default: break;
186 }
187}
188
189std::pair<OUString, bool> SwTOXSortTabBase::GetURL(SwRootFrame const*const pLayout) const
190{
191 OUString typeName;
192 SwTOXType const& rType(*pTextMark->GetTOXMark().GetTOXType());
193 switch (rType.GetType())
194 {
195 case TOX_INDEX:
196 typeName = "A";
197 break;
198 case TOX_CONTENT:
199 typeName = "C";
200 break;
201 case TOX_USER:
202 typeName = "U" + rType.GetTypeName();
203 break;
204 default:
205 assert(false); // other tox can't have toxmarks as source
206 break;
207 }
208 OUString const decodedUrl( // counter will be added by caller!
209 OUStringChar(toxMarkSeparator) + pTextMark->GetTOXMark().GetText(pLayout)
210 + OUStringChar(toxMarkSeparator) + typeName
211 + OUStringChar(cMarkSeparator) + "toxmark" );
212
213 return std::make_pair(decodedUrl, true);
214}
215
217{
218 return false;
219}
220
222 sal_uInt16, SwRootFrame const*const) const
223{
224 rNd.InsertText( GetText().sText, rInsPos );
225}
226
228{
229 bool bRet = nPos == rCmp.nPos && nCntPos == rCmp.nCntPos &&
230 (!aTOXSources[0].pNd || !rCmp.aTOXSources[0].pNd ||
231 aTOXSources[0].pNd == rCmp.aTOXSources[0].pNd );
232
233 if( TOX_SORT_CONTENT == nType )
234 {
235 bRet = bRet && pTextMark && rCmp.pTextMark &&
236 pTextMark->GetStart() == rCmp.pTextMark->GetStart();
237
238 if( bRet )
239 {
240 // Both pointers exist -> compare text
241 // else -> compare AlternativeText
242 const sal_Int32 *pEnd = pTextMark->End();
243 const sal_Int32 *pEndCmp = rCmp.pTextMark->End();
244
245 bRet = ( ( pEnd && pEndCmp ) || ( !pEnd && !pEndCmp ) ) &&
247 rCmp.GetText(), rCmp.GetLocale() );
248 }
249 }
250 return bRet;
251}
252
254{
255 if( nPos < rCmp.nPos )
256 return true;
257
258 if( nPos == rCmp.nPos )
259 {
260 if( nCntPos < rCmp.nCntPos )
261 return true;
262
263 if( nCntPos == rCmp.nCntPos )
264 {
265 const SwNode* pFirst = aTOXSources[0].pNd;
266 const SwNode* pNext = rCmp.aTOXSources[0].pNd;
267
268 if( pFirst && pFirst == pNext )
269 {
270 if( TOX_SORT_CONTENT == nType && pTextMark && rCmp.pTextMark )
271 {
272 if( pTextMark->GetStart() < rCmp.pTextMark->GetStart() )
273 return true;
274
275 if( pTextMark->GetStart() == rCmp.pTextMark->GetStart() )
276 {
277 const sal_Int32 *pEnd = pTextMark->End();
278 const sal_Int32 *pEndCmp = rCmp.pTextMark->End();
279
280 // Both pointers exist -> compare text
281 // else -> compare AlternativeText
282 if( ( pEnd && pEndCmp ) || ( !pEnd && !pEndCmp ) )
283 {
284 return pTOXIntl->IsLess( GetText(), GetLocale(),
285 rCmp.GetText(), rCmp.GetLocale() );
286 }
287 if( pEnd && !pEndCmp )
288 return true;
289 }
290 }
291 }
292 else if( pFirst && pFirst->IsTextNode() &&
293 pNext && pNext->IsTextNode() )
294 return ::IsFrameBehind( *static_cast<const SwTextNode*>(pNext), nCntPos,
295 *static_cast<const SwTextNode*>(pFirst), nCntPos );
296 }
297 }
298 return false;
299}
300
301// Sorted keyword entry
303 const SwTextTOXMark* pMark, SwTOIOptions nOptions,
304 sal_uInt8 nKyLevel,
305 const SwTOXInternational& rIntl,
306 const lang::Locale& rLocale )
307 : SwTOXSortTabBase( TOX_SORT_INDEX, &rNd, pMark, &rIntl, &rLocale ),
308 nKeyLevel(nKyLevel)
309{
310 nPos = rNd.GetIndex();
311 nOpt = nOptions;
312}
313
314// Compare keywords. Only relates to the text.
315
317{
318 const SwTOXIndex& rCmp = static_cast<const SwTOXIndex&>(rCmpBase);
319
320 // Respect case taking dependencies into account
321 if(GetLevel() != rCmp.GetLevel() || nKeyLevel != rCmp.nKeyLevel)
322 return false;
323
324 OSL_ENSURE(pTextMark, "pTextMark == 0, No keyword");
325
326 bool bRet = pTOXIntl->IsEqual( GetText(), GetLocale(),
327 rCmp.GetText(), rCmp.GetLocale() );
328
329 // If we don't summarize we need to evaluate the Pos
330 if(bRet && !(GetOptions() & SwTOIOptions::SameEntry))
331 bRet = nPos == rCmp.nPos;
332
333 return bRet;
334}
335
336// operator, only depends on the text
337
339{
340 OSL_ENSURE(pTextMark, "pTextMark == 0, No keyword");
341
342 const TextAndReading aMyTaR(GetText());
343 const TextAndReading aOtherTaR(rCmpBase.GetText());
344
345 bool bRet = GetLevel() == rCmpBase.GetLevel() &&
346 pTOXIntl->IsLess( aMyTaR, GetLocale(),
347 aOtherTaR, rCmpBase.GetLocale() );
348
349 // If we don't summarize we need to evaluate the Pos
350 if( !bRet && !(GetOptions() & SwTOIOptions::SameEntry) )
351 {
352 bRet = pTOXIntl->IsEqual( aMyTaR, GetLocale(),
353 aOtherTaR, rCmpBase.GetLocale() ) &&
354 nPos < rCmpBase.nPos;
355 }
356
357 return bRet;
358}
359
360// The keyword itself
361
363{
364 OSL_ENSURE(pTextMark, "pTextMark == 0, No keyword");
365 const SwTOXMark& rTOXMark = pTextMark->GetTOXMark();
366
367 TextAndReading aRet;
368 switch(nKeyLevel)
369 {
370 case FORM_PRIMARY_KEY :
371 {
372 aRet.sText = rTOXMark.GetPrimaryKey();
373 aRet.sReading = rTOXMark.GetPrimaryKeyReading();
374 }
375 break;
376 case FORM_SECONDARY_KEY :
377 {
378 aRet.sText = rTOXMark.GetSecondaryKey();
379 aRet.sReading = rTOXMark.GetSecondaryKeyReading();
380 }
381 break;
382 case FORM_ENTRY :
383 {
384 aRet.sText = rTOXMark.GetText(pLayout);
385 aRet.sReading = rTOXMark.GetTextReading();
386 }
387 break;
388 }
389 // if SwTOIOptions::InitialCaps is set, first character is to be capitalized
390 if( SwTOIOptions::InitialCaps & nOpt && pTOXIntl && !aRet.sText.isEmpty())
391 {
392 aRet.sText = pTOXIntl->ToUpper( aRet.sText, 0 ) + aRet.sText.subView(1);
393 }
394
395 return aRet;
396}
397
398void SwTOXIndex::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uInt16,
399 SwRootFrame const*const pLayout) const
400{
401 assert(!"sw_redlinehide: this is dead code, Bibliography only has SwTOXAuthority");
402 const sal_Int32* pEnd = pTextMark->End();
403
404 TextAndReading aRet;
405 if( pEnd && !pTextMark->GetTOXMark().IsAlternativeText() &&
407 {
408 aRet.sText = static_cast<const SwTextNode*>(aTOXSources[0].pNd)->GetExpandText(
409 pLayout,
411 *pEnd - pTextMark->GetStart(),
412 false, false, false,
414 | (pLayout && pLayout->IsHideRedlines()
416 : ExpandMode(0)));
417 if(SwTOIOptions::InitialCaps & nOpt && pTOXIntl && !aRet.sText.isEmpty())
418 {
419 aRet.sText = pTOXIntl->ToUpper( aRet.sText, 0 ) + aRet.sText.subView(1);
420 }
421 }
422 else
423 aRet = GetText();
424
425 rNd.InsertText( aRet.sText, rInsPos );
426}
427
428sal_uInt16 SwTOXIndex::GetLevel() const
429{
430 OSL_ENSURE(pTextMark, "pTextMark == 0, No keyword");
431
432 sal_uInt16 nForm = FORM_PRIMARY_KEY;
433
435 !pTextMark->GetTOXMark().GetPrimaryKey().isEmpty() )
436 {
437 nForm = FORM_SECONDARY_KEY;
438 if( !pTextMark->GetTOXMark().GetSecondaryKey().isEmpty() )
439 nForm = FORM_ENTRY;
440 }
441 return nForm;
442}
443
444// Key and separator
446 sal_uInt16 nLevel,
447 const SwTOXInternational& rIntl,
448 const lang::Locale& rLocale )
449 : SwTOXSortTabBase( TOX_SORT_CUSTOM, nullptr, nullptr, &rIntl, &rLocale ),
450 m_aKey(std::move(aKey)), nLev(nLevel)
451{
452}
453
455{
456 return GetLevel() == rCmpBase.GetLevel() &&
458 rCmpBase.GetText(), rCmpBase.GetLocale() );
459}
460
462{
463 return GetLevel() <= rCmpBase.GetLevel() &&
465 rCmpBase.GetText(), rCmpBase.GetLocale() );
466}
467
468sal_uInt16 SwTOXCustom::GetLevel() const
469{
470 return nLev;
471}
472
474{
475 return m_aKey;
476}
477
478// Sorts the TOX entries
480 const SwTOXInternational& rIntl)
481 : SwTOXSortTabBase( TOX_SORT_CONTENT, &rNd, pMark, &rIntl )
482{
483}
484
485// The content's text
486
488{
489 const sal_Int32* pEnd = pTextMark->End();
490 if( pEnd && !pTextMark->GetTOXMark().IsAlternativeText() )
491 {
492 return TextAndReading(
493 static_cast<const SwTextNode*>(aTOXSources[0].pNd)->GetExpandText(
494 pLayout,
496 *pEnd - pTextMark->GetStart(),
497 false, false, false,
499 | (pLayout && pLayout->IsHideRedlines()
501 : ExpandMode(0))),
503 }
504
505 return TextAndReading(pTextMark->GetTOXMark().GetAlternativeText(), OUString());
506}
507
508void SwTOXContent::FillText(SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uInt16,
509 SwRootFrame const*const pLayout) const
510{
511 assert(!"sw_redlinehide: this is dead code, Bibliography only has SwTOXAuthority");
512 const sal_Int32* pEnd = pTextMark->End();
513 if( pEnd && !pTextMark->GetTOXMark().IsAlternativeText() )
514 // sw_redlinehide: this probably won't HideDeletions
515 static_cast<const SwTextNode*>(aTOXSources[0].pNd)->CopyExpandText(
516 rNd, &rInsPos, pTextMark->GetStart(),
517 *pEnd - pTextMark->GetStart(), pLayout);
518 else
519 {
520 rNd.InsertText( GetText().sText, rInsPos );
521 }
522}
523
524// The level for displaying it
525
526sal_uInt16 SwTOXContent::GetLevel() const
527{
528 return pTextMark->GetTOXMark().GetLevel();
529}
530
531// TOX assembled from paragraphs
532// Watch out for OLE/graphics when sorting!
533// The position must not come from the document, but from the "anchor"!
534SwTOXPara::SwTOXPara(SwContentNode& rNd, SwTOXElement eT, sal_uInt16 nLevel, OUString sSeqName)
535 : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, nullptr, nullptr ),
536 eType( eT ),
537 m_nLevel(nLevel),
538 nStartIndex(0),
539 nEndIndex(-1),
540 m_sSequenceName(std::move( sSeqName ))
541{
542 // tdf#123313 create any missing bookmarks *before* generating ToX nodes!
543 switch (eType)
544 {
547 assert(rNd.IsTextNode());
550 break;
551 default:
552 break;
553 }
554}
555
557{
558 const SwContentNode* pNd = aTOXSources[0].pNd;
559 switch( eType )
560 {
562 if (nStartIndex != 0 || nEndIndex != -1)
563 {
564 // sw_redlinehide: "captions" are a rather fuzzily defined concept anyway
565 return TextAndReading(static_cast<const SwTextNode*>(pNd)->GetExpandText(
566 pLayout,
568 nEndIndex == -1 ? -1 : nEndIndex - nStartIndex,
569 false, false, false,
570 pLayout && pLayout->IsHideRedlines()
572 : ExpandMode(0)),
573 OUString());
574 }
575 [[fallthrough]];
578 {
579 assert(nStartIndex == 0);
580 assert(nEndIndex == -1);
582 pLayout, *static_cast<const SwTextNode*>(pNd),
584 OUString());
585 }
586 break;
587
591 {
592 // Find the FlyFormat; the object/graphic name is there
593 SwFrameFormat* pFly = pNd->GetFlyFormat();
594 if( pFly )
595 return TextAndReading(pFly->GetName(), OUString());
596
597 OSL_ENSURE( false, "Graphic/object without name" );
599 ? STR_OBJECT_DEFNAME
601 ? STR_GRAPHIC_DEFNAME
602 : STR_FRAME_DEFNAME;
603 return TextAndReading(SwResId(pId), OUString());
604 }
605 break;
606 default: break;
607 }
608 return TextAndReading();
609}
610
611void SwTOXPara::FillText( SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uInt16,
612 SwRootFrame const*const pLayout) const
613{
614 assert(!"sw_redlinehide: this is dead code, Bibliography only has SwTOXAuthority");
616 {
617 const SwTextNode* pSrc = static_cast<const SwTextNode*>(aTOXSources[0].pNd);
619 && (nStartIndex != 0 || nEndIndex != -1))
620 {
621 pSrc->CopyExpandText( rNd, &rInsPos, nStartIndex,
622 nEndIndex == -1 ? -1 : nEndIndex - nStartIndex,
623 pLayout, false, false, true );
624 }
625 else
626 {
627 assert(nStartIndex == 0);
628 assert(nEndIndex == -1);
629 // sw_redlinehide: this probably won't HideDeletions
630 pSrc->CopyExpandText( rNd, &rInsPos, 0, -1,
631 pLayout, false, false, true );
632 if (pLayout && pLayout->HasMergedParas())
633 {
634 if (SwTextFrame const*const pFrame = static_cast<SwTextFrame*>(pSrc->getLayoutFrame(pLayout)))
635 {
636 if (sw::MergedPara const*const pMerged = pFrame->GetMergedPara())
637 {
638 // pSrc already copied above
639 assert(pSrc == pMerged->pParaPropsNode);
640 for (SwNodeOffset i = pSrc->GetIndex() + 1;
641 i <= pMerged->pLastNode->GetIndex(); ++i)
642 {
643 SwNode *const pTmp(pSrc->GetNodes()[i]);
645 {
646
648 rNd, &rInsPos, 0, -1,
649 pLayout, false, false, false );
650 }
651 }
652 }
653 }
654 }
655 }
656 }
657 else
658 {
659 rNd.InsertText( GetText().sText.replace('\t', ' '), rInsPos );
660 }
661}
662
663sal_uInt16 SwTOXPara::GetLevel() const
664{
665 sal_uInt16 nRet = m_nLevel;
666 const SwContentNode* pNd = aTOXSources[0].pNd;
667
669 {
670 const int nTmp = static_cast<const SwTextNode*>(pNd)->GetAttrOutlineLevel();
671 if(nTmp != 0 )
672 nRet = o3tl::narrowing<sal_uInt16>(nTmp);
673 }
674 return nRet;
675}
676
677std::pair<OUString, bool> SwTOXPara::GetURL(SwRootFrame const*const) const
678{
679 OUString aText;
680 const SwContentNode* pNd = aTOXSources[0].pNd;
681 switch( eType )
682 {
685 {
686 const SwTextNode * pTextNd = pNd->GetTextNode();
687
688 SwDoc& rDoc = const_cast<SwDoc&>( pTextNd->GetDoc() );
689 // tdf#123313: this *must not* create a bookmark, its Undo would
690 // be screwed! create it as preparatory step, in ctor!
691 ::sw::mark::IMark const * const pMark = rDoc.getIDocumentMarkAccess()->getMarkForTextNode(
692 *pTextNd,
694 aText = "#" + pMark->GetName();
695 }
696 break;
697
701 {
702 // Find the FlyFormat; the object/graphic name is there
703 SwFrameFormat* pFly = pNd->GetFlyFormat();
704 if( pFly )
705 {
706 aText = "#" + pFly->GetName() + OUStringChar(cMarkSeparator);
707 const char* pStr;
708 switch( eType )
709 {
710 case SwTOXElement::Ole: pStr = "ole"; break;
711 case SwTOXElement::Graphic: pStr = "graphic"; break;
712 case SwTOXElement::Frame: pStr = "frame"; break;
713 default: pStr = nullptr;
714 }
715 if( pStr )
716 aText += OUString::createFromAscii( pStr );
717 }
718 }
719 break;
721 {
722 aText = "#" + m_sSequenceName + OUStringChar(cMarkSeparator)
723 + "sequence";
724 }
725 break;
726 default: break;
727 }
728 return std::make_pair(aText, false);
729}
730
732{
733 switch (eType)
734 {
738 return nStartIndex == 0 && nEndIndex == -1;
739 default:
740 return false;
741 }
742}
743
744// Table
746 : SwTOXSortTabBase( TOX_SORT_TABLE, &rNd, nullptr, nullptr ),
748{
749}
750
752{
753 const SwNode* pNd = aTOXSources[0].pNd;
754 if( pNd )
755 {
756 const SwTableNode* pTableNd =
757 pNd->FindTableNode();
758 if (pTableNd)
759 {
760 return TextAndReading(pTableNd->GetTable().GetFrameFormat()->GetName(), OUString());
761 }
762 }
763
764 OSL_ENSURE( false, "Where's my table?" );
765 return TextAndReading(SwResId( STR_TABLE_DEFNAME ), OUString());
766}
767
768sal_uInt16 SwTOXTable::GetLevel() const
769{
770 return nLevel;
771}
772
773std::pair<OUString, bool> SwTOXTable::GetURL(SwRootFrame const*const) const
774{
775 const SwNode* pNd = aTOXSources[0].pNd;
776 if (!pNd)
777 return std::make_pair(OUString(), false);
778
779 pNd = pNd->FindTableNode();
780 if (!pNd)
781 return std::make_pair(OUString(), false);
782
783 const OUString sName = static_cast<const SwTableNode*>(pNd)->GetTable().GetFrameFormat()->GetName();
784 if ( sName.isEmpty() )
785 return std::make_pair(OUString(), false);
786
787 return std::make_pair("#" + sName + OUStringChar(cMarkSeparator) + "table", false);
788}
789
791 SwFormatField& rField, const SwTOXInternational& rIntl ) :
792 SwTOXSortTabBase( TOX_SORT_AUTHORITY, &rNd, nullptr, &rIntl ),
793 m_rField(rField)
794{
795 if(rField.GetTextField())
796 nCntPos = rField.GetTextField()->GetStart();
797}
798
799sal_uInt16 SwTOXAuthority::GetLevel() const
800{
802 //#i18655# the level '0' is the heading level therefore the values are incremented here
803 sal_uInt16 nRet = 1;
804 if( pTOXIntl->IsNumeric( sText ) )
805 {
806 nRet = sText.toUInt32();
807 nRet++;
808 }
809 //illegal values are also set to 'ARTICLE' as non-numeric values are
810 if(nRet > AUTH_TYPE_END)
811 nRet = 1;
812 return nRet;
813}
814
815static OUString lcl_GetText(SwFormatField const& rField, SwRootFrame const*const pLayout)
816{
817 return rField.GetField()->ExpandField(true, pLayout);
818}
819
821{
822 return TextAndReading(lcl_GetText(m_rField, pLayout), OUString());
823}
824
825OUString SwTOXAuthority::GetText(sal_uInt16 nAuthField, const SwRootFrame* pLayout) const
826{
827 SwAuthorityField* pField = static_cast<SwAuthorityField*>(m_rField.GetField());
828 OUString sText;
829 if(AUTH_FIELD_IDENTIFIER == nAuthField)
830 {
831 sText = lcl_GetText(m_rField, pLayout);
832 const SwAuthorityFieldType* pType = static_cast<const SwAuthorityFieldType*>(pField->GetTyp());
833 sal_Unicode cChar = pType->GetPrefix();
834 if(cChar && cChar != ' ')
835 sText = sText.copy(1);
836 cChar = pType->GetSuffix();
837 if(cChar && cChar != ' ')
838 sText = sText.copy(0, sText.getLength() - 1);
839 }
840 else if(AUTH_FIELD_AUTHORITY_TYPE == nAuthField)
841 {
842 sal_uInt16 nLevel = GetLevel();
843 if(nLevel)
844 sText = SwAuthorityFieldType::GetAuthTypeName(static_cast<ToxAuthorityType>(--nLevel));
845 }
846 else
847 sText = pField->GetFieldText(static_cast<ToxAuthorityField>(nAuthField));
848 return sText;
849}
850
851OUString SwTOXAuthority::GetSourceURL(const OUString& rText)
852{
853 OUString aText = rText;
854
855 uno::Reference<uri::XUriReferenceFactory> xUriReferenceFactory
856 = uri::UriReferenceFactory::create(comphelper::getProcessComponentContext());
857 uno::Reference<uri::XUriReference> xUriRef;
858 try
859 {
860 xUriRef = xUriReferenceFactory->parse(aText);
861 }
862 catch (const uno::Exception& rException)
863 {
864 SAL_WARN("sw.core",
865 "SwTOXAuthority::GetSourceURL: failed to parse url: " << rException.Message);
866 }
867 if (xUriRef.is() && xUriRef->getFragment().startsWith("page="))
868 {
869 xUriRef->clearFragment();
870 aText = xUriRef->getUriReference();
871 }
872
873 return aText;
874}
875
876void SwTOXAuthority::FillText(SwTextNode& rNd, const SwContentIndex& rInsPos, sal_uInt16 nAuthField,
877 SwRootFrame const* const pLayout) const
878{
879 OUString aText = GetText(nAuthField, pLayout);
880 if (nAuthField == AUTH_FIELD_URL)
881 {
882 aText = GetSourceURL(aText);
883
884 // Convert URL to a relative one if requested.
885 SwDoc* pDoc = static_cast<SwAuthorityFieldType*>(m_rField.GetField()->GetTyp())->GetDoc();
886 SwDocShell* pDocShell = pDoc->GetDocShell();
887 const OUString aBaseURL = pDocShell->getDocumentBaseURL();
888 std::u16string_view aBaseURIScheme;
889 sal_Int32 nSep = aBaseURL.indexOf(':');
890 if (nSep != -1)
891 {
892 aBaseURIScheme = aBaseURL.subView(0, nSep);
893 }
894
895 uno::Reference<uri::XUriReferenceFactory> xUriReferenceFactory
896 = uri::UriReferenceFactory::create(comphelper::getProcessComponentContext());
897 uno::Reference<uri::XUriReference> xUriRef;
898 try
899 {
900 xUriRef = xUriReferenceFactory->parse(aText);
901 }
902 catch (const uno::Exception& rException)
903 {
904 SAL_WARN("sw.core",
905 "SwTOXAuthority::FillText: failed to parse url: " << rException.Message);
906 }
907
909 if (xUriRef.is() && bSaveRelFSys && xUriRef->getScheme() == aBaseURIScheme)
910 {
911 aText = INetURLObject::GetRelURL(aBaseURL, aText);
912 }
913 }
914
915 rNd.InsertText(aText, rInsPos);
916}
917
919{
920 if (nType != rCmp.nType)
921 {
922 return false;
923 }
924
925 // Compare our SwAuthEntry and rCmp's SwAuthEntry, but the URL is considered equivalent, as long
926 // as it only differs in a page number, as that's still the same source.
927 const SwAuthEntry* pThis = static_cast<SwAuthorityField*>(m_rField.GetField())->GetAuthEntry();
928 const SwAuthEntry* pOther = static_cast<SwAuthorityField*>(
929 static_cast<const SwTOXAuthority&>(rCmp).m_rField.GetField())
930 ->GetAuthEntry();
931 if (pThis == pOther)
932 {
933 return true;
934 }
935
936 for (int i = 0; i < AUTH_FIELD_END; ++i)
937 {
938 auto eField = static_cast<ToxAuthorityField>(i);
939 if (eField == AUTH_FIELD_URL)
940 {
943 {
944 return false;
945 }
946 continue;
947 }
948
949 if (pThis->GetAuthorField(eField) != pOther->GetAuthorField(eField))
950 {
951 return false;
952 }
953 }
954
955 return true;
956}
957
959{
960 bool bRet = false;
961 SwAuthorityField* pField = static_cast<SwAuthorityField*>(m_rField.GetField());
962 SwAuthorityFieldType* pType = static_cast<SwAuthorityFieldType*>(
963 pField->GetTyp());
964 if(pType->IsSortByDocument())
965 bRet = SwTOXSortTabBase::sort_lt(rBase);
966 else
967 {
968 SwAuthorityField* pCmpField =
969 static_cast<SwAuthorityField*>(static_cast<const SwTOXAuthority&>(rBase).m_rField.GetField());
970
971 for(sal_uInt16 i = 0; i < pType->GetSortKeyCount(); i++)
972 {
973 const SwTOXSortKey* pKey = pType->GetSortKey(i);
974 const TextAndReading aMy(pField->GetFieldText(pKey->eField), OUString());
975 const TextAndReading aOther(pCmpField->GetFieldText(pKey->eField), OUString());
976
977 sal_Int32 nComp = pTOXIntl->Compare( aMy, GetLocale(),
978 aOther, rBase.GetLocale() );
979
980 if( nComp )
981 {
982 bRet = (-1 == nComp) == pKey->bSortAscending;
983 break;
984 }
985 }
986 }
987 return bRet;
988}
989
990/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 m_nLevel
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual ::sw::mark::IMark * getMarkForTextNode(const SwTextNode &rTextNode, MarkType eMark)=0
Returns a mark in the document for a paragraph.
static OUString GetRelURL(std::u16string_view rTheBaseURIRef, OUString const &rTheAbsURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
virtual OUString getDocumentBaseURL() const override
OUString const & GetAuthorField(ToxAuthorityField ePos) const
Definition: authfld.hxx:231
const SwTOXSortKey * GetSortKey(sal_uInt16 nIdx) const
Definition: authfld.cxx:441
sal_Unicode GetPrefix() const
Definition: authfld.hxx:122
static OUString const & GetAuthTypeName(ToxAuthorityType eType)
Definition: initui.cxx:282
sal_Unicode GetSuffix() const
Definition: authfld.hxx:123
bool IsSortByDocument() const
Definition: authfld.hxx:125
sal_uInt16 GetSortKeyCount() const
Definition: authfld.cxx:436
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bib...
Definition: authfld.hxx:161
const OUString & GetFieldText(ToxAuthorityField eField) const
Definition: authfld.cxx:550
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
Marks a character position inside a document model content node (SwContentNode)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Definition: node.cxx:1223
Definition: doc.hxx:197
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:419
IDocumentMarkAccess * getIDocumentMarkAccess()
Definition: docbm.cxx:1890
SwDocShell * GetDocShell()
Definition: doc.hxx:1370
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
Definition: fldbas.cxx:491
SwFieldType * GetTyp() const
Definition: fldbas.hxx:402
const SwField * GetField() const
Definition: fmtfld.hxx:131
const SwTextField * GetTextField() const
Definition: fmtfld.hxx:149
const OUString & GetName() const
Definition: format.hxx:131
Style of a layout element.
Definition: frmfmt.hxx:72
Base class of the Writer document model elements.
Definition: node.hxx:98
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
Definition: node.cxx:738
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:706
SwDoc & GetDoc()
Definition: node.hxx:233
bool IsTextNode() const
Definition: node.hxx:190
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:380
Merge GetRedlineMergeFlag() const
Definition: node.hxx:116
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
bool HasMergedParas() const
Definition: wsfrm.cxx:4773
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
Definition: rootfrm.hxx:434
OUString ToUpper(const OUString &rStr, sal_Int32 nPos) const
Definition: txmsrt.cxx:104
bool IsNumeric(const OUString &rStr) const
Definition: txmsrt.cxx:109
OUString GetIndexKey(const TextAndReading &rTaR, const css::lang::Locale &rLcl) const
Definition: txmsrt.cxx:123
std::optional< CharClass > m_oCharClass
Definition: txmsrt.hxx:77
LanguageType m_eLang
Definition: txmsrt.hxx:78
std::unique_ptr< IndexEntrySupplierWrapper > m_pIndexWrapper
Definition: txmsrt.hxx:76
bool IsLess(const TextAndReading &rTaR1, const css::lang::Locale &rLocale1, const TextAndReading &rTaR2, const css::lang::Locale &rLocale2) const
Definition: txmsrt.hxx:103
SwTOIOptions m_nOptions
Definition: txmsrt.hxx:80
sal_Int32 Compare(const TextAndReading &rTaR1, const css::lang::Locale &rLocale1, const TextAndReading &rTaR2, const css::lang::Locale &rLocale2) const
Definition: txmsrt.cxx:114
OUString GetFollowingText(bool bMorePages) const
Definition: txmsrt.cxx:129
SwTOXInternational(LanguageType nLang, SwTOIOptions nOptions, OUString aSortAlgorithm)
Definition: txmsrt.cxx:58
bool IsEqual(const TextAndReading &rTaR1, const css::lang::Locale &rLocale1, const TextAndReading &rTaR2, const css::lang::Locale &rLocale2) const
Definition: txmsrt.hxx:95
OUString m_sSortAlgorithm
Definition: txmsrt.hxx:79
const SwTOXType * GetTOXType() const
Definition: tox.hxx:576
sal_uInt16 GetLevel() const
Definition: tox.hxx:628
OUString const & GetSecondaryKeyReading() const
Definition: tox.hxx:658
const OUString & GetAlternativeText() const
Definition: tox.hxx:570
bool IsAlternativeText() const
Definition: tox.hxx:579
OUString const & GetSecondaryKey() const
Definition: tox.hxx:640
OUString GetText(SwRootFrame const *pLayout) const
Definition: tox.cxx:201
OUString const & GetPrimaryKey() const
Definition: tox.hxx:634
bool IsMainEntry() const
Definition: tox.hxx:155
OUString const & GetTextReading() const
Definition: tox.hxx:646
OUString const & GetPrimaryKeyReading() const
Definition: tox.hxx:652
const OUString & GetTypeName() const
Definition: tox.hxx:690
TOXTypes GetType() const
Definition: tox.hxx:693
const SwTable & GetTable() const
Definition: node.hxx:542
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:209
const sal_Int32 * End() const
Definition: txatbase.hxx:156
sal_Int32 GetStart() const
Definition: txatbase.hxx:88
const SwTOXMark & GetTOXMark() const
Definition: txatbase.hxx:232
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
OUString InsertText(const OUString &rStr, const SwContentIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
Definition: ndtxt.cxx:2372
bool CopyExpandText(SwTextNode &rDestNd, const SwContentIndex *pDestIdx, sal_Int32 nIdx, sal_Int32 nLen, SwRootFrame const *pLayout, bool bWithNum=false, bool bWithFootnote=true, bool bReplaceTabsWithSpaces=false) const
Definition: ndtxt.cxx:3558
virtual const OUString & GetName() const =0
const SwTextNode * GetBodyTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwFrame &rFrame)
Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes.
Definition: expfld.cxx:163
DocumentType eType
OUString sName
sal_Int64 n
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
const char * pLocale
#define SAL_WARN(area, stream)
ExpandMode
Some helpers for converting model strings to view strings.
Reference< XComponentContext > getProcessComponentContext()
int i
constexpr T1 narrowing(T2 value)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
eField
OUString typeName
QPRO_FUNC_TYPE nType
bool IsFrameBehind(const SwTextNode &rMyNd, sal_Int32 nMySttPos, const SwTextNode &rBehindNd, sal_Int32 nSttPos)
Definition: reffld.cxx:100
static LanguageType nLang
Definition: srtdlg.cxx:51
Marks a position in the document model.
Definition: pam.hxx:38
SwNodeOffset GetNodeIndex() const
Definition: pam.hxx:78
sal_Int32 GetContentIndex() const
Definition: pam.hxx:85
Represents one row in the bibliography table.
Definition: txmsrt.hxx:287
SwFormatField & m_rField
Definition: txmsrt.hxx:289
virtual bool equivalent(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:918
virtual void FillText(SwTextNode &rNd, const SwContentIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:876
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:820
virtual bool sort_lt(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:958
SwTOXAuthority(const SwContentNode &rNd, SwFormatField &rField, const SwTOXInternational &rIntl)
Definition: txmsrt.cxx:790
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:799
static OUString GetSourceURL(const OUString &rText)
Gets the URL of the underlying SwAuthEntry, ignoring its page number.
Definition: txmsrt.cxx:851
virtual void FillText(SwTextNode &rNd, const SwContentIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:508
SwTOXContent(const SwTextNode &, const SwTextTOXMark *, const SwTOXInternational &rIntl)
Definition: txmsrt.cxx:479
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:526
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:487
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:473
SwTOXCustom(TextAndReading aKey, sal_uInt16 nLevel, const SwTOXInternational &rIntl, const css::lang::Locale &rLocale)
Definition: txmsrt.cxx:445
sal_uInt16 nLev
Definition: txmsrt.hxx:225
virtual bool equivalent(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:454
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:468
TextAndReading m_aKey
Definition: txmsrt.hxx:224
virtual bool sort_lt(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:461
For sorting by text.
Definition: txmsrt.hxx:194
virtual bool equivalent(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:316
SwTOXIndex(const SwTextNode &, const SwTextTOXMark *, SwTOIOptions nOptions, sal_uInt8 nKeyLevel, const SwTOXInternational &rIntl, const css::lang::Locale &rLocale)
Definition: txmsrt.cxx:302
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:362
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:428
virtual bool sort_lt(const SwTOXSortTabBase &) override
Definition: txmsrt.cxx:338
sal_uInt8 nKeyLevel
Definition: txmsrt.hxx:208
virtual void FillText(SwTextNode &rNd, const SwContentIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:398
SwTOXPara(SwContentNode &, SwTOXElement, sal_uInt16 nLevel=FORM_ALPHA_DELIMITER, OUString sSeqName=OUString())
Definition: txmsrt.cxx:534
sal_Int32 nStartIndex
Definition: txmsrt.hxx:264
sal_uInt16 m_nLevel
Definition: txmsrt.hxx:263
virtual std::pair< OUString, bool > GetURL(SwRootFrame const *const pLayout) const override
Definition: txmsrt.cxx:677
OUString m_sSequenceName
Definition: txmsrt.hxx:266
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:556
virtual void FillText(SwTextNode &rNd, const SwContentIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:611
SwTOXElement eType
Definition: txmsrt.hxx:262
virtual bool IsFullPara() const override
Definition: txmsrt.cxx:731
sal_Int32 nEndIndex
Definition: txmsrt.hxx:265
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:663
bool bSortAscending
Definition: authfld.hxx:56
ToxAuthorityField eField
Definition: authfld.hxx:55
Class for sorting directories.
Definition: txmsrt.hxx:124
virtual sal_uInt16 GetLevel() const =0
SwTOXSortTabBase(TOXSortType nType, const SwContentNode *pTOXSrc, const SwTextTOXMark *pTextMark, const SwTOXInternational *pIntl, const css::lang::Locale *pLocale=nullptr)
Definition: txmsrt.cxx:135
std::vector< SwTOXSource > aTOXSources
Definition: txmsrt.hxx:128
static SwTOIOptions GetOptions()
Definition: txmsrt.hxx:146
const css::lang::Locale & GetLocale() const
Definition: txmsrt.hxx:185
virtual std::pair< OUString, bool > GetURL(SwRootFrame const *const pLayout) const
Definition: txmsrt.cxx:189
virtual void FillText(SwTextNode &rNd, const SwContentIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const
Definition: txmsrt.cxx:221
static SwTOIOptions nOpt
Definition: txmsrt.hxx:136
virtual bool sort_lt(const SwTOXSortTabBase &)
Definition: txmsrt.cxx:253
sal_Int32 nCntPos
Definition: txmsrt.hxx:134
css::lang::Locale aLocale
Definition: txmsrt.hxx:129
TextAndReading const & GetText() const
Definition: txmsrt.hxx:179
virtual bool IsFullPara() const
Definition: txmsrt.cxx:216
const SwTextTOXMark * pTextMark
Definition: txmsrt.hxx:131
sal_uInt16 nType
Definition: txmsrt.hxx:135
virtual bool equivalent(const SwTOXSortTabBase &)
Definition: txmsrt.cxx:227
const SwTOXInternational * pTOXIntl
Definition: txmsrt.hxx:132
SwNodeOffset nPos
Definition: txmsrt.hxx:133
virtual TextAndReading GetText_Impl(SwRootFrame const *pLayout) const override
Definition: txmsrt.cxx:751
virtual std::pair< OUString, bool > GetURL(SwRootFrame const *const pLayout) const override
Definition: txmsrt.cxx:773
sal_uInt16 nLevel
Definition: txmsrt.hxx:282
virtual sal_uInt16 GetLevel() const override
Definition: txmsrt.cxx:768
SwTOXTable(const SwContentNode &rNd)
Definition: txmsrt.cxx:745
OUString sReading
Definition: txmsrt.hxx:64
OUString sText
Definition: txmsrt.hxx:63
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:991
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
#define SW_COLLATOR_IGNORES
Definition: swtypes.hxx:194
sal_Unicode const toxMarkSeparator
separator for toxmarks: #<no>%19<text>%19<type><typename>|toxmark
Definition: swtypes.hxx:128
const sal_Unicode cMarkSeparator
Definition: swtypes.hxx:124
SwTOXElement
Definition: tox.hxx:366
#define FORM_SECONDARY_KEY
Definition: tox.hxx:209
SwTOIOptions
Definition: tox.hxx:387
#define FORM_ALPHA_DELIMITER
Definition: tox.hxx:207
#define FORM_PRIMARY_KEY
Definition: tox.hxx:208
#define FORM_ENTRY
Definition: tox.hxx:210
ToxAuthorityField
Definition: toxe.hxx:83
@ AUTH_FIELD_IDENTIFIER
Definition: toxe.hxx:84
@ AUTH_FIELD_AUTHORITY_TYPE
Definition: toxe.hxx:85
@ AUTH_FIELD_URL
Definition: toxe.hxx:110
@ AUTH_FIELD_END
Definition: toxe.hxx:121
@ TOX_USER
Definition: toxe.hxx:42
@ TOX_CONTENT
Definition: toxe.hxx:43
@ TOX_INDEX
Definition: toxe.hxx:41
ToxAuthorityType
Definition: toxe.hxx:53
@ AUTH_TYPE_END
Definition: toxe.hxx:78
static OUString lcl_GetText(SwFormatField const &rField, SwRootFrame const *const pLayout)
Definition: txmsrt.cxx:815
TOXSortType
Definition: txmsrt.hxx:40
@ TOX_SORT_CUSTOM
Definition: txmsrt.hxx:42
@ TOX_SORT_AUTHORITY
Definition: txmsrt.hxx:46
@ TOX_SORT_PARA
Definition: txmsrt.hxx:44
@ TOX_SORT_INDEX
Definition: txmsrt.hxx:41
@ TOX_SORT_TABLE
Definition: txmsrt.hxx:45
@ TOX_SORT_CONTENT
Definition: txmsrt.hxx:43
unsigned char sal_uInt8
sal_uInt16 sal_Unicode