LibreOffice Module sw (master) 1
Macros | Typedefs | Functions
tblsel.cxx File Reference
#include <editeng/boxitem.hxx>
#include <editeng/protitem.hxx>
#include <osl/diagnose.h>
#include <hintids.hxx>
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
#include <frmatr.hxx>
#include <tblsel.hxx>
#include <crsrsh.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <swtable.hxx>
#include <cntfrm.hxx>
#include <tabfrm.hxx>
#include <rowfrm.hxx>
#include <cellfrm.hxx>
#include <rootfrm.hxx>
#include <viscrs.hxx>
#include <swtblfmt.hxx>
#include <UndoTable.hxx>
#include <sectfrm.hxx>
#include <frmtool.hxx>
#include <calbck.hxx>
#include <frameformats.hxx>
#include <deque>
#include <memory>
Include dependency graph for tblsel.cxx:

Go to the source code of this file.

Macros

#define COLFUZZY   20L
 

Typedefs

typedef o3tl::sorted_vector< CmpLPt > MergePos
 

Functions

static const SwLayoutFramelcl_FindCellFrame (const SwLayoutFrame *pLay)
 
static const SwLayoutFramelcl_FindNextCellFrame (const SwLayoutFrame *pLay)
 
void GetTableSelCrs (const SwCursorShell &rShell, SwSelBoxes &rBoxes)
 
void GetTableSelCrs (const SwTableCursor &rTableCursor, SwSelBoxes &rBoxes)
 
void GetTableSel (const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
 
void GetTableSel (const SwCursor &rCursor, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
 
void GetTableSel (const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, SwSelBoxes &rBoxes, SwCellFrames *pCells, const SwTableSearchType eSearchType)
 
bool ChkChartSel (const SwNode &rSttNd, const SwNode &rEndNd)
 
bool IsFrameInTableSel (const SwRect &rUnion, const SwFrame *pCell)
 
bool GetAutoSumSel (const SwCursorShell &rShell, SwCellFrames &rBoxes)
 
bool HasProtectedCells (const SwSelBoxes &rBoxes)
 
static void lcl_InsTableBox (SwTableNode *pTableNd, SwDoc *pDoc, SwTableBox *pBox, sal_uInt16 nInsPos, sal_uInt16 nCnt=1)
 
bool IsEmptyBox (const SwTableBox &rBox, SwPaM &rPam)
 
void GetMergeSel (const SwPaM &rPam, SwSelBoxes &rBoxes, SwTableBox **ppMergeBox, SwUndoTableMerge *pUndo)
 
static bool lcl_CheckCol (FndBox_ const &, bool *pPara)
 
static bool lcl_CheckRow (const FndLine_ &rFndLine, bool *pPara)
 
TableMergeErr CheckMergeSel (const SwPaM &rPam)
 
TableMergeErr CheckMergeSel (const SwSelBoxes &rBoxes)
 
static SwTwips lcl_CalcWish (const SwLayoutFrame *pCell, tools::Long nWish, const tools::Long nAct)
 
static void lcl_FindStartEndRow (const SwLayoutFrame *&rpStart, const SwLayoutFrame *&rpEnd, const bool bChkProtected)
 
static void lcl_FindStartEndCol (const SwLayoutFrame *&rpStart, const SwLayoutFrame *&rpEnd, const bool bChkProtected)
 
void MakeSelUnions (SwSelUnions &rUnions, const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, const SwTableSearchType eSearchType)
 
bool CheckSplitCells (const SwCursorShell &rShell, sal_uInt16 nDiv, const SwTableSearchType eSearchType)
 
bool CheckSplitCells (const SwCursor &rCursor, sal_uInt16 nDiv, const SwTableSearchType eSearchType)
 
static void lcl_InsertRow (SwTableLine const &rLine, SwLayoutFrame *pUpper, SwFrame *pSibling)
 
static void FndBoxCopyCol (SwTableBox *pBox, FndPara *pFndPara)
 
static void FndLineCopyCol (SwTableLine *pLine, FndPara *pFndPara)
 
void ForEach_FndLineCopyCol (SwTableLines &rLines, FndPara *pFndPara)
 This creates a structure mirroring the SwTable structure that contains all rows and non-leaf boxes (as pointers to SwTableBox/SwTableLine, not copies), plus the leaf boxes that are selected by pFndPara->rBoxes. More...
 
void UnsetFollow (SwFlowFrame *pTab)
 
static bool lcl_IsLineOfTableFrame (const SwTabFrame &rTable, const SwFrame &rChk)
 
static void lcl_UpdateRepeatedHeadlines (SwTabFrame &rTabFrame, bool bCalcLowers)
 

Macro Definition Documentation

◆ COLFUZZY

#define COLFUZZY   20L

Definition at line 52 of file tblsel.cxx.

Typedef Documentation

◆ MergePos

typedef o3tl::sorted_vector<CmpLPt> MergePos

Definition at line 90 of file tblsel.cxx.

Function Documentation

◆ CheckMergeSel() [1/2]

TableMergeErr CheckMergeSel ( const SwPaM rPam)

◆ CheckMergeSel() [2/2]

TableMergeErr CheckMergeSel ( const SwSelBoxes rBoxes)

◆ CheckSplitCells() [1/2]

bool CheckSplitCells ( const SwCursor rCursor,
sal_uInt16  nDiv,
const SwTableSearchType  eSearchType 
)

◆ CheckSplitCells() [2/2]

bool CheckSplitCells ( const SwCursorShell rShell,
sal_uInt16  nDiv,
const SwTableSearchType  eSearchType 
)

◆ ChkChartSel()

bool ChkChartSel ( const SwNode rSttNd,
const SwNode rEndNd 
)

◆ FndBoxCopyCol()

static void FndBoxCopyCol ( SwTableBox pBox,
FndPara pFndPara 
)
static

◆ FndLineCopyCol()

static void FndLineCopyCol ( SwTableLine pLine,
FndPara pFndPara 
)
static

Definition at line 2078 of file tblsel.cxx.

References FndBoxCopyCol(), FndBox_::GetLines(), and FndPara::pFndBox.

Referenced by ForEach_FndLineCopyCol().

◆ ForEach_FndLineCopyCol()

void ForEach_FndLineCopyCol ( SwTableLines rLines,
FndPara pFndPara 
)

This creates a structure mirroring the SwTable structure that contains all rows and non-leaf boxes (as pointers to SwTableBox/SwTableLine, not copies), plus the leaf boxes that are selected by pFndPara->rBoxes.

Definition at line 2090 of file tblsel.cxx.

References SwTableLines::begin(), SwTableLines::end(), and FndLineCopyCol().

Referenced by CheckMergeSel(), SwTable::CopyHeadlineIntoTable(), SwFEShell::DeleteRow(), SwDoc::DeleteRow(), FndBoxCopyCol(), SwDoc::GetTableAutoFormat(), SwTable::InsertCol(), SwTable::InsertRow_(), SwTable::InsNewTable(), SwTable::InsTable(), lcl_CollectLines(), lcl_GetSelTable(), SwTable::MakeCopy(), SwTable::OldMerge(), SwDoc::SetTableAutoFormat(), and SwDoc::SortTable().

◆ GetAutoSumSel()

bool GetAutoSumSel ( const SwCursorShell rShell,
SwCellFrames rBoxes 
)

Definition at line 691 of file tblsel.cxx.

◆ GetMergeSel()

void GetMergeSel ( const SwPaM rPam,
SwSelBoxes rBoxes,
SwTableBox **  ppMergeBox,
SwUndoTableMerge pUndo 
)

Definition at line 927 of file tblsel.cxx.

References SwUndoTableMerge::AddNewBox(), SwPosition::Adjust(), IDocumentContentOperations::AppendTextNode(), SwPosition::Assign(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), SwRect::Bottom(), SwTableBox::ClaimFrameFormat(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::clear(), COLFUZZY, DEFAULT, SwNodes::Delete(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::empty(), SwNode::EndOfSectionIndex(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), SwLayoutFrame::FirstCell(), SwFormat::GetAttrSet(), SvxBoxItem::GetBottom(), SwFormat::GetBox(), SwTableLine::GetBoxPos(), IDocumentLayoutAccess::GetCurrentLayout(), SwNode::GetDoc(), SwFormat::GetDoc(), SwTabFrame::GetFirstNonHeadlineRow(), SwLayoutFrame::GetFormat(), SwFrameAreaDefinition::getFrameArea(), SwTableBox::GetFrameFormat(), SwFormat::GetFrameSize(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetIDocumentUndoRedo(), SfxItemSet::GetItemIfSet(), SwContentNode::getLayoutFrame(), SvxBoxItem::GetLeft(), SwPaM::GetMarkContentNode(), SwFrame::GetNext(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwPaM::GetPointContentNode(), SwRectFnSet::GetPos(), SvxBoxItem::GetRight(), SwTableBox::GetSttIdx(), SwTableLine::GetTabBoxes(), SwTabFrame::GetTable(), SwTable::GetTabSortBoxes(), SwTextNode::GetText(), SwNode::GetTextNode(), SvxBoxItem::GetTop(), SwRect::GetUnion(), SwTableBox::GetUpper(), SwFrame::GetUpper(), SvxSizeItem::GetWidth(), i, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), IsEmptyBox(), SwFrame::IsRowFrame(), SwRectFnSet::IsVert(), lcl_FindNextCellFrame(), lcl_InsTableBox(), SwRect::Left(), SwContentNode::Len(), SwLayoutFrame::Lower(), MakeSelUnions(), SwUndoTableMerge::MoveBoxContent(), IDocumentContentOperations::MoveNodeRange(), n, SwRect::Overlaps(), Point, RES_BOX(), SwRect::Right(), sal_False, sal_True, SwUndoTableMerge::SaveCollection(), SwPosition::SetContent(), SwFormat::SetFormatAttr(), SvxBoxItem::SetLine(), SvxSizeItem::SetWidth(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size(), SwRect::Top(), Variable, SwRect::Width(), and Y.

Referenced by SwTable::PrepareMerge().

◆ GetTableSel() [1/3]

void GetTableSel ( const SwCursor rCursor,
SwSelBoxes rBoxes,
const SwTableSearchType  eSearchType 
)

◆ GetTableSel() [2/3]

void GetTableSel ( const SwCursorShell rShell,
SwSelBoxes rBoxes,
const SwTableSearchType  eSearchType 
)

◆ GetTableSel() [3/3]

void GetTableSel ( const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
SwSelBoxes rBoxes,
SwCellFrames pCells,
const SwTableSearchType  eSearchType 
)

◆ GetTableSelCrs() [1/2]

void GetTableSelCrs ( const SwCursorShell rShell,
SwSelBoxes rBoxes 
)

◆ GetTableSelCrs() [2/2]

void GetTableSelCrs ( const SwTableCursor rTableCursor,
SwSelBoxes rBoxes 
)

◆ HasProtectedCells()

bool HasProtectedCells ( const SwSelBoxes rBoxes)

◆ IsEmptyBox()

bool IsEmptyBox ( const SwTableBox rBox,
SwPaM rPam 
)

◆ IsFrameInTableSel()

bool IsFrameInTableSel ( const SwRect rUnion,
const SwFrame pCell 
)

◆ lcl_CalcWish()

static SwTwips lcl_CalcWish ( const SwLayoutFrame pCell,
tools::Long  nWish,
const tools::Long  nAct 
)
static

◆ lcl_CheckCol()

static bool lcl_CheckCol ( FndBox_ const &  rFndBox,
bool *  pPara 
)
static

◆ lcl_CheckRow()

static bool lcl_CheckRow ( const FndLine_ rFndLine,
bool *  pPara 
)
static

Definition at line 1414 of file tblsel.cxx.

References FndLine_::GetBoxes(), and lcl_CheckCol().

Referenced by CheckMergeSel(), and lcl_CheckCol().

◆ lcl_FindCellFrame()

static const SwLayoutFrame * lcl_FindCellFrame ( const SwLayoutFrame pLay)
static

Definition at line 104 of file tblsel.cxx.

References SwFrame::GetUpper(), and SwFrame::IsCellFrame().

Referenced by MakeSelUnions().

◆ lcl_FindNextCellFrame()

static const SwLayoutFrame * lcl_FindNextCellFrame ( const SwLayoutFrame pLay)
static

◆ lcl_FindStartEndCol()

static void lcl_FindStartEndCol ( const SwLayoutFrame *&  rpStart,
const SwLayoutFrame *&  rpEnd,
const bool  bChkProtected 
)
static

◆ lcl_FindStartEndRow()

static void lcl_FindStartEndRow ( const SwLayoutFrame *&  rpStart,
const SwLayoutFrame *&  rpEnd,
const bool  bChkProtected 
)
static

◆ lcl_InsertRow()

static void lcl_InsertRow ( SwTableLine const &  rLine,
SwLayoutFrame pUpper,
SwFrame pSibling 
)
static

◆ lcl_InsTableBox()

static void lcl_InsTableBox ( SwTableNode pTableNd,
SwDoc pDoc,
SwTableBox pBox,
sal_uInt16  nInsPos,
sal_uInt16  nCnt = 1 
)
static

◆ lcl_IsLineOfTableFrame()

static bool lcl_IsLineOfTableFrame ( const SwTabFrame rTable,
const SwFrame rChk 
)
static

Definition at line 2283 of file tblsel.cxx.

References SwTabFrame::FindMaster(), and SwFrame::FindTabFrame().

Referenced by FndBox_::MakeFrames(), and FndBox_::MakeNewFrames().

◆ lcl_UpdateRepeatedHeadlines()

static void lcl_UpdateRepeatedHeadlines ( SwTabFrame rTabFrame,
bool  bCalcLowers 
)
static

◆ MakeSelUnions()

void MakeSelUnions ( SwSelUnions rUnions,
const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
const SwTableSearchType  eSearchType 
)

◆ UnsetFollow()

void UnsetFollow ( SwFlowFrame *  pTab)
inline

Definition at line 2153 of file tblsel.cxx.

Referenced by FndBox_::DelFrames().