LibreOffice Module sw (master) 1
Typedefs | Functions | Variables
htmlatr.cxx File Reference
#include <hintids.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/string.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
#include <svl/whiter.hxx>
#include <sfx2/event.hxx>
#include <sfx2/htmlmode.hxx>
#include <editeng/escapementitem.hxx>
#include <editeng/formatbreakitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/blinkitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/adjustitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <fchrfmt.hxx>
#include <fmtautofmt.hxx>
#include <fmtfsize.hxx>
#include <fmtclds.hxx>
#include <fmtpdsc.hxx>
#include <fmtflcnt.hxx>
#include <fmtinfmt.hxx>
#include <txatbase.hxx>
#include <frmatr.hxx>
#include <charfmt.hxx>
#include <fmtfld.hxx>
#include <doc.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <paratr.hxx>
#include <poolfmt.hxx>
#include <pagedesc.hxx>
#include <swtable.hxx>
#include <fldbas.hxx>
#include <breakit.hxx>
#include "htmlatr.hxx"
#include "htmlnum.hxx"
#include "wrthtml.hxx"
#include "htmlfly.hxx"
#include <numrule.hxx>
#include <rtl/character.hxx>
#include <osl/diagnose.h>
#include <deque>
#include <svtools/HtmlWriter.hxx>
#include <o3tl/string_view.hxx>
#include <memory>
#include <algorithm>
Include dependency graph for htmlatr.cxx:

Go to the source code of this file.

Typedefs

typedef std::vector< HTMLStartEndPos * > HTMLStartEndPositions
 

Functions

static SwHTMLWriterOutHTML_SvxAdjust (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static void OutHTML_SwFormat (SwHTMLWriter &rWrt, const SwFormat &rFormat, const SfxItemSet *pNodeItemSet, SwHTMLTextCollOutputInfo &rInfo)
 
static void OutHTML_SwFormatOff (SwHTMLWriter &rWrt, const SwHTMLTextCollOutputInfo &rInfo)
 
SwHTMLWriterOutHTML_SwTextNode (SwHTMLWriter &rWrt, const SwContentNode &rNode)
 
static SwHTMLWriterOutHTML_CSS1Attr (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SvxColor (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwPosture (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SvxFont (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SvxFontHeight (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SvxLanguage (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwWeight (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwCrossedOut (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SvxEscapement (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwUnderline (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwFlyCnt (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwBlink (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
SwHTMLWriterOutHTML_INetFormat (SwHTMLWriter &rWrt, const SwFormatINetFormat &rINetFormat, bool bOn)
 
static SwHTMLWriterOutHTML_SwFormatINetFormat (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 
static SwHTMLWriterOutHTML_SwTextCharFormat (SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
 

Variables

HTMLOutEvent const aAnchorEventTable []
 
SwAttrFnTab aHTMLAttrFnTab
 

Typedef Documentation

◆ HTMLStartEndPositions

typedef std::vector<HTMLStartEndPos *> HTMLStartEndPositions

Definition at line 1070 of file htmlatr.cxx.

Function Documentation

◆ OutHTML_CSS1Attr()

static SwHTMLWriter & OutHTML_CSS1Attr ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_INetFormat()

SwHTMLWriter & OutHTML_INetFormat ( SwHTMLWriter rWrt,
const SwFormatINetFormat rINetFormat,
bool  bOn 
)

◆ OutHTML_SvxAdjust()

static SwHTMLWriter & OutHTML_SvxAdjust ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SvxColor()

static SwHTMLWriter & OutHTML_SvxColor ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SvxEscapement()

static SwHTMLWriter & OutHTML_SvxEscapement ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SvxFont()

static SwHTMLWriter & OutHTML_SvxFont ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SvxFontHeight()

static SwHTMLWriter & OutHTML_SvxFontHeight ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SvxLanguage()

static SwHTMLWriter & OutHTML_SvxLanguage ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwBlink()

static SwHTMLWriter & OutHTML_SwBlink ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwCrossedOut()

static SwHTMLWriter & OutHTML_SwCrossedOut ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwFlyCnt()

static SwHTMLWriter & OutHTML_SwFlyCnt ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwFormat()

static void OutHTML_SwFormat ( SwHTMLWriter rWrt,
const SwFormat rFormat,
const SfxItemSet pNodeItemSet,
SwHTMLTextCollOutputInfo &  rInfo 
)
static

Definition at line 426 of file htmlatr.cxx.

References SwHTMLFormatInfo::aClass, SwHTMLFormatInfo::aToken, HtmlWriter::attribute(), SwHTMLFormatInfo::bScriptDependent, SwHTMLWriter::ChangeParaToken(), HtmlWriter::characters(), SwHTMLWriter::ClearNextNumInfo(), CSS1_OUTMODE_CJK, CSS1_OUTMODE_CTL, CSS1_OUTMODE_WESTERN, SwNumRule::Get(), SfxItemSet::Get(), SwTextNode::GetActualListLevel(), SwTextNode::GetActualListStartValue(), SvxAdjustItem::GetAdjust(), SwContentNode::GetAnyFormatColl(), SwFormat::GetAttrSet(), SvxNumberFormat::GetBrush(), SwHTMLNumRuleInfo::GetDepth(), SwFormat::GetFirstLineIndent(), SwFormat::GetFrameDir(), SwHTMLWriter::GetHTMLDirection(), SvxLanguageItem::GetLanguage(), SwLangHelper::GetLanguage(), SwHTMLWriter::GetLangWhichIdFromScript(), SwHTMLNumRuleInfo::GetLevel(), SvxULSpaceItem::GetLower(), SwFormat::GetName(), SwHTMLWriter::GetNamespace(), SwHTMLWriter::GetNextNumInfo(), SwDoc::GetNodes(), SwHTMLWriter::GetNumInfo(), SwHTMLNumRuleInfo::GetNumRule(), SwAttrSet::GetPool(), SwFormat::GetPoolFormatId(), SwTextNode::GetText(), SvxFirstLineIndentItem::GetTextFirstLineOffset(), SvxTextLeftMarginItem::GetTextLeft(), SwFormat::GetTextLeftMargin(), SwFormat::GetULSpace(), SwHTMLWriter::HasControls(), HTMLMODE_LSPACE_IN_NUMBER_BULLET, HTMLMODE_NO_CONTROL_CENTERING, i, SwHTMLWriter::IncIndentLevel(), SwHTMLWriter::indexOfDotLeaders(), SwTextNode::IsCountedInList(), SwHTMLWriter::IsHTMLMode(), SwTextNode::IsListRestart(), SwHTMLNumRuleInfo::IsNumbered(), SwHTMLNumRuleInfo::IsRestart(), LANGUAGE_DONTKNOW, SwHTMLWriter::m_aBulletGrfs, SwHTMLWriter::m_aScriptParaStyles, SwHTMLWriter::m_bCfgNetscape4, SwHTMLWriter::m_bCfgOutStyles, SwHTMLWriter::m_bCfgPrintLayout, SwHTMLWriter::m_bFirstLine, SwHTMLWriter::m_bLFPossible, SwHTMLWriter::m_bNoAlign, SwHTMLWriter::m_bOutFooter, SwHTMLWriter::m_bOutHeader, SwHTMLWriter::m_bOutOpts, SwHTMLWriter::m_bOutTable, SwHTMLWriter::m_bParaDotLeaders, SwHTMLWriter::m_bPrettyPrint, SwHTMLWriter::m_bTextAttr, SwHTMLWriter::m_eLang, SwHTMLWriter::m_nCSS1Script, SwHTMLWriter::m_nDefListLvl, SwHTMLWriter::m_nDefListMargin, SwHTMLWriter::m_nDfltBottomMargin, SwHTMLWriter::m_nDfltFirstLineIndent, SwHTMLWriter::m_nDfltLeftMargin, SwHTMLWriter::m_nDfltRightMargin, SwHTMLWriter::m_nDfltTopMargin, SwHTMLWriter::m_nDirection, SwHTMLWriter::m_nFirstLineIndent, SwHTMLWriter::m_nHeaderFooterSpace, SwHTMLWriter::m_nLastParaToken, SwHTMLWriter::m_nLeftMargin, Writer::m_pCurrentPam, Writer::m_pDoc, SwHTMLWriter::m_TextCollInfos, SwHTMLWriter::m_xTemplate, SwHTMLWriter::maNamespace, MAXLEVEL, SwHTMLWriter::mbXHTML, SwHTMLFormatInfo::moItemSet, SwHTMLFormatInfo::nBottomMargin, SwHTMLFormatInfo::nFirstLineIndent, nLeftMargin, SwHTMLFormatInfo::nLeftMargin, SwHTMLFormatInfo::nRightMargin, nToken, SwHTMLFormatInfo::nTopMargin, OOO_STRING_SVTOOLS_HTML_address, OOO_STRING_SVTOOLS_HTML_blockquote, OOO_STRING_SVTOOLS_HTML_dd, OOO_STRING_SVTOOLS_HTML_division, OOO_STRING_SVTOOLS_HTML_dt, OOO_STRING_SVTOOLS_HTML_image, OOO_STRING_SVTOOLS_HTML_li, OOO_STRING_SVTOOLS_HTML_O_class, OOO_STRING_SVTOOLS_HTML_O_span, OOO_STRING_SVTOOLS_HTML_O_style, OOO_STRING_SVTOOLS_HTML_O_value, OOO_STRING_SVTOOLS_HTML_parabreak, OOO_STRING_SVTOOLS_HTML_preformtxt, HTMLOutFuncs::Out_AsciiTag(), HTMLOutFuncs::Out_String(), SwHTMLWriter::OutAndSetDefList(), OutCSS1_ParaTagStyleOpt(), SwHTMLWriter::OutDirection(), OutHTML_BulletImage(), OutHTML_NumberBulletListStart(), OutHTML_SvxAdjust(), SwHTMLWriter::OutLanguage(), SwHTMLWriter::OutNewLine(), HtmlWriter::prettyPrint(), RES_CHRATR_CJK_LANGUAGE(), RES_CHRATR_CTL_LANGUAGE(), RES_CHRATR_LANGUAGE(), RES_CONDTXTFMTCOLL(), RES_FRAMEDIR(), RES_MARGIN_FIRSTLINE(), RES_MARGIN_TEXTLEFT(), RES_PARATR_ADJUST(), RES_TXTFMTCOLL(), RES_UL_SPACE(), SAL_NEWLINE_STRING, sCSS2_P_CLASS_leaders, SwHTMLNumRuleInfo::Set(), SvxULSpaceItem::SetLower(), SvxULSpaceItem::SetUpper(), HtmlWriter::start(), Writer::Strm(), SwFormat::Which(), SvStream::WriteChar(), and SvStream::WriteOString().

Referenced by OutHTML_SwTextNode().

◆ OutHTML_SwFormatINetFormat()

static SwHTMLWriter & OutHTML_SwFormatINetFormat ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwFormatOff()

static void OutHTML_SwFormatOff ( SwHTMLWriter rWrt,
const SwHTMLTextCollOutputInfo &  rInfo 
)
static

◆ OutHTML_SwPosture()

static SwHTMLWriter & OutHTML_SwPosture ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwTextCharFormat()

static SwHTMLWriter & OutHTML_SwTextCharFormat ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwTextNode()

SwHTMLWriter & OutHTML_SwTextNode ( SwHTMLWriter rWrt,
const SwContentNode rNode 
)

Definition at line 2006 of file htmlatr.cxx.

References SwPosition::AdjustContent(), aHTMLAttrFnTab, Any, HtmlWriterHelper::applyColor(), HtmlWriter::attribute(), Before, CH_TXT_ATR_FORMELEMENT, SwHTMLWriter::ChangeParaToken(), COL_GRAY(), SfxItemSet::Count(), SwpHints::Count(), d, SwTextAttr::End(), HtmlWriter::end(), HtmlWriter::endAttribute(), SwNode::FindTableNode(), HTMLOutFuncs::FlushToAscii(), SfxItemSet::Get(), SwpHints::Get(), SwContentNode::GetAnyFormatColl(), SwTextAttr::GetAttr(), SwFormat::GetCol(), editeng::SvxBorderLine::GetColor(), SwPosition::GetContentIndex(), SwNode::GetDoc(), SwFormatField::GetField(), SwHTMLWriter::GetFootEndNoteSym(), SwTableBox::GetFrameFormat(), SwFormat::GetFrameSize(), SvxFontHeightItem::GetHeight(), SwHTMLWriter::GetHTMLMode(), SwDoc::getIDocumentStylePoolAccess(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), editeng::SvxBorderLine::GetInWidth(), SfxItemSet::GetItemIfSet(), SvxLRSpaceItem::GetLeft(), SvxTextLeftMarginItem::GetLeft(), SwHTMLWriter::GetLineLen(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), SwPageDesc::GetMaster(), SwFormat::GetName(), SwDoc::GetNodes(), SwFormatCol::GetNumCols(), SwTextNode::GetNumRule(), SwTextNode::GetNumString(), SwDoc::GetOutlineNumRule(), SwFormatPageDesc::GetPageDesc(), IDocumentStylePoolAccess::GetPageDescFromPool(), SwFormat::GetPoolFormatId(), SwContentNode::GetpSwAttrSet(), SvxLRSpaceItem::GetRight(), SvxRightMarginItem::GetRight(), editeng::SvxBorderLine::GetScaledWidth(), SwTextAttr::GetStart(), SwNode::GetStartNode(), SwStartNode::GetStartNodeType(), SwContentNode::GetSwAttrSet(), SwTextNode::GetSwpHints(), SwTableNode::GetTable(), SwTable::GetTableBox(), SwTextNode::GetText(), SvxSizeItem::GetWidth(), SwTextAttr::HasDummyChar(), SwTextNode::HasHints(), HTMLMODE_NBSP_IN_TABLES, i, SwHTMLWriter::indexOfDotLeaders(), Inside, SwNode::IsEndNode(), SwHTMLWriter::IsHTMLMode(), SwTextNode::IsOutline(), Color::IsRGBEqual(), SwNode::IsSectionNode(), SwNode::IsStartNode(), SwNode::IsTableNode(), SwHTMLWriter::m_aScriptTextStyles, SwHTMLWriter::m_bCfgFormFeed, SwHTMLWriter::m_bCfgOutStyles, SwHTMLWriter::m_bClearLeft, SwHTMLWriter::m_bClearRight, SwHTMLWriter::m_bLFPossible, SwHTMLWriter::m_bOutFlyFrame, SwHTMLWriter::m_bOutOpts, SwHTMLWriter::m_bOutTable, SwHTMLWriter::m_bPrettyPrint, SwHTMLWriter::m_bTagOn, SwHTMLWriter::m_bTextAttr, Writer::m_bWriteAll, SwHTMLWriter::m_CharFormatInfos, SwHTMLWriter::m_nCSS1Script, SwHTMLWriter::m_nLastParaToken, SwHTMLWriter::m_nLeadingTabWidth, SwHTMLWriter::m_nTextAttrsToIgnore, SwHTMLWriter::m_nWishLineLen, Writer::m_pCurrentPam, Writer::m_pDoc, SwHTMLWriter::m_pFormatFootnote, SwHTMLWriter::m_pStartNdIdx, SwHTMLWriter::m_xDfltColor, SwHTMLWriter::m_xTemplate, SwHTMLWriter::maNamespace, SwHTMLWriter::mbReqIF, min(), OOO_STRING_SVTOOLS_HTML_AL_all, OOO_STRING_SVTOOLS_HTML_AL_center, OOO_STRING_SVTOOLS_HTML_AL_left, OOO_STRING_SVTOOLS_HTML_AL_right, OOO_STRING_SVTOOLS_HTML_horzrule, OOO_STRING_SVTOOLS_HTML_linebreak, OOO_STRING_SVTOOLS_HTML_O_align, OOO_STRING_SVTOOLS_HTML_O_clear, OOO_STRING_SVTOOLS_HTML_O_color, OOO_STRING_SVTOOLS_HTML_O_noshade, OOO_STRING_SVTOOLS_HTML_O_size, OOO_STRING_SVTOOLS_HTML_O_width, OOO_STRING_SVTOOLS_HTML_S_nbsp, OUStringToOString(), Out(), HTMLOutFuncs::Out_Char(), HTMLOutFuncs::Out_String(), SwHTMLWriter::OutBookmarks(), SwHTMLWriter::OutFlyFrame(), SwHTMLWriter::OutFootEndNoteSym(), SwHTMLWriter::OutForm(), OutHTML_SwFormat(), OutHTML_SwFormatOff(), SwHTMLWriter::OutNewLine(), SwHTMLWriter::OutPointFieldmarks(), Postit, Prefix, HtmlWriter::prettyPrint(), RES_BOX(), RES_BREAK(), RES_CHRATR_FONTSIZE(), RES_DRAWFRMFMT(), RES_MARGIN_FIRSTLINE(), RES_MARGIN_RIGHT(), RES_MARGIN_TEXTLEFT(), RES_PAGEDESC(), RES_POOLCOLL_HTML_HR, RES_POOLCOLL_STANDARD, RES_POOLCOLL_TABLE, RES_POOLCOLL_TABLE_HDLN, RES_POOLPAGE_HTML, RES_TXTATR_ANNOTATION(), RES_TXTATR_FIELD(), RES_TXTATR_FLYCNT(), RES_UL_SPACE(), SAL_MAX_INT32, Script, HtmlWriter::single(), HtmlWriter::start(), SwNode::StartOfSectionIndex(), SfxPoolItem::StaticWhichCast(), Writer::Strm(), SwTableBoxStartNode, SwHTMLWriter::ToPixel(), SwField::Which(), SwFormat::Which(), SwTextAttr::Which(), SvStream::WriteChar(), and SvStream::WriteOString().

Referenced by SwHTMLWriter::Out_SwDoc().

◆ OutHTML_SwUnderline()

static SwHTMLWriter & OutHTML_SwUnderline ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

◆ OutHTML_SwWeight()

static SwHTMLWriter & OutHTML_SwWeight ( SwHTMLWriter rWrt,
const SfxPoolItem rHt 
)
static

Variable Documentation

◆ aAnchorEventTable

HTMLOutEvent const aAnchorEventTable[]
Initial value:
=
{
{ nullptr, nullptr, SvMacroItemId::NONE }
}
#define OOO_STRING_SVTOOLS_HTML_O_SDonmouseover
#define OOO_STRING_SVTOOLS_HTML_O_SDonmouseout
#define OOO_STRING_SVTOOLS_HTML_O_onmouseout
#define OOO_STRING_SVTOOLS_HTML_O_onmouseover
#define OOO_STRING_SVTOOLS_HTML_O_onclick
#define OOO_STRING_SVTOOLS_HTML_O_SDonclick

Definition at line 86 of file htmlatr.cxx.

Referenced by OutHTML_ImageStart(), and OutHTML_INetFormat().

◆ aHTMLAttrFnTab

SwAttrFnTab aHTMLAttrFnTab

Definition at line 3219 of file htmlatr.cxx.

Referenced by OutHTML_FrameFormatAsMarquee(), OutHTML_SwField(), and OutHTML_SwTextNode().