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

wrapper class for the positioning of Writer fly frames and drawing objects More...

#include <anchoredobject.hxx>

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

Public Member Functions

virtual ~SwAnchoredObject ()
 
void SetDrawObj (SdrObject &_rDrawObj)
 
const SdrObjectGetDrawObj () const
 
SdrObjectDrawObj ()
 
void ClearDrawObj ()
 
const SwFrameGetAnchorFrame () const
 
SwFrameAnchorFrame ()
 
void ChgAnchorFrame (SwFrame *_pNewAnchorFrame)
 
SwFrameGetAnchorFrameContainingAnchPos ()
 determine anchor frame containing the anchor position More...
 
SwPageFrameGetPageFrame ()
 
const SwPageFrameGetPageFrame () const
 
void SetPageFrame (SwPageFrame *_pNewPageFrame)
 
SwPageFrameFindPageFrameOfAnchor ()
 method to determine the page frame, on which the 'anchor' of the given anchored object is. More...
 
SwTextFrameFindAnchorCharFrame ()
 get frame, which contains the anchor character, if the object is anchored at-character or as-character. More...
 
const SwLayoutFrameGetVertPosOrientFrame () const
 
void ClearVertPosOrientFrame ()
 
void CheckCharRectAndTopOfLine (const bool _bCheckForParaPorInf)
 check anchor character rectangle and top of line More...
 
const SwRectGetLastCharRect () const
 
SwTwips GetRelCharX (const SwFrame *pFrame) const
 
SwTwips GetRelCharY (const SwFrame *pFrame) const
 
void AddLastCharY (tools::Long nDiff)
 
void ResetLastCharRectHeight ()
 
SwTwips GetLastTopOfLine () const
 
void AddLastTopOfLineY (SwTwips _nDiff)
 
void ClearCharRectAndTopOfLine ()
 reset members <maLastCharRect> and <mnLastTopOfLine> More...
 
virtual void MakeObjPos ()=0
 method to determine position for the object and set the position at the object More...
 
bool IsPositioningInProgress () const
 is positioning of anchored object in progress More...
 
bool InvalidationOfPosAllowed () const
 method to determine, if invalidation of position is allowed More...
 
virtual void InvalidateObjPos ()=0
 method to invalidate position of the anchored object More...
 
virtual void RegisterAtPage (SwPageFrame &)=0
 
void InvalidateObjPosForConsiderWrapInfluence ()
 method to perform necessary invalidations for the positioning of objects, for whose the wrapping style influence has to be considered on the object positioning. More...
 
virtual void NotifyBackground (SwPageFrame *_pPageFrame, const SwRect &_rRect, PrepareHint _eHint)=0
 method to trigger notification of 'background' More...
 
const PointGetCurrRelPos () const
 
void SetCurrRelPos (Point _aRelPos)
 
virtual SwFrameFormatGetFrameFormat ()=0
 
virtual const SwFrameFormatGetFrameFormat () const =0
 
virtual SwRect GetObjRect () const =0
 
void SetObjTop (const SwTwips _nTop)
 
void SetObjLeft (const SwTwips _nLeft)
 
virtual void UpdateLayoutDir ()
 method update layout direction the layout direction, the anchored object is assigned to More...
 
const SwRectGetObjRectWithSpaces () const
 method to determine object area inclusive its spacing More...
 
void InvalidateObjRectWithSpaces () const
 
bool ConsiderObjWrapInfluenceOnObjPos () const
 method to determine, if wrapping style influence of the anchored object has to be considered on the object positioning More...
 
bool ConsiderForTextWrap () const
 
void SetConsiderForTextWrap (const bool _bConsiderForTextWrap)
 
bool PositionLocked () const
 
void LockPosition ()
 
void UnlockPosition ()
 
void SetKeepPosLocked (const bool _bKeepPosLocked)
 
bool RestartLayoutProcess () const
 
void SetRestartLayoutProcess (const bool _bRestartLayoutProcess)
 
bool ClearedEnvironment () const
 
void SetClearedEnvironment (const bool _bClearedEnvironment)
 
void ResetLayoutProcessBools ()
 
bool HasClearedEnvironment () const
 method to determine, if due to anchored object size and wrapping style, its layout environment is cleared. More...
 
void UpdateObjInSortedList ()
 method to update anchored object in the <SwSortedObjs> lists More...
 
virtual bool IsFormatPossible () const
 method to determine, if a format on the anchored object is possible More...
 
void SetTmpConsiderWrapInfluence (const bool _bTmpConsiderWrapInfluence)
 
bool IsTmpConsiderWrapInfluence () const
 
void ClearTmpConsiderWrapInfluence ()
 
bool IsForceNotifyNewBackground ()
 
void SetForceNotifyNewBackground (bool const b)
 
bool OverlapsPrevColumn () const
 method to determine, if the anchored object is overlapping with a previous column More...
 
Point GetRelPosToAnchorFrame () const
 method to determine position of anchored object relative to anchor frame More...
 
Point GetRelPosToPageFrame (const bool _bFollowTextFlow, bool &_obRelToTableCell) const
 method to determine position of anchored object relative to page frame More...
 
Point GetRelPosToChar () const
 method to determine position of anchored object relative to anchor character More...
 
Point GetRelPosToLine () const
 method to determine position of anchored object relative to top of line More...
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter=nullptr) const
 Dump a bunch of useful data to an XML representation to ease layout understanding, debugging and testing. More...
 
virtual const char * getElementName () const
 The element name to show in the XML dump. More...
 
virtual const SwFlyFrameDynCastFlyFrame () const
 
virtual SwFlyFrameDynCastFlyFrame ()
 

Static Public Member Functions

static bool IsDraggingOffPageAllowed (const SwFrameFormat *)
 method to determine if dragging objects off page is allowed More...
 

Protected Member Functions

 SwAnchoredObject ()
 
void SetVertPosOrientFrame (const SwLayoutFrame &_rVertPosOrientFrame)
 
virtual void RegisterAtCorrectPage ()=0
 method to assure that anchored object is registered at the correct page frame More...
 
virtual void ObjectAttachedToAnchorFrame ()
 method to indicate, that anchored object is attached to an anchor frame More...
 
bool ConsiderObjWrapInfluenceOfOtherObjs () const
 method to determine, if other anchored objects, also attached at to the anchor frame, have to consider its wrap influence. More...
 
void SetTmpConsiderWrapInfluenceOfOtherObjs ()
 method to apply temporary consideration of wrapping style influence to the anchored objects, which are anchored at the same anchor frame More...
 
virtual bool SetObjTop_ (const SwTwips _nTop)=0
 
virtual bool SetObjLeft_ (const SwTwips _nLeft)=0
 
virtual SwRect GetObjBoundRect () const =0
 

Private Member Functions

void SetPositioningInProgress (const bool _bPosInProgress)
 
void CheckCharRect (const SwFormatAnchor &_rAnch, const SwTextFrame &_rAnchorCharFrame)
 check anchor character rectangle More...
 
void CheckTopOfLine (const SwFormatAnchor &_rAnch, const SwTextFrame &_rAnchorCharFrame)
 check top of line More...
 

Private Attributes

rtl::Reference< SdrObjectmpDrawObj
 
SwFramempAnchorFrame
 Frame the object is anchored at. More...
 
SwPageFramempPageFrame
 
Point maRelPos
 
SwRect maLastCharRect
 
SwTwips mnLastTopOfLine
 
const SwLayoutFramempVertPosOrientFrame
 
bool mbPositioningInProgress
 
bool mbConsiderForTextWrap
 
bool mbPositionLocked
 
bool mbKeepPositionLockedForSection
 
bool mbRestartLayoutProcess
 
bool mbClearedEnvironment
 
bool mbTmpConsiderWrapInfluence
 
bool mbForceNotifyNewBackground = false
 
SwRect maObjRectWithSpaces
 
bool mbObjRectWithSpacesValid
 
SwRect maLastObjRect
 

Friends

class SwObjPositioningInProgress
 method to indicate, that positioning of anchored object is in progress More...
 
bool sw_HideObj (const SwTextFrame &_rFrame, const RndStdIds _eAnchorType, SwFormatAnchor const &rFormatAnchor, SwAnchoredObject *_pAnchoredObj)
 as-character anchored graphics, which are used for a graphic bullet list. More...
 

Detailed Description

wrapper class for the positioning of Writer fly frames and drawing objects

Purpose of this class is to provide a unified interface for the positioning of Writer fly frames (derived classes of <SwFlyFrame>) and of drawing objects (derived classes of <SwAnchoredDrawObject>).

Definition at line 44 of file anchoredobject.hxx.

Constructor & Destructor Documentation

◆ SwAnchoredObject()

SwAnchoredObject::SwAnchoredObject ( )
protected

Definition at line 71 of file anchoredobject.cxx.

◆ ~SwAnchoredObject()

SwAnchoredObject::~SwAnchoredObject ( )
virtual

Definition at line 101 of file anchoredobject.cxx.

References ClearVertPosOrientFrame().

Member Function Documentation

◆ AddLastCharY()

void SwAnchoredObject::AddLastCharY ( tools::Long  nDiff)

Definition at line 171 of file anchoredobject.cxx.

References maLastCharRect, and SwRect::Pos().

Referenced by lcl_ArrangeLowers().

◆ AddLastTopOfLineY()

void SwAnchoredObject::AddLastTopOfLineY ( SwTwips  _nDiff)

Definition at line 196 of file anchoredobject.cxx.

References mnLastTopOfLine.

Referenced by lcl_ArrangeLowers().

◆ AnchorFrame()

SwFrame * SwAnchoredObject::AnchorFrame ( )
inline

◆ CheckCharRect()

void SwAnchoredObject::CheckCharRect ( const SwFormatAnchor _rAnch,
const SwTextFrame _rAnchorCharFrame 
)
private

check anchor character rectangle

helper method for method <CheckCharRectAndTopOfLine()> For to-character anchored Writer fly frames the member <maLastCharRect> is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated. improvement - add second parameter <_rAnchorCharFrame>

Parameters
_rAnchinput parameter - reference to anchor position
_rAnchorCharFrameinput parameter - reference to the text frame containing the anchor character.

#i22341# helper method for method <CheckCharRectAndTopOfLine()> For to-character anchored Writer fly frames the member <maLastCharRect> is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated.

improvement - add second parameter <_rAnchorCharFrame>

Definition at line 248 of file anchoredobject.cxx.

References SwFrame::FindPageFrame(), SwTextFrame::GetAutoPos(), SwFormatAnchor::GetContentAnchor(), GetFrameFormat(), SwRectFnSet::GetHeight(), SwRectFnSet::GetLeft(), GetPageFrame(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SwRectFnSet::GetTop(), InvalidateObjPos(), maLastCharRect, and UnlockPosition().

Referenced by CheckCharRectAndTopOfLine().

◆ CheckCharRectAndTopOfLine()

void SwAnchoredObject::CheckCharRectAndTopOfLine ( const bool  _bCheckForParaPorInf)

check anchor character rectangle and top of line

For to-character anchored Writer fly frames the members <maLastCharRect> and <maLastTopOfLine> are updated. These are checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated.

Parameters
_bCheckForParaPorInfinput parameter - boolean indicating, if check on paragraph portion information has to be done.

#i26791 For to-character anchored Writer fly frames the members <maLastCharRect> and <maLastTopOfLine> are updated. These are checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated.

add parameter <_bCheckForParaPorInf>, default value <true>

Definition at line 211 of file anchoredobject.cxx.

References CheckCharRect(), CheckTopOfLine(), FindAnchorCharFrame(), SwFormat::GetAnchor(), GetAnchorFrame(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), GetFrameFormat(), and SwTextFrame::HasPara().

Referenced by SwDrawView::AddCustomHdl(), and objectpositioning::SwToContentAnchoredObjectPosition::CalcPosition().

◆ CheckTopOfLine()

void SwAnchoredObject::CheckTopOfLine ( const SwFormatAnchor _rAnch,
const SwTextFrame _rAnchorCharFrame 
)
private

check top of line

helper method for method <CheckCharRectAndTopOfLine()> For to-character anchored Writer fly frames the member <mnLastTopOfLine> is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated.

Parameters
_rAnchinput parameter - reference to anchor position
_rAnchorCharFrameinput parameter - reference to the text frame containing the anchor character.

#i22341# helper method for method <CheckCharRectAndTopOfLine()> For to-character anchored Writer fly frames the member <mnLastTopOfLine> is updated. This is checked for change and depending on the applied positioning, it's decided, if the Writer fly frame has to be invalidated.

improvement - add second parameter <_rAnchorCharFrame>

Definition at line 308 of file anchoredobject.cxx.

References SwFrame::FindPageFrame(), SwFormatAnchor::GetContentAnchor(), GetFrameFormat(), GetPageFrame(), SwTextFrame::GetTopOfLine(), InvalidateObjPos(), mnLastTopOfLine, and UnlockPosition().

Referenced by CheckCharRectAndTopOfLine().

◆ ChgAnchorFrame()

void SwAnchoredObject::ChgAnchorFrame ( SwFrame _pNewAnchorFrame)

◆ ClearCharRectAndTopOfLine()

void SwAnchoredObject::ClearCharRectAndTopOfLine ( )

reset members <maLastCharRect> and <mnLastTopOfLine>

Definition at line 334 of file anchoredobject.cxx.

References SwRect::Clear(), maLastCharRect, and mnLastTopOfLine.

Referenced by lcl_InvalidateLowerObjs(), SwFEShell::MoveAnchor(), and SwFlyAtContentFrame::SwClientNotify().

◆ ClearDrawObj()

void SwAnchoredObject::ClearDrawObj ( )
inline

Definition at line 204 of file anchoredobject.hxx.

Referenced by SwFlyFrame::FinitDrawObj(), and SwDrawContact::~SwDrawContact().

◆ ClearedEnvironment()

bool SwAnchoredObject::ClearedEnvironment ( ) const

◆ ClearTmpConsiderWrapInfluence()

void SwAnchoredObject::ClearTmpConsiderWrapInfluence ( )

◆ ClearVertPosOrientFrame()

void SwAnchoredObject::ClearVertPosOrientFrame ( )

◆ ConsiderForTextWrap()

bool SwAnchoredObject::ConsiderForTextWrap ( ) const

◆ ConsiderObjWrapInfluenceOfOtherObjs()

bool SwAnchoredObject::ConsiderObjWrapInfluenceOfOtherObjs ( ) const
protected

method to determine, if other anchored objects, also attached at to the anchor frame, have to consider its wrap influence.

--> #i43255#

Definition at line 444 of file anchoredobject.cxx.

References GetAnchorFrame(), SwFrame::GetDrawObjs(), and SwSortedObjs::size().

Referenced by SwFlyAtContentFrame::MakeAll(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtPara().

◆ ConsiderObjWrapInfluenceOnObjPos()

bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos ( ) const

method to determine, if wrapping style influence of the anchored object has to be considered on the object positioning

Note: result of this method also decides, if the boolean for the layout process are of relevance.

#i28701# Note: result of this method also decides, if the booleans for the layout process are of relevance.

Definition at line 407 of file anchoredobject.cxx.

References CONSIDER_WRAP_ON_OBJECT_POSITION, IDocumentSettingAccess::get(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), GetFrameFormat(), SwFormat::getIDocumentSettingAccess(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), and IsTmpConsiderWrapInfluence().

Referenced by ClearedEnvironment(), ConsiderForTextWrap(), SwObjectFormatterTextFrame::DoFormatObj(), SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor(), SwFlyNotify::ImplDestroy(), InvalidateObjPosForConsiderWrapInfluence(), lcl_ArrangeLowers(), SwFlyAtContentFrame::MakeAll(), SwAnchoredDrawObject::MakeObjPosAnchoredAtPara(), PositionLocked(), RestartLayoutProcess(), and UpdateObjInSortedList().

◆ DrawObj()

SdrObject * SwAnchoredObject::DrawObj ( )
inline

◆ dumpAsXml()

void SwAnchoredObject::dumpAsXml ( xmlTextWriterPtr  pWriter = nullptr) const
virtual

Dump a bunch of useful data to an XML representation to ease layout understanding, debugging and testing.

Reimplemented in SwFlyFrame.

Definition at line 255 of file xmldump.cxx.

References SwRect::dumpAsXmlAttributes(), FindAnchorCharFrame(), GetDrawObj(), getElementName(), SwFrameAreaDefinition::GetFrameId(), mpAnchorFrame, mpPageFrame, and pObject.

Referenced by SwFlyFrame::dumpAsXml().

◆ DynCastFlyFrame() [1/2]

SwFlyFrame * SwAnchoredObject::DynCastFlyFrame ( )
virtual

Reimplemented in SwFlyFrame.

Definition at line 939 of file anchoredobject.cxx.

◆ DynCastFlyFrame() [2/2]

const SwFlyFrame * SwAnchoredObject::DynCastFlyFrame ( ) const
virtual

◆ FindAnchorCharFrame()

SwTextFrame * SwAnchoredObject::FindAnchorCharFrame ( )

get frame, which contains the anchor character, if the object is anchored at-character or as-character.

Returns
SwTextFrame* text frame containing the anchor character. It's NULL, if the object isn't anchored at-character resp. as-character.

#i26945#

Returns
SwTextFrame* text frame containing the anchor character. It's NULL, if the object isn't anchored at-character resp. as-character.

Definition at line 705 of file anchoredobject.cxx.

References AnchorFrame(), DynCastFlyFrame(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwTextFrame::GetFollow(), SwTextFrame::GetFrameAtOfst(), GetFrameFormat(), SwFlyAtContentFrame::GetPrecede(), SwTextFrame::MapModelToViewPos(), mpAnchorFrame, and SAL_WARN.

Referenced by CheckCharRectAndTopOfLine(), SwPageNumAndTypeOfAnchors::Collect(), SwFlyAtContentFrame::DelEmpty(), dumpAsXml(), SwFlyFrame::Format(), SwObjectFormatter::FormatObjsAtFrame_(), GetAnchorFrameContainingAnchPos(), SwFrame::GetNextFlyLeaf(), SwFlyFrame::Grow_(), and SwTabFrame::MakeAll().

◆ FindPageFrameOfAnchor()

SwPageFrame * SwAnchoredObject::FindPageFrameOfAnchor ( )

method to determine the page frame, on which the 'anchor' of the given anchored object is.

Adjust meaning of method and thus its name: If the anchored object or its anchor isn't correctly inserted in the layout, no page frame can be found. Thus, the return type changed to be a pointer and can be NULL.

Parameters
_rAnchoredObjinput parameter - anchored object, for which the page frame of its 'anchor' has to be determined.
Returns
SwPageFrame& page frame, the 'anchor' of the given anchored object is on

#i28701# #i33751#, #i34060# Adjust meaning of method and thus its name: If the anchored object or its anchor isn't correctly inserted in the layout, no page frame can be found. Thus, the return type changed to be a pointer and can be NULL.

Definition at line 682 of file anchoredobject.cxx.

References SwFrame::FindPageFrame(), GetAnchorFrameContainingAnchPos(), and mpAnchorFrame.

Referenced by SwObjectFormatterLayFrame::AdditionalFormatObjsOnPage(), SwObjectFormatterTextFrame::CheckMovedFwdCondition(), SwDrawContact::ChkPage(), SwPageNumAndTypeOfAnchors::Collect(), SwObjectFormatter::FormatObjsAtFrame_(), sw::access::SwAccessibleChild::GetBox(), SwEditShell::HandleUndoRedoContext(), SwFEShell::Insert(), SwAnchoredDrawObject::InvalidateObjPos(), sw::IsFlyFrameFormatInHeader(), lcl_NotifyBackgroundOfObj(), and SwDrawContact::NotifyBackgroundOfAllVirtObjs().

◆ GetAnchorFrame()

const SwFrame * SwAnchoredObject::GetAnchorFrame ( ) const
inline

Definition at line 207 of file anchoredobject.hxx.

References mpAnchorFrame.

Referenced by SwObjectFormatterLayFrame::AdditionalFormatObjsOnPage(), SwFrame::AppendDrawObj(), SwPageFrame::AppendDrawObjToPage(), SwPageFrame::AppendFlyToPage(), SwTaggedPDFHelper::BeginBlockStructureElements(), SwFEShell::CalcBoundRect(), CalcClipRect(), SwRootFrame::CalcFrameRects(), SwFlyFrame::CalcRel(), CheckCharRectAndTopOfLine(), SwFlyFreeFrame::CheckClip(), SwDrawView::CheckPossibilities(), SwFlyFrame::ChgRelPos(), SwDrawContact::ChkPage(), ConsiderObjWrapInfluenceOfOtherObjs(), SwFlyFrame::DestroyImpl(), SwFlyFreeFrame::DestroyImpl(), SwFlyInContentFrame::DestroyImpl(), SwDrawContact::DisconnectFromLayout(), SwObjectFormatterTextFrame::DoFormatObj(), objectpositioning::SwAnchoredObjectPosition::DrawAsideFly(), SwTextFly::DrawTextOpaque(), SwFEShell::FindAnchorPos(), SwFlyFrame::FindChainNeighbour(), FindFrameInBody(), SwTextFly::ForEach(), SwFlyFrame::Format(), SwObjectFormatter::FormatObj(), SwObjectFormatter::FormatObjsAtFrame_(), SwDrawVirtObj::GetAnchorFrame(), SwDrawContact::GetAnchorFrame(), SwFEShell::GetAnchorObjDiff(), SwHTMLTableLayout::GetBrowseWidthByTabFrame(), SwAccessibleDocument::getExtendedAttributes(), SwTextFlyCnt::GetFlyFrame_(), GetFrameOfModify(), SwFEShell::GetGraphicDefaultSize(), SwTextFly::GetMaxBottom(), SwFrame::GetNextFlyLeaf(), SwFrameMenuButtonBase::GetPageFrame(), sw::access::SwAccessibleChild::GetParent(), GetRelPosToAnchorFrame(), GetRelPosToPageFrame(), SwTextFly::GetSurroundForTextWrap(), SwTextFly::GetTop(), SwFlyFrame::Grow_(), HasClearedEnvironment(), SwFlyFreeFrame::HasEnvironmentAutoSize(), SwFEShell::ImpEndCreate(), SwLayNotify::ImplDestroy(), SwFlyNotify::ImplDestroy(), SwTextFly::InitAnchoredObjList(), SwFlyFrame::Invalidate_(), SwAnchoredDrawObject::InvalidateObjPos(), SwFrame::InvalidatePage(), Is_Lower_Of(), sw::IsFlyFrameFormatInHeader(), SwFlyFrame::IsFlySplitAllowed(), SwFlyFreeFrame::IsFormatPossible(), SwFEShell::IsFrameVertical(), SwFEShell::IsGroupAllowed(), SwFlyFrame::IsLowerOf(), SwAccessibleFrame::IsOpaque(), sw::IsPageFrameEmpty(), SwFlyFrame::IsShowUnfloatButton(), lcl_AdjustPositioningAttr(), lcl_FindAnchor(), lcl_IsInBody(), lcl_MakeObjs(), lcl_NotifyBackgroundOfObj(), lcl_RefreshLine(), lcl_SubtractFlys(), SwFlyFreeFrame::MakeAll(), SwFlyAtContentFrame::MakeAll(), SwFlyInContentFrame::MakeAll(), SwAnchoredDrawObject::MakeObjPos(), SwFlyFrame::MakeObjPos(), SwFlyInContentFrame::MakeObjPos(), SwAnchoredDrawObject::MakeObjPosAnchoredAtLayout(), SwFEShell::MoveAnchor(), SwVirtFlyDrawObj::NbcMove(), SwVirtFlyDrawObj::NbcResize(), Notify_Background(), SwDrawView::ObjOrderChanged(), SwFlyFrame::PaintSwFrame(), SwFEShell::Paste(), SwDrawVirtObj::RemoveFromWriterLayout(), SwFEShell::RequestObjectResize(), SwFEShell::SelectFlyFrame(), SwFlyAtContentFrame::SetAbsPos(), SwAnchoredDrawObject::SetDrawObjAnchor(), SwFEShell::SetFlyPos(), SwFlyInContentFrame::SetRefPoint(), SetTmpConsiderWrapInfluenceOfOtherObjs(), SwFlyFrame::Shrink_(), SwFlyAtContentFrame::SwClientNotify(), SwFlyInContentFrame::SwClientNotify(), SwContact::SwClientNotify(), SwDrawContact::SwClientNotify(), UpdateLayoutDir(), and UpdateObjInSortedList().

◆ GetAnchorFrameContainingAnchPos()

SwFrame * SwAnchoredObject::GetAnchorFrameContainingAnchPos ( )

determine anchor frame containing the anchor position

the anchor frame, which is determined, is <mpAnchorFrame> for an at-page, at-frame or at-paragraph anchored object and the anchor character frame for an at-character and as-character anchored object.

#i26945# the anchor frame, which is determined, is <mpAnchorFrame> for an at-page, at-frame or at-paragraph anchored object and the anchor character frame for an at-character and as-character anchored object.

Definition at line 130 of file anchoredobject.cxx.

References AnchorFrame(), and FindAnchorCharFrame().

Referenced by SwTabFrame::CalcFlyOffsets(), SwFrame::CheckDirChange(), SwObjectFormatterTextFrame::CheckMovedFwdCondition(), FindPageFrameOfAnchor(), lcl_ArrangeLowers(), SwFlyAtContentFrame::MakeAll(), SwAnchoredDrawObject::MakeObjPosAnchoredAtPara(), and SwContact::MoveObjToVisibleLayer().

◆ GetCurrRelPos()

const Point & SwAnchoredObject::GetCurrRelPos ( ) const
inline

◆ GetDrawObj()

const SdrObject * SwAnchoredObject::GetDrawObj ( ) const
inline

◆ getElementName()

virtual const char * SwAnchoredObject::getElementName ( ) const
inlinevirtual

The element name to show in the XML dump.

Reimplemented in SwAnchoredDrawObject.

Definition at line 496 of file anchoredobject.hxx.

Referenced by dumpAsXml().

◆ GetFrameFormat() [1/2]

virtual const SwFrameFormat & SwAnchoredObject::GetFrameFormat ( ) const
pure virtual

Implemented in SwAnchoredDrawObject, and SwFlyFrame.

◆ GetFrameFormat() [2/2]

virtual SwFrameFormat & SwAnchoredObject::GetFrameFormat ( )
pure virtual

◆ GetLastCharRect()

const SwRect & SwAnchoredObject::GetLastCharRect ( ) const
inline

◆ GetLastTopOfLine()

SwTwips SwAnchoredObject::GetLastTopOfLine ( ) const
inline

◆ GetObjBoundRect()

virtual SwRect SwAnchoredObject::GetObjBoundRect ( ) const
protectedpure virtual

Implemented in SwAnchoredDrawObject, and SwFlyFrame.

Referenced by GetObjRectWithSpaces().

◆ GetObjRect()

virtual SwRect SwAnchoredObject::GetObjRect ( ) const
pure virtual

◆ GetObjRectWithSpaces()

const SwRect & SwAnchoredObject::GetObjRectWithSpaces ( ) const

◆ GetPageFrame() [1/2]

SwPageFrame * SwAnchoredObject::GetPageFrame ( )
inline

◆ GetPageFrame() [2/2]

const SwPageFrame * SwAnchoredObject::GetPageFrame ( ) const
inline

Definition at line 220 of file anchoredobject.hxx.

◆ GetRelCharX()

SwTwips SwAnchoredObject::GetRelCharX ( const SwFrame pFrame) const

◆ GetRelCharY()

SwTwips SwAnchoredObject::GetRelCharY ( const SwFrame pFrame) const

◆ GetRelPosToAnchorFrame()

Point SwAnchoredObject::GetRelPosToAnchorFrame ( ) const

method to determine position of anchored object relative to anchor frame

Usage: Needed layout information for WW8 export

Returns
Point - determined relative position

#i30669# Usage: Needed layout information for WW8 export

Definition at line 846 of file anchoredobject.cxx.

References GetAnchorFrame(), SwFrameAreaDefinition::getFrameArea(), GetObjRect(), and SwRect::Pos().

◆ GetRelPosToChar()

Point SwAnchoredObject::GetRelPosToChar ( ) const

method to determine position of anchored object relative to anchor character

Usage: Needed layout information for WW8 export

Returns
Point - determined relative position

#i30669# Usage: Needed layout information for WW8 export

Definition at line 912 of file anchoredobject.cxx.

References GetLastCharRect(), GetObjRect(), and SwRect::Pos().

◆ GetRelPosToLine()

Point SwAnchoredObject::GetRelPosToLine ( ) const

method to determine position of anchored object relative to top of line

Usage: Needed layout information for WW8 export

Returns
Point - determined relative position

#i30669# Usage: Needed layout information for WW8 export

Definition at line 926 of file anchoredobject.cxx.

References Point::AdjustY(), GetLastTopOfLine(), GetObjRect(), and SwRect::Pos().

◆ GetRelPosToPageFrame()

Point SwAnchoredObject::GetRelPosToPageFrame ( const bool  _bFollowTextFlow,
bool &  _obRelToTableCell 
) const

method to determine position of anchored object relative to page frame

Usage: Needed layout information for WW8 export

If <_bFollowTextFlow> is set and object is anchored inside table, the position relative to the table cell is determined. Output parameter <_obRelToTableCell> reflects this situation

Parameters
_bFollowTextFlowinput parameter - boolean indicating, if the anchored object has to follow the text flow.
_obRelToTableCelloutput parameter - boolean indicating, the determine position is relative to the table cell
Returns
Point - determined relative position

#i30669# Usage: Needed layout information for WW8 export #i33818# - add parameters <_bFollowTextFlow> and <_obRelToTableCell> If <_bFollowTextFlow> is set and object is anchored inside table, the position relative to the table cell is determined. Output parameter <_obRelToTableCell> reflects this situation

Definition at line 868 of file anchoredobject.cxx.

References SwFrame::FindPageFrame(), GetAnchorFrame(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), GetObjRect(), SwFrame::GetUpper(), SwFrame::IsCellFrame(), SwFrame::IsPageFrame(), and SwRect::Pos().

Referenced by SwDrawContact::Changed_().

◆ GetVertPosOrientFrame()

const SwLayoutFrame * SwAnchoredObject::GetVertPosOrientFrame ( ) const
inline

◆ HasClearedEnvironment()

bool SwAnchoredObject::HasClearedEnvironment ( ) const

◆ InvalidateObjPos()

virtual void SwAnchoredObject::InvalidateObjPos ( )
pure virtual

◆ InvalidateObjPosForConsiderWrapInfluence()

void SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence ( )

method to perform necessary invalidations for the positioning of objects, for whose the wrapping style influence has to be considered on the object positioning.

#i28701#

Definition at line 385 of file anchoredobject.cxx.

References ConsiderObjWrapInfluenceOnObjPos(), FlyFrameLeave, GetObjRectWithSpaces(), GetPageFrame(), InvalidateObjPos(), NotifyBackground(), SetConsiderForTextWrap(), and UnlockPosition().

Referenced by SwObjectFormatterTextFrame::InvalidateFollowObjs(), SwObjectFormatterTextFrame::InvalidatePrevObjs(), and UpdateObjInSortedList().

◆ InvalidateObjRectWithSpaces()

void SwAnchoredObject::InvalidateObjRectWithSpaces ( ) const
inline

◆ InvalidationOfPosAllowed()

bool SwAnchoredObject::InvalidationOfPosAllowed ( ) const

method to determine, if invalidation of position is allowed

#i28701#

Definition at line 665 of file anchoredobject.cxx.

References PositionLocked().

Referenced by SwAnchoredDrawObject::InvalidateObjPos(), and SwFlyAtContentFrame::InvalidationAllowed().

◆ IsDraggingOffPageAllowed()

bool SwAnchoredObject::IsDraggingOffPageAllowed ( const SwFrameFormat pFrameFormat)
static

◆ IsForceNotifyNewBackground()

bool SwAnchoredObject::IsForceNotifyNewBackground ( )
inline

Definition at line 428 of file anchoredobject.hxx.

Referenced by SwFlyNotify::ImplDestroy(), and SwFlyFreeFrame::MakeAll().

◆ IsFormatPossible()

bool SwAnchoredObject::IsFormatPossible ( ) const
virtual

method to determine, if a format on the anchored object is possible

A format isn't possible, if anchored object is in an invisible layer. Note: method is virtual to refine the conditions for the sub-classes.

#i28701# A format is possible, if anchored object is in an invisible layer. Note: method is virtual to refine the conditions for the sub-classes.

Reimplemented in SwFlyFrame, SwFlyFreeFrame, and SwFlyAtContentFrame.

Definition at line 759 of file anchoredobject.cxx.

References SwFormat::GetDoc(), GetDrawObj(), GetFrameFormat(), SwDoc::getIDocumentDrawModelAccess(), and IDocumentDrawModelAccess::IsVisibleLayerId().

Referenced by SwObjectFormatterTextFrame::DoFormatObj(), and SwFlyFrame::IsFormatPossible().

◆ IsPositioningInProgress()

bool SwAnchoredObject::IsPositioningInProgress ( ) const
inline

is positioning of anchored object in progress

Definition at line 291 of file anchoredobject.hxx.

Referenced by SwDrawContact::Changed_(), SwAnchoredDrawObject::MakeObjPos(), and SwObjPositioningInProgress::SwObjPositioningInProgress().

◆ IsTmpConsiderWrapInfluence()

bool SwAnchoredObject::IsTmpConsiderWrapInfluence ( ) const
inline

Definition at line 425 of file anchoredobject.hxx.

Referenced by ConsiderObjWrapInfluenceOnObjPos().

◆ LockPosition()

void SwAnchoredObject::LockPosition ( )
inline

Definition at line 358 of file anchoredobject.hxx.

Referenced by SwFlyNotify::ImplDestroy().

◆ MakeObjPos()

virtual void SwAnchoredObject::MakeObjPos ( )
pure virtual

method to determine position for the object and set the position at the object

Implemented in SwAnchoredDrawObject, SwFlyFrame, SwFlyAtContentFrame, and SwFlyInContentFrame.

Referenced by SwObjectFormatter::FormatObj_(), and SwDrawContact::SwClientNotify().

◆ NotifyBackground()

virtual void SwAnchoredObject::NotifyBackground ( SwPageFrame _pPageFrame,
const SwRect _rRect,
PrepareHint  _eHint 
)
pure virtual

◆ ObjectAttachedToAnchorFrame()

void SwAnchoredObject::ObjectAttachedToAnchorFrame ( )
protectedvirtual

method to indicate, that anchored object is attached to an anchor frame

Reimplemented in SwAnchoredDrawObject.

Definition at line 345 of file anchoredobject.cxx.

References UpdateLayoutDir().

Referenced by ChgAnchorFrame(), and SwAnchoredDrawObject::ObjectAttachedToAnchorFrame().

◆ OverlapsPrevColumn()

bool SwAnchoredObject::OverlapsPrevColumn ( ) const

method to determine, if the anchored object is overlapping with a previous column

overlapping with a previous column means, that the object overlaps with a column, which is a previous one of the column its anchor frame is in. Only applied for at-paragraph and at-character anchored objects.

#i3317# overlapping with a previous column means, that the object overlaps with a column, which is a previous one of the column its anchor frame is in. Only applied for at-paragraph and at-character anchored objects.

Definition at line 817 of file anchoredobject.cxx.

References SwFrame::FindColFrame(), SwFrameAreaDefinition::getFrameArea(), GetObjRect(), SwFrame::GetPrev(), SwFrame::IsTextFrame(), mpAnchorFrame, SwRect::Overlaps(), and SwRect::Union().

Referenced by SwFlyAtContentFrame::MakeAll(), and SwAnchoredDrawObject::MakeObjPosAnchoredAtPara().

◆ PositionLocked()

bool SwAnchoredObject::PositionLocked ( ) const

◆ RegisterAtCorrectPage()

virtual void SwAnchoredObject::RegisterAtCorrectPage ( )
protectedpure virtual

method to assure that anchored object is registered at the correct page frame

Implemented in SwAnchoredDrawObject, SwFlyFrame, and SwFlyAtContentFrame.

Referenced by SetVertPosOrientFrame().

◆ RegisterAtPage()

virtual void SwAnchoredObject::RegisterAtPage ( SwPageFrame )
pure virtual

◆ ResetLastCharRectHeight()

void SwAnchoredObject::ResetLastCharRectHeight ( )

Definition at line 176 of file anchoredobject.cxx.

References SwRect::Height(), and maLastCharRect.

Referenced by SwFlyAtContentFrame::SetAbsPos().

◆ ResetLayoutProcessBools()

void SwAnchoredObject::ResetLayoutProcessBools ( )
inline

◆ RestartLayoutProcess()

bool SwAnchoredObject::RestartLayoutProcess ( ) const

◆ SetClearedEnvironment()

void SwAnchoredObject::SetClearedEnvironment ( const bool  _bClearedEnvironment)

◆ SetConsiderForTextWrap()

void SwAnchoredObject::SetConsiderForTextWrap ( const bool  _bConsiderForTextWrap)

◆ SetCurrRelPos()

void SwAnchoredObject::SetCurrRelPos ( Point  _aRelPos)

◆ SetDrawObj()

void SwAnchoredObject::SetDrawObj ( SdrObject _rDrawObj)

◆ SetForceNotifyNewBackground()

void SwAnchoredObject::SetForceNotifyNewBackground ( bool const  b)
inline

Definition at line 429 of file anchoredobject.hxx.

Referenced by SwFlyNotify::ImplDestroy().

◆ SetKeepPosLocked()

void SwAnchoredObject::SetKeepPosLocked ( const bool  _bKeepPosLocked)
inline

Definition at line 370 of file anchoredobject.hxx.

◆ SetObjLeft()

void SwAnchoredObject::SetObjLeft ( const SwTwips  _nLeft)

◆ SetObjLeft_()

virtual bool SwAnchoredObject::SetObjLeft_ ( const SwTwips  _nLeft)
protectedpure virtual

Implemented in SwAnchoredDrawObject, and SwFlyFrame.

Referenced by SetObjLeft().

◆ SetObjTop()

void SwAnchoredObject::SetObjTop ( const SwTwips  _nTop)

◆ SetObjTop_()

virtual bool SwAnchoredObject::SetObjTop_ ( const SwTwips  _nTop)
protectedpure virtual

Implemented in SwAnchoredDrawObject, and SwFlyFrame.

Referenced by SetObjTop().

◆ SetPageFrame()

void SwAnchoredObject::SetPageFrame ( SwPageFrame _pNewPageFrame)

◆ SetPositioningInProgress()

void SwAnchoredObject::SetPositioningInProgress ( const bool  _bPosInProgress)
inlineprivate

◆ SetRestartLayoutProcess()

void SwAnchoredObject::SetRestartLayoutProcess ( const bool  _bRestartLayoutProcess)

◆ SetTmpConsiderWrapInfluence()

void SwAnchoredObject::SetTmpConsiderWrapInfluence ( const bool  _bTmpConsiderWrapInfluence)

◆ SetTmpConsiderWrapInfluenceOfOtherObjs()

void SwAnchoredObject::SetTmpConsiderWrapInfluenceOfOtherObjs ( )
protected

method to apply temporary consideration of wrapping style influence to the anchored objects, which are anchored at the same anchor frame

Definition at line 793 of file anchoredobject.cxx.

References GetAnchorFrame(), SwFrame::GetDrawObjs(), and SwSortedObjs::size().

Referenced by SwFlyAtContentFrame::MakeAll().

◆ SetVertPosOrientFrame()

void SwAnchoredObject::SetVertPosOrientFrame ( const SwLayoutFrame _rVertPosOrientFrame)
protected

◆ UnlockPosition()

void SwAnchoredObject::UnlockPosition ( )
inline

◆ UpdateLayoutDir()

void SwAnchoredObject::UpdateLayoutDir ( )
virtual

method update layout direction the layout direction, the anchored object is assigned to

method update layout direction the layout direction, the anchored object is in

method has typically to be called, if the anchored object gets its anchor frame assigned and if the anchor frame changes its layout direction

#i31698# method has typically to be called, if the anchored object gets its anchor frame assigned.

Reimplemented in SwAnchoredDrawObject.

Definition at line 359 of file anchoredobject.cxx.

References GetAnchorFrame(), GetFrameFormat(), SwFrameFormat::HORI_L2R, SwFrameFormat::HORI_R2L, SwFrame::IsRightToLeft(), SwFrame::IsVertical(), SwFrameFormat::SetLayoutDir(), and SwFrameFormat::VERT_R2L.

Referenced by SwFrame::CheckDirChange(), ObjectAttachedToAnchorFrame(), and SwAnchoredDrawObject::UpdateLayoutDir().

◆ UpdateObjInSortedList()

void SwAnchoredObject::UpdateObjInSortedList ( )

method to update anchored object in the <SwSortedObjs> lists

Method is not proposed to be called during a layout process is running. It has been used on the change of the anchored object attributes, which belongs the sort criteria of <SwSortedObjs>. If document compatibility option 'Consider wrapping style influence on object positioning' is ON, additionally all anchored objects at the anchor frame and all following anchored objects on the page frame are invalidated.

#i28701# If document compatibility option 'Consider wrapping style influence on object positioning' is ON, additionally all anchored objects at the anchor frame and all following anchored objects on the page frame are invalidated.

Definition at line 615 of file anchoredobject.cxx.

References AnchorFrame(), SwSortedObjs::begin(), CONSIDER_WRAP_ON_OBJECT_POSITION, ConsiderObjWrapInfluenceOnObjPos(), SwSortedObjs::end(), sw::proofreadingiterator::get(), GetAnchorFrame(), SwFrame::GetDrawObjs(), GetFrameFormat(), GetPageFrame(), SwPageFrame::GetSortedObjs(), i, InvalidateObjPos(), InvalidateObjPosForConsiderWrapInfluence(), SwSortedObjs::ListPosOf(), size, and SwSortedObjs::Update().

Referenced by SwDoc::ChgAnchor(), SwDrawContact::InvalidateObjs_(), and SwFlyFrame::SwClientNotify().

Friends And Related Function Documentation

◆ sw_HideObj

bool sw_HideObj ( const SwTextFrame _rFrame,
const RndStdIds  _eAnchorType,
SwFormatAnchor const &  rFormatAnchor,
SwAnchoredObject _pAnchoredObj 
)
friend

as-character anchored graphics, which are used for a graphic bullet list.

As long as these graphic bullet list aren't imported, do not hide a at-character anchored object, if (a) the document is an imported WW8 document - checked by checking certain compatibility options - (b) the paragraph is the last content in the document and (c) the anchor character is an as-character anchored graphic.

Definition at line 1594 of file txtfrm.cxx.

◆ SwObjPositioningInProgress

friend class SwObjPositioningInProgress
friend

method to indicate, that positioning of anchored object is in progress

note: method is implemented empty

Definition at line 122 of file anchoredobject.hxx.

Member Data Documentation

◆ maLastCharRect

SwRect SwAnchoredObject::maLastCharRect
private

◆ maLastObjRect

SwRect SwAnchoredObject::maLastObjRect
mutableprivate

Definition at line 116 of file anchoredobject.hxx.

Referenced by GetObjRectWithSpaces().

◆ maObjRectWithSpaces

SwRect SwAnchoredObject::maObjRectWithSpaces
mutableprivate

Definition at line 114 of file anchoredobject.hxx.

Referenced by GetObjRectWithSpaces().

◆ maRelPos

Point SwAnchoredObject::maRelPos
private

Definition at line 56 of file anchoredobject.hxx.

Referenced by SetCurrRelPos().

◆ mbClearedEnvironment

bool SwAnchoredObject::mbClearedEnvironment
private

◆ mbConsiderForTextWrap

bool SwAnchoredObject::mbConsiderForTextWrap
private

Definition at line 92 of file anchoredobject.hxx.

Referenced by ConsiderForTextWrap(), and SetConsiderForTextWrap().

◆ mbForceNotifyNewBackground

bool SwAnchoredObject::mbForceNotifyNewBackground = false
private

Definition at line 112 of file anchoredobject.hxx.

◆ mbKeepPositionLockedForSection

bool SwAnchoredObject::mbKeepPositionLockedForSection
private

Definition at line 96 of file anchoredobject.hxx.

◆ mbObjRectWithSpacesValid

bool SwAnchoredObject::mbObjRectWithSpacesValid
mutableprivate

Definition at line 115 of file anchoredobject.hxx.

Referenced by GetObjRectWithSpaces(), SetObjLeft(), and SetObjTop().

◆ mbPositioningInProgress

bool SwAnchoredObject::mbPositioningInProgress
private

Definition at line 78 of file anchoredobject.hxx.

◆ mbPositionLocked

bool SwAnchoredObject::mbPositionLocked
private

Definition at line 93 of file anchoredobject.hxx.

Referenced by PositionLocked().

◆ mbRestartLayoutProcess

bool SwAnchoredObject::mbRestartLayoutProcess
private

Definition at line 98 of file anchoredobject.hxx.

Referenced by RestartLayoutProcess(), and SetRestartLayoutProcess().

◆ mbTmpConsiderWrapInfluence

bool SwAnchoredObject::mbTmpConsiderWrapInfluence
private

◆ mnLastTopOfLine

SwTwips SwAnchoredObject::mnLastTopOfLine
private

Definition at line 68 of file anchoredobject.hxx.

Referenced by AddLastTopOfLineY(), CheckTopOfLine(), and ClearCharRectAndTopOfLine().

◆ mpAnchorFrame

SwFrame* SwAnchoredObject::mpAnchorFrame
private

Frame the object is anchored at.

For at-char/at-para anchor, this is always the master SwTextFrame.

Definition at line 51 of file anchoredobject.hxx.

Referenced by ChgAnchorFrame(), dumpAsXml(), FindAnchorCharFrame(), FindPageFrameOfAnchor(), and OverlapsPrevColumn().

◆ mpDrawObj

rtl::Reference<SdrObject> SwAnchoredObject::mpDrawObj
private

Definition at line 48 of file anchoredobject.hxx.

Referenced by SetDrawObj().

◆ mpPageFrame

SwPageFrame* SwAnchoredObject::mpPageFrame
private

Definition at line 54 of file anchoredobject.hxx.

Referenced by dumpAsXml(), and SetPageFrame().

◆ mpVertPosOrientFrame

const SwLayoutFrame* SwAnchoredObject::mpVertPosOrientFrame
private

Definition at line 74 of file anchoredobject.hxx.

Referenced by ClearVertPosOrientFrame(), and SetVertPosOrientFrame().


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