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