42 #include <osl/diagnose.h>
98 OSL_ENSURE( rName[0] !=
'#',
"FindImageMap: name begins with '#'!" );
123 SwNode *pNd = rNds[nIdx + 1];
125 if(
nullptr != pGrfNd )
130 if( pIMap && pIMap->GetIMapObjectCount()==0 )
136 aURL.SetMap( pNewIMap );
147 nIdx = rNds[nIdx]->EndOfSectionIndex() + 1;
164 rFrameItemSet.
Put( *pCntnrItemSet );
183 bool bMoveBackward =
false;
185 sal_Int16 eVertRel = text::RelOrientation::FRAME;
190 sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
196 css::text::WrapTextMode eSurround;
199 case text::HoriOrientation::LEFT:
200 eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
201 eSurround = css::text::WrapTextMode_RIGHT;
203 case text::HoriOrientation::RIGHT:
204 eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
205 eSurround = css::text::WrapTextMode_LEFT;
207 case text::HoriOrientation::CENTER:
208 eHoriRel = text::RelOrientation::FRAME;
209 eSurround = css::text::WrapTextMode_NONE;
212 eHoriRel = text::RelOrientation::FRAME;
213 eSurround = css::text::WrapTextMode_PARALLEL;
225 sal_uInt16 nUpper=0, nLower=0;
243 aAnchor.
SetType( RndStdIds::FLY_AT_CHAR );
244 bMoveBackward =
true;
245 eVertOri = text::VertOrientation::CHAR_BOTTOM;
246 eVertRel = text::RelOrientation::CHAR;
250 aAnchor.
SetType( RndStdIds::FLY_AT_PARA );
251 eVertOri = text::VertOrientation::TOP;
252 eVertRel = text::RelOrientation::PRINT_AREA;
266 eState = SvParserState::Error;
275 rFrameSet.
Put( aAnchor );
285 m_aMoveFlyFrames.emplace_back(std::make_unique<SwHTMLFrameFormatListener>(pFlyFormat));
293 OUString& rTypeStr )
const
304 bool allowAccessLink(
const SwDoc& rDoc)
308 if (sh !=
nullptr && sh->
HasName())
321 OUString sAltNm,
aId, aClass, aStyle,
aMap, sHTMLGrfName;
323 OUString aGraphicData;
324 sal_Int16 eVertOri = text::VertOrientation::TOP;
326 bool bWidthProvided=
false, bHeightProvided=
false;
332 bool bPercentWidth =
false;
333 bool bPercentHeight =
false;
334 OUString sWidthAsString, sHeightAsString;
338 OUString sDfltScriptType;
342 for (
size_t i = rHTMLOptions.size();
i; )
349 case HtmlOptionId::ID:
352 case HtmlOptionId::STYLE:
355 case HtmlOptionId::CLASS:
358 case HtmlOptionId::SRC:
360 if( !InternalImgToPrivateURL(sGrfNm) )
363 case HtmlOptionId::DATA:
365 if (!InternalImgToPrivateURL(aGraphicData))
369 case HtmlOptionId::ALIGN:
371 rOption.
GetEnum( aHTMLImgVAlignTable,
372 text::VertOrientation::TOP );
374 rOption.
GetEnum( aHTMLImgHAlignTable );
376 case HtmlOptionId::WIDTH:
380 bPercentWidth = (sWidthAsString.indexOf(
'%') != -1);
381 if( bPercentWidth && nWidth>100 )
385 bWidthProvided = (sWidthAsString !=
"auto");
387 case HtmlOptionId::HEIGHT:
391 bPercentHeight = (sHeightAsString.indexOf(
'%') != -1);
392 if( bPercentHeight && nHeight>100 )
395 bHeightProvided = (sHeightAsString !=
"auto");
397 case HtmlOptionId::VSPACE:
400 case HtmlOptionId::HSPACE:
403 case HtmlOptionId::ALT:
406 case HtmlOptionId::BORDER:
407 nBorder = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
409 case HtmlOptionId::ISMAP:
412 case HtmlOptionId::USEMAP:
415 case HtmlOptionId::NAME:
419 case HtmlOptionId::SDONLOAD:
422 case HtmlOptionId::ONLOAD:
423 nEvent = SvMacroItemId::OnImageLoadDone;
426 case HtmlOptionId::SDONABORT:
429 case HtmlOptionId::ONABORT:
430 nEvent = SvMacroItemId::OnImageLoadCancel;
433 case HtmlOptionId::SDONERROR:
436 case HtmlOptionId::ONERROR:
437 nEvent = SvMacroItemId::OnImageLoadError;
442 if( !sTmp.isEmpty() )
445 OUString sScriptType;
447 sScriptType = sDfltScriptType;
449 SvxMacro( sTmp, sScriptType, eScriptType2 ));
457 if (sGrfNm.isEmpty() && !aGraphicData.isEmpty())
458 sGrfNm = aGraphicData;
460 if( sGrfNm.isEmpty() )
475 "Numbering level is wrong" );
493 if( aGraphicURL.
GetProtocol() == INetProtocol::Data )
495 std::unique_ptr<SvMemoryStream>
const pStream(aGraphicURL.
getData());
502 if (!sGrfNm.isEmpty())
509 else if (
m_sBaseURL.isEmpty() || !aGraphicData.isEmpty())
517 if (!sGrfNm.isEmpty())
522 if (!nHeight || !nWidth)
526 nWidth = aPixelSize.
Width();
527 if (!bHeightProvided)
528 nHeight = aPixelSize.
Height();
530 if (!bPercentWidth && bWidthProvided && !bHeightProvided && aPixelSize.
Width())
531 nHeight = nWidth * aPixelSize.
Height() / aPixelSize.
Width();
532 else if (!bPercentHeight && !bWidthProvided && bHeightProvided && aPixelSize.
Height())
533 nWidth = nHeight * aPixelSize.
Width() / aPixelSize.
Height();
558 const OUString& rURL =
562 sal_uInt16 nPoolId =
static_cast< sal_uInt16
>(
m_xDoc->IsVisitedURL( rURL )
579 aBoxItem.
SetLine( &aHBorderLine, SvxBoxItemLine::TOP );
580 aBoxItem.
SetLine( &aHBorderLine, SvxBoxItemLine::BOTTOM );
581 aBoxItem.
SetLine( &aVBorderLine, SvxBoxItemLine::LEFT );
582 aBoxItem.
SetLine( &aVBorderLine, SvxBoxItemLine::RIGHT );
583 aFrameSet.Put( aBoxItem );
588 SetSpace(
Size( nHSpace, nVSpace), aItemSet, aPropInfo, aFrameSet );
593 Size aTwipSz( bPercentWidth ? 0 : nWidth, bPercentHeight ? 0 : nHeight );
596 if (bWidthProvided || bHeightProvided ||
611 switch( aPropInfo.m_eWidthType )
614 aTwipSz.
setWidth( aPropInfo.m_nWidth );
616 bPercentWidth =
false;
620 nWidth = aPropInfo.m_nWidth;
621 bPercentWidth =
true;
626 switch( aPropInfo.m_eHeightType )
629 aTwipSz.
setHeight( aPropInfo.m_nHeight );
631 bPercentHeight =
false;
635 nHeight = aPropInfo.m_nHeight;
636 bPercentHeight =
true;
643 bool bSetTwipSize =
true;
644 bool bChangeFrameSize =
false;
645 bool bRequestGrfNow =
false;
646 bool bSetScaleImageMap =
false;
647 sal_uInt8 nPercentWidth = 0, nPercentHeight = 0;
651 if ((!bPercentWidth && !nWidth) && (!bPercentHeight && !nHeight) && !
m_bFuzzing && allowAccessLink(*
m_xDoc))
654 if (aDescriptor.
Detect(
true))
665 if( !nWidth || !nHeight )
671 bRequestGrfNow =
true;
676 bChangeFrameSize =
true;
678 if( !nWidth && !nHeight )
688 nPercentWidth =
static_cast<sal_uInt8>(nWidth);
689 nPercentHeight = 255;
700 nPercentHeight =
static_cast<sal_uInt8>(nHeight);
712 bSetTwipSize =
false;
715 nPercentWidth =
static_cast<sal_uInt8>(nWidth);
718 nPercentHeight =
static_cast<sal_uInt8>(nHeight);
723 if( !aMap.isEmpty() )
727 sal_Int32
nPos = aMap.indexOf(
'#' );
732 aName = aMap.copy(nPos+1);
739 bSetScaleImageMap = !nPercentWidth || !nPercentHeight;
740 aFrameSet.Put( aURL );
746 aFrameSet.Put( aURL );
751 bSetScaleImageMap =
true;
758 OSL_ENSURE( !aTwipSz.
Width(),
759 "Why is a width set if we already have percentage value?" );
771 OSL_ENSURE( !aTwipSz.
Height(),
772 "Why is a height set if we already have percentage value?" );
785 aFrameSize.SetHeightPercent( nPercentHeight );
786 aFrameSet.Put( aFrameSize );
794 m_xDoc->getIDocumentContentOperations().InsertGraphic(
795 *
m_pPam, sGrfNm, OUString(), &aGraphic,
796 &aFrameSet,
nullptr,
nullptr);
800 if( !sHTMLGrfName.isEmpty() )
802 pFlyFormat->
SetName( sHTMLGrfName );
814 if( !sAltNm.isEmpty() )
822 if( bSetScaleImageMap )
840 SvMacroItemId::OnMouseOver,
841 SvMacroItemId::OnClick,
842 SvMacroItemId::OnMouseOut };
847 if(
nullptr != pMacro )
853 m_xAttrTab->pINetFormat->GetStartParagraph() ==
865 if( !rINetFormat.
GetName().isEmpty() )
884 if (bRequestGrfNow && pGrfNd)
887 SAL_WARN_IF(!aUpdatedSize.
Width() || !aUpdatedSize.
Height(),
"sw.html",
"html image with no width or height");
904 OUString aBackGround,
aId, aStyle, aLang, aDir;
905 Color aBGColor, aTextColor, aLinkColor, aVLinkColor;
906 bool bBGColor=
false, bTextColor=
false;
907 bool bLinkColor=
false, bVLinkColor=
false;
910 OUString sDfltScriptType;
914 for (
size_t i = rHTMLOptions.size();
i; )
919 bool bSetEvent =
false;
923 case HtmlOptionId::ID:
926 case HtmlOptionId::BACKGROUND:
929 case HtmlOptionId::BGCOLOR:
933 case HtmlOptionId::TEXT:
937 case HtmlOptionId::LINK:
941 case HtmlOptionId::VLINK:
946 case HtmlOptionId::SDONLOAD:
949 case HtmlOptionId::ONLOAD:
954 case HtmlOptionId::SDONUNLOAD:
957 case HtmlOptionId::ONUNLOAD:
962 case HtmlOptionId::SDONFOCUS:
965 case HtmlOptionId::ONFOCUS:
970 case HtmlOptionId::SDONBLUR:
973 case HtmlOptionId::ONBLUR:
978 case HtmlOptionId::ONERROR:
981 case HtmlOptionId::STYLE:
985 case HtmlOptionId::LANG:
988 case HtmlOptionId::DIR:
996 const OUString& rEvent = rOption.
GetString();
997 if( !rEvent.isEmpty() )
1013 std::unique_ptr<SvxBrushItem> aBrushItem(
m_pCSS1Parser->makePageDescBackground() );
1014 bool bSetBrush =
false;
1020 if( !aBrushItem->GetGraphicLink().isEmpty() )
1021 aLink = aBrushItem->GetGraphicLink();
1024 aBrushItem->SetColor( aBGColor );
1026 if( !aLink.isEmpty() )
1028 aBrushItem->SetGraphicLink( aLink );
1029 aBrushItem->SetGraphicPos( ePos );
1035 if( !aBackGround.isEmpty() && !
m_pCSS1Parser->IsBodyBackgroundSet() )
1044 if( !aStyle.isEmpty() || !aDir.isEmpty() )
1049 ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo,
nullptr, &aDir );
1053 m_pCSS1Parser->SetPageDescAttrs( bSetBrush ? aBrushItem.get() :
nullptr,
1059 for(
auto const &
i : aWhichIds)
1062 if( pItem && pItem->
GetProp() != 100)
1064 sal_uInt32 nHeight =
1067 aItemSet.Put( aNewItem );
1073 ->SetFormatAttr( aItemSet );
1075 else if( bSetBrush )
1094 if( !aLang.isEmpty() )
1099 sal_uInt16 nWhich = 0;
1102 case SvtScriptType::LATIN:
1105 case SvtScriptType::ASIAN:
1108 case SvtScriptType::COMPLEX:
1116 aLanguage.SetWhich( nWhich );
1117 m_xDoc->SetDefault( aLanguage );
1122 if( !aId.isEmpty() )
1131 std::unique_ptr<HTMLAttrContext> xOldCntxt(
PopContext(HtmlTokenId::ANCHOR_ON));
1139 OUString sHRef,
aName, sTarget;
1140 OUString
aId, aStyle, aClass, aLang, aDir;
1141 bool bHasHRef =
false, bFixed =
false;
1144 OUString sDfltScriptType;
1148 for (
size_t i = rHTMLOptions.size();
i; )
1155 case HtmlOptionId::NAME:
1159 case HtmlOptionId::HREF:
1163 case HtmlOptionId::TARGET:
1167 case HtmlOptionId::STYLE:
1170 case HtmlOptionId::ID:
1173 case HtmlOptionId::CLASS:
1176 case HtmlOptionId::SDFIXED:
1179 case HtmlOptionId::LANG:
1182 case HtmlOptionId::DIR:
1186 case HtmlOptionId::SDONCLICK:
1189 case HtmlOptionId::ONCLICK:
1190 nEvent = SvMacroItemId::OnClick;
1191 goto ANCHOR_SETEVENT;
1193 case HtmlOptionId::SDONMOUSEOVER:
1196 case HtmlOptionId::ONMOUSEOVER:
1197 nEvent = SvMacroItemId::OnMouseOver;
1198 goto ANCHOR_SETEVENT;
1200 case HtmlOptionId::SDONMOUSEOUT:
1203 case HtmlOptionId::ONMOUSEOUT:
1204 nEvent = SvMacroItemId::OnMouseOut;
1205 goto ANCHOR_SETEVENT;
1209 if( !sTmp.isEmpty() )
1212 OUString sScriptType;
1214 sScriptType = sDfltScriptType;
1215 aMacroTable.
Insert( nEvent,
SvxMacro( sTmp, sScriptType, eScriptType2 ));
1225 if( !aName.isEmpty() )
1232 OUString sCmp= sDecoded.copy(nPos+1).replaceAll(
" ",
"");
1233 if( !sCmp.isEmpty() )
1235 sCmp = sCmp.toAsciiLowerCase();
1236 if( sCmp ==
"region" ||
1238 sCmp ==
"graphic" ||
1241 sCmp ==
"outline" ||
1251 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::ANCHOR_ON));
1253 bool bEnAnchor =
false, bFootnoteAnchor =
false, bFootnoteEnSymbol =
false;
1254 OUString aFootnoteName;
1255 OUString aStrippedClass( aClass );
1257 if( aStrippedClass.getLength() >=9 && bHasHRef && sHRef.getLength() > 1 &&
1258 (
's' == aStrippedClass[0] ||
'S' == aStrippedClass[0]) &&
1259 (
'd' == aStrippedClass[1] ||
'D' == aStrippedClass[1]) )
1264 bFootnoteAnchor =
true;
1267 bFootnoteEnSymbol =
true;
1268 if( bEnAnchor || bFootnoteAnchor || bFootnoteEnSymbol )
1270 aFootnoteName = sHRef.copy( 1 );
1272 aStrippedClass.clear();
1284 if(
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
1287 InsertAttrs(aItemSet, aPropInfo, xCntxt.get(),
true);
1293 if( !sHRef.isEmpty() )
1308 if( !aMacroTable.
empty() )
1317 else if( !aName.isEmpty() )
1322 if( bEnAnchor || bFootnoteAnchor )
1327 else if( bFootnoteEnSymbol )
1348 EndTag( HtmlTokenId::ANCHOR_OFF );
1362 bool bHasMarks =
false;
1390 const ::sw::mark::IMark* pBookmark = *ppMark;
1392 const SwNodeOffset nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
1393 if( nBookNdIdx==nNodeIdx )
1398 else if( nBookNdIdx > nNodeIdx )
1410 bool bSetSmallFont =
false;
1421 for(
auto pFormat : rFrameFormatTable )
1426 ((RndStdIds::FLY_AT_PARA == pAnchor->
GetAnchorId()) ||
1427 (RndStdIds::FLY_AT_CHAR == pAnchor->
GetAnchorId())) &&
1428 pAPos->
nNode == nNodeIdx )
1458 if(nBookNdIdx==nNodeIdx)
1464 OSL_ENSURE(
false,
"Oops, where is my predecessor node?");
1472 const SwPaM aPaM(aNewPos);
1476 else if( nBookNdIdx > nNodeIdx )
1490 bSetSmallFont =
true;
1499 bSetSmallFont =
true;
1503 while( bSetSmallFont && nPos>0 )
1518 pCNd->
SetAttr( aFontHeightCJK );
1520 pCNd->
SetAttr( aFontHeightCTL );
sal_uInt16 IncGrfsThatResizeTable()
OString stripEnd(const OString &rIn, char c)
sal_uInt8 GetLevel() const
virtual sal_Int32 Len() const
static void SetSpace(const Size &rPixSpace, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFlyItemSet)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
void SetAnchorAndAdjustment(sal_Int16 eVertOri, sal_Int16 eHoriOri, const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrameSet)
SwNode & GetNode(bool bPoint=true) const
EnumT GetEnum(const HTMLOptionEnum< EnumT > *pOptEnums, EnumT nDflt=static_cast< EnumT >(0)) const
SvKeyValueIterator * GetHeaderAttributes()
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
#define OOO_STRING_SVTOOLS_HTML_VA_texttop
HtmlOptionId GetToken() const
sal_uInt16 m_nMissingImgMaps
static Css1ScriptFlags GetScriptFromClass(OUString &rClass, bool bSubClassOnly=true)
SwNodeOffset EndOfSectionIndex() const
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define OOO_STRING_SVTOOLS_HTML_VA_bottom
Marks a position in the document model.
void SetAttr(bool bChkEnd=true, bool bBeforeTable=false, std::deque< std::unique_ptr< HTMLAttr >> *pPostIts=nullptr)
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
#define OOO_STRING_SVTOOLS_HTML_sdendnote_anc
void setWidth(tools::Long nWidth)
const OUString & GetText() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
#define OOO_STRING_SVTOOLS_HTML_VA_absmiddle
#define OOO_STRING_SVTOOLS_HTML_AL_center
SwNodeOffset StartOfSectionIndex() const
void ScaleImageMap()
Scale an image-map: the image-map becomes zoomed in / out by factor between graphic-size and border-s...
void InsertBookmark(const OUString &rName)
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
const OUString & GetName() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
void SetTitle(const OUString &rTitle)
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_anc
void NewAttr(const std::shared_ptr< HTMLAttrTable > &rAttrTab, HTMLAttr **ppAttr, const SfxPoolItem &rItem)
Provides access to the marks of a document.
const OUString & GetString() const
constexpr sal_uInt16 RES_FRMATR_END(133)
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
constexpr sal_uInt8 MAXLEVEL
HTMLAttrContexts m_aContexts
virtual const SwPosition & GetMarkPos() const =0
sal_uInt32 m_aFontHeights[7]
static SwContentNode * GoPrevious(SwNodeIndex *)
#define OOO_STRING_SVTOOLS_HTML_sdfootnote_sym
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
static void PixelToTwip(tools::Long &nWidth, tools::Long &nHeight)
std::unique_ptr< ImageMaps > m_pImageMaps
all Image-Maps that have been read
css::chart::ChartAxisLabelPosition ePos
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
void InsertBasicDocEvent(const OUString &aEventName, const OUString &rName, ScriptType eScrType, const OUString &rScrType)
SwContentNode * GetContentNode(bool bPoint=true) const
static OutputDevice * GetDefaultDevice()
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
Graphic ImportUnloadedGraphic(SvStream &rIStream, sal_uInt64 sizeLimit=0, const Size *pSizeHint=nullptr)
constexpr tools::Long Width() const
HashMap_OWString_Interface aMap
#define CH_TXTATR_BREAKWORD
void SetChgTwipSize(bool b)
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
static LanguageType convertToLanguageTypeWithFallback(const OUString &rBcp47)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
SwNodeType GetNodeType() const
bool m_bNotifyMacroEventRead
ScriptType GetScriptType(SvKeyValueIterator *) const
void GetDefaultScriptType(ScriptType &rType, OUString &rTypeStr) const
void SetColor(const Color &rColor)
void InsertAttrs(std::deque< std::unique_ptr< HTMLAttr >> rAttrs)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
LineEnd GetSystemLineEnd()
#define OOO_STRING_SVTOOLS_HTML_VA_top
SwNodeOffset GetIndex() const
void SetCountedInList(bool bCounted)
constexpr tools::Long getHeight() const
constexpr TypedWhichId< SfxStringItem > RES_FLTR_BOOKMARK(RES_FLTRATTR_BEGIN)
static OUString StripQueryFromPath(const OUString &rBase, const OUString &rPath)
Strips query and fragment from a URL path if base URL is a file:// one.
std::vector< std::unique_ptr< SwHTMLFrameFormatListener > > m_aMoveFlyFrames
sal_uInt16 GetProp() const
void InsertAttr(const SfxPoolItem &rItem, bool bInsAtStart)
virtual void repositionMark(::sw::mark::IMark *io_pMark, const SwPaM &rPaM)=0
Moves an existing mark to a new selection and performs needed updates.
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
static void SetFrameFormatAttrs(SfxItemSet &rItemSet, HtmlFrameFormatFlags nFlags, SfxItemSet &rFrameItemSet)
PaM is Point and Mark: a selection of the document model.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
void InsertFootEndNote(const OUString &rName, bool bEndNote, bool bFixed)
void EndTag(HtmlTokenId nToken)
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
sal_uInt16 GetDepth() const
const Size & GetSizePixel() const
std::deque< sal_Int32 > m_aMoveFlyCnts
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
const SwPosition * GetPoint() const
SwIndex & Assign(SwIndexReg *, sal_Int32)
void NotifyMacroEventRead()
static OUString GetEventName(GlobalEventId nID)
#define OOO_STRING_SVTOOLS_HTML_VA_baseline
constexpr TypedWhichId< SvxMacroItem > RES_FRMMACRO(108)
bool HasCurrentParaBookmarks(bool bIgnoreStack=false) const
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
const Color & GetColor() const
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
SwNodeOffset GetIndex() const
SwNodeOffset GetStartParagraphIdx() const
void EndContext(HTMLAttrContext *pContext)
#define OOO_STRING_SVTOOLS_HTML_AL_left
Marks a character position inside a document model node.
std::unique_ptr< HTMLAttrContext > PopContext(HtmlTokenId nToken=HtmlTokenId::NONE)
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
#define LANGUAGE_DONTKNOW
bool DoPositioning(SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, HTMLAttrContext *pContext)
static OUString GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
Marks a node in the document model.
bool m_bInFootEndNoteSymbol
MapUnit GetMapUnit() const
void RegisterFlyFrame(SwFrameFormat *pFlyFrame)
#define OOO_STRING_SVTOOLS_HTML_VA_middle
const sal_Unicode cMarkSeparator
void SetTwipSize(const Size &rSz)
bool IsScaleImageMap() const
Frame cannot be moved in Var-direction.
virtual Size GetTwipSize() const override
void SetMacro(SvMacroItemId nEvent, const SvxMacro &)
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
bool HasCurrentParaFlys(bool bNoSurroundOnly=false, bool bSurroundOnly=false) const
sal_uInt32 GetNumber() const
const SwNodeIndex * GetContentIdx() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
tools::Long const nBorder
bool isUntrustedReferer(OUString const &referer)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SwTextNode is a paragraph in the document model.
const SvxMacroTableDtor & GetMacroTable() const
void SetInvalidRule(bool bFlag)
virtual bool SetAttr(const SfxPoolItem &)
made virtual
#define OOO_STRING_SVTOOLS_HTML_AL_right
constexpr tools::Long HTML_DFLT_IMG_HEIGHT
void SetScaleImageMap(bool b)
bool CanRemoveNode(SwNodeOffset nNodeIdx) const
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
#define SAL_WARN_IF(condition, area, stream)
#define OOO_STRING_SVTOOLS_HTML_sdendnote_sym
MapMode GetPrefMapMode() const
constexpr tools::Long Height() const
OUString GetPartBeforeLastName() const
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
::std::vector< HTMLOption > HTMLOptions
void GetULSpaceFromContext(sal_uInt16 &rUpper, sal_uInt16 &rLower) const
void SetTextCollAttrs(HTMLAttrContext *pContext=nullptr)
sal_Int32 GetIndex() const
SwHTMLNumRuleInfo & GetNumInfo()
bool IsCountedInList() const
INetProtocol GetProtocol() const
tools::Long AdjustWidth(tools::Long n)
bool EndAttr(HTMLAttr *pAttr, bool bChkEmpty=true)
constexpr tools::Long HTML_DFLT_IMG_WIDTH
SfxObjectShell * GetPersist() const
SwTableNode is derived from SwStartNode.
tools::Long AdjustHeight(tools::Long n)
ImageMap * FindImageMap(std::u16string_view rURL) const
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
std::shared_ptr< HTMLTable > m_xTable
SwMoveFnCollection const & fnMoveBackward
void GetColor(Color &) const
void setHeight(tools::Long nHeight)
static GraphicFilter & GetGraphicFilter()
Reference< XModel > xModel
void GetMarginsFromContextWithNumberBullet(sal_uInt16 &nLeft, sal_uInt16 &nRight, short &nIndent) const
constexpr tools::Long getWidth() const
#define OOO_STRING_SVTOOLS_HTML_VA_absbottom
HTMLOptionEnum< sal_Int16 > const aHTMLImgHAlignTable[]
std::shared_ptr< HTMLAttrTable > m_xAttrTab
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
const OUString & GetScriptTypeString(SvKeyValueIterator *) const
bool m_bInFootEndNoteAnchor
bool AppendTextNode(SwHTMLAppendMode eMode=AM_NORMAL, bool bUpdateNum=true)
bool Detect(bool bExtendedInfo=false)
COMPHELPER_DLLPUBLIC void notifyMacroEventRead(const css::uno::Reference< css::frame::XModel > &_rxDocument)
void PushContext(std::unique_ptr< HTMLAttrContext > &rCntxt)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
rtl::Reference< SwDoc > m_xDoc
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
std::unique_ptr< SfxPoolItem > m_pItem
std::unique_ptr< SvMemoryStream > getData() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
const Color & GetValue() const
static bool MayBePositioned(const SvxCSS1PropertyInfo &rPropInfo, bool bAutoWidth=false)
static bool HasStyleOptions(std::u16string_view rStyle, std::u16string_view rId, std::u16string_view rClass, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
OUString m_aBulletGrfs[MAXLEVEL]
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
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)
Base class of the Writer document model elements.
SfxMedium * GetMedium() const