LibreOffice Module sw (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SwDrawContact Class Referencefinal

#include <dcontact.hxx>

Inheritance diagram for SwDrawContact:
[legend]
Collaboration diagram for SwDrawContact:
[legend]

Public Member Functions

 SwDrawContact (SwFrameFormat *pToRegisterIn, SdrObject *pObj)
 
virtual ~SwDrawContact () override
 
virtual const SwAnchoredObjectGetAnchoredObj (const SdrObject *_pSdrObj) const override
 
virtual SwAnchoredObjectGetAnchoredObj (SdrObject *_pSdrObj) override
 
virtual const SdrObjectGetMaster () const override
 
virtual SdrObjectGetMaster () override
 
const SwFrameGetAnchorFrame (const SdrObject *_pDrawObj=nullptr) const
 
SwFrameGetAnchorFrame (SdrObject const *_pDrawObj=nullptr)
 
const SwPageFrameGetPageFrame () const
 
SwPageFrameGetPageFrame ()
 
void ChkPage ()
 
SwPageFrameFindPage (const SwRect &rRect)
 
void ConnectToLayout (const SwFormatAnchor *pAnch=nullptr)
 Inserts SdrObject in the arrays of the layout ((SwPageFrame and SwFrame). More...
 
void InsertMasterIntoDrawPage ()
 method to insert 'master' drawing object into drawing page More...
 
void DisconnectFromLayout (bool _bMoveMasterToInvisibleLayer=true)
 
void DisconnectObjFromLayout (SdrObject *_pDrawObj)
 disconnect for a dedicated drawing object - could be 'master' or 'virtual'. More...
 
void RemoveMasterFromDrawPage ()
 method to remove 'master' drawing object from drawing page. More...
 
SdrObjectGetDrawObjectByAnchorFrame (const SwFrame &_rAnchorFrame)
 get drawing object ('master' or 'virtual') by frame. More...
 
virtual void Changed (const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect) override
 Virtual methods of SdrObjUserCall. More...
 
void Changed_ (const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle *pOldBoundRect)
 Used by Changed() and by UndoDraw. More...
 
void ChangeMasterObject (SdrObject *pNewMaster)
 Moves all SW-connections to new Master) More...
 
SwDrawVirtObjAddVirtObj ()
 add a 'virtual' drawing object to drawing page. More...
 
void NotifyBackgrdOfAllVirtObjs (const tools::Rectangle *pOldBoundRect)
 
virtual void GetAnchoredObjs (std::vector< SwAnchoredObject * > &_roAnchoredObjs) const override
 get data collection of anchored objects, handled by with contact More...
 
- Public Member Functions inherited from SwContact
 SwContact (SwFrameFormat *pToRegisterIn)
 For reader. Only the connection is created. More...
 
virtual ~SwContact () override
 
SwFrameFormatGetFormat ()
 
const SwFrameFormatGetFormat () const
 
bool IsInDTOR () const
 
virtual void MoveObjToVisibleLayer (SdrObject *_pDrawObj)
 method to move drawing object to corresponding visible layer More...
 
virtual void MoveObjToInvisibleLayer (SdrObject *_pDrawObj)
 method to move drawing object to corresponding invisible layer More...
 
const SwFormatAnchorGetAnchorFormat () const
 some virtual helper methods for information about the object (Writer fly frame resp. More...
 
RndStdIds GetAnchorId () const
 
bool ObjAnchoredAtPage () const
 
bool ObjAnchoredAtFly () const
 
bool ObjAnchoredAtPara () const
 
bool ObjAnchoredAtChar () const
 
bool ObjAnchoredAsChar () const
 
const SwPositionGetContentAnchor () const
 
sal_uInt32 GetMinOrdNum () const
 get minimum order number of anchored objects handled by with contact More...
 
sal_uInt32 GetMaxOrdNum () const
 get maximum order number of anchored objects handled by with contact More...
 
- Public Member Functions inherited from SdrObjUserCall
virtual ~SdrObjUserCall ()
 
- Public Member Functions inherited from SwClient
 SwClient ()
 
 SwClient (SwClient &&) noexcept
 
virtual ~SwClient () override
 
virtual void Modify (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
std::unique_ptr< sw::ModifyChangedHintCheckRegistration (const SfxPoolItem *pOldValue)
 
virtual void ModifyNotification (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
void SwClientNotifyCall (const SwModify &rModify, const SfxHint &rHint)
 
const SwModifyGetRegisteredIn () const
 
SwModifyGetRegisteredIn ()
 
void EndListeningAll ()
 
void StartListeningToSameModifyAs (const SwClient &)
 
virtual bool GetInfo (SfxPoolItem &) const
 
- Public Member Functions inherited from sw::WriterListener
bool IsLast () const
 

Static Public Member Functions

static void GetTextObjectsFromFormat (std::list< SdrTextObj * > &, SwDoc *)
 get data collection of anchored objects, handled by with contact More...
 

Private Member Functions

void RemoveAllVirtObjs ()
 remove 'virtual' drawing objects and destroy them. More...
 
void InvalidateObjs_ (const bool _bUpdateSortedObjsList=false)
 
 SwDrawContact (const SwDrawContact &)=delete
 
SwDrawContactoperator= (const SwDrawContact &)=delete
 
virtual void SwClientNotify (const SwModify &, const SfxHint &rHint) override
 

Private Attributes

SwAnchoredDrawObject maAnchoredDrawObj
 anchored drawing object instance for the 'master' drawing object More...
 
std::vector< SwDrawVirtObjPtrmaDrawVirtObjs
 container for 'virtual' drawing object supporting drawing objects in headers/footers. More...
 
bool mbMasterObjCleared: 1
 boolean indicating set 'master' drawing object has been cleared. More...
 
bool mbDisconnectInProgress: 1
 internal flag to indicate that disconnect from layout is in progress More...
 
bool mbUserCallActive: 1
 Needed data for handling of nested <SdrObjUserCall> events in method <Changed_(..)> More...
 
SdrUserCallType meEventTypeOfCurrentUserCall
 event type, which is handled for <mpSdrObjHandledByCurrentUserCall>. More...
 

Friends

class NestedUserCallHdl
 

Additional Inherited Members

- Protected Member Functions inherited from SwContact
void SetInDTOR ()
 
- Protected Member Functions inherited from SwClient
 SwClient (SwModify *pToRegisterIn)
 
SwModifyGetRegisteredInNonConst () const
 
- Protected Member Functions inherited from sw::WriterListener
 WriterListener ()
 
virtual ~WriterListener () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

Definition at line 305 of file dcontact.hxx.

Constructor & Destructor Documentation

SwDrawContact::SwDrawContact ( const SwDrawContact )
privatedelete

Referenced by SwClientNotify().

SwDrawContact::SwDrawContact ( SwFrameFormat pToRegisterIn,
SdrObject pObj 
)
SwDrawContact::~SwDrawContact ( )
overridevirtual

Member Function Documentation

SwDrawVirtObj * SwDrawContact::AddVirtObj ( )

add a 'virtual' drawing object to drawing page.

Definition at line 813 of file dcontact.cxx.

References GetMaster(), and maDrawVirtObjs.

Referenced by AppendObj(), and ConnectToLayout().

void SwDrawContact::Changed ( const SdrObject rObj,
SdrUserCallType  eType,
const tools::Rectangle rOldBoundRect 
)
overridevirtual
void SwDrawContact::Changed_ ( const SdrObject rObj,
SdrUserCallType  eType,
const tools::Rectangle pOldBoundRect 
)

Used by Changed() and by UndoDraw.

Notifies paragraphs that have to get out of the way.

Definition at line 1084 of file dcontact.cxx.

References NestedUserCallHdl::AssertNestedUserCall(), CheckControlLayer(), ConnectToLayout(), DisconnectFromLayout(), NestedUserCallHdl::DrawContactDeleted(), SwAnchoredObject::DrawObj(), GetAnchoredObj(), IDocumentDrawModelAccess::GetControlsId(), SwFormat::GetDoc(), SwContact::GetFormat(), SwAnchoredDrawObject::GetFrameFormat(), SwFormat::GetHoriOrient(), IDocumentDrawModelAccess::GetInvisibleControlsId(), IDocumentDrawModelAccess::GetInvisibleHeavenId(), IDocumentDrawModelAccess::GetInvisibleHellId(), SwAnchoredDrawObject::GetLastObjRect(), SdrObject::GetLayer(), SwFrameFormat::GetLayoutDir(), SdrObject::getParentSdrObjectFromSdrObject(), SwFormatHoriOrient::GetPos(), SwClient::GetRegisteredInNonConst(), SwFormatHoriOrient::GetRelationOrient(), tools::Rectangle::GetSize(), SdrObject::GetSnapRect(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), SwFormat::GetVertOrient(), SwFrameFormat::HORI_L2R, SwFrameFormat::HORI_R2L, SwAnchoredObject::InvalidateObjRectWithSpaces(), InvalidateObjs_(), SwDoc::IsInDtor(), NestedUserCallHdl::IsNestedUserCall(), SwAnchoredObject::IsPositioningInProgress(), lcl_NotifyBackgroundOfObj(), lcl_textBoxSizeNotify(), tools::Rectangle::Left(), maAnchoredDrawObj, mbDisconnectInProgress, mbMasterObjCleared, sw::sidebar::NONE, NotifyBackgrdOfAllVirtObjs(), SwAnchoredDrawObject::NotYetPositioned(), SwContact::ObjAnchoredAsChar(), PREP_FLY_ATTR_CHG, SwFrame::Prepare(), tools::Rectangle::Right(), SwDoc::SetFlyFrameAttr(), SdrObject::SetLayer(), tools::Rectangle::Top(), and SwFrameFormat::VERT_R2L.

Referenced by Changed(), and SwUndoDrawDelete::UndoImpl().

void SwDrawContact::ChangeMasterObject ( SdrObject pNewMaster)
void SwDrawContact::ChkPage ( )
void SwDrawContact::ConnectToLayout ( const SwFormatAnchor pAnch = nullptr)

Inserts SdrObject in the arrays of the layout ((SwPageFrame and SwFrame).

The anchor is determined according to the attribute SwFormatAnchor. If required the object gets unregistered with the old anchor.

Definition at line 1720 of file dcontact.cxx.

References SdrObject::ActionChanged(), AddVirtObj(), SwDrawVirtObj::AnchoredObj(), SwFrame::AppendDrawObj(), CheckControlLayer(), ClrContourCache(), DisconnectFromLayout(), SwAnchoredObject::DrawObj(), SwFrame::FindFlyFrame(), SwFrame::FindFooterOrHeader(), SwIterator< TElementType, TSource, eMode >::First(), SwFormat::GetAnchor(), GetAnchorFrame(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwNode::GetContentNode(), IDocumentLayoutAccess::GetCurrentViewShell(), SwFormat::GetDoc(), SwFormat::getIDocumentLayoutAccess(), SwViewShell::GetLayout(), GetMaster(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwFormatAnchor::GetPageNum(), SwClient::GetRegisteredIn(), SwDoc::GetSpzFrameFormats(), SwNodes::GoNext(), i, InvalidateObjs_(), SwFrame::InvalidatePrt(), IsAnchoredObjShown(), SwFrame::IsContentFrame(), SwFrame::IsFlyFrame(), SwFrame::IsTextFrame(), lcl_GetFlyInContentAnchor(), SwLayoutFrame::Lower(), maAnchoredDrawObj, mbDisconnectInProgress, SwIterator< TElementType, TSource, eMode >::Next(), SwPosition::nNode, nPgNum, SwRootFrame::SetAssertFlyPages(), and setContextWritingMode().

Referenced by SwDrawView::CalcAnchor(), Changed_(), SwFEShell::CheckUnboundObjects(), SwDoc::ChgAnchor(), ChkPage(), SwDoc::GroupSelection(), SwFEShell::ImpEndCreate(), SwUndoDrawGroup::RedoImpl(), SwUndoDrawUnGroupConnectToLayout::RedoImpl(), SwClientNotify(), SwUndoDrawGroup::UndoImpl(), SwUndoDrawUnGroup::UndoImpl(), and SwDoc::UnGroupSelection().

void SwDrawContact::DisconnectFromLayout ( bool  _bMoveMasterToInvisibleLayer = true)
void SwDrawContact::DisconnectObjFromLayout ( SdrObject _pDrawObj)

disconnect for a dedicated drawing object - could be 'master' or 'virtual'.

Definition at line 1668 of file dcontact.cxx.

References DisconnectFromLayout(), GetAnchorFrame(), maAnchoredDrawObj, maDrawVirtObjs, SwFrame::RemoveDrawObj(), SwDrawVirtObj::RemoveFromDrawingPage(), and SwDrawVirtObj::RemoveFromWriterLayout().

Referenced by SwLayoutFrame::DestroyImpl(), and SwFrame::DestroyImpl().

SwPageFrame * SwDrawContact::FindPage ( const SwRect rRect)

Definition at line 1918 of file dcontact.cxx.

References SwFrame::FindPageFrame(), GetAnchorFrame(), and GetPageFrame().

Referenced by ChkPage(), and NotifyBackgrdOfAllVirtObjs().

const SwAnchoredObject * SwDrawContact::GetAnchoredObj ( const SdrObject _pSdrObj) const
overridevirtual
SwAnchoredObject * SwDrawContact::GetAnchoredObj ( SdrObject _pSdrObj)
overridevirtual

Implements SwContact.

Definition at line 775 of file dcontact.cxx.

References GetAnchoredObj().

void SwDrawContact::GetAnchoredObjs ( std::vector< SwAnchoredObject * > &  _roAnchoredObjs) const
overridevirtual

get data collection of anchored objects, handled by with contact

Implements SwContact.

Definition at line 1984 of file dcontact.cxx.

References maAnchoredDrawObj, and maDrawVirtObjs.

const SwFrame * SwDrawContact::GetAnchorFrame ( const SdrObject _pDrawObj = nullptr) const
SwFrame * SwDrawContact::GetAnchorFrame ( SdrObject const *  _pDrawObj = nullptr)

Definition at line 806 of file dcontact.cxx.

References GetAnchorFrame().

SdrObject * SwDrawContact::GetDrawObjectByAnchorFrame ( const SwFrame _rAnchorFrame)

get drawing object ('master' or 'virtual') by frame.

Definition at line 839 of file dcontact.cxx.

References SwContentFrame::FindMaster(), GetAnchorFrame(), GetMaster(), SwFrame::IsContentFrame(), SwFlowFrame::IsFollow(), and maDrawVirtObjs.

Referenced by AppendObj(), and SwFEShell::ImpEndCreate().

virtual const SdrObject* SwDrawContact::GetMaster ( ) const
inlineoverridevirtual
SdrObject * SwDrawContact::GetMaster ( )
overridevirtual

Implements SwContact.

Definition at line 780 of file dcontact.cxx.

References SwAnchoredObject::DrawObj(), maAnchoredDrawObj, and mbMasterObjCleared.

const SwPageFrame* SwDrawContact::GetPageFrame ( ) const
inline

Definition at line 357 of file dcontact.hxx.

References SwAnchoredObject::GetPageFrame().

Referenced by ChkPage(), and FindPage().

SwPageFrame* SwDrawContact::GetPageFrame ( )
inline

Definition at line 361 of file dcontact.hxx.

References SwAnchoredObject::GetPageFrame().

void SwDrawContact::GetTextObjectsFromFormat ( std::list< SdrTextObj * > &  o_rTextObjects,
SwDoc pDoc 
)
static

get data collection of anchored objects, handled by with contact

Definition at line 735 of file dcontact.cxx.

References SwDoc::GetSpzFrameFormats().

Referenced by SdrHHCWrapper::ConvertNextDocument(), and SwSpellDialogChildWindow::FindNextDrawTextError_Impl().

void SwDrawContact::InsertMasterIntoDrawPage ( )

method to insert 'master' drawing object into drawing page

insert 'master' drawing object into drawing page

Definition at line 1908 of file dcontact.cxx.

References IDocumentDrawModelAccess::GetDrawModel(), SwContact::GetFormat(), SwFormat::getIDocumentDrawModelAccess(), GetMaster(), SdrModel::GetPage(), SdrObjList::InsertObject(), and SdrObject::SetUserCall().

Referenced by SwClientNotify().

void SwDrawContact::InvalidateObjs_ ( const bool  _bUpdateSortedObjsList = false)
private
void SwDrawContact::NotifyBackgrdOfAllVirtObjs ( const tools::Rectangle pOldBoundRect)
SwDrawContact& SwDrawContact::operator= ( const SwDrawContact )
privatedelete
void SwDrawContact::RemoveAllVirtObjs ( )
private

remove 'virtual' drawing objects and destroy them.

Definition at line 826 of file dcontact.cxx.

References maDrawVirtObjs.

Referenced by ChangeMasterObject(), and ~SwDrawContact().

void SwDrawContact::RemoveMasterFromDrawPage ( )

method to remove 'master' drawing object from drawing page.

To be used by the undo for delete of object. Call it after method <DisconnectFromLayout( bool = true )> is already performed. Note: <DisconnectFromLayout( bool )> no longer removes the 'master' drawing object from drawing page.

Definition at line 1649 of file dcontact.cxx.

References GetMaster(), SwClient::GetRegisteredIn(), and SdrObject::SetUserCall().

Referenced by SwClientNotify(), and ~SwDrawContact().

void SwDrawContact::SwClientNotify ( const SwModify rMod,
const SfxHint rHint 
)
overrideprivatevirtual

Reimplemented from SwContact.

Definition at line 1354 of file dcontact.cxx.

References Changed(), CheckControlLayer(), ConnectToLayout(), sw::DELETE_FRAMES, DisconnectFromLayout(), SwAnchoredObject::DrawObj(), sw::DYING, GetAnchoredObj(), SwAnchoredObject::GetAnchorFrame(), GetAnchorFrame(), SwFormatAnchor::GetAnchorId(), SwFormat::GetDoc(), IDocumentDrawModelAccess::GetDrawModel(), SwAnchoredObject::GetDrawObj(), SwContact::GetFormat(), SwDoc::getIDocumentDrawModelAccess(), GetMaster(), SwAnchoredObject::GetObjRectWithSpaces(), SdrObject::GetOrdNum(), SdrObject::GetUserCall(), InsertMasterIntoDrawPage(), InvalidateObjs_(), SdrObject::IsInserted(), SdrObjListIter::IsMore(), SwDrawFrameFormat::IsPosAttrSet(), lcl_NotifyBackgroundOfObj(), maAnchoredDrawObj, sw::MAKE_FRAMES, SwAnchoredObject::MakeObjPos(), mbDisconnectInProgress, SwContact::MoveObjToVisibleLayer(), SdrObjListIter::Next(), NotifyBackgrdOfAllVirtObjs(), SdrObject::notifyShapePropertyChange(), sw::PAGE_OUT_OF_BOUNDS, sw::POST_RESTORE_FLY_ANCHOR, sw::PREP_DELETE_FLY, sw::PREP_INSERT_FLY, sw::PREPPASTING, RemoveMasterFromDrawPage(), RES_ANCHOR, RES_ATTRSET_CHG, RES_DRAWFRMFMT, RES_FOLLOW_TEXT_FLOW, RES_HORI_ORIENT, RES_LR_SPACE, RES_OPAQUE, RES_REMOVE_UNO_OBJECT, RES_SURROUND, RES_UL_SPACE, RES_VERT_ORIENT, RES_WRAP_INFLUENCE_ON_OBJPOS, SwAnchoredObject::ResetLayoutProcessBools(), SAL_WARN, SAL_WARN_IF, SdrObject::SetRelativePos(), SwRect::SVRect(), SwContact::SwClientNotify(), SwClient::SwClientNotify(), SwDrawContact(), svx::TextDocAnchor, and SfxPoolItem::Which().

Friends And Related Function Documentation

friend class NestedUserCallHdl
friend

Definition at line 330 of file dcontact.hxx.

Member Data Documentation

SwAnchoredDrawObject SwDrawContact::maAnchoredDrawObj
private
std::vector< SwDrawVirtObjPtr > SwDrawContact::maDrawVirtObjs
private

container for 'virtual' drawing object supporting drawing objects in headers/footers.

Definition at line 313 of file dcontact.hxx.

Referenced by AddVirtObj(), DisconnectFromLayout(), DisconnectObjFromLayout(), GetAnchoredObjs(), GetDrawObjectByAnchorFrame(), InvalidateObjs_(), NotifyBackgrdOfAllVirtObjs(), and RemoveAllVirtObjs().

bool SwDrawContact::mbDisconnectInProgress
private

internal flag to indicate that disconnect from layout is in progress

Definition at line 321 of file dcontact.hxx.

Referenced by Changed_(), ChkPage(), ConnectToLayout(), DisconnectFromLayout(), and SwClientNotify().

bool SwDrawContact::mbMasterObjCleared
private

boolean indicating set 'master' drawing object has been cleared.

Definition at line 317 of file dcontact.hxx.

Referenced by Changed_(), ChangeMasterObject(), GetMaster(), and ~SwDrawContact().

bool SwDrawContact::mbUserCallActive
private

Needed data for handling of nested <SdrObjUserCall> events in method <Changed_(..)>

Definition at line 325 of file dcontact.hxx.

Referenced by NestedUserCallHdl::NestedUserCallHdl(), and NestedUserCallHdl::~NestedUserCallHdl().

SdrUserCallType SwDrawContact::meEventTypeOfCurrentUserCall
private

event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.

Note: value only valid, if <mbUserCallActive> is true.

Definition at line 328 of file dcontact.hxx.

Referenced by NestedUserCallHdl::AssertNestedUserCall(), NestedUserCallHdl::NestedUserCallHdl(), and NestedUserCallHdl::~NestedUserCallHdl().


The documentation for this class was generated from the following files: