LibreOffice Module sw (master)  1
Classes | Functions | Variables
frmtool.cxx File Reference
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lspcitem.hxx>
#include <sal/log.hxx>
#include <drawdoc.hxx>
#include <fmtornt.hxx>
#include <fmthdft.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
#include <docary.hxx>
#include <lineinfo.hxx>
#include <swmodule.hxx>
#include <pagefrm.hxx>
#include <colfrm.hxx>
#include <fesh.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
#include <dflyobj.hxx>
#include <dcontact.hxx>
#include <frmatr.hxx>
#include <frmtool.hxx>
#include <tabfrm.hxx>
#include <rowfrm.hxx>
#include <ftnfrm.hxx>
#include <txtfrm.hxx>
#include <notxtfrm.hxx>
#include <flyfrms.hxx>
#include <layact.hxx>
#include <pagedesc.hxx>
#include <section.hxx>
#include <sectfrm.hxx>
#include <node2lay.hxx>
#include <ndole.hxx>
#include <hints.hxx>
#include "layhelp.hxx"
#include <laycache.hxx>
#include <rootfrm.hxx>
#include <paratr.hxx>
#include <redline.hxx>
#include <sortedobjs.hxx>
#include <objectformatter.hxx>
#include <calbck.hxx>
#include <ndtxt.hxx>
#include <DocumentSettingManager.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentTimerAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentState.hxx>
#include <boost/circular_buffer.hpp>
#include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
Include dependency graph for frmtool.cxx:

Go to the source code of this file.


class  SwFrameHolder


static void lcl_InvalidatePosOfLowers (SwLayoutFrame &_rLayoutFrame)
void AppendObj (SwFrame *const pFrame, SwPageFrame *const pPage, SwFrameFormat *const pFormat, const SwFormatAnchor &rAnch)
static bool IsShown (sal_uLong const nIndex, const SwFormatAnchor &rAnch, std::vector< sw::Extent >::const_iterator const *const pIter, std::vector< sw::Extent >::const_iterator const *const pEnd)
void RemoveHiddenObjsOfNode (SwTextNode const &rNode, std::vector< sw::Extent >::const_iterator const *const pIter, std::vector< sw::Extent >::const_iterator const *const pEnd)
void AppendObjsOfNode (SwFrameFormats const *const pTable, sal_uLong const nIndex, SwFrame *const pFrame, SwPageFrame *const pPage, SwDoc *const pDoc, std::vector< sw::Extent >::const_iterator const *const pIter, std::vector< sw::Extent >::const_iterator const *const pEnd)
void AppendObjs (const SwFrameFormats *const pTable, sal_uLong const nIndex, SwFrame *const pFrame, SwPageFrame *const pPage, SwDoc *const pDoc)
bool IsAnchoredObjShown (SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
void AppendAllObjs (const SwFrameFormats *pTable, const SwFrame *pSib)
static void lcl_SetPos (SwFrame &_rNewFrame, const SwLayoutFrame &_rLayFrame)
 local method to set 'working' position for newly inserted frames More...
void InsertCnt_ (SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex, bool bPages, sal_uLong nEndIndex, SwFrame *pPrv)
void MakeFrames (SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx)
static bool lcl_hasTabFrame (const SwTextFrame *pTextFrame)
 Tries to detect if this paragraph has a floating table attached. More...
static bool CmpLines (const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2)
static SwModify const * GetCacheOwner (SwFrame const &rFrame)
static void lcl_RemoveObjsFromPage (SwFrame *_pFrame)
 Keep and restore the substructure of a layout frame for an action. More...
SwFrameSaveContent (SwLayoutFrame *pLay, SwFrame *pStart)
static void lcl_AddObjsToPage (SwFrame *_pFrame, SwPageFrame *_pPage)
void RestoreContent (SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
SwPageFrameInsertNewPage (SwPageDesc &rDesc, SwFrame *pUpper, bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling)
static void lcl_Regist (SwPageFrame *pPage, const SwFrame *pAnch)
void RegistFlys (SwPageFrame *pPage, const SwLayoutFrame *pLay)
void Notify (SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld, const SwRect *pOldPrt)
 Notify the background based on the difference between old and new rectangle. More...
static void lcl_CheckFlowBack (SwFrame *pFrame, const SwRect &rRect)
static void lcl_NotifyContent (const SdrObject *pThis, SwContentFrame *pCnt, const SwRect &rRect, const PrepareHint eHint)
void Notify_Background (const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
const SwFrameGetVirtualUpper (const SwFrame *pFrame, const Point &rPos)
 Provides the Upper of an anchor in paragraph-bound objects. More...
bool Is_Lower_Of (const SwFrame *pCurrFrame, const SdrObject *pObj)
const SwFrameFindContext (const SwFrame *pFrame, SwFrameType nAdditionalContextType)
 provides the area of a frame in that no Fly from another area can overlap More...
bool IsFrameInSameContext (const SwFrame *pInnerFrame, const SwFrame *pFrame)
static SwTwips lcl_CalcCellRstHeight (SwLayoutFrame *pCell)
SwTwips CalcRowRstHeight (SwLayoutFrame *pRow)
const SwFrameFindPage (const SwRect &rRect, const SwFrame *pPage)
SwFrameGetFrameOfModify (SwRootFrame const *const pLayout, SwModify const &rMod, SwFrameType const nFrameType, SwPosition const *const pPos, std::pair< Point, bool > const *const pViewPosAndCalcFrame)
bool IsExtraData (const SwDoc *pDoc)
void GetSpacingValuesOfFrame (const SwFrame &rFrame, SwTwips &onLowerSpacing, SwTwips &onLineSpacing, bool &obIsLineSpacingProportional)
 method to determine the spacing values of a frame More...
const SwContentFrameGetCellContent (const SwLayoutFrame &rCell)
 get the content of the table cell, skipping content from nested tables More...


bool bObjsDirect = true
bool bDontCreateObjects = false
bool bSetCompletePaintOnInvalidate = false

Function Documentation

void AppendAllObjs ( const SwFrameFormats pTable,
const SwFrame pSib 
void AppendObj ( SwFrame *const  pFrame,
SwPageFrame *const  pPage,
SwFrameFormat *const  pFormat,
const SwFormatAnchor rAnch 
void AppendObjs ( const SwFrameFormats *const  pTable,
sal_uLong const  nIndex,
SwFrame *const  pFrame,
SwPageFrame *const  pPage,
SwDoc *const  pDoc 
void AppendObjsOfNode ( SwFrameFormats const *const  pTable,
sal_uLong const  nIndex,
SwFrame *const  pFrame,
SwPageFrame *const  pPage,
SwDoc *const  pDoc,
std::vector< sw::Extent >::const_iterator const *const  pIter,
std::vector< sw::Extent >::const_iterator const *const  pEnd 
SwTwips CalcRowRstHeight ( SwLayoutFrame pRow)
static bool CmpLines ( const editeng::SvxBorderLine pL1,
const editeng::SvxBorderLine pL2 

Definition at line 2189 of file frmtool.cxx.

Referenced by SwBorderAttrs::CmpLeftRight(), and SwBorderAttrs::JoinWithCmp().

const SwFrame* FindContext ( const SwFrame pFrame,
SwFrameType  nAdditionalContextType 
const SwFrame* FindPage ( const SwRect rRect,
const SwFrame pPage 
static SwModify const* GetCacheOwner ( SwFrame const &  rFrame)

Definition at line 2353 of file frmtool.cxx.

References GetNode(), SwFrame::IsContentFrame(), and SwFrame::IsTextFrame().

const SwContentFrame* GetCellContent ( const SwLayoutFrame rCell)

get the content of the table cell, skipping content from nested tables

method to get the content of the table cell

Definition at line 3640 of file frmtool.cxx.

References SwLayoutFrame::ContainsContent(), SwTabFrame::FindLastContent(), SwFrame::FindNextCnt(), SwFrame::FindTabFrame(), and SwLayoutFrame::IsAnLower().

Referenced by SwDoc::GetTabRows(), SwFEShell::SelTableRowCol(), and SwDoc::SetTabRows().

SwFrame* GetFrameOfModify ( SwRootFrame const *const  pLayout,
SwModify const &  rMod,
SwFrameType const  nFrameType,
SwPosition const *const  pPos,
std::pair< Point, bool > const *const  pViewPosAndCalcFrame 
void GetSpacingValuesOfFrame ( const SwFrame rFrame,
SwTwips onLowerSpacing,
SwTwips onLineSpacing,
bool &  obIsLineSpacingProportional 

method to determine the spacing values of a frame

OD 2004-03-10 #i28701# OD 2009-08-28 #i102458# Add output parameter <obIsLineSpacingProportional>

Definition at line 3609 of file frmtool.cxx.

References SwFrame::GetAttrSet(), SvxULSpaceItem::GetLower(), SwAttrSet::GetULSpace(), SwFrame::IsFlowFrame(), and SwFrame::IsTextFrame().

Referenced by SwFlowFrame::CalcUpperSpace(), and SwFlowFrame::GetUpperSpaceAmountConsideredForPrevFrame().

const SwFrame* GetVirtualUpper ( const SwFrame pFrame,
const Point rPos 

Provides the Upper of an anchor in paragraph-bound objects.

If the latter is a chained border or a footnote, the "virtual" Upper might be returne.

Definition at line 3250 of file frmtool.cxx.

References SwFrame::FindFlyFrame(), SwFootnoteFrame::GetFollow(), SwFrameAreaDefinition::getFrameArea(), SwFlyFrame::GetNextLink(), SwFrame::GetUpper(), SwFrame::IsFootnoteFrame(), SwRect::IsInside(), and SwFrame::IsTextFrame().

Referenced by SwTextFly::GetTop(), Is_Lower_Of(), and IsFrameInSameContext().

void InsertCnt_ ( SwLayoutFrame pLay,
SwDoc pDoc,
sal_uLong  nIndex,
bool  bPages,
sal_uLong  nEndIndex,
SwFrame pPrv 

Definition at line 1322 of file frmtool.cxx.

References AppendAllObjs(), AppendObjs(), bDontCreateObjects, IDocumentTimerAccess::BlockIdling(), bObjsDirect, SwSection::CalcHiddenFlag(), SwFrame::CheckDirChange(), SwLayoutCache::ClearImpl(), SwLayoutCache::CompareLayout(), SwLayoutFrame::ContainsContent(), SwSectionFrame::DelEmpty(), Delete, SwFrame::DestroyFrame(), SwFrameFormats::empty(), SwNode::EndOfSectionIndex(), SwFrame::FindFlyFrame(), SwTabFrame::FindMaster(), SwFrame::FindNextCnt(), SwFrame::FindPageFrame(), SwFrame::FindPrevCnt(), SwFrame::FindSctFrame(), SwTable::GCLines(), SwRootFrame::GetCurrShell(), SwSectionFrame::GetFollow(), SwDoc::getIDocumentFieldsAccess(), SwDoc::getIDocumentRedlineAccess(), SwDoc::getIDocumentTimerAccess(), SwDoc::GetLayoutCache(), SwContentNode::getLayoutFrame(), SwFrame::GetNextLayoutLeaf(), SwNode::GetNodes(), SwDoc::GetNodes(), SwFrame::GetPrev(), IDocumentRedlineAccess::GetRedline(), SwNode::GetRedlineMergeFlag(), SwFrame::getRootFrame(), SwSectionNode::GetSection(), SwDoc::GetSpzFrameFormats(), SwTableNode::GetTable(), SwFrame::GetUpper(), SwNode::Hidden, SwFrame::ImplFindFootnoteFrame(), Init(), SwFrame::InsertBehind(), SwViewShell::InvalidateAccessibleParaFlowRelation(), SwPageFrame::InvalidateContent(), SwPageFrame::InvalidateFlyContent(), SwFrame::InvalidateInfFlags(), SwFrame::InvalidatePage(), SwFrame::InvalidateSize(), SwRootFrame::IsCallbackActionEnabled(), SwFrame::IsColLocked(), SwFrame::IsColumnFrame(), SwNode::IsContentNode(), SwNode::IsCreateFrameWhenHidingRedlines(), SwNode::IsEndNode(), SwFlowFrame::IsFollow(), SwRootFrame::IsHideRedlines(), SwFrame::IsInFly(), SwFrame::IsInFootnote(), SwFrame::IsInSct(), SwFrame::IsInTab(), SwFrame::IsLayoutFrame(), SwFrame::IsSctFrame(), SwNode::IsSectionNode(), SwNode::IsStartNode(), SwNode::IsTableNode(), SwFrame::IsTextFrame(), SwNode::IsTextNode(), lcl_SetPos(), SwLayoutFrame::Lower(), SwTableFormulaUpdate::m_eFlags, SwContentNode::MakeFrame(), SwTableNode::MakeFrame(), SwSectionNode::MakeFrame(), SwNode::NonFirst, PREP_QUOVADIS, SwFrame::Prepare(), SwFrame::RemoveFromLayout(), SAL_WARN, SwRootFrame::SetCallbackActionEnabled(), SwFlowFrame::SetFollow(), SwNode::StartOfSectionNode(), SwFlyStartNode, TBL_BOXPTR, IDocumentTimerAccess::UnblockIdling(), and IDocumentFieldsAccess::UpdateTableFields().

Referenced by SwFootnoteBossFrame::AppendFootnote(), SwTextFrame::ConnectFootnote(), SwRootFrame::Init(), SwFlyFrame::InsertCnt(), MakeFrames(), SwNode2LayImpl::RestoreUpperFrames(), SwCellFrame::SwCellFrame(), SwHeadFootFrame::SwHeadFootFrame(), and SwFlyFrame::UnchainFrames().

SwPageFrame* InsertNewPage ( SwPageDesc rDesc,
SwFrame pUpper,
bool  bOdd,
bool  bFirst,
bool  bInsertEmpty,
bool  bFootnote,
SwFrame pSibling 
bool Is_Lower_Of ( const SwFrame pCurrFrame,
const SdrObject pObj 
bool IsAnchoredObjShown ( SwTextFrame const &  rFrame,
SwFormatAnchor const &  rAnchor 
bool IsExtraData ( const SwDoc pDoc)
bool IsFrameInSameContext ( const SwFrame pInnerFrame,
const SwFrame pFrame 
static bool IsShown ( sal_uLong const  nIndex,
const SwFormatAnchor rAnch,
std::vector< sw::Extent >::const_iterator const *const  pIter,
std::vector< sw::Extent >::const_iterator const *const  pEnd 
static void lcl_AddObjsToPage ( SwFrame _pFrame,
SwPageFrame _pPage 
static SwTwips lcl_CalcCellRstHeight ( SwLayoutFrame pCell)
static void lcl_CheckFlowBack ( SwFrame pFrame,
const SwRect rRect 
static bool lcl_hasTabFrame ( const SwTextFrame pTextFrame)

Tries to detect if this paragraph has a floating table attached.

Definition at line 2074 of file frmtool.cxx.

References SwFrame::GetDrawObjs(), SwFrame::IsTabFrame(), SwLayoutFrame::Lower(), and SwSortedObjs::size().

Referenced by SwBorderAttrs::CalcLeft().

static void lcl_InvalidatePosOfLowers ( SwLayoutFrame _rLayoutFrame)
static void lcl_NotifyContent ( const SdrObject pThis,
SwContentFrame pCnt,
const SwRect rRect,
const PrepareHint  eHint 
static void lcl_Regist ( SwPageFrame pPage,
const SwFrame pAnch 
static void lcl_RemoveObjsFromPage ( SwFrame _pFrame)

Keep and restore the substructure of a layout frame for an action.

Definition at line 2506 of file frmtool.cxx.

References SwLayoutFrame::ContainsContent(), SwFrame::GetDrawObjs(), SwContentFrame::GetNextContentFrame(), SwAnchoredObject::GetPageFrame(), SwFlyFrame::IsFlyFreeFrame(), and SwPageFrame::RemoveFlyFromPage().

Referenced by SaveContent().

static void lcl_SetPos ( SwFrame _rNewFrame,
const SwLayoutFrame _rLayFrame 

local method to set 'working' position for newly inserted frames

OD 12.08.2003 #i17969#

Definition at line 1303 of file frmtool.cxx.

References SwFrameAreaDefinition::getFrameArea(), SwRectFnSet::GetPos(), SwRectFnSet::IsVert(), SwRect::Pos(), and SwRectFnSet::SetPos().

Referenced by InsertCnt_().

void MakeFrames ( SwDoc pDoc,
const SwNodeIndex rSttIdx,
const SwNodeIndex rEndIdx 
void Notify ( SwFlyFrame pFly,
SwPageFrame pOld,
const SwRect rOld,
const SwRect pOldPrt = nullptr 
void Notify_Background ( const SdrObject pObj,
SwPageFrame pPage,
const SwRect rRect,
const PrepareHint  eHint,
const bool  bInva 

Definition at line 3072 of file frmtool.cxx.

References SwAnchoredObject::AnchorFrame(), SwRect::Bottom(), SwLayoutFrame::ContainsContent(), FAR_AWAY, SwFrame::FindFlyFrame(), SwFrame::FindFooterOrHeader(), SwFrame::FindTabFrame(), SwContact::GetAnchoredObj(), SwAnchoredObject::GetAnchorFrame(), SwRootFrame::GetCurrShell(), SwLayoutFrame::GetFormat(), SwFlyFrame::GetFormat(), SwFrameAreaDefinition::getFrameArea(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SdrObject::GetLastBoundRect(), SwContentFrame::GetNextContentFrame(), SdrObject::GetOrdNum(), SdrObject::GetOrdNumDirect(), SwFrame::GetPrev(), SwFormatHoriOrient::GetRelationOrient(), SwFrame::getRootFrame(), SwPageFrame::GetSortedObjs(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), SwFrame::GetUpper(), GetUserCall(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), SwFlyFrame::GetVirtDrawObj(), SwFrame::InvalidatePos(), SwFrame::InvalidatePrt(), SwFrame::InvalidateSize(), SwViewShell::InvalidateWindows(), SwLayoutFrame::IsAnLower(), SwFlyFrame::IsAutoPos(), SwFrame::IsCellFrame(), SwFrame::IsColumnFrame(), SwFlyFrame::IsFlyAtContentFrame(), SwFlyFrame::IsFlyLayFrame(), SwFlowFrame::IsFollow(), SwFrame::IsInFly(), SwFrame::IsInTab(), SwFlyFrame::IsLowerOf(), SwRect::IsOver(), lcl_CheckFlowBack(), lcl_NotifyContent(), SwRect::Left(), SwLayoutFrame::Lower(), sw::sidebar::NONE, PREP_FLY_ARRIVE, PREP_FLY_LEAVE, SwRect::Right(), and SwRect::Top().

Referenced by lcl_NotifyBackgroundOfObj(), SwContact::MoveObjToInvisibleLayer(), SwContact::MoveObjToVisibleLayer(), SwDrawContact::NotifyBackgrdOfAllVirtObjs(), SwFlyFreeFrame::NotifyBackground(), SwAnchoredDrawObject::NotifyBackground(), and SwFlyAtContentFrame::SetAbsPos().

void RegistFlys ( SwPageFrame pPage,
const SwLayoutFrame pLay 
void RemoveHiddenObjsOfNode ( SwTextNode const &  rNode,
std::vector< sw::Extent >::const_iterator const *const  pIter,
std::vector< sw::Extent >::const_iterator const *const  pEnd 
void RestoreContent ( SwFrame pSav,
SwLayoutFrame pParent,
SwFrame pSibling 
SwFrame* SaveContent ( SwLayoutFrame pLay,
SwFrame pStart = nullptr 

Variable Documentation

bool bDontCreateObjects = false
bool bObjsDirect = true

Definition at line 79 of file frmtool.cxx.

Referenced by InsertCnt_(), MakeFrames(), and SwHeadFootFrame::SwHeadFootFrame().

bool bSetCompletePaintOnInvalidate = false

Definition at line 81 of file frmtool.cxx.

Referenced by SwFlyAtContentFrame::MakeAll(), and SwContentNotify::~SwContentNotify().