LibreOffice Module sw (master)  1
ToxTextGenerator.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 <ToxTextGenerator.hxx>
21 
22 #include <chpfld.hxx>
23 #include <cntfrm.hxx>
24 #include <txtfrm.hxx>
25 #include <rootfrm.hxx>
26 #include <ndindex.hxx>
27 #include <fchrfmt.hxx>
28 #include <doc.hxx>
31 #include <ndtxt.hxx>
32 #include <tox.hxx>
33 #include <txmsrt.hxx>
34 #include <fmtautofmt.hxx>
35 #include <swatrset.hxx>
37 #include <ToxLinkProcessor.hxx>
39 #include <txatbase.hxx>
40 #include <modeltoviewhelper.hxx>
41 
42 #include <svl/itemiter.hxx>
43 
44 #include <cassert>
45 #include <memory>
46 
47 namespace {
48 
49 bool sortTabHasNoToxSourcesOrFirstToxSourceHasNoNode(const SwTOXSortTabBase& sortTab)
50 {
51  if (sortTab.aTOXSources.empty()) {
52  return true;
53  }
54  if (sortTab.aTOXSources.at(0).pNd == nullptr) {
55  return true;
56  }
57  return false;
58 }
59 
60 } // end anonymous namespace
61 
62 namespace sw {
63 
64 OUString
66  bool bUsePrefix, sal_uInt8 nLevel,
67  SwRootFrame const*const pLayout)
68 {
69  if (sortTabHasNoToxSourcesOrFirstToxSourceHasNoNode(rBase)) {
70  return OUString();
71  }
72 
73  OUString sRet;
74  if (rBase.pTextMark) { // only if it's not a Mark
75  return sRet;
76  }
77 
78  const SwTextNode* pNd = rBase.aTOXSources[0].pNd->GetTextNode();
79  if (!pNd) {
80  return sRet;
81  }
82  if (pLayout && pLayout->IsHideRedlines())
83  { // note: pNd could be any node, since it could be Sequence etc.
84  pNd = sw::GetParaPropsNode(*pLayout, SwNodeIndex(*pNd));
85  }
86 
87  const SwNumRule* pRule = pNd->GetNumRule();
88  if (!pRule) {
89  return sRet;
90  }
91 
92  if (pNd->GetActualListLevel() < MAXLEVEL) {
93  sRet = pNd->GetNumString(bUsePrefix, nLevel, pLayout);
94  }
95 
96  if (!sRet.isEmpty()) {
97  sRet += " ";// Makes sure spacing is done only when there is outline numbering
98  }
99 
100  return sRet;
101 }
102 
103 
105  std::shared_ptr<ToxTabStopTokenHandler> const & tabStopHandler)
106 : mToxForm(toxForm),
107  mLinkProcessor(new ToxLinkProcessor()),
108  mTabStopTokenHandler(tabStopHandler)
109 {}
110 
112 {}
113 
114 OUString
116  const SwFormToken& aToken, SwRootFrame const*const pLayout) const
117 {
118  if (sortTabHasNoToxSourcesOrFirstToxSourceHasNoNode(rBase)) {
119  return OUString();
120  }
121 
122  // A bit tricky: Find a random Frame
123  const SwContentNode* contentNode = rBase.aTOXSources.at(0).pNd->GetContentNode();
124  if (!contentNode) {
125  return OUString();
126  }
127 
128  // #i53420#
129  const SwContentFrame* contentFrame = contentNode->getLayoutFrame(pLayout);
130  if (!contentFrame) {
131  return OUString();
132  }
133 
134  return GenerateTextForChapterToken(aToken, contentFrame, contentNode, pLayout);
135 }
136 
137 OUString
139  const SwContentNode *contentNode,
140  SwRootFrame const*const pLayout) const
141 {
142  OUString retval;
143 
144  SwChapterFieldType chapterFieldType;
145  SwChapterField aField = ObtainChapterField(&chapterFieldType, &chapterToken, contentFrame, contentNode);
146 
147  //---> #i89791#
148  // continue to support CF_NUMBER and CF_NUM_TITLE in order to handle ODF 1.0/1.1 written by OOo 3.x
149  // in the same way as OOo 2.x would handle them.
150  if (CF_NUM_NOPREPST_TITLE == chapterToken.nChapterFormat || CF_NUMBER == chapterToken.nChapterFormat) {
151  retval += aField.GetNumber(pLayout); // get the string number without pre/postfix
152  }
153  else if (CF_NUMBER_NOPREPST == chapterToken.nChapterFormat || CF_NUM_TITLE == chapterToken.nChapterFormat) {
154  retval += aField.GetNumber(pLayout) + " ";
155  retval += aField.GetTitle(pLayout);
156  } else if (CF_TITLE == chapterToken.nChapterFormat) {
157  retval += aField.GetTitle(pLayout);
158  }
159  return retval;
160 }
161 
162 // Add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc> in order to control,
163 // which page description is used, no appropriate one is found.
164 void
165 ToxTextGenerator::GenerateText(SwDoc* pDoc, const std::vector<std::unique_ptr<SwTOXSortTabBase>> &entries,
166  sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess,
167  SwRootFrame const*const pLayout)
168 {
169  // pTOXNd is only set at the first mark
170  SwTextNode* pTOXNd = const_cast<SwTextNode*>(entries.at(indexOfEntryToProcess)->pTOXNd);
171  // FIXME this operates directly on the node text
172  OUString & rText = const_cast<OUString&>(pTOXNd->GetText());
173  rText.clear();
174  for(sal_uInt16 nIndex = indexOfEntryToProcess; nIndex < indexOfEntryToProcess + numberOfEntriesToProcess; nIndex++)
175  {
176  if(nIndex > indexOfEntryToProcess)
177  rText += ", "; // comma separation
178  // Initialize String with the Pattern from the form
179  const SwTOXSortTabBase& rBase = *entries.at(nIndex);
180  sal_uInt16 nLvl = rBase.GetLevel();
181  OSL_ENSURE( nLvl < mToxForm.GetFormMax(), "invalid FORM_LEVEL");
182 
183  SvxTabStopItem aTStops( 0, 0, SvxTabAdjust::Default, RES_PARATR_TABSTOP );
184  // create an enumerator
185  // #i21237#
186  SwFormTokens aPattern = mToxForm.GetPattern(nLvl);
187  // remove text from node
188  for(const auto& aToken : aPattern) // #i21237#
189  {
190  sal_Int32 nStartCharStyle = rText.getLength();
191  switch( aToken.eTokenType )
192  {
193  case TOKEN_ENTRY_NO:
194  // for TOC numbering
195  rText += GetNumStringOfFirstNode(rBase,
196  aToken.nChapterFormat == CF_NUMBER,
197  static_cast<sal_uInt8>(aToken.nOutlineLevel - 1), pLayout);
198  break;
199 
200  case TOKEN_ENTRY_TEXT: {
201  HandledTextToken htt = HandleTextToken(rBase, pDoc->GetAttrPool(), pLayout);
202  ApplyHandledTextToken(htt, *pTOXNd);
203  }
204  break;
205 
206  case TOKEN_ENTRY:
207  {
208  // for TOC numbering
209  rText += GetNumStringOfFirstNode(rBase, true, MAXLEVEL, pLayout);
210  HandledTextToken htt = HandleTextToken(rBase, pDoc->GetAttrPool(), pLayout);
211  ApplyHandledTextToken(htt, *pTOXNd);
212  }
213  break;
214 
215  case TOKEN_TAB_STOP: {
217  mTabStopTokenHandler->HandleTabStopToken(aToken, *pTOXNd, pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
218  rText += htst.text;
219  aTStops.Insert(htst.tabStop);
220  break;
221  }
222 
223  case TOKEN_TEXT:
224  rText += aToken.sText;
225  break;
226 
227  case TOKEN_PAGE_NUMS:
228  rText += ConstructPageNumberPlaceholder(rBase.aTOXSources.size());
229  break;
230 
231  case TOKEN_CHAPTER_INFO:
232  rText += HandleChapterToken(rBase, aToken, pLayout);
233  break;
234 
235  case TOKEN_LINK_START:
236  mLinkProcessor->StartNewLink(rText.getLength(), aToken.sCharStyleName);
237  break;
238 
239  case TOKEN_LINK_END:
240  mLinkProcessor->CloseLink(rText.getLength(), rBase.GetURL());
241  break;
242 
243  case TOKEN_AUTHORITY:
244  {
245  ToxAuthorityField eField = static_cast<ToxAuthorityField>(aToken.nAuthorityField);
246  SwIndex aIdx( pTOXNd, rText.getLength() );
247  rBase.FillText( *pTOXNd, aIdx, static_cast<sal_uInt16>(eField), pLayout );
248  }
249  break;
250  case TOKEN_END: break;
251  }
252 
253  if ( !aToken.sCharStyleName.isEmpty() )
254  {
255  SwCharFormat* pCharFormat;
256  if( USHRT_MAX != aToken.nPoolId )
257  pCharFormat = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( aToken.nPoolId );
258  else
259  pCharFormat = pDoc->FindCharFormatByName( aToken.sCharStyleName);
260 
261  if (pCharFormat)
262  {
263  SwFormatCharFormat aFormat( pCharFormat );
264  pTOXNd->InsertItem( aFormat, nStartCharStyle,
265  rText.getLength(), SetAttrMode::DONTEXPAND );
266  }
267  }
268  }
269 
270  pTOXNd->SetAttr( aTStops );
271  }
272  mLinkProcessor->InsertLinkAttributes(*pTOXNd);
273 }
274 
275 /*static*/ std::shared_ptr<SfxItemSet>
277 {
278  auto retval = std::make_shared<SfxItemSet>(pool);
279  if (hint.Which() != RES_TXTATR_AUTOFMT) {
280  return retval;
281  }
282  const SwFormatAutoFormat& afmt = hint.GetAutoFormat();
283  SfxItemIter aIter( *afmt.GetStyleHandle());
284  const SfxPoolItem* pItem = aIter.GetCurItem();
285  do
286  {
287  if (pItem->Which() == RES_CHRATR_ESCAPEMENT ||
288  pItem->Which() == RES_CHRATR_POSTURE ||
289  pItem->Which() == RES_CHRATR_CJK_POSTURE ||
290  pItem->Which() == RES_CHRATR_CTL_POSTURE)
291  {
292  retval->Put(std::unique_ptr<SfxPoolItem>(pItem->Clone()));
293  }
294  pItem = aIter.NextItem();
295  } while (pItem);
296  return retval;
297 }
298 
301  sal_Int32 & rOffset,
302  SwTextNode const& rNode,
303  ToxWhitespaceStripper const& rStripper,
304  SwAttrPool & rPool,
305  SwRootFrame const*const pLayout)
306 {
307  // note: this *must* use the same flags as SwTextNode::GetExpandText()
308  // or indexes will be off!
310  if (pLayout && pLayout->IsHideRedlines())
311  {
312  eMode |= ExpandMode::HideDeletions;
313  }
314  ModelToViewHelper aConversionMap(rNode, pLayout, eMode);
315  if (SwpHints const*const pHints = rNode.GetpSwpHints())
316  {
317  for (size_t i = 0; i < pHints->Count(); ++i)
318  {
319  const SwTextAttr* pHint = pHints->Get(i);
320  std::shared_ptr<SfxItemSet> attributesToClone =
321  CollectAttributesForTox(*pHint, rPool);
322  if (attributesToClone->Count() <= 0) {
323  continue;
324  }
325 
326  // sw_redlinehide: due to the ... interesting ... multi-level index
327  // mapping going on here, can't use the usual merged attr iterators :(
328 
329  sal_Int32 const nStart(aConversionMap.ConvertToViewPosition(pHint->GetStart()));
330  sal_Int32 const nEnd(aConversionMap.ConvertToViewPosition(pHint->GetAnyEnd()));
331  if (nStart != nEnd) // might be in delete redline, and useless anyway
332  {
333  std::unique_ptr<SwFormatAutoFormat> pClone(pHint->GetAutoFormat().Clone());
334  pClone->SetStyleHandle(attributesToClone);
335  rResult.autoFormats.push_back(std::move(pClone));
336  // note the rStripper is on the whole merged text, so need rOffset
337  rResult.startPositions.push_back(
338  rStripper.GetPositionInStrippedString(rOffset + nStart));
339  rResult.endPositions.push_back(
340  rStripper.GetPositionInStrippedString(rOffset + nEnd));
341  }
342  }
343  }
344  rOffset += aConversionMap.getViewText().getLength();
345 }
346 
349  SwAttrPool& pool, SwRootFrame const*const pLayout)
350 {
352  ToxWhitespaceStripper stripper(source.GetText().sText);
353  result.text = stripper.GetStrippedString();
354 
355  // FIXME: there is a pre-existing problem that the index mapping of the
356  // attributes only works if the paragraph is fully selected
357  if (!source.IsFullPara() || source.aTOXSources.empty())
358  return result;
359 
360  const SwTextNode* pSrc = source.aTOXSources.front().pNd->GetTextNode();
361  if (!pSrc)
362  {
363  return result;
364  }
365 
366  sal_Int32 nOffset(0);
367  GetAttributesForNode(result, nOffset, *pSrc, stripper, pool, pLayout);
368  if (pLayout && pLayout->IsHideRedlines())
369  {
370  if (SwTextFrame const*const pFrame = static_cast<SwTextFrame*>(pSrc->getLayoutFrame(pLayout)))
371  {
372  if (sw::MergedPara const*const pMerged = pFrame->GetMergedPara())
373  {
374  // pSrc already copied above
375  assert(pSrc == pMerged->pParaPropsNode);
376  for (sal_uLong i = pSrc->GetIndex() + 1;
377  i <= pMerged->pLastNode->GetIndex(); ++i)
378  {
379  SwNode *const pTmp(pSrc->GetNodes()[i]);
380  if (pTmp->GetRedlineMergeFlag() == SwNode::Merge::NonFirst)
381  {
382  GetAttributesForNode(result, nOffset,
383  *pTmp->GetTextNode(), stripper, pool, pLayout);
384  }
385  }
386  }
387  }
388  }
389 
390  return result;
391 }
392 
393 /*static*/ void
395 {
396  sal_Int32 offset = targetNode.GetText().getLength();
397  SwIndex aIdx(&targetNode, offset);
398  targetNode.InsertText(htt.text, aIdx);
399  for (size_t i=0; i < htt.autoFormats.size(); ++i) {
400  targetNode.InsertItem(*htt.autoFormats.at(i),
401  htt.startPositions.at(i) + offset,
402  htt.endPositions.at(i) + offset);
403  }
404 }
405 
406 /*static*/ OUString
408 {
409  if (numberOfToxSources == 0) {
410  return OUString();
411  }
412  OUStringBuffer retval;
413  // Place holder for the PageNumber; we only respect the first one
414  retval.append(C_NUM_REPL);
415  for (size_t i = 1; i < numberOfToxSources; ++i) {
416  retval.append(S_PAGE_DELI);
417  retval.append(C_NUM_REPL);
418  }
419  retval.append(C_END_PAGE_NUM);
420  return retval.makeStringAndClear();
421 }
422 
423 /*virtual*/ SwChapterField
425  const SwFormToken* chapterToken, const SwContentFrame* contentFrame,
426  const SwContentNode* contentNode) const
427 {
428  assert(chapterToken);
429  assert(chapterToken->nOutlineLevel >= 1);
430 
431  SwChapterField retval(chapterFieldType, chapterToken->nChapterFormat);
432  retval.SetLevel(static_cast<sal_uInt8>(chapterToken->nOutlineLevel - 1));
433  // #i53420#
434  retval.ChangeExpansion(*contentFrame, contentNode, true);
435  return retval;
436 }
437 } // end namespace sw
438 
439 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
std::vector< SwFormToken > SwFormTokens
Vector of tokens.
Definition: tox.hxx:249
std::shared_ptr< ToxLinkProcessor > mLinkProcessor
const sal_Unicode C_NUM_REPL
Definition: tox.cxx:43
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
sal_uLong GetIndex() const
Definition: node.hxx:282
OUString HandleChapterToken(const SwTOXSortTabBase &rBase, const SwFormToken &aToken, SwRootFrame const *pLayout) const
Handle a chapter token.
sal_Int32 nIndex
virtual OUString GetURL() const
Definition: txmsrt.cxx:181
const OUString & GetText() const
Definition: ndtxt.hxx:210
virtual const SwRootFrame * GetCurrentLayout() const =0
std::vector< std::unique_ptr< SwFormatAutoFormat > > autoFormats
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
Definition: ndtxt.cxx:4883
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:218
sal_uInt16 nOutlineLevel
Definition: tox.hxx:215
Definition: tox.hxx:276
#define RES_CHRATR_CJK_POSTURE
Definition: hintids.hxx:187
sal_uIntPtr sal_uLong
virtual sal_uInt16 GetLevel() const =0
virtual SwFormatAutoFormat * Clone(SfxItemPool *pPool=nullptr) const override
Definition: fmtatr2.cxx:123
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
Definition: node.cxx:1147
Definition: doc.hxx:185
only chapter number without post-/prefix
Definition: chpfld.hxx:35
std::shared_ptr< ToxTabStopTokenHandler > mTabStopTokenHandler
const std::shared_ptr< SfxItemSet > & GetStyleHandle() const
Definition: fmtautofmt.hxx:49
This class helps to remove unwanted whitespaces from a string to use in a Tox.
sal_uInt16 GetFormMax() const
Definition: tox.hxx:653
Dialog to specify the properties of date form field.
void SetLevel(sal_uInt8)
Definition: chpfld.cxx:80
sal_uInt16 Which() const
Definition: txatbase.hxx:110
sal_Int32 GetAnyEnd() const
end (if available), else start
Definition: txatbase.hxx:153
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
static OUString GetNumStringOfFirstNode(const SwTOXSortTabBase &rBase, bool bUsePrefix, sal_uInt8 nLevel, SwRootFrame const *pLayout)
This method will call GetNumStringOfFirstNode() of the first node in the provided SwTOXSortTabBase...
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
Definition: ndtxt.cxx:4088
chapter number without post-/prefix and title
Definition: chpfld.hxx:36
virtual bool IsFullPara() const
Definition: txmsrt.cxx:186
const OUString & GetTitle(SwRootFrame const *pLayout=nullptr) const
Definition: chpfld.cxx:92
sal_Int32 ConvertToViewPosition(sal_Int32 nModelPos) const
Converts a model position into a view position.
const OUString S_PAGE_DELI
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:425
#define RES_PARATR_TABSTOP
Definition: hintids.hxx:260
eField
Definition: fields.hxx:26
sal_Int32 GetStart() const
Definition: txatbase.hxx:82
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
Definition: thints.cxx:1255
Mode eMode
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:958
ToxTextGenerator(const SwForm &toxForm, std::shared_ptr< ToxTabStopTokenHandler > const &tabStopHandler)
virtual SwChapterField ObtainChapterField(SwChapterFieldType *chapterFieldType, const SwFormToken *chapterToken, const SwContentFrame *contentFrame, const SwContentNode *contentNode) const
Obtain a ChapterField to use for the text generation.
const OUString & getViewText() const
number and title
Definition: chpfld.hxx:34
const SwFormTokens & GetPattern(sal_uInt16 nLevel) const
Definition: tox.cxx:932
static OUString ConstructPageNumberPlaceholder(size_t numberOfToxSources)
Handle a page number token.
int i
Marks a character position inside a document model node.
Definition: index.hxx:37
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2804
sal_uInt16 nChapterFormat
Definition: tox.hxx:214
#define RES_CHRATR_ESCAPEMENT
Definition: hintids.hxx:168
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:693
const SwTextTOXMark * pTextMark
Definition: txmsrt.hxx:128
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
Definition: doc.cxx:404
OUString GenerateTextForChapterToken(const SwFormToken &chapterToken, const SwContentFrame *contentFrame, const SwContentNode *contentNode, SwRootFrame const *pLayout) const
Generate the text for a chapter token.
const sal_Unicode C_END_PAGE_NUM
Definition: tox.cxx:44
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:324
ToxAuthorityField
Definition: toxe.hxx:82
only the chapter number
Definition: chpfld.hxx:32
OUString InsertText(const OUString &rStr, const SwIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
Definition: ndtxt.cxx:2276
SwCharFormat * FindCharFormatByName(const OUString &rName) const
Definition: doc.hxx:768
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
ExpandMode
Some helpers for converting model strings to view strings.
OUString sText
Definition: txmsrt.hxx:60
#define RES_TXTATR_AUTOFMT
Definition: hintids.hxx:234
sal_Int32 GetPositionInStrippedString(sal_Int32 pos) const
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:67
void GenerateText(SwDoc *doc, const std::vector< std::unique_ptr< SwTOXSortTabBase >> &entries, sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess, SwRootFrame const *pLayout)
Generate the text for an entry of a table of X (X is, e.g., content).
void ChangeExpansion(const SwFrame &, const SwContentNode *, bool bSrchNum=false)
Definition: chpfld.cxx:127
unsigned char sal_uInt8
#define RES_CHRATR_POSTURE
Definition: hintids.hxx:173
#define RES_CHRATR_CTL_POSTURE
Definition: hintids.hxx:192
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
static std::shared_ptr< SfxItemSet > CollectAttributesForTox(const SwTextAttr &hint, SwAttrPool &pool)
Collect the attributes of a hint that shall be copied over to the TOX.
static void ApplyHandledTextToken(const HandledTextToken &htt, SwTextNode &targetNode)
Applies the result of a handled text token to a target node.
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
Definition: rootfrm.hxx:416
const OUString & GetNumber(SwRootFrame const *pLayout=nullptr) const
Definition: chpfld.cxx:86
OUString GetNumString(const bool _bInclPrefixAndSuffixStrings=true, const unsigned int _nRestrictToThisLevel=MAXLEVEL, SwRootFrame const *pLayout=nullptr) const
Returns outline of numbering string.
Definition: ndtxt.cxx:3121
::cppu::ImplementationEntry const entries[]
static void GetAttributesForNode(HandledTextToken &rResult, sal_Int32 &rOffset, SwTextNode const &rNode, ToxWhitespaceStripper const &rStripper, SwAttrPool &rPool, SwRootFrame const *const pLayout)
Any result
const SwFormatAutoFormat & GetAutoFormat() const
Definition: txatbase.hxx:185
virtual void FillText(SwTextNode &rNd, const SwIndex &rInsPos, sal_uInt16 nAuthField, SwRootFrame const *pLayout) const
Definition: txmsrt.cxx:191
static HandledTextToken HandleTextToken(const SwTOXSortTabBase &source, SwAttrPool &attrPool, SwRootFrame const *const pLayout)
Append text (and selected attributes) to a target node.
TextAndReading const & GetText() const
Definition: txmsrt.hxx:176
Class for sorting directories.
Definition: txmsrt.hxx:120
std::vector< SwTOXSource > aTOXSources
Definition: txmsrt.hxx:125
A helper class for ToxTextGenerator.
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1313
only the title
Definition: chpfld.hxx:33
Base class of the Writer document model elements.
Definition: node.hxx:79