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].GetName() == aName)
232 {
233 pStartNodeIdx = const_cast<SwNodeIndex*>(m_pFootEndNoteImpl->aTextFootnotes[i].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 const auto& rLineBreak = static_cast<const SwFormatLineBreak&>(rHt);
251
252 HtmlWriter aWriter(rWrt.Strm(), rWrt.maNamespace);
254 switch (rLineBreak.GetValue())
255 {
258 break;
261 break;
264 break;
267 break;
268 }
269 aWriter.end();
270 return rWrt;
271}
272
274{
275 SwFormatFootnote& rFormatFootnote = const_cast<SwFormatFootnote&>(static_cast<const SwFormatFootnote&>(rHt));
276 SwTextFootnote *pTextFootnote = rFormatFootnote.GetTextFootnote();
277 if( !pTextFootnote )
278 return rWrt;
279
280 OUString sFootnoteName, sClass;
281 size_t nPos;
282 if( rFormatFootnote.IsEndNote() )
283 {
284 nPos = rWrt.m_xFootEndNotes ? rWrt.m_xFootEndNotes->size() : 0;
285 OSL_ENSURE( nPos == static_cast<size_t>(rWrt.m_nFootNote + rWrt.m_nEndNote),
286 "OutHTML_SwFormatFootnote: wrong position" );
288 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number( static_cast<sal_Int32>(++rWrt.m_nEndNote) );
289 }
290 else
291 {
292 nPos = rWrt.m_nFootNote;
294 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number( static_cast<sal_Int32>(++rWrt.m_nFootNote));
295 }
296
297 if( !rWrt.m_xFootEndNotes )
298 rWrt.m_xFootEndNotes.emplace();
299 rWrt.m_xFootEndNotes->insert( rWrt.m_xFootEndNotes->begin() + nPos, pTextFootnote );
300
301 OStringBuffer sOut;
302 OString aTag = rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor;
303 sOut.append("<" + aTag + " " OOO_STRING_SVTOOLS_HTML_O_class "=\"");
304 rWrt.Strm().WriteOString( sOut );
305 sOut.setLength(0);
306 HTMLOutFuncs::Out_String( rWrt.Strm(), sClass );
307 sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
308 rWrt.Strm().WriteOString( sOut );
309 sOut.setLength(0);
310 HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName );
311 sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor "\" "
313 rWrt.Strm().WriteOString( sOut );
314 sOut.setLength(0);
315 HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName );
316 sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol "\"");
317 if( !rFormatFootnote.GetNumStr().isEmpty() )
318 sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_sdfixed);
319 sOut.append(">");
320 rWrt.Strm().WriteOString( sOut );
321 sOut.setLength(0);
323
324 HTMLOutFuncs::Out_String( rWrt.Strm(), rFormatFootnote.GetViewNumStr(*rWrt.m_pDoc, nullptr) );
326 HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), Concat2View(rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor), false );
327
328 return rWrt;
329}
330
332{
333 OSL_ENSURE( m_xFootEndNotes,
334 "SwHTMLWriter::OutFootEndNotes(): unnecessary call" );
335 if( !m_xFootEndNotes )
336 return;
337
338#if OSL_DEBUG_LEVEL > 0
339 sal_uInt16 nFootnote = m_nFootNote, nEn = m_nEndNote;
340#endif
341 m_nFootNote = 0;
342 m_nEndNote = 0;
343
344 for( auto *pTextFootnote : *m_xFootEndNotes )
345 {
346 m_pFormatFootnote = &pTextFootnote->GetFootnote();
347
348 OUString sFootnoteName;
350 {
351 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number(static_cast<sal_Int32>(++m_nEndNote));
352 }
353 else
354 {
355 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number(static_cast<sal_Int32>(++m_nFootNote));
356 }
357
358 if( m_bLFPossible )
359 OutNewLine();
360 OString sOut =
363 Strm().WriteOString( sOut );
364 HTMLOutFuncs::Out_String( Strm(), sFootnoteName );
365 Strm().WriteOString( "\">" );
366
367 m_bLFPossible = true;
368 IncIndentLevel(); // indent content of <DIV>
369
370 OSL_ENSURE( pTextFootnote, "SwHTMLWriter::OutFootEndNotes: SwTextFootnote is missing" );
371 const SwNodeIndex *pSttNdIdx = pTextFootnote->GetStartNode();
372 OSL_ENSURE( pSttNdIdx,
373 "SwHTMLWriter::OutFootEndNotes: StartNode-Index is missing" );
374 if( pSttNdIdx )
375 {
376 HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1,
377 pSttNdIdx->GetNode().EndOfSectionIndex(), false );
378 Out_SwDoc( m_pCurrentPam.get() );
379 }
380
381 DecIndentLevel(); // indent content of <DIV>
382 if( m_bLFPossible )
383 OutNewLine();
385 m_bLFPossible = true;
386
387 OSL_ENSURE( !m_pFormatFootnote,
388 "SwHTMLWriter::OutFootEndNotes: Footnote was not output" );
390 {
392 m_nEndNote++;
393 else
394 m_nFootNote++;
395
396 m_pFormatFootnote = nullptr;
397 }
398 }
399
400#if OSL_DEBUG_LEVEL > 0
401 OSL_ENSURE( nFootnote == m_nFootNote,
402 "SwHTMLWriter::OutFootEndNotes: Number of footnotes does not match" );
403 OSL_ENSURE( nEn == m_nEndNote,
404 "SwHTMLWriter::OutFootEndNotes: Number of endnotes does not match" );
405#endif
406
407 m_xFootEndNotes.reset();
409}
410
411OUString SwHTMLWriter::GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnote )
412{
413 const SwEndNoteInfo * pInfo = nullptr;
414 if( rFormatFootnote.GetNumStr().isEmpty() )
415 pInfo = rFormatFootnote.IsEndNote() ? &m_pDoc->GetEndNoteInfo()
417
418 OUString sRet;
419 if( pInfo )
420 sRet = pInfo->GetPrefix();
421 sRet += rFormatFootnote.GetViewNumStr(*m_pDoc, nullptr);
422 if( pInfo )
423 sRet += pInfo->GetSuffix();
424
425 return sRet;
426}
427
429 const OUString& rNum,
430 sal_uInt16 nScript )
431{
432 const SwEndNoteInfo *pInfo;
433
434 OUString sFootnoteName, sClass;
435 if( rFormatFootnote.IsEndNote() )
436 {
438 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote +
439 OUString::number(static_cast<sal_Int32>(m_nEndNote));
440 pInfo = &m_pDoc->GetEndNoteInfo();
441 }
442 else
443 {
445 sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote +
446 OUString::number(static_cast<sal_Int32>(m_nFootNote));
447 pInfo = &m_pDoc->GetFootnoteInfo();
448 }
449
450 const SwCharFormat *pSymCharFormat = pInfo->GetCharFormat( *m_pDoc );
451 if( pSymCharFormat && 0 != m_aScriptTextStyles.count( pSymCharFormat->GetName() ) )
452 {
453 switch( nScript )
454 {
456 sClass += "-western";
457 break;
458 case CSS1_OUTMODE_CJK:
459 sClass += "-cjk";
460 break;
461 case CSS1_OUTMODE_CTL:
462 sClass += "-ctl";
463 break;
464 }
465 }
466
467 OStringBuffer sOut("<"
470 Strm().WriteOString( sOut );
471 sOut.setLength(0);
472 HTMLOutFuncs::Out_String( Strm(), sClass );
473 sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
474 Strm().WriteOString( sOut );
475 sOut.setLength(0);
476 HTMLOutFuncs::Out_String( Strm(), sFootnoteName );
477 sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol "\" "
479 Strm().WriteOString( sOut );
480 sOut.setLength(0);
481 HTMLOutFuncs::Out_String( Strm(), sFootnoteName );
482 sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor "\">");
483 Strm().WriteOString( sOut );
484 sOut.setLength(0);
485
488}
489
491 OUString *pParts,
492 bool bEndNote )
493{
494 int nParts = 0;
495 sal_Int16 eFormat = rInfo.m_aFormat.GetNumberingType();
496 if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFormat )
497 {
498 const char *pStr = SwHTMLWriter::GetNumFormat( eFormat );
499 if( pStr )
500 {
501 pParts[0] = OUString::createFromAscii( pStr );
502 nParts = 1;
503 }
504 }
505 if( rInfo.m_nFootnoteOffset > 0 )
506 {
507 pParts[1] = OUString::number(rInfo.m_nFootnoteOffset);
508 nParts = 2;
509 }
510 if( !rInfo.GetPrefix().isEmpty() )
511 {
512 pParts[2] = rInfo.GetPrefix();
513 nParts = 3;
514 }
515 if( !rInfo.GetSuffix().isEmpty() )
516 {
517 pParts[3] = rInfo.GetSuffix();
518 nParts = 4;
519 }
520
521 return nParts;
522}
523
524static void lcl_html_outFootEndNoteInfo( SwHTMLWriter& rWrt, OUString const *pParts,
525 int nParts, const char *pName )
526{
527 OUStringBuffer aContent;
528 for( int i=0; i<nParts; ++i )
529 {
530 OUString aTmp( pParts[i] );
531 aTmp = aTmp.replaceAll( "\\", "\\\\" );
532 aTmp = aTmp.replaceAll( ";", "\\;" );
533 if( i > 0 )
534 aContent.append(";");
535 aContent.append(aTmp);
536 }
537
538 rWrt.OutNewLine();
539 OString sOut =
543 rWrt.Strm().WriteOString( sOut );
544 HTMLOutFuncs::Out_String( rWrt.Strm(), aContent.makeStringAndClear() );
545 rWrt.Strm().WriteOString( "\">" );
546}
547
549{
550 // Number type (1 or i)
551 // Offset (0)
552 // Before it
553 // Behind it
554 // Doc/Page/Chap (D)
555 // Position (S)
556 // Next page
557 // Beginning
558
559 {
560 const SwFootnoteInfo& rInfo = m_pDoc->GetFootnoteInfo();
561 OUString aParts[8];
562 int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, false );
563 if( rInfo.m_eNum != FTNNUM_DOC )
564 {
565 aParts[4] = rInfo.m_eNum == FTNNUM_CHAPTER ? std::u16string_view( u"C" ) : std::u16string_view( u"P" );
566 nParts = 5;
567 }
568 if( rInfo.m_ePos != FTNPOS_PAGE)
569 {
570 aParts[5] = "C";
571 nParts = 6;
572 }
573 if( !rInfo.m_aQuoVadis.isEmpty() )
574 {
575 aParts[6] = rInfo.m_aQuoVadis;
576 nParts = 7;
577 }
578 if( !rInfo.m_aErgoSum.isEmpty() )
579 {
580 aParts[7] = rInfo.m_aErgoSum;
581 nParts = 8;
582 }
583 if( nParts > 0 )
584 lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
586 }
587
588 {
589 const SwEndNoteInfo& rInfo = m_pDoc->GetEndNoteInfo();
590 OUString aParts[4];
591 const int nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, true );
592 if( nParts > 0 )
593 lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
595 }
596}
597
598/* 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)
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:645
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:647
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
SfxPoolItem subclass for footnotes and endnotes, stored in the anchor text node.
Definition: fmtftn.hxx:47
const OUString & GetNumStr() const
Definition: fmtftn.hxx:72
OUString GetViewNumStr(const SwDoc &rDoc, SwRootFrame const *pLayout, bool bInclStrings=false) const
Returns string to be displayed of footnote / endnote.
Definition: atrftn.cxx:218
bool IsEndNote() const
Definition: fmtftn.hxx:75
void SetNumStr(const OUString &rStr)
Definition: fmtftn.hxx:77
const SwTextFootnote * GetTextFootnote() const
Definition: fmtftn.hxx:87
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
void FinishFootEndNote()
Definition: htmlftn.cxx:193
void FillEndNoteInfo(std::u16string_view aContent)
Definition: htmlftn.cxx:119
SwPaM * m_pPam
Definition: swhtml.hxx:399
static SvxNumType GetNumType(std::u16string_view rStr, SvxNumType eDfltType)
Definition: htmlfld.cxx:200
rtl::Reference< SwDoc > m_xDoc
Definition: swhtml.hxx:398
void InsertFootEndNoteText()
Definition: htmlftn.cxx:214
std::unique_ptr< SwHTMLFootEndNote_Impl > m_pFootEndNoteImpl
Definition: swhtml.hxx:410
SwNodeIndex * GetFootEndNoteSection(const OUString &rName)
Definition: htmlftn.cxx:220
static const char * GetNumFormat(sal_uInt16 nFormat)
Definition: htmlfldw.cxx:47
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:428
std::set< OUString > m_aScriptTextStyles
Definition: wrthtml.hxx:301
void OutFootEndNotes()
Definition: htmlftn.cxx:331
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:1586
void Out_SwDoc(SwPaM *)
Definition: wrthtml.cxx:900
void OutFootEndNoteInfo()
Definition: htmlftn.cxx:548
void OutNewLine(bool bCheck=false)
Definition: wrthtml.cxx:1537
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:411
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNode & GetNode() const
Definition: ndindex.hxx:123
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:111
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:691
SwNode & GetPointNode() const
Definition: pam.hxx:275
const SwPosition * GetPoint() const
Definition: pam.hxx:253
SwTextAttr subclass for footnotes and endnotes.
Definition: txtftn.hxx:34
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:3155
SvStream & Strm()
Definition: writer.cxx:193
SwDoc * m_pDoc
Definition: shellio.hxx:407
std::shared_ptr< SwUnoCursor > m_pCurrentPam
Definition: shellio.hxx:409
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)
SwHTMLWriter & OutHTML_SwFormatFootnote(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
Definition: htmlftn.cxx:273
static sal_Int32 lcl_html_getNextPart(OUString &rPart, std::u16string_view aContent, sal_Int32 nPos)
Definition: htmlftn.cxx:40
static void lcl_html_outFootEndNoteInfo(SwHTMLWriter &rWrt, OUString const *pParts, int nParts, const char *pName)
Definition: htmlftn.cxx:524
static sal_Int32 lcl_html_getEndNoteInfo(SwEndNoteInfo &rInfo, std::u16string_view aContent, bool bEndNote)
Definition: htmlftn.cxx:82
SwHTMLWriter & OutHTML_SwFormatLineBreak(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
Definition: htmlftn.cxx:248
static int lcl_html_fillEndNoteInfo(const SwEndNoteInfo &rInfo, OUString *pParts, bool bEndNote)
Definition: htmlftn.cxx:490
#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:85
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