LibreOffice Module sw (master) 1
toxmgr.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 <wrtsh.hxx>
21#include <swwait.hxx>
22#include <view.hxx>
23#include <toxmgr.hxx>
24#include <doc.hxx>
25#include <IDocumentUndoRedo.hxx>
26#include <swundo.hxx>
27#include <osl/diagnose.h>
28
29// handle indexes with TOXMgr
31 m_pSh(pShell)
32{
35}
36
38{
39 if(!m_aCurMarks.empty())
40 return m_aCurMarks[nId];
41 return nullptr;
42}
43
45{
46 SwTOXMark* pNext = nullptr;
47 if( m_pCurTOXMark )
48 {
49 pNext = const_cast<SwTOXMark*>(&m_pSh->GotoTOXMark( *m_pCurTOXMark, TOX_NXT ));
50 if( pNext == m_pCurTOXMark )
51 pNext = nullptr;
52
55 }
56 // go to next one
57 m_pCurTOXMark = pNext;
58}
59
61{
62 SwTOXMark* pMark = nullptr;
63 switch(rDesc.GetTOXType())
64 {
65 case TOX_CONTENT:
66 {
67 OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
68 "invalid InsertTOCMark level");
69 pMark = new SwTOXMark(m_pSh->GetTOXType(TOX_CONTENT, 0));
70 pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
71
72 if(rDesc.GetAltStr())
73 pMark->SetAlternativeText(*rDesc.GetAltStr());
74 }
75 break;
76 case TOX_INDEX:
77 {
78 pMark = new SwTOXMark(m_pSh->GetTOXType(TOX_INDEX, 0));
79
80 if( rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
81 {
82 pMark->SetPrimaryKey( *rDesc.GetPrimKey() );
85
86 if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
87 {
88 pMark->SetSecondaryKey( *rDesc.GetSecKey() );
91 }
92 }
93 if(rDesc.GetAltStr())
94 pMark->SetAlternativeText(*rDesc.GetAltStr());
97 pMark->SetMainEntry(rDesc.IsMainEntry());
98 }
99 break;
100 case TOX_USER:
101 {
102 OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
103 "invalid InsertTOCMark level");
104 sal_uInt16 nId = rDesc.GetTOUName() ?
105 GetUserTypeID(*rDesc.GetTOUName()) : 0;
106 pMark = new SwTOXMark(m_pSh->GetTOXType(TOX_USER, nId));
107 pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
108
109 if(rDesc.GetAltStr())
110 pMark->SetAlternativeText(*rDesc.GetAltStr());
111 }
112 break;
113 case TOX_BIBLIOGRAPHY:
114 {
115 pMark = new SwTOXMark(m_pSh->GetTOXType(TOX_BIBLIOGRAPHY, 0));
116
117 if( rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
118 {
119 pMark->SetPrimaryKey( *rDesc.GetPrimKey() );
122
123 if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
124 {
125 pMark->SetSecondaryKey( *rDesc.GetSecKey() );
128 }
129 }
130 if(rDesc.GetAltStr())
131 pMark->SetAlternativeText(*rDesc.GetAltStr());
134 pMark->SetMainEntry(rDesc.IsMainEntry());
135 }
136 break;
137 default:; //prevent warning
138 }
139
140 if (!pMark)
141 return;
142
144 m_pSh->SwEditShell::Insert(*pMark);
146}
147
148// Update of TOXMarks
150{
151 assert(m_pCurTOXMark && "no current TOXMark");
154 {
155 if(rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
156 {
160 else
162
163 if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
164 {
168 else
170 }
171 else
172 {
173 m_pCurTOXMark->SetSecondaryKey(OUString());
175 }
176 }
177 else
178 {
179 m_pCurTOXMark->SetPrimaryKey(OUString());
181 m_pCurTOXMark->SetSecondaryKey(OUString());
183 }
186 else
187 m_pCurTOXMark->SetTextReading(OUString());
189 }
190 else
191 m_pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
192
193 if(rDesc.GetAltStr())
194 {
195 // JP 26.08.96: Bug 30344 - either the text of a Doc or an alternative test,
196 // not both!
197 bool bReplace = m_pCurTOXMark->IsAlternativeText();
198 if( bReplace )
200 else
201 {
202 SwTOXMark aCpy( *m_pCurTOXMark );
203 m_aCurMarks.clear();
205 aCpy.SetAlternativeText( *rDesc.GetAltStr() );
206 m_pSh->SwEditShell::Insert( aCpy );
207 m_pCurTOXMark = nullptr;
208 }
209 }
212 // Bug 36207 pCurTOXMark points nowhere here!
213 if(!m_pCurTOXMark)
214 {
215 m_pSh->Left(SwCursorSkipMode::Chars, false, 1, false );
217 SetCurTOXMark(0);
218 }
219}
220
221// determine UserTypeID
222sal_uInt16 SwTOXMgr::GetUserTypeID(const OUString& rStr)
223{
224 sal_uInt16 nSize = m_pSh->GetTOXTypeCount(TOX_USER);
225 for(sal_uInt16 i=0; i < nSize; ++i)
226 {
227 const SwTOXType* pTmp = m_pSh->GetTOXType(TOX_USER, i);
228 if(pTmp && pTmp->GetTypeName() == rStr)
229 return i;
230 }
231 SwTOXType aUserType(*m_pSh->GetDoc(), TOX_USER, rStr);
232 m_pSh->InsertTOXType(aUserType);
233 return nSize;
234}
235
236// traveling between TOXMarks
237void SwTOXMgr::NextTOXMark(bool bSame)
238{
239 OSL_ENSURE(m_pCurTOXMark, "no current TOXMark");
240 if( m_pCurTOXMark )
241 {
242 SwTOXSearch eDir = bSame ? TOX_SAME_NXT : TOX_NXT;
243 m_pCurTOXMark = const_cast<SwTOXMark*>(&m_pSh->GotoTOXMark( *m_pCurTOXMark, eDir ));
244 }
245}
246
247void SwTOXMgr::PrevTOXMark(bool bSame)
248{
249 OSL_ENSURE(m_pCurTOXMark, "no current TOXMark");
250 if( m_pCurTOXMark )
251 {
252 SwTOXSearch eDir = bSame ? TOX_SAME_PRV : TOX_PRV;
253 m_pCurTOXMark = const_cast<SwTOXMark*>(&m_pSh->GotoTOXMark(*m_pCurTOXMark, eDir ));
254 }
255}
256
258{
259 return m_pSh->GetTOXType(eTyp, 0);
260}
261
262void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
263{
264 m_pCurTOXMark = (nId < m_aCurMarks.size()) ? m_aCurMarks[nId] : nullptr;
265}
266
268 SwTOXBase** ppBase,
269 const SfxItemSet* pSet)
270{
271 SwWait aWait( *m_pSh->GetView().GetDocShell(), true );
272 bool bRet = true;
273 const SwTOXBase *const pCurTOX = ppBase && *ppBase ? *ppBase : m_pSh->GetCurTOX();
274
275 SwTOXBase * pNewTOX = pCurTOX ? new SwTOXBase(*pCurTOX) : nullptr;
276
277 TOXTypes eCurTOXType = rDesc.GetTOXType();
278 if(pCurTOX && !ppBase && m_pSh->HasSelection())
280
281 switch(eCurTOXType)
282 {
283 case TOX_INDEX :
284 {
285 if(!pCurTOX || (ppBase && !(*ppBase)))
286 {
287 const SwTOXType* pType = m_pSh->GetTOXType(eCurTOXType, 0);
288 SwForm aForm(eCurTOXType);
289 pNewTOX = new SwTOXBase(pType, aForm, SwTOXElement::Mark, pType->GetTypeName());
290 }
291 pNewTOX->SetOptions(rDesc.GetIndexOptions());
295 }
296 break;
297 case TOX_CONTENT :
298 {
299 if(!pCurTOX || (ppBase && !(*ppBase)))
300 {
301 const SwTOXType* pType = m_pSh->GetTOXType(eCurTOXType, 0);
302 SwForm aForm(eCurTOXType);
303 pNewTOX = new SwTOXBase(pType, aForm, rDesc.GetContentOptions(), pType->GetTypeName());
304 }
305 pNewTOX->SetCreate(rDesc.GetContentOptions());
306 pNewTOX->SetLevel(rDesc.GetLevel());
307 }
308 break;
309 case TOX_USER :
310 {
311 if(!pCurTOX || (ppBase && !(*ppBase)))
312 {
313 sal_uInt16 nPos = 0;
314 sal_uInt16 nSize = m_pSh->GetTOXTypeCount(eCurTOXType);
315 for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i)
316 { const SwTOXType* pType = m_pSh->GetTOXType(TOX_USER, i);
317 if(pType->GetTypeName() == *rDesc.GetTOUName())
318 { nPos = i;
319 break;
320 }
321 }
322 const SwTOXType* pType = m_pSh->GetTOXType(eCurTOXType, nPos);
323
324 SwForm aForm(eCurTOXType);
325 pNewTOX = new SwTOXBase(pType, aForm, rDesc.GetContentOptions(), pType->GetTypeName());
326
327 }
328 else
329 {
330 pNewTOX->SetCreate(rDesc.GetContentOptions());
331 }
332 pNewTOX->SetLevelFromChapter(rDesc.IsLevelFromChapter());
333 }
334 break;
335 case TOX_CITATION: break;
336 case TOX_OBJECTS:
337 case TOX_TABLES:
338 case TOX_AUTHORITIES:
339 case TOX_BIBLIOGRAPHY:
341 {
342 //Special handling for TOX_AUTHORITY
343 if(TOX_AUTHORITIES == eCurTOXType)
344 {
345 SwAuthorityFieldType* pFType = static_cast<SwAuthorityFieldType*>(
347 if (!pFType)
348 {
350 pFType = static_cast<SwAuthorityFieldType*>(
352 }
353 OUString const& rBrackets(rDesc.GetAuthBrackets());
354 if (rBrackets.isEmpty())
355 {
356 pFType->SetPreSuffix('\0', '\0');
357 }
358 else
359 {
360 assert(rBrackets.getLength() == 2);
361 pFType->SetPreSuffix(rBrackets[0], rBrackets[1]);
362 }
363 pFType->SetSequence(rDesc.IsAuthSequence());
364 SwTOXSortKey rArr[3];
365 rArr[0] = rDesc.GetSortKey1();
366 rArr[1] = rDesc.GetSortKey2();
367 rArr[2] = rDesc.GetSortKey3();
368 pFType->SetSortKeys(3, rArr);
369 pFType->SetSortByDocument(rDesc.IsSortByDocument());
370 pFType->SetLanguage(rDesc.GetLanguage());
371 pFType->SetSortAlgorithm(rDesc.GetSortAlgorithm());
372
373 pFType->UpdateFields();
374 }
375 // TODO: consider properties of the current TOXType
376 if(!pCurTOX || (ppBase && !(*ppBase)))
377 {
378 const SwTOXType* pType = m_pSh->GetTOXType(eCurTOXType, 0);
379 SwForm aForm(eCurTOXType);
380 pNewTOX = new SwTOXBase(
381 pType, aForm,
383 pType->GetTypeName());
384 }
386 pNewTOX->SetOLEOptions(rDesc.GetOLEOptions());
387 }
388 break;
389 }
390
391 OSL_ENSURE(pNewTOX, "no TOXBase created!" );
392 if(!pNewTOX)
393 return false;
394
395 pNewTOX->SetFromChapter(rDesc.IsFromChapter());
396 pNewTOX->SetSequenceName(rDesc.GetSequenceName());
397 pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay());
398 pNewTOX->SetProtected(rDesc.IsReadonly());
399
400 for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
401 pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel);
402
403 if(rDesc.GetTitle())
404 pNewTOX->SetTitle(*rDesc.GetTitle());
405 if(rDesc.GetForm())
406 pNewTOX->SetTOXForm(*rDesc.GetForm());
407 pNewTOX->SetLanguage(rDesc.GetLanguage());
408 pNewTOX->SetSortAlgorithm(rDesc.GetSortAlgorithm());
409
410 if(!pCurTOX || (ppBase && !(*ppBase)) )
411 {
412 // when ppBase is passed over, TOXBase is only created here
413 // and then inserted in a global document by the dialog
414 if(ppBase)
415 (*ppBase) = pNewTOX;
416 else
417 {
418 m_pSh->InsertTableOf(*pNewTOX, pSet);
419 delete pNewTOX;
420 }
421 }
422 else
423 {
424 SwDoc * pDoc = m_pSh->GetDoc();
425
426 if (pDoc->GetIDocumentUndoRedo().DoesUndo())
427 {
429 }
430
431 SwTOXBase *const pTOX = const_cast<SwTOXBase*>(pCurTOX);
432 pDoc->ChangeTOX(*pTOX, *pNewTOX);
433
434 pTOX->DisableKeepExpression();
435 m_pSh->UpdateTableOf(*pTOX, pSet);
436 bRet = false;
437 pTOX->EnableKeepExpression();
438
439 if (pDoc->GetIDocumentUndoRedo().DoesUndo())
440 {
442 }
443 }
444
445 return bRet;
446}
447
449 SwTOXSortKey eKey2,
450 SwTOXSortKey eKey3)
451{
453 sal_uInt16 nPos = 0;
454 if(AUTH_FIELD_END > eKey1.eField)
455 aArr[nPos++] = eKey1;
456 if(AUTH_FIELD_END > eKey2.eField)
457 aArr[nPos++] = eKey2;
458 if(AUTH_FIELD_END > eKey3.eField)
459 aArr[nPos++] = eKey3;
460
461 m_eSortKey1 = aArr[0];
462 m_eSortKey2 = aArr[1];
463 m_eSortKey3 = aArr[2];
464}
465
467{
468 for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
469 rTOXBase.SetStyleNames(GetStyleNames(i), i);
470 rTOXBase.SetTitle(GetTitle() ? *GetTitle() : OUString());
471 rTOXBase.SetCreate(GetContentOptions());
472
473 if(GetTOXType() == TOX_INDEX)
474 rTOXBase.SetOptions(GetIndexOptions());
475 if(GetTOXType() != TOX_INDEX)
476 rTOXBase.SetLevel(GetLevel());
480 rTOXBase.SetFromChapter(IsFromChapter());
481 rTOXBase.SetProtected(IsReadonly());
482 rTOXBase.SetOLEOptions(GetOLEOptions());
484 rTOXBase.SetLanguage(m_eLanguage);
486
487}
488
489/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
virtual bool DoesUndo() const =0
Is Undo enabled?
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
void SetSequence(bool bSet)
Definition: authfld.hxx:108
void SetLanguage(LanguageType nLang)
Definition: authfld.hxx:138
void SetSortByDocument(bool bSet)
Definition: authfld.hxx:123
void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const nKeys[])
Definition: authfld.cxx:444
void SetPreSuffix(sal_Unicode cPre, sal_Unicode cSuf)
Definition: authfld.hxx:114
void SetSortAlgorithm(const OUString &rSet)
Definition: authfld.hxx:141
const SwTOXMark & GotoTOXMark(const SwTOXMark &rStart, SwTOXSearch eDir)
traveling between marks
Definition: crstrvl.cxx:583
Definition: doc.hxx:194
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:150
void ChangeTOX(SwTOXBase &rTOX, const SwTOXBase &rNew)
Definition: doc.cxx:1725
const SwTOXBase * GetCurTOX() const
Get current listing before or at the Cursor.
Definition: edtox.cxx:191
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
void InsertTOXType(const SwTOXType &rTyp)
Definition: edws.cxx:195
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const
Manage types of content tables.
Definition: edws.cxx:190
SwFieldType * GetFieldType(size_t nField, SwFieldIds nResId=SwFieldIds::Unknown) const
get field types with a ResId, if 0 get all
Definition: edfld.cxx:64
void SetModified()
Definition: edws.cxx:70
SwFieldType * InsertFieldType(const SwFieldType &)
insert field type
Definition: edfld.cxx:338
void ApplyAutoMark()
Definition: edtox.cxx:268
void DeleteTOXMark(SwTOXMark const *pMark)
Definition: edtox.cxx:76
const SwTOXType * GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
Definition: edtox.cxx:203
void EndAllAction()
Definition: edws.cxx:97
void SetTOIAutoMarkURL(const OUString &rSet)
Definition: edtox.cxx:263
void GetCurTOXMarks(SwTOXMarks &rMarks) const
Get all marks at current SPoint.
Definition: edtox.cxx:87
virtual void UpdateFields()
Definition: fldbas.cxx:213
Definition: tox.hxx:314
void SetMainEntryCharStyle(const OUString &rSet)
Definition: tox.hxx:503
void SetOptions(SwTOIOptions nOpt)
Definition: tox.hxx:743
void SetStyleNames(const OUString &rSet, sal_uInt16 nLevel)
Definition: tox.hxx:524
void SetTOXForm(const SwForm &rForm)
Definition: tox.hxx:719
void SetProtected(bool bSet)
Definition: tox.hxx:539
void EnableKeepExpression()
Definition: tox.hxx:487
void SetOLEOptions(SwTOOElements nOpt)
Definition: tox.hxx:515
void SetLevelFromChapter(bool bSet)
Definition: tox.hxx:536
void SetSortAlgorithm(const OUString &rSet)
Definition: tox.hxx:556
void DisableKeepExpression()
Definition: tox.hxx:488
void SetLanguage(LanguageType nLang)
Definition: tox.hxx:553
void SetCreate(SwTOXElement)
Definition: tox.hxx:716
void SetCaptionDisplay(SwCaptionDisplay eSet)
Definition: tox.hxx:545
void SetSequenceName(const OUString &rSet)
Definition: tox.hxx:542
void SetFromObjectNames(bool bSet)
Definition: tox.hxx:533
void SetTitle(const OUString &rTitle)
Definition: tox.cxx:629
void SetFromChapter(bool bSet)
Definition: tox.hxx:530
void SetLevel(sal_uInt16)
Definition: tox.hxx:725
const OUString & GetSortAlgorithm() const
Definition: toxmgr.hxx:162
const SwForm * GetForm() const
Definition: toxmgr.hxx:107
LanguageType GetLanguage() const
Definition: toxmgr.hxx:159
OUString m_sSortAlgorithm
Definition: toxmgr.hxx:51
SwTOXElement GetContentOptions() const
Definition: toxmgr.hxx:110
bool IsFromChapter() const
Definition: toxmgr.hxx:131
sal_uInt8 GetLevel() const
Definition: toxmgr.hxx:119
bool IsCreateFromObjectNames() const
Definition: toxmgr.hxx:122
void SetSortKeys(SwTOXSortKey eKey1, SwTOXSortKey eKey2, SwTOXSortKey eKey3)
Definition: toxmgr.cxx:448
SwTOIOptions GetIndexOptions() const
Definition: toxmgr.hxx:113
SwCaptionDisplay GetCaptionDisplay() const
Definition: toxmgr.hxx:127
LanguageType m_eLanguage
Definition: toxmgr.hxx:50
std::optional< OUString > const & GetTOUName() const
Definition: toxmgr.hxx:104
const OUString & GetSequenceName() const
Definition: toxmgr.hxx:124
const SwTOXSortKey & GetSortKey3() const
Definition: toxmgr.hxx:157
SwTOXSortKey m_eSortKey1
Definition: toxmgr.hxx:55
const OUString & GetStyleNames(sal_uInt16 nLvl) const
Definition: toxmgr.hxx:92
const OUString & GetAutoMarkURL() const
Definition: toxmgr.hxx:97
void ApplyTo(SwTOXBase &rTOXBase)
Definition: toxmgr.cxx:466
const SwTOXSortKey & GetSortKey1() const
Definition: toxmgr.hxx:155
std::optional< OUString > const & GetTitle() const
Definition: toxmgr.hxx:101
SwTOXSortKey m_eSortKey2
Definition: toxmgr.hxx:56
bool IsReadonly() const
Definition: toxmgr.hxx:134
const SwTOXSortKey & GetSortKey2() const
Definition: toxmgr.hxx:156
const OUString & GetAuthBrackets() const
Definition: toxmgr.hxx:142
TOXTypes GetTOXType() const
Definition: toxmgr.hxx:90
bool IsSortByDocument() const
Definition: toxmgr.hxx:148
bool IsLevelFromChapter() const
Definition: toxmgr.hxx:139
const OUString & GetMainEntryCharStyle() const
Definition: toxmgr.hxx:115
SwTOXSortKey m_eSortKey3
Definition: toxmgr.hxx:57
bool IsAuthSequence() const
Definition: toxmgr.hxx:145
SwTOOElements GetOLEOptions() const
Definition: toxmgr.hxx:136
std::optional< OUString > const & GetPhoneticReadingOfAltStr() const
Definition: toxmgr.hxx:217
bool IsMainEntry() const
Definition: toxmgr.hxx:202
TOXTypes GetTOXType() const
Definition: toxmgr.hxx:196
std::optional< OUString > const & GetAltStr() const
Definition: toxmgr.hxx:211
int GetLevel() const
Definition: toxmgr.hxx:199
std::optional< OUString > const & GetPhoneticReadingOfPrimKey() const
Definition: toxmgr.hxx:220
std::optional< OUString > const & GetTOUName() const
Definition: toxmgr.hxx:214
std::optional< OUString > const & GetPhoneticReadingOfSecKey() const
Definition: toxmgr.hxx:223
std::optional< OUString > const & GetPrimKey() const
Definition: toxmgr.hxx:205
std::optional< OUString > const & GetSecKey() const
Definition: toxmgr.hxx:208
void SetAlternativeText(const OUString &rAlt)
Definition: tox.hxx:582
const SwTOXType * GetTOXType() const
Definition: tox.hxx:576
void SetTextReading(const OUString &rStr)
Definition: tox.hxx:610
void SetSecondaryKey(const OUString &rStr)
Definition: tox.hxx:604
bool IsAlternativeText() const
Definition: tox.hxx:579
void SetPrimaryKeyReading(const OUString &rStr)
Definition: tox.hxx:616
void SetSecondaryKeyReading(const OUString &rStr)
Definition: tox.hxx:622
void SetMainEntry(bool bSet)
Definition: tox.hxx:156
void SetPrimaryKey(const OUString &rStr)
Definition: tox.hxx:598
void SetLevel(sal_uInt16 nLevel)
Definition: tox.hxx:592
void DeleteTOXMark()
Definition: toxmgr.cxx:44
SwWrtShell * m_pSh
Definition: toxmgr.hxx:232
SwTOXMark * m_pCurTOXMark
Definition: toxmgr.hxx:233
void PrevTOXMark(bool bSame=false)
Definition: toxmgr.cxx:247
bool UpdateOrInsertTOX(const SwTOXDescription &rDesc, SwTOXBase **ppBase, const SfxItemSet *pSet)
Definition: toxmgr.cxx:267
const SwTOXType * GetTOXType(TOXTypes eTyp) const
Definition: toxmgr.cxx:257
SwTOXMarks m_aCurMarks
Definition: toxmgr.hxx:234
void SetCurTOXMark(sal_uInt16 nId)
Definition: toxmgr.cxx:262
void NextTOXMark(bool bSame=false)
Definition: toxmgr.cxx:237
SwTOXMark * GetTOXMark(sal_uInt16 nId)
Definition: toxmgr.cxx:37
void UpdateTOXMark(const SwTOXMarkDescription &rDesc)
Definition: toxmgr.cxx:149
void InsertTOXMark(const SwTOXMarkDescription &rDesc)
Definition: toxmgr.cxx:60
SAL_DLLPRIVATE sal_uInt16 GetUserTypeID(const OUString &rStr)
Definition: toxmgr.cxx:222
SwTOXMgr(SwWrtShell *pShell)
Definition: toxmgr.cxx:30
const OUString & GetTypeName() const
Definition: tox.hxx:690
TOXTypes GetType() const
Definition: tox.hxx:693
SwDoc * GetDoc() const
Definition: viewsh.hxx:290
SwDocShell * GetDocShell()
Definition: view.cxx:1160
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:110
void InsertTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Definition: wrtsh2.cxx:317
void EnterStdMode()
Definition: select.cxx:551
void UpdateTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Definition: wrtsh2.cxx:330
bool HasSelection() const
Definition: wrtsh.hxx:147
const SwView & GetView() const
Definition: wrtsh.hxx:438
@ TableOfAuthorities
sal_uInt16 nPos
int i
const SvxPageUsage aArr[]
sal_Int16 nId
ToxAuthorityField eField
Definition: authfld.hxx:52
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
@ AUTH_FIELD_END
Definition: toxe.hxx:118
TOXTypes
Definition: toxe.hxx:40
@ TOX_USER
Definition: toxe.hxx:42
@ TOX_CONTENT
Definition: toxe.hxx:43
@ TOX_TABLES
Definition: toxe.hxx:46
@ TOX_INDEX
Definition: toxe.hxx:41
@ TOX_OBJECTS
Definition: toxe.hxx:45
@ TOX_AUTHORITIES
Definition: toxe.hxx:47
@ TOX_ILLUSTRATIONS
Definition: toxe.hxx:44
@ TOX_BIBLIOGRAPHY
Definition: toxe.hxx:48
@ TOX_CITATION
Definition: toxe.hxx:49
SwTOXSearch
Definition: toxe.hxx:23
@ TOX_SAME_PRV
Definition: toxe.hxx:27
@ TOX_PRV
Definition: toxe.hxx:25
@ TOX_SAME_NXT
Definition: toxe.hxx:26
@ TOX_NXT
Definition: toxe.hxx:24
ResultType type