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