LibreOffice Module sw (master)  1
htmlftn.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 <sal/config.h>
21 
22 #include <string_view>
23 
24 #include <osl/diagnose.h>
25 #include <svtools/htmlout.hxx>
26 #include <svtools/htmlkywd.hxx>
27 #include <rtl/strbuf.hxx>
28 #include <ndindex.hxx>
29 #include <fmtftn.hxx>
30 #include <txtftn.hxx>
31 #include <ftninfo.hxx>
32 #include <doc.hxx>
33 #include <ndtxt.hxx>
34 #include <charfmt.hxx>
35 
36 #include "swhtml.hxx"
37 #include "wrthtml.hxx"
38 
39 static sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
40  sal_Int32 nPos )
41 {
42  rPart.clear();
43  sal_Int32 nLen = rContent.getLength();
44  if( nPos >= nLen )
45  {
46  nPos = -1;
47  }
48  else
49  {
50  bool bQuoted = false, bDone = false;
51  for( ; nPos < nLen && !bDone; nPos++ )
52  {
53  sal_Unicode c = rContent[nPos];
54  switch( c )
55  {
56  case '\\':
57  if( bQuoted )
58  rPart += OUStringChar( c );
59  bQuoted = !bQuoted;
60  break;
61 
62  case ';':
63  if( bQuoted )
64  rPart += OUStringChar( c );
65  else
66  bDone = true;
67  bQuoted = false;
68  break;
69 
70  default:
71  rPart += OUStringChar( c );
72  bQuoted = false;
73  break;
74  }
75  }
76  }
77 
78  return nPos;
79 }
80 
81 static sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
82  const OUString& rContent,
83  bool bEndNote )
84 {
85  sal_Int32 nStrPos = 0;
86  for( int nPart = 0; nPart < 4; ++nPart )
87  {
88  OUString aPart;
89  if( -1 != nStrPos )
90  nStrPos = lcl_html_getNextPart( aPart, rContent, nStrPos );
91 
92  switch( nPart )
93  {
94  case 0:
96  if( !aPart.isEmpty() )
98  rInfo.m_aFormat.GetNumberingType() ));
99  break;
100 
101  case 1:
102  rInfo.m_nFootnoteOffset = aPart.isEmpty() ? 0 : o3tl::narrowing<sal_uInt16>(aPart.toInt32());
103  break;
104 
105  case 2:
106  rInfo.SetPrefix( aPart );
107  break;
108 
109  case 3:
110  rInfo.SetSuffix( aPart );
111  break;
112  }
113  }
114 
115  return nStrPos;
116 }
117 
118 void SwHTMLParser::FillEndNoteInfo( const OUString& rContent )
119 {
120  SwEndNoteInfo aInfo( m_xDoc->GetEndNoteInfo() );
121  lcl_html_getEndNoteInfo( aInfo, rContent, true );
122  m_xDoc->SetEndNoteInfo( aInfo );
123 }
124 
125 void SwHTMLParser::FillFootNoteInfo( const OUString& rContent )
126 {
127  SwFootnoteInfo aInfo( m_xDoc->GetFootnoteInfo() );
128 
129  sal_Int32 nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, false );
130 
131  for( int nPart = 4; nPart < 8; ++nPart )
132  {
133  OUString aPart;
134  if( -1 != nStrPos )
135  nStrPos = lcl_html_getNextPart( aPart, rContent, nStrPos );
136 
137  switch( nPart )
138  {
139  case 4:
140  aInfo.m_eNum = FTNNUM_DOC;
141  if( !aPart.isEmpty() )
142  {
143  switch( aPart[0] )
144  {
145  case 'D': aInfo.m_eNum = FTNNUM_DOC; break;
146  case 'C': aInfo.m_eNum = FTNNUM_CHAPTER; break;
147  case 'P': aInfo.m_eNum = FTNNUM_PAGE; break;
148  }
149  }
150  break;
151 
152  case 5:
153  aInfo.m_ePos = FTNPOS_PAGE;
154  if( !aPart.isEmpty() )
155  {
156  switch( aPart[0] )
157  {
158  case 'C': aInfo.m_ePos = FTNPOS_CHAPTER; break;
159  case 'P': aInfo.m_ePos = FTNPOS_PAGE; break;
160  }
161  }
162  break;
163 
164  case 6:
165  aInfo.m_aQuoVadis = aPart;
166  break;
167 
168  case 7:
169  aInfo.m_aErgoSum = aPart;
170  break;
171  }
172  }
173 
174  m_xDoc->SetFootnoteInfo( aInfo );
175 }
176 
177 void SwHTMLParser::InsertFootEndNote( const OUString& rName, bool bEndNote,
178  bool bFixed )
179 {
180  if( !m_pFootEndNoteImpl )
182 
183  m_pFootEndNoteImpl->sName = rName;
184  if( m_pFootEndNoteImpl->sName.getLength() > 3 )
185  m_pFootEndNoteImpl->sName = m_pFootEndNoteImpl->sName.copy( 0, m_pFootEndNoteImpl->sName.getLength() - 3 );
186  m_pFootEndNoteImpl->sName = m_pFootEndNoteImpl->sName.toAsciiUpperCase();
187  m_pFootEndNoteImpl->bEndNote = bEndNote;
188  m_pFootEndNoteImpl->bFixed = bFixed;
189  m_pFootEndNoteImpl->sContent.clear();
190 }
191 
193 {
194  if( !m_pFootEndNoteImpl )
195  return;
196 
197  SwFormatFootnote aFootnote( m_pFootEndNoteImpl->bEndNote );
198  if( m_pFootEndNoteImpl->bFixed )
199  aFootnote.SetNumStr( m_pFootEndNoteImpl->sContent );
200 
201  m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, aFootnote );
202  SwTextFootnote * const pTextFootnote = static_cast<SwTextFootnote *>(
205  // In header and footer no footnotes can be inserted.
206  if (pTextFootnote)
207  m_pFootEndNoteImpl->aTextFootnotes.push_back(SwHTMLTextFootnote(m_pFootEndNoteImpl->sName,pTextFootnote));
208  m_pFootEndNoteImpl->sName.clear();
209  m_pFootEndNoteImpl->sContent.clear();
210  m_pFootEndNoteImpl->bFixed = false;
211 }
212 
214 {
215  if( m_pFootEndNoteImpl && m_pFootEndNoteImpl->bFixed )
216  m_pFootEndNoteImpl->sContent += aToken;
217 }
218 
220 {
221  SwNodeIndex *pStartNodeIdx = nullptr;
222 
223  if (m_pFootEndNoteImpl)
224  {
225  OUString aName(rName.toAsciiUpperCase());
226 
227  size_t nCount = m_pFootEndNoteImpl->aTextFootnotes.size();
228  for(size_t i = 0; i < nCount; ++i)
229  {
230  if (m_pFootEndNoteImpl->aTextFootnotes[i].sName == aName)
231  {
232  pStartNodeIdx = m_pFootEndNoteImpl->aTextFootnotes[i].pTextFootnote->GetStartNode();
233  m_pFootEndNoteImpl->aTextFootnotes.erase( m_pFootEndNoteImpl->aTextFootnotes.begin() + i );
234  if (m_pFootEndNoteImpl->aTextFootnotes.empty())
235  {
236  m_pFootEndNoteImpl.reset();
237  }
238 
239  break;
240  }
241  }
242  }
243 
244  return pStartNodeIdx;
245 }
246 
248 {
249  SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
250 
251  SwFormatFootnote& rFormatFootnote = const_cast<SwFormatFootnote&>(static_cast<const SwFormatFootnote&>(rHt));
252  SwTextFootnote *pTextFootnote = rFormatFootnote.GetTextFootnote();
253  if( !pTextFootnote )
254  return rWrt;
255 
256  OUString sFootnoteName, sClass;
257  size_t nPos;
258  if( rFormatFootnote.IsEndNote() )
259  {
260  nPos = rHTMLWrt.m_xFootEndNotes ? rHTMLWrt.m_xFootEndNotes->size() : 0;
261  OSL_ENSURE( nPos == static_cast<size_t>(rHTMLWrt.m_nFootNote + rHTMLWrt.m_nEndNote),
262  "OutHTML_SwFormatFootnote: wrong position" );
264  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number( static_cast<sal_Int32>(++rHTMLWrt.m_nEndNote) );
265  }
266  else
267  {
268  nPos = rHTMLWrt.m_nFootNote;
270  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number( static_cast<sal_Int32>(++rHTMLWrt.m_nFootNote));
271  }
272 
273  if( !rHTMLWrt.m_xFootEndNotes )
274  rHTMLWrt.m_xFootEndNotes.emplace();
275  rHTMLWrt.m_xFootEndNotes->insert( rHTMLWrt.m_xFootEndNotes->begin() + nPos, pTextFootnote );
276 
277  OStringBuffer sOut;
278  OString aTag = rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor;
279  sOut.append("<" + aTag + " " OOO_STRING_SVTOOLS_HTML_O_class "=\"");
280  rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
281  HTMLOutFuncs::Out_String( rWrt.Strm(), sClass, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
282  sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
283  rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
284  HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
285  sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor "\" "
287  rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
288  HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
289  sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol "\"");
290  if( !rFormatFootnote.GetNumStr().isEmpty() )
291  sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_sdfixed);
292  sOut.append(">");
293  rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
294  HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OStringConcatenation(rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_superscript ));
295 
296  HTMLOutFuncs::Out_String( rWrt.Strm(), rFormatFootnote.GetViewNumStr(*rWrt.m_pDoc, nullptr),
297  rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
298  HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OStringConcatenation(rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_superscript), false );
299  HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OStringConcatenation(rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor), false );
300 
301  return rWrt;
302 }
303 
305 {
306  OSL_ENSURE( m_xFootEndNotes,
307  "SwHTMLWriter::OutFootEndNotes(): unnecessary call" );
308  if( !m_xFootEndNotes )
309  return;
310 
311 #if OSL_DEBUG_LEVEL > 0
312  sal_uInt16 nFootnote = m_nFootNote, nEn = m_nEndNote;
313 #endif
314  m_nFootNote = 0;
315  m_nEndNote = 0;
316 
317  for( auto *pTextFootnote : *m_xFootEndNotes )
318  {
319  m_pFormatFootnote = &pTextFootnote->GetFootnote();
320 
321  OUString sFootnoteName;
323  {
324  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number(static_cast<sal_Int32>(++m_nEndNote));
325  }
326  else
327  {
328  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number(static_cast<sal_Int32>(++m_nFootNote));
329  }
330 
331  if( m_bLFPossible )
332  OutNewLine();
333  OString sOut =
336  Strm().WriteOString( sOut );
338  Strm().WriteCharPtr( "\">" );
339 
340  m_bLFPossible = true;
341  IncIndentLevel(); // indent content of <DIV>
342 
343  OSL_ENSURE( pTextFootnote, "SwHTMLWriter::OutFootEndNotes: SwTextFootnote is missing" );
344  SwNodeIndex *pSttNdIdx = pTextFootnote->GetStartNode();
345  OSL_ENSURE( pSttNdIdx,
346  "SwHTMLWriter::OutFootEndNotes: StartNode-Index is missing" );
347  if( pSttNdIdx )
348  {
349  HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1,
350  pSttNdIdx->GetNode().EndOfSectionIndex(), false );
351  Out_SwDoc( m_pCurrentPam.get() );
352  }
353 
354  DecIndentLevel(); // indent content of <DIV>
355  if( m_bLFPossible )
356  OutNewLine();
357  HTMLOutFuncs::Out_AsciiTag( Strm(), OStringConcatenation(GetNamespace() + OOO_STRING_SVTOOLS_HTML_division), false );
358  m_bLFPossible = true;
359 
360  OSL_ENSURE( !m_pFormatFootnote,
361  "SwHTMLWriter::OutFootEndNotes: Footnote was not output" );
362  if( m_pFormatFootnote )
363  {
365  m_nEndNote++;
366  else
367  m_nFootNote++;
368 
369  m_pFormatFootnote = nullptr;
370  }
371  }
372 
373 #if OSL_DEBUG_LEVEL > 0
374  OSL_ENSURE( nFootnote == m_nFootNote,
375  "SwHTMLWriter::OutFootEndNotes: Number of footnotes does not match" );
376  OSL_ENSURE( nEn == m_nEndNote,
377  "SwHTMLWriter::OutFootEndNotes: Number of endnotes does not match" );
378 #endif
379 
380  m_xFootEndNotes.reset();
381  m_nFootNote = m_nEndNote = 0;
382 }
383 
384 OUString SwHTMLWriter::GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnote )
385 {
386  const SwEndNoteInfo * pInfo = nullptr;
387  if( rFormatFootnote.GetNumStr().isEmpty() )
388  pInfo = rFormatFootnote.IsEndNote() ? &m_pDoc->GetEndNoteInfo()
389  : &m_pDoc->GetFootnoteInfo();
390 
391  OUString sRet;
392  if( pInfo )
393  sRet = pInfo->GetPrefix();
394  sRet += rFormatFootnote.GetViewNumStr(*m_pDoc, nullptr);
395  if( pInfo )
396  sRet += pInfo->GetSuffix();
397 
398  return sRet;
399 }
400 
402  const OUString& rNum,
403  sal_uInt16 nScript )
404 {
405  const SwEndNoteInfo *pInfo;
406 
407  OUString sFootnoteName, sClass;
408  if( rFormatFootnote.IsEndNote() )
409  {
411  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote +
412  OUString::number(static_cast<sal_Int32>(m_nEndNote));
413  pInfo = &m_pDoc->GetEndNoteInfo();
414  }
415  else
416  {
418  sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote +
419  OUString::number(static_cast<sal_Int32>(m_nFootNote));
420  pInfo = &m_pDoc->GetFootnoteInfo();
421  }
422 
423  const SwCharFormat *pSymCharFormat = pInfo->GetCharFormat( *m_pDoc );
424  if( pSymCharFormat && 0 != m_aScriptTextStyles.count( pSymCharFormat->GetName() ) )
425  {
426  switch( nScript )
427  {
429  sClass += "-western";
430  break;
431  case CSS1_OUTMODE_CJK:
432  sClass += "-cjk";
433  break;
434  case CSS1_OUTMODE_CTL:
435  sClass += "-ctl";
436  break;
437  }
438  }
439 
440  OStringBuffer sOut;
441  sOut.append("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " "
443  Strm().WriteOString( sOut.makeStringAndClear() );
445  sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
446  Strm().WriteOString( sOut.makeStringAndClear() );
448  sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol "\" "
450  Strm().WriteOString( sOut.makeStringAndClear() );
452  sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor "\">");
453  Strm().WriteOString( sOut.makeStringAndClear() );
454 
456  HTMLOutFuncs::Out_AsciiTag( Strm(), OStringConcatenation(GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor), false );
457 }
458 
459 static int lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
460  OUString *pParts,
461  bool bEndNote )
462 {
463  int nParts = 0;
464  sal_Int16 eFormat = rInfo.m_aFormat.GetNumberingType();
465  if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFormat )
466  {
467  const char *pStr = SwHTMLWriter::GetNumFormat( eFormat );
468  if( pStr )
469  {
470  pParts[0] = OUString::createFromAscii( pStr );
471  nParts = 1;
472  }
473  }
474  if( rInfo.m_nFootnoteOffset > 0 )
475  {
476  pParts[1] = OUString::number(rInfo.m_nFootnoteOffset);
477  nParts = 2;
478  }
479  if( !rInfo.GetPrefix().isEmpty() )
480  {
481  pParts[2] = rInfo.GetPrefix();
482  nParts = 3;
483  }
484  if( !rInfo.GetSuffix().isEmpty() )
485  {
486  pParts[3] = rInfo.GetSuffix();
487  nParts = 4;
488  }
489 
490  return nParts;
491 }
492 
493 static void lcl_html_outFootEndNoteInfo( Writer& rWrt, OUString const *pParts,
494  int nParts, const char *pName )
495 {
496  SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt);
497 
498  OUStringBuffer aContent;
499  for( int i=0; i<nParts; ++i )
500  {
501  OUString aTmp( pParts[i] );
502  aTmp = aTmp.replaceAll( "\\", "\\\\" );
503  aTmp = aTmp.replaceAll( ";", "\\;" );
504  if( i > 0 )
505  aContent.append(";");
506  aContent.append(aTmp);
507  }
508 
509  rHTMLWrt.OutNewLine();
510  OString sOut =
511  "<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_meta " "
512  OOO_STRING_SVTOOLS_HTML_O_name "=\"" + pName +
514  rWrt.Strm().WriteOString( sOut );
515  HTMLOutFuncs::Out_String( rWrt.Strm(), aContent.makeStringAndClear(), rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
516  rWrt.Strm().WriteCharPtr( "\">" );
517 }
518 
520 {
521  // Number type (1 or i)
522  // Offset (0)
523  // Before it
524  // Behind it
525  // Doc/Page/Chap (D)
526  // Position (S)
527  // Next page
528  // Beginning
529 
530  {
531  const SwFootnoteInfo& rInfo = m_pDoc->GetFootnoteInfo();
532  OUString aParts[8];
533  int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, false );
534  if( rInfo.m_eNum != FTNNUM_DOC )
535  {
536  aParts[4] = rInfo.m_eNum == FTNNUM_CHAPTER ? std::u16string_view( u"C" ) : std::u16string_view( u"P" );
537  nParts = 5;
538  }
539  if( rInfo.m_ePos != FTNPOS_PAGE)
540  {
541  aParts[5] = "C";
542  nParts = 6;
543  }
544  if( !rInfo.m_aQuoVadis.isEmpty() )
545  {
546  aParts[6] = rInfo.m_aQuoVadis;
547  nParts = 7;
548  }
549  if( !rInfo.m_aErgoSum.isEmpty() )
550  {
551  aParts[7] = rInfo.m_aErgoSum;
552  nParts = 8;
553  }
554  if( nParts > 0 )
555  lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
557  }
558 
559  {
560  const SwEndNoteInfo& rInfo = m_pDoc->GetEndNoteInfo();
561  OUString aParts[4];
562  const int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, true );
563  if( nParts > 0 )
564  lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
566  }
567 }
568 
569 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_STRING_SVTOOLS_HTML_FTN_anchor
SvxNumType GetNumberingType() const
SwNode & GetNode(bool bPoint=true) const
Definition: pam.hxx:224
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:681
void FinishFootEndNote()
Definition: htmlftn.cxx:192
#define OOO_STRING_SVTOOLS_HTML_sdendnote_anc
#define OOO_STRING_SVTOOLS_HTML_META_sdendnote
static SVT_DLLPUBLIC SvStream & Out_String(SvStream &, const OUString &, rtl_TextEncoding eDestEnc, OUString *pNonConvertableChars=nullptr)
void FillEndNoteInfo(const OUString &rContent)
Definition: htmlftn.cxx:118
const OUString & GetSuffix() const
Definition: ftninfo.hxx:71
std::unique_ptr< SwHTMLFootEndNote_Impl > m_pFootEndNoteImpl
Definition: swhtml.hxx:404
#define OOO_STRING_SVTOOLS_HTML_meta
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_anc
void SetNumStr(const OUString &rStr)
Definition: fmtftn.hxx:73
void DecIndentLevel()
Definition: wrthtml.hxx:508
OUString m_aNonConvertableCharacters
Definition: wrthtml.hxx:295
SwNode & GetNode() const
Definition: ndindex.hxx:121
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_sym
#define OOO_STRING_SVTOOLS_HTML_O_id
bool IsEndNote() const
Definition: fmtftn.hxx:71
static SVT_DLLPUBLIC SvStream & Out_AsciiTag(SvStream &, std::string_view rStr, bool bOn=true)
#define OOO_STRING_SVTOOLS_HTML_superscript
static sal_Int32 lcl_html_getNextPart(OUString &rPart, const OUString &rContent, sal_Int32 nPos)
Definition: htmlftn.cxx:39
SvStream & WriteCharPtr(const char *pBuf)
OUString GetViewNumStr(const SwDoc &rDoc, SwRootFrame const *pLayout, bool bInclStrings=false) const
Returns string to be displayed of footnote / endnote.
Definition: atrftn.cxx:217
#define CSS1_OUTMODE_CJK
Definition: wrthtml.hxx:182
std::optional< std::vector< SwTextFootnote * > > m_xFootEndNotes
Definition: wrthtml.hxx:292
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
Definition: ndtxt.cxx:3012
void OutNewLine(bool bCheck=false)
Definition: wrthtml.cxx:1441
static sal_Int32 lcl_html_getEndNoteInfo(SwEndNoteInfo &rInfo, const OUString &rContent, bool bEndNote)
Definition: htmlftn.cxx:81
const SwTextFootnote * GetTextFootnote() const
Definition: fmtftn.hxx:83
sal_uInt16 sal_Unicode
bool m_bLFPossible
Definition: wrthtml.hxx:381
SwIndex nContent
Definition: pam.hxx:39
#define OOO_STRING_SVTOOLS_HTML_O_href
static const char * GetNumFormat(sal_uInt16 nFormat)
Definition: htmlfldw.cxx:42
const OUString & GetName() const
Definition: format.hxx:115
int nCount
SVX_NUM_ARABIC
SVX_NUM_ROMAN_LOWER
const OUString & GetNumStr() const
Definition: fmtftn.hxx:68
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:154
OUString GetFootEndNoteSym(const SwFormatFootnote &rFormatFootnote)
Definition: htmlftn.cxx:384
SwPaM * m_pPam
Definition: swhtml.hxx:393
#define OOO_STRING_SVTOOLS_HTML_sdfootnote
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(58)
static void lcl_html_outFootEndNoteInfo(Writer &rWrt, OUString const *pParts, int nParts, const char *pName)
Definition: htmlftn.cxx:493
std::set< OUString > m_aScriptTextStyles
Definition: wrthtml.hxx:285
#define OOO_STRING_SVTOOLS_HTML_O_class
SwNodeIndex * GetFootEndNoteSection(const OUString &rName)
Definition: htmlftn.cxx:219
SwFootnoteNum m_eNum
Definition: ftninfo.hxx:98
void InsertFootEndNote(const OUString &rName, bool bEndNote, bool bFixed)
Definition: htmlftn.cxx:177
sal_uInt16 char * pName
rtl_TextEncoding m_eDestEnc
Definition: wrthtml.hxx:336
int i
const SwPosition * GetPoint() const
Definition: pam.hxx:208
Writer & OutHTML_SwFormatFootnote(Writer &rWrt, const SfxPoolItem &rHt)
Definition: htmlftn.cxx:247
sal_uInt16 m_nFootnoteOffset
Definition: ftninfo.hxx:47
static int lcl_html_fillEndNoteInfo(const SwEndNoteInfo &rInfo, OUString *pParts, bool bEndNote)
Definition: htmlftn.cxx:459
float u
#define OOO_STRING_SVTOOLS_HTML_O_name
SvxNumberType m_aFormat
Definition: ftninfo.hxx:46
Marks a node in the document model.
Definition: ndindex.hxx:32
sal_uInt16 m_nEndNote
Definition: wrthtml.hxx:315
Represents the style of a text portion.
Definition: charfmt.hxx:26
void SetPrefix(const OUString &rSet)
Definition: ftninfo.hxx:73
void Out_SwDoc(SwPaM *)
Definition: wrthtml.cxx:815
const SwFormatFootnote * m_pFormatFootnote
Definition: wrthtml.hxx:304
const OUString & GetPrefix() const
Definition: ftninfo.hxx:70
#define OOO_STRING_SVTOOLS_HTML_division
void InsertFootEndNoteText()
Definition: htmlftn.cxx:213
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
Definition: docftn.cxx:140
#define OOO_STRING_SVTOOLS_HTML_sdendnote
#define OOO_STRING_SVTOOLS_HTML_sdendnote_sym
SvStream & WriteOString(std::string_view rStr)
static SvxNumType GetNumType(const OUString &rStr, SvxNumType eDfltType)
Definition: htmlfld.cxx:199
void IncIndentLevel()
Definition: wrthtml.hxx:504
#define CSS1_OUTMODE_WESTERN
Definition: wrthtml.hxx:180
void OutFootEndNotes()
Definition: htmlftn.cxx:304
OUString aName
sal_Int32 GetIndex() const
Definition: index.hxx:91
OString GetNamespace() const
Determines the prefix string needed to respect the requested namespace alias.
Definition: wrthtml.cxx:1490
#define OOO_STRING_SVTOOLS_HTML_O_content
sal_uInt16 m_nFootNote
Definition: wrthtml.hxx:316
std::shared_ptr< SwUnoCursor > m_pCurrentPam
Definition: shellio.hxx:410
void SetSuffix(const OUString &rSet)
Definition: ftninfo.hxx:74
OUString m_aQuoVadis
Definition: ftninfo.hxx:95
SvStream & Strm()
Definition: writer.cxx:215
void FillFootNoteInfo(const OUString &rContent)
Definition: htmlftn.cxx:125
SwFootnotePos m_ePos
Definition: ftninfo.hxx:97
#define OOO_STRING_SVTOOLS_HTML_O_sdfixed
#define OOO_STRING_SVTOOLS_HTML_FTN_symbol
void SetNumberingType(SvxNumType nSet)
rtl::Reference< SwDoc > m_xDoc
Definition: swhtml.hxx:392
#define CSS1_OUTMODE_CTL
Definition: wrthtml.hxx:184
#define OOO_STRING_SVTOOLS_HTML_anchor
void OutFootEndNoteInfo()
Definition: htmlftn.cxx:519
const SwFootnoteInfo & GetFootnoteInfo() const
Definition: doc.hxx:630
void OutFootEndNoteSym(const SwFormatFootnote &rFormatFootnote, const OUString &rNum, sal_uInt16 nScript)
Definition: htmlftn.cxx:401
#define OOO_STRING_SVTOOLS_HTML_META_sdfootnote
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:632
OUString m_aErgoSum
Definition: ftninfo.hxx:96
SwDoc * m_pDoc
Definition: shellio.hxx:408
sal_uInt16 nPos
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:856