22 #include <string_view>
24 #include <osl/diagnose.h>
28 #include <rtl/strbuf.hxx>
44 sal_Int32 nLen = rContent.getLength();
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 const OUString& rContent,
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() )
166 aInfo.m_aQuoVadis = aPart;
170 aInfo.m_aErgoSum = aPart;
175 m_xDoc->SetFootnoteInfo( aInfo );
202 m_xDoc->getIDocumentContentOperations().InsertPoolItem( *
m_pPam, aFootnote );
226 OUString
aName(rName.toAsciiUpperCase());
229 for(
size_t i = 0;
i < nCount; ++
i)
245 return pStartNodeIdx;
255 switch (rLineBreak.GetValue())
283 OUString sFootnoteName, sClass;
289 "OutHTML_SwFormatFootnote: wrong position" );
317 if( !rFormatFootnote.
GetNumStr().isEmpty() )
333 "SwHTMLWriter::OutFootEndNotes(): unnecessary call" );
337 #if OSL_DEBUG_LEVEL > 0
347 OUString sFootnoteName;
369 OSL_ENSURE( pTextFootnote,
"SwHTMLWriter::OutFootEndNotes: SwTextFootnote is missing" );
370 SwNodeIndex *pSttNdIdx = pTextFootnote->GetStartNode();
371 OSL_ENSURE( pSttNdIdx,
372 "SwHTMLWriter::OutFootEndNotes: StartNode-Index is missing" );
387 "SwHTMLWriter::OutFootEndNotes: Footnote was not output" );
399 #if OSL_DEBUG_LEVEL > 0
401 "SwHTMLWriter::OutFootEndNotes: Number of footnotes does not match" );
403 "SwHTMLWriter::OutFootEndNotes: Number of endnotes does not match" );
406 m_xFootEndNotes.reset();
413 if( rFormatFootnote.
GetNumStr().isEmpty() )
428 const OUString& rNum,
433 OUString sFootnoteName, sClass;
438 OUString::number(static_cast<sal_Int32>(
m_nEndNote));
445 OUString::number(static_cast<sal_Int32>(
m_nFootNote));
455 sClass +=
"-western";
496 pParts[0] = OUString::createFromAscii( pStr );
520 int nParts,
const char *
pName )
524 OUStringBuffer aContent;
525 for(
int i=0;
i<nParts; ++
i )
527 OUString aTmp( pParts[
i] );
528 aTmp = aTmp.replaceAll(
"\\",
"\\\\" );
529 aTmp = aTmp.replaceAll(
";",
"\\;" );
531 aContent.append(
";");
532 aContent.append(aTmp);
#define OOO_STRING_SVTOOLS_HTML_FTN_anchor
SvxNumType GetNumberingType() const
SwNode & GetNode(bool bPoint=true) const
SwNodeOffset EndOfSectionIndex() const
#define OOO_STRING_SVTOOLS_HTML_O_clear
#define OOO_STRING_SVTOOLS_HTML_sdendnote_anc
#define OOO_STRING_SVTOOLS_HTML_META_sdendnote
void FillEndNoteInfo(const OUString &rContent)
const OUString & GetSuffix() const
std::unique_ptr< SwHTMLFootEndNote_Impl > m_pFootEndNoteImpl
#define OOO_STRING_SVTOOLS_HTML_meta
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_anc
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_sym
#define OOO_STRING_SVTOOLS_HTML_O_id
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)
SvStream & WriteCharPtr(const char *pBuf)
OString maNamespace
XML namespace, in case of XHTML.
std::optional< std::vector< SwTextFootnote * > > m_xFootEndNotes
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...
void OutNewLine(bool bCheck=false)
static sal_Int32 lcl_html_getEndNoteInfo(SwEndNoteInfo &rInfo, const OUString &rContent, bool bEndNote)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
#define OOO_STRING_SVTOOLS_HTML_O_href
static const char * GetNumFormat(sal_uInt16 nFormat)
SwNodeOffset GetIndex() const
OUString GetFootEndNoteSym(const SwFormatFootnote &rFormatFootnote)
#define OOO_STRING_SVTOOLS_HTML_sdfootnote
static void lcl_html_outFootEndNoteInfo(Writer &rWrt, OUString const *pParts, int nParts, const char *pName)
std::set< OUString > m_aScriptTextStyles
#define OOO_STRING_SVTOOLS_HTML_O_class
SwNodeIndex * GetFootEndNoteSection(const OUString &rName)
void InsertFootEndNote(const OUString &rName, bool bEndNote, bool bFixed)
const SwPosition * GetPoint() const
Writer & OutHTML_SwFormatFootnote(Writer &rWrt, const SfxPoolItem &rHt)
sal_uInt16 m_nFootnoteOffset
static int lcl_html_fillEndNoteInfo(const SwEndNoteInfo &rInfo, OUString *pParts, bool bEndNote)
#define OOO_STRING_SVTOOLS_HTML_O_name
Marks a node in the document model.
void SetPrefix(const OUString &rSet)
const SwFormatFootnote * m_pFormatFootnote
const OUString & GetPrefix() const
#define OOO_STRING_SVTOOLS_HTML_division
#define OOO_STRING_SVTOOLS_HTML_linebreak
void InsertFootEndNoteText()
SwCharFormat * GetCharFormat(SwDoc &rDoc) const
static SVT_DLLPUBLIC SvStream & Out_String(SvStream &, const OUString &, OUString *pNonConvertableChars=nullptr)
void start(const OString &aElement)
#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)
#define CSS1_OUTMODE_WESTERN
sal_Int32 GetIndex() const
OString GetNamespace() const
Determines the prefix string needed to respect the requested namespace alias.
#define OOO_STRING_SVTOOLS_HTML_O_content
std::shared_ptr< SwUnoCursor > m_pCurrentPam
void SetSuffix(const OUString &rSet)
void FillFootNoteInfo(const OUString &rContent)
#define OOO_STRING_SVTOOLS_HTML_O_sdfixed
#define OOO_STRING_SVTOOLS_HTML_FTN_symbol
void SetNumberingType(SvxNumType nSet)
Writer & OutHTML_SwFormatLineBreak(Writer &rWrt, const SfxPoolItem &rHt)
rtl::Reference< SwDoc > m_xDoc
#define OOO_STRING_SVTOOLS_HTML_anchor
void OutFootEndNoteInfo()
const SwFootnoteInfo & GetFootnoteInfo() const
void OutFootEndNoteSym(const SwFormatFootnote &rFormatFootnote, const OUString &rNum, sal_uInt16 nScript)
#define OOO_STRING_SVTOOLS_HTML_META_sdfootnote
const SwEndNoteInfo & GetEndNoteInfo() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool m_bDetectedRangeSegmentation false