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 }
172 switch( nScriptType )
174 case i18n::ScriptType::LATIN:
177 case i18n::ScriptType::ASIAN:
180 case i18n::ScriptType::COMPLEX:
202struct SwHTMLTextCollOutputInfo
205 std::optional<SfxItemSet> moItemSet;
207 bool bInNumberBulletList;
212 SwHTMLTextCollOutputInfo() :
213 bInNumberBulletList( false ),
214 bParaPossible( false ),
219 bool HasParaToken()
const {
return aToken.getLength()==1 && aToken[0]==
'P'; }
220 bool ShouldOutputToken()
const {
return bOutPara || !HasParaToken(); }
228 sal_uInt16 nCSS1Script )
232 , nFirstLineIndent(0)
235 , bScriptDependent( false )
237 sal_uInt16 nRefPoolId = 0;
241 OSL_ENSURE( nDeep ? !
aToken.isEmpty() :
aToken.isEmpty(),
242 "Something seems to be wrong with this token!" );
243 OSL_ENSURE( nDeep ? nRefPoolId != 0 : nRefPoolId == 0,
244 "Something seems to be wrong with the comparison style!" );
249 const SwFormat *pReferenceFormat =
nullptr;
287 if( !bOutStyles && pTemplate )
293 if( pReferenceFormat || nDeep==0 )
303 if( pReferenceFormat )
321 static const sal_uInt16 aWhichIds[3][4] =
332 sal_uInt16 aSets[2] = {0,0};
333 switch( nCSS1Script )
351 for(
int i=0;
i<4; ++
i )
354 for(sal_uInt16 nSet : aSets)
371 (pReferenceFormat ? pReferenceFormat :
pFormat)->GetLRSpace();
377 (pReferenceFormat ? pReferenceFormat :
pFormat)->GetULSpace();
382 sal_uInt16 nWhichId =
387 if( eLang != eDfltLang )
395 static const sal_uInt16 aWhichIds[3] =
398 for(sal_uInt16
i : aWhichIds)
422 SwHTMLTextCollOutputInfo& rInfo )
425 "not a paragraph style" );
430 sal_uInt16 nNewDefListLvl = 0;
431 sal_uInt16 nNumStart = USHRT_MAX;
432 bool bForceDL =
false;
434 rInfo.bInNumberBulletList =
false;
435 bool bNumbered =
false;
437 rInfo.bParaPossible =
false;
438 bool bNoEndTag =
false;
460 aNumInfo.
Set( *pTextNd );
465 rInfo.bInNumberBulletList =
true;
473 "Remembered Num level is wrong" );
475 "Remembered numbering state is wrong" );
479 nBulletGrfLvl = nLvl;
490 "<PRE> was not closed before <LI>." );
497 SwHTMLFormatInfos::iterator it = rHWrt.
m_TextCollInfos.find( pTmpInfo );
500 pFormatInfo = it->get();
507 rHWrt.
m_TextCollInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
514 bool bOutNewLine =
false;
515 if( !pFormatInfo->
aToken.isEmpty() )
519 rInfo.aToken = pFormatInfo->
aToken;
523 rInfo.bParaPossible =
true;
528 rInfo.bParaPossible =
true;
543 nToken = HtmlTokenId::PREFORMTXT_ON;
551 rInfo.bParaPossible = !bDT;
568 OSL_ENSURE(!rInfo.moItemSet,
"Where does this ItemSet come from?");
569 rInfo.moItemSet.emplace( *pFormatInfo->
moItemSet );
576 rInfo.moItemSet->Put( *pNodeItemSet );
578 rInfo.moItemSet.emplace( *pNodeItemSet );
599 if (!rInfo.moItemSet)
601 rInfo.moItemSet.emplace(*rFormat.
GetAttrSet().
GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>);
603 rInfo.moItemSet->Put( aULSpaceItem );
613 rInfo.aToken.clear();
622 if( rInfo.moItemSet )
634 if( (!rHWrt.
m_bCfgOutStyles || bForceDL) && !rInfo.bInNumberBulletList )
648 if( nNewDefListLvl == 0 && bForceDL && !bDT )
656 nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0;
659 bool bIsNextTextNode =
663 if( bForceDL && bDT )
670 ((bUseParSpace && bIsNextTextNode) || rHWrt.
m_nDefListLvl==1) &&
671 (!pAdjItem || SvxAdjust::Left==pAdjItem->
GetAdjust()) )
676 rInfo.bParaPossible =
false;
684 bool bAtLeastOneNumbered =
false;
686 if( rInfo.bInNumberBulletList )
688 OSL_ENSURE( !rHWrt.
m_nDefListLvl,
"DL cannot be inside OL!" );
706 if( rInfo.bInNumberBulletList )
715 if( rInfo.bInNumberBulletList && bNumbered && bPara && !rHWrt.
m_bCfgOutStyles )
748 rInfo.bOutPara =
false;
753 bool bHasParSpace = bUseParSpace && rULSpace.
GetLower() > 0;
758 bool bNumberedForListItem = bNumbered;
759 if (!bNumberedForListItem && rHWrt.
mbXHTML && bAtLeastOneNumbered)
763 bNumberedForListItem =
true;
765 if( rInfo.bInNumberBulletList && bNumberedForListItem )
769 if( USHRT_MAX != nNumStart )
797 rInfo.bOutDiv =
true;
807 OString aToken = rInfo.aToken;
809 (bHasParSpace || bXhtmlBlockQuote || pAdjItem) )
823 if( rInfo.moItemSet )
827 for(
auto const &
i : aWhichIds)
832 rInfo.moItemSet->ClearItem(
i );
853 (rInfo.bInNumberBulletList && !bNumbered) ||
855 (bHasParSpace || bXhtmlBlockQuote || pAdjItem ||
875 if( !sOut.isEmpty() )
889 OUString aClass( pFormatInfo->
aClass );
892 if( !aClass.isEmpty() )
943 rInfo.aToken.clear();
946 if( nBulletGrfLvl != 255 )
948 OSL_ENSURE( aNumInfo.
GetNumRule(),
"Where is the numbering gone???" );
949 OSL_ENSURE( nBulletGrfLvl <
MAXLEVEL,
"There are not this many layers." );
972 if( rInfo.aToken.isEmpty() )
977 if( rInfo.bInNumberBulletList )
993 if( rInfo.ShouldOutputToken() )
1002 if( rInfo.bParaPossible && rInfo.bOutPara )
1021 if( rInfo.bInNumberBulletList )
1030class HTMLStartEndPos
1034 std::unique_ptr<SfxPoolItem> m_pItem;
1038 HTMLStartEndPos(
const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE );
1042 void SetStart(sal_Int32 nStt) { m_nStart = nStt; }
1043 sal_Int32 GetStart()
const {
return m_nStart; }
1045 sal_Int32 GetEnd()
const {
return m_nEnd; }
1046 void SetEnd(sal_Int32 nE) { m_nEnd = nE; }
1051HTMLStartEndPos::HTMLStartEndPos(
const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE)
1054 , m_pItem(rItem.
Clone())
1061enum HTMLOnOffState { HTML_NOT_SUPPORTED,
1069 HTML_AUTOFMT_VALUE };
1075 std::deque<sal_Int32> m_aScriptChgLst;
1080 std::vector<sal_uInt16> m_aScriptLst;
1084 std::optional<Color> m_xDefaultColor;
1085 std::set<OUString>& m_rScriptTextStyles;
1088 bool m_bOutStyles : 1;
1092 void InsertItem_( HTMLStartEndPos *pPos, HTMLStartEndPositions::size_type nEndPos );
1093 void RemoveItem_( HTMLStartEndPositions::size_type nEndPos );
1096 HTMLOnOffState GetHTMLItemState(
const SfxPoolItem& rItem );
1099 bool ExistsOnTagItem( sal_uInt16 nWhich, sal_Int32
nPos );
1103 bool ExistsOffTagItem( sal_uInt16 nWhich, sal_Int32 nStartPos,
1104 sal_Int32 nEndPos );
1107 void FixSplittedItem( HTMLStartEndPos *pPos, sal_Int32 nNewEnd,
1108 HTMLStartEndPositions::size_type nStartPos );
1111 void InsertItem(
const SfxPoolItem& rItem, sal_Int32 nStart,
1115 void SplitItem(
const SfxPoolItem& rItem, sal_Int32 nStart,
1119 void InsertNoScript(
const SfxPoolItem& rItem, sal_Int32 nStart,
1128 HTMLEndPosLst(
SwDoc *pDoc,
SwDoc* pTemplate, std::optional<Color> xDfltColor,
1130 const OUString& rText, std::set<OUString>& rStyles );
1138 bool bParaAttrs=
false );
1142 sal_uInt16 GetScriptAtPos( sal_Int32
nPos,
1148 bool IsHTMLMode(
sal_uLong nMode)
const {
return (m_nHTMLMode & nMode) != 0; }
1153void HTMLEndPosLst::InsertItem_( HTMLStartEndPos *pPos, HTMLStartEndPositions::size_type nEndPos )
1157 sal_Int32 nStart = pPos->GetStart();
1158 HTMLStartEndPositions::size_type
i {0};
1160 while (i < m_aStartLst.size() && m_aStartLst[i]->GetStart() <= nStart)
1162 m_aStartLst.insert(m_aStartLst.begin() + i, pPos);
1165 m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pPos);
1168void HTMLEndPosLst::RemoveItem_( HTMLStartEndPositions::size_type nEndPos )
1170 HTMLStartEndPos* pPos = m_aEndLst[nEndPos];
1173 HTMLStartEndPositions::iterator it = std::find(m_aStartLst.begin(), m_aStartLst.end(), pPos);
1174 OSL_ENSURE(it != m_aStartLst.end(),
"Item not found in Start List!");
1175 if (it != m_aStartLst.end())
1176 m_aStartLst.erase(it);
1178 m_aEndLst.erase(m_aEndLst.begin() + nEndPos);
1183HTMLOnOffState HTMLEndPosLst::GetHTMLItemState(
const SfxPoolItem& rItem )
1185 HTMLOnOffState eState = HTML_NOT_SUPPORTED;
1186 switch( rItem.
Which() )
1194 eState = HTML_ON_VALUE;
1197 eState = HTML_OFF_VALUE;
1200 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1201 eState = HTML_STYLE_VALUE;
1211 eState = HTML_ON_VALUE;
1214 eState = HTML_OFF_VALUE;
1224 case SvxEscapement::Superscript:
1225 case SvxEscapement::Subscript:
1226 eState = HTML_ON_VALUE;
1228 case SvxEscapement::Off:
1229 eState = HTML_OFF_VALUE;
1240 eState = HTML_ON_VALUE;
1243 eState = HTML_OFF_VALUE;
1246 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1247 eState = HTML_STYLE_VALUE;
1254 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1255 eState = HTML_STYLE_VALUE;
1261 switch(
static_cast<const SvxWeightItem&
>(rItem).GetWeight() )
1264 eState = HTML_ON_VALUE;
1267 eState = HTML_OFF_VALUE;
1270 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1271 eState = HTML_STYLE_VALUE;
1282 eState = HTML_COLOR_VALUE;
1295 eState = HTML_REAL_VALUE;
1299 eState = HTML_CHRFMT_VALUE;
1303 eState = HTML_AUTOFMT_VALUE;
1307 eState = HTML_STYLE_VALUE;
1311 eState = HTML_STYLE_VALUE;
1315 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1316 eState = HTML_STYLE_VALUE;
1320 eState = HTML_DROPCAP_VALUE;
1324 if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
1325 eState = HTML_STYLE_VALUE;
1332bool HTMLEndPosLst::ExistsOnTagItem( sal_uInt16 nWhich, sal_Int32 nPos )
1334 for (
auto pTest : m_aStartLst)
1336 if( pTest->GetStart() > nPos )
1341 else if( pTest->GetEnd() > nPos )
1346 if( pItem->
Which() == nWhich &&
1347 HTML_ON_VALUE == GetHTMLItemState(*pItem) )
1358bool HTMLEndPosLst::ExistsOffTagItem( sal_uInt16 nWhich, sal_Int32 nStartPos,
1368 for (
auto pTest : m_aStartLst)
1370 if( pTest->GetStart() > nStartPos )
1375 else if( pTest->GetStart()==nStartPos &&
1376 pTest->GetEnd()==nEndPos )
1381 sal_uInt16 nTstWhich = pItem->
Which();
1385 HTML_OFF_VALUE == GetHTMLItemState(*pItem) )
1397void HTMLEndPosLst::FixSplittedItem( HTMLStartEndPos *pPos, sal_Int32 nNewEnd,
1398 HTMLStartEndPositions::size_type nStartPos )
1401 pPos->SetEnd( nNewEnd );
1404 HTMLStartEndPositions::iterator it = std::find(m_aEndLst.begin(), m_aEndLst.end(), pPos);
1405 OSL_ENSURE(it != m_aEndLst.end(),
"Item not found in End List!");
1406 if (it != m_aEndLst.end())
1407 m_aEndLst.erase(it);
1410 HTMLStartEndPositions::size_type nEndPos {0};
1411 while (nEndPos < m_aEndLst.size() && m_aEndLst[nEndPos]->GetEnd() <= nNewEnd)
1413 m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pPos);
1416 for (HTMLStartEndPositions::size_type i = nStartPos + 1;
i < m_aStartLst.size(); ++
i)
1418 HTMLStartEndPos* pTest = m_aStartLst[
i];
1419 sal_Int32 nTestEnd = pTest->GetEnd();
1420 if( pTest->GetStart() >= nNewEnd )
1426 else if( nTestEnd > nNewEnd )
1432 pTest->SetEnd( nNewEnd );
1435 it = std::find(m_aEndLst.begin(), m_aEndLst.end(), pTest);
1436 OSL_ENSURE(it != m_aEndLst.end(),
"Item not found in End List!");
1437 if (it != m_aEndLst.end())
1438 m_aEndLst.erase(it);
1442 m_aEndLst.insert(m_aEndLst.begin() + nEndPos, pTest);
1445 InsertItem( *pTest->GetItem(), nNewEnd, nTestEnd );
1450void HTMLEndPosLst::InsertItem(
const SfxPoolItem& rItem, sal_Int32 nStart,
1453 HTMLStartEndPositions::size_type
i;
1454 for (i = 0;
i < m_aEndLst.size();
i++)
1456 HTMLStartEndPos* pTest = m_aEndLst[
i];
1457 sal_Int32 nTestEnd = pTest->GetEnd();
1458 if( nTestEnd <= nStart )
1463 else if( nTestEnd < nEnd )
1465 if( pTest->GetStart() < nStart )
1469 InsertItem_(
new HTMLStartEndPos( rItem, nStart, nTestEnd ), i );
1482 InsertItem_(
new HTMLStartEndPos( rItem, nStart, nEnd ), i );
1485void HTMLEndPosLst::SplitItem(
const SfxPoolItem& rItem, sal_Int32 nStart,
1488 sal_uInt16 nWhich = rItem.
Which();
1493 for (HTMLStartEndPositions::size_type i = 0;
i < m_aStartLst.size(); ++
i)
1495 HTMLStartEndPos* pTest = m_aStartLst[
i];
1496 sal_Int32 nTestStart = pTest->GetStart();
1497 sal_Int32 nTestEnd = pTest->GetEnd();
1499 if( nTestStart >= nEnd )
1504 else if( nTestEnd > nStart )
1510 if( pItem->
Which() == nWhich &&
1511 HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
1513 bool bDelete =
true;
1515 if( nTestStart < nStart )
1519 FixSplittedItem( pTest, nStart, i );
1526 m_aStartLst.erase(m_aStartLst.begin() + i);
1529 HTMLStartEndPositions::iterator it
1530 = std::find(m_aEndLst.begin(), m_aEndLst.end(), pTest);
1531 OSL_ENSURE(it != m_aEndLst.end(),
"Item not found in End List!");
1532 if (it != m_aEndLst.end())
1533 m_aEndLst.erase(it);
1538 if( nTestEnd > nEnd )
1540 InsertItem( *pTest->GetItem(), nEnd, nTestEnd );
1554 std::unique_ptr<SwHTMLFormatInfo> pTmpInfo(
new SwHTMLFormatInfo(&rFormat));
1555 SwHTMLFormatInfos::iterator it = rFormatInfos.find( pTmpInfo );
1556 if (it != rFormatInfos.end())
1558 pFormatInfo = it->get();
1562 pFormatInfo =
new SwHTMLFormatInfo(&rFormat, m_pDoc, m_pTemplate, m_bOutStyles);
1563 rFormatInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
1564 if (m_rScriptTextStyles.count(rFormat.
GetName()))
1571HTMLEndPosLst::HTMLEndPosLst(
SwDoc* pD,
SwDoc* pTempl, std::optional<Color> xDfltCol,
bool bStyles,
1572 sal_uLong nMode,
const OUString& rText, std::set<OUString>& rStyles)
1574 , m_pTemplate(pTempl)
1575 , m_xDefaultColor(
std::move(xDfltCol))
1576 , m_rScriptTextStyles(rStyles)
1577 , m_nHTMLMode(nMode)
1578 , m_bOutStyles(bStyles)
1580 sal_Int32 nEndPos = rText.getLength();
1582 while( nPos < nEndPos )
1586 m_aScriptChgLst.push_back(nPos);
1587 m_aScriptLst.push_back(nScript);
1591HTMLEndPosLst::~HTMLEndPosLst()
1593 OSL_ENSURE(m_aStartLst.empty(),
"Start List not empty in destructor");
1594 OSL_ENSURE(m_aEndLst.empty(),
"End List not empty in destructor");
1597void HTMLEndPosLst::InsertNoScript(
const SfxPoolItem& rItem,
1598 sal_Int32 nStart, sal_Int32 nEnd,
1602 if( nStart == nEnd )
1605 bool bSet =
false, bSplit =
false;
1606 switch( GetHTMLItemState(rItem) )
1610 if( !ExistsOnTagItem( rItem.
Which(), nStart ) )
1614 case HTML_OFF_VALUE:
1619 if( ExistsOnTagItem( rItem.
Which(), nStart ) )
1621 bSet = m_bOutStyles && !bParaAttrs && !ExistsOffTagItem(rItem.
Which(), nStart, nEnd);
1624 case HTML_REAL_VALUE:
1629 case HTML_STYLE_VALUE:
1639 case HTML_CHRFMT_VALUE:
1642 "Not a character style after all" );
1646 const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos );
1647 if( !pFormatInfo->
aToken.isEmpty() )
1651 InsertItem( rItem, nStart, nEnd );
1656 rFormatInfos,
true, bParaAttrs );
1661 case HTML_AUTOFMT_VALUE:
1664 const std::shared_ptr<SfxItemSet>& pSet = rAutoFormat.
GetStyleHandle();
1666 Insert( *pSet, nStart, nEnd, rFormatInfos,
true, bParaAttrs );
1670 case HTML_COLOR_VALUE:
1675 "Not a foreground color, after all" );
1677 if( COL_AUTO == aColor )
1679 bSet = !bParaAttrs || !m_xDefaultColor || !m_xDefaultColor->
IsRGBEqual(aColor);
1683 case HTML_DROPCAP_VALUE:
1686 "Not a drop cap, after all" );
1696 rFormatInfos,
true, bParaAttrs );
1710 InsertItem( rItem, nStart, nEnd );
1712 SplitItem( rItem, nStart, nEnd );
1715void HTMLEndPosLst::Insert(
const SfxPoolItem& rItem,
1716 sal_Int32 nStart, sal_Int32 nEnd,
1719 bool bDependsOnScript =
false, bDependsOnAnyScript =
false;
1720 sal_uInt16 nScript = i18n::ScriptType::LATIN;
1721 switch( rItem.
Which() )
1728 bDependsOnScript =
true;
1729 nScript = i18n::ScriptType::LATIN;
1737 bDependsOnScript =
true;
1738 nScript = i18n::ScriptType::ASIAN;
1746 bDependsOnScript =
true;
1747 nScript = i18n::ScriptType::COMPLEX;
1753 const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos );
1756 bDependsOnScript =
true;
1757 bDependsOnAnyScript =
true;
1763 if (GetFormatInfo(*m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
1767 || GetFormatInfo(*m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
1772 bDependsOnScript =
true;
1773 bDependsOnAnyScript =
true;
1779 if( bDependsOnScript )
1781 sal_Int32
nPos = nStart;
1782 for (
size_t i = 0;
i < m_aScriptChgLst.size();
i++)
1784 sal_Int32 nChgPos = m_aScriptChgLst[
i];
1785 if( nPos >= nChgPos )
1791 if( nEnd <= nChgPos )
1796 if (bDependsOnAnyScript || nScript == m_aScriptLst[i])
1797 InsertNoScript( rItem, nPos, nEnd, rFormatInfos,
1805 if (bDependsOnAnyScript || nScript == m_aScriptLst[i])
1806 InsertNoScript( rItem, nPos, nChgPos, rFormatInfos, bParaAttrs );
1812 InsertNoScript( rItem, nStart, nEnd, rFormatInfos, bParaAttrs );
1816void HTMLEndPosLst::Insert(
const SfxItemSet& rItemSet,
1817 sal_Int32 nStart, sal_Int32 nEnd,
1819 bool bDeep,
bool bParaAttrs )
1823 sal_uInt16 nWhich = aIter.FirstWhich();
1827 if( SfxItemState::SET == aIter.GetItemState( bDeep, &pItem ) )
1829 Insert( *pItem, nStart, nEnd, rFormatInfos, bParaAttrs );
1832 nWhich = aIter.NextWhich();
1850 bool bOutStylesOld = m_bOutStyles;
1851 m_bOutStyles =
false;
1852 Insert( aItemSet, nPos, nPos+1, rFormatInfos,
false );
1853 m_bOutStyles = bOutStylesOld;
1856sal_uInt16 HTMLEndPosLst::GetScriptAtPos( sal_Int32 nPos, sal_uInt16 nWeak )
1860 size_t nScriptChgs = m_aScriptChgLst.size();
1862 while (i < nScriptChgs && nPos >= m_aScriptChgLst[i])
1864 OSL_ENSURE( i < nScriptChgs,
"script list is too short" );
1865 if( i < nScriptChgs )
1867 if (i18n::ScriptType::WEAK == m_aScriptLst[i])
1876void HTMLEndPosLst::OutStartAttrs(
SwHTMLWriter& rHWrt, sal_Int32 nPos )
1882 HTMLStartEndPositions::size_type nCharBoxIndex = 0;
1883 while (nCharBoxIndex < m_aStartLst.size()
1884 && m_aStartLst[nCharBoxIndex]->GetItem()->Which() !=
RES_CHRATR_BOX)
1890 for (HTMLStartEndPositions::size_type i = 0;
i < m_aStartLst.size(); ++
i)
1892 HTMLStartEndPos *pPos =
nullptr;
1893 if (nCharBoxIndex < m_aStartLst.size())
1896 pPos = m_aStartLst[nCharBoxIndex];
1897 else if( i == nCharBoxIndex )
1898 pPos = m_aStartLst[0];
1900 pPos = m_aStartLst[
i];
1903 pPos = m_aStartLst[
i];
1905 sal_Int32 nStart = pPos->GetStart();
1911 else if( nStart == nPos )
1915 sal_uInt16 nWhich = pPos->GetItem()->Which();
1930void HTMLEndPosLst::OutEndAttrs(
SwHTMLWriter& rHWrt, sal_Int32 nPos )
1935 HTMLStartEndPositions::size_type
i {0};
1936 while (i < m_aEndLst.size())
1938 HTMLStartEndPos* pPos = m_aEndLst[
i];
1939 sal_Int32 nEnd = pPos->GetEnd();
1941 if( SAL_MAX_INT32 == nPos || nEnd == nPos )
1945 bool bSkipOut =
false;
1948 HTMLStartEndPositions::iterator it
1949 = std::find(m_aStartLst.begin(), m_aStartLst.end(), pPos);
1950 OSL_ENSURE(it != m_aStartLst.end(),
"Item not found in Start List!");
1951 if (it != m_aStartLst.end())
1953 while (it != m_aStartLst.end())
1955 HTMLStartEndPos *pEndPos = *it;
1957 *
static_cast<const SvxBoxItem*
>(pEndPos->GetItem()) ==
1958 *
static_cast<const SvxBoxItem*
>(pPos->GetItem()) )
1960 pEndPos->SetStart(pPos->GetStart());
1974 else if( nEnd > nPos )
1983 OSL_ENSURE( nEnd >= nPos,
1984 "The attribute should've been closed a long time ago" );
1996 const OUString& rStr = pNd->
GetText();
1997 sal_Int32 nEnd = rStr.getLength();
2032 sal_Int32 nLeft = pItem->GetLeft();
2033 sal_Int32 nRight = pItem->GetRight();
2034 if( nLeft || nRight )
2104 if( pItemSet && pItemSet->
Count() &&
2133 bool bPageBreakBehind =
false;
2138 bool bPageBreakBefore =
false;
2144 if( pPageDescItem && pPageDescItem->
GetPageDesc() )
2146 bPageBreakBefore =
true;
2150 switch( pItem->GetBreak() )
2152 case SvxBreak::PageBefore:
2153 bPageBreakBefore =
true;
2155 case SvxBreak::PageAfter:
2156 bPageBreakBehind =
true;
2158 case SvxBreak::PageBoth:
2159 bPageBreakBefore =
true;
2160 bPageBreakBehind =
true;
2168 if( bPageBreakBefore )
2187 nEnd = rHTMLWrt.
m_pCurrentPam->GetMark()->GetContentIndex();
2195 SwHTMLTextCollOutputInfo aFormatInfo;
2219 sal_Int32 nOffset = 0;
2220 OUString aOutlineText;
2229 nOffset = nOffset + aOutlineText.getLength();
2230 aFullText = aOutlineText;
2232 OUString aFootEndNoteSym;
2236 nOffset = nOffset + aFootEndNoteSym.getLength();
2237 aFullText += aFootEndNoteSym;
2252 if( aFormatInfo.moItemSet )
2254 aEndPosLst.Insert( *aFormatInfo.moItemSet, 0, nEnd + nOffset,
2262 aEndPosLst.OutStartAttrs( rHTMLWrt, 0 );
2268 if( !aOutlineText.isEmpty() )
2274 aEndPosLst.GetScriptAtPos( aOutlineText.getLength(), rHTMLWrt.
m_nCSS1Script ) );
2283 size_t nAttrPos = 0;
2284 sal_Int32 nStrPos = rHTMLWrt.
m_pCurrentPam->GetPoint()->GetContentIndex();
2287 if( nCntAttr && nStrPos > ( pHt = pNd->
GetSwpHints().
Get(0) )->GetStart() )
2291 aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset );
2300 const sal_Int32 nHtEnd = *pHt->
End(),
2306 if( nHtEnd == nHtStt )
2311 aEndPosLst.Insert( pHt->
GetAttr(), nHtStt + nOffset,
2316 sal_Int32 nTmpStt = nHtStt < nStrPos ? nStrPos : nHtStt;
2317 sal_Int32 nTmpEnd =
std::min(nHtEnd, nEnd);
2318 aEndPosLst.Insert( pHt->
GetAttr(), nTmpStt + nOffset,
2326 }
while( nAttrPos < nCntAttr && nStrPos >
2330 aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset );
2331 aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset );
2334 bool bWriteBreak = (HtmlTokenId::PREFORMTXT_ON != rHTMLWrt.
m_nLastParaToken);
2338 bWriteBreak =
false;
2343 bool bLeadingTab =
true;
2344 for( ; nStrPos < nEnd; nStrPos++ )
2349 aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset );
2354 bool bOutChar =
true;
2356 if (nAttrPos < nCntAttr && pHt->GetStart() == nStrPos)
2361 if( *pHt->
End() != nStrPos )
2366 aEndPosLst.Insert( pHt->
GetAttr(), nStrPos + nOffset,
2367 *pHt->
End() + nOffset,
2374 OSL_ENSURE( !pTextHt,
"Why is there already an attribute without an end?" );
2387 bWriteBreak =
false;
2392 }
while( ++nAttrPos < nCntAttr && nStrPos ==
2408 aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset );
2409 aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset );
2415 rStr[nStrPos-1] ==
' ';
2418 nStrPos + nOffset, nCSS1Script );
2427 sal_uInt32 c = rStr[nStrPos];
2428 if( rtl::isHighSurrogate(c) && nStrPos < nEnd - 1 )
2431 if( rtl::isLowSurrogate(
d) )
2433 c = rtl::combineSurrogates(c,
d);
2445 sal_Int32 nWordLen = rStr.indexOf(
' ', nStrPos+1 );
2446 if( nWordLen == -1 )
2448 nWordLen -= nStrPos;
2478 bool bConsumed =
false;
2495 bLeadingTab =
false;
2509 bWriteBreak = (0x0a == c) &&
2524 OSL_ENSURE( !bFlysLeft,
"Not all frames were saved!" );
2534 if( bEndOfCell && !nEnd &&
2546 if (rULSpace.
GetLower() > 0 && !bEndOfCell)
2556 const char* pString;
2584 nEnd > 0 &&
' ' == rStr[nEnd-1] )
2588 if (nIndexTab > -1) {
2589 OString sOut =
OUStringToOString(rStr.subView(nIndexTab + 1), RTL_TEXTENCODING_ASCII_US);
2590 rWrt.
Strm().
WriteOString( Concat2View(
"</span><span>" + sOut +
"</span>") );
2599 if( bPageBreakBehind )
2609 Size aSz( bVert ? 0 : nVal, bVert ? nVal : 0 );
2761 sal_uInt16 nSize = nHeight / 20;
2763 + OString::number(
static_cast<sal_Int32
>(nSize)) +
"pt\"";
2773 OString::number(
static_cast<sal_Int32
>(nSize)) +
"\"";
2878 if( !aTag.isEmpty() )
2953 bool bEvents = pMacTable !=
nullptr && !pMacTable->
empty();
2956 if(
aURL.isEmpty() && !bEvents && rINetFormat.
GetName().isEmpty() )
2968 bool bScriptDependent =
false;
2972 std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(
new SwHTMLFormatInfo(pFormat));
2976 bScriptDependent = (*it)->bScriptDependent;
2979 if( !bScriptDependent )
2983 std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(
new SwHTMLFormatInfo(pFormat));
2987 bScriptDependent = (*it)->bScriptDependent;
2991 if( bScriptDependent )
2994 const char* pStr =
nullptr;
3007 sOut += pStr + OString::Concat(
"\"");
3015 if( !
aURL.isEmpty() || bEvents )
3017 OUString sTmp(
aURL.toAsciiUpperCase() );
3018 sal_Int32
nPos = sTmp.indexOf(
"\" REL=" );
3032 if( !rINetFormat.
GetName().isEmpty() )
3049 if( !sRel.isEmpty() )
3052 if( !sOut.isEmpty() )
3093 OSL_ENSURE( rHTMLWrt.
m_aINetFormats.size(),
"there must be a URL attribute missing" );
3128 SwHTMLFormatInfos::const_iterator it = rHTMLWrt.
m_CharFormatInfos.find(pTmpInfo);
3133 OSL_ENSURE( pFormatInfo,
"Why is there no information about the character style?" );
3138 if( !pFormatInfo->
aToken.isEmpty() )
3139 sOut += pFormatInfo->
aToken;
3148 OUString aClass( pFormatInfo->
aClass );
3151 if( !aClass.isEmpty() )
3156 aClass +=
"western";
3174 OString aTag = !pFormatInfo->
aToken.isEmpty() ? pFormatInfo->
aToken.getStr()
3189 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
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvStream & WriteOString(std::string_view rStr)
SvStream & WriteChar(char nChar)
SvStream & WriteCharPtr(const char *pBuf)
SvxAdjust GetAdjust() const
sal_uInt32 GetHeight() const
short GetTextFirstLineOffset() const
tools::Long GetRight() const
tools::Long GetTextLeft() const
tools::Long GetLeft() const
LanguageType GetLanguage() const
tools::Long GetWidth() 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 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)
sal_uInt16 GuessFrameType(const SwFrameFormat &rFrameFormat, const SdrObject *&rpStrObj)
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
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
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.
Writer & OutCSS1_HintStyleOpt(Writer &rWrt, const SfxPoolItem &rHt)
Writer & OutCSS1_ParaTagStyleOpt(Writer &rWrt, const SfxItemSet &rItemSet)
Writer & OutCSS1_HintSpanTag(Writer &rWrt, const SfxPoolItem &rHt)
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
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< SvxWeightItem > RES_CHRATR_WEIGHT(15)
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< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
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< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
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< SwTextFormatColl > RES_TXTFMTCOLL(157)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
static Writer & OutHTML_SwUnderline(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SwFormatINetFormat(Writer &rWrt, const SfxPoolItem &rHt)
std::vector< HTMLStartEndPos * > HTMLStartEndPositions
static Writer & OutHTML_SwTextCharFormat(Writer &rWrt, const SfxPoolItem &rHt)
static void OutHTML_SwFormatOff(Writer &rWrt, const SwHTMLTextCollOutputInfo &rInfo)
static Writer & OutHTML_SvxFontHeight(Writer &rWrt, const SfxPoolItem &rHt)
static void OutHTML_SwFormat(Writer &rWrt, const SwFormat &rFormat, const SfxItemSet *pNodeItemSet, SwHTMLTextCollOutputInfo &rInfo)
static Writer & OutHTML_SvxLanguage(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SvxAdjust(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SwCrossedOut(Writer &rWrt, const SfxPoolItem &rHt)
Writer & OutHTML_INetFormat(Writer &rWrt, const SwFormatINetFormat &rINetFormat, bool bOn)
static Writer & OutHTML_SvxEscapement(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SvxColor(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SwBlink(Writer &rWrt, const SfxPoolItem &rHt)
HTMLOutEvent const aAnchorEventTable[]
static Writer & OutHTML_SwFlyCnt(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_CSS1Attr(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SwPosture(Writer &rWrt, const SfxPoolItem &rHt)
SwAttrFnTab aHTMLAttrFnTab
static Writer & OutHTML_SwWeight(Writer &rWrt, const SfxPoolItem &rHt)
static Writer & OutHTML_SvxFont(Writer &rWrt, const SfxPoolItem &rHt)
Writer & OutHTML_SwTextNode(Writer &rWrt, const SwContentNode &rNode)
Writer & OutHTML_SwFormatField(Writer &rWrt, const SfxPoolItem &rHt)
AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]
Writer & OutHTML_BulletImage(Writer &rWrt, const char *pTag, const SvxBrushItem *pBrush, const OUString &rGraphicURL)
Writer & OutHTML_SwFormatLineBreak(Writer &rWrt, const SfxPoolItem &rHt)
Writer & OutHTML_SwFormatFootnote(Writer &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
Writer & OutHTML_NumberBulletListEnd(SwHTMLWriter &rWrt, const SwHTMLNumRuleInfo &rNextInfo)
Writer & OutHTML_NumberBulletListStart(SwHTMLWriter &rWrt, const SwHTMLNumRuleInfo &rInfo, bool &rAtLeastOneNumbered)
#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
Writer & Out(const SwAttrFnTab, const SfxPoolItem &, Writer &)
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