66#include <com/sun/star/text/WritingMode2.hpp>
77 struct VirtObjAnchoredAtFramePred
87 while(pContentFrame->IsFollow())
92 VirtObjAnchoredAtFramePred(
const SwFrame* pAnchorFrame)
93 : m_pAnchorFrame(FindFrame(pAnchorFrame))
98 return FindFrame(rpDrawVirtObj->GetAnchorFrame()) == m_pAnchorFrame;
105 if(!pObj || !pAnchor)
107 short nWritingDirection =
108 pAnchor->
IsVertical() ? text::WritingMode2::TB_RL :
110 text::WritingMode2::LR_TB;
127 pRetval = pFlyDrawObj->GetFormat();
178 "<::GetUserCall(..)> - wrong type of found object user call." );
189 return ( SdrTextAniKind::Scroll == eTKind
190 || SdrTextAniKind::Alternate == eTKind || SdrTextAniKind::Slide == eTKind );
214 const bool bNotify( !
GetFormat()->getIDocumentDrawModelAccess().IsVisibleLayerId( _pDrawObj->
GetLayer() ) );
223 assert(pAnchoredObj);
240 const bool bNotify(
GetFormat()->getIDocumentDrawModelAccess().IsVisibleLayerId( _pDrawObj->
GetLayer() ) );
248 assert(pAnchoredObj);
269 OSL_FAIL(
"SwDrawContact::MoveObjToLayer(..) - no drawing object!" );
275 OSL_FAIL(
"SwDrawContact::MoveObjToLayer(..) - no drawing frame format!" );
294 if (
dynamic_cast<const SdrObjGroup*
>( _pDrawObj) != nullptr )
304 nNewLayerId = nToControlLayerId;
311 nNewLayerId = nToHeavenLayerId;
316 _pDrawObj->SdrObject::NbcSetLayer( nNewLayerId );
321 static_cast<SdrObjGroup*
>(_pDrawObj)->GetSubList();
333 if ( nLayerIdOfObj == nFromHellLayerId )
335 _pDrawObj->
SetLayer( nToHellLayerId );
337 else if ( nLayerIdOfObj == nFromHeavenLayerId )
339 _pDrawObj->
SetLayer( nToHeavenLayerId );
341 else if ( nLayerIdOfObj == nFromControlLayerId )
343 _pDrawObj->
SetLayer( nToControlLayerId );
353 std::vector< SwAnchoredObject* > aObjs;
356 while ( !aObjs.empty() )
358 sal_uInt32 nTmpOrdNum = aObjs.back()->GetDrawObj()->GetOrdNum();
360 if ( nTmpOrdNum < nMinOrdNum )
362 nMinOrdNum = nTmpOrdNum;
369 "<SwContact::GetMinOrdNum()> - no order number found." );
376 sal_uInt32 nMaxOrdNum( 0 );
378 std::vector< SwAnchoredObject* > aObjs;
381 while ( !aObjs.empty() )
383 sal_uInt32 nTmpOrdNum = aObjs.back()->GetDrawObj()->GetOrdNum();
385 if ( nTmpOrdNum > nMaxOrdNum )
387 nMaxOrdNum = nTmpOrdNum;
404 bool bRelToTableCell(
false);
424 if (rHint.
GetId() == SfxHintId::SwFindSdrObject)
427 if(!pFindSdrObjectHint->m_rpObject)
430 else if (rHint.
GetId() == SfxHintId::SwWW8AnchorConv)
436 std::vector<SwAnchoredObject*> aAnchoredObjs;
438 if(!aAnchoredObjs.empty())
439 pAnchoredObj = aAnchoredObjs.front();
451 const bool bFollowTextFlow =
static_cast<const SwFrameFormat&
>(rMod).GetFollowTextFlow().GetValue();
504 SAL_INFO(
"sw",
"GetOrdNumForNewRef: cannot find SdrObject for text box's shape");
509 for(pFlyFrame = aIter.
First(); pFlyFrame; pFlyFrame = aIter.
Next())
511 if(pFlyFrame != pFly)
540 pDrawObj->SetUserCall(pContact);
559 return pDrawObj.get();
568 "<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belong to this contact");
573 return pRetAnchoredObj;
595 if (
GetFormat()->getIDocumentDrawModelAccess().IsVisibleLayerId( _pDrawObj->
GetLayer() ) )
605 if ( !pFlyFrame->
Lower() )
635 if ( !
GetFormat()->getIDocumentDrawModelAccess().IsVisibleLayerId( _pDrawObj->
GetLayer() ) )
669 if(rHint.
GetId() == SfxHintId::SwGetZOrder)
676 if (pFormat && pFormat->Which() ==
RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell())
689 const SdrObjList *pLst = pObjGroup->GetSubList();
704 mbMasterObjCleared( false ),
705 mbDisconnectInProgress( false ),
706 mbUserCallActive( false ),
771 assert(
dynamic_cast<const SwDrawVirtObj*
>(pSdrObj) !=
nullptr ||
772 dynamic_cast<const SdrVirtObj*
>(pSdrObj) ==
nullptr);
775 "<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
779 if (
auto pVirtObj =
dynamic_cast<const SwDrawVirtObj*
>(pSdrObj))
781 pRetAnchoredObj = &(pVirtObj->GetAnchoredObj());
785 assert(
dynamic_cast<const SdrVirtObj*
>(pSdrObj) ==
nullptr);
789 return pRetAnchoredObj;
806 const SwFrame* pAnchorFrame =
nullptr;
816 assert(
dynamic_cast<SwDrawVirtObj const*
>(_pDrawObj) !=
nullptr);
847 rpDrawVirtObj->RemoveFromWriterLayout();
848 rpDrawVirtObj->RemoveFromDrawingPage();
850 rpDrawVirtObj->AnchoredObj().ClearDrawObj();
862 const SwFrame* pProposedAnchorFrame = &_rAnchorFrame;
867 while ( pTmpFrame->IsFollow() )
871 pProposedAnchorFrame = pTmpFrame;
875 if ( pMasterObjAnchorFrame && pMasterObjAnchorFrame->
IsContentFrame() )
879 while ( pTmpFrame->IsFollow() )
883 pMasterObjAnchorFrame = pTmpFrame;
886 if ( pMasterObjAnchorFrame && pMasterObjAnchorFrame == pProposedAnchorFrame )
893 VirtObjAnchoredAtFramePred(pProposedAnchorFrame)));
895 pRetDrawObj = ppFoundVirtObj->get();
910 if( pOldBoundRect && pPage )
912 SwRect aOldRect( *pOldBoundRect );
945 if( _pOldObjRect && pPageFrame )
947 SwRect aOldRect( *_pOldObjRect );
958 if( aNewRect.
HasArea() && pPageFrame )
989 bool bHasActions(
true);
998 if ( rShell.Imp()->IsAction() || rShell.Imp()->IsIdleAction() )
1003 bHasActions =
false;
1060 bool bTmpAssert(
true );
1082 OSL_FAIL(
"<SwDrawContact::Changed_(..)> - unknown nested <UserCall> event. This is serious." );
1095 aResizeSet.
Put(aSize);
1124 case SdrUserCallType::Delete:
1140 case SdrUserCallType::Inserted:
1144 OSL_FAIL(
"<SwDrawContact::Changed_(..)> - Insert event during disconnection from layout is invalid." );
1156 case SdrUserCallType::Removed:
1165 case SdrUserCallType::ChildInserted :
1166 case SdrUserCallType::ChildRemoved :
1179 if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID)
1195 case SdrUserCallType::MoveOnly:
1196 case SdrUserCallType::Resize:
1197 case SdrUserCallType::ChildMoveOnly :
1198 case SdrUserCallType::ChildResize :
1199 case SdrUserCallType::ChildChangeAttr :
1200 case SdrUserCallType::ChildDelete :
1208 if(!pAnchoredDrawObj)
1261 switch ( eLayoutDir )
1265 nXPosDiff = aObjRect.
Left() - aOldObjRect.
Left();
1266 nYPosDiff = aObjRect.
Top() - aOldObjRect.
Top();
1271 nXPosDiff = aOldObjRect.
Right() - aObjRect.
Right();
1272 nYPosDiff = aObjRect.
Top() - aOldObjRect.
Top();
1277 nXPosDiff = aObjRect.
Top() - aOldObjRect.
Top();
1278 nYPosDiff = aOldObjRect.
Right() - aObjRect.
Right();
1283 assert(!
"<SwDrawContact::Changed_(..)> - unsupported layout direction");
1288 if ( nYPosDiff != 0 )
1293 nYPosDiff = -nYPosDiff;
1301 if ( !bAnchoredAsChar && nXPosDiff != 0 )
1309 ( !bAnchoredAsChar && nXPosDiff != 0 ) )
1318 ->SetLastObjRect( aObjRect );
1325 if ( bAnchoredAsChar )
1336 else if (
eType == SdrUserCallType::Resize)
1346 &&
GetFormat()->GetOtherTextBoxFormats())
1360 bool bRelToTableCell(
false);
1363 text::RelOrientation::PAGE_FRAME));
1366 auto pSdrObj =
const_cast<SdrObject*
>(&rObj);
1389 case SdrUserCallType::ChangeAttr:
1404 sal_uInt16 nWhich = _rItem.
Which();
1408 pAnchorFormat =
static_cast<const SwAttrSetChg&
>(_rItem).GetChgSet()->
1415 return pAnchorFormat;
1423 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
1429 sal_uInt16 nWhich = pNew ? pNew->
Which() : 0;
1430 if(
const SwFormatAnchor* pNewAnchorFormat = pNew ? lcl_getAnchorFormat(*pNew) :
nullptr)
1447 pOldRect = &aOldRect;
1455 const SwFormatAnchor* pOldAnchorFormat = pLegacyHint->m_pOld ? lcl_getAnchorFormat(*pLegacyHint->m_pOld) :
nullptr;
1456 if(!pOldAnchorFormat || (pOldAnchorFormat->
GetAnchorId() != pNewAnchorFormat->GetAnchorId()))
1465 SAL_WARN(
"sw.core",
"SwDrawContact::Modify: no draw object here?");
1478 bool bUpdateSortedObjsList(
false);
1494 bUpdateSortedObjsList =
true;
1498 auto pChgSet =
static_cast<const SwAttrSetChg*
>(pNew)->GetChgSet();
1499 if(pChgSet->GetItemState(
RES_SURROUND,
false) == SfxItemState::SET ||
1500 pChgSet->GetItemState(
RES_OPAQUE,
false) == SfxItemState::SET ||
1502 bUpdateSortedObjsList =
true;
1506 assert(!
"<SwDraw Contact::Modify(..)> - unhandled attribute?");
1516 else if (rHint.
GetId() == SfxHintId::SwDrawFrameFormat)
1519 switch(pDrawFrameFormatHint->m_eId)
1553 else if (rHint.
GetId() == SfxHintId::SwCheckDrawFrameFormatLayer)
1558 else if (rHint.
GetId() == SfxHintId::SwContactChanged)
1561 if(!*pContactChangedHint->m_ppObject)
1563 auto pObject = *pContactChangedHint->m_ppObject;
1566 else if (rHint.
GetId() == SfxHintId::SwDrawFormatLayoutCopy)
1571 pDrawFormatLayoutCopyHint->m_rDestDoc.CloneSdrObj(
1573 pDrawFormatLayoutCopyHint->m_rDestDoc.IsCopyIsMove() && &pDrawFormatLayoutCopyHint->m_rDestDoc == rFormat.
GetDoc());
1575 &pDrawFormatLayoutCopyHint->m_rDestFormat, xNewObj.get() );
1580 pDrawFormatLayoutCopyHint->m_rDestFormat.PosAttrSet();
1582 else if (rHint.
GetId() == SfxHintId::SwRestoreFlyAnchor)
1590 pDrawModel->GetPage(0)->InsertObject(pObj);
1594 else if (rHint.
GetId() == SfxHintId::SwCreatePortion)
1597 if(*pCreatePortionHint->m_ppContact)
1608 else if (rHint.
GetId() == SfxHintId::SwCollectTextObjects)
1618 while(aListIter.
IsMore())
1621 if(pTextObj && pTextObj->
HasText())
1622 pCollectTextObjectsHint->m_rTextObjects.push_back(pTextObj);
1627 if(pTextObj->HasText())
1628 pCollectTextObjectsHint->m_rTextObjects.push_back(pTextObj);
1631 else if (rHint.
GetId() == SfxHintId::SwGetZOrder)
1638 else if (rHint.
GetId() == SfxHintId::SwGetObjectConnected)
1659 if ( _bUpdateSortedObjsList )
1670 if ( _bUpdateSortedObjsList )
1681 if ( _bMoveMasterToInvisibleLayer &&
1694 rpVirtDrawObj->RemoveFromWriterLayout();
1695 rpVirtDrawObj->RemoveFromDrawingPage();
1734 RemoveObject(
GetMaster()->GetOrdNum() );
1747 if (
auto pSwDrawVirtObj =
dynamic_cast<SwDrawVirtObj*
>( _pDrawObj) )
1749 pSwDrawVirtObj->RemoveFromWriterLayout();
1750 pSwDrawVirtObj->RemoveFromDrawingPage();
1792 while (pAct && nTextOffset >= pAct->
GetOffset());
1801 OSL_FAIL(
"<SwDrawContact::ConnectToLayout(..)> called during disconnection.");
1809 OSL_FAIL(
"<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" );
1825 pAnch = &(pDrawFrameFormat->
GetAnchor());
1830 case RndStdIds::FLY_AT_PAGE:
1839 for ( sal_uInt16
i = 1;
i <
nPgNum && pPage; ++
i )
1854 case RndStdIds::FLY_AT_CHAR:
1855 case RndStdIds::FLY_AT_PARA:
1856 case RndStdIds::FLY_AT_FLY:
1857 case RndStdIds::FLY_AS_CHAR:
1859 if ( pAnch->
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
1868 sw::BroadcastingModify *pModify =
nullptr;
1871 if ( pAnch->
GetAnchorId() == RndStdIds::FLY_AT_FLY )
1882 if( pFlyFormat->GetContent().GetContentIdx() &&
1883 rIdx == pFlyFormat->GetContent().GetContentIdx()->GetNode() )
1885 pModify = pFlyFormat;
1908 SwFrame* pAnchorFrameOfMaster =
nullptr;
1922 if (bControlInHF && pAnchorFrameOfMaster)
1926 if (RndStdIds::FLY_AT_FLY == pAnch->
GetAnchorId())
1930 assert(pFrame->IsTextFrame());
1936 if ( RndStdIds::FLY_AT_FLY == pAnch->
GetAnchorId() && !pFrame->IsFlyFrame() )
1938 pFrame = pFrame->FindFlyFrame();
1943 if ((pAnch->
GetAnchorId() == RndStdIds::FLY_AS_CHAR) &&
1944 pFrame->IsTextFrame() )
1951 if ( !pAnchorFrameOfMaster )
1954 pAnchorFrameOfMaster = pFrame;
1998 if ( pAnch->
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
2002 pFrame->AppendDrawObj( pDrawVirtObj->
AnchoredObj() );
2007 if ( pAnch->
GetAnchorId() == RndStdIds::FLY_AS_CHAR )
2009 pFrame->InvalidatePrt();
2016 assert(!
"Unknown Anchor.");
2053 OSL_FAIL(
"<SwDrawContact::ChkPage()> called during disconnection." );
2109 o_rAnchoredObjs.push_back(&rpDrawVirtObj->AnchoredObj());
2121 class VOCOfDrawVirtObj :
public ViewObjectContactOfSdrObj
2135 VOCOfDrawVirtObj(ObjectContact& rObjectContact, ViewContact& rViewContact)
2136 : ViewObjectContactOfSdrObj(rObjectContact, rViewContact)
2141 class VCOfDrawVirtObj :
public ViewContactOfVirtObj
2149 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
override;
2154 : ViewContactOfVirtObj(rObj)
2175 for(sal_uInt32
a(0);
a < nSubHierarchyCount;
a++)
2191 if(!aNewSequence.empty())
2202 if(!aViewRange.
overlaps(aObjectRange))
2205 aNewSequence.clear();
2209 if(!aNewSequence.empty())
2211 rxTarget.
append(aNewSequence);
2221 assert(isPrimitiveVisible(rDisplayInfo));
2225 DisplayInfo aDisplayInfo(rDisplayInfo);
2227 const VCOfDrawVirtObj& rVC =
static_cast< const VCOfDrawVirtObj&
>(GetViewContact());
2228 const SdrObject& rReferencedObject = rVC.GetSwDrawVirtObj().GetReferencedObj();
2233 const Point aLocalOffset(rVC.GetSwDrawVirtObj().GetOffset());
2235 if(aLocalOffset.X() || aLocalOffset.Y())
2237 aOffsetMatrix.
set(0, 2, aLocalOffset.X());
2238 aOffsetMatrix.
set(1, 2, aLocalOffset.Y());
2241 if(
dynamic_cast<const SdrObjGroup*
>( &rReferencedObject) !=
nullptr)
2259 if(!xRetval.empty())
2266 rVisitor.
visit(xRetval);
2269 ViewObjectContact& VCOfDrawVirtObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
2271 return *(
new VOCOfDrawVirtObj(rObjectContact, *
this));
2279 return std::make_unique<sdr::contact::VCOfDrawVirtObj>(*
this);
2287 mrDrawContact(_rDrawContact)
2300 mrDrawContact(rSource.mrDrawContact)
2365 assert(
dynamic_cast<SwFlyFrame const*
>(pAnchoredObj));
2389 if (
nullptr != pDrawPg )
2501 for(
size_t i=0;
i < cnt; ++
i)
2507 tmpList.
MoveTo(rHdlList);
sal_Int32 GetNumerator() const
sal_Int32 GetDenominator() const
virtual SdrLayerID GetInvisibleControlsId() const =0
virtual SdrLayerID GetHellId() const =0
virtual SdrLayerID GetInvisibleHellId() const =0
virtual SdrLayerID GetHeavenId() const =0
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual SdrLayerID GetControlsId() const =0
virtual SdrLayerID GetInvisibleHeavenId() const =0
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual void SetEnableSetModified(bool bEnableSetModified)=0
virtual bool IsEnableSetModified() const =0
helper class for method <SwDrawContact::Changed_(..)> for handling nested <SdrObjUserCall> events
void AssertNestedUserCall()
bool mbParentUserCallActive
void DrawContactDeleted()
NestedUserCallHdl(SwDrawContact *_pDrawContact, SdrUserCallType _eEventType)
SwDrawContact * mpDrawContact
SdrUserCallType meParentUserCallEventType
bool IsNestedUserCall() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long getY() const
void MoveTo(SdrHdlList &rOther)
size_t GetHdlCount() const
SdrHdl * GetHdl(size_t nNum) const
void SetPos(const Point &rPnt)
const Point & GetPos() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual rtl::Reference< SdrObject > ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
virtual SdrObject * SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect)
sal_uInt32 GetOrdNumDirect() const
virtual void NbcSetAnchorPos(const Point &rPnt)
SdrObjUserCall * GetUserCall() const
void ActionChanged() const
virtual void NbcSetLayer(SdrLayerID nLayer)
const tools::Rectangle & getOutRectangle() const
void notifyShapePropertyChange(const svx::ShapePropertyProviderId _eProperty) const
void SetUserCall(SdrObjUserCall *pUser)
virtual SdrInventor GetObjInventor() const
sal_uInt32 GetOrdNum() const
virtual void Move(const Size &rSiz)
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrModel & getSdrModelFromSdrObject() const
virtual const tools::Rectangle & GetSnapRect() const
SdrObjUserCall * m_pUserCall
bool IsGroupObject() const
sdr::contact::ViewContact & GetViewContact() const
void SetOrdNum(sal_uInt32 nNum)
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
virtual SdrObjKind GetObjIdentifier() const
virtual void SetContextWritingMode(const sal_Int16 _nContextWritingMode)
SdrPage * getSdrPageFromSdrObject() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
void setOutRectangle(tools::Rectangle const &rRectangle)
virtual void SetRelativePos(const Point &rPnt)
virtual void NbcMove(const Size &rSiz)
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
SdrPageView * GetSdrPageView() const
virtual bool HasText() const override
const SdrObject & GetReferencedObj() const
rtl::Reference< SdrObject > mxRefObj
tools::Rectangle aSnapRect
SdrObject & ReferencedObj()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
class for the positioning of drawing objects
virtual SwFrameFormat & GetFrameFormat() override
std::optional< tools::Rectangle > const & GetLastObjRect() const
bool NotYetPositioned() const
virtual void RegisterAtPage(SwPageFrame &) override
wrapper class for the positioning of Writer fly frames and drawing objects
const SwFrame * GetAnchorFrame() const
Point GetRelPosToLine() const
method to determine position of anchored object relative to top of line
void SetPageFrame(SwPageFrame *_pNewPageFrame)
void ResetLayoutProcessBools()
SwFrame * GetAnchorFrameContainingAnchPos()
determine anchor frame containing the anchor position
void SetDrawObj(SdrObject &_rDrawObj)
virtual SwFrameFormat & GetFrameFormat()=0
virtual void MakeObjPos()=0
method to determine position for the object and set the position at the object
Point GetRelPosToChar() const
method to determine position of anchored object relative to anchor character
SwPageFrame * GetPageFrame()
SwPageFrame * FindPageFrameOfAnchor()
method to determine the page frame, on which the 'anchor' of the given anchored object is.
const SwRect & GetObjRectWithSpaces() const
method to determine object area inclusive its spacing
virtual void InvalidateObjPos()=0
method to invalidate position of the anchored object
Point GetRelPosToPageFrame(const bool _bFollowTextFlow, bool &_obRelToTableCell) const
method to determine position of anchored object relative to page frame
void InvalidateObjRectWithSpaces() const
const SdrObject * GetDrawObj() const
virtual SwRect GetObjRect() const =0
Point GetRelPosToAnchorFrame() const
method to determine position of anchored object relative to anchor frame
void UpdateObjInSortedList()
method to update anchored object in the <SwSortedObjs> lists
bool IsPositioningInProgress() const
is positioning of anchored object in progress
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...
SwTextFrame * FindMaster() const
IDocumentState const & getIDocumentState() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwAttrPool & GetAttrPool() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
bool SetFlyFrameAttr(SwFrameFormat &rFlyFormat, SfxItemSet &rSet)
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
new class for re-direct methods calls at a 'virtual' drawing object to its referenced object.
virtual void SetLayer(SdrLayerID nLayer) override
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
virtual void RecalcBoundRect() override
All overridden methods which need to use the offset.
virtual void NbcSetLayer(SdrLayerID nLayer) override
virtual void SetSnapRect(const tools::Rectangle &rRect) override
virtual const tools::Rectangle & GetSnapRect() const override
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual ::basegfx::B2DPolyPolygon TakeContour() const override
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
const SwFrame * GetAnchorFrame() const
virtual ~SwDrawVirtObj() override
virtual const tools::Rectangle & GetCurrentBoundRect() const override
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
SwAnchoredObject & AnchoredObj()
virtual void RecalcSnapRect() override
virtual const tools::Rectangle & GetLogicRect() const override
virtual bool HasTextEdit() const override
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
AW: Need own sdr::contact::ViewContact since AnchorPos from parent is not used but something own (top...
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
void RemoveFromDrawingPage()
virtual Point GetPoint(sal_uInt32 i) const override
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
virtual void NbcMove(const Size &rSiz) override
SwDrawContact & mrDrawContact
writer-drawing contact object the 'virtual' drawing object is controlled by.
void RemoveFromWriterLayout()
virtual void NbcSetAnchorPos(const Point &rPnt) override
SwDrawVirtObj(SdrModel &rSdrModel, SdrObject &_rNewObj, SwDrawContact &_rDrawContact)
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const override
virtual void SetLogicRect(const tools::Rectangle &rRect) override
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
virtual const tools::Rectangle & GetLastBoundRect() const override
virtual void SetBoundRectDirty() override
bool IsConnected() const
is 'virtual' drawing object connected to writer layout and / to drawing layer.
virtual Point GetOffset() const override
access to offset
void AddToDrawingPage(SwFrame const &rAnchorFrame)
connection to drawing layer
const SwAnchoredObject & GetAnchoredObj() const
connection to writer layout
virtual void Move(const Size &rSiz) override
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual Point GetSnapPoint(sal_uInt32 i) const override
virtual SdrLayerID GetLayer() const override
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
SwAnchoredDrawObject maAnchoredDrawObj
anchored drawing object instance for the 'virtual' drawing object
general base class for all free-flowing frames
const SwVirtFlyDrawObj * GetVirtDrawObj() const
void Chain(SwFrame *_pAnchor)
static void GetAnchoredObjects(std::vector< SwAnchoredObject * > &, const SwFormat &rFormat)
bool isFrameAreaPositionValid() const
Base class of the Writer layout elements.
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
const SwSortedObjs * GetDrawObjs() const
bool IsRightToLeft() const
void RemoveDrawObj(SwAnchoredObject &_rToRemoveObj)
bool IsContentFrame() const
SwPageFrame * FindPageFrame()
void AppendDrawObj(SwAnchoredObject &_rNewObj)
SwFrame * FindFooterOrHeader()
const SwFrame * Lower() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwContentNode * GetContentNode()
SwContentNode * GoNext(SwNodeIndex *) const
A page of the document layout.
sal_uInt16 GetPhyPageNum() const
Of course Writer needs its own rectangles.
void Pos(const Point &rNew)
tools::Rectangle SVRect() const
The root element of a Writer document layout.
void StartAllAction()
Set up Start-/EndAction for all Shells on an as high as possible (Shell section) level.
bool IsCallbackActionEnabled() const
void SetAssertFlyPages()
Makes sure that all requested page-bound Flys find a Page.
class for collecting anchored objects
static bool syncTextBoxSize(SwFrameFormat *pShape, SdrObject *pObj)
Sets the correct size of textframe depending on the given SdrObject.
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
static bool changeAnchor(SwFrameFormat *pShape, SdrObject *pObj)
Sets the anchor of the associated textframe of the given shape, and returns true on success.
static void syncFlyFrameAttr(SwFrameFormat &rShape, SfxItemSet const &rSet, SdrObject *pObj)
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
static void synchronizeGroupTextBoxProperty(bool pFunc(SwFrameFormat *, SdrObject *), SwFrameFormat *pFormat, SdrObject *pObj)
Calls the method given by pFunc with every textboxes of the group given by pFormat.
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
Represents the visualization of a paragraph.
SwTextFrame * GetFollow()
TextFrameIndex GetOffset() const
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
SwRootFrame * GetLayout() const
bool IsInConstructor() const
static void AddExistingShapeToFormat(SdrObject const &_rObj)
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
void transform(const basegfx::B2DHomMatrix &rMatrix)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
bool overlaps(const Range2D &rRange) const
void append(const Primitive2DReference &)
virtual void visit(const Primitive2DReference &)=0
ring_container GetRingContainer()
EmbeddedObjectRef * pObject
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_REMOVE_UNO_OBJECT(181)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
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< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
constexpr TypedWhichId< SwFormatFollowTextFlow > RES_FOLLOW_TEXT_FLOW(130)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
#define SAL_INFO_IF(condition, area, stream)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
void ForAllViews(const SdrPage *pPage, std::function< void(SdrView *)> f)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
@ POST_RESTORE_FLY_ANCHOR
Marks a position in the document model.
SwDrawContact ** m_ppContact
WW8AnchorConv m_eHoriConv
WW8AnchorConv m_eVertConv
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
@ FlyFrameAttributesChanged
void ClrContourCache(const SdrObject *pObj)