LibreOffice Module sw (master) 1
Classes | Namespaces | Typedefs | Enumerations | Functions
tblsel.hxx File Reference
#include "swtable.hxx"
#include "swrect.hxx"
#include "swdllapi.h"
#include <o3tl/sorted_vector.hxx>
#include <memory>
#include <deque>
#include <vector>
Include dependency graph for tblsel.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CompareSwSelBoxes
 
class  SwSelBoxes
 
struct  o3tl::typed_flags< SwTableSearchType >
 
class  SwSelUnion
 
class  FndBox_
 
class  FndLine_
 
struct  FndPara
 

Namespaces

namespace  o3tl
 

Typedefs

typedef std::deque< SwCellFrame * > SwCellFrames
 
typedef std::vector< SwSelUnionSwSelUnions
 
typedef std::vector< std::unique_ptr< FndBox_ > > FndBoxes_t
 
typedef std::vector< std::unique_ptr< FndLine_ > > FndLines_t
 

Enumerations

enum class  SwTableSearchType : sal_uInt16 {
  NONE = 0x01 ,
  Row = 0x02 ,
  Col = 0x03 ,
  Protect = 0x08 ,
  NoUnionCorrect = 0x10
}
 

Functions

SW_DLLPUBLIC void GetTableSel (const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType=SwTableSearchType::NONE)
 
void GetTableSel (const SwCursor &rCursor, SwSelBoxes &rBoxes, const SwTableSearchType=SwTableSearchType::NONE)
 
void GetTableSel (const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, SwSelBoxes &rBoxes, SwCellFrames *pCells, const SwTableSearchType=SwTableSearchType::NONE)
 
void GetTableSelCrs (const SwCursorShell &rShell, SwSelBoxes &rBoxes)
 
void GetTableSelCrs (const SwTableCursor &rTableCursor, SwSelBoxes &rBoxes)
 
bool GetAutoSumSel (const SwCursorShell &, SwCellFrames &)
 
bool HasProtectedCells (const SwSelBoxes &rBoxes)
 
bool ChkChartSel (const SwNode &rSttNd, const SwNode &rEndNd)
 
bool IsFrameInTableSel (const SwRect &rUnion, const SwFrame *pCell)
 
void GetMergeSel (const SwPaM &rPam, SwSelBoxes &rBoxes, SwTableBox **ppMergeBox, SwUndoTableMerge *pUndo)
 
TableMergeErr CheckMergeSel (const SwPaM &rPam)
 
TableMergeErr CheckMergeSel (const SwSelBoxes &rBoxes)
 
bool IsEmptyBox (const SwTableBox &rBox, SwPaM &rPam)
 
bool CheckSplitCells (const SwCursorShell &rShell, sal_uInt16 nDiv, const SwTableSearchType)
 
bool CheckSplitCells (const SwCursor &rCursor, sal_uInt16 nDiv, const SwTableSearchType)
 
void MakeSelUnions (SwSelUnions &, const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, const SwTableSearchType=SwTableSearchType::NONE)
 
SW_DLLPUBLIC 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...
 

Typedef Documentation

◆ FndBoxes_t

typedef std::vector<std::unique_ptr<FndBox_> > FndBoxes_t

Definition at line 154 of file tblsel.hxx.

◆ FndLines_t

typedef std::vector<std::unique_ptr<FndLine_> > FndLines_t

Definition at line 155 of file tblsel.hxx.

◆ SwCellFrames

typedef std::deque< SwCellFrame* > SwCellFrames

Definition at line 43 of file tblsel.hxx.

◆ SwSelUnions

typedef std::vector<SwSelUnion> SwSelUnions

Definition at line 138 of file tblsel.hxx.

Enumeration Type Documentation

◆ SwTableSearchType

enum class SwTableSearchType : sal_uInt16
strong
Enumerator
NONE 
Row 
Col 
Protect 
NoUnionCorrect 

Definition at line 58 of file tblsel.hxx.

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 
)

◆ CheckSplitCells() [2/2]

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

◆ ChkChartSel()

bool ChkChartSel ( const SwNode rSttNd,
const SwNode rEndNd 
)

◆ ForEach_FndLineCopyCol()

SW_DLLPUBLIC 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 157 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(), 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 = SwTableSearchType::NONE 
)

◆ GetTableSel() [2/3]

SW_DLLPUBLIC void GetTableSel ( const SwCursorShell rShell,
SwSelBoxes rBoxes,
const  SwTableSearchType = SwTableSearchType::NONE 
)

◆ GetTableSel() [3/3]

void GetTableSel ( const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
SwSelBoxes rBoxes,
SwCellFrames pCells,
const  SwTableSearchType = SwTableSearchType::NONE 
)

◆ 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 
)

◆ MakeSelUnions()

void MakeSelUnions ( SwSelUnions rUnions,
const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
const  SwTableSearchType = SwTableSearchType::NONE 
)