21#include <com/sun/star/i18n/ScriptType.hpp> 
   22#include <com/sun/star/i18n/XBreakIterator.hpp> 
   74#include <rtl/character.hxx> 
   75#include <osl/diagnose.h> 
   91    { 
nullptr, 
nullptr, SvMacroItemId::NONE }
 
  174    switch( nScriptType )
 
  176    case i18n::ScriptType::LATIN:
 
  179    case i18n::ScriptType::ASIAN:
 
  182    case i18n::ScriptType::COMPLEX:
 
  204struct SwHTMLTextCollOutputInfo
 
  207    std::optional<SfxItemSet> moItemSet;    
 
  209    bool bInNumberBulletList;         
 
  214    SwHTMLTextCollOutputInfo() :
 
  215        bInNumberBulletList( false ),
 
  216        bParaPossible( false ),
 
  221    bool HasParaToken()
 const { 
return aToken.getLength()==1 && aToken[0]==
'P'; }
 
  222    bool ShouldOutputToken()
 const { 
return bOutPara || !HasParaToken(); }
 
  230                              sal_uInt16 nCSS1Script )
 
  234    , nFirstLineIndent(0)
 
  237    , bScriptDependent( false )
 
  239    sal_uInt16 nRefPoolId = 0;
 
  243    OSL_ENSURE( nDeep ? !
aToken.isEmpty() : 
aToken.isEmpty(),
 
  244            "Something seems to be wrong with this token!" );
 
  245    OSL_ENSURE( nDeep ? nRefPoolId != 0 : nRefPoolId == 0,
 
  246            "Something seems to be wrong with the comparison style!" );
 
  251    const SwFormat *pReferenceFormat = 
nullptr; 
 
  289        if( !bOutStyles && pTemplate )
 
  295    if( pReferenceFormat || nDeep==0 )
 
  305        if( pReferenceFormat )
 
  323        static const sal_uInt16 aWhichIds[3][4] =
 
  334        sal_uInt16 aSets[2] = {0,0};
 
  335        switch( nCSS1Script )
 
  353        for( 
int i=0; 
i<4; ++
i )
 
  356            for(sal_uInt16 nSet : aSets)
 
  373        (pReferenceFormat ? pReferenceFormat : 
pFormat)->GetFirstLineIndent());
 
  375        (pReferenceFormat ? pReferenceFormat : 
pFormat)->GetTextLeftMargin());
 
  377        (pReferenceFormat ? pReferenceFormat : 
pFormat)->GetRightMargin());
 
  383        (pReferenceFormat ? pReferenceFormat : 
pFormat)->GetULSpace();
 
  388    sal_uInt16 nWhichId =
 
  393    if( eLang != eDfltLang )
 
  401    static const sal_uInt16 aWhichIds[3] =
 
  404    for(sal_uInt16 
i : aWhichIds)
 
  428                    SwHTMLTextCollOutputInfo& rInfo )
 
  431            "not a paragraph style" );
 
  434    sal_uInt16 nNewDefListLvl = 0;
 
  435    sal_uInt16 nNumStart = USHRT_MAX;
 
  436    bool bForceDL = 
false;
 
  438    rInfo.bInNumberBulletList = 
false;    
 
  439    bool bNumbered = 
false;         
 
  441    rInfo.bParaPossible = 
false;    
 
  442    bool bNoEndTag = 
false;         
 
  464        aNumInfo.
Set( *pTextNd );
 
  469        rInfo.bInNumberBulletList = 
true;
 
  477                "Remembered Num level is wrong" );
 
  479                "Remembered numbering state is wrong" );
 
  483            nBulletGrfLvl = nLvl; 
 
  494                "<PRE> was not closed before <LI>." );
 
  501    SwHTMLFormatInfos::iterator it = rWrt.
m_TextCollInfos.find( pTmpInfo );
 
  504        pFormatInfo = it->get();
 
  511        rWrt.
m_TextCollInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
 
  518    bool bOutNewLine = 
false;   
 
  519    if( !pFormatInfo->
aToken.isEmpty() )
 
  523        rInfo.aToken = pFormatInfo->
aToken;
 
  527            rInfo.bParaPossible = 
true;
 
  532            rInfo.bParaPossible = 
true;
 
  547                nToken = HtmlTokenId::PREFORMTXT_ON;
 
  555            rInfo.bParaPossible = !bDT;
 
  572        OSL_ENSURE(!rInfo.moItemSet, 
"Where does this ItemSet come from?");
 
  573        rInfo.moItemSet.emplace( *pFormatInfo->
moItemSet );
 
  580            rInfo.moItemSet->Put( *pNodeItemSet );
 
  582            rInfo.moItemSet.emplace( *pNodeItemSet );
 
  603            if (!rInfo.moItemSet)
 
  605                rInfo.moItemSet.emplace(*rFormat.
GetAttrSet().
GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>);
 
  607            rInfo.moItemSet->Put( aULSpaceItem );
 
  617        rInfo.aToken.clear();   
 
  626    if( rInfo.moItemSet )
 
  641    if( (!rWrt.
m_bCfgOutStyles || bForceDL) && !rInfo.bInNumberBulletList )
 
  655            if( nNewDefListLvl == 0 && bForceDL && !bDT )
 
  663            nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0;
 
  666        bool bIsNextTextNode =
 
  670        if( bForceDL && bDT )
 
  677                 ((bUseParSpace && bIsNextTextNode) || rWrt.
m_nDefListLvl==1) &&
 
  678                 (!pAdjItem || SvxAdjust::Left==pAdjItem->
GetAdjust()) )
 
  683            rInfo.bParaPossible = 
false;
 
  692    if( rInfo.bInNumberBulletList )
 
  694        OSL_ENSURE( !rWrt.
m_nDefListLvl, 
"DL cannot be inside OL!" );
 
  712    if( rInfo.bInNumberBulletList )
 
  721    if( rInfo.bInNumberBulletList && bNumbered && bPara && !rWrt.
m_bCfgOutStyles )
 
  754    rInfo.bOutPara = 
false;
 
  759    bool bHasParSpace = bUseParSpace && rULSpace.
GetLower() > 0;
 
  764    bool bNumberedForListItem = bNumbered;
 
  765    if (!bNumberedForListItem)
 
  769        const auto& rPrevListInfo = rWrt.
GetNumInfo();
 
  770        if (rPrevListInfo.GetNumRule() != aNumInfo.
GetNumRule() || aNumInfo.
IsRestart(rPrevListInfo)
 
  771            || rPrevListInfo.GetDepth() < aNumInfo.
GetDepth())
 
  772            bNumberedForListItem = 
true;
 
  774    if( rInfo.bInNumberBulletList && bNumberedForListItem )
 
  784        else if (USHRT_MAX != nNumStart)
 
  812        rInfo.bOutDiv = 
true;
 
  822    OString aToken = rInfo.aToken;
 
  824        (bHasParSpace || bXhtmlBlockQuote || pAdjItem) )
 
  838    if( rInfo.moItemSet )
 
  842        for(
auto const & 
i : aWhichIds)
 
  847                rInfo.moItemSet->ClearItem( 
i );
 
  868        (rInfo.bInNumberBulletList && !bNumbered) ||
 
  870         (bHasParSpace || bXhtmlBlockQuote || pAdjItem ||
 
  890            if( !sOut.isEmpty() )
 
  904            OUString aClass( pFormatInfo->
aClass );
 
  907                if( !aClass.isEmpty() )
 
  958            rInfo.aToken.clear();
 
  961    if( nBulletGrfLvl != 255 )
 
  963        OSL_ENSURE( aNumInfo.
GetNumRule(), 
"Where is the numbering gone???" );
 
  964        OSL_ENSURE( nBulletGrfLvl < 
MAXLEVEL, 
"There are not this many layers." );
 
  985    if( rInfo.aToken.isEmpty() )
 
  990        if( rInfo.bInNumberBulletList )
 
 1006    if( rInfo.ShouldOutputToken() )
 
 1015        if( rInfo.bParaPossible && rInfo.bOutPara )
 
 1034    if( rInfo.bInNumberBulletList )
 
 1043class HTMLStartEndPos
 
 1047    std::unique_ptr<SfxPoolItem> m_pItem;
 
 1051    HTMLStartEndPos( 
const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE );
 
 1055    void SetStart(sal_Int32 nStt) { m_nStart = nStt; }
 
 1056    sal_Int32 GetStart()
 const { 
return m_nStart; }
 
 1058    sal_Int32 GetEnd()
 const { 
return m_nEnd; }
 
 1059    void SetEnd(sal_Int32 nE) { m_nEnd = nE; }
 
 1064HTMLStartEndPos::HTMLStartEndPos(
const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE)
 
 1067    , m_pItem(rItem.
Clone())
 
 1074enum HTMLOnOffState { HTML_NOT_SUPPORTED,   
 
 1082                      HTML_AUTOFMT_VALUE }; 
 
 1088    std::deque<sal_Int32> m_aScriptChgLst; 
 
 1093    std::vector<sal_uInt16> m_aScriptLst;
 
 1097    std::optional<Color> m_xDefaultColor; 
 
 1098    std::set<OUString>& m_rScriptTextStyles;
 
 1101    bool m_bOutStyles : 1; 
 
 1105    void InsertItem_( HTMLStartEndPos *pPos, HTMLStartEndPositions::size_type nEndPos );
 
 1106    void RemoveItem_( HTMLStartEndPositions::size_type nEndPos );
 
 1109    HTMLOnOffState GetHTMLItemState( 
const SfxPoolItem& rItem );
 
 1112    bool ExistsOnTagItem( sal_uInt16 nWhich, sal_Int32 
nPos );
 
 1116    bool ExistsOffTagItem( sal_uInt16 nWhich, sal_Int32 nStartPos,
 
 1117                                          sal_Int32 nEndPos );
 
 1120    void FixSplittedItem( HTMLStartEndPos *pPos, sal_Int32 nNewEnd,
 
 1121                            HTMLStartEndPositions::size_type nStartPos );
 
 1124    void InsertItem( 
const SfxPoolItem& rItem, sal_Int32 nStart,
 
 1128    void SplitItem( 
const SfxPoolItem& rItem, sal_Int32 nStart,
 
 1132    void InsertNoScript( 
const SfxPoolItem& rItem, sal_Int32 nStart,
 
 1141    HTMLEndPosLst( 
SwDoc *pDoc, 
SwDoc* pTemplate, std::optional<Color> xDfltColor,
 
 1143                   const OUString& rText, std::set<OUString>& rStyles );
 
 1151                 bool bParaAttrs=
false );
 
 1155    sal_uInt16 GetScriptAtPos( sal_Int32 
nPos,
 
 1161    bool IsHTMLMode(
sal_uLong nMode)
 const { 
return (m_nHTMLMode & nMode) != 0; }
 
 1166void HTMLEndPosLst::InsertItem_( HTMLStartEndPos *pPos, HTMLStartEndPositions::size_type nEndPos )
 
 1170    sal_Int32 nStart = pPos->GetStart();
 
 1171    HTMLStartEndPositions::size_type 
i {0};
 
 1173    while (i < m_aStartLst.size() && m_aStartLst[i]->GetStart() <= nStart)
 
 1175    m_aStartLst.insert(m_aStartLst.begin() + i, pPos);
 
 1178    m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pPos);
 
 1181void HTMLEndPosLst::RemoveItem_( HTMLStartEndPositions::size_type nEndPos )
 
 1183    HTMLStartEndPos* pPos = m_aEndLst[nEndPos];
 
 1186    HTMLStartEndPositions::iterator it = std::find(m_aStartLst.begin(), m_aStartLst.end(), pPos);
 
 1187    OSL_ENSURE(it != m_aStartLst.end(), 
"Item not found in Start List!");
 
 1188    if (it != m_aStartLst.end())
 
 1189        m_aStartLst.erase(it);
 
 1191    m_aEndLst.erase(m_aEndLst.begin() + nEndPos);
 
 1196HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( 
const SfxPoolItem& rItem )
 
 1198    HTMLOnOffState eState = HTML_NOT_SUPPORTED;
 
 1199    switch( rItem.
Which() )
 
 1207            eState = HTML_ON_VALUE;
 
 1210            eState = HTML_OFF_VALUE;
 
 1213            if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1214                eState = HTML_STYLE_VALUE;
 
 1224            eState = HTML_ON_VALUE;
 
 1227            eState = HTML_OFF_VALUE;
 
 1237        case SvxEscapement::Superscript:
 
 1238        case SvxEscapement::Subscript:
 
 1239            eState = HTML_ON_VALUE;
 
 1241        case SvxEscapement::Off:
 
 1242            eState = HTML_OFF_VALUE;
 
 1253            eState = HTML_ON_VALUE;
 
 1256            eState = HTML_OFF_VALUE;
 
 1259            if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1260                eState = HTML_STYLE_VALUE;
 
 1267        if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1268            eState = HTML_STYLE_VALUE;
 
 1274        switch( 
static_cast<const SvxWeightItem&
>(rItem).GetWeight() )
 
 1277            eState = HTML_ON_VALUE;
 
 1280            eState = HTML_OFF_VALUE;
 
 1283            if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1284                eState = HTML_STYLE_VALUE;
 
 1295        eState = HTML_COLOR_VALUE;
 
 1308        eState = HTML_REAL_VALUE;
 
 1312        eState = HTML_CHRFMT_VALUE;
 
 1316        eState = HTML_AUTOFMT_VALUE;
 
 1320        eState = HTML_STYLE_VALUE;
 
 1324        eState = HTML_STYLE_VALUE;
 
 1328        if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1329            eState = HTML_STYLE_VALUE;
 
 1333        eState = HTML_DROPCAP_VALUE;
 
 1337        if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
 
 1338            eState = HTML_STYLE_VALUE;
 
 1345bool HTMLEndPosLst::ExistsOnTagItem( sal_uInt16 nWhich, sal_Int32 nPos )
 
 1347    for (
auto pTest : m_aStartLst)
 
 1349        if( pTest->GetStart() > nPos )
 
 1354        else if( pTest->GetEnd() > nPos )
 
 1359            if( pItem->
Which() == nWhich &&
 
 1360                HTML_ON_VALUE == GetHTMLItemState(*pItem) )
 
 1371bool HTMLEndPosLst::ExistsOffTagItem( sal_uInt16 nWhich, sal_Int32 nStartPos,
 
 1381    for (
auto pTest : m_aStartLst)
 
 1383        if( pTest->GetStart() > nStartPos )
 
 1388        else if( pTest->GetStart()==nStartPos &&
 
 1389                 pTest->GetEnd()==nEndPos )
 
 1394            sal_uInt16 nTstWhich = pItem->
Which();
 
 1398                HTML_OFF_VALUE == GetHTMLItemState(*pItem) )
 
 1410void HTMLEndPosLst::FixSplittedItem( HTMLStartEndPos *pPos, sal_Int32 nNewEnd,
 
 1411                                        HTMLStartEndPositions::size_type nStartPos )
 
 1414    pPos->SetEnd( nNewEnd );
 
 1417    HTMLStartEndPositions::iterator it = std::find(m_aEndLst.begin(), m_aEndLst.end(), pPos);
 
 1418    OSL_ENSURE(it != m_aEndLst.end(), 
"Item not found in End List!");
 
 1419    if (it != m_aEndLst.end())
 
 1420        m_aEndLst.erase(it);
 
 1423    HTMLStartEndPositions::size_type nEndPos {0};
 
 1424    while (nEndPos < m_aEndLst.size() && m_aEndLst[nEndPos]->GetEnd() <= nNewEnd)
 
 1426    m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pPos);
 
 1429    for (HTMLStartEndPositions::size_type i = nStartPos + 1; 
i < m_aStartLst.size(); ++
i)
 
 1431        HTMLStartEndPos* pTest = m_aStartLst[
i];
 
 1432        sal_Int32 nTestEnd = pTest->GetEnd();
 
 1433        if( pTest->GetStart() >= nNewEnd )
 
 1439        else if( nTestEnd > nNewEnd )
 
 1445            pTest->SetEnd( nNewEnd );
 
 1448            it = std::find(m_aEndLst.begin(), m_aEndLst.end(), pTest);
 
 1449            OSL_ENSURE(it != m_aEndLst.end(), 
"Item not found in End List!");
 
 1450            if (it != m_aEndLst.end())
 
 1451                m_aEndLst.erase(it);
 
 1455            m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pTest);
 
 1458            InsertItem( *pTest->GetItem(), nNewEnd, nTestEnd );
 
 1463void HTMLEndPosLst::InsertItem( 
const SfxPoolItem& rItem, sal_Int32 nStart,
 
 1466    HTMLStartEndPositions::size_type 
i;
 
 1467    for (i = 0; 
i < m_aEndLst.size(); 
i++)
 
 1469        HTMLStartEndPos* pTest = m_aEndLst[
i];
 
 1470        sal_Int32 nTestEnd = pTest->GetEnd();
 
 1471        if( nTestEnd <= nStart )
 
 1476        else if( nTestEnd < nEnd )
 
 1478            if( pTest->GetStart() < nStart )
 
 1482                InsertItem_( 
new HTMLStartEndPos( rItem, nStart, nTestEnd ), i );
 
 1495    InsertItem_( 
new HTMLStartEndPos( rItem, nStart, nEnd ), i );
 
 1498void HTMLEndPosLst::SplitItem( 
const SfxPoolItem& rItem, sal_Int32 nStart,
 
 1501    sal_uInt16 nWhich = rItem.
Which();
 
 1506    for (HTMLStartEndPositions::size_type i = 0; 
i < m_aStartLst.size(); ++
i)
 
 1508        HTMLStartEndPos* pTest = m_aStartLst[
i];
 
 1509        sal_Int32 nTestStart = pTest->GetStart();
 
 1510        sal_Int32 nTestEnd = pTest->GetEnd();
 
 1512        if( nTestStart >= nEnd )
 
 1517        else if( nTestEnd > nStart )
 
 1523            if( pItem->
Which() == nWhich &&
 
 1524                HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
 
 1526                bool bDelete = 
true;
 
 1528                if( nTestStart < nStart )
 
 1532                    FixSplittedItem( pTest, nStart, i );
 
 1539                    m_aStartLst.erase(m_aStartLst.begin() + i);
 
 1542                    HTMLStartEndPositions::iterator it
 
 1543                        = std::find(m_aEndLst.begin(), m_aEndLst.end(), pTest);
 
 1544                    OSL_ENSURE(it != m_aEndLst.end(), 
"Item not found in End List!");
 
 1545                    if (it != m_aEndLst.end())
 
 1546                        m_aEndLst.erase(it);
 
 1551                if( nTestEnd > nEnd )
 
 1553                    InsertItem( *pTest->GetItem(), nEnd, nTestEnd );
 
 1567    std::unique_ptr<SwHTMLFormatInfo> pTmpInfo(
new SwHTMLFormatInfo(&rFormat));
 
 1568    SwHTMLFormatInfos::iterator it = rFormatInfos.find( pTmpInfo );
 
 1569    if (it != rFormatInfos.end())
 
 1571        pFormatInfo = it->get();
 
 1575        pFormatInfo = 
new SwHTMLFormatInfo(&rFormat, m_pDoc, m_pTemplate, m_bOutStyles);
 
 1576        rFormatInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
 
 1577        if (m_rScriptTextStyles.count(rFormat.
GetName()))
 
 1584HTMLEndPosLst::HTMLEndPosLst(
SwDoc* pD, 
SwDoc* pTempl, std::optional<Color> xDfltCol, 
bool bStyles,
 
 1585                             sal_uLong nMode, 
const OUString& rText, std::set<OUString>& rStyles)
 
 1587    , m_pTemplate(pTempl)
 
 1588    , m_xDefaultColor(
std::move(xDfltCol))
 
 1589    , m_rScriptTextStyles(rStyles)
 
 1590    , m_nHTMLMode(nMode)
 
 1591    , m_bOutStyles(bStyles)
 
 1593    sal_Int32 nEndPos = rText.getLength();
 
 1595    while( nPos < nEndPos )
 
 1599        m_aScriptChgLst.push_back(nPos);
 
 1600        m_aScriptLst.push_back(nScript);
 
 1604HTMLEndPosLst::~HTMLEndPosLst()
 
 1606    OSL_ENSURE(m_aStartLst.empty(), 
"Start List not empty in destructor");
 
 1607    OSL_ENSURE(m_aEndLst.empty(), 
"End List not empty in destructor");
 
 1610void HTMLEndPosLst::InsertNoScript( 
const SfxPoolItem& rItem,
 
 1611                            sal_Int32 nStart, sal_Int32 nEnd,
 
 1615    if( nStart == nEnd )
 
 1618    bool bSet = 
false, bSplit = 
false;
 
 1619    switch( GetHTMLItemState(rItem) )
 
 1623        if( !ExistsOnTagItem( rItem.
Which(), nStart ) )
 
 1627    case HTML_OFF_VALUE:
 
 1632        if( ExistsOnTagItem( rItem.
Which(), nStart ) )
 
 1634        bSet = m_bOutStyles && !bParaAttrs && !ExistsOffTagItem(rItem.
Which(), nStart, nEnd);
 
 1637    case HTML_REAL_VALUE:
 
 1642    case HTML_STYLE_VALUE:
 
 1652    case HTML_CHRFMT_VALUE:
 
 1655                    "Not a character style after all" );
 
 1659            const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos );
 
 1660            if( !pFormatInfo->
aToken.isEmpty() )
 
 1664                InsertItem( rItem, nStart, nEnd );
 
 1669                        rFormatInfos, 
true, bParaAttrs );
 
 1674    case HTML_AUTOFMT_VALUE:
 
 1677                    "Not an automatic style, after all" );
 
 1679            const std::shared_ptr<SfxItemSet>& pSet = rAutoFormat.
GetStyleHandle();
 
 1681                Insert( *pSet, nStart, nEnd, rFormatInfos, 
true, bParaAttrs );
 
 1685    case HTML_COLOR_VALUE:
 
 1690                    "Not a foreground color, after all" );
 
 1692            if( COL_AUTO == aColor )
 
 1694            bSet = !bParaAttrs || !m_xDefaultColor || !m_xDefaultColor->
IsRGBEqual(aColor);
 
 1698    case HTML_DROPCAP_VALUE:
 
 1701                    "Not a drop cap, after all" );
 
 1711                            rFormatInfos, 
true, bParaAttrs );
 
 1725        InsertItem( rItem, nStart, nEnd );
 
 1727        SplitItem( rItem, nStart, nEnd );
 
 1730void HTMLEndPosLst::Insert( 
const SfxPoolItem& rItem,
 
 1731                            sal_Int32 nStart, sal_Int32 nEnd,
 
 1734    bool bDependsOnScript = 
false, bDependsOnAnyScript = 
false;
 
 1735    sal_uInt16 nScript = i18n::ScriptType::LATIN;
 
 1736    switch( rItem.
Which() )
 
 1743        bDependsOnScript = 
true;
 
 1744        nScript = i18n::ScriptType::LATIN;
 
 1752        bDependsOnScript = 
true;
 
 1753        nScript = i18n::ScriptType::ASIAN;
 
 1761        bDependsOnScript = 
true;
 
 1762        nScript = i18n::ScriptType::COMPLEX;
 
 1768            const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos );
 
 1771                bDependsOnScript = 
true;
 
 1772                bDependsOnAnyScript = 
true;
 
 1778            if (GetFormatInfo(*m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
 
 1782                || GetFormatInfo(*m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
 
 1787                bDependsOnScript = 
true;
 
 1788                bDependsOnAnyScript = 
true;
 
 1794    if( bDependsOnScript )
 
 1796        sal_Int32 
nPos = nStart;
 
 1797        for (
size_t i = 0; 
i < m_aScriptChgLst.size(); 
i++)
 
 1799            sal_Int32 nChgPos = m_aScriptChgLst[
i];
 
 1800            if( nPos >= nChgPos )
 
 1806            if( nEnd <= nChgPos )
 
 1811                if (bDependsOnAnyScript || nScript == m_aScriptLst[i])
 
 1812                    InsertNoScript( rItem, nPos, nEnd, rFormatInfos,
 
 1820            if (bDependsOnAnyScript || nScript == m_aScriptLst[i])
 
 1821                InsertNoScript( rItem, nPos, nChgPos, rFormatInfos, bParaAttrs );
 
 1827        InsertNoScript( rItem, nStart, nEnd, rFormatInfos, bParaAttrs );
 
 1831void HTMLEndPosLst::Insert( 
const SfxItemSet& rItemSet,
 
 1832                            sal_Int32 nStart, sal_Int32 nEnd,
 
 1834                            bool bDeep, 
bool bParaAttrs )
 
 1838    sal_uInt16 nWhich = aIter.FirstWhich();
 
 1842        if( SfxItemState::SET == aIter.GetItemState( bDeep, &pItem ) )
 
 1844            Insert( *pItem, nStart, nEnd, rFormatInfos, bParaAttrs );
 
 1847        nWhich = aIter.NextWhich();
 
 1865    bool bOutStylesOld = m_bOutStyles;
 
 1866    m_bOutStyles = 
false;
 
 1867    Insert( aItemSet, nPos, nPos+1, rFormatInfos, 
false );
 
 1868    m_bOutStyles = bOutStylesOld;
 
 1871sal_uInt16 HTMLEndPosLst::GetScriptAtPos( sal_Int32 nPos, sal_uInt16 nWeak )
 
 1875    size_t nScriptChgs = m_aScriptChgLst.size();
 
 1877    while (i < nScriptChgs && nPos >= m_aScriptChgLst[i])
 
 1879    OSL_ENSURE( i < nScriptChgs, 
"script list is too short" );
 
 1880    if( i < nScriptChgs )
 
 1882        if (i18n::ScriptType::WEAK == m_aScriptLst[i])
 
 1891void HTMLEndPosLst::OutStartAttrs( 
SwHTMLWriter& rWrt, sal_Int32 nPos )
 
 1897    HTMLStartEndPositions::size_type nCharBoxIndex = 0;
 
 1898    while (nCharBoxIndex < m_aStartLst.size()
 
 1899           && m_aStartLst[nCharBoxIndex]->GetItem()->Which() != 
RES_CHRATR_BOX)
 
 1905    for (HTMLStartEndPositions::size_type i = 0; 
i < m_aStartLst.size(); ++
i)
 
 1907        HTMLStartEndPos *pPos = 
nullptr;
 
 1908        if (nCharBoxIndex < m_aStartLst.size())
 
 1911                pPos = m_aStartLst[nCharBoxIndex];
 
 1912            else if( i == nCharBoxIndex )
 
 1913                pPos = m_aStartLst[0];
 
 1915                pPos = m_aStartLst[
i];
 
 1918            pPos = m_aStartLst[
i];
 
 1920        sal_Int32 nStart = pPos->GetStart();
 
 1926        else if( nStart == nPos )
 
 1930            sal_uInt16 nWhich = pPos->GetItem()->Which();
 
 1945void HTMLEndPosLst::OutEndAttrs( 
SwHTMLWriter& rWrt, sal_Int32 nPos )
 
 1950    HTMLStartEndPositions::size_type 
i {0};
 
 1951    while (i < m_aEndLst.size())
 
 1953        HTMLStartEndPos* pPos = m_aEndLst[
i];
 
 1954        sal_Int32 nEnd = pPos->GetEnd();
 
 1956        if( SAL_MAX_INT32 == nPos || nEnd == nPos )
 
 1960            bool bSkipOut = 
false;
 
 1963                HTMLStartEndPositions::iterator it
 
 1964                    = std::find(m_aStartLst.begin(), m_aStartLst.end(), pPos);
 
 1965                OSL_ENSURE(it != m_aStartLst.end(), 
"Item not found in Start List!");
 
 1966                if (it != m_aStartLst.end())
 
 1968                while (it != m_aStartLst.end())
 
 1970                    HTMLStartEndPos *pEndPos = *it;
 
 1972                        *
static_cast<const SvxBoxItem*
>(pEndPos->GetItem()) ==
 
 1973                        *
static_cast<const SvxBoxItem*
>(pPos->GetItem()) )
 
 1975                        pEndPos->SetStart(pPos->GetStart());
 
 1989        else if( nEnd > nPos )
 
 1998            OSL_ENSURE( nEnd >= nPos,
 
 1999                    "The attribute should've been closed a long time ago" );
 
 2010    const OUString& rStr = pNd->
GetText();
 
 2011    sal_Int32 nEnd = rStr.getLength();
 
 2052            sal_Int32 
const nLeft(rTextLeftMargin.
GetLeft(rFirstLine));
 
 2053            sal_Int32 
const nRight(rRightMargin.
GetRight());
 
 2054            if( nLeft || nRight )
 
 2124        if( pItemSet && pItemSet->
Count() &&
 
 2153    bool bPageBreakBehind = 
false;
 
 2158        bool bPageBreakBefore = 
false;
 
 2164            if( pPageDescItem && pPageDescItem->
GetPageDesc() )
 
 2166                bPageBreakBefore = 
true;
 
 2170                switch( pItem->GetBreak() )
 
 2172                case SvxBreak::PageBefore:
 
 2173                    bPageBreakBefore = 
true;
 
 2175                case SvxBreak::PageAfter:
 
 2176                    bPageBreakBehind = 
true;
 
 2178                case SvxBreak::PageBoth:
 
 2179                    bPageBreakBefore = 
true;
 
 2180                    bPageBreakBehind = 
true;
 
 2188        if( bPageBreakBefore )
 
 2215    SwHTMLTextCollOutputInfo aFormatInfo;
 
 2239    sal_Int32 nOffset = 0;
 
 2240    OUString aOutlineText;
 
 2249        nOffset = nOffset + aOutlineText.getLength();
 
 2250        aFullText = aOutlineText;
 
 2252    OUString aFootEndNoteSym;
 
 2256        nOffset = nOffset + aFootEndNoteSym.getLength();
 
 2257        aFullText += aFootEndNoteSym;
 
 2272    if( aFormatInfo.moItemSet )
 
 2274        aEndPosLst.Insert( *aFormatInfo.moItemSet, 0, nEnd + nOffset,
 
 2282        aEndPosLst.OutStartAttrs( rWrt, 0 );
 
 2288        if( !aOutlineText.isEmpty() )
 
 2294                                        aEndPosLst.GetScriptAtPos( aOutlineText.getLength(), rWrt.
m_nCSS1Script ) );
 
 2303    size_t nAttrPos = 0;
 
 2304    sal_Int32 nStrPos = rWrt.
m_pCurrentPam->GetPoint()->GetContentIndex();
 
 2307    if( nCntAttr && nStrPos > ( pHt = pNd->
GetSwpHints().
Get(0) )->GetStart() )
 
 2311            aEndPosLst.OutEndAttrs( rWrt, nStrPos + nOffset );
 
 2320                const sal_Int32 nHtEnd = *pHt->
End(),
 
 2326                if( nHtEnd == nHtStt )
 
 2331                    aEndPosLst.Insert( pHt->
GetAttr(), nHtStt + nOffset,
 
 2336                    sal_Int32 nTmpStt = nHtStt < nStrPos ? nStrPos : nHtStt;
 
 2337                    sal_Int32 nTmpEnd = 
std::min(nHtEnd, nEnd);
 
 2338                    aEndPosLst.Insert( pHt->
GetAttr(), nTmpStt + nOffset,
 
 2346        } 
while( nAttrPos < nCntAttr && nStrPos >
 
 2350        aEndPosLst.OutEndAttrs( rWrt, nStrPos + nOffset );
 
 2351        aEndPosLst.OutStartAttrs( rWrt, nStrPos + nOffset );
 
 2358        bWriteBreak = 
false;
 
 2363        bool bLeadingTab = 
true;
 
 2364        for( ; nStrPos < nEnd; nStrPos++ )
 
 2369                aEndPosLst.OutEndAttrs( rWrt, nStrPos + nOffset );
 
 2374            bool bOutChar = 
true;
 
 2376            if (nAttrPos < nCntAttr && pHt->GetStart() == nStrPos)
 
 2381                        if( *pHt->
End() != nStrPos )
 
 2386                            aEndPosLst.Insert( pHt->
GetAttr(), nStrPos + nOffset,
 
 2387                                               *pHt->
End() + nOffset,
 
 2394                        OSL_ENSURE( !pTextHt, 
"Why is there already an attribute without an end?" );
 
 2407                                bWriteBreak = 
false;
 
 2412                } 
while( ++nAttrPos < nCntAttr && nStrPos ==
 
 2428            aEndPosLst.OutEndAttrs( rWrt, nStrPos + nOffset );
 
 2429            aEndPosLst.OutStartAttrs( rWrt, nStrPos + nOffset );
 
 2435                                       rStr[nStrPos-1] == 
' ';
 
 2438                                                nStrPos + nOffset, nCSS1Script );
 
 2447                sal_uInt32 c = rStr[nStrPos];
 
 2448                if( rtl::isHighSurrogate(c) && nStrPos < nEnd - 1 )
 
 2451                    if( rtl::isLowSurrogate(
d) )
 
 2453                        c = rtl::combineSurrogates(c, 
d);
 
 2465                    sal_Int32 nWordLen = rStr.indexOf( 
' ', nStrPos+1 );
 
 2466                    if( nWordLen == -1 )
 
 2468                    nWordLen -= nStrPos;
 
 2499                        bool bConsumed = 
false;
 
 2516                            bLeadingTab = 
false;
 
 2530                        bWriteBreak = (0x0a == c) &&
 
 2545    OSL_ENSURE( !bFlysLeft, 
"Not all frames were saved!" );
 
 2555        if( bEndOfCell && !nEnd &&
 
 2568            if (rULSpace.
GetLower() > 0 && !bEndOfCell)
 
 2578        const char* pString;
 
 2607        nEnd > 0 && 
' ' == rStr[nEnd-1] )
 
 2611    if (nIndexTab > -1) {
 
 2612        OString sOut = 
OUStringToOString(rStr.subView(nIndexTab + 1), RTL_TEXTENCODING_ASCII_US);
 
 2613        rWrt.
Strm().
WriteOString( Concat2View(
"</span><span>" + sOut + 
"</span>") );
 
 2622    if( bPageBreakBehind )
 
 2632        Size aSz( bVert ? 0 : nVal, bVert ? nVal : 0 );
 
 2780            sal_uInt16 nSize = nHeight / 20;
 
 2782                    + OString::number(
static_cast<sal_Int32
>(nSize)) + 
"pt\"";
 
 2792                OString::number(
static_cast<sal_Int32
>(nSize)) + 
"\"";
 
 2893    if( !aTag.isEmpty() )
 
 2962    bool bEvents = pMacTable != 
nullptr && !pMacTable->
empty();
 
 2965    if( 
aURL.isEmpty() && !bEvents && rINetFormat.
GetName().isEmpty() )
 
 2977    bool bScriptDependent = 
false;
 
 2981        std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(
new SwHTMLFormatInfo(pFormat));
 
 2985            bScriptDependent = (*it)->bScriptDependent;
 
 2988    if( !bScriptDependent )
 
 2992        std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(
new SwHTMLFormatInfo(pFormat));
 
 2996            bScriptDependent = (*it)->bScriptDependent;
 
 3000    if( bScriptDependent )
 
 3003        const char* pStr = 
nullptr;
 
 3016        sOut += pStr + OString::Concat(
"\"");
 
 3024    if( !
aURL.isEmpty() || bEvents )
 
 3026        OUString sTmp( 
aURL.toAsciiUpperCase() );
 
 3027        sal_Int32 
nPos = sTmp.indexOf( 
"\" REL=" );
 
 3041    if( !rINetFormat.
GetName().isEmpty() )
 
 3058    if( !sRel.isEmpty() )
 
 3061    if( !sOut.isEmpty() )
 
 3100        OSL_ENSURE( rWrt.
m_aINetFormats.size(), 
"there must be a URL attribute missing" );
 
 3139    OSL_ENSURE( pFormatInfo, 
"Why is there no information about the character style?" );
 
 3144        if( !pFormatInfo->
aToken.isEmpty() )
 
 3145            sOut += pFormatInfo->
aToken;
 
 3154            OUString aClass( pFormatInfo->
aClass );
 
 3157                if( !aClass.isEmpty() )
 
 3162                    aClass += 
"western";
 
 3180        OString aTag = !pFormatInfo->
aToken.isEmpty() ? pFormatInfo->
aToken.getStr()
 
 3194    const char* pStr = 
nullptr;
 
static OutputDevice * GetDefaultDevice()
bool IsRGBEqual(const Color &rColor) const
void attribute(std::string_view aAttribute, const char *aValue)
bool end(const OString &aElement)
void start(const OString &aElement)
void single(const OString &aContent)
void characters(std::string_view rChars)
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
T & StaticWhichCast(TypedWhichId< T > nId)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvStream & WriteOString(std::string_view rStr)
SvStream & WriteChar(char nChar)
SvxAdjust GetAdjust() const
short GetTextFirstLineOffset() const
sal_uInt32 GetHeight() const
tools::Long GetRight() const
tools::Long GetLeft() const
LanguageType GetLanguage() const
tools::Long GetRight() const
tools::Long GetWidth() const
tools::Long GetLeft(SvxFirstLineIndentItem const &rFirstLine) const
tools::Long GetTextLeft() const
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
sal_uInt16 GetUpper() const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
sal_uInt16 GetLower() const
SwAttrPool * GetPool() const
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
const SwAttrSet * GetpSwAttrSet() const
SwFormatColl & GetAnyFormatColl() const
SwNumRule * GetOutlineNumRule() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
SwFieldIds Which() const
ResId.
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
SwPageDesc * GetPageDesc()
sal_uInt8 GetLevel() const
void Set(const SwHTMLNumRuleInfo &rInf)
sal_uInt16 GetDepth() const
bool IsRestart(const SwHTMLNumRuleInfo &rPrev) const
bool mbXHTML
If XHTML markup should be written instead of HTML.
sal_Int32 indexOfDotLeaders(sal_uInt16 nPoolId, std::u16string_view rText)
void OutAndSetDefList(sal_uInt16 nNewLvl)
static sal_uInt16 GetCSS1ScriptForScriptType(sal_uInt16 nScriptType)
void ChangeParaToken(HtmlTokenId nNew)
OUString m_aBulletGrfs[MAXLEVEL]
static const SdrObject * GetMarqueeTextObj(const SwDrawFrameFormat &rFormat)
sal_Int32 m_nDefListMargin
sal_uInt16 m_nTextAttrsToIgnore
SwHTMLFormatInfos m_CharFormatInfos
SwHTMLFormatInfos m_TextCollInfos
SwHTMLFrameType GuessFrameType(const SwFrameFormat &rFrameFormat, const SdrObject *&rpStrObj)
void OutDirection(SvxFrameDirection nDir)
void OutFrameFormat(AllHtmlFlags nType, const SwFrameFormat &rFormat, const SdrObject *pSdrObj)
void OutHyperlinkHRefValue(const OUString &rURL)
sal_uInt16 GetHTMLFontSize(sal_uInt32 nFontHeight) const
void OutFootEndNoteSym(const SwFormatFootnote &rFormatFootnote, const OUString &rNum, sal_uInt16 nScript)
std::map< sal_uInt16, int > maStartedAttributes
Tracks which text portion attributes are currently open: a which id -> open count map.
std::set< OUString > m_aScriptTextStyles
static sal_uInt16 GetDefListLvl(std::u16string_view rNm, sal_uInt16 nPoolId)
static sal_uInt16 GetLangWhichIdFromScript(sal_uInt16 nScript)
static void SubtractItemSet(SfxItemSet &rItemSet, const SfxItemSet &rRefItemSet, bool bSetDefaults, bool bClearSame=true, const SfxItemSet *pRefScriptItemSet=nullptr)
SvxFrameDirection m_nDirection
static const SwFormat * GetTemplateFormat(sal_uInt16 nPoolId, IDocumentStylePoolAccess *pTemplate)
void OutPointFieldmarks(const SwPosition &rPos)
static const SwFormat * GetParentFormat(const SwFormat &rFormat, sal_uInt16 nDeep)
sal_Int32 m_nDfltRightMargin
std::vector< SwFormatINetFormat * > m_aINetFormats
OString GetNamespace() const
Determines the prefix string needed to respect the requested namespace alias.
sal_Int32 m_nDfltLeftMargin
bool mbReqIF
If the ReqIF subset of XHTML should be written.
static sal_uInt16 GetCSS1Selector(const SwFormat *pFormat, OString &rToken, OUString &rClass, sal_uInt16 &rRefPoolId, OUString *pPseudo=nullptr)
sal_uInt32 GetHTMLMode() const
SwHTMLNumRuleInfo & GetNumInfo()
sal_uInt16 m_nDfltTopMargin
sal_uInt16 m_nHeaderFooterSpace
sal_uInt16 m_nDfltBottomMargin
short m_nDfltFirstLineIndent
std::optional< sal_Int32 > m_nLeadingTabWidth
If set, replace leading tabs with this many non-breaking spaces.
void OutNewLine(bool bCheck=false)
const SwFormatFootnote * m_pFormatFootnote
static sal_uInt32 ToPixel(sal_uInt32 nVal, const bool bVert)
void OutLanguage(LanguageType eLang)
OString maNamespace
XML namespace, in case of XHTML.
static void PrepareFontList(const SvxFontItem &rFontItem, OUString &rNames, sal_Unicode cQuote, bool bGeneric)
rtl::Reference< SwDoc > m_xTemplate
HtmlTokenId m_nLastParaToken
bool IsHTMLMode(sal_uInt32 nMode) const
SwHTMLNumRuleInfo * GetNextNumInfo()
SvxFrameDirection GetHTMLDirection(SvxFrameDirection nDir) const
static void GetEEAttrsFromDrwObj(SfxItemSet &rItemSet, const SdrObject *pObj)
void OutForm(bool bTagOn=true, const SwStartNode *pStNd=nullptr)
SwNodeIndex * m_pStartNdIdx
bool OutFlyFrame(SwNodeOffset nNdIdx, sal_Int32 nContentIdx, HtmlPosition nPos)
std::optional< Color > m_xDfltColor
std::set< OUString > m_aScriptParaStyles
OUString GetFootEndNoteSym(const SwFormatFootnote &rFormatFootnote)
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwStartNode * GetStartNode()
SwNodeOffset GetIndex() const
SwNodeOffset StartOfSectionIndex() const
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
const SwNumFormat & Get(sal_uInt16 i) const
SwFrameFormat & GetMaster()
SwStartNodeType GetStartNodeType() const
SwTableBox is one table cell in the document model.
SwFrameFormat * GetFrameFormat()
const SwTable & GetTable() const
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
const sal_Int32 * End() const
sal_Int32 GetStart() const
bool HasDummyChar() const
SwTextNode is a paragraph in the document model.
SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const
bool IsOutline() const
Returns if this text node is an outline.
bool IsCountedInList() const
SwpHints & GetSwpHints()
getters for SwpHints
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
bool IsListRestart() const
OUString GetNumString(const bool _bInclPrefixAndSuffixStrings=true, const unsigned int _nRestrictToThisLevel=MAXLEVEL, SwRootFrame const *pLayout=nullptr, SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns outline of numbering string.
const OUString & GetText() const
SwTextAttr * Get(size_t nPos) const
std::shared_ptr< SwUnoCursor > m_pCurrentPam
const Color & GetColor() const
sal_uInt16 GetScaledWidth() const
sal_uInt16 GetInWidth() const
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define SAL_NEWLINE_STRING
SwHTMLWriter & OutCSS1_HintSpanTag(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
bool IgnorePropertyForReqIF(bool bReqIF, std::string_view rProperty, std::string_view rValue, std::optional< sw::Css1Background > oMode)
Determines if rProperty with a given rValue has to be suppressed due to ReqIF mode.
SwHTMLWriter & OutCSS1_ParaTagStyleOpt(SwHTMLWriter &rWrt, const SfxItemSet &rItemSet)
SwHTMLWriter & OutCSS1_HintStyleOpt(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
#define CH_TXT_ATR_FORMELEMENT
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SvxBlinkItem > RES_CHRATR_BLINK(18)
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SwTextFormatColl > RES_TXTFMTCOLL(163)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
static SwHTMLWriter & OutHTML_SwUnderline(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
std::vector< HTMLStartEndPos * > HTMLStartEndPositions
SwHTMLWriter & OutHTML_SwTextNode(SwHTMLWriter &rWrt, const SwContentNode &rNode)
static SwHTMLWriter & OutHTML_SwWeight(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SwCrossedOut(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SwFlyCnt(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SvxColor(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SwFormatINetFormat(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SvxEscapement(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
HTMLOutEvent const aAnchorEventTable[]
static SwHTMLWriter & OutHTML_SvxAdjust(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static void OutHTML_SwFormat(SwHTMLWriter &rWrt, const SwFormat &rFormat, const SfxItemSet *pNodeItemSet, SwHTMLTextCollOutputInfo &rInfo)
static SwHTMLWriter & OutHTML_SvxFont(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SvxFontHeight(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
SwAttrFnTab aHTMLAttrFnTab
static SwHTMLWriter & OutHTML_SvxLanguage(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SwTextCharFormat(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_CSS1Attr(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
SwHTMLWriter & OutHTML_INetFormat(SwHTMLWriter &rWrt, const SwFormatINetFormat &rINetFormat, bool bOn)
static SwHTMLWriter & OutHTML_SwPosture(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static SwHTMLWriter & OutHTML_SwBlink(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
static void OutHTML_SwFormatOff(SwHTMLWriter &rWrt, const SwHTMLTextCollOutputInfo &rInfo)
SwHTMLWriter & OutHTML_SwFormatField(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
AllHtmlFlags getHTMLOutFrameAsCharTable(SwHTMLFrameType eFrameType, sal_uInt16 nExportMode)
SwHTMLWriter & OutHTML_BulletImage(SwHTMLWriter &rWrt, const char *pTag, const SvxBrushItem *pBrush, const OUString &rGraphicURL)
SwHTMLWriter & OutHTML_SwFormatFootnote(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
SwHTMLWriter & OutHTML_SwFormatLineBreak(SwHTMLWriter &rWrt, const SfxPoolItem &rHt)
#define OOO_STRING_SVTOOLS_HTML_parabreak
#define OOO_STRING_SVTOOLS_HTML_O_target
#define OOO_STRING_SVTOOLS_HTML_deflist
#define OOO_STRING_SVTOOLS_HTML_subscript
#define OOO_STRING_SVTOOLS_HTML_O_clear
#define OOO_STRING_SVTOOLS_HTML_O_color
#define OOO_STRING_SVTOOLS_HTML_AL_left
#define OOO_STRING_SVTOOLS_HTML_O_SDonmouseover
#define OOO_STRING_SVTOOLS_HTML_O_align
#define OOO_STRING_SVTOOLS_HTML_O_value
#define OOO_STRING_SVTOOLS_HTML_strike
#define OOO_STRING_SVTOOLS_HTML_division
#define OOO_STRING_SVTOOLS_HTML_dd
#define OOO_STRING_SVTOOLS_HTML_blink
#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_size
#define OOO_STRING_SVTOOLS_HTML_anchor
#define OOO_STRING_SVTOOLS_HTML_span
#define OOO_STRING_SVTOOLS_HTML_AL_all
#define OOO_STRING_SVTOOLS_HTML_bold
#define OOO_STRING_SVTOOLS_HTML_address
#define OOO_STRING_SVTOOLS_HTML_AL_center
#define OOO_STRING_SVTOOLS_HTML_horzrule
#define OOO_STRING_SVTOOLS_HTML_image
#define OOO_STRING_SVTOOLS_HTML_O_onclick
#define OOO_STRING_SVTOOLS_HTML_O_class
#define OOO_STRING_SVTOOLS_HTML_O_href
#define OOO_STRING_SVTOOLS_HTML_preformtxt
#define OOO_STRING_SVTOOLS_HTML_AL_right
#define OOO_STRING_SVTOOLS_HTML_underline
#define OOO_STRING_SVTOOLS_HTML_dt
#define OOO_STRING_SVTOOLS_HTML_AL_justify
#define OOO_STRING_SVTOOLS_HTML_O_noshade
#define OOO_STRING_SVTOOLS_HTML_O_name
#define OOO_STRING_SVTOOLS_HTML_font
#define OOO_STRING_SVTOOLS_HTML_O_span
#define OOO_STRING_SVTOOLS_HTML_S_nbsp
#define OOO_STRING_SVTOOLS_HTML_O_width
#define OOO_STRING_SVTOOLS_HTML_blockquote
#define OOO_STRING_SVTOOLS_HTML_li
#define OOO_STRING_SVTOOLS_HTML_O_SDonclick
#define OOO_STRING_SVTOOLS_HTML_linebreak
#define OOO_STRING_SVTOOLS_HTML_italic
#define OOO_STRING_SVTOOLS_HTML_O_style
#define OOO_STRING_SVTOOLS_HTML_O_face
#define OOO_STRING_SVTOOLS_HTML_superscript
SwHTMLWriter & OutHTML_NumberBulletListEnd(SwHTMLWriter &rWrt, const SwHTMLNumRuleInfo &rNextInfo)
SwHTMLWriter & OutHTML_NumberBulletListStart(SwHTMLWriter &rWrt, const SwHTMLNumRuleInfo &rInfo)
#define LANGUAGE_DONTKNOW
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
OString strip(const OString &rIn, char c)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
@ RES_POOLCOLL_TEXT
Text body.
@ RES_POOLCOLL_STANDARD
Standard.
@ RES_POOLCOLL_TABLE
Subgroup table.
@ RES_POOLCOLL_TABLE_HDLN
Table of Contents - heading.
@ RES_POOLCHR_INET_VISIT
Internet visited.
@ RES_POOLCHR_INET_NORMAL
Internet normal.
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)
static SVT_DLLPUBLIC SvStream & Out_Char(SvStream &, sal_uInt32 cChar, OUString *pNonConvertableChars=nullptr)
static SVT_DLLPUBLIC SvStream & Out_Color(SvStream &, const Color &, bool bXHTML=false)
static SVT_DLLPUBLIC SvStream & FlushToAscii(SvStream &)
static SVT_DLLPUBLIC SvStream & Out_Events(SvStream &, const SvxMacroTableDtor &, const HTMLOutEvent *, bool bOutStarBasic, OUString *pNonConvertableChars=nullptr)
static SVT_DLLPUBLIC void applyColor(HtmlWriter &rHtmlWriter, std::string_view aAttributeName, const Color &rColor)
Marks a position in the document model.
sal_Int32 GetContentIndex() const
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
constexpr sal_uInt8 MAXLEVEL
SwHTMLWriter & Out(const SwAttrFnTab, const SfxPoolItem &, SwHTMLWriter &)
FnAttrOut SwAttrFnTab[POOLATTR_END - POOLATTR_BEGIN]
#define HTMLMODE_NO_CONTROL_CENTERING
#define sCSS2_P_CLASS_leaders
#define HTMLMODE_NBSP_IN_TABLES
#define CSS1_OUTMODE_ANY_SCRIPT
#define HTMLMODE_LSPACE_IN_NUMBER_BULLET
#define CSS1_OUTMODE_WESTERN
std::set< std::unique_ptr< SwHTMLFormatInfo >, comphelper::UniquePtrValueLess< SwHTMLFormatInfo > > SwHTMLFormatInfos
#define HTMLMODE_FONT_GENERIC