20 #include <config_wasm_strip.h>
35 #include <viewimp.hxx>
40 #include <osl/diagnose.h>
66 aFrm.
Left( nDeadline );
125 aFrm.
Pos().AdjustY(1 );
136 aFrm.
Pos().AdjustX( -(aFrm.
Width()) );
147 aFrm.
Pos().AdjustX( -1 );
168 aFrm.
Pos().AdjustX(1 );
212 static_cast<SwCellFrame*>(
this)->GetTabBox()->getRowSpan() == 1 )
215 MIN_VERT_CELL_HEIGHT = 1135
223 if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT )
224 aNew.SetHeight( MIN_VERT_CELL_HEIGHT );
239 pBody =
static_cast<SwPageFrame*
>(
this)->FindBodyCont();
241 pCol = &static_cast<SwPageFrame*>(
this)->GetFormat()->GetCol();
248 pCol = &pFormat->
GetCol();
268 const size_t nCnt = pObjs->
size();
269 for (
size_t i = 0;
i < nCnt; ++
i )
273 pFlyFrame->CheckDirChange();
303 static_cast<const SwTextFrame*
>(
this)->GetBaseOffsetForFly( bIgnoreFlysAnchoredAtThisFrame );
305 aAnchor.AdjustY(nBaseOfstForFly );
307 aAnchor.AdjustX(nBaseOfstForFly );
313 const SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid =
317 aAnchor.AdjustX( -nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
321 aAnchor.AdjustY(nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
334 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
338 assert(!
IsTextFrame() ||
GetDep() || static_cast<SwTextFrame*>(
this)->GetMergedPara());
343 if( pVSh && pVSh->
Imp() )
345 OSL_ENSURE( !
GetLower(),
"Lowers should be dispose already!" );
367 OSL_ENSURE( pContact,
368 "<SwFrame::~SwFrame> - missing contact for drawing object" );
382 #if OSL_DEBUG_LEVEL > 0
431 pCNd =
static_cast<SwTextFrame*
>(
this)->GetTextNodeFirst();
439 if( pRoot && pRoot->
GetTurbo() == this )
465 return pMark->GetMarkStart().nNode == *
m_pMergedPara->pFirstNode
469 assert(&rNode !=
GetDep());
506 while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() )
514 assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size());
522 OSL_ENSURE( pContact,
523 "<SwFrame::~SwFrame> - missing contact for drawing object" );
529 if ( pFrame->GetDrawObjs() &&
530 nCnt == pFrame->GetDrawObjs()->size() )
532 pFrame->GetDrawObjs()->Remove( *pAnchoredObj );
536 pFrame->RemoveFromLayout();
557 OSL_ENSURE( pContact,
558 "<SwFrame::~SwFrame> - missing contact for drawing object" );
611 nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan();
617 while( --nRowSpan > 0 && pNxt->
GetNext() )
636 OSL_ENSURE( pTmp,
"GetPaintArea lost in time and space" );
642 if( bLeft || (aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 && !
IsVertLRBT()) )
644 if( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 )
657 if( bLeft || aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 )
664 if( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 )
677 if( pTmp->
GetPrev() && ( bLeft || aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 ) )
684 && ( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 ) )
710 if (aRectFnSet.
XInc(nPrtLeft, nPrtWidth) > nWidth)
711 nWidth = nPrtLeft + nPrtWidth;
727 nLeft -= rBox.
GetDistance( SvxBoxItemLine::LEFT ) + 1;
731 nAdd += rBox.
GetDistance( SvxBoxItemLine::RIGHT ) + 1;
739 if(
IsTextFrame() && static_cast<const SwTextFrame*>(
this)->HasPara() )
745 nWidth = aRectFnSet.
XDiff(aRectFnSet.
XInc(nRight, nAdd), nLeft);
Base class of the Writer layout elements.
Base class that provides the general functionalities for frames that are allowed at page breaks (flow...
Represents the visualization of a paragraph.
void Add(SwClient *pDepend)
const SwSortedObjs * GetDrawObjs() const
bool IsAnyShellAccessible() const
void Left(const tools::Long nLeft)
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
virtual void UpdateLayoutDir()
method update layout direction the layout direction, the anchored object is assigned to ...
void MakeLeftPos(const SwFrame *, const SwFrame *, bool)
const SwRect & getFramePrintArea() const
static SwCache & GetCache()
tools::Long XInc(tools::Long n1, tools::Long n2) const
SwFrameFormat * ClaimFrameFormat()
const SvxShadowItem & GetShadow() const
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
SwTableLine is one table row in the document model.
bool SetMaxBottom(tools::Long)
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
void Pos(const Point &rNew)
SwContentFrame(SwContentNode *const, SwFrame *)
IDocumentMarkAccess * getIDocumentMarkAccess()
Of course Writer needs its own rectangles.
const editeng::SvxBorderLine * GetRight() const
The root element of a Writer document layout.
Value in Var-direction gives minimum (can be exceeded but not be less).
void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst=false)
void CheckDirChange()
checks the layout direction and invalidates the lower frames recursively, if necessary.
tools::Long GetPrtBottom() const
SwRect GetPaintArea() const
|* The paintarea is the area, in which the content of a frame is allowed |* to be displayed...
wrapper class for the positioning of Writer fly frames and drawing objects
SvxShadowLocation GetLocation() const
virtual ~SwFrame() override
const SwRect & getFrameArea() const
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history...
virtual const_iterator_t getFieldmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of fieldmarks.
void Width(tools::Long nNew)
virtual void DestroyImpl() override
tools::Long GetPrtLeft() const
virtual void DestroyImpl()
bool IsColumnFrame() const
SwRectFn fnRectVertL2RB2T
tools::Long XDiff(tools::Long n1, tools::Long n2) const
void SetInvalidVert(bool bNew)
void MakeBelowPos(const SwFrame *, const SwFrame *, bool)
virtual SwRedlineTable::size_type GetRedlinePos(const SwNode &rNode, RedlineType nType) const =0
const editeng::SvxBorderLine * GetLeft() const
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
std::vector< SwAnchoredObject * > m_VertPosOrientFramesFor
tools::Long GetPrtTop() const
void SetFrameFormat(SwFrameFormat *)
void Remove(SwAnchoredObject &_rAnchoredObj)
tools::Long GetPrtRight() const
virtual bool IsDeleteForbidden() const
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
const SwFrame * Lower() const
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
SwNodeOffset GetIndex() const
virtual const SwFlyFrame * DynCastFlyFrame() const
SwLayoutFrame * GetUpper()
const SvxBoxItem & GetBox() const
virtual ~SwLayoutFrame() override
void ClearVertPosOrientFrame()
SwTwips GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() const
method to determine the upper space amount, which is considered for the previous frame and the page g...
SwFrameFormat * GetFrameFormat()
virtual void InvalidateObjPos()=0
method to invalidate position of the anchored object
tools::Long GetBottomMargin() const
SwRect UnionFrame(bool bBorder=false) const
|* The unionframe is the framearea (getFrameArea()) of a frame expanded by the |* printarea...
A page of the document layout.
void MakeRightPos(const SwFrame *, const SwFrame *, bool)
SwFrame * GetAnchorFrameContainingAnchPos()
determine anchor frame containing the anchor position
Frame cannot be moved in Var-direction.
bool SetMinLeft(tools::Long)
virtual const_iterator_t getFieldmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of fieldmarks.
bool IsLayoutFrame() const
SwTextNode is a paragraph in the document model.
void SetTopBottomMargins(tools::Long, tools::Long)
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
general base class for all free-flowing frames
tools::Long GetRightMargin() const
void SetRightLeftMargins(tools::Long, tools::Long)
void ClearTmpConsiderWrapInfluence()
bool IsRightToLeft() const
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
void Top(const tools::Long nTop)
bool SetMaxRight(tools::Long)
tools::Long GetTopMargin() const
sal_uInt16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false) const
const SwContentFrame * GetTurbo() const
void DisallowTurbo() const
virtual ~SwContentFrame() override
bool IsAccessibleFrame() const
void AdjustColumns(const SwFormatCol *pCol, bool bAdjustAttributes)
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
tools::Long GetLeftMargin() const
SwViewShell * GetCurrShell() const
class for collecting anchored objects
Point GetFrameAnchorPos(bool bIgnoreFlysAnchoredAtThisFrame) const
returns the position for anchors based on frame direction
static constexpr size_type npos
void Height(tools::Long nNew)
SdrObjUserCall * GetUserCall() const
std::unique_ptr< SwSortedObjs > m_pDrawObjs
void SetLeftRightMargins(tools::Long, tools::Long)
bool IsFooterFrame() const
SwRootFrame * getRootFrame()
SwCellFrame is one table cell in the document layout.
virtual void DestroyImpl() override
bool IsCreateFrameWhenHidingRedlines() const
void DisposeAccessibleFrame(const SwFrame *pFrame, bool bRecursive=false)
virtual const SwFrameFormat * GetFormat() const