33 #include <viewimp.hxx>
38 #include <osl/diagnose.h>
64 aFrm.
Left( nDeadline );
123 aFrm.
Pos().AdjustY(1 );
134 aFrm.
Pos().AdjustX( -(aFrm.
Width()) );
145 aFrm.
Pos().AdjustX( -1 );
166 aFrm.
Pos().AdjustX(1 );
210 static_cast<SwCellFrame*>(
this)->GetTabBox()->getRowSpan() == 1 )
213 MIN_VERT_CELL_HEIGHT = 1135
221 if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT )
222 aNew.SetHeight( MIN_VERT_CELL_HEIGHT );
237 pBody =
static_cast<SwPageFrame*
>(
this)->FindBodyCont();
239 pCol = &static_cast<SwPageFrame*>(
this)->GetFormat()->GetCol();
246 pCol = &pFormat->
GetCol();
266 const size_t nCnt = pObjs->
size();
267 for (
size_t i = 0;
i < nCnt; ++
i )
270 if(
auto pFlyFrame = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) )
271 pFlyFrame->CheckDirChange();
301 static_cast<const SwTextFrame*
>(
this)->GetBaseOffsetForFly( bIgnoreFlysAnchoredAtThisFrame );
303 aAnchor.AdjustY(nBaseOfstForFly );
305 aAnchor.AdjustX(nBaseOfstForFly );
311 const SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid =
315 aAnchor.AdjustX( -nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
319 aAnchor.AdjustY(nUpperSpaceAmountConsideredForPrevFrameAndPageGrid );
340 if( pVSh && pVSh->
Imp() )
342 OSL_ENSURE( !
GetLower(),
"Lowers should be dispose already!" );
354 if (
auto pFlyFrame = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) )
363 OSL_ENSURE( pContact,
364 "<SwFrame::~SwFrame> - missing contact for drawing object" );
378 #if OSL_DEBUG_LEVEL > 0
427 pCNd =
static_cast<SwTextFrame*
>(
this)->GetTextNodeFirst();
435 if( pRoot && pRoot->
GetTurbo() == this )
461 return pMark->GetMarkStart().nNode == *
m_pMergedPara->pFirstNode
502 while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() )
507 if (
SwFlyFrame* pFlyFrame = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
510 assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size());
518 OSL_ENSURE( pContact,
519 "<SwFrame::~SwFrame> - missing contact for drawing object" );
525 if ( pFrame->GetDrawObjs() &&
526 nCnt == pFrame->GetDrawObjs()->size() )
528 pFrame->GetDrawObjs()->Remove( *pAnchoredObj );
532 pFrame->RemoveFromLayout();
543 if (
auto pFlyFrame = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) )
553 OSL_ENSURE( pContact,
554 "<SwFrame::~SwFrame> - missing contact for drawing object" );
607 nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan();
613 while( --nRowSpan > 0 && pNxt->
GetNext() )
632 OSL_ENSURE( pTmp,
"GetPaintArea lost in time and space" );
638 if( bLeft || (aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 && !
IsVertLRBT()) )
640 if( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 )
653 if( bLeft || aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 )
660 if( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 )
673 if( pTmp->
GetPrev() && ( bLeft || aRectFnSet.
XDiff(nTmpLeft, nLeft) > 0 ) )
680 && ( bRight || aRectFnSet.
XDiff(nRight, nTmpRight) > 0 ) )
706 if (aRectFnSet.
XInc(nPrtLeft, nPrtWidth) > nWidth)
707 nWidth = nPrtLeft + nPrtWidth;
723 nLeft -= rBox.
GetDistance( SvxBoxItemLine::LEFT ) + 1;
727 nAdd += rBox.
GetDistance( SvxBoxItemLine::RIGHT ) + 1;
735 if(
IsTextFrame() && static_cast<const SwTextFrame*>(
this)->HasPara() )
741 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.
sal_uLong GetIndex() const
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
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
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
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