25#include <editeng/editids.hrc>
48#include <osl/diagnose.h>
68#define MAX_DROPCAP_LINES 9
69#define MAX_DROPCAP_CHARS 9
86 OSL_ENSURE( found,
"style not found" );
92 const sal_uInt32 aFHeights[7],
const OUString& rBaseURL,
bool const bNewDoc)
96 , m_rHTMLParser(rParser)
98 m_bIsNewDoc( bNewDoc ),
99 m_bBodyBGColorSet( false ),
100 m_bBodyBackgroundSet( false ),
101 m_bBodyTextSet( false ),
102 m_bBodyLinkSet( false ),
103 m_bBodyVLinkSet( false ),
104 m_bSetFirstPageDesc( false ),
105 m_bSetRightPageDesc( false ),
106 m_bTableHeaderTextCollSet( false ),
107 m_bTableTextCollSet( false ),
108 m_bLinkCharFormatsSet( false )
129 bool bSetKeep =
false, bSetBreak =
false, bSetPageDesc =
false;
134 eBreak = SvxBreak::PageBefore;
146 bSetBreak = bSetPageDesc =
true;
157 eBreak = SvxBreak::PageAfter;
161 bSetBreak = bSetKeep = bSetPageDesc =
true;
164 bKeep = bSetKeep =
true;
184 for(
auto const &
i : aWhichIds)
187 if( pItem && pItem->
GetProp() != 100)
220 SwCharFormat *pUnvisited =
nullptr, *pVisited =
nullptr;
237 pStyleEntry =
GetTag( sTmp );
251 pStyleEntry =
GetTag( sTmp );
292 rItemSet.
Put( aULItem );
297 for(
auto const &
i : aWhichIds)
300 if( pItem && pItem->
GetProp() != 100)
315 "Call SetTableTextColl unnecessary" );
342 pStyleEntry =
GetTag( sTmp );
360 std::shared_ptr<SvxBrushItem> aBrushItem(std::make_shared<SvxBrushItem>(
RES_BACKGROUND));
361 std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(
RES_BOX));
362 std::shared_ptr<SvxFrameDirectionItem> aFrameDirItem(std::make_shared<SvxFrameDirectionItem>(SvxFrameDirection::Environment,
RES_FRAMEDIR));
363 bool bSetBrush = pBrush!=
nullptr, bSetBox =
false, bSetFrameDir =
false;
365 aBrushItem.reset(pBrush->
Clone());
372 aBrushItem.reset(pItem->Clone());
380 aBoxItem.reset(pItem->Clone());
388 aFrameDirItem.reset(pItem->Clone());
394 if( !(bSetBrush || bSetBox || bSetFrameDir) )
399 for(sal_uInt16
i : aPoolIds)
429 bool bChanged =
false;
432 ::std::optional<SvxLRSpaceItem> oLRSpace;
443 oLRSpace.emplace(*pPageItem);
450 oLRSpace->SetLeft(pLeft->GetTextLeft());
462 oLRSpace.emplace(*pPageItem);
469 oLRSpace->SetRight(pRight->GetRight());
557 sal_Int32 nLen = rClass.getLength();
558 sal_Int32
nPos = nLen > 4 ? rClass.lastIndexOf(
'-' ) : -1;
575 if( rClass.matchIgnoreAsciiCase(
"cjk",
nPos ) )
579 else if( rClass.matchIgnoreAsciiCase(
"ctl",
nPos ) )
585 if( rClass.matchIgnoreAsciiCase(
"western",
nPos ) )
595 rClass = rClass.copy( 0,
nPos-1 );
607 OUString& rToken, OUString& rClass,
617 sal_Int32
nPos = rToken.indexOf(
'.' );
618 OSL_ENSURE(
nPos >= 0,
"No dot in Class-Selector???" );
621 rClass = rToken.copy(
nPos+1 );
622 rToken = rToken.copy( 0,
nPos );
625 if( rClass.isEmpty() )
630 rToken = rToken.toAsciiLowerCase();
637 static const sal_uInt16 aWhichIds[3][5] =
647 bool aClearItems[3] = {
false,
false,
false };
651 aClearItems[1] = aClearItems[2] =
true;
654 aClearItems[0] = aClearItems[2] =
true;
657 aClearItems[0] = aClearItems[1] =
true;
662 OSL_ENSURE( aClearItems[0],
"unknown script type" );
670 sal_uInt16 nWhich = aWhichIds[j][
i];
672 if( aClearItems[j] ||
674 SfxItemState::SET == rItemSet.
GetItemState( nWhich,
false, &pItem ) &&
676 : *pItem == pParentItemSet->Get(nWhich ) ) ) )
700 OUString aClass( pSelector->
GetString() );
717 (pNext->
GetString().equalsIgnoreAsciiCase(
"left" ) ||
718 pNext->
GetString().equalsIgnoreAsciiCase(
"right" ) ||
719 pNext->
GetString().equalsIgnoreAsciiCase(
"first" ) ) ) )
726 rItemSet, rPropInfo );
750 case HtmlTokenId::ANCHOR_ON:
753 InsertTag( aToken2, rItemSet, rPropInfo );
761 aPseudo = aPseudo.toAsciiLowerCase();
762 bool bInsert =
false;
766 if( aPseudo ==
"link" )
772 if( aPseudo ==
"visited" )
780 OUString sTmp = aToken2 +
":" + aPseudo;
785 InsertTag( sTmp, aScriptItemSet, rPropInfo );
795 case HtmlTokenId::BODY_ON:
807 if(
GPOS_NONE != pBrushItem->GetGraphicPos() )
824 rItemSet, rPropInfo,
this );
833 !pNext && aClass.getLength() >= 9 &&
834 (
's' == aClass[0] ||
'S' == aClass[0]) )
836 sal_uInt16 nPoolFormatId = 0;
859 sal_uInt16 nPoolCollId = 0;
862 case HtmlTokenId::HEAD1_ON:
865 case HtmlTokenId::HEAD2_ON:
868 case HtmlTokenId::HEAD3_ON:
871 case HtmlTokenId::HEAD4_ON:
874 case HtmlTokenId::HEAD5_ON:
877 case HtmlTokenId::HEAD6_ON:
880 case HtmlTokenId::PARABREAK_ON:
881 if( aClass.getLength() >= 9 &&
882 (
's' == aClass[0] ||
'S' == aClass[0]) )
899 case HtmlTokenId::ADDRESS_ON:
902 case HtmlTokenId::BLOCKQUOTE_ON:
905 case HtmlTokenId::DT_ON:
908 case HtmlTokenId::DD_ON:
911 case HtmlTokenId::PREFORMTXT_ON:
914 case HtmlTokenId::TABLEHEADER_ON:
915 case HtmlTokenId::TABLEDATA_ON:
918 InsertTag( aToken2, rItemSet, rPropInfo );
926 OUString aSubToken, aSubClass;
928 if( HtmlTokenId::PARABREAK_ON ==
GetHTMLToken( aSubToken ) )
934 if( !aClass.isEmpty() || pNext )
936 nPoolCollId =
static_cast< sal_uInt16
>(
952 InsertTag( sTmp, aScriptItemSet, rPropInfo );
969 pNext->
GetString().equalsIgnoreAsciiCase(
"first-letter" ) &&
970 SvxAdjust::Left == rPropInfo.
m_eFloat) )
977 if( !aClass.isEmpty() )
1001 pParentColl ? &pParentColl->
GetAttrSet() :
nullptr );
1050 (SvxAdjust::Left == rPropInfo.
m_eFloat ||
1071 if( !aClass.isEmpty() )
1075 pParentCFormat = pCFormat;
1093 pParentCFormat ? &pParentCFormat->
GetAttrSet() :
nullptr );
1121 sal_uInt16 nPoolId = 0;
1122 const char*
sName =
nullptr;
1147 if( !nPoolId && !
sName )
1158 OUString sCName( OUString::createFromAscii(
sName) );
1167 OSL_ENSURE( pCFormat,
"No character style???" );
1171 OUString aClass( rClass );
1173 if( !aClass.isEmpty() )
1175 OUString aTmp( pCFormat->
GetName() );
1180 pCFormat = pClassCFormat;
1234 const OUString& rClass )
1238 OUString aClass( rClass );
1241 (
's' == aClass[0] ||
'S' == aClass[0] ) )
1257 OSL_ENSURE(
false,
"Where does the user style comes from?" );
1265 OSL_ENSURE( pColl,
"No paragraph style???" );
1266 if( !aClass.isEmpty() )
1268 OUString aTmp( pColl->
GetName() );
1323 for (nPage=0; nPage < nPageDescs &&
1324 pDoc->
GetPageDesc(nPage).GetPoolFormatId() != nPoolId; ++nPage)
1327 return nPage < nPageDescs ? &pDoc->
GetPageDesc(nPage) :
nullptr;
1336 if( !pPageDesc && bCreate )
1340 SAL_WARN(
"sw.html",
"no creating PageDesc while reading header/footer");
1348 if( !pMasterPageDesc )
1353 getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId,
false );
1362 bool bSetFollowFollow =
false;
1370 pFollow = pMasterPageDesc;
1385 bSetFollowFollow =
true;
1388 if( pFirstPageDesc )
1390 SwPageDesc aNewFirstPageDesc( *pFirstPageDesc );
1391 aNewFirstPageDesc.
SetFollow( pNewPageDesc );
1404 if( bSetFollowFollow )
1407 aNewFollowPageDesc.
SetFollow( pNewPageDesc );
1411 pPageDesc = pNewPageDesc;
1443 ( SvxAdjust::End != rPropInfo.
m_eFloat ) ) &&
1451 OSL_ENSURE( !rClass.empty(),
"Style class without length?" );
1453 rFormatName += OUString::Concat(
".") + rClass;
1458 const OUString *pName )
1465 sal_uInt16 nProp = pFontHeightItem->GetProp();
1466 nLines =
static_cast<sal_uInt8>((nProp + 50) / 100);
1492 rDrop.
GetDistance() =
static_cast<sal_uInt16
>(pRightMargin->GetRight());
1499 if( !rItemSet.
Count() )
1513 aName =
"first-letter " + OUString::number(
static_cast<sal_Int32
>(++
m_nDropCapCnt) );
1670 for (
size_t i = rOptions2.size();
i; )
1673 if( HtmlOptionId::TYPE == rOption.
GetToken() )
1698 SfxMedium aDLMedium( rURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE );
1706 rStr = OUString(
static_cast<const char *
>(aStream.
GetData()), aStream.
TellEnd(),
1711 if( (
m_xDoc->GetDocShell() &&
m_xDoc->GetDocShell()->IsAbortingImport() )
1712 || 1 ==
m_xDoc->getReferenceCount() )
1715 eState = SvParserState::Error;
1721 OSL_ENSURE( pOldVSh == pVSh,
"FileDownload: SwViewShell changed on us" );
1723 return pStream!=
nullptr;
1728 bool bFinishDownload =
false;
1732 "Pending-Stack without File-Download?" );
1735 assert(
m_vPendingStack.empty() &&
"Where does the Pending-Stack come from?" );
1737 bFinishDownload =
true;
1741 OUString sRel, sHRef,
sType;
1744 for (
size_t i = rOptions2.size();
i; )
1749 case HtmlOptionId::REL:
1752 case HtmlOptionId::HREF:
1755 case HtmlOptionId::TYPE:
1762 if( !sHRef.isEmpty() && sRel.equalsIgnoreAsciiCase(
"STYLESHEET" ) &&
1763 (
sType.isEmpty() ||
1770 if( IsParserWorking() )
1773 bFinishDownload =
true;
1793 if( bFinishDownload )
1829 pPageEntry =
GetPage(
"first",
true );
1837 pPageEntry =
GetPage(
"right",
true );
1845 pPageEntry =
GetPage(
"left",
true );
1854 const OUString &rId,
1855 const OUString &rClass,
1858 const OUString *pLang,
1859 const OUString *pDir )
1863 if( !rClass.isEmpty() )
1865 OUString aClass( rClass );
1872 rItemSet, rPropInfo,
false );
1877 if( !rId.isEmpty() )
1883 rItemSet, rPropInfo, !rClass.isEmpty() );
1884 rPropInfo.
m_aId = rId;
1888 if( !rStyle.isEmpty() )
1890 m_pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
1897 if( pLang && !pLang->isEmpty() )
1903 rItemSet.
Put( aLang );
1905 rItemSet.
Put( aLang );
1907 rItemSet.
Put( aLang );
1912 if( pDir && !pDir->isEmpty() )
1914 OUString aValue( *pDir );
1916 if (aValue.equalsIgnoreAsciiCase(
"LTR"))
1917 eDir = SvxFrameDirection::Horizontal_LR_TB;
1918 else if (aValue.equalsIgnoreAsciiCase(
"RTL"))
1919 eDir = SvxFrameDirection::Horizontal_RL_TB;
1921 if( SvxFrameDirection::Environment != eDir )
1924 rItemSet.
Put( aDir );
1940 sal_Int16 eHoriRel = text::RelOrientation::FRAME;
1941 sal_Int16 eVertRel = text::RelOrientation::FRAME;
1942 SwTwips nHoriPos = 0, nVertPos = 0;
1943 css::text::WrapTextMode eSurround = css::text::WrapTextMode_THROUGH;
1955 aAnchor.
SetType( RndStdIds::FLY_AT_FLY );
1961 aAnchor.
SetType( RndStdIds::FLY_AT_PAGE );
1965 nVertPos = rPropInfo.
m_nTop;
1969 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
1971 eVertOri = text::VertOrientation::TOP;
1972 eVertRel = text::RelOrientation::CHAR;
1976 eHoriRel = text::RelOrientation::PAGE_FRAME;
1981 eHoriOri = text::HoriOrientation::LEFT;
1982 eHoriRel = text::RelOrientation::FRAME;
1995 aAnchor.
SetType( RndStdIds::FLY_AT_CHAR );
1997 eVertOri = text::VertOrientation::CHAR_BOTTOM;
1998 eVertRel = text::RelOrientation::CHAR;
2002 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
2003 eVertOri = text::VertOrientation::TOP;
2004 eVertRel = text::RelOrientation::PRINT_AREA;
2012 sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
2016 if( SvxAdjust::Right==rPropInfo.
m_eFloat )
2018 eHoriOri = text::HoriOrientation::RIGHT;
2019 eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2020 eSurround = css::text::WrapTextMode_LEFT;
2024 eHoriOri = text::HoriOrientation::LEFT;
2025 eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2026 eSurround = css::text::WrapTextMode_RIGHT;
2029 rFrameItemSet.
Put( aAnchor );
2042 sal_uInt8 nPercentWidth = nDfltPrcWidth, nPercentHeight = 0;
2073 rFrameItemSet.
Put( aFrameSize );
2089 rFrameItemSet.
Put( aBoxItem );
2093 rFrameItemSet.
Put( *pBoxItem );
2102 rFrameItemSet.
Put( *pBrushItem );
2110 rFrameItemSet.
Put( *pFrameDirectionItem );
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 nDefaultColl = 0;
2200 OUString aDefaultClass;
2211 else if (!nDefaultColl)
2215 aDefaultClass = pCntxt->
GetClass();
2223 m_pCSS1Parser->GetTextFormatColl(nDefaultColl, aDefaultClass);
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 )
2281 for (
auto const &
i : aWhichIds)
2286 if (RTL_TEXTENCODING_SYMBOL == pFontItem->
GetCharSet())
2307 for(sal_uInt16
i : aWhichIds)
CSS1SelectorType GetType() const
const OUString & GetString() const
const CSS1Selector * GetNext() const
const HTMLAttrs & GetAttrs() const
sal_uInt16 GetDefaultTextFormatColl() const
void GetULSpace(sal_uInt16 &rUpper, sal_uInt16 &rLower) const
bool IsULSpaceChanged() const
bool IsLRSpaceChanged() const
const OUString & GetClass() const
void GetMargins(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent) const
HtmlOptionId GetToken() const
const OUString & GetString() const
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.
static LanguageType convertToLanguageTypeWithFallback(const OUString &rBcp47)
void StartFileDownload(const OUString &rURL)
bool ShouldFinishFileDownload() const
bool FinishFileDownload(OUString &rStr)
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
virtual sal_uInt64 TellEnd() override
SvStream & WriteStream(SvStream &rStream)
void SetAllDistances(sal_Int16 nNew)
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
const SvxCSS1PropertyInfo & GetPropertyInfo() const
const SfxItemSet & GetItemSet() const
void InsertPage(const OUString &rPage, bool bPseudo, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
void InsertId(const OUString &rId, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
SvxCSS1MapEntry * GetTag(const OUString &rTag)
virtual void SetDfltEncoding(rtl_TextEncoding eEnc)
rtl_TextEncoding GetDfltEncoding() const
void InsertClass(const OUString &rClass, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
static void MergeStyles(const SfxItemSet &rSrcSet, const SvxCSS1PropertyInfo &rSrcInfo, SfxItemSet &rTargetSet, SvxCSS1PropertyInfo &rTargetInfo, bool bSmart)
const SvxCSS1MapEntry * GetClass(const OUString &rClass) const
SvxCSS1MapEntry * GetPage(const OUString &rPage, bool bPseudo)
void InsertTag(const OUString &rTag, const SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rProp)
SvxCSS1PageBreak m_ePageBreakBefore
void SetBoxItem(SfxItemSet &rItemSet, sal_uInt16 nMinBorderDist, const SvxBoxItem *pDflt=nullptr)
SvxCSS1PageBreak m_ePageBreakAfter
SvxCSS1SizeType m_eSizeType
SvxCSS1LengthType m_eHeightType
SvxCSS1Position m_ePosition
SvxCSS1LengthType m_eWidthType
SvxCSS1LengthType m_eTopType
SvxCSS1LengthType m_eLeftType
sal_uInt16 GetProp() const
FontFamily GetFamily() const
FontPitch GetPitch() const
const OUString & GetStyleName() const
rtl_TextEncoding GetCharSet() const
const OUString & GetFamilyName() const
const FontList * GetFontList() const
tools::Long GetHeight() const
tools::Long GetWidth() const
void SetHeight(tools::Long n)
void SetWidth(tools::Long n)
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
virtual sal_uInt32 GetFontHeight(sal_uInt16 nSize) const override
const SwPageDesc * GetPageDesc(sal_uInt16 nPoolId, bool bCreate)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nPoolId) const
bool SetFormatBreak(SfxItemSet &rItemSet, const SvxCSS1PropertyInfo &rPropInfo)
SwTextFormatColl * GetTextFormatColl(sal_uInt16 nTextColl, const OUString &rClass)
bool m_bLinkCharFormatsSet
const SwPageDesc * GetRightPageDesc(bool bCreate=false)
virtual void SetDfltEncoding(rtl_TextEncoding eEnc) override
sal_uLong m_aFontHeights[7]
SwPageDesc * GetMasterPageDesc()
void ChgPageDesc(const SwPageDesc *pPageDesc, const SwPageDesc &rNewPageDesc)
SwCharFormat * GetChrFormat(HtmlTokenId nToken, const OUString &rClass) const
const SwPageDesc * GetFirstPageDesc(bool bCreate=false)
SwHTMLParser const & m_rHTMLParser
static Css1ScriptFlags GetScriptFromClass(OUString &rClass, bool bSubClassOnly=true)
void FillDropCap(SwFormatDrop &rDrop, SfxItemSet &rItemSet, const OUString *pName=nullptr)
virtual const FontList * GetFontList() const override
SwCSS1Parser(SwDoc *pDoc, SwHTMLParser const &rParser, sal_uInt32 const aFHeight[7], const OUString &rBaseURL, bool bNewDoc)
static void AddClassName(OUString &rFormatName, std::u16string_view rClass)
virtual void StyleParsed(const CSS1Selector *pSelector, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo) override
const SwPageDesc * GetLeftPageDesc(bool bCreate=false)
void SetLinkCharFormats()
std::unique_ptr< SvxBrushItem > makePageDescBackground() const
void SetTableTextColl(bool bHeader)
void SetPageDescAttrs(const SvxBrushItem *pBrush, SfxItemSet *pItemSet=nullptr)
static bool MayBePositioned(const SvxCSS1PropertyInfo &rPropInfo, bool bAutoWidth=false)
bool m_bTableHeaderTextCollSet
virtual ~SwCSS1Parser() override
SwCharFormat * GetCharFormatFromPool(sal_uInt16 nPoolId) const
bool m_bBodyBackgroundSet
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId,...
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
const SwCharFormat * GetDfltCharFormat() const
size_t GetPageDescCnt() const
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
SwCharFormat * FindCharFormatByName(const OUString &rName) const
const SwCharFormats * GetCharFormats() const
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
const SwTextFormatColls * GetTextFormatColls() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
SwDocShell * GetDocShell()
const SwPageDesc & GetPageDesc(const size_t i) const
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
sal_uInt16 GetDepth() const
size_t m_nContextStAttrMin
std::unique_ptr< HTMLAttrContext > PopContext(HtmlTokenId nToken=HtmlTokenId::NONE)
void SetAnchorAndAdjustment(sal_Int16 eVertOri, sal_Int16 eHoriOri, const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrameSet)
HTMLAttrContexts m_aContexts
std::shared_ptr< HTMLAttrTable > m_xAttrTab
void EndContextAttrs(HTMLAttrContext *pContext)
SwViewShell * CallStartAction(SwViewShell *pVSh=nullptr, bool bChkPtr=true)
HTMLAttr ** GetAttrTabEntry(sal_uInt16 nWhich)
SwHTMLNumRuleInfo & GetNumInfo()
void NewAttr(const std::shared_ptr< HTMLAttrTable > &rAttrTab, HTMLAttr **ppAttr, const SfxPoolItem &rItem)
rtl::Reference< SwDoc > m_xDoc
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
bool IsReadingHeaderOrFooter() const
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
std::vector< SwPending > m_vPendingStack
void InsertParaAttrs(const SfxItemSet &rItemSet)
void GetMarginsFromContext(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent, bool bIgnoreCurrent=false) const
void GetMarginsFromContextWithNumberBullet(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent) const
static void SetFrameFormatAttrs(SfxItemSet &rItemSet, HtmlFrameFormatFlags nFlags, SfxItemSet &rFrameItemSet)
bool EndAttr(HTMLAttr *pAttr, bool bChkEmpty=true)
bool FileDownload(const OUString &rURL, OUString &rStr)
void GetULSpaceFromContext(sal_uInt16 &rUpper, sal_uInt16 &rLower) const
static void SetVarSize(SvxCSS1PropertyInfo const &rPropInfo, SfxItemSet &rFlyItemSet, SwTwips nDfltWidth=MINLAY, sal_uInt8 nDefaultPercentWidth=0)
SwViewShell * CallEndAction(bool bChkAction=false, bool bChkPtr=true)
const SwStartNode * FindFlyStartNode() const
const SwNumFormat & Get(sal_uInt16 i) const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
void SetFollow(const SwPageDesc *pNew)
SwFrameFormat & GetMaster()
bool GetLandscape() const
void SetLandscape(bool bNew)
Starts a section of nodes in the document model.
Represents the style of a paragraph.
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
std::vector< SwTextFormatColl * >::size_type size_type
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
bool swhtml_css1atr_equalFontItems(const SfxPoolItem &r1, const SfxPoolItem &r2)
constexpr std::string_view sCSS_mimetype
@ Fixed
Frame cannot be moved in Var-direction.
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(116)
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 sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
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< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
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< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SvxOrphansItem > RES_PARATR_ORPHANS(66)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxBlinkItem > RES_CHRATR_BLINK(18)
constexpr TypedWhichId< SvxWidowsItem > RES_PARATR_WIDOWS(67)
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< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
static void SetTextCollAttrs(SwTextFormatColl *pColl, SfxItemSet &rItemSet, SvxCSS1PropertyInfo const &rPropInfo, SwCSS1Parser *pCSS1Parser)
static void lcl_swcss1_setEncoding(SwFormat &rFormat, rtl_TextEncoding eEnc)
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
static void SetCharFormatAttrs(SwCharFormat *pCharFormat, SfxItemSet &rItemSet)
const sal_uInt16 aItemIds[]
#define MAX_DROPCAP_CHARS
static CSS1SelectorType GetTokenAndClass(const CSS1Selector *pSelector, OUString &rToken, OUString &rClass, Css1ScriptFlags &rScriptFlags)
static void RemoveScriptItems(SfxItemSet &rItemSet, Css1ScriptFlags nScript, const SfxItemSet *pParentItemSet=nullptr)
#define MAX_DROPCAP_LINES
#define OOO_STRING_SVTOOLS_HTML_parabreak
#define OOO_STRING_SVTOOLS_HTML_shortquote
#define OOO_STRING_SVTOOLS_HTML_abbreviation
#define OOO_STRING_SVTOOLS_HTML_tabledata
#define OOO_STRING_SVTOOLS_HTML_tableheader
#define OOO_STRING_SVTOOLS_HTML_deletedtext
#define OOO_STRING_SVTOOLS_HTML_sdendnote_sym
#define OOO_STRING_SVTOOLS_HTML_anchor
#define OOO_STRING_SVTOOLS_HTML_acronym
#define OOO_STRING_SVTOOLS_HTML_insertedtext
#define OOO_STRING_SVTOOLS_HTML_sdendnote
#define OOO_STRING_SVTOOLS_HTML_person
#define OOO_STRING_SVTOOLS_HTML_author
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_sym
#define OOO_STRING_SVTOOLS_HTML_sdfootnote
#define OOO_STRING_SVTOOLS_HTML_language
SVT_DLLPUBLIC HtmlTokenId GetHTMLToken(std::u16string_view rName)
#define LANGUAGE_DONTKNOW
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
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)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
bool equalsAscii(std::u16string_view s1, std::string_view s2)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
@ CSS1_SELTYPE_ELEM_CLASS
::std::vector< HTMLOption > HTMLOptions
@ RES_POOLCOLL_HEADLINE5
Heading 5.
@ RES_POOLCOLL_TEXT
Text body.
@ RES_POOLCOLL_STANDARD
Standard.
@ RES_POOLCOLL_HEADLINE6
Heading 6.
@ RES_POOLCOLL_HTML_BLOCKQUOTE
@ RES_POOLCOLL_TABLE
Subgroup table.
@ RES_POOLCOLL_SEND_ADDRESS
Sender.
@ RES_POOLCOLL_HEADLINE2
Heading 2.
@ RES_POOLCOLL_HEADLINE4
Heading 4.
@ RES_POOLCOLL_FOOTNOTE
Footnotes.
@ RES_POOLCOLL_HEADLINE1
Heading 1.
@ RES_POOLCOLL_TABLE_HDLN
Table of Contents - heading.
@ RES_POOLCOLL_HEADLINE3
Heading 3.
@ RES_POOLCOLL_ENDNOTE
Endnotes.
@ RES_POOLPAGE_LEFT
Left page.
@ RES_POOLPAGE_FIRST
First page.
@ RES_POOLPAGE_RIGHT
Right page.
@ RES_POOLCHR_HTML_TELETYPE
@ RES_POOLCHR_INET_VISIT
Internet visited.
@ RES_POOLCHR_HTML_SAMPLE
@ RES_POOLCHR_HTML_CITATION
@ RES_POOLCHR_FOOTNOTE
Footnote.
@ RES_POOLCHR_HTML_EMPHASIS
@ RES_POOLCHR_ENDNOTE
Endnote.
@ RES_POOLCHR_INET_NORMAL
Internet normal.
@ RES_POOLCHR_HTML_KEYBOARD
@ RES_POOLCHR_HTML_STRONG
@ RES_POOLCHR_HTML_DEFINSTANCE
@ RES_POOLCHR_HTML_VARIABLE
const sal_uInt16 USER_FMT
POLLCOLL-groups:
Marks a position in the document model.
sal_Int32 GetContentIndex() const
@ SVX_CSS1_STYPE_LANDSCAPE
@ SVX_CSS1_STYPE_PORTRAIT
@ SVX_CSS1_LTYPE_PERCENTAGE
std::deque< HTMLAttr * > HTMLAttrs
constexpr SwTwips MIN_BORDER_DIST
constexpr sal_uInt8 MAXLEVEL