LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SwTable Class Reference

SwTable is one table in the document model, containing rows (which contain cells). More...

#include <swtable.hxx>

Inheritance diagram for SwTable:
Collaboration diagram for SwTable:

Public Types

enum  SearchType {

Public Member Functions

 SwTable ()
virtual ~SwTable () override
 SwTable (const SwTable &rTable)
SwHTMLTableLayoutGetHTMLTableLayout ()
const SwHTMLTableLayoutGetHTMLTableLayout () const
void SetHTMLTableLayout (std::shared_ptr< SwHTMLTableLayout > const &r)
sal_uInt16 IncGrfsThatResize ()
sal_uInt16 DecGrfsThatResize ()
void LockModify ()
void UnlockModify ()
void SetTableModel (bool bNew)
bool IsNewModel () const
const OUString & GetTableStyleName () const
 Return the table style name of this table. More...
void SetTableStyleName (const OUString &rName)
 Set the new table style name for this table. More...
sal_uInt16 GetRowsToRepeat () const
void SetRowsToRepeat (sal_uInt16 nNumOfRows)
bool IsHeadline (const SwTableLine &rLine) const
SwTableLinesGetTabLines ()
const SwTableLinesGetTabLines () const
SwTableFormatGetFrameFormat ()
SwTableFormatGetFrameFormat () const
void GetTabCols (SwTabCols &rToFill, const SwTableBox *pStart, bool bHidden=false, bool bCurRowOnly=false) const
void SetTabCols (const SwTabCols &rNew, const SwTabCols &rOld, const SwTableBox *pStart, bool bCurRowOnly)
void CreateSelection (const SwPaM &rPam, SwSelBoxes &rBoxes, const SearchType eSearchType, bool bProtect) const
 void SwTable::CreateSelection(..) fills the selection structure with table cells for a given SwPaM, ie. More...
void CreateSelection (const SwNode *pStart, const SwNode *pEnd, SwSelBoxes &rBoxes, const SearchType eSearchType, bool bProtect) const
 void SwTable::CreateSelection(..) fills the selection structure with table cells for given start and end nodes inside a table More...
void ExpandSelection (SwSelBoxes &rBoxes) const
 SwTable::ExpandSelection(..) adds all boxes to the box selections which are overlapped by it. More...
std::unique_ptr< SwSaveRowSpanCleanUpTopRowSpan (sal_uInt16 nSplitLine)
void RestoreRowSpan (const SwSaveRowSpan &)
void CleanUpBottomRowSpan (sal_uInt16 nDelLines)
bool Merge (SwDoc *pDoc, const SwSelBoxes &rBoxes, const SwSelBoxes &rMerged, SwTableBox *pMergeBox, SwUndoTableMerge *pUndo)
bool SplitRow (SwDoc &rDoc, const SwSelBoxes &rBoxes, sal_uInt16 nCnt, bool bSameHeight)
bool PrepareMerge (const SwPaM &rPam, SwSelBoxes &rBoxes, SwSelBoxes &rMerged, SwTableBox **ppMergeBox, SwUndoTableMerge *pUndo)
 SwTable::PrepareMerge(..) some preparation for the coming Merge(..) More...
void ExpandColumnSelection (SwSelBoxes &rBoxes, tools::Long &rMin, tools::Long &rMax) const
 void SwTable::ExpandColumnSelection(..) adds cell to the give selection to assure that at least one cell of every row is part of the selection. More...
void PrepareDeleteCol (tools::Long nMin, tools::Long nMax)
 SwTable::PrepareDeleteCol(..) adjusts the widths of the neighbour cells of a cell selection for an upcoming (column) deletion. More...
bool InsertCol (SwDoc &, const SwSelBoxes &rBoxes, sal_uInt16 nCnt, bool bBehind)
bool InsertRow (SwDoc *, const SwSelBoxes &rBoxes, sal_uInt16 nCnt, bool bBehind)
 SwTable::InsertRow(..) inserts one or more rows before or behind the selected boxes. More...
void PrepareDelBoxes (const SwSelBoxes &rBoxes)
 SwTable::PrepareDelBoxes(..) adjusts the row span attributes for an upcoming deletion of table cells and invalidates the layout of these cells. More...
bool DeleteSel (SwDoc *, const SwSelBoxes &rBoxes, const SwSelBoxes *pMerged, SwUndo *pUndo, const bool bDelMakeFrames, const bool bCorrBorder)
bool SplitCol (SwDoc &rDoc, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
void FindSuperfluousRows (SwSelBoxes &rBoxes)
void CheckRowSpan (SwTableLine *&rpLine, bool bUp) const
 SwTable::CheckRowSpan(..) looks for the next line without an overlapping to the previous line. More...
SwTableSortBoxesGetTabSortBoxes ()
const SwTableSortBoxesGetTabSortBoxes () const
const SwTableBoxGetTableBox (const OUString &rName, const bool bPerformValidCheck=false) const
bool MakeCopy (SwDoc &, const SwPosition &, const SwSelBoxes &, bool bCpyName=false, const OUString &rStyleName="") const
bool InsTable (const SwTable &rCpyTable, const SwNodeIndex &, SwUndoTableCpyTable *pUndo)
 Copy Table into this Box. More...
bool InsTable (const SwTable &rCpyTable, const SwSelBoxes &, SwUndoTableCpyTable *pUndo)
bool InsNewTable (const SwTable &rCpyTable, const SwSelBoxes &, SwUndoTableCpyTable *pUndo)
void CopyHeadlineIntoTable (SwTableNode &rTableNd)
SwTableBoxGetTableBox (SwNodeOffset nSttIdx)
const SwTableBoxGetTableBox (SwNodeOffset nSttIdx) const
bool IsTableComplex () const
bool IsTableComplexForChart (const OUString &rSel) const
virtual bool GetInfo (SfxPoolItem &) const override
void GCLines ()
SwTableNodeGetTableNode () const
void SetTableNode (SwTableNode *pNode)
void SetRefObject (SwServerObject *)
const SwServerObjectGetObject () const
SwServerObjectGetObject ()
void UpdateCharts () const
TableChgMode GetTableChgMode () const
void SetTableChgMode (TableChgMode eMode)
bool SetColWidth (SwTableBox &rCurrentBox, TableChgWidthHeightType eType, SwTwips nAbsDiff, SwTwips nRelDiff, std::unique_ptr< SwUndo > *ppUndo)
bool SetRowHeight (SwTableBox &rCurrentBox, TableChgWidthHeightType eType, SwTwips nAbsDiff, SwTwips nRelDiff, std::unique_ptr< SwUndo > *ppUndo)
void RegisterToFormat (SwFormat &rFormat)
void CheckConsistency () const
bool HasLayout () const
bool CanConvertSubtables () const
void ConvertSubtables ()
bool IsDeleted () const
bool HasDeletedRow () const
- Public Member Functions inherited from SwClient
 SwClient ()
 SwClient (SwClient &&) noexcept
virtual ~SwClient () override
std::optional< sw::ModifyChangedHintCheckRegistration (const SfxPoolItem *pOldValue)
void CheckRegistrationFormat (SwFormat &rOld)
const SwModifyGetRegisteredIn () const
SwModifyGetRegisteredIn ()
void EndListeningAll ()
void StartListeningToSameModifyAs (const SwClient &)
- Public Member Functions inherited from sw::WriterListener
bool IsLast () const
virtual const SwCellFrameDynCastCellFrame () const
virtual const SwTabFrameDynCastTabFrame () const
virtual const SwRowFrameDynCastRowFrame () const

Static Public Member Functions

static sal_uInt16 GetBoxNum (OUString &rStr, bool bFirst=false, const bool bPerformValidCheck=false)
static SwSelBoxesSelLineFromBox (const SwTableBox *pBox, SwSelBoxes &rBoxes, bool bToTop=true)
static SwTableFindTable (SwFrameFormat const *const pFormat)

Protected Member Functions

virtual void SwClientNotify (const SwModify &, const SfxHint &) override
- Protected Member Functions inherited from SwClient
 SwClient (SwModify *pToRegisterIn)
SwModifyGetRegisteredInNonConst () const
- Protected Member Functions inherited from sw::WriterListener
 WriterListener ()
virtual ~WriterListener () COVERITY_NOEXCEPT_FALSE

Protected Attributes

SwTableLines m_aLines
SwTableSortBoxes m_TabSortContentBoxes
tools::SvRef< SwServerObjectm_xRefObj
std::shared_ptr< SwHTMLTableLayoutm_xHTMLLayout
TableChgMode m_eTableChgMode
sal_uInt16 m_nGraphicsThatResize
sal_uInt16 m_nRowsToRepeat
OUString maTableStyleName
 Name of the table style to be applied on this table. More...
bool m_bModifyLocked:1
bool m_bNewModel:1

Private Member Functions

SwTableoperator= (const SwTable &)=delete
bool OldMerge (SwDoc *, const SwSelBoxes &, SwTableBox *, SwUndoTableMerge *)
bool OldSplitRow (SwDoc &, const SwSelBoxes &, sal_uInt16, bool)
bool NewMerge (SwDoc *, const SwSelBoxes &, const SwSelBoxes &rMerged, SwUndoTableMerge *)
 NewMerge(..) removes the superfluous cells after cell merge. More...
bool NewSplitRow (SwDoc &, const SwSelBoxes &, sal_uInt16, bool)
 SwTable::NewSplitRow(..) splits all selected boxes horizontally. More...
std::unique_ptr< SwBoxSelectionCollectBoxSelection (const SwPaM &rPam) const
 CollectBoxSelection(..) create a rectangulare selection based on the given SwPaM and prepares the selected cells for merging. More...
void InsertSpannedRow (SwDoc &rDoc, sal_uInt16 nIdx, sal_uInt16 nCnt)
 SwTable::InsertSpannedRow(..) inserts "superfluous" rows, i.e. More...
bool InsertRow_ (SwDoc *, const SwSelBoxes &, sal_uInt16 nCnt, bool bBehind)
bool NewInsertCol (SwDoc &, const SwSelBoxes &rBoxes, sal_uInt16 nCnt, bool)
 SwTable::NewInsertCol(..) insert new column(s) into a table. More...
void FindSuperfluousRows_ (SwSelBoxes &rBoxes, SwTableLine *, SwTableLine *)
 SwTable::FindSuperfluousRows_(..) is looking for superfluous rows, i.e. More...
void AdjustWidths (const tools::Long nOld, const tools::Long nNew)
void NewSetTabCols (Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld, const SwTableBox *pStart, bool bCurRowOnly)
void ConvertSubtableBox (sal_uInt16 const nRow, sal_uInt16 const nBox)
 This is kind of similar to InsertSpannedRow()/InsertRow() but that one would recursively copy subtables, which would kind of defeat the purpose; this function directly moves the subtable rows's cells into the newly created rows. More...

Detailed Description

SwTable is one table in the document model, containing rows (which contain cells).

Definition at line 112 of file swtable.hxx.

Member Enumeration Documentation


Definition at line 144 of file swtable.hxx.

Constructor & Destructor Documentation

SwTable::SwTable ( )

Definition at line 188 of file swtable.cxx.

References false, GetTableChgDefaultMode(), and m_eTableChgMode.

Referenced by SwDDETable::NoDDETable().

SwTable::~SwTable ( )
SwTable::SwTable ( const SwTable rTable)

Definition at line 200 of file swtable.cxx.

References false.

Member Function Documentation

void SwTable::AdjustWidths ( const tools::Long  nOld,
const tools::Long  nNew 

Definition at line 360 of file swtable.cxx.

References lcl_ModifyLines(), m_aLines, and size.

Referenced by NewInsertCol(), and SwClientNotify().

bool SwTable::CanConvertSubtables ( ) const
void SwTable::CheckConsistency ( ) const
void SwTable::CheckRowSpan ( SwTableLine *&  rpLine,
bool  bUp 
) const

SwTable::CheckRowSpan(..) looks for the next line without an overlapping to the previous line.

Definition at line 1934 of file swnewtable.cxx.

References SwTableLines::GetPos(), SwTableBox::getRowSpan(), SwTableLine::GetTabBoxes(), GetTabLines(), IsNewModel(), size, and SwTableLines::size().

Referenced by FndBox_::DelFrames().

void SwTable::CleanUpBottomRowSpan ( sal_uInt16  nDelLines)
std::unique_ptr< SwSaveRowSpan > SwTable::CleanUpTopRowSpan ( sal_uInt16  nSplitLine)

Definition at line 2076 of file swnewtable.cxx.

References GetTabLines(), and IsNewModel().

Referenced by SwDoc::SplitTable().

std::unique_ptr< SwBoxSelection > SwTable::CollectBoxSelection ( const SwPaM rPam) const
void SwTable::ConvertSubtableBox ( sal_uInt16 const  nRow,
sal_uInt16 const  nBox 

This is kind of similar to InsertSpannedRow()/InsertRow() but that one would recursively copy subtables, which would kind of defeat the purpose; this function directly moves the subtable rows's cells into the newly created rows.

For the non-subtable boxes, covered-cells are created.

Outer row heights are adjusted to match the inner row heights, and the last row's height is tweaked to ensure the sum of the heights is at least the original outer row's minimal height.

Inner row backgrounds are copied to its cells, if they lack a background.

This currently can't handle more than 1 subtable in a row; the inner rows of all subtables would need to be sorted by their height to create the correct outer row structure, which is tricky and probably requires a layout for the typical variable-height case.

Definition at line 2128 of file swnewtable.cxx.

References begin, SwNodes::Delete(), DeleteBox_(), SwDoc::GetDfltTextFormatColl(), GetFrameFormat(), SwTableLine::GetFrameFormat(), SwFormat::GetFrameSize(), SvxSizeItem::GetHeight(), SwDoc::getIDocumentContentOperations(), SwDoc::GetNodes(), SwTableLine::GetTabBoxes(), GetTableNode(), GetTabLines(), i, SwTableLines::insert(), InsTableBox(), lcl_ChangeRowSpan(), SwNodes::MakeTextNode(), Minimum, IDocumentContentOperations::MoveNodeRange(), SwNodes::MoveNodes(), NO_DELFRMS, REDLINES, RES_BACKGROUND(), RES_FRM_SIZE(), SwFormat::SetFormatAttr(), SvxSizeItem::SetHeight(), size, Variable, and void().

Referenced by ConvertSubtables().

void SwTable::ConvertSubtables ( )
void SwTable::CopyHeadlineIntoTable ( SwTableNode rTableNd)
void SwTable::CreateSelection ( const SwPaM rPam,
SwSelBoxes rBoxes,
const SearchType  eSearch,
bool  bChkProtected 
) const

void SwTable::CreateSelection(..) fills the selection structure with table cells for a given SwPaM, ie.

start and end position inside a table

Definition at line 1672 of file swnewtable.cxx.

References SwTableLines::empty(), SwNode::FindTableBoxStartNode(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPaM::GetPoint(), m_aLines, m_bNewModel, and SwPosition::nNode.

Referenced by GetTableSel(), SwTableCursor::NewTableSelection(), and SwCursorShell::SelTableRowOrCol().

void SwTable::CreateSelection ( const SwNode pStart,
const SwNode pEnd,
SwSelBoxes rBoxes,
const SearchType  eSearchType,
bool  bProtect 
) const
sal_uInt16 SwTable::DecGrfsThatResize ( )

Definition at line 182 of file swtable.hxx.

Referenced by SetGrfFlySize().

bool SwTable::DeleteSel ( SwDoc pDoc,
const SwSelBoxes rBoxes,
const SwSelBoxes pMerged,
SwUndo pUndo,
const bool  bDelMakeFrames,
const bool  bCorrBorder 
void SwTable::ExpandColumnSelection ( SwSelBoxes rBoxes,
tools::Long rMin,
tools::Long rMax 
) const
void SwTable::ExpandSelection ( SwSelBoxes rBoxes) const

SwTable::ExpandSelection(..) adds all boxes to the box selections which are overlapped by it.

Definition at line 1915 of file swnewtable.cxx.

References SwTableBox::FindStartOfRowSpan(), SwTableBox::getRowSpan(), i, lcl_getAllMergedBoxes(), and o3tl::sorted_vector< Value, Compare, Find, class >::size().

void SwTable::FindSuperfluousRows ( SwSelBoxes rBoxes)

Definition at line 258 of file swtable.hxx.

Referenced by SwDoc::DeleteRowCol().

void SwTable::FindSuperfluousRows_ ( SwSelBoxes rBoxes,
SwTableLine pFirstLn,
SwTableLine pLastLn 
SwTable * SwTable::FindTable ( SwFrameFormat const *const  pFormat)

Definition at line 2106 of file swtable.cxx.

References SwIterator< TElementType, TSource, eMode >::First().

Referenced by MSWordExportBase::AddLinkTarget(), SwXTextTable::autoFormat(), SwDoc::ChgTableStyle(), SwChartDataProvider::convertRangeToXML(), SwXText::convertToTable(), SwXTextTable::createCursorByCellName(), SwXCell::CreateXCell(), SwChartDataSequence::DeleteBox(), SwDoc::DelTableStyle(), SwXTextTable::dispose(), SwChartDataSequence::dispose(), SwDoc::DoUpdateAllCharts(), SwXMLTextParagraphExport::exportTable(), SwChartDataSequence::ExtendTo(), SwContentType::FillMemberList(), SwChartDataSequence::FillRangeDesc(), SwTableFormula::FindTable(), SwChartDataSequence::generateLabel(), SwXTableRows::getByIndex(), SwXTextTable::getCellByName(), SwXTextTable::getCellNames(), SwXTextTable::getCellRangeByName(), SwXTextTable::getCellRangeByPosition(), SwXCellRange::getCellRangeByPosition(), GetCellRangeName(), SwChartDataSequence::GetCells(), SwXTextTable::Impl::GetColumnCount(), SwXTableRows::getCount(), SwXTableColumns::getCount(), GetFormatAndCreateCursorFromRangeRep(), SwXCell::getFormula(), SwXCell::getPropertyValue(), SwXTextTableRow::getPropertyValue(), SwXTextTable::getPropertyValue(), SwXTextTableCursor::getRangeName(), SwXTextTable::Impl::GetRowCount(), SwUnoCursorHelper::GetSelectableFromAny(), SwVbaTableHelper::GetSwTable(), GetTableByName(), SwXTextRange::getText(), SwCursor::GotoTable(), SwDoc::HasTableAnyProtection(), SwChartDataProvider::Impl_createDataSource(), SwXTableRows::insertByIndex(), SwXTableColumns::insertByIndex(), SwXText::insertTextContentAfter(), SwXText::insertTextContentBefore(), SwXTextTableStyle::isInUse(), SwDoc::IsUsed(), SwXCell::IsValid(), lcl_CreateXCell(), lcl_GetSpecialProperty(), lcl_SetSpecialProperty(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwXText::removeTextContentAfter(), SwXText::removeTextContentBefore(), SwXCell::setFormula(), SwXTextTable::setName(), SwXTextTableRow::setPropertyValue(), SwXTextTable::setPropertyValue(), SwDoc::SetTableName(), SwXTextTable::sort(), sw_setValue(), SwChartDataSequence::SwChartDataSequence(), SwXTextRange::SwXTextRange(), SwDoc::UnProtectCells(), SwDoc::UnProtectTables(), SwDoc::UpdateCharts(), and SwTOXBaseSection::UpdateTable().

void SwTable::GCLines ( )

Definition at line 452 of file gctable.cxx.

References GetTabLines(), lcl_MergeGCLine(), n, and SwTableLines::size().

Referenced by ConvertSubtables(), InsertCnt_(), and MakeCopy().

sal_uInt16 SwTable::GetBoxNum ( OUString &  rStr,
bool  bFirst = false,
const bool  bPerformValidCheck = false 

Definition at line 1285 of file swtable.cxx.

References lcl_IsValidRowName(), nPos, SAL_MAX_UINT16, and o3tl::toInt32().

Referenced by GetTableBox(), lcl_BoxNmToRel(), and lcl_RelToBox().

SwTableFormat* SwTable::GetFrameFormat ( )

Definition at line 204 of file swtable.hxx.

References SwClient::GetRegisteredIn().

Referenced by SwDoc::AdjustCellWidth(), WW8TabDesc::AdjustNewBand(), SwDoc::AppendDoc(), FndBox_::AreLinesToRestore(), SwXTextTable::attach(), CalculateFlySize(), CanConvertSubtables(), SwDDETable::ChangeContent(), checkAndWriteFloatingTables(), CheckConsistency(), CheckTable(), ConvertSubtableBox(), ConvertSubtables(), SwXText::convertToTable(), CopyHeadlineIntoTable(), SwEditShell::CopySelToDoc(), sw::DocumentChartDataProviderManager::CreateChartInternalDataProviders(), SaveTable::CreateNew(), sw::CreateParentXText(), WW8TabDesc::CreateSwTable(), sw::util::InsertedTablesManager::DelAndMakeTableFrames(), SwChartDataProvider::DeleteBox(), DeleteBox_(), sw::DocumentContentOperationsManager::DelFullPara(), SwChartDataProvider::DisposeAllDataSequences(), SwStartNode::dumpAsXml(), RtfExport::ExportDocument_Impl(), SwXMLExport::ExportTable(), SwXMLExport::ExportTableAutoStyles(), SwViewShell::FillPrtDoc(), SwHTMLTableLayout::GetBrowseWidthByTable(), SwUnoCursorHelper::getCursorPropertyValue(), ww8::WW8TableNodeInfoInner::getGridColsOfRow(), GetInfo(), SwXRedline::getPropertyValue(), SwXTextTableCursor::getPropertyValue(), GetTabCols(), GetTableBox(), SwXMLTableInfo_Impl::GetTableFormat(), SwEditShell::GetTableFormat(), AttributeOutputBase::GetTablePageSize(), SwTOXTable::GetText_Impl(), GiveNodePageDesc(), HasDeletedRow(), HasLayout(), sw::util::HasPageBreak(), SwRootFrame::Init(), DocxAttributeOutput::InitTableHelper(), RtfAttributeOutput::InitTableHelper(), SwUndoTableCpyTable::InsertRow(), InsNewTable(), InsTable(), SwAccessibleMap::InvalidateShapeInParaSelection(), SwChartDataProvider::InvalidateTable(), IsDeleted(), lcl_ChgTableSize(), lcl_CpyBox(), lcl_InsertLabel(), MakeCopy(), FndBox_::MakeFrames(), SwHTMLWriter::MakeHeader(), FndBox_::MakeNewFrames(), SwXMLTableContext::MakeTable(), HTMLTable::MakeTable(), SwNodes::MergeTable(), UnfloatTableButton::MouseButtonDown(), SwNodes::MoveNodes(), SwWW8ImplReader::MoveOutsideFly(), SwHTMLParser::MovePageDescAttrs(), MSWordSections::MSWordSections(), NewInsertCol(), SwDDETable::NoDDETable(), SwHTMLWriter::OutCSS1_FrameFormatBackground(), OutHTML_SwTableNode(), MSWordExportBase::OutputTextNode(), PrepareDeleteCol(), PrepareMerge(), SwUndoInsTable::RedoImpl(), SwUndoDelete::RedoImpl(), SwUndoTextToTable::RedoImpl(), SwUndoInsertLabel::RedoImpl(), SaveTable::RestoreAttr(), SwTableAutoFormat::RestoreTableProperties(), SaveTable::SaveTable(), SwTableFormula::ScanString(), RtfAttributeOutput::SectionBreaks(), DocxAttributeOutput::SectionBreaks(), SwXTextTable::setName(), SwXTextTableCursor::setPropertyValue(), SwDoc::SetRowsToRepeat(), WW8TabDesc::SetSizePosition(), SetTabCols(), SwDoc::SetTabCols(), SwTableCellInfo::Impl::setTable(), SwTableFormula::SplitMergeBoxNm_(), sw::DocumentContentOperationsManager::SplitNode(), SwNodes::SplitTable(), SwDoc::SplitTable(), SwTableAutoFormat::StoreTableProperties(), SwNode2LayImpl::SwNode2LayImpl(), SwUndoMergeTable::SwUndoMergeTable(), SwUndoTableToText::SwUndoTableToText(), WW8AttributeOutput::TableBackgrounds(), RtfAttributeOutput::TableBackgrounds(), DocxAttributeOutput::TableBackgrounds(), WW8AttributeOutput::TableBidi(), RtfAttributeOutput::TableBidi(), DocxAttributeOutput::TableBidi(), WW8AttributeOutput::TableDefinition(), RtfAttributeOutput::TableDefinition(), DocxAttributeOutput::TableDefinition(), WW8AttributeOutput::TableOrientation(), RtfAttributeOutput::TableOrientation(), WW8AttributeOutput::TableSpacing(), SwUndoSplitNode::UndoImpl(), SwUndoInsertLabel::UndoImpl(), SwUndoCpyTable::UndoImpl(), SwUndoMergeTable::UndoImpl(), UpdateCharts(), SwDoc::UpdateCharts_(), SwDDETable::~SwDDETable(), ~SwTable(), and SwTableNode::~SwTableNode().

SwTableFormat* SwTable::GetFrameFormat ( ) const

Definition at line 205 of file swtable.hxx.

References SwClient::GetRegisteredIn().

SwHTMLTableLayout* SwTable::GetHTMLTableLayout ( )
const SwHTMLTableLayout* SwTable::GetHTMLTableLayout ( ) const

Definition at line 178 of file swtable.hxx.

bool SwTable::GetInfo ( SfxPoolItem rInfo) const
const SwServerObject* SwTable::GetObject ( ) const

Definition at line 327 of file swtable.hxx.

References tools::SvRef< T >::get().

SwServerObject* SwTable::GetObject ( )

Definition at line 328 of file swtable.hxx.

References tools::SvRef< T >::get().

sal_uInt16 SwTable::GetRowsToRepeat ( ) const
void SwTable::GetTabCols ( SwTabCols rToFill,
const SwTableBox pStart,
bool  bHidden = false,
bool  bCurRowOnly = false 
) const
const SwTableBox * SwTable::GetTableBox ( const OUString &  rName,
const bool  bPerformValidCheck = false 
) const

Definition at line 1345 of file swtable.cxx.

References SwTableLines::empty(), SwTableLines::front(), GetBoxNum(), SwTableBox::GetSttNd(), SwTableLine::GetTabBoxes(), GetTabLines(), SwTableBox::GetTabLines(), and SwTableLines::size().

Referenced by SwTableFormula::BoxNmsToPtr(), SwTableFormula::BoxNmsToRelNm(), SwCursorShell::CheckTableBoxContent(), SwXTextTable::createCursorByCellName(), SwChartDataSequence::DeleteBox(), SwChartDataSequence::ExtendTo(), SwXTextTable::getCellByName(), SwXCellRange::getCellRangeByPosition(), GetCellRangeName(), SwCursorShell::GetContentAtPos(), SwUndoFormatAttr::GetFormat(), GetFormatAndCreateCursorFromRangeRep(), SwXTextTableCursor::getRangeName(), SwVbaTableHelper::getTabColIndex(), SwNode::GetTableBox(), GetTableSel(), SwVbaTableHelper::getTabRowIndex(), SwCursorShell::GoNextCell(), SwCursor::GotoTableBox(), SwTableFormula::HasValidBoxes_(), SwDoc::InsCopyOfTable(), SwXTableRows::insertByIndex(), SwXTableColumns::insertByIndex(), InsTable(), SwCursor::IsInProtectTable(), IsTableComplexForChart(), lcl_CreateXCell(), lcl_RelToBox(), SwUnoTableCursor::MakeBoxSels(), SwHTMLWriter::OutCSS1_FrameFormatBackground(), OutHTML_SwTextNode(), SwFEShell::Paste(), SwUndoSort::RedoImpl(), SwUndoTableNdsChg::RedoImpl(), SwUndoTableNumFormat::RedoImpl(), SwUndoTableCpyTable::RedoImpl(), SwTableFormula::RelBoxNmsToPtr(), SwTableFormula::RelNmsToBoxNms(), SwXTableRows::removeByIndex(), SwXTableColumns::removeByIndex(), SwCursorShell::SaveTableBoxContent(), SwHistorySetFormat::SetInDoc(), SwTableFormula::SplitMergeBoxNm_(), SwNodes::SplitTable(), SwDoc::SplitTable(), SwUndoSort::UndoImpl(), SwUndoTextToTable::UndoImpl(), SwUndoTableNumFormat::UndoImpl(), SwUndoTableCpyTable::UndoImpl(), and SwUndoSplitTable::UndoImpl().

SwTableBox * SwTable::GetTableBox ( SwNodeOffset  nSttIdx)
const SwTableBox* SwTable::GetTableBox ( SwNodeOffset  nSttIdx) const

Definition at line 295 of file swtable.hxx.

TableChgMode SwTable::GetTableChgMode ( ) const
SwTableNode * SwTable::GetTableNode ( ) const
const OUString& SwTable::GetTableStyleName ( ) const
SwTableLines& SwTable::GetTabLines ( )

Definition at line 201 of file swtable.hxx.

Referenced by FndBox_::AreLinesToRestore(), CanConvertSubtables(), CheckConsistency(), SwLayHelper::CheckInsert(), CheckMergeSel(), CheckRowSpan(), CleanUpBottomRowSpan(), CleanUpTopRowSpan(), CollectBoxSelection(), ConvertSubtableBox(), ConvertSubtables(), ConvertTableToText(), CopyHeadlineIntoTable(), SaveTable::CreateNew(), DeleteBox_(), SwFEShell::DeleteRow(), SwDoc::DeleteRow(), FndBox_::DelFrames(), SwChartDataProvider::detectArguments(), SwXMLExport::ExportTable(), SwXMLExport::ExportTableAutoStyles(), SwTableBox::FindEndOfRowSpan(), SwXTextTableRow::FindLine(), SwTableLine::FindNextBox(), SwTableLine::FindPreviousBox(), SwTableBox::FindStartOfRowSpan(), FindSuperfluousRows_(), RtfAttributeOutput::FinishTableRowCell(), SwRowFrame::Format(), GCLines(), SwHTMLTableLayout::GetAnyBoxStartNode(), SwXTableRows::getByIndex(), SwXTextTable::getCellNames(), SwXTextTable::Impl::GetColumnCount(), ww8::WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows(), SwTableBox::GetCoordinates(), SwXTableRows::getCount(), SwXTableColumns::getCount(), SwTableFormula::GetLnPosInTable(), SwTableBox::GetName(), SwXTextTable::getPropertyValue(), SwXTextTable::Impl::GetRowCount(), SwVbaTableHelper::GetTabBox(), SwVbaTableHelper::getTabColumnsCount(), SwVbaTableHelper::getTabColumnsMaxCount(), GetTableBox(), GetTableSel(), SwVbaTableHelper::getTabRowIndex(), SwChartDataProvider::Impl_createDataSource(), DocxAttributeOutput::InitTableHelper(), RtfAttributeOutput::InitTableHelper(), SwNodes::InsBoxen(), SwXTableRows::insertByIndex(), SwXTableColumns::insertByIndex(), InsertRow(), InsertSpannedRow(), SwDoc::InsertTable(), InsNewTable(), InsTable(), IsHeadline(), SwTableBox::IsInHeadline(), IsTableComplexForChart(), lcl_BalanceTable(), lcl_CalculateSplitLineHeights(), lcl_ChangeRowSpan(), lcl_CheckRowSpan(), lcl_ChgTableSize(), lcl_CollectLines(), lcl_CpyBox(), lcl_FindParentLines(), lcl_FindTableLine(), lcl_getAllMergedBoxes(), lcl_GetRowNumber(), lcl_GetSelTable(), lcl_InsertPosition(), lcl_LineIndex(), lcl_RelToBox(), lcl_SaveUpperLowerBorder(), lcl_SetTableBoxWidths(), lcl_SetTableBoxWidths2(), lcl_SophisticatedFillLineIndices(), lcl_UpdateRepeatedHeadlines(), SwTabFrame::MakeAll(), MakeCopy(), FndBox_::MakeFrames(), FndBox_::MakeNewFrames(), SwXMLTableContext::MakeTable(), HTMLTable::MakeTable(), SwXMLTableContext::MakeTable_(), SwXMLTableContext::MakeTableLine(), HTMLTable::MakeTableLine(), SwFEShell::MergeTab(), SwNodes::MergeTable(), NewSetTabCols(), NewSplitRow(), SwDDETable::NoDDETable(), OutHTML_SwTableNode(), MSWordExportBase::OutputTextNode(), PrepareDelBoxes(), SwTransferable::PrivateDrop(), ww8::WW8TableInfo::processSwTable(), SaveTable::RestoreAttr(), RestoreRowSpan(), SaveTable::SaveTable(), SwAccessibleTable::selectAccessibleChild(), SwXTextTable::setPropertyValue(), SwDoc::SetRowNotTracked(), SetTabCols(), FndBox_::SetTableLines(), SwTabFrame::Split(), SwNodes::SplitTable(), SwDoc::SplitTable(), SwDDETable::SwDDETable(), SwTabFrame::SwTabFrame(), SwNodes::TextToTable(), SwDoc::TextToTable(), SwNodes::UndoTableToText(), SwTabFrame::UpdateAttr_(), and WW8TabDesc::UseSwTable().

const SwTableLines& SwTable::GetTabLines ( ) const

Definition at line 202 of file swtable.hxx.

SwTableSortBoxes& SwTable::GetTabSortBoxes ( )
const SwTableSortBoxes& SwTable::GetTabSortBoxes ( ) const

Definition at line 263 of file swtable.hxx.

bool SwTable::HasDeletedRow ( ) const
bool SwTable::HasLayout ( ) const
sal_uInt16 SwTable::IncGrfsThatResize ( )

Definition at line 181 of file swtable.hxx.

bool SwTable::InsertCol ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bBehind 
bool SwTable::InsertRow ( SwDoc pDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bBehind 
bool SwTable::InsertRow_ ( SwDoc pDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bBehind 
void SwTable::InsertSpannedRow ( SwDoc rDoc,
sal_uInt16  nRowIdx,
sal_uInt16  nCnt 

SwTable::InsertSpannedRow(..) inserts "superfluous" rows, i.e.

rows containing overlapped cells only. This is a preparation for an upcoming split.

Definition at line 1170 of file swnewtable.cxx.

References CHECK_TABLE, SwTableLine::ClaimFrameFormat(), SwTableLine::GetFrameFormat(), SwFormat::GetFrameSize(), SwTableLine::GetTabBoxes(), GetTabLines(), InsertRow_(), lcl_ChangeRowSpan(), lcl_FillSelBoxes(), n, SwFormat::SetFormatAttr(), size, and Variable.

Referenced by NewSplitRow().

bool SwTable::InsNewTable ( const SwTable rCpyTable,
const SwSelBoxes rSelBoxes,
SwUndoTableCpyTable pUndo 
bool SwTable::InsTable ( const SwTable rCpyTable,
const SwNodeIndex rSttBox,
SwUndoTableCpyTable pUndo 
bool SwTable::InsTable ( const SwTable rCpyTable,
const SwSelBoxes rSelBoxes,
SwUndoTableCpyTable pUndo 
bool SwTable::IsDeleted ( ) const
bool SwTable::IsHeadline ( const SwTableLine rLine) const

Definition at line 5814 of file tabfrm.cxx.

References GetRowsToRepeat(), GetTabLines(), and i.

Referenced by SwTableFormula::GetBoxes(), and SwTabFrame::IsInHeadline().

bool SwTable::IsNewModel ( ) const
bool SwTable::IsTableComplex ( ) const
bool SwTable::IsTableComplexForChart ( const OUString &  rSel) const
void SwTable::LockModify ( )

Definition at line 184 of file swtable.hxx.

Referenced by SetTabCols().

bool SwTable::MakeCopy ( SwDoc rInsDoc,
const SwPosition rPos,
const SwSelBoxes rSelBoxes,
bool  bCpyName = false,
const OUString &  rStyleName = "" 
) const
bool SwTable::Merge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
const SwSelBoxes rMerged,
SwTableBox pMergeBox,
SwUndoTableMerge pUndo 

Definition at line 232 of file swtable.hxx.

Referenced by SwDoc::MergeTable().

bool SwTable::NewInsertCol ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bBehind 
bool SwTable::NewMerge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
const SwSelBoxes rMerged,
SwUndoTableMerge pUndo 

NewMerge(..) removes the superfluous cells after cell merge.

SwTable::NewMerge(..) does some cleaning up, it simply deletes the superfluous cells ("cell span") and notifies the Undo about it. The main work has been done by SwTable::PrepareMerge(..) already.

rBoxesthe boxes to remove
pUndothe undo object to notify, maybe empty
true for compatibility reasons with OldMerge(..)

Definition at line 90 of file swnewtable.cxx.

References CHECK_TABLE, DeleteSel(), and SwUndoTableMerge::SetSelBoxes().

void SwTable::NewSetTabCols ( Parm rP,
const SwTabCols rNew,
const SwTabCols rOld,
const SwTableBox pStart,
bool  bCurRowOnly 
bool SwTable::NewSplitRow ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bSameHeight 
bool SwTable::OldMerge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
SwTableBox pMergeBox,
SwUndoTableMerge pUndo 
bool SwTable::OldSplitRow ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bSameHeight 
SwTable& SwTable::operator= ( const SwTable )
void SwTable::PrepareDelBoxes ( const SwSelBoxes rBoxes)
void SwTable::PrepareDeleteCol ( tools::Long  nMin,
tools::Long  nMax 
bool SwTable::PrepareMerge ( const SwPaM rPam,
SwSelBoxes rBoxes,
SwSelBoxes rMerged,
SwTableBox **  ppMergeBox,
SwUndoTableMerge pUndo 

SwTable::PrepareMerge(..) some preparation for the coming Merge(..)

For the old table model, GetMergeSel(..) is called only, for the new table model, PrepareMerge does the main work. It modifies all cells to merge (width, border, rowspan etc.) and collects the cells which have to be deleted by Merge(..) afterwards. If there are superfluous rows, these cells are put into the deletion list as well.

rPamthe selection to merge
rBoxesshould be empty at the beginning, at the end it is filled with boxes to delete.
ppMergeBoxwill be set to the master cell box
pUndothe undo object to record all changes can be Null, e.g. when called by Redo(..)

Definition at line 809 of file swnewtable.cxx.

References SwUndoTableMerge::AddNewBox(), IDocumentContentOperations::AppendTextNode(), SwIndex::Assign(), SwNodeIndex::Assign(), CHECK_TABLE, SwTableBox::ChgFrameFormat(), SwTableBox::ClaimFrameFormat(), CollectBoxSelection(), IDocumentUndoRedo::DoesUndo(), IDocumentUndoRedo::DoUndo(), o3tl::sorted_vector< Value, Compare, Find, class >::empty(), SwNode::EndOfSectionNode(), FindSuperfluousRows_(), SvxBoxItem::GetBottom(), SwFormat::GetBox(), SwPaM::GetContentNode(), SwFormat::GetDoc(), GetFrameFormat(), SwTableBox::GetFrameFormat(), SwDoc::getIDocumentContentOperations(), SwDoc::GetIDocumentUndoRedo(), GetMergeSel(), SwPaM::GetPoint(), SvxBoxItem::GetRight(), SwTableBox::getRowSpan(), SwTableBox::GetSttIdx(), SwTableBox::GetSttNd(), SwNode::GetTextNode(), SwTableBox::GetUpper(), o3tl::sorted_vector< Value, Compare, Find, class >::insert(), IsEmptyBox(), SwContentNode::Len(), m_bNewModel, SwUndoTableMerge::MoveBoxContent(), IDocumentContentOperations::MoveNodeRange(), SwPosition::nContent, SwPosition::nNode, NO_DELFRMS, SwTextNode::SetCountedInList(), SwFormat::SetFormatAttr(), SvxBoxItem::SetLine(), SwTableBox::setRowSpan(), o3tl::sorted_vector< Value, Compare, Find, class >::size(), and Variable.

Referenced by SwDoc::MergeTable().

void SwTable::RegisterToFormat ( SwFormat rFormat)
void SwTable::RestoreRowSpan ( const SwSaveRowSpan rSave)
SwSelBoxes & SwTable::SelLineFromBox ( const SwTableBox pBox,
SwSelBoxes rBoxes,
bool  bToTop = true 
bool SwTable::SetColWidth ( SwTableBox rCurrentBox,
TableChgWidthHeightType  eType,
SwTwips  nAbsDiff,
SwTwips  nRelDiff,
std::unique_ptr< SwUndo > *  ppUndo 
void SwTable::SetHTMLTableLayout ( std::shared_ptr< SwHTMLTableLayout > const &  r)
void SwTable::SetRefObject ( SwServerObject pObj)

Definition at line 2120 of file swtable.cxx.

References sfx2::SvLinkSource::Closed(), tools::SvRef< T >::is(), and m_xRefObj.

bool SwTable::SetRowHeight ( SwTableBox rCurrentBox,
TableChgWidthHeightType  eType,
SwTwips  nAbsDiff,
SwTwips  nRelDiff,
std::unique_ptr< SwUndo > *  ppUndo 
void SwTable::SetRowsToRepeat ( sal_uInt16  nNumOfRows)
void SwTable::SetTabCols ( const SwTabCols rNew,
const SwTabCols rOld,
const SwTableBox pStart,
bool  bCurRowOnly 
void SwTable::SetTableChgMode ( TableChgMode  eMode)

Definition at line 334 of file swtable.hxx.

Referenced by MakeCopy(), SwTableNode::MakeCopy(), and SwNodes::MergeTable().

void SwTable::SetTableModel ( bool  bNew)
void SwTable::SetTableNode ( SwTableNode pNode)

Definition at line 323 of file swtable.hxx.

Referenced by SwTableNode::MakeCopy().

void SwTable::SetTableStyleName ( const OUString &  rName)
bool SwTable::SplitCol ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt 
bool SwTable::SplitRow ( SwDoc rDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bSameHeight 

Definition at line 238 of file swtable.hxx.

Referenced by SwDoc::SplitTable().

void SwTable::SwClientNotify ( const SwModify ,
const SfxHint rHint 
void SwTable::UnlockModify ( )

Definition at line 185 of file swtable.hxx.

Referenced by SetTabCols().

void SwTable::UpdateCharts ( ) const

Member Data Documentation

SwTableLines SwTable::m_aLines
bool SwTable::m_bModifyLocked

Definition at line 138 of file swtable.hxx.

Referenced by SwClientNotify().

bool SwTable::m_bNewModel
TableChgMode SwTable::m_eTableChgMode

Definition at line 129 of file swtable.hxx.

Referenced by SwTable().

sal_uInt16 SwTable::m_nGraphicsThatResize

Definition at line 131 of file swtable.hxx.

sal_uInt16 SwTable::m_nRowsToRepeat

Definition at line 133 of file swtable.hxx.

SwTableNode* SwTable::m_pTableNode

Definition at line 126 of file swtable.hxx.

Referenced by GetTableNode(), and SwDDETable::~SwDDETable().

SwTableSortBoxes SwTable::m_TabSortContentBoxes

Definition at line 117 of file swtable.hxx.

Referenced by GetInfo(), GetTableBox(), IsTableComplex(), SwDDETable::SwDDETable(), and ~SwTable().

std::shared_ptr<SwHTMLTableLayout> SwTable::m_xHTMLLayout

Definition at line 120 of file swtable.hxx.

Referenced by SetHTMLTableLayout().

tools::SvRef<SwServerObject> SwTable::m_xRefObj

Definition at line 118 of file swtable.hxx.

Referenced by SetRefObject(), and ~SwTable().

OUString SwTable::maTableStyleName

Name of the table style to be applied on this table.

Definition at line 136 of file swtable.hxx.

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