20#ifndef INCLUDED_SW_SOURCE_CORE_INC_FRAME_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_FRAME_HXX
31#include <com/sun/star/style/TabStop.hpp>
101#define FRM_LAYOUT SwFrameType(0x3bFF)
102#define FRM_ALL SwFrameType(0xfbff)
103#define FRM_CNTNT (SwFrameType::Txt | SwFrameType::NoTxt)
104#define FRM_FTNBOSS (SwFrameType::Page | SwFrameType::Column)
105#define FRM_ACCESSIBLE (SwFrameType::Root | SwFrameType::Page | SwFrameType::Header | SwFrameType::Footer | SwFrameType::Ftn | SwFrameType::Fly | SwFrameType::Tab | SwFrameType::Cell | SwFrameType::Txt)
106#define FRM_NEIGHBOUR (SwFrameType::Column | SwFrameType::Cell)
107#define FRM_NOTE_VERT (SwFrameType::FtnCont | SwFrameType::Ftn | SwFrameType::Section | SwFrameType::Tab | SwFrameType::Row | SwFrameType::Cell | SwFrameType::Txt)
108#define FRM_HEADFOOT (SwFrameType::Header | SwFrameType::Footer)
109#define FRM_BODYFTNC (SwFrameType::FtnCont | SwFrameType::Body)
122 class SdrAllFillAttributesHelper;
157 void setFrameAreaPositionValid(
bool bNew);
158 void setFrameAreaSizeValid(
bool bNew);
159 void setFramePrintAreaValid(
bool bNew);
229 virtual void transform_translate(
const Point& rOffset);
317 friend class SwFlowFrame;
406 void SetDirFlags(
bool bVert );
408 const SwLayoutFrame* ImplGetNextLayoutLeaf(
bool bFwd )
const;
451 virtual void DestroyImpl();
459 void OptPrepareMake();
462 virtual void MakePos();
480 const sw::BroadcastingModify*
GetDep()
const
481 {
return static_cast<const sw::BroadcastingModify*
>(
GetRegisteredIn()); }
485 void CheckDir(
SvxFrameDirection nDir,
bool bVert,
bool bOnlyBiDi,
bool bBrowse );
498 virtual bool InvalidationAllowed(
const InvalidationType _nInvalid )
const;
506 virtual void ActionOnInvalidation(
const InvalidationType _nInvalid );
517 return css::uno::Sequence< css::style::TabStop >();
540 void RemoveFromLayout();
570 void SetDrawObjsAsDeleted(
bool bDeleted );
572 void InvalidateObjs(
const bool _bNoInvaOfAsCharAnchoredObjs =
true );
574 virtual void PaintSwFrameShadowAndBorder(
579 const bool bOnlyTextBackground =
false)
const;
582 const bool bLowerMode =
false,
583 const bool bLowerBorder =
false,
584 const bool bOnlyTextBackground =
false )
const;
589 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> CreateProcessor2D( )
const;
595 bool GetBackgroundBrush(
598 std::optional<Color>& rxColor,
601 bool bConsiderTextBox )
const;
604 inline void ResetCompletePaint()
const;
607 inline void SetRetouche()
const;
608 inline void ResetRetouche()
const;
613 inline bool IsInDocBody()
const;
614 inline bool IsInFootnote()
const;
615 inline bool IsInTab()
const;
616 inline bool IsInFly()
const;
617 inline bool IsInSct()
const;
627 bool IsInBalancedSection()
const;
629 inline bool IsVertical()
const;
630 inline bool IsVertLR()
const;
631 inline bool IsVertLRBT()
const;
635 inline bool IsRightToLeft()
const;
638 void CheckDirChange();
641 Point GetFrameAnchorPos(
bool bIgnoreFlysAnchoredAtThisFrame )
const;
656 bool IsMoveable(
const SwLayoutFrame* _pLayoutFrame =
nullptr )
const;
660 bool IsFootnoteAllowed()
const;
666 virtual void CheckDirection(
bool bVert );
668 void ReinitializeFrameSizeAttrFlags();
679 static void CheckPageDescs(
SwPageFrame *pStart,
bool bNotifyFields =
true,
SwPageFrame** ppPrev =
nullptr);
707 SwContentFrame* FindNextCnt(
const bool _bInSameFootnote =
false );
711 inline const SwFrame *FindColFrame()
const;
712 inline const SwFrame *FindFooterOrHeader()
const;
713 inline const SwTabFrame *FindTabFrame()
const;
715 inline const SwFlyFrame *FindFlyFrame()
const;
718 inline const SwFrame *FindNext()
const;
720 const SwContentFrame* FindNextCnt(
const bool _bInSameFootnote =
false )
const;
721 inline const SwFrame *FindPrev()
const;
722 const SwFrame *GetLower()
const;
731 {
return ( mpPrev || !IsInSct() ) ? mpPrev : GetIndPrev_(); }
734 {
return (
mpNext || !IsInSct() ) ?
mpNext : GetIndNext_(); }
737 sal_uInt16 GetPhyPageNum()
const;
738 sal_uInt16 GetVirtPageNum()
const;
740 bool WannaRightPage()
const;
741 bool OnFirstPage()
const;
749 inline void OptCalc()
const;
751 Point GetRelPos()
const;
755 SwRect GetPaintArea()
const;
759 SwRect UnionFrame(
bool bBorder =
false )
const;
761 virtual Size ChgSize(
const Size& aNewSize );
782 ActionOnInvalidation( INVALID_SIZE );
790 ActionOnInvalidation( INVALID_PRTAREA );
798 ActionOnInvalidation( INVALID_POS );
803 if ( mbValidLineNum && InvalidationAllowed( INVALID_LINENUM ) )
805 mbValidLineNum =
false;
806 ActionOnInvalidation( INVALID_LINENUM );
816 ActionOnInvalidation( INVALID_ALL );
823 inline void InvalidateLineNum();
824 inline void InvalidateAll();
825 void ImplInvalidateSize();
826 void ImplInvalidatePrt();
827 void ImplInvalidatePos();
828 void ImplInvalidateLineNum();
831 void ImplInvalidateNextPos(
bool bNoFootnote );
836 void InvalidateNextPrtArea();
838 void InvalidatePage(
const SwPageFrame *pPage =
nullptr )
const;
847 SwPrintData const*
const pPrintData =
nullptr )
const;
853 const void *pVoid =
nullptr,
bool bNotify =
true );
856 inline bool IsLayoutFrame()
const;
857 inline bool IsRootFrame()
const;
858 inline bool IsPageFrame()
const;
859 inline bool IsColumnFrame()
const;
860 inline bool IsFootnoteBossFrame()
const;
861 inline bool IsHeaderFrame()
const;
862 inline bool IsFooterFrame()
const;
863 inline bool IsFootnoteContFrame()
const;
864 inline bool IsFootnoteFrame()
const;
865 inline bool IsBodyFrame()
const;
866 inline bool IsColBodyFrame()
const;
867 inline bool IsPageBodyFrame()
const;
868 inline bool IsFlyFrame()
const;
869 inline bool IsSctFrame()
const;
870 inline bool IsTabFrame()
const;
871 inline bool IsRowFrame()
const;
872 inline bool IsCellFrame()
const;
873 inline bool IsContentFrame()
const;
874 inline bool IsTextFrame()
const;
877 inline bool IsNoTextFrame()
const;
880 inline bool IsFlowFrame()
const;
883 inline bool IsRetoucheFrame()
const;
884 inline bool IsAccessibleFrame()
const;
886 void PrepareCursor();
890 bool IsProtected()
const;
896 static void DestroyFrame(
SwFrame *
const pFrame);
924 virtual bool IsLeaveUpperAllowed()
const;
925 virtual bool IsCoveredCell()
const;
926 bool IsInCoveredCell()
const;
929 bool KnowsFormat(
const SwFormat& rFormat )
const;
930 void RegisterToFormat(
SwFormat& rFormat );
931 void ValidateThisAndAllLowers(
const sal_uInt16 nStage );
934 void AllowDelete() { assert(mnForbidDelete > 0); --mnForbidDelete; }
937 bool supportsFullDrawingLayerFillAttributeSet()
const;
946 bool IsCollapse()
const;
1357 :
m_bVert(pFrame->IsVertical())
void MakeNxt(SwFrame *pFrame, SwFrame *pNxt)
void ValidateSz(SwFrame *pFrame)
wrapper class for the positioning of Writer fly frames and drawing objects
Container of body content (i.e.
const SwModify * GetRegisteredIn() const
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
SwModify * GetRegisteredInNonConst() const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
general base class for all free-flowing frames
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
FrameAreaWriteAccess(const FrameAreaWriteAccess &)=delete
FrameAreaWriteAccess(SwFrameAreaDefinition &rTarget)
SwFrameAreaDefinition & mrTarget
void setSwRect(const SwRect &rNew)
FrameAreaWriteAccess & operator=(const FrameAreaWriteAccess &)=delete
FramePrintAreaWriteAccess & operator=(const FramePrintAreaWriteAccess &)=delete
SwFrameAreaDefinition & mrTarget
void setSwRect(const SwRect &rNew)
FramePrintAreaWriteAccess(SwFrameAreaDefinition &rTarget)
FramePrintAreaWriteAccess(const FramePrintAreaWriteAccess &)=delete
Helper class to isolate geometry-defining members of SwFrame and to control their accesses.
const SwRect & getFrameArea() const
bool isFrameAreaDefinitionValid() const
bool isFrameAreaPositionValid() const
const SwRect & getFramePrintArea() const
void setFramePrintAreaValid(bool bNew)
bool mbFrameAreaSizeValid
void setFrameAreaPositionValid(bool bNew)
const sal_uInt32 mnFrameId
static sal_uInt32 snLastFrameId
bool mbFrameAreaPositionValid
bool isFramePrintAreaValid() const
bool isFrameAreaSizeValid() const
bool mbFramePrintAreaValid
sal_uInt32 GetFrameId() const
void setFrameAreaSizeValid(bool bNew)
SwFrameDeleteGuard & operator=(const SwFrameDeleteGuard &)=delete
SwFrameDeleteGuard(SwFrame *pFrame)
SwFrameDeleteGuard(const SwFrameDeleteGuard &)=delete
Base class of the Writer layout elements.
const sw::BroadcastingModify * GetDep() const
void InvalidateInfFlags()
const SwBodyFrame * FindBodyFrame() const
const SwLayoutFrame * ImplGetNextLayoutLeaf(bool bFwd) const
Finds the next layout leaf.
const SwFrame * GetPrev() const
SwSectionFrame * ImplFindSctFrame()
bool IsFootnoteContFrame() const
std::unique_ptr< SwSortedObjs > m_pDrawObjs
void InvalidateLineNum_()
static void SetCache(SwCache *pNew)
bool GetValidLineNumFlag() const
void SetDerivedR2L(bool bNew)
SwFrame * GetIndPrev() const
const SwFrame * GetNext() const
const SwRootFrame * getRootFrame() const
SwFlyFrame * FindFlyFrame()
bool IsAccessibleFrame() const
void ImplInvalidateSize()
SwSectionFrame * FindSctFrame()
SwTabFrame * FindTabFrame()
void ResetCompletePaint() const
void SetDirFlags(bool bVert)
Updates the vertical or the righttoleft-flags.
virtual SwTwips ShrinkFrame(SwTwips, bool bTst=false, bool bInfo=false)=0
SwTabFrame * ImplFindTabFrame()
const SwFrame * GetIndNext() const
bool IsColumnFrame() const
const SwBodyFrame * ImplFindBodyFrame() const
void InvalidateNextPos(bool bNoFootnote=false)
InvalidationType
enumeration for the different invalidations #i28701#
virtual bool InvalidationAllowed(const InvalidationType _nInvalid) const
method to determine, if an invalidation is allowed.
SwFrameType GetType() const
bool IsInFootnote() const
virtual void dumpAsXml(xmlTextWriterPtr writer=nullptr) const =0
bool IsHeaderFrame() const
void ImplInvalidateLineNum()
bool IsRetoucheFrame() const
const SwSortedObjs * GetDrawObjs() const
void ResetRetouche() const
static SwCache & GetCache()
bool IsRightToLeft() const
virtual bool IsDeleteForbidden() const
SwFlyFrame * ImplFindFlyFrame()
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
SwFootnoteFrame * ImplFindFootnoteFrame()
bool IsFooterFrame() const
bool IsFootnoteFrame() const
const SwLayoutFrame * GetUpper() const
SwLayoutFrame * GetUpper()
const SwLayoutFrame * GetNextLayoutLeaf() const
bool IsCompletePaint() const
SwRootFrame * getRootFrame()
bool IsNoTextFrame() const
void SetCompletePaint() const
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
bool IsContentFrame() const
bool IsFootnoteBossFrame() const
virtual SwTwips GrowFrame(SwTwips, bool bTst=false, bool bInfo=false)=0
const SwLayoutFrame * GetPrevLayoutLeaf() const
void SetInvalidVert(bool bNew)
SwPageFrame * FindPageFrame()
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
void ImplInvalidateNextPos(bool bNoFootnote)
SwFrame * FindFooterOrHeader()
SwFootnoteFrame * FindFootnoteFrame()
virtual void ActionOnInvalidation(const InvalidationType _nInvalid)
method to perform additional actions on an invalidation
SwSortedObjs * GetDrawObjs()
SwFootnoteBossFrame * FindFootnoteBossFrame(bool bFootnotes=false)
virtual void MakeAll(vcl::RenderContext *pRenderContext)=0
static SwCache * GetCachePtr()
void setRootFrame(SwRootFrame *pRoot)
void SetDerivedVert(bool bNew)
bool IsLayoutFrame() const
bool IsNeighbourFrame() const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
A page of the document layout.
tools::Long GetHeight(const SwRect &rRect) const
tools::Long YInc(tools::Long n1, tools::Long n2) const
void SetWidth(SwRect &rRect, tools::Long nNew) const
void SetPosX(SwRect &rRect, tools::Long nNew) const
void SetPos(SwRect &rRect, const Point &rNew) const
void AddHeight(SwRect &rRect, tools::Long nNew) const
void SetLeftAndWidth(SwRect &rRect, tools::Long nLeft, tools::Long nWidth) const
tools::Long GetRightMargin(const SwFrame &rFrame) const
tools::Long RightDist(const SwRect &rRect, tools::Long nPos) const
tools::Long GetTopMargin(const SwFrame &rFrame) const
void SetBottom(SwRect &rRect, tools::Long nNew) const
void SetRight(SwRect &rRect, tools::Long nNew) const
tools::Long GetWidth(const SwRect &rRect) const
tools::Long TopDist(const SwRect &rRect, tools::Long nPos) const
void SetYMargins(SwFrame &rFrame, tools::Long nTop, tools::Long nBottom) const
void SetHeight(SwRect &rRect, tools::Long nNew) const
tools::Long GetTop(const SwRect &rRect) const
void SubTop(SwRect &rRect, tools::Long nNew) const
Size GetSize(const SwRect &rRect) const
void AddWidth(SwRect &rRect, tools::Long nNew) const
tools::Long XDiff(tools::Long n1, tools::Long n2) const
tools::Long GetPrtRight(const SwFrame &rFrame) const
Point GetPos(const SwRect &rRect) const
void SetLimit(SwFrame &rFrame, tools::Long nNew) const
void SetXMargins(SwFrame &rFrame, tools::Long nLeft, tools::Long nRight) const
void SetPosY(SwRect &rRect, tools::Long nNew) const
tools::Long XInc(tools::Long n1, tools::Long n2) const
tools::Long LeftDist(const SwRect &rRect, tools::Long nPos) const
void SetTopAndHeight(SwRect &rRect, tools::Long nTop, tools::Long nHeight) const
tools::Long GetBottomMargin(const SwFrame &rFrame) const
void AddBottom(SwRect &rRect, tools::Long nNew) const
bool OverStep(const SwRect &rRect, tools::Long nPos) const
tools::Long YDiff(tools::Long n1, tools::Long n2) const
void SubLeft(SwRect &rRect, tools::Long nNew) const
tools::Long GetLeftMargin(const SwFrame &rFrame) const
tools::Long GetLeft(const SwRect &rRect) const
tools::Long GetPrtTop(const SwFrame &rFrame) const
void MakePos(SwFrame &rFrame, const SwFrame *pUp, const SwFrame *pPrv, bool bNotify) const
void AddRight(SwRect &rRect, tools::Long nNew) const
tools::Long GetPrtLeft(const SwFrame &rFrame) const
SwRectFnSet(const SwFrame *pFrame)
tools::Long GetBottom(const SwRect &rRect) const
tools::Long BottomDist(const SwRect &rRect, tools::Long nPos) const
void SetTop(SwRect &rRect, tools::Long nNew) const
void Refresh(const SwFrame *pFrame)
tools::Long GetRight(const SwRect &rRect) const
tools::Long GetPrtBottom(const SwFrame &rFrame) const
void SetLeft(SwRect &rRect, tools::Long nNew) const
bool PosDiff(const SwRect &rRect1, const SwRect &rRect2) const
Of course Writer needs its own rectangles.
The root element of a Writer document layout.
SwRowFrame is one table row in the document layout.
This class is used as parameter for creation of a block cursor selection.
class for collecting anchored objects
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Represents the visualization of a paragraph.
struct _xmlTextWriter * xmlTextWriterPtr
bool(SwFrame::* SwFrameMax)(tools::Long)
void(SwFrame::* SwFrameSet)(tools::Long, tools::Long)
SwRectFnCollection * SwRectFn
tools::Long(* SwOperator)(tools::Long, tools::Long)
void(SwFrame::* SwFrameMakePos)(const SwFrame *, const SwFrame *, bool)
SwRectFn fnRectVertL2RB2T
tools::Long(SwFrame::* SwFrameGet)() const
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Marks a position in the document model.
SwFrameGet fnGetLeftMargin
SwFrameGet fnGetBottomMargin
SwFrameGet fnGetTopMargin
SwRectSetTwice fnSetLeftAndWidth
SwFrameGet fnGetPrtBottom
SwFrameGet fnGetRightMargin
SwRectSetTwice fnSetTopAndHeight
tools::Long(SwRect::* SwRectDist)(tools::Long) const
tools::Long(SwRect::* SwRectGet)() const
bool(SwRect::* SwRectMax)(tools::Long) const
Point(SwRect::* SwRectPoint)() const
void(SwRect::* SwRectSetTwice)(tools::Long, tools::Long)
void(SwRect::* SwRectSetPos)(const Point &)
Size(SwRect::* SwRectSize)() const
void(SwRect::* SwRectSet)(const tools::Long nNew)
void FriendHackInvalidateRowFrame(SwFrameAreaDefinition &rRowFrame)
SwFrame * sw_FormatNextContentForKeep(SwTabFrame *pTabFrame)
css::uno::Reference< css::i18n::XExtendedTransliteration > Body
static tools::Long GetLeftMargin(SwView const &rView)