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 );
290 rItemSet.
Put( aLRItem );
307 rItemSet.
Put( aULItem );
312 for(
auto const &
i : aWhichIds)
315 if( pItem && pItem->
GetProp() != 100)
330 "Call SetTableTextColl unnecessary" );
357 pStyleEntry =
GetTag( sTmp );
375 std::shared_ptr<SvxBrushItem> aBrushItem(std::make_shared<SvxBrushItem>(
RES_BACKGROUND));
376 std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(
RES_BOX));
377 std::shared_ptr<SvxFrameDirectionItem> aFrameDirItem(std::make_shared<SvxFrameDirectionItem>(SvxFrameDirection::Environment,
RES_FRAMEDIR));
378 bool bSetBrush = pBrush!=
nullptr, bSetBox =
false, bSetFrameDir =
false;
380 aBrushItem.reset(pBrush->
Clone());
387 aBrushItem.reset(pItem->Clone());
395 aBoxItem.reset(pItem->Clone());
403 aFrameDirItem.reset(pItem->Clone());
409 if( !(bSetBrush || bSetBox || bSetFrameDir) )
414 for(sal_uInt16
i : aPoolIds)
444 bool bChanged =
false;
549 sal_Int32 nLen = rClass.getLength();
550 sal_Int32
nPos = nLen > 4 ? rClass.lastIndexOf(
'-' ) : -1;
567 if( rClass.matchIgnoreAsciiCase(
"cjk",
nPos ) )
571 else if( rClass.matchIgnoreAsciiCase(
"ctl",
nPos ) )
577 if( rClass.matchIgnoreAsciiCase(
"western",
nPos ) )
587 rClass = rClass.copy( 0,
nPos-1 );
599 OUString& rToken, OUString& rClass,
609 sal_Int32
nPos = rToken.indexOf(
'.' );
610 OSL_ENSURE(
nPos >= 0,
"No dot in Class-Selector???" );
613 rClass = rToken.copy(
nPos+1 );
614 rToken = rToken.copy( 0,
nPos );
617 if( rClass.isEmpty() )
622 rToken = rToken.toAsciiLowerCase();
629 static const sal_uInt16 aWhichIds[3][5] =
639 bool aClearItems[3] = {
false,
false,
false };
643 aClearItems[1] = aClearItems[2] =
true;
646 aClearItems[0] = aClearItems[2] =
true;
649 aClearItems[0] = aClearItems[1] =
true;
654 OSL_ENSURE( aClearItems[0],
"unknown script type" );
662 sal_uInt16 nWhich = aWhichIds[j][
i];
664 if( aClearItems[j] ||
666 SfxItemState::SET == rItemSet.
GetItemState( nWhich,
false, &pItem ) &&
668 : *pItem == pParentItemSet->Get(nWhich ) ) ) )
692 OUString aClass( pSelector->
GetString() );
709 (pNext->
GetString().equalsIgnoreAsciiCase(
"left" ) ||
710 pNext->
GetString().equalsIgnoreAsciiCase(
"right" ) ||
711 pNext->
GetString().equalsIgnoreAsciiCase(
"first" ) ) ) )
718 rItemSet, rPropInfo );
742 case HtmlTokenId::ANCHOR_ON:
745 InsertTag( aToken2, rItemSet, rPropInfo );
753 aPseudo = aPseudo.toAsciiLowerCase();
754 bool bInsert =
false;
758 if( aPseudo ==
"link" )
764 if( aPseudo ==
"visited" )
772 OUString sTmp = aToken2 +
":" + aPseudo;
777 InsertTag( sTmp, aScriptItemSet, rPropInfo );
787 case HtmlTokenId::BODY_ON:
799 if(
GPOS_NONE != pBrushItem->GetGraphicPos() )
816 rItemSet, rPropInfo,
this );
825 !pNext && aClass.getLength() >= 9 &&
826 (
's' == aClass[0] ||
'S' == aClass[0]) )
828 sal_uInt16 nPoolFormatId = 0;
851 sal_uInt16 nPoolCollId = 0;
854 case HtmlTokenId::HEAD1_ON:
857 case HtmlTokenId::HEAD2_ON:
860 case HtmlTokenId::HEAD3_ON:
863 case HtmlTokenId::HEAD4_ON:
866 case HtmlTokenId::HEAD5_ON:
869 case HtmlTokenId::HEAD6_ON:
872 case HtmlTokenId::PARABREAK_ON:
873 if( aClass.getLength() >= 9 &&
874 (
's' == aClass[0] ||
'S' == aClass[0]) )
891 case HtmlTokenId::ADDRESS_ON:
894 case HtmlTokenId::BLOCKQUOTE_ON:
897 case HtmlTokenId::DT_ON:
900 case HtmlTokenId::DD_ON:
903 case HtmlTokenId::PREFORMTXT_ON:
906 case HtmlTokenId::TABLEHEADER_ON:
907 case HtmlTokenId::TABLEDATA_ON:
910 InsertTag( aToken2, rItemSet, rPropInfo );
918 OUString aSubToken, aSubClass;
920 if( HtmlTokenId::PARABREAK_ON ==
GetHTMLToken( aSubToken ) )
926 if( !aClass.isEmpty() || pNext )
928 nPoolCollId =
static_cast< sal_uInt16
>(
944 InsertTag( sTmp, aScriptItemSet, rPropInfo );
961 pNext->
GetString().equalsIgnoreAsciiCase(
"first-letter" ) &&
962 SvxAdjust::Left == rPropInfo.
m_eFloat) )
969 if( !aClass.isEmpty() )
993 pParentColl ? &pParentColl->
GetAttrSet() :
nullptr );
1042 (SvxAdjust::Left == rPropInfo.
m_eFloat ||
1063 if( !aClass.isEmpty() )
1067 pParentCFormat = pCFormat;
1085 pParentCFormat ? &pParentCFormat->
GetAttrSet() :
nullptr );
1113 sal_uInt16 nPoolId = 0;
1114 const char*
sName =
nullptr;
1139 if( !nPoolId && !
sName )
1150 OUString sCName( OUString::createFromAscii(
sName) );
1159 OSL_ENSURE( pCFormat,
"No character style???" );
1163 OUString aClass( rClass );
1165 if( !aClass.isEmpty() )
1167 OUString aTmp( pCFormat->
GetName() );
1172 pCFormat = pClassCFormat;
1226 const OUString& rClass )
1230 OUString aClass( rClass );
1233 (
's' == aClass[0] ||
'S' == aClass[0] ) )
1249 OSL_ENSURE(
false,
"Where does the user style comes from?" );
1257 OSL_ENSURE( pColl,
"No paragraph style???" );
1258 if( !aClass.isEmpty() )
1260 OUString aTmp( pColl->
GetName() );
1315 for (nPage=0; nPage < nPageDescs &&
1316 pDoc->
GetPageDesc(nPage).GetPoolFormatId() != nPoolId; ++nPage)
1319 return nPage < nPageDescs ? &pDoc->
GetPageDesc(nPage) :
nullptr;
1328 if( !pPageDesc && bCreate )
1332 SAL_WARN(
"sw.html",
"no creating PageDesc while reading header/footer");
1340 if( !pMasterPageDesc )
1345 getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId,
false );
1354 bool bSetFollowFollow =
false;
1362 pFollow = pMasterPageDesc;
1377 bSetFollowFollow =
true;
1380 if( pFirstPageDesc )
1382 SwPageDesc aNewFirstPageDesc( *pFirstPageDesc );
1383 aNewFirstPageDesc.
SetFollow( pNewPageDesc );
1396 if( bSetFollowFollow )
1399 aNewFollowPageDesc.
SetFollow( pNewPageDesc );
1403 pPageDesc = pNewPageDesc;
1435 ( SvxAdjust::End != rPropInfo.
m_eFloat ) ) &&
1443 OSL_ENSURE( !rClass.empty(),
"Style class without length?" );
1445 rFormatName += OUString::Concat(
".") + rClass;
1450 const OUString *pName )
1457 sal_uInt16 nProp = pFontHeightItem->GetProp();
1458 nLines =
static_cast<sal_uInt8>((nProp + 50) / 100);
1485 pLRSpaceItem->GetRight() );
1490 if( !rItemSet.
Count() )
1504 aName =
"first-letter " + OUString::number(
static_cast<sal_Int32
>(++
m_nDropCapCnt) );
1655 for (
size_t i = rOptions2.size();
i; )
1658 if( HtmlOptionId::TYPE == rOption.
GetToken() )
1683 SfxMedium aDLMedium( rURL, StreamMode::READ | StreamMode::SHARE_DENYWRITE );
1691 rStr = OUString(
static_cast<const char *
>(aStream.
GetData()), aStream.
TellEnd(),
1696 if( (
m_xDoc->GetDocShell() &&
m_xDoc->GetDocShell()->IsAbortingImport() )
1697 || 1 ==
m_xDoc->getReferenceCount() )
1700 eState = SvParserState::Error;
1706 OSL_ENSURE( pOldVSh == pVSh,
"FileDownload: SwViewShell changed on us" );
1708 return pStream!=
nullptr;
1713 bool bFinishDownload =
false;
1717 "Pending-Stack without File-Download?" );
1720 assert(
m_vPendingStack.empty() &&
"Where does the Pending-Stack come from?" );
1722 bFinishDownload =
true;
1726 OUString sRel, sHRef,
sType;
1729 for (
size_t i = rOptions2.size();
i; )
1734 case HtmlOptionId::REL:
1737 case HtmlOptionId::HREF:
1740 case HtmlOptionId::TYPE:
1747 if( !sHRef.isEmpty() && sRel.equalsIgnoreAsciiCase(
"STYLESHEET" ) &&
1748 (
sType.isEmpty() ||
1755 if( IsParserWorking() )
1758 bFinishDownload =
true;
1778 if( bFinishDownload )
1814 pPageEntry =
GetPage(
"first",
true );
1822 pPageEntry =
GetPage(
"right",
true );
1830 pPageEntry =
GetPage(
"left",
true );
1839 const OUString &rId,
1840 const OUString &rClass,
1843 const OUString *pLang,
1844 const OUString *pDir )
1848 if( !rClass.isEmpty() )
1850 OUString aClass( rClass );
1857 rItemSet, rPropInfo,
false );
1862 if( !rId.isEmpty() )
1868 rItemSet, rPropInfo, !rClass.isEmpty() );
1869 rPropInfo.
m_aId = rId;
1873 if( !rStyle.isEmpty() )
1875 m_pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
1882 if( pLang && !pLang->isEmpty() )
1888 rItemSet.
Put( aLang );
1890 rItemSet.
Put( aLang );
1892 rItemSet.
Put( aLang );
1897 if( pDir && !pDir->isEmpty() )
1899 OUString aValue( *pDir );
1901 if (aValue.equalsIgnoreAsciiCase(
"LTR"))
1902 eDir = SvxFrameDirection::Horizontal_LR_TB;
1903 else if (aValue.equalsIgnoreAsciiCase(
"RTL"))
1904 eDir = SvxFrameDirection::Horizontal_RL_TB;
1906 if( SvxFrameDirection::Environment != eDir )
1909 rItemSet.
Put( aDir );
1925 sal_Int16 eHoriRel = text::RelOrientation::FRAME;
1926 sal_Int16 eVertRel = text::RelOrientation::FRAME;
1927 SwTwips nHoriPos = 0, nVertPos = 0;
1928 css::text::WrapTextMode eSurround = css::text::WrapTextMode_THROUGH;
1940 aAnchor.
SetType( RndStdIds::FLY_AT_FLY );
1946 aAnchor.
SetType( RndStdIds::FLY_AT_PAGE );
1950 nVertPos = rPropInfo.
m_nTop;
1954 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
1956 eVertOri = text::VertOrientation::TOP;
1957 eVertRel = text::RelOrientation::CHAR;
1961 eHoriRel = text::RelOrientation::PAGE_FRAME;
1966 eHoriOri = text::HoriOrientation::LEFT;
1967 eHoriRel = text::RelOrientation::FRAME;
1980 aAnchor.
SetType( RndStdIds::FLY_AT_CHAR );
1982 eVertOri = text::VertOrientation::CHAR_BOTTOM;
1983 eVertRel = text::RelOrientation::CHAR;
1987 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
1988 eVertOri = text::VertOrientation::TOP;
1989 eVertRel = text::RelOrientation::PRINT_AREA;
1997 sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
2001 if( SvxAdjust::Right==rPropInfo.
m_eFloat )
2003 eHoriOri = text::HoriOrientation::RIGHT;
2004 eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2005 eSurround = css::text::WrapTextMode_LEFT;
2009 eHoriOri = text::HoriOrientation::LEFT;
2010 eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
2011 eSurround = css::text::WrapTextMode_RIGHT;
2014 rFrameItemSet.
Put( aAnchor );
2027 sal_uInt8 nPercentWidth = nDfltPrcWidth, nPercentHeight = 0;
2058 rFrameItemSet.
Put( aFrameSize );
2074 rFrameItemSet.
Put( aBoxItem );
2078 rFrameItemSet.
Put( *pBoxItem );
2087 rFrameItemSet.
Put( *pBrushItem );
2095 rFrameItemSet.
Put( *pFrameDirectionItem );
2102 std::unique_ptr<HTMLAttrContext> xCntxt;
2108 bool bFound = HtmlTokenId::NONE ==
nToken;
2109 if(
nToken != HtmlTokenId::NONE )
2115 if( nCntxtToken ==
nToken )
2120 else if( nCntxtToken == HtmlTokenId::NONE )
2143 bool bIgnoreTopContext )
const
2146 if( bIgnoreTopContext )
2159 pCntxt->
GetMargins( nLeft, nRight, nIndent );
2167 short& nIndent )
const
2182 sal_uInt16& nLower )
const
2184 sal_uInt16 nDefaultColl = 0;
2185 OUString aDefaultClass;
2196 else if (!nDefaultColl)
2200 aDefaultClass = pCntxt->
GetClass();
2208 m_pCSS1Parser->GetTextFormatColl(nDefaultColl, aDefaultClass);
2217 for(
auto pAttr : rAttrs )
2225 pAttr->Invalidate();
2242 sal_uInt16 nWhich = pItem->Which();
2249 (*ppAttr)->SetLikePara();
2251 bool bSuccess =
EndAttr( *ppAttr,
false );
2260 if( RTL_TEXTENCODING_DONTKNOW == eEnc )
2266 for (
auto const &
i : aWhichIds)
2271 if (RTL_TEXTENCODING_SYMBOL == pFontItem->
GetCharSet())
2292 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
short GetTextFirstLineOffset() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
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)
const char *const 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(120)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
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< 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< 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< 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< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(110)
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_BOX(106)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
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)
bool equalsAscii(std::u16string_view s1, const char *s2)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
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