25 #include <editeng/editids.hrc>
47 #include <osl/diagnose.h>
67 #define MAX_DROPCAP_LINES 9
68 #define MAX_DROPCAP_CHARS 9
85 OSL_ENSURE( found,
"style not found" );
91 const sal_uInt32 aFHeights[7],
const OUString& rBaseURL,
bool const bNewDoc)
95 , m_rHTMLParser(rParser)
97 m_bIsNewDoc( bNewDoc ),
98 m_bBodyBGColorSet( false ),
99 m_bBodyBackgroundSet( false ),
100 m_bBodyTextSet( false ),
101 m_bBodyLinkSet( false ),
102 m_bBodyVLinkSet( false ),
103 m_bSetFirstPageDesc( false ),
104 m_bSetRightPageDesc( false ),
105 m_bTableHeaderTextCollSet( false ),
106 m_bTableTextCollSet( false ),
107 m_bLinkCharFormatsSet( false )
128 bool bSetKeep =
false, bSetBreak =
false, bSetPageDesc =
false;
133 eBreak = SvxBreak::PageBefore;
145 bSetBreak = bSetPageDesc =
true;
156 eBreak = SvxBreak::PageAfter;
160 bSetBreak = bSetKeep = bSetPageDesc =
true;
163 bKeep = bSetKeep =
true;
184 for(sal_uInt16
i : aWhichIds)
202 SvxBrushItem aBrushItem( *static_cast<const SvxBrushItem *>(pItem) );
209 SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) );
221 SwCharFormat *pUnvisited =
nullptr, *pVisited =
nullptr;
238 pStyleEntry =
GetTag( sTmp );
252 pStyleEntry =
GetTag( sTmp );
284 SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem *>(pCollItem) );
292 rItemSet.
Put( aLRItem );
304 SvxULSpaceItem aULItem( *static_cast<const SvxULSpaceItem *>(pCollItem) );
310 rItemSet.
Put( aULItem );
315 for(sal_uInt16
i : aWhichIds)
334 "Call SetTableTextColl unnecessary" );
361 pStyleEntry =
GetTag( sTmp );
373 m_bTableTextCollSet =
true;
379 std::shared_ptr<SvxBrushItem> aBrushItem(std::make_shared<SvxBrushItem>(
RES_BACKGROUND));
380 std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(
RES_BOX));
381 std::shared_ptr<SvxFrameDirectionItem> aFrameDirItem(std::make_shared<SvxFrameDirectionItem>(SvxFrameDirection::Environment,
RES_FRAMEDIR));
382 bool bSetBrush = pBrush!=
nullptr, bSetBox =
false, bSetFrameDir =
false;
384 aBrushItem.reset(pBrush->
Clone());
393 aBrushItem.reset(static_cast<SvxBrushItem*>(pItem->
Clone()));
401 aBoxItem.reset(static_cast<SvxBoxItem*>(pItem->
Clone()));
409 aFrameDirItem.reset(static_cast<SvxFrameDirectionItem*>(pItem->
Clone()));
415 if( !(bSetBrush || bSetBox || bSetFrameDir) )
420 for(sal_uInt16
i : aPoolIds)
451 bool bChanged =
false;
463 SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem *>(pPageItem) );
488 SvxULSpaceItem aULItem( *static_cast<const SvxULSpaceItem *>(pPageItem) );
525 SwTwips nTmp = aFrameSz.GetHeight();
526 aFrameSz.SetHeight( aFrameSz.GetWidth() );
527 aFrameSz.SetWidth( nTmp );
558 sal_Int32 nLen = rClass.getLength();
559 sal_Int32
nPos = nLen > 4 ? rClass.lastIndexOf(
'-' ) : -1;
576 if( rClass.matchIgnoreAsciiCase(
"cjk", nPos ) )
580 else if( rClass.matchIgnoreAsciiCase(
"ctl", nPos ) )
586 if( rClass.matchIgnoreAsciiCase(
"western", nPos ) )
596 rClass = rClass.copy( 0, nPos-1 );
608 OUString& rToken, OUString& rClass,
618 sal_Int32
nPos = rToken.indexOf(
'.' );
619 OSL_ENSURE( nPos >= 0,
"No dot in Class-Selector???" );
622 rClass = rToken.copy( nPos+1 );
623 rToken = rToken.copy( 0, nPos );
626 if( rClass.isEmpty() )
631 rToken = rToken.toAsciiLowerCase();
638 static const sal_uInt16 aWhichIds[3][5] =
648 bool aClearItems[3] = {
false,
false,
false };
652 aClearItems[1] = aClearItems[2] =
true;
655 aClearItems[0] = aClearItems[2] =
true;
658 aClearItems[0] = aClearItems[1] =
true;
663 OSL_ENSURE( aClearItems[0],
"unknown script type" );
669 for(
size_t i=0;
i < SAL_N_ELEMENTS(aWhichIds[0]); ++
i )
671 sal_uInt16 nWhich = aWhichIds[j][
i];
673 if( aClearItems[j] ||
675 SfxItemState::SET == rItemSet.
GetItemState( nWhich,
false, &pItem ) &&
677 : *pItem == pParentItemSet->Get(nWhich ) ) ) )
701 OUString aClass( pSelector->
GetString() );
718 (pNext->
GetString().equalsIgnoreAsciiCase(
"left" ) ||
719 pNext->
GetString().equalsIgnoreAsciiCase(
"right" ) ||
720 pNext->
GetString().equalsIgnoreAsciiCase(
"first" ) ) ) )
727 rItemSet, rPropInfo );
751 case HtmlTokenId::ANCHOR_ON:
754 InsertTag( aToken2, rItemSet, rPropInfo );
762 aPseudo = aPseudo.toAsciiLowerCase();
763 bool bInsert =
false;
767 if( aPseudo ==
"link" )
773 if( aPseudo ==
"visited" )
781 OUString sTmp = aToken2 +
":" + aPseudo;
786 InsertTag( sTmp, aScriptItemSet, rPropInfo );
796 case HtmlTokenId::BODY_ON:
829 rItemSet, rPropInfo,
this );
838 !pNext && aClass.getLength() >= 9 &&
839 (
's' == aClass[0] ||
'S' == aClass[0]) )
841 sal_uInt16 nPoolFormatId = 0;
864 sal_uInt16 nPoolCollId = 0;
867 case HtmlTokenId::HEAD1_ON:
870 case HtmlTokenId::HEAD2_ON:
873 case HtmlTokenId::HEAD3_ON:
876 case HtmlTokenId::HEAD4_ON:
879 case HtmlTokenId::HEAD5_ON:
882 case HtmlTokenId::HEAD6_ON:
885 case HtmlTokenId::PARABREAK_ON:
886 if( aClass.getLength() >= 9 &&
887 (
's' == aClass[0] ||
'S' == aClass[0]) )
904 case HtmlTokenId::ADDRESS_ON:
907 case HtmlTokenId::BLOCKQUOTE_ON:
910 case HtmlTokenId::DT_ON:
913 case HtmlTokenId::DD_ON:
916 case HtmlTokenId::PREFORMTXT_ON:
919 case HtmlTokenId::TABLEHEADER_ON:
920 case HtmlTokenId::TABLEDATA_ON:
923 InsertTag( aToken2, rItemSet, rPropInfo );
931 OUString aSubToken, aSubClass;
933 if( HtmlTokenId::PARABREAK_ON ==
GetHTMLToken( aSubToken ) )
939 if( !aClass.isEmpty() || pNext )
941 nPoolCollId =
static_cast< sal_uInt16
>(
957 InsertTag( sTmp, aScriptItemSet, rPropInfo );
974 pNext->
GetString().equalsIgnoreAsciiCase(
"first-letter" ) &&
975 SvxAdjust::Left == rPropInfo.
m_eFloat) )
982 if( !aClass.isEmpty() )
997 if( SfxItemState::SET ==
999 pBoxItem = static_cast<const SvxBoxItem *>(pItem);
1009 pParentColl ? &pParentColl->
GetAttrSet() : nullptr );
1057 if( aDrop.GetLines() > 1 &&
1058 (SvxAdjust::Left == rPropInfo.
m_eFloat ||
1079 if( !aClass.isEmpty() )
1083 pParentCFormat = pCFormat;
1101 pParentCFormat ? &pParentCFormat->
GetAttrSet() : nullptr );
1129 sal_uInt16 nPoolId = 0;
1130 const char*
sName =
nullptr;
1155 if( !nPoolId && !sName )
1166 OUString sCName( OUString::createFromAscii(sName) );
1175 OSL_ENSURE( pCFormat,
"No character style???" );
1179 OUString aClass( rClass );
1181 if( !aClass.isEmpty() )
1183 OUString aTmp( pCFormat->
GetName() );
1188 pCFormat = pClassCFormat;
1242 const OUString& rClass )
1246 OUString aClass( rClass );
1249 (
's' == aClass[0] ||
'S' == aClass[0] ) )
1265 OSL_ENSURE(
false,
"Where does the user style comes from?" );
1273 OSL_ENSURE( pColl,
"No paragraph style???" );
1274 if( !aClass.isEmpty() )
1276 OUString aTmp( pColl->
GetName() );
1331 for (nPage=0; nPage < nPageDescs &&
1335 return nPage < nPageDescs ? &pDoc->
GetPageDesc(nPage) :
nullptr;
1344 if( !pPageDesc && bCreate )
1348 SAL_WARN(
"sw.html",
"no creating PageDesc while reading header/footer");
1356 if( !pMasterPageDesc )
1361 getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId,
false );
1370 bool bSetFollowFollow =
false;
1378 pFollow = pMasterPageDesc;
1393 bSetFollowFollow =
true;
1396 if( pFirstPageDesc )
1398 SwPageDesc aNewFirstPageDesc( *pFirstPageDesc );
1399 aNewFirstPageDesc.
SetFollow( pNewPageDesc );
1412 if( bSetFollowFollow )
1415 aNewFollowPageDesc.
SetFollow( pNewPageDesc );
1419 pPageDesc = pNewPageDesc;
1451 ( SvxAdjust::End != rPropInfo.
m_eFloat ) ) &&
1459 OSL_ENSURE( !rClass.empty(),
"Style class without length?" );
1461 rFormatName += OUString::Concat(
".") + rClass;
1466 const OUString *
pName )
1475 nLines =
static_cast<sal_uInt8>((nProp + 50) / 100);
1507 if( !rItemSet.
Count() )
1514 aName = *pName +
".FL";
1521 aName =
"first-letter " + OUString::number( static_cast<sal_Int32>(++
m_nDropCapCnt) );
1672 for (
size_t i = rOptions2.size();
i; )
1675 if( HtmlOptionId::TYPE == rOption.
GetToken() )
1700 SfxMedium aDLMedium( rURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE );
1708 rStr = OUString(static_cast<const char *>(aStream.
GetData()), aStream.
TellEnd(),
1713 if( (
m_xDoc->GetDocShell() &&
m_xDoc->GetDocShell()->IsAbortingImport() )
1714 || 1 ==
m_xDoc->getReferenceCount() )
1717 eState = SvParserState::Error;
1723 OSL_ENSURE( pOldVSh == pVSh,
"FileDownload: SwViewShell changed on us" );
1725 return pStream!=
nullptr;
1730 bool bFinishDownload =
false;
1734 "Pending-Stack without File-Download?" );
1739 bFinishDownload =
true;
1743 OUString sRel, sHRef,
sType;
1746 for (
size_t i = rOptions2.size();
i; )
1751 case HtmlOptionId::REL:
1754 case HtmlOptionId::HREF:
1757 case HtmlOptionId::TYPE:
1764 if( !sHRef.isEmpty() && sRel.equalsIgnoreAsciiCase(
"STYLESHEET" ) &&
1765 ( sType.isEmpty() ||
1772 if( IsParserWorking() )
1775 bFinishDownload =
true;
1795 if( bFinishDownload )
1831 pPageEntry =
GetPage(
"first",
true );
1839 pPageEntry =
GetPage(
"right",
true );
1847 pPageEntry =
GetPage(
"left",
true );
1856 const OUString &rId,
1857 const OUString &rClass,
1860 const OUString *pLang,
1861 const OUString *pDir )
1865 if( !rClass.isEmpty() )
1867 OUString aClass( rClass );
1874 rItemSet, rPropInfo, false );
1879 if( !rId.isEmpty() )
1885 rItemSet, rPropInfo, !rClass.isEmpty() );
1886 rPropInfo.m_aId = rId;
1890 if( !rStyle.isEmpty() )
1892 m_pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
1899 if( pLang && !pLang->isEmpty() )
1905 rItemSet.
Put( aLang );
1907 rItemSet.
Put( aLang );
1909 rItemSet.
Put( aLang );
1914 if( pDir && !pDir->isEmpty() )
1916 OUString aValue( *pDir );
1918 if (aValue.equalsIgnoreAsciiCase(
"LTR"))
1919 eDir = SvxFrameDirection::Horizontal_LR_TB;
1920 else if (aValue.equalsIgnoreAsciiCase(
"RTL"))
1921 eDir = SvxFrameDirection::Horizontal_RL_TB;
1923 if( SvxFrameDirection::Environment != eDir )
1926 rItemSet.
Put( aDir );
1942 sal_Int16 eHoriRel = text::RelOrientation::FRAME;
1943 sal_Int16 eVertRel = text::RelOrientation::FRAME;
1944 SwTwips nHoriPos = 0, nVertPos = 0;
1945 css::text::WrapTextMode eSurround = css::text::WrapTextMode_THROUGH;
1957 aAnchor.
SetType( RndStdIds::FLY_AT_FLY );
1963 aAnchor.
SetType( RndStdIds::FLY_AT_PAGE );
1967 nVertPos = rPropInfo.
m_nTop;
1971 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
1973 eVertOri = text::VertOrientation::TOP;
1974 eVertRel = text::RelOrientation::CHAR;
1978 eHoriRel = text::RelOrientation::PAGE_FRAME;
1983 eHoriOri = text::HoriOrientation::LEFT;
1984 eHoriRel = text::RelOrientation::FRAME;
1997 aAnchor.
SetType( RndStdIds::FLY_AT_CHAR );
1999 eVertOri = text::VertOrientation::CHAR_BOTTOM;
2000 eVertRel = text::RelOrientation::CHAR;
2004 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
2005 eVertOri = text::VertOrientation::TOP;
2006 eVertRel = text::RelOrientation::PRINT_AREA;
2014 sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
2018 if( SvxAdjust::Right==rPropInfo.
m_eFloat )
2020 eHoriOri = text::HoriOrientation::RIGHT;
2021 eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2022 eSurround = css::text::WrapTextMode_LEFT;
2026 eHoriOri = text::HoriOrientation::LEFT;
2027 eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2028 eSurround = css::text::WrapTextMode_RIGHT;
2031 rFrameItemSet.
Put( aAnchor );
2044 sal_uInt8 nPercentWidth = nDfltPrcWidth, nPercentHeight = 0;
2075 rFrameItemSet.
Put( aFrameSize );
2088 SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) );
2091 rFrameItemSet.
Put( aBoxItem );
2095 rFrameItemSet.
Put( *pItem );
2103 rFrameItemSet.
Put( *pItem );
2110 rFrameItemSet.
Put( *pItem );
2117 std::unique_ptr<HTMLAttrContext> xCntxt;
2123 bool bFound = HtmlTokenId::NONE == nToken;
2124 if( nToken != HtmlTokenId::NONE )
2130 if( nCntxtToken == nToken )
2135 else if( nCntxtToken == HtmlTokenId::NONE )
2158 bool bIgnoreTopContext )
const
2161 if( bIgnoreTopContext )
2174 pCntxt->
GetMargins( nLeft, nRight, nIndent );
2182 short& nIndent )
const
2197 sal_uInt16& nLower )
const
2199 sal_uInt16 nDfltColl = 0;
2200 OUString aDfltClass;
2211 else if( !nDfltColl )
2232 for(
auto pAttr : rAttrs )
2240 pAttr->Invalidate();
2257 sal_uInt16 nWhich = pItem->Which();
2264 (*ppAttr)->SetLikePara();
2266 bool bSuccess =
EndAttr( *ppAttr,
false );
2275 if( RTL_TEXTENCODING_DONTKNOW == eEnc )
2282 for(sal_uInt16
i : aWhichIds)
2284 if( SfxItemState::SET == rItemSet.
GetItemState(
i,
false,&pItem ) )
2287 if( RTL_TEXTENCODING_SYMBOL != rFont.
GetCharSet() )
2308 for(sal_uInt16
i : aWhichIds)
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
std::vector< SwPending > m_vPendingStack
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
static void MergeStyles(const SfxItemSet &rSrcSet, const SvxCSS1PropertyInfo &rSrcInfo, SfxItemSet &rTargetSet, SvxCSS1PropertyInfo &rTargetInfo, bool bSmart)
Starts a section of nodes in the document model.
void GetULSpace(sal_uInt16 &rUpper, sal_uInt16 &rLower) const
const SwPageDesc * GetFirstPageDesc(bool bCreate=false)
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SvxBlinkItem > RES_CHRATR_BLINK(18)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
SvxCSS1LengthType m_eLeftType
void SetAnchorAndAdjustment(sal_Int16 eVertOri, sal_Int16 eHoriOri, const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrameSet)
HtmlOptionId GetToken() const
SvxCSS1LengthType m_eTopType
static Css1ScriptFlags GetScriptFromClass(OUString &rClass, bool bSubClassOnly=true)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
Represents the style of a paragraph.
SwTextFormatColl * GetTextFormatColl(sal_uInt16 nTextColl, const OUString &rClass)
Marks a position in the document model.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
sal_uInt16 GetLower() const
SwPageDesc * GetMasterPageDesc()
virtual void SetDfltEncoding(rtl_TextEncoding eEnc)
virtual ~SwCSS1Parser() override
bool ShouldFinishFileDownload() const
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
SwDocShell * GetDocShell()
bool FileDownload(const OUString &rURL, OUString &rStr)
sal_uInt16 GetDfltTextFormatColl() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(110)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nPoolId) const
bool IsReadingHeaderOrFooter() const
#define OOO_STRING_SVTOOLS_HTML_tableheader
const SvxCSS1PropertyInfo & GetPropertyInfo() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
tools::Long GetRight() const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
void NewAttr(const std::shared_ptr< HTMLAttrTable > &rAttrTab, HTMLAttr **ppAttr, const SfxPoolItem &rItem)
const OUString & GetString() const
void StartFileDownload(const OUString &rURL)
SwViewShell * CallEndAction(bool bChkAction=false, bool bChkPtr=true)
const OUString & GetString() const
HTMLAttrContexts m_aContexts
const OUString & GetClass() const
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_sym
virtual sal_uInt32 GetFontHeight(sal_uInt16 nSize) const override
rtl_TextEncoding GetDfltEncoding() const
#define OOO_STRING_SVTOOLS_HTML_insertedtext
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
void SetBoxItem(SfxItemSet &rItemSet, sal_uInt16 nMinBorderDist, const SvxBoxItem *pDflt=nullptr)
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
SvxCSS1PageBreak m_ePageBreakBefore
FontPitch GetPitch() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
sal_uLong m_aFontHeights[7]
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
Value in Var-direction gives minimum (can be exceeded but not be less).
FontFamily GetFamily() const
void SetFollow(const SwPageDesc *pNew)
virtual sal_uInt64 TellEnd() override
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
#define MAX_DROPCAP_CHARS
#define OOO_STRING_SVTOOLS_HTML_tabledata
SvxCSS1LengthType m_eHeightType
SvxCSS1SizeType m_eSizeType
const SfxPoolItem * NextItem()
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
static LanguageType convertToLanguageTypeWithFallback(const OUString &rBcp47)
SvxGraphicPosition GetGraphicPos() const
const SwCharFormat * GetDfltCharFormat() const
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
void GetMarginsFromContext(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent, bool bIgnoreCurrent=false) const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
virtual void SetDfltEncoding(rtl_TextEncoding eEnc) override
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
rtl_TextEncoding GetCharSet() const
void SetLandscape(bool bNew)
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
const HTMLAttrs & GetAttrs() const
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
bool FinishFileDownload(OUString &rStr)
SvxCSS1PageBreak m_ePageBreakAfter
void FillDropCap(SwFormatDrop &rDrop, SfxItemSet &rItemSet, const OUString *pName=nullptr)
SvxCSS1MapEntry * GetTag(const OUString &rTag)
HtmlTokenId GetHTMLToken(const OUString &rName)
void SetAllDistances(sal_uInt16 nNew)
SwHTMLParser const & m_rHTMLParser
#define OOO_STRING_SVTOOLS_HTML_sdfootnote
bool m_bBodyBackgroundSet
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
const OUString & GetStyleName() const
#define OOO_STRING_SVTOOLS_HTML_author
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
#define SAL_N_ELEMENTS(arr)
void InsertPage(const OUString &rPage, bool bPseudo, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
const Color & GetColor() const
Table of Contents - heading.
static void SetCharFormatAttrs(SwCharFormat *pCharFormat, SfxItemSet &rItemSet)
bool m_bLinkCharFormatsSet
static void SetFrameFormatAttrs(SfxItemSet &rItemSet, HtmlFrameFormatFlags nFlags, SfxItemSet &rFrameItemSet)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
void SetLinkCharFormats()
tools::Long GetTextLeft() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
std::deque< HTMLAttr * > HTMLAttrs
sal_uInt16 GetDepth() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
bool IsLRSpaceChanged() const
void EndContextAttrs(HTMLAttrContext *pContext)
const SwPosition * GetPoint() const
std::unique_ptr< SvxBrushItem > makePageDescBackground() const
std::vector< SwTextFormatColl * >::size_type size_type
const SwPageDesc * GetLeftPageDesc(bool bCreate=false)
const SwPageDesc & GetPageDesc(const size_t i) const
bool GetLandscape() const
#define OOO_STRING_SVTOOLS_HTML_language
#define OOO_STRING_SVTOOLS_HTML_person
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
static void AddClassName(OUString &rFormatName, std::u16string_view rClass)
const SwPageDesc * GetRightPageDesc(bool bCreate=false)
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
SwCharFormat * GetChrFormat(HtmlTokenId nToken, const OUString &rClass) const
size_t GetPageDescCnt() const
std::unique_ptr< HTMLAttrContext > PopContext(HtmlTokenId nToken=HtmlTokenId::NONE)
void InsertClass(const OUString &rClass, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
#define LANGUAGE_DONTKNOW
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
SvxCSS1Position m_ePosition
short GetTextFirstLineOffset() const
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
void SetPageDescAttrs(const SvxBrushItem *pBrush, SfxItemSet *pItemSet=nullptr)
SwCSS1Parser(SwDoc *pDoc, SwHTMLParser const &rParser, sal_uInt32 const aFHeight[7], const OUString &rBaseURL, bool bNewDoc)
#define OOO_STRING_SVTOOLS_HTML_shortquote
static void lcl_swcss1_setEncoding(SwFormat &rFormat, rtl_TextEncoding eEnc)
SvStream & WriteStream(SvStream &rStream)
void InsertParaAttrs(const SfxItemSet &rItemSet)
Frame cannot be moved in Var-direction.
void GetMargins(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent) const
#define OOO_STRING_SVTOOLS_HTML_deletedtext
SwCharFormat * GetCharFormatFromPool(sal_uInt16 nPoolId) const
virtual const FontList * GetFontList() const override
#define OOO_STRING_SVTOOLS_HTML_acronym
SvxCSS1MapEntry * GetPage(const OUString &rPage, bool bPseudo)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
const SwNumFormat & Get(sal_uInt16 i) const
const sal_uInt16 USER_FMT
POLLCOLL-groups:
const OUString & GetFamilyName() const
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
SwFrameFormat & GetMaster()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId, -HlpId can be prevented.
bool IsULSpaceChanged() const
SvxCSS1LengthType m_eWidthType
const CSS1Selector * GetNext() const
constexpr TypedWhichId< SvxOrphansItem > RES_PARATR_ORPHANS(66)
const SwCharFormats * GetCharFormats() const
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
void ChgPageDesc(const SwPageDesc *pPageDesc, const SwPageDesc &rNewPageDesc)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
const char *const sCSS_mimetype
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
static void RemoveScriptItems(SfxItemSet &rItemSet, Css1ScriptFlags nScript, const SfxItemSet *pParentItemSet=nullptr)
#define OOO_STRING_SVTOOLS_HTML_sdendnote
#define OOO_STRING_SVTOOLS_HTML_sdendnote_sym
const SwTextFormatColls * GetTextFormatColls() const
static void SetTextCollAttrs(SwTextFormatColl *pColl, SfxItemSet &rItemSet, SvxCSS1PropertyInfo const &rPropInfo, SwCSS1Parser *pCSS1Parser)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
::std::vector< HTMLOption > HTMLOptions
bool m_bTableHeaderTextCollSet
void GetULSpaceFromContext(sal_uInt16 &rUpper, sal_uInt16 &rLower) const
sal_Int32 GetIndex() const
SwHTMLNumRuleInfo & GetNumInfo()
const SwPageDesc * GetPageDesc(sal_uInt16 nPoolId, bool bCreate)
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
bool EndAttr(HTMLAttr *pAttr, bool bChkEmpty=true)
#define MAX_DROPCAP_LINES
#define OOO_STRING_SVTOOLS_HTML_parabreak
HTMLAttr ** GetAttrTabEntry(sal_uInt16 nWhich)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
static void SetVarSize(SvxCSS1PropertyInfo const &rPropInfo, SfxItemSet &rFlyItemSet, SwTwips nDfltWidth=MINLAY, sal_uInt8 nDefaultPercentWidth=0)
void SetTableTextColl(bool bHeader)
bool swhtml_css1atr_equalFontItems(const SfxPoolItem &r1, const SfxPoolItem &r2)
size_t m_nContextStAttrMin
CSS1SelectorType GetType() const
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
SwMoveFnCollection const & fnMoveBackward
const SwStartNode * FindFlyStartNode() const
#define SAL_WARN(area, stream)
static CSS1SelectorType GetTokenAndClass(const CSS1Selector *pSelector, OUString &rToken, OUString &rClass, Css1ScriptFlags &rScriptFlags)
void GetMarginsFromContextWithNumberBullet(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent) const
void InsertTag(const OUString &rTag, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
bool SetFormatBreak(SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rPropInfo)
std::shared_ptr< HTMLAttrTable > m_xAttrTab
const FontList * GetFontList() const
const SfxItemSet & GetItemSet() const
void InsertId(const OUString &rId, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
const sal_uInt16 aItemIds[]
#define OOO_STRING_SVTOOLS_HTML_abbreviation
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
SwViewShell * CallStartAction(SwViewShell *pVSh=nullptr, bool bChkPtr=true)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
rtl::Reference< SwDoc > m_xDoc
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
const SvxCSS1MapEntry * GetClass(const OUString &rClass) const
#define OOO_STRING_SVTOOLS_HTML_anchor
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxWidowsItem > RES_PARATR_WIDOWS(67)
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
virtual void StyleParsed(const CSS1Selector *pSelector, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo) override
static bool MayBePositioned(const SvxCSS1PropertyInfo &rPropInfo, bool bAutoWidth=false)
const SfxPoolItem * GetCurItem() const
sal_uInt16 GetUpper() const
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)