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