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