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 if (eCurTOXType == TOX_ILLUSTRATIONS
388 || eCurTOXType == TOX_TABLES
389 || eCurTOXType == TOX_OBJECTS)
390 {
391 pNewTOX->SetCreate(rDesc.GetContentOptions());
392 }
393 }
394 break;
395 }
396
397 OSL_ENSURE(pNewTOX, "no TOXBase created!" );
398 if(!pNewTOX)
399 return false;
400
401 pNewTOX->SetFromChapter(rDesc.IsFromChapter());
402 pNewTOX->SetSequenceName(rDesc.GetSequenceName());
403 pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay());
404 pNewTOX->SetProtected(rDesc.IsReadonly());
405
406 for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
407 pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel);
408
409 if(rDesc.GetTitle())
410 pNewTOX->SetTitle(*rDesc.GetTitle());
411 if(rDesc.GetForm())
412 pNewTOX->SetTOXForm(*rDesc.GetForm());
413 pNewTOX->SetLanguage(rDesc.GetLanguage());
414 pNewTOX->SetSortAlgorithm(rDesc.GetSortAlgorithm());
415
416 if(!pCurTOX || (ppBase && !(*ppBase)) )
417 {
418 // when ppBase is passed over, TOXBase is only created here
419 // and then inserted in a global document by the dialog
420 if(ppBase)
421 (*ppBase) = pNewTOX;
422 else
423 {
424 m_pSh->InsertTableOf(*pNewTOX, pSet);
425 delete pNewTOX;
426 }
427 }
428 else
429 {
430 SwDoc * pDoc = m_pSh->GetDoc();
431
432 if (pDoc->GetIDocumentUndoRedo().DoesUndo())
433 {
434 pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr);
435 }
436
437 SwTOXBase *const pTOX = const_cast<SwTOXBase*>(pCurTOX);
438 pDoc->ChangeTOX(*pTOX, *pNewTOX);
439
440 pTOX->DisableKeepExpression();
441 m_pSh->UpdateTableOf(*pTOX, pSet);
442 bRet = false;
443 pTOX->EnableKeepExpression();
444
445 if (pDoc->GetIDocumentUndoRedo().DoesUndo())
446 {
447 pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::TOXCHANGE, nullptr);
448 }
449 }
450
451 return bRet;
452}
453
455 SwTOXSortKey eKey2,
456 SwTOXSortKey eKey3)
457{
459 sal_uInt16 nPos = 0;
460 if(AUTH_FIELD_END > eKey1.eField)
461 aArr[nPos++] = eKey1;
462 if(AUTH_FIELD_END > eKey2.eField)
463 aArr[nPos++] = eKey2;
464 if(AUTH_FIELD_END > eKey3.eField)
465 aArr[nPos++] = eKey3;
466
467 m_eSortKey1 = aArr[0];
468 m_eSortKey2 = aArr[1];
469 m_eSortKey3 = aArr[2];
470}
471
473{
474 for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
475 rTOXBase.SetStyleNames(GetStyleNames(i), i);
476 rTOXBase.SetTitle(GetTitle() ? *GetTitle() : OUString());
477 rTOXBase.SetCreate(GetContentOptions());
478
479 if(GetTOXType() == TOX_INDEX)
480 rTOXBase.SetOptions(GetIndexOptions());
481 if(GetTOXType() != TOX_INDEX)
482 rTOXBase.SetLevel(GetLevel());
486 rTOXBase.SetFromChapter(IsFromChapter());
487 rTOXBase.SetProtected(IsReadonly());
488 rTOXBase.SetOLEOptions(GetOLEOptions());
490 rTOXBase.SetLanguage(m_eLanguage);
492
493}
494
495/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetSequence(bool bSet)
Definition: authfld.hxx:111
void SetLanguage(LanguageType nLang)
Definition: authfld.hxx:141
void SetSortByDocument(bool bSet)
Definition: authfld.hxx:126
void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const nKeys[])
Definition: authfld.cxx:449
void SetPreSuffix(sal_Unicode cPre, sal_Unicode cSuf)
Definition: authfld.hxx:117
void SetSortAlgorithm(const OUString &rSet)
Definition: authfld.hxx:144
const SwTOXMark & GotoTOXMark(const SwTOXMark &rStart, SwTOXSearch eDir)
traveling between marks
Definition: crstrvl.cxx:588
Definition: doc.hxx:197
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:158
void ChangeTOX(SwTOXBase &rTOX, const SwTOXBase &rNew)
Definition: doc.cxx:1756
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:339
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:219
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:631
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:454
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:472
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:308
SwDocShell * GetDocShell()
Definition: view.cxx:1193
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:318
void EnterStdMode()
Definition: select.cxx:560
void UpdateTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Definition: wrtsh2.cxx:331
bool HasSelection() const
Definition: wrtsh.hxx:147
const SwView & GetView() const
Definition: wrtsh.hxx:443
@ TableOfAuthorities
sal_uInt16 nPos
int i
const SvxPageUsage aArr[]
sal_Int16 nId
ToxAuthorityField eField
Definition: authfld.hxx:55
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
@ AUTH_FIELD_END
Definition: toxe.hxx:121
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