24#include <osl/diagnose.h>
28#include <rtl/strbuf.hxx>
44 sal_Int32 nLen = aContent.size();
51 bool bQuoted =
false, bDone =
false;
52 for( ;
nPos < nLen && !bDone;
nPos++ )
59 rPart += OUStringChar( c );
65 rPart += OUStringChar( c );
72 rPart += OUStringChar( c );
83 std::u16string_view aContent,
86 sal_Int32 nStrPos = 0;
87 for(
int nPart = 0; nPart < 4; ++nPart )
97 if( !aPart.isEmpty() )
103 rInfo.
m_nFootnoteOffset = aPart.isEmpty() ? 0 : o3tl::narrowing<sal_uInt16>(aPart.toInt32());
123 m_xDoc->SetEndNoteInfo( aInfo );
132 for(
int nPart = 4; nPart < 8; ++nPart )
142 if( !aPart.isEmpty() )
155 if( !aPart.isEmpty() )
175 m_xDoc->SetFootnoteInfo( aInfo );
202 m_xDoc->getIDocumentContentOperations().InsertPoolItem( *
m_pPam, aFootnote );
226 OUString
aName(rName.toAsciiUpperCase());
245 return pStartNodeIdx;
254 switch (rLineBreak.GetValue())
280 OUString sFootnoteName, sClass;
286 "OutHTML_SwFormatFootnote: wrong position" );
317 if( !rFormatFootnote.
GetNumStr().isEmpty() )
334 "SwHTMLWriter::OutFootEndNotes(): unnecessary call" );
338#if OSL_DEBUG_LEVEL > 0
348 OUString sFootnoteName;
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" );
388 "SwHTMLWriter::OutFootEndNotes: Footnote was not output" );
400#if OSL_DEBUG_LEVEL > 0
402 "SwHTMLWriter::OutFootEndNotes: Number of footnotes does not match" );
404 "SwHTMLWriter::OutFootEndNotes: Number of endnotes does not match" );
414 if( rFormatFootnote.
GetNumStr().isEmpty() )
429 const OUString& rNum,
434 OUString sFootnoteName, sClass;
439 OUString::number(
static_cast<sal_Int32
>(
m_nEndNote));
446 OUString::number(
static_cast<sal_Int32
>(
m_nFootNote));
456 sClass +=
"-western";
467 OStringBuffer sOut(
"<"
501 pParts[0] = OUString::createFromAscii( pStr );
525 int nParts,
const char *pName )
527 OUStringBuffer aContent;
528 for(
int i=0;
i<nParts; ++
i )
530 OUString aTmp( pParts[
i] );
531 aTmp = aTmp.replaceAll(
"\\",
"\\\\" );
532 aTmp = aTmp.replaceAll(
";",
"\\;" );
534 aContent.append(
";");
535 aContent.append(aTmp);
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
const SwFootnoteInfo & GetFootnoteInfo() const
const SwEndNoteInfo & GetEndNoteInfo() const
void SetPrefix(const OUString &rSet)
const OUString & GetPrefix() const
void SetSuffix(const OUString &rSet)
sal_uInt16 m_nFootnoteOffset
const OUString & GetSuffix() const
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
void InsertFootEndNote(const OUString &rName, bool bEndNote, bool bFixed)
void FillFootNoteInfo(std::u16string_view aContent)
void FillEndNoteInfo(std::u16string_view aContent)
static SvxNumType GetNumType(std::u16string_view rStr, SvxNumType eDfltType)
rtl::Reference< SwDoc > m_xDoc
void InsertFootEndNoteText()
std::unique_ptr< SwHTMLFootEndNote_Impl > m_pFootEndNoteImpl
SwNodeIndex * GetFootEndNoteSection(const OUString &rName)
static const char * GetNumFormat(sal_uInt16 nFormat)
std::optional< std::vector< SwTextFootnote * > > m_xFootEndNotes
void OutFootEndNoteSym(const SwFormatFootnote &rFormatFootnote, const OUString &rNum, sal_uInt16 nScript)
std::set< OUString > m_aScriptTextStyles
OString GetNamespace() const
Determines the prefix string needed to respect the requested namespace alias.
void OutFootEndNoteInfo()
void OutNewLine(bool bCheck=false)
const SwFormatFootnote * m_pFormatFootnote
OString maNamespace
XML namespace, in case of XHTML.
OUString GetFootEndNoteSym(const SwFormatFootnote &rFormatFootnote)
Marks a node in the document model.
SwNodeOffset GetIndex() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset EndOfSectionIndex() const
SwNode & GetPointNode() const
const SwPosition * GetPoint() const
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...
std::shared_ptr< SwUnoCursor > m_pCurrentPam
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
SwHTMLWriter & OutHTML_SwFormatFootnote(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static sal_Int32 lcl_html_getNextPart(OUString &rPart, std::u16string_view aContent, sal_Int32 nPos)
static void lcl_html_outFootEndNoteInfo(SwHTMLWriter &rWrt, OUString const *pParts, int nParts, const char *pName)
static sal_Int32 lcl_html_getEndNoteInfo(SwEndNoteInfo &rInfo, std::u16string_view aContent, bool bEndNote)
SwHTMLWriter & OutHTML_SwFormatLineBreak(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static int lcl_html_fillEndNoteInfo(const SwEndNoteInfo &rInfo, OUString *pParts, bool bEndNote)
#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
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
#define CSS1_OUTMODE_WESTERN