LibreOffice Module sw (master)
1
|
#include "swtable.hxx"
#include "swrect.hxx"
#include "swdllapi.h"
#include <o3tl/sorted_vector.hxx>
#include <memory>
#include <deque>
#include <vector>
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 | |
o3tl | |
Typedefs | |
typedef std::deque< SwCellFrame * > | SwCellFrames |
typedef std::vector< SwSelUnion > | SwSelUnions |
typedef std::vector< std::unique_ptr< FndBox_ > > | FndBoxes_t |
typedef std::vector< std::unique_ptr< FndLine_ > > | FndLines_t |
Enumerations | |
enum | SwTableSearchType : sal_uInt16 { SwTableSearchType::NONE = 0x01, SwTableSearchType::Row = 0x02, SwTableSearchType::Col = 0x03, SwTableSearchType::Protect = 0x08, SwTableSearchType::NoUnionCorrect = 0x10 } |
typedef std::vector<std::unique_ptr<FndBox_> > FndBoxes_t |
Definition at line 152 of file tblsel.hxx.
typedef std::vector<std::unique_ptr<FndLine_> > FndLines_t |
Definition at line 155 of file tblsel.hxx.
typedef std::deque< SwCellFrame* > SwCellFrames |
Definition at line 41 of file tblsel.hxx.
typedef std::vector<SwSelUnion> SwSelUnions |
Definition at line 138 of file tblsel.hxx.
|
strong |
Enumerator | |
---|---|
NONE | |
Row | |
Col | |
Protect | |
NoUnionCorrect |
Definition at line 58 of file tblsel.hxx.
TableMergeErr CheckMergeSel | ( | const SwPaM & | rPam | ) |
Definition at line 1452 of file tblsel.cxx.
References CheckMergeSel(), SwPaM::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwNode::GetDoc(), SwDoc::getIDocumentLayoutAccess(), SwContentNode::getLayoutFrame(), GetTableSel(), and Point.
Referenced by CheckMergeSel(), and SwDoc::MergeTable().
TableMergeErr CheckMergeSel | ( | const SwSelBoxes & | rBoxes | ) |
Definition at line 1473 of file tblsel.cxx.
References o3tl::sorted_vector< Value, Compare, Find, class >::empty(), ForEach_FndLineCopyCol(), FndLine_::GetBoxes(), FndBox_::GetLines(), SwTableNode::GetTable(), SwTable::GetTabLines(), lcl_CheckCol(), lcl_CheckRow(), NoSelection, Ok, FndPara::rBoxes, and TooComplex.
bool CheckSplitCells | ( | const SwCursorShell & | rShell, |
sal_uInt16 | nDiv, | ||
const SwTableSearchType | |||
) |
Definition at line 1963 of file tblsel.cxx.
References CheckSplitCells(), SwCursorShell::GetCursor(), SwCursorShell::getShellCursor(), and SwCursorShell::IsTableMode().
Referenced by CheckSplitCells(), SwFEShell::InsertCol(), SwDoc::InsertCol(), and SwFEShell::SplitTab().
bool CheckSplitCells | ( | const SwCursor & | rCursor, |
sal_uInt16 | nDiv, | ||
const SwTableSearchType | |||
) |
Definition at line 1972 of file tblsel.cxx.
References SwLayoutFrame::FirstCell(), SwPaM::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwNode::GetDoc(), SwTabFrame::GetFirstNonHeadlineRow(), SwFrameAreaDefinition::getFrameArea(), SwDoc::getIDocumentLayoutAccess(), SwContentNode::getLayoutFrame(), SwShellCursor::GetMkPos(), SwFrame::GetNext(), SwShellCursor::GetPtPos(), SwTabFrame::GetTable(), SwFrame::GetUpper(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), SwFlowFrame::IsFollow(), IsFrameInTableSel(), SwRect::IsOver(), SwFrame::IsRowFrame(), lcl_FindNextCellFrame(), SwLayoutFrame::Lower(), MakeSelUnions(), MINLAY, and Point.
Definition at line 428 of file tblsel.cxx.
References SwFrame::Calc(), SwNode::FindTableNode(), SwLayoutFrame::FirstCell(), SwNode::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwRootFrame::GetCurrShell(), SwNode::GetDoc(), SwTabFrame::GetFirstNonHeadlineRow(), SwTabFrame::GetFollow(), SwFrameAreaDefinition::getFrameArea(), SwRectFnSet::GetHeight(), SwDoc::getIDocumentLayoutAccess(), SwContentNode::getLayoutFrame(), SwRectFnSet::GetLeft(), SwFrame::GetNext(), SwNodeIndex::GetNode(), SwNodeIndex::GetNodes(), SwViewShell::GetOut(), SwRectFnSet::GetRight(), SwFrame::getRootFrame(), SwSelUnion::GetTable(), SwTabFrame::GetTable(), SwRectFnSet::GetTop(), SwSelUnion::GetUnion(), SwRectFnSet::GetWidth(), SwNodes::GoNextSection(), i, SwFrame::InvalidatePos(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), SwFlowFrame::IsFollow(), SwFrameAreaDefinition::isFrameAreaDefinitionValid(), SwRect::IsOver(), SwFrame::IsRightToLeft(), SwFrame::IsRowFrame(), SwRectFnSet::IsVert(), lcl_FindNextCellFrame(), LONG_MAX, SwLayoutFrame::Lower(), MakeSelUnions(), n, NoUnionCorrect, Point, SwRect::Right(), SwFrame::SetCompletePaint(), SwTabFrame::SetONECalcLowers(), and USHRT_MAX.
Referenced by SwTable::IsTableComplexForChart().
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 2104 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().
bool GetAutoSumSel | ( | const SwCursorShell & | , |
SwCellFrames & | |||
) |
Definition at line 693 of file tblsel.cxx.
References Col, SwLayoutFrame::FirstCell(), SwPaM::GetContentNode(), SwTabFrame::GetFirstNonHeadlineRow(), SwFrameAreaDefinition::getFrameArea(), SwViewShell::GetLayout(), SwContentNode::getLayoutFrame(), SwShellCursor::GetMkPos(), SwFrame::GetNext(), SwShellCursor::GetPtPos(), SwCellFrame::GetTabBox(), SwSelUnion::GetTable(), SwSelUnion::GetUnion(), SwFrame::GetUpper(), i, SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), SwFlowFrame::IsFollow(), SwTableBox::IsFormulaOrValueBox(), IsFrameInTableSel(), SwRect::IsOver(), SwFrame::IsRowFrame(), SwCursorShell::IsTableMode(), lcl_FindNextCellFrame(), SwLayoutFrame::Lower(), SwCursorShell::m_pCurrentCursor, SwCursorShell::m_pTableCursor, MakeSelUnions(), n, Row, and USHRT_MAX.
void GetMergeSel | ( | const SwPaM & | rPam, |
SwSelBoxes & | rBoxes, | ||
SwTableBox ** | ppMergeBox, | ||
SwUndoTableMerge * | pUndo | ||
) |
Definition at line 929 of file tblsel.cxx.
References SwUndoTableMerge::AddNewBox(), IDocumentContentOperations::AppendTextNode(), SwIndex::Assign(), SwNodeIndex::Assign(), o3tl::sorted_vector< Value, Compare, Find, class >::begin(), SwRect::Bottom(), SwTableBox::ClaimFrameFormat(), o3tl::sorted_vector< Value, Compare, Find, class >::clear(), COLFUZZY, DEFAULT, SwNodes::Delete(), IDocumentUndoRedo::DoesUndo(), IDocumentUndoRedo::DoUndo(), o3tl::sorted_vector< Value, Compare, Find, class >::empty(), o3tl::sorted_vector< Value, Compare, Find, class >::erase(), SwLayoutFrame::FirstCell(), SwFormat::GetAttrSet(), SwFormat::GetBox(), SwTableLine::GetBoxPos(), SwPaM::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwFormat::GetDoc(), SwNode::GetDoc(), SwTabFrame::GetFirstNonHeadlineRow(), SwLayoutFrame::GetFormat(), SwFrameAreaDefinition::getFrameArea(), SwTableBox::GetFrameFormat(), SwFormat::GetFrameSize(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetIDocumentUndoRedo(), SfxItemSet::GetItemState(), SwContentNode::getLayoutFrame(), SwFrame::GetNext(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwTableBox::GetSttIdx(), SwTableLine::GetTabBoxes(), SwTabFrame::GetTable(), SwTable::GetTabSortBoxes(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTableBox::GetUpper(), SwFrame::GetUpper(), SvxSizeItem::GetWidth(), i, o3tl::sorted_vector< Value, Compare, Find, class >::insert(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), IsEmptyBox(), SwFlowFrame::IsFollow(), SwRect::IsOver(), SwFrame::IsRowFrame(), lcl_FindNextCellFrame(), lcl_InsTableBox(), SwRect::Left(), SwContentNode::Len(), SwLayoutFrame::Lower(), MakeSelUnions(), SwUndoTableMerge::MoveBoxContent(), IDocumentContentOperations::MoveNodeRange(), n, SwPosition::nContent, SwPosition::nNode, Point, RES_BOX(), SwRect::Right(), sal_False, sal_True, SwUndoTableMerge::SaveCollection(), SwFormat::SetFormatAttr(), SvxBoxItem::SetLine(), o3tl::sorted_vector< Value, Compare, Find, class >::size(), SwRect::Top(), Variable, SwRect::Width(), and Y.
Referenced by SwTable::PrepareMerge().
SW_DLLPUBLIC void GetTableSel | ( | const SwCursorShell & | rShell, |
SwSelBoxes & | rBoxes, | ||
const SwTableSearchType | = SwTableSearchType::NONE |
||
) |
Definition at line 149 of file tblsel.cxx.
References SwCursorShell::GetCursor(), SwCursorShell::getShellCursor(), GetTableSel(), and SwCursorShell::IsTableMode().
Referenced by CheckMergeSel(), SwFEShell::Copy(), SwEditShell::CopySelToDoc(), SwFEShell::DeleteCol(), SwDoc::DeleteCol(), SwFEShell::DeleteRow(), SwDoc::DeleteRow(), SwTableShell::Execute(), SwTableFormula::GetBoxes(), SwTableShell::GetState(), GetTableSel(), SwDoc::GetTabRows(), SwFEShell::InsertCol(), SwDoc::InsertCol(), SwFEShell::InsertRow(), SwDoc::InsertRow(), lcl_GetSelTable(), SwFEShell::NewFlyFrame(), SwFEShell::Paste(), SwCursorShell::SelTableRowOrCol(), SwFEShell::Sort(), SwFEShell::SplitTab(), and SwWriter::Write().
void GetTableSel | ( | const SwCursor & | rCursor, |
SwSelBoxes & | rBoxes, | ||
const SwTableSearchType | = SwTableSearchType::NONE |
||
) |
Definition at line 159 of file tblsel.cxx.
References Col, SwTable::CreateSelection(), SwNode::FindTableNode(), SwNode::GetContentNode(), SwPaM::GetContentNode(), IDocumentLayoutAccess::GetCurrentLayout(), SwNode::GetDoc(), SwTableBox::GetFrameFormat(), SwDoc::getIDocumentLayoutAccess(), SwContentNode::getLayoutFrame(), SwShellCursor::GetMkPos(), SwPaM::GetNode(), SwTableLines::GetPos(), SwFormat::GetProtect(), SwShellCursor::GetPtPos(), SwTableLine::GetTabBoxes(), SwTableNode::GetTable(), SwTable::GetTableBox(), GetTableSel(), SwTable::GetTabLines(), SwTableBox::GetUpper(), o3tl::sorted_vector< Value, Compare, Find, class >::insert(), SvxProtectItem::IsContentProtected(), SwTable::IsNewModel(), SwTable::IsTableComplex(), n, Point, Protect, Row, SwTable::SEARCH_COL, SwTable::SEARCH_NONE, SwTable::SEARCH_ROW, SwNode::StartOfSectionIndex(), and USHRT_MAX.
void GetTableSel | ( | const SwLayoutFrame * | pStart, |
const SwLayoutFrame * | pEnd, | ||
SwSelBoxes & | rBoxes, | ||
SwCellFrames * | pCells, | ||
const SwTableSearchType | = SwTableSearchType::NONE |
||
) |
Definition at line 247 of file tblsel.cxx.
References SwRect::BottomLeft(), SwRect::BottomRight(), SwFrame::Calc(), o3tl::sorted_vector< Value, Compare, Find, class >::clear(), SwFrame::FindTabFrame(), SwLayoutFrame::FirstCell(), SwRootFrame::GetCurrShell(), SwTabFrame::GetFirstNonHeadlineRow(), SwTabFrame::GetFollow(), SwFrameAreaDefinition::getFrameArea(), SwTableBox::GetFrameFormat(), SwFrame::GetNext(), SwViewShell::GetOut(), SwFormat::GetProtect(), SwFrame::getRootFrame(), SwSelUnion::GetTable(), SwTabFrame::GetTable(), SwSelUnion::GetUnion(), SwDeletionChecker::HasBeenDeleted(), i, o3tl::sorted_vector< Value, Compare, Find, class >::insert(), SwFrame::InvalidatePos(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), SvxProtectItem::IsContentProtected(), SwFlowFrame::IsFollow(), SwFrameAreaDefinition::isFrameAreaDefinitionValid(), IsFrameInTableSel(), SwRect::IsOver(), SwFrame::IsRowFrame(), lcl_FindNextCellFrame(), LONG_MAX, SwLayoutFrame::Lower(), MakeSelUnions(), Point, Protect, SwFrame::SetCompletePaint(), SwTabFrame::SetONECalcLowers(), SwRect::TopLeft(), and SwRect::TopRight().
void GetTableSelCrs | ( | const SwCursorShell & | rShell, |
SwSelBoxes & | rBoxes | ||
) |
Definition at line 124 of file tblsel.cxx.
References o3tl::sorted_vector< Value, Compare, Find, class >::clear(), SwTableCursor::GetSelectedBoxes(), SwCursorShell::GetTableCursor(), o3tl::sorted_vector< Value, Compare, Find, class >::insert(), and SwCursorShell::IsTableMode().
Referenced by SwFEShell::CanUnProtectCells(), SwFEShell::DeleteTableSel(), SwFEShell::GetTableAutoFormat(), SwEditShell::GetTableBoxFormulaAttrs(), SwFEShell::HasWholeTabSelection(), SwFEShell::IsAdjustCellWidthAllowed(), lcl_GetBoxSel(), SwEditShell::SetTableBoxFormulaAttrs(), SwFEShell::UnProtectCells(), and SwFEShell::UpdateTableStyleFormatting().
void GetTableSelCrs | ( | const SwTableCursor & | rTableCursor, |
SwSelBoxes & | rBoxes | ||
) |
Definition at line 133 of file tblsel.cxx.
References o3tl::sorted_vector< Value, Compare, Find, class >::clear(), IDocumentLayoutAccess::GetCurrentLayout(), SwPaM::GetDoc(), SwDoc::getIDocumentLayoutAccess(), SwTableCursor::GetSelectedBoxes(), SwTableCursor::GetSelectedBoxesCount(), o3tl::sorted_vector< Value, Compare, Find, class >::insert(), SwTableCursor::IsChgd(), and SwRootFrame::MakeTableCursors().
bool HasProtectedCells | ( | const SwSelBoxes & | rBoxes | ) |
Definition at line 856 of file tblsel.cxx.
References n, and o3tl::sorted_vector< Value, Compare, Find, class >::size().
Referenced by SwFEShell::CanUnProtectCells(), SwDoc::DeleteCol(), SwDoc::DeleteRow(), SwDoc::DeleteRowCol(), and SwTableShell::GetState().
bool IsEmptyBox | ( | const SwTableBox & | rBox, |
SwPaM & | rPam | ||
) |
Definition at line 893 of file tblsel.cxx.
References SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), fnMoveBackward, fnMoveForward, SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwPaM::GetDoc(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), SwPaM::GetMark(), SwPaM::GetPoint(), SwDoc::GetSpzFrameFormats(), SwTableBox::GetSttNd(), GoInContent(), SwPaM::Move(), SwPosition::nNode, and SwPaM::SetMark().
Referenced by GetMergeSel(), and SwTable::PrepareMerge().
Definition at line 670 of file tblsel.cxx.
References SwRect::Bottom(), SwFrame::FindTabFrame(), SwFrameAreaDefinition::getFrameArea(), SwFrame::IsCellFrame(), SwFrame::IsVertical(), SwRect::Left(), SwRect::Right(), and SwRect::Top().
Referenced by CheckSplitCells(), GetAutoSumSel(), GetTableSel(), lcl_CalcColValues(), MakeSelUnions(), and SwRootFrame::MakeTableCursors().
void MakeSelUnions | ( | SwSelUnions & | , |
const SwLayoutFrame * | pStart, | ||
const SwLayoutFrame * | pEnd, | ||
const SwTableSearchType | = SwTableSearchType::NONE |
||
) |
Definition at line 1771 of file tblsel.cxx.
References Col, SwTabFrame::FindLastContentOrTable(), SwFrame::FindTabFrame(), SwLayoutFrame::FirstCell(), SwRectFnSet::GetBottom(), SwTabFrame::GetFirstNonHeadlineRow(), SwTabFrame::GetFollow(), SwLayoutFrame::GetFormat(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), SwFormat::GetFrameSize(), SwRectFnSet::GetLeft(), SwFrame::GetNext(), SwFrame::GetPrevLayoutLeaf(), SwRectFnSet::GetPrtLeft(), SwRectFnSet::GetTop(), SwFrame::GetUpper(), SvxSizeItem::GetWidth(), SwRectFnSet::GetWidth(), SwFlowFrame::IsAnFollow(), SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), SwFlowFrame::IsFollow(), IsFrameInTableSel(), SwFrame::IsInFollowFlowRow(), SwRect::IsOver(), SwFrame::IsRowFrame(), SwRectFnSet::IsVert(), SwRect::Justify(), lcl_CalcWish(), lcl_FindCellFrame(), lcl_FindNextCellFrame(), lcl_FindStartEndCol(), lcl_FindStartEndRow(), Lower, SwLayoutFrame::Lower(), NoUnionCorrect, Point, Protect, Row, SwRect::Union(), and SwRect::Width().
Referenced by CheckSplitCells(), ChkChartSel(), GetAutoSumSel(), GetMergeSel(), SwDoc::GetTabBorders(), GetTableSel(), lcl_CalcColValues(), SwRootFrame::MakeTableCursors(), SwDoc::SetTabBorders(), and SwDoc::SetTabLineStyle().