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  pSh(pShell)
32 {
34  SetCurTOXMark(0);
35 }
36 
38 {
39  if(!aCurMarks.empty())
40  return aCurMarks[nId];
41  return nullptr;
42 }
43 
45 {
46  SwTOXMark* pNext = nullptr;
47  if( pCurTOXMark )
48  {
49  pNext = const_cast<SwTOXMark*>(&pSh->GotoTOXMark( *pCurTOXMark, TOX_NXT ));
50  if( pNext == pCurTOXMark )
51  pNext = nullptr;
52 
54  pSh->SetModified();
55  }
56  // go to next one
57  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(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(pSh->GetTOXType(TOX_INDEX, 0));
79 
80  if( rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
81  {
82  pMark->SetPrimaryKey( *rDesc.GetPrimKey() );
83  if(rDesc.GetPhoneticReadingOfPrimKey())
85 
86  if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
87  {
88  pMark->SetSecondaryKey( *rDesc.GetSecKey() );
89  if(rDesc.GetPhoneticReadingOfSecKey())
91  }
92  }
93  if(rDesc.GetAltStr())
94  pMark->SetAlternativeText(*rDesc.GetAltStr());
95  if(rDesc.GetPhoneticReadingOfAltStr())
96  pMark->SetTextReading( *rDesc.GetPhoneticReadingOfAltStr() );
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(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(pSh->GetTOXType(TOX_BIBLIOGRAPHY, 0));
116 
117  if( rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
118  {
119  pMark->SetPrimaryKey( *rDesc.GetPrimKey() );
120  if(rDesc.GetPhoneticReadingOfPrimKey())
122 
123  if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
124  {
125  pMark->SetSecondaryKey( *rDesc.GetSecKey() );
126  if(rDesc.GetPhoneticReadingOfSecKey())
128  }
129  }
130  if(rDesc.GetAltStr())
131  pMark->SetAlternativeText(*rDesc.GetAltStr());
132  if(rDesc.GetPhoneticReadingOfAltStr())
133  pMark->SetTextReading( *rDesc.GetPhoneticReadingOfAltStr() );
134  pMark->SetMainEntry(rDesc.IsMainEntry());
135  }
136  break;
137  default:; //prevent warning
138  }
139 
140  if (!pMark)
141  return;
142 
143  pSh->StartAllAction();
144  pSh->SwEditShell::Insert(*pMark);
145  pSh->EndAllAction();
146 }
147 
148 // Update of TOXMarks
150 {
151  assert(pCurTOXMark && "no current TOXMark");
152  pSh->StartAllAction();
154  {
155  if(rDesc.GetPrimKey() && !rDesc.GetPrimKey()->isEmpty() )
156  {
157  pCurTOXMark->SetPrimaryKey( *rDesc.GetPrimKey() );
158  if(rDesc.GetPhoneticReadingOfPrimKey())
160  else
161  pCurTOXMark->SetPrimaryKeyReading(OUString());
162 
163  if( rDesc.GetSecKey() && !rDesc.GetSecKey()->isEmpty() )
164  {
166  if(rDesc.GetPhoneticReadingOfSecKey())
168  else
169  pCurTOXMark->SetSecondaryKeyReading(OUString());
170  }
171  else
172  {
173  pCurTOXMark->SetSecondaryKey(OUString());
174  pCurTOXMark->SetSecondaryKeyReading(OUString());
175  }
176  }
177  else
178  {
179  pCurTOXMark->SetPrimaryKey(OUString());
180  pCurTOXMark->SetPrimaryKeyReading(OUString());
181  pCurTOXMark->SetSecondaryKey(OUString());
182  pCurTOXMark->SetSecondaryKeyReading(OUString());
183  }
184  if(rDesc.GetPhoneticReadingOfAltStr())
186  else
187  pCurTOXMark->SetTextReading(OUString());
189  }
190  else
191  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 = pCurTOXMark->IsAlternativeText();
198  if( bReplace )
200  else
201  {
202  SwTOXMark aCpy( *pCurTOXMark );
203  aCurMarks.clear();
205  aCpy.SetAlternativeText( *rDesc.GetAltStr() );
206  pSh->SwEditShell::Insert( aCpy );
207  pCurTOXMark = nullptr;
208  }
209  }
210  pSh->SetModified();
211  pSh->EndAllAction();
212  // Bug 36207 pCurTOXMark points nowhere here!
213  if(!pCurTOXMark)
214  {
215  pSh->Left(CRSR_SKIP_CHARS, false, 1, false );
217  SetCurTOXMark(0);
218  }
219 }
220 
221 // determine UserTypeID
222 sal_uInt16 SwTOXMgr::GetUserTypeID(const OUString& rStr)
223 {
224  sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER);
225  for(sal_uInt16 i=0; i < nSize; ++i)
226  {
227  const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i);
228  if(pTmp && pTmp->GetTypeName() == rStr)
229  return i;
230  }
231  SwTOXType aUserType(*pSh->GetDoc(), TOX_USER, rStr);
232  pSh->InsertTOXType(aUserType);
233  return nSize;
234 }
235 
236 // traveling between TOXMarks
237 void SwTOXMgr::NextTOXMark(bool bSame)
238 {
239  OSL_ENSURE(pCurTOXMark, "no current TOXMark");
240  if( pCurTOXMark )
241  {
242  SwTOXSearch eDir = bSame ? TOX_SAME_NXT : TOX_NXT;
243  pCurTOXMark = const_cast<SwTOXMark*>(&pSh->GotoTOXMark( *pCurTOXMark, eDir ));
244  }
245 }
246 
247 void SwTOXMgr::PrevTOXMark(bool bSame)
248 {
249  OSL_ENSURE(pCurTOXMark, "no current TOXMark");
250  if( pCurTOXMark )
251  {
252  SwTOXSearch eDir = bSame ? TOX_SAME_PRV : TOX_PRV;
253  pCurTOXMark = const_cast<SwTOXMark*>(&pSh->GotoTOXMark(*pCurTOXMark, eDir ));
254  }
255 }
256 
258 {
259  return pSh->GetTOXType(eTyp, 0);
260 }
261 
262 void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
263 {
264  pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : nullptr;
265 }
266 
268  SwTOXBase** ppBase,
269  const SfxItemSet* pSet)
270 {
271  SwWait aWait( *pSh->GetView().GetDocShell(), true );
272  bool bRet = true;
273  const SwTOXBase *const pCurTOX = ppBase && *ppBase ? *ppBase : pSh->GetCurTOX();
274 
275  SwTOXBase * pNewTOX = pCurTOX ? new SwTOXBase(*pCurTOX) : nullptr;
276 
277  TOXTypes eCurTOXType = rDesc.GetTOXType();
278  if(pCurTOX && !ppBase && pSh->HasSelection())
279  pSh->EnterStdMode();
280 
281  switch(eCurTOXType)
282  {
283  case TOX_INDEX :
284  {
285  if(!pCurTOX || (ppBase && !(*ppBase)))
286  {
287  const SwTOXType* pType = pSh->GetTOXType(eCurTOXType, 0);
288  SwForm aForm(eCurTOXType);
289  pNewTOX = new SwTOXBase(pType, aForm, SwTOXElement::Mark, pType->GetTypeName());
290  }
291  pNewTOX->SetOptions(rDesc.GetIndexOptions());
294  pSh->ApplyAutoMark();
295  }
296  break;
297  case TOX_CONTENT :
298  {
299  if(!pCurTOX || (ppBase && !(*ppBase)))
300  {
301  const SwTOXType* pType = 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 = pSh->GetTOXTypeCount(eCurTOXType);
315  for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i)
316  { const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i);
317  if(pType->GetTypeName() == *rDesc.GetTOUName())
318  { nPos = i;
319  break;
320  }
321  }
322  const SwTOXType* pType = 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:
340  case TOX_ILLUSTRATIONS:
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 = 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  pSh->InsertTableOf(*pNewTOX, pSet);
419  delete pNewTOX;
420  }
421  }
422  else
423  {
424  SwDoc * pDoc = 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  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 {
452  SwTOXSortKey aArr[3];
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());
478  rTOXBase.SetSequenceName(GetSequenceName());
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: */
SwFieldType * GetFieldType(size_t nField, SwFieldIds nResId=SwFieldIds::Unknown) const
get field types with a ResId, if 0 get all
Definition: edfld.cxx:65
void SetLevelFromChapter(bool bSet)
Definition: tox.hxx:536
TOXTypes
Definition: toxe.hxx:39
void SetLanguage(LanguageType nLang)
Definition: tox.hxx:553
bool IsAlternativeText() const
Definition: tox.hxx:579
SwTOXElement GetContentOptions() const
Definition: toxmgr.hxx:110
std::optional< OUString > const & GetTOUName() const
Definition: toxmgr.hxx:104
void DisableKeepExpression()
Definition: tox.hxx:488
SAL_DLLPRIVATE sal_uInt16 GetUserTypeID(const OUString &rStr)
Definition: toxmgr.cxx:222
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:237
void SetLevel(sal_uInt16 nLevel)
Definition: tox.hxx:592
Definition: tox.hxx:313
const OUString & GetSequenceName() const
Definition: toxmgr.hxx:124
TOXTypes GetTOXType() const
Definition: toxmgr.hxx:90
void SetSortAlgorithm(const OUString &rSet)
Definition: authfld.hxx:141
void SetTitle(const OUString &rTitle)
Definition: tox.cxx:620
LanguageType m_eLanguage
Definition: toxmgr.hxx:50
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
Definition: doc.hxx:188
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:93
void SetTOIAutoMarkURL(const OUString &rSet)
Definition: edtox.cxx:263
sal_Int16 nId
std::optional< OUString > const & GetSecKey() const
Definition: toxmgr.hxx:208
void EnterStdMode()
Definition: select.cxx:551
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:144
const SwTOXType * GetTOXType(TOXTypes eTyp) const
Definition: toxmgr.cxx:257
const SwTOXType * GetTOXType() const
Definition: tox.hxx:576
void SetModified()
Definition: edws.cxx:70
void UpdateTOXMark(const SwTOXMarkDescription &rDesc)
Definition: toxmgr.cxx:149
void EndAllAction()
Definition: edws.cxx:97
void SetOptions(SwTOIOptions nOpt)
Definition: tox.hxx:743
void SetOLEOptions(SwTOOElements nOpt)
Definition: tox.hxx:515
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const
Manage types of content tables.
Definition: edws.cxx:190
void UpdateFields() const
Definition: fldbas.cxx:149
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
void SetCreate(SwTOXElement)
Definition: tox.hxx:716
void SetPreSuffix(sal_Unicode cPre, sal_Unicode cSuf)
Definition: authfld.hxx:114
SwCaptionDisplay GetCaptionDisplay() const
Definition: toxmgr.hxx:127
std::optional< OUString > const & GetPhoneticReadingOfPrimKey() const
Definition: toxmgr.hxx:220
const SwView & GetView() const
Definition: wrtsh.hxx:431
void DeleteTOXMark(SwTOXMark const *pMark)
Definition: edtox.cxx:76
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
void SetSortByDocument(bool bSet)
Definition: authfld.hxx:123
SwTOXMarks aCurMarks
Definition: toxmgr.hxx:230
SwTOXMgr(SwWrtShell *pShell)
Definition: toxmgr.cxx:30
void SetSortAlgorithm(const OUString &rSet)
Definition: tox.hxx:556
SwDoc * GetDoc() const
Definition: viewsh.hxx:282
const SwTOXBase * GetCurTOX() const
Get current listing before or at the Cursor.
Definition: edtox.cxx:191
void PrevTOXMark(bool bSame=false)
Definition: toxmgr.cxx:247
void SetAlternativeText(const OUString &rAlt)
Definition: tox.hxx:582
virtual bool DoesUndo() const =0
Is Undo enabled?
void UpdateTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Definition: wrtsh2.cxx:328
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:108
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
bool HasSelection() const
Definition: wrtsh.hxx:144
sal_uInt8 GetLevel() const
Definition: toxmgr.hxx:119
int i
SwFieldType * InsertFieldType(const SwFieldType &)
insert field type
Definition: edfld.cxx:337
void SetPrimaryKey(const OUString &rStr)
Definition: tox.hxx:598
const OUString & GetSortAlgorithm() const
Definition: toxmgr.hxx:162
void SetTextReading(const OUString &rStr)
Definition: tox.hxx:610
SwTOXSortKey m_eSortKey3
Definition: toxmgr.hxx:57
SwTOOElements GetOLEOptions() const
Definition: toxmgr.hxx:136
SwTOXMark * GetTOXMark(sal_uInt16 nId)
Definition: toxmgr.cxx:37
void InsertTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Definition: wrtsh2.cxx:315
void SetSequenceName(const OUString &rSet)
Definition: tox.hxx:542
void SetMainEntryCharStyle(const OUString &rSet)
Definition: tox.hxx:503
const SvxPageUsage aArr[]
const OUString & GetAutoMarkURL() const
Definition: toxmgr.hxx:97
void SetCaptionDisplay(SwCaptionDisplay eSet)
Definition: tox.hxx:545
void SetPrimaryKeyReading(const OUString &rStr)
Definition: tox.hxx:616
void SetFromChapter(bool bSet)
Definition: tox.hxx:530
bool IsReadonly() const
Definition: toxmgr.hxx:134
const OUString & GetTypeName() const
Definition: tox.hxx:690
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:1721
void SetLanguage(LanguageType nLang)
Definition: authfld.hxx:138
SwDocShell * GetDocShell()
Definition: view.cxx:1127
int GetLevel() const
Definition: toxmgr.hxx:199
void SetTOXForm(const SwForm &rForm)
Definition: tox.hxx:719
void SetCurTOXMark(sal_uInt16 nId)
Definition: toxmgr.cxx:262
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:52
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:110
const SwTOXSortKey & GetSortKey1() const
Definition: toxmgr.hxx:155
void ApplyTo(SwTOXBase &rTOXBase)
Definition: toxmgr.cxx:466
void SetStyleNames(const OUString &rSet, sal_uInt16 nLevel)
Definition: tox.hxx:524
void SetSortKeys(SwTOXSortKey eKey1, SwTOXSortKey eKey2, SwTOXSortKey eKey3)
Definition: toxmgr.cxx:448
SwTOXSortKey m_eSortKey1
Definition: toxmgr.hxx:55
void EnableKeepExpression()
Definition: tox.hxx:487
std::optional< OUString > const & GetAltStr() const
Definition: toxmgr.hxx:211
void SetSecondaryKey(const OUString &rStr)
Definition: tox.hxx:604
const SwTOXType * GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
Definition: edtox.cxx:203
TOXTypes GetType() const
Definition: tox.hxx:693
const SwTOXMark & GotoTOXMark(const SwTOXMark &rStart, SwTOXSearch eDir)
traveling between marks
Definition: crstrvl.cxx:605
void GetCurTOXMarks(SwTOXMarks &rMarks) const
Get all marks at current SPoint.
Definition: edtox.cxx:87
std::optional< OUString > const & GetTOUName() const
Definition: toxmgr.hxx:214
void SetProtected(bool bSet)
Definition: tox.hxx:539
const sal_uInt16 CRSR_SKIP_CHARS
Definition: swcrsr.hxx:65
SwTOXMark * pCurTOXMark
Definition: toxmgr.hxx:229
ResultType type
void InsertTOXMark(const SwTOXMarkDescription &rDesc)
Definition: toxmgr.cxx:60
OUString m_sSortAlgorithm
Definition: toxmgr.hxx:51
void ApplyAutoMark()
Definition: edtox.cxx:268
const OUString & GetStyleNames(sal_uInt16 nLvl) const
Definition: toxmgr.hxx:92
void SetLevel(sal_uInt16)
Definition: tox.hxx:725
void DeleteTOXMark()
Definition: toxmgr.cxx:44
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
void SetSecondaryKeyReading(const OUString &rStr)
Definition: tox.hxx:622
void SetMainEntry(bool bSet)
Definition: tox.hxx:156
SwTOXSortKey m_eSortKey2
Definition: toxmgr.hxx:56
void SetFromObjectNames(bool bSet)
Definition: tox.hxx:533
bool IsSortByDocument() const
Definition: toxmgr.hxx:148
void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const nKeys[])
Definition: authfld.cxx:443
sal_uInt16 nPos
bool UpdateOrInsertTOX(const SwTOXDescription &rDesc, SwTOXBase **ppBase, const SfxItemSet *pSet)
Definition: toxmgr.cxx:267
std::optional< OUString > const & GetPrimKey() const
Definition: toxmgr.hxx:205
const OUString & GetAuthBrackets() const
Definition: toxmgr.hxx:142