20#include <config_wasm_strip.h>
40#include <objectformatter.hxx>
70#include <osl/diagnose.h>
110 if (nFlyHeight <= nPageHeight)
116 if (nDeadline - nFlyTop > nBodyHeight)
120 nDeadline = nFlyTop + nBodyHeight;
142 m_pPrevLink( nullptr ),
143 m_pNextLink( nullptr ),
147 m_bAutoPosition( false ),
149 m_nAuthor(
std::string::npos ),
150 m_bValidContentPos( false )
161 if( SvxFrameDirection::Environment == nDir )
171 if( SvxFrameDirection::Horizontal_LR_TB == nDir || SvxFrameDirection::Horizontal_RL_TB == nDir )
188 if ( SvxFrameDirection::Vertical_LR_TB == nDir )
190 else if (nDir == SvxFrameDirection::Vertical_LR_BT)
201 if( SvxFrameDirection::Horizontal_RL_TB == nDir )
254 OSL_ENSURE( !pFollow->
GetPrevLink(),
"wrong chain detected" );
264 OSL_ENSURE( !pMaster->
GetNextLink(),
"wrong chain detected" );
277 OSL_ENSURE( rContent.
GetContentIdx(),
":-( no content prepared." );
297 OSL_ENSURE( rContent.
GetContentIdx(),
"<SwFlyFrame::InsertColumns()> - no content prepared." );
326#if !ENABLE_WASM_STRIP_ACCESSIBILITY
333 if( pVSh && pVSh->
Imp() )
396 if (
auto pDrawVirtObj =
dynamic_cast<SwDrawVirtObj*
>( pObj) )
398 pDrawVirtObj->RemoveFromWriterLayout();
399 pDrawVirtObj->RemoveFromDrawingPage();
474 if (rCurrentShell.HasDrawView() &&
475 rCurrentShell.Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount())
478 if (pOldSelFly ==
this)
480 assert(rCurrentShell.Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1);
483 rCurrentShell.Imp()->GetDrawView()->UnmarkAll();
487 pFEShell->SetSelection(temp);
494 rCurrentShell.Imp()->GetDrawView()->UnmarkAll();
513 OSL_ENSURE( pMaster && pFollow,
"incomplete chain" );
514 OSL_ENSURE( !pMaster->
GetNextLink(),
"link can not be changed" );
515 OSL_ENSURE( !pFollow->
GetPrevLink(),
"link can not be changed" );
544 OSL_ENSURE( !pFrame->
IsTabFrame() && !pFrame->
FindNext(),
"follow in chain contains content" );
550#if !ENABLE_WASM_STRIP_ACCESSIBILITY
574 OSL_ENSURE( pUpper && pUpper->
IsColBodyFrame(),
"Missing ColumnBody" );
590 OSL_ENSURE( rContent.
GetContentIdx(),
":-( No content prepared." );
598#if !ENABLE_WASM_STRIP_ACCESSIBILITY
650 OSL_ENSURE( !aIter.
Next(),
"chain with more than one instance" );
739 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
743 if(pLegacy->m_pNew && pLegacy->m_pOld &&
RES_ATTRSET_CHG == pLegacy->m_pNew->Which())
753 UpdateAttr_(pOItem, pNItem, eInvFlags, &aOldSet, &aNewSet);
761 UpdateAttr_(pLegacy->m_pOld, pLegacy->m_pNew, eInvFlags);
800 else if (rHint.
GetId() == SfxHintId::SwGetZOrder)
803 const auto& rFormat(
dynamic_cast<const SwFrameFormat&
>(rMod));
804 if (rFormat.Which() ==
RES_FLYFRMFMT && rFormat.getIDocumentLayoutAccess().GetCurrentViewShell())
807 else if (rHint.
GetId() == SfxHintId::SwGetObjectConnected)
810 const auto& rFormat(
dynamic_cast<const SwFrameFormat&
>(rMod));
811 if (!pConnectedHint->m_risConnected && rFormat.Which() ==
RES_FLYFRMFMT && (!pConnectedHint->m_pRoot || pConnectedHint->m_pRoot ==
getRootFrame()))
812 pConnectedHint->m_risConnected =
true;
821 const sal_uInt16 nWhich = pOld ? pOld->
Which() : pNew ? pNew->
Which() : 0;
852 if( RndStdIds::FLY_AT_FLY ==
GetFormat()->GetAnchor().GetAnchorId() )
857 !
GetFormat()->GetSurround().IsContour() )
875#if !ENABLE_WASM_STRIP_ACCESSIBILITY
935 aCol.
Init( nCol, 0, 1000 );
949 if (
aURL.GetMap() && (pNewFormatFrameSize || pOldFormatChg))
952 *pNewFormatFrameSize :
960 aURL.GetMap()->Scale( aScaleX, aScaleY );
962 pFormat->LockModify();
964 pFormat->UnlockModify();
983 !
GetFormat()->GetSurround().IsContour() )
1061#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1091 aURL.GetMap()->Scale( aScaleX, aScaleY );
1093 pFormat->LockModify();
1095 pFormat->UnlockModify();
1147 if ( pOldSet || pNewSet )
1191 if ( pSectFrame && pSectFrame->
GetSection() ==
nullptr )
1210 const SwTwips nNewY = bVert ? rNewPos.X() : rNewPos.Y();
1221 if ( eAnchorType == RndStdIds::FLY_AT_PAGE )
1226 else if ( eAnchorType == RndStdIds::FLY_AT_FLY )
1268 const SwTwips nNewX = bVert ? rNewPos.Y() : rNewPos.X();
1273 if ( eAnchorType == RndStdIds::FLY_AT_PAGE )
1279 else if ( eAnchorType == RndStdIds::FLY_AT_FLY )
1323 OSL_ENSURE( pAttrs,
"FlyFrame::Format, pAttrs is 0." );
1364 if(
IsMinHeight() && (nRemaining + nUL) < nMinHeight )
1365 nRemaining = nMinHeight - nUL;
1373 if ( nRemaining <
MINFLY )
1381 pAnchor = pAnchorChar;
1387 SwTwips nDeadline = GetFlyAnchorBottom(
this, *pAnchor);
1390 if (nBottom > nDeadline)
1392 nRemaining = nDeadline - nTop;
1398 aRectFnSet.
SetHeight( aPrt, nRemaining );
1405 aRectFnSet.
AddBottom( aFrm, nRemaining + nUL );
1409 if ( nRemaining + nUL != 0 )
1419 SdrObject* pShape = pShapeFormat->FindSdrObject();
1424 pCustomShape->SuggestTextFrameSize(aSize);
1426 pCustomShape->NbcSetOutlinerParaObjectForText(std::nullopt,
nullptr);
1454 if ( nNewSize != 0 )
1462 OSL_ENSURE( aRelSize ==
CalcRel( rFrameSz ),
"SwFlyFrame::Format CalcRel problem" );
1472 nNewSize = std::max( nNewSize - nLR, nAutoWidth );
1474 nNewSize = nAutoWidth;
1485 aRectFnSet.
SetWidth( aPrt, nNewSize );
1492 aRectFnSet.
AddRight( aFrm, nNewSize );
1496 if ( nNewSize != 0 )
1517 bool bCollect =
false;
1535 if( pSect->HasFollow() )
1543 InsertEndnotes( pSect );
1566 int nLoopControlRuns = 0;
1568 int nLoopControlRunsInMultiCol = 0;
1569 const int nLoopControlMax = 20;
1570 const SwFrame* pLoopControlCond =
nullptr;
1576 bool const wasFrameLowerOfLay(pLay->
IsAnLower(pFrame));
1587 static_cast<SwTabFrame*
>(pFrame)->m_bCalcLowers =
true;
1591 if (
static_cast<SwTabFrame*
>(pFrame)->IsFollow() &&
1594 static_cast<SwTabFrame*
>(pFrame)->m_bLockBackMove =
true;
1601 pFrame->
Calc(pRenderContext);
1607 static_cast<SwTextFrame*
>(pFrame)->AllowFollowFormat();
1619 SwFlowFrame* pTmpPrevFlowFrame = pTmpPrev && pTmpPrev->
IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pTmpPrev) :
nullptr;
1620 SwFlowFrame* pTmpFlowFrame = pFrame->
IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pFrame) :
nullptr;
1622 bool bPrevInvalid = pTmpPrevFlowFrame && pTmpFlowFrame &&
1623 !pTmpFlowFrame->IsFollow() &&
1625 !pTmpFlowFrame->IsJoinLocked() &&
1629 pTmpPrevFlowFrame->IsKeepFwdMoveAllowed();
1634 bool bAgain =
false;
1635 bool bRestartLayoutProcess =
false;
1645 assert(pAnchoredObj);
1658 bRestartLayoutProcess =
true;
1665 bRestartLayoutProcess =
true;
1672 if ( pAgainObj2 == pAnchoredObj )
1674 OSL_FAIL(
"::CalcContent(..) - loop detected, perform attribute changes to avoid the loop" );
1678 if( css::text::WrapTextMode_THROUGH != aAttr.
GetSurround() )
1683 RndStdIds::FLY_AT_CHAR) &&
1684 (css::text::WrapTextMode_PARALLEL ==
1687 aAttr.
SetSurround( css::text::WrapTextMode_THROUGH );
1691 aAttr.
SetSurround( css::text::WrapTextMode_PARALLEL );
1693 rFormat.LockModify();
1695 rFormat.UnlockModify();
1700 if ( pAgainObj1 == pAnchoredObj )
1701 pAgainObj2 = pAnchoredObj;
1702 pAgainObj1 = pAnchoredObj;
1720 if (bRestartLayoutProcess
1722 && nLoopControlRunsInMultiCol < nLoopControlMax
1725 && (wasFrameLowerOfLay || pLay->
IsAnLower(pFrame)))
1727 bool bIsMultiColumn = pSect && pSect->
GetSection() && pSect->
Lower() &&
1729 if ( bIsMultiColumn )
1730 ++nLoopControlRunsInMultiCol;
1732 pAgainObj1 =
nullptr;
1733 pAgainObj2 =
nullptr;
1741 pFrame->
Calc(pRenderContext);
1747 if ( pFrame && pFrame->
IsInTab() )
1749 if( pFrame && pFrame->
IsInSct() )
1752 if( pTmp != pLay && pLay->
IsAnLower( pTmp ) )
1756 if ( pFrame == pLoopControlCond )
1760 nLoopControlRuns = 0;
1761 pLoopControlCond = pFrame;
1764 if ( nLoopControlRuns < nLoopControlMax )
1767 OSL_FAIL(
"LoopControl in CalcContent" );
1772 if (
static_cast<SwTabFrame*
>(pFrame)->IsFollow() )
1773 static_cast<SwTabFrame*
>(pFrame)->m_bLockBackMove =
false;
1776 pFrame = bPrevInvalid ? pTmpPrev : pFrame->
FindNext();
1777 if( !bPrevInvalid && pFrame && pFrame->
IsSctFrame() && pSect )
1800 ( ( pSect->HasFollow() &&
1814 if( pSect->HasFollow() )
1902 if( nContentHeight != 0)
1910 aNewContentPos.setX(aNewContentPos.getX() + nDiff/2);
1911 else if( aRectFnSet.
IsVert() )
1912 aNewContentPos.setX(aNewContentPos.getX() - nDiff/2);
1914 aNewContentPos.setY(aNewContentPos.getY() + nDiff/2);
1919 aNewContentPos.setX(aNewContentPos.getX() + nDiff);
1920 else if( aRectFnSet.
IsVert() )
1921 aNewContentPos.setX(aNewContentPos.getX() - nDiff);
1923 aNewContentPos.setY(aNewContentPos.getY() + nDiff);
1932 pFrame->InvalidatePos();
1947 if (pWrtSh ==
nullptr)
1955 if (pWrtSh ==
nullptr)
1963 if (pObj ==
nullptr)
1972 if (pView ==
nullptr)
1983 int nTableCount = 0;
1990 pTable =
static_cast<const SwTabFrame*
>(pLower);
1992 if (nTableCount > 1 || pTable ==
nullptr)
1999 if (!pTextFrame->
GetText().trim().isEmpty())
2005 if (nTableCount != 1 || pTable ==
nullptr)
2010 if (pBody ==
nullptr)
2017 return nBodyHeight < nTableHeight + nFrameOffset;
2025 if (pControl && pControl->GetWindow())
2027 pControl->GetWindow()->MouseButtonDown(
MouseEvent());
2033 if (pWrtSh ==
nullptr)
2048 if( nSize > 0 && nDist > (
LONG_MAX - nSize ) )
2096 static_cast<SwFlyFreeFrame*
>(
this)->SetNoMoveOnCheckClip(
true );
2098 static_cast<SwFlyFreeFrame*
>(
this)->SetNoMoveOnCheckClip(
false );
2119 pAnchor = pAnchorChar;
2123 SwTwips nDeadline = GetFlyAnchorBottom(
this, *pAnchor);
2126 SwTwips nMaxGrow = nDeadline - nBottom;
2127 if (nDist > nMaxGrow)
2143 aRectFnSet.
AddBottom(aPrt, nRemaining );
2159 pAnchor = pAnchorChar;
2163 SwTwips nDeadline = GetFlyAnchorBottom(
this, *pAnchor);
2168 SwTwips nMaxGrow = nDeadline - nBottom;
2169 if (nDist > nMaxGrow)
2186 if ( nDist > nHeight )
2195 nVal =
std::min( nDist, nHeight - nFormatHeight );
2210 aRectFnSet.
SetHeight( aFrm, nHeight - nVal );
2214 if ( nHeight - nVal != 0 )
2223 aRectFnSet.
SetHeight( aPrt, nHeight - nVal );
2262 static_cast<SwFlyFreeFrame*
>(
this)->SetNoMoveOnCheckClip(
true );
2264 static_cast<SwFlyFreeFrame*
>(
this)->SetNoMoveOnCheckClip(
false );
2298 Size aAdjustedNewSize( aNewSize );
2306 if ( aAdjustedNewSize.
Width() > aClipRect.
Width() )
2337 if ( pFrame == pUpperFrame )
2362 if ( pPage !=
nullptr )
2378#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2389 if( pVSh && pVSh->
Imp() )
2416 OSL_FAIL(
"SwFrame::AppendDrawObj(..) - anchored object of unexpected type -> object not appended" );
2427 DisconnectFromLayout(
false );
2450 if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID)
2478#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2496#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2533 if ( _bNoInvaOfAsCharAnchoredObjs &&
2534 (pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
2535 == RndStdIds::FLY_AS_CHAR) )
2542 if ( pAnchoredObj->GetPageFrame() &&
2543 pAnchoredObj->GetPageFrame() != pPageFrame )
2545 SwTextFrame* pAnchorCharFrame = pAnchoredObj->FindAnchorCharFrame();
2546 if ( pAnchorCharFrame &&
2547 pAnchoredObj->GetPageFrame() == pAnchorCharFrame->
FindPageFrame() )
2557 pAnchoredObj->UnlockPosition();
2563 if ( pAnchoredObj->ClearedEnvironment() &&
2564 pAnchoredObj->GetPageFrame() &&
2565 pAnchoredObj->GetPageFrame() == pPageFrame )
2567 pAnchoredObj->UnlockPosition();
2568 pAnchoredObj->SetClearedEnvironment(
false );
2578 pAnchoredObj->InvalidateObjPos();
2604 const SwFrame* pAnchorFrame = pObj->GetAnchorFrameContainingAnchPos();
2616 const bool bLow =
IsAnLower( pAnchorFrame );
2623 if ( _bUnlockPosOfObjs )
2636 "<SwLayoutFrame::NotifyFlys() - anchored object of unexpected type" );
2644 if ( _bUnlockPosOfObjs )
2646 pObj->UnlockPosition();
2648 pObj->InvalidateObjPos();
2662 if (
GetFormat()->GetSurround().IsContour() )
2692 nRelHeight -= 2*aBorder.
Height();
2755 int nParagraphCount = 0;
2766 auto const& rParaSet(
static_cast<const SwTextFrame*
>(pFrame)->GetTextNodeForParaProps()->GetSwAttrSet());
2770 if (!
static_cast<const SwTextFrame*
>(pFrame)->IsLocked())
2806 if (nParagraphCount > 1 || nRet > nParentWidth)
2808 return nParentWidth;
2818 const bool _bForPaint )
const
2826 if(
GetFormat()->GetSurround().IsContour())
2832 std::unique_ptr<GraphicObject> xTmpGrfObj;
2835 if ( pGrfNd && _bForPaint )
2842 pGrfObj = xTmpGrfObj.get();
2844 assert(pGrfObj &&
"SwFlyFrame::GetContour() - No Graphic/GraphicObject found at <SwNoTextNode>.");
2845 if (pGrfObj->
GetType() != GraphicType::NONE)
2851 if ( pGrfNd && _bForPaint )
2853 OSL_FAIL(
"SwFlyFrame::GetContour() - No Contour found at <SwNoTextNode> during paint." );
2870 const MapMode aDispMap( MapUnit::MapTwip );
2875 bool bPixelMap = aGrfMap.
GetMapUnit() == MapUnit::MapPixel;
2878 aOrgSize = pOutDev->
PixelToLogic( aGrfSize, aDispMap );
2884 double fScaleX =
static_cast<double>(aOrig.
Width()) / aOrgSize.
Width();
2885 double fScaleY =
static_cast<double>(aOrig.
Height()) / aOrgSize.
Height();
2887 for ( sal_uInt16 j = 0, nPolyCount = rContour.
Count(); j < nPolyCount; j++ )
2898 rPoly[
i ] =
Point(
FRound( aNewPoint.getX() * fScaleX ),
FRound( aNewPoint.getY() * fScaleY ) );
2906 if( !aClip.
Width() )
2911 rContour.
Optimize(PolyOptimizeFlags::CLOSE);
2919 if(
nullptr != pSwFlyFreeFrame &&
2930 bRet = (0 != rContour.
Count());
2934 if(bRet && 0 != rContour.
Count())
2937 static_cast< const SwFlyFreeFrame*
>(
this)->isTransformableSwFrame())
2941 double fRotate, fShearX;
2986 "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." );
2992 "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." );
3013 aFrm.
Pos().setY(_nTop);
3021 aFrm.
Pos().setX(_nLeft);
3055 aVector.push_back( pFlyFrame );
3095 nHeight +=
static_cast<SwTextFrame*
>(pFrame)->GetParHeight()
3108 for (
size_t i = 0;
i < nCnt; ++
i )
3119 if( nDist >
nBorder + nHeight )
3131 switch(rItem.
Which())
std::shared_ptr< SwFrameControl > SwFrameControlPtr
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ FRAME_AUTOWIDTH_WITH_MORE_PARA
static OutputDevice * GetDefaultDevice()
MapMode GetPrefMapMode() const
GraphicType GetType() const
virtual SdrLayerID GetInvisibleControlsId() const =0
virtual SdrLayerID GetHellId() const =0
virtual SdrLayerID GetInvisibleHellId() const =0
virtual SdrLayerID GetHeavenId() const =0
virtual SdrLayerID GetControlsId() const =0
virtual SdrLayerID GetInvisibleHeavenId() const =0
virtual SwLayouter * GetLayouter()=0
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
MapUnit GetMapUnit() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
size_t GetMarkCount() const
bool IsObjMarked(SdrObject const *pObj) const
const SdrMarkList & GetMarkedObjectList() const
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
void BroadcastObjectChange() const
void SetUserCall(SdrObjUserCall *pUser)
sal_uInt32 GetOrdNum() const
void SetResizeProtect(bool bProt)
void SetMoveProtect(bool bProt)
virtual void SetChanged()
SdrPage * getSdrPageFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
T & StaticWhichCast(TypedWhichId< T > nId)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
short GetTextFirstLineOffset() const
tools::Long GetRight() const
tools::Long GetLeft() const
bool IsPosProtected() const
bool IsSizeProtected() const
tools::Long GetRight() const
tools::Long GetHeight() const
tools::Long GetWidth() const
void SetHeight(tools::Long n)
const Size & GetSize() const
void SetWidth(tools::Long n)
tools::Long GetTextLeft() const
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
class for the positioning of drawing objects
wrapper class for the positioning of Writer fly frames and drawing objects
void ClearTmpConsiderWrapInfluence()
const SwFrame * GetAnchorFrame() const
bool PositionLocked() const
SwTwips GetRelCharY(const SwFrame *pFrame) const
void ChgAnchorFrame(SwFrame *_pNewAnchorFrame)
SwTextFrame * FindAnchorCharFrame()
get frame, which contains the anchor character, if the object is anchored at-character or as-characte...
virtual void NotifyBackground(SwPageFrame *_pPageFrame, const SwRect &_rRect, PrepareHint _eHint)=0
method to trigger notification of 'background'
void ResetLayoutProcessBools()
const SwLayoutFrame * GetVertPosOrientFrame() const
void SetCurrRelPos(Point _aRelPos)
void SetDrawObj(SdrObject &_rDrawObj)
virtual SwFrameFormat & GetFrameFormat()=0
SwTwips GetRelCharX(const SwFrame *pFrame) const
SwPageFrame * GetPageFrame()
void ClearVertPosOrientFrame()
const SwRect & GetObjRectWithSpaces() const
method to determine object area inclusive its spacing
virtual void InvalidateObjPos()=0
method to invalidate position of the anchored object
virtual const SwFlyFrame * DynCastFlyFrame() const
void InvalidateObjRectWithSpaces() const
const SdrObject * GetDrawObj() const
virtual SwRect GetObjRect() const =0
virtual bool IsFormatPossible() const
method to determine, if a format on the anchored object is possible
void UpdateObjInSortedList()
method to update anchored object in the <SwSortedObjs> lists
const Point & GetCurrRelPos() const
void ClearItem(sal_uInt16 nWhichL)
const SwAttrSet * GetChgSet() const
What has changed.
const SvxFormatKeepItem & GetKeep(bool=true) const
Container of body content (i.e.
sal_uInt16 CalcRightLine() const
const Size & GetSize() const
sal_uInt16 CalcTopLine() const
sal_uInt16 CalcLeftLine() const
sal_uInt16 CalcBottomLine() const
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwAttrPool & GetAttrPool() const
new class for re-direct methods calls at a 'virtual' drawing object to its referenced object.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
SwFrameControlsManager & GetFrameControlsManager()
static ObjCntType GetObjCntType(const SdrObject &rObj)
general base class for all free-flowing frames
const SwVirtFlyDrawObj * GetVirtDrawObj() const
SwFlyFrame * GetPrevLink() const
virtual void DestroyImpl() override
SwTwips Shrink_(SwTwips, bool bTst)
void MakeContentPos(const SwBorderAttrs &rAttrs)
virtual bool IsFormatPossible() const override
method to determine if a format on the Writer fly frame is possible
virtual const SwFlyFrameFormat * GetFormat() const override
bool IsFlyAtContentFrame() const
static const SwFormatAnchor * GetAnchorFromPoolItem(const SfxPoolItem &rItem)
bool IsFlySplitAllowed() const
Is this fly allowed to split across pages? (Disabled by default.)
virtual bool SetObjLeft_(const SwTwips _nLeft) override
SwFlyFrame * FindChainNeighbour(SwFrameFormat const &rFormat, SwFrame *pAnch=nullptr)
virtual void InvalidateObjPos() override
method to invalidate position of the anchored object
bool IsLowerOf(const SwLayoutFrame *pUpper) const
void ActiveUnfloatButton(SwWrtShell *pWrtSh)
virtual const SwFlyFrame * DynCastFlyFrame() const override
void SelectionHasChanged(SwFEShell *pShell)
Size CalcRel(const SwFormatFrameSize &rSz) const
virtual SwFrameFormat & GetFrameFormat() override
void Invalidate_(SwPageFrame const *pPage=nullptr)
virtual void SwClientNotify(const SwModify &rMod, const SfxHint &rHint) override
virtual SwRect GetObjBoundRect() const override
virtual void MakeObjPos() override
method to determine position for the object and set the position at the object
void UpdateAttr_(const SfxPoolItem *, const SfxPoolItem *, SwFlyFrameInvFlags &, SwAttrSetChg *pa=nullptr, SwAttrSetChg *pb=nullptr)
SwTwips Grow_(SwTwips, bool bTst)
SwFlyFrame * GetNextLink() const
bool GetContour(tools::PolyPolygon &rContour, const bool _bForPaint=false) const
#i13147# - If called for paint and the <SwNoTextFrame> contains a graphic, load of intrinsic graphic ...
static void ChainFrames(SwFlyFrame *pMaster, SwFlyFrame *pFollow)
bool IsFlyInContentFrame() const
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
"Formats" the Frame; Frame and PrtArea.
bool IsFlyLayFrame() const
SwTwips CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips nMinHeight, const SwTwips nUL)
virtual Size ChgSize(const Size &aNewSize) override
void MakePrtArea(const SwBorderAttrs &rAttrs)
void Chain(SwFrame *_pAnchor)
virtual bool SetObjTop_(const SwTwips _nTop) override
friend void Notify(SwFlyFrame *, SwPageFrame *pOld, const SwRect &rOld, const SwRect *pOldPrt)
Notify the background based on the difference between old and new rectangle.
virtual void RegisterAtPage(SwPageFrame &) override
void InitDrawObj(SwFrame const &)
virtual void RegisterAtCorrectPage() override
method to assure that anchored object is registered at the correct page frame
bool IsShowUnfloatButton(SwWrtShell *pWrtSh) const
SwFrame * FindLastLower()
void UpdateUnfloatButton(SwWrtShell *pWrtSh, bool bShow) const
virtual const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() override
virtual bool GetInfo(SfxPoolItem &) const override
Gets information from the Modify.
bool FrameSizeChg(const SwFormatFrameSize &)
const Point & ContentPos() const
virtual void Calc(vcl::RenderContext *pRenderContext) const override
virtual void Cut() override
static void UnchainFrames(SwFlyFrame *pMaster, SwFlyFrame *pFollow)
bool IsFlyFreeFrame() const
SwFlyFrame(SwFlyFrameFormat *, SwFrame *, SwFrame *pAnchor, bool bFollow=false)
virtual ~SwFlyFrame() override
static void GetAnchoredObjects(std::vector< SwAnchoredObject * > &, const SwFormat &rFormat)
virtual SwRect GetObjRect() const override
void ChgRelPos(const Point &rAbsPos)
Change the relative position.
void InvalidateContentPos()
virtual void MakeAll(vcl::RenderContext *pRenderContext) override
bool isTransformableSwFrame() const
bool supportsAutoContour() const
TransformableSwFrame * getTransformableSwFrame()
Content, content of frame (header, footer, fly).
const SwNodeIndex * GetContentIdx() const
const SwRect & getFrameArea() const
virtual basegfx::B2DHomMatrix getFrameAreaTransformation() const
bool isFrameAreaPositionValid() const
const SwRect & getFramePrintArea() const
void setFramePrintAreaValid(bool bNew)
void setFrameAreaPositionValid(bool bNew)
bool isFramePrintAreaValid() const
bool isFrameAreaSizeValid() const
void setFrameAreaSizeValid(bool bNew)
A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
void SetUnfloatTableButton(const SwFlyFrame *pFlyFrame, bool bShow, Point aTopRightPixel=Point())
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
Base class of the Writer layout elements.
const SwBodyFrame * FindBodyFrame() const
std::unique_ptr< SwSortedObjs > m_pDrawObjs
void RemoveFly(SwFlyFrame *pToRemove)
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
void SetDerivedR2L(bool bNew)
void CheckDirChange()
checks the layout direction and invalidates the lower frames recursively, if necessary.
SwTwips Shrink(SwTwips, bool bTst=false, bool bInfo=false)
SwFlyFrame * FindFlyFrame()
bool IsAccessibleFrame() const
SwSectionFrame * FindSctFrame()
SwTabFrame * FindTabFrame()
bool IsColumnFrame() const
void PrepareMake(vcl::RenderContext *pRenderContext)
Prepares the Frame for "formatting" (MakeAll()).
SwFrameType GetType() const
virtual void Calc(vcl::RenderContext *pRenderContext) const
void InvalidateObjs(const bool _bNoInvaOfAsCharAnchoredObjs=true)
const SwSortedObjs * GetDrawObjs() const
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
void AppendFly(SwFlyFrame *pNew)
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
SwLayoutFrame * GetUpper()
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
tools::Long GetPrtBottom() const
SwRootFrame * getRootFrame()
bool IsNoTextFrame() const
void SetCompletePaint() const
virtual const SvxFormatBreakItem & GetBreakItem() const
void RemoveDrawObj(SwAnchoredObject &_rToRemoveObj)
SwPageFrame * FindPageFrame()
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
void AppendDrawObj(SwAnchoredObject &_rNewObj)
SwFrame * FindFooterOrHeader()
virtual const IDocumentDrawModelAccess & getIDocumentDrawModelAccess()
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
void SetDerivedVert(bool bNew)
bool IsLayoutFrame() const
bool IsColBodyFrame() const
These SwFrame inlines are here, so that frame.hxx does not need to include layfrm....
const GraphicObject & GetGrfObj(bool bWait=false) const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
void ChgLowersProp(const Size &rOldSize)
Change size of lowers proportionally.
void AdjustColumns(const SwFormatCol *pCol, bool bAdjustAttributes)
bool IsAnLower(const SwFrame *) const
virtual void MakeAll(vcl::RenderContext *pRenderContext) override
virtual const SwFrameFormat * GetFormat() const
const SwFrame * ContainsAny(const bool _bInvestigateFootnoteForSections=false) const
Method <ContainsAny()> doesn't investigate content of footnotes by default.
virtual void DestroyImpl() override
friend void RestoreContent(SwFrame *, SwLayoutFrame *, SwFrame *pSibling)
const SwFrame * GetLastLower() const
void NotifyLowerObjs(const bool _bUnlockPosOfObjs=false)
force an unlockposition call for the lower objects.
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
friend SwFrame * SaveContent(SwLayoutFrame *, SwFrame *)
void ChgColumns(const SwFormatCol &rOld, const SwFormatCol &rNew, const bool bChgFootnote=false)
add or remove columns from a layoutframe.
const SwFrame * Lower() const
void FormatWidthCols(const SwBorderAttrs &, const SwTwips nBorder, const SwTwips nMinHeight)
Called by Format for Frames and Areas with columns.
void InsertEndnotes(SwSectionFrame const *pSect)
static void CollectEndnotes(SwDoc *pDoc, SwSectionFrame *pSect)
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
void SetContour(const tools::PolyPolygon *pPoly, bool bAutomatic=false)
void GetContour(tools::PolyPolygon &rPoly) const
const tools::PolyPolygon * HasContour() const
Graphic GetGraphic() const
Marks a node in the document model.
SwNodeOffset GetIndex() const
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
bool IsNoTextNode() const
SwContentNode * GetContentNode()
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
PaM is Point and Mark: a selection of the document model.
A page of the document layout.
void AppendFlyToPage(SwFlyFrame *pNew)
void RemoveFlyFromPage(SwFlyFrame *pToRemove)
const SwSortedObjs * GetSortedObjs() const
void RemoveDrawObjFromPage(SwAnchoredObject &_rToRemoveObj)
void AppendDrawObjToPage(SwAnchoredObject &_rNewObj)
tools::Long GetHeight(const SwRect &rRect) const
void SetWidth(SwRect &rRect, tools::Long nNew) const
tools::Long GetWidth(const SwRect &rRect) 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
Point GetPos(const SwRect &rRect) const
void SetXMargins(SwFrame &rFrame, tools::Long nLeft, tools::Long nRight) const
void AddBottom(SwRect &rRect, tools::Long nNew) const
void AddRight(SwRect &rRect, tools::Long nNew) const
tools::Long BottomDist(const SwRect &rRect, tools::Long nPos) const
tools::Long GetPrtBottom(const SwFrame &rFrame) const
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
SwRect & Union(const SwRect &rRect)
void Top(const tools::Long nTop)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
void AddHeight(const tools::Long nAdd)
void AddWidth(const tools::Long nAdd)
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
The root element of a Writer document layout.
SwViewShell * GetCurrShell() const
bool IsAnyShellAccessible() const
void InvalidateBrowseWidth()
void CalcFootnoteContent()
void SetFootnoteLock(bool bNew)
SwTwips Undersize()
Returns the size delta that the section would like to be greater if it has undersized TextFrames in i...
bool IsFootnoteLock() const
const SwSectionFrame * GetFollow() const
class for collecting anchored objects
SwTabFrame is one table in the document layout, containing rows (which contain cells).
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
Represents the visualization of a paragraph.
SwTextFrame * GetFollow()
TextFrameIndex GetOffset() const
SwTwips CalcFitToContent()
Simulates a formatting as if there were not right margin or Flys or other obstacles and returns the w...
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
bool getBrowseMode() const
void DisposeAccessibleFrame(const SwFrame *pFrame, bool bRecursive=false)
void InvalidateAccessibleEditableState(bool bAllShells, const SwFrame *pFrame=nullptr)
Invalidate editable state for all accessible frames.
void AddAccessibleObj(const SdrObject *pObj)
void AddAccessibleFrame(const SwFrame *pFrame)
Add a frame in the accessible view.
void InvalidateAccessibleRelationSet(const SwFlyFrame *pMaster, const SwFlyFrame *pFollow)
Invalidate frame's relation set (for chained frames)
void DisposeAccessibleObj(const SdrObject *pObj, bool bCanSkipInvisible)
SwDrawView * GetDrawView()
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
const SwRect & VisArea() const
sal_Int32 GetBrowseWidth() const
void InvalidateWindows(const SwRect &rRect)
const Size & GetBrowseBorder() const
Used by the UI to modify the document model.
const SwView & GetView() const
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
void transform(const basegfx::B2DHomMatrix &rMatrix)
const Point & GetRelPos() const
calculated relative position for object
virtual void CalcPosition() override
calculate position for object
ring_container GetRingContainer()
Point LogicToPixel(const Point &rLogicPt) const
virtual OUString GetURL() const override
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
void CalcContent(SwLayoutFrame *pLay, bool bNoColl)
static SwTwips lcl_CalcAutoWidth(const SwLayoutFrame &rFrame)
static SwPosition ResolveFlyAnchor(SwFrameFormat const &rFlyFrame)
bool CalcClipRect(const SdrObject *pSdrObj, SwRect &rRect, bool bMove=true)
calculate rectangle in that the object can be moved or rather be resized
@ Fixed
Frame cannot be moved in Var-direction.
@ Variable
Frame is variable in Var-direction.
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
tools::Long FRound(double fVal)
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SwFormatURL > RES_URL(117)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(105)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwFormatWrapInfluenceOnObjPos > RES_WRAP_INFLUENCE_ON_OBJPOS(132)
constexpr TypedWhichId< SvxProtectItem > RES_PROTECT(106)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SdrTextVertAdjustItem > RES_TEXT_VERT_ADJUST(137)
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(120)
constexpr TypedWhichId< SwFormatFlySplit > RES_FLY_SPLIT(129)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
constexpr TypedWhichId< SwFormatFollowTextFlow > RES_FOLLOW_TEXT_FLOW(130)
constexpr TypedWhichId< SwAutoFormatGetDocNode > RES_AUTOFMT_DOCNODE(176)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(168)
tools::Long const nBorder
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
Marks a position in the document model.
const SwContentNode * GetContentNode() const
@ FlyFrameAttributesChanged
@ AdjustSizeWithoutFormatting
void ClrContourCache(const SdrObject *pObj)