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:
[legend]
Collaboration diagram for SwTable:
[legend]

Public Types

enum  SearchType {
  SEARCH_NONE,
  SEARCH_ROW,
  SEARCH_COL
}
 

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 *pDoc, 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, long &rMin, 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 (long nMin, 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 *pDoc, 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
 
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 (sal_uLong nSttIdx)
 
const SwTableBoxGetTableBox (sal_uLong 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
 
- Public Member Functions inherited from SwClient
 SwClient ()
 
 SwClient (SwClient &&) noexcept
 
virtual ~SwClient () override
 
virtual void SwClientNotify (const SwModify &, const SfxHint &rHint) override
 
std::unique_ptr< sw::ModifyChangedHintCheckRegistration (const SfxPoolItem *pOldValue)
 
virtual void ModifyNotification (const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
 
void SwClientNotifyCall (const SwModify &rModify, const SfxHint &rHint)
 
const SwModifyGetRegisteredIn () const
 
SwModifyGetRegisteredIn ()
 
void EndListeningAll ()
 
void StartListeningToSameModifyAs (const SwClient &)
 
- Public Member Functions inherited from sw::WriterListener
bool IsLast () 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 Modify (const SfxPoolItem *pOld, const SfxPoolItem *pNew) 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
 
SwTableNodem_pTableNode
 
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 *pDoc, 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 long nOld, const long nNew)
 
void NewSetTabCols (Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld, const SwTableBox *pStart, bool bCurRowOnly)
 

Detailed Description

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

Definition at line 110 of file swtable.hxx.

Member Enumeration Documentation

Enumerator
SEARCH_NONE 
SEARCH_ROW 
SEARCH_COL 

Definition at line 142 of file swtable.hxx.

Constructor & Destructor Documentation

SwTable::SwTable ( )
explicit

Definition at line 205 of file swtable.cxx.

References GetTableChgDefaultMode(), and m_eTableChgMode.

Referenced by SwDDETable::NoDDETable().

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

Definition at line 217 of file swtable.cxx.

Member Function Documentation

void SwTable::AdjustWidths ( const long  nOld,
const long  nNew 
)
private

Definition at line 369 of file swtable.cxx.

References lcl_ModifyLines(), m_aLines, and size.

Referenced by Modify(), and NewInsertCol().

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 1916 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 2058 of file swnewtable.cxx.

References GetTabLines(), and IsNewModel().

Referenced by SwDoc::SplitTable().

std::unique_ptr< SwBoxSelection > SwTable::CollectBoxSelection ( const SwPaM rPam) const
private
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 1654 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 ( )
inline

Definition at line 179 of file swtable.hxx.

Referenced by SwHTMLImageWatcher::init(), and 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,
long &  rMin,
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 1897 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)
inline

Definition at line 255 of file swtable.hxx.

Referenced by SwDoc::DeleteRowCol().

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

Definition at line 1920 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(), 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(), 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 430 of file gctable.cxx.

References GetTabLines(), lcl_MergeGCLine(), GCLinePara::pShareFormats, and SwTableLines::size().

Referenced by InsertCnt_(), and MakeCopy().

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

Definition at line 1285 of file swtable.cxx.

References lcl_IsValidRowName(), nPos, and SAL_MAX_UINT16.

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

SwTableFormat* SwTable::GetFrameFormat ( )
inline

Definition at line 201 of file swtable.hxx.

References SwClient::GetRegisteredIn().

Referenced by SwDoc::AdjustCellWidth(), WW8TabDesc::AdjustNewBand(), SwDoc::AppendDoc(), SwTableProperties_Impl::ApplyTableAttr(), FndBox_::AreLinesToRestore(), SwXTextTable::attach(), CalculateFlySize(), SwDDETable::ChangeContent(), checkAndWriteFloatingTables(), CheckConsistency(), CheckTable(), SwXText::convertToTable(), CopyHeadlineIntoTable(), SwEditShell::CopySelToDoc(), sw::DocumentChartDataProviderManager::CreateChartInternalDataProviders(), SaveTable::CreateNew(), SaveLine::CreateNew(), SaveBox::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(), HasLayout(), sw::util::HasPageBreak(), SwRootFrame::Init(), DocxAttributeOutput::InitTableHelper(), RtfAttributeOutput::InitTableHelper(), SwUndoTableCpyTable::InsertRow(), InsNewTable(), InsTable(), SwAccessibleMap::InvalidateShapeInParaSelection(), SwChartDataProvider::InvalidateTable(), lcl_ChgTableSize(), lcl_CopyLineToDoc(), lcl_CpyBox(), lcl_InsertLabel(), MakeCopy(), FndBox_::MakeFrames(), SwHTMLWriter::MakeHeader(), FndBox_::MakeNewFrames(), SwXMLTableContext::MakeTable(), HTMLTable::MakeTable(), SwNodes::MergeTable(), SwNodes::MoveNodes(), SwWW8ImplReader::MoveOutsideFly(), SwHTMLParser::MovePageDescAttrs(), MSWordSections::MSWordSections(), NewInsertCol(), SwXParagraphEnumerationImpl::NextElement_Impl(), 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
inline

Definition at line 202 of file swtable.hxx.

References SwClient::GetRegisteredIn().

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

Definition at line 175 of file swtable.hxx.

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

Definition at line 322 of file swtable.hxx.

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

SwServerObject* SwTable::GetObject ( )
inline

Definition at line 323 of file swtable.hxx.

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

sal_uInt16 SwTable::GetRowsToRepeat ( ) const
inline
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 1344 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(), SaveBox::CreateNew(), 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 ( sal_uLong  nSttIdx)
const SwTableBox* SwTable::GetTableBox ( sal_uLong  nSttIdx) const
inline

Definition at line 292 of file swtable.hxx.

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

Definition at line 198 of file swtable.hxx.

Referenced by FndBox_::AreLinesToRestore(), CheckConsistency(), SwLayHelper::CheckInsert(), CheckMergeSel(), CheckRowSpan(), CleanUpBottomRowSpan(), CleanUpTopRowSpan(), CollectBoxSelection(), ConvertTableToText(), CopyHeadlineIntoTable(), SaveTable::CreateNew(), DeleteBox_(), SwFEShell::DeleteRow(), SwDoc::DeleteRow(), FndBox_::DelFrames(), SwChartDataProvider::detectArguments(), SwXMLExport::ExportTable(), SwXMLExport::ExportTableAutoStyles(), FindBox_(), 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_CopyLineToDoc(), lcl_CopyRow(), lcl_CopyTableLine(), lcl_CpyBox(), lcl_FindParentLines(), lcl_FindTableLine(), lcl_getAllMergedBoxes(), lcl_GetRowNumber(), lcl_GetSelTable(), lcl_InsertPosition(), lcl_LineIndex(), lcl_Merge_MoveLine(), 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(), ww8::WW8TableInfo::processSwTable(), SaveTable::RestoreAttr(), RestoreRowSpan(), SaveTable::SaveTable(), SwAccessibleTable::selectAccessibleChild(), SwXTextTable::setPropertyValue(), SetTabCols(), FndBox_::SetTableLines(), TableWait::ShouldWait(), SwNodes::SplitTable(), SwDoc::SplitTable(), SwDDETable::SwDDETable(), SwTabFrame::SwTabFrame(), SwNodes::TextToTable(), SwDoc::TextToTable(), SwNodes::UndoTableToText(), and WW8TabDesc::UseSwTable().

const SwTableLines& SwTable::GetTabLines ( ) const
inline

Definition at line 199 of file swtable.hxx.

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

Definition at line 260 of file swtable.hxx.

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

Definition at line 178 of file swtable.hxx.

bool SwTable::InsertCol ( SwDoc pDoc,
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 
)
private
void SwTable::InsertSpannedRow ( SwDoc pDoc,
sal_uInt16  nRowIdx,
sal_uInt16  nCnt 
)
private

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

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

Definition at line 1167 of file swnewtable.cxx.

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

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::IsHeadline ( const SwTableLine rLine) const

Definition at line 5384 of file tabfrm.cxx.

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

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

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

Definition at line 181 of file swtable.hxx.

Referenced by SetTabCols().

bool SwTable::MakeCopy ( SwDoc pInsDoc,
const SwPosition rPos,
const SwSelBoxes rSelBoxes,
bool  bCpyName = false 
) const
bool SwTable::Merge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
const SwSelBoxes rMerged,
SwTableBox pMergeBox,
SwUndoTableMerge pUndo 
)
inline

Definition at line 229 of file swtable.hxx.

Referenced by SwDoc::MergeTable().

void SwTable::Modify ( const SfxPoolItem pOld,
const SfxPoolItem pNew 
)
overrideprotectedvirtual
bool SwTable::NewInsertCol ( SwDoc pDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bBehind 
)
private
bool SwTable::NewMerge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
const SwSelBoxes rMerged,
SwUndoTableMerge pUndo 
)
private

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.

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

Definition at line 87 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 
)
private
bool SwTable::NewSplitRow ( SwDoc pDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bSameHeight 
)
private
bool SwTable::OldMerge ( SwDoc pDoc,
const SwSelBoxes rBoxes,
SwTableBox pMergeBox,
SwUndoTableMerge pUndo 
)
private
bool SwTable::OldSplitRow ( SwDoc pDoc,
const SwSelBoxes rBoxes,
sal_uInt16  nCnt,
bool  bSameHeight 
)
private
SwTable& SwTable::operator= ( const SwTable )
privatedelete
void SwTable::PrepareDelBoxes ( const SwSelBoxes rBoxes)
void SwTable::PrepareDeleteCol ( long  nMin,
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.

Parameters
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(..)
Returns

Definition at line 806 of file swnewtable.cxx.

References SwUndoTableMerge::AddNewBox(), IDocumentContentOperations::AppendTextNode(), SwIndex::Assign(), SwNodeIndex::Assign(), ATT_VAR_SIZE, 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(), nColCount, SwPosition::nContent, nLineCount, SwPosition::nNode, NO_DELFRMS, SwTextNode::SetCountedInList(), SwFormat::SetFormatAttr(), SvxBoxItem::SetLine(), SwTableBox::setRowSpan(), and o3tl::sorted_vector< Value, Compare, Find, class >::size().

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 
)
static
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 1934 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)
inline
void SwTable::SetTabCols ( const SwTabCols rNew,
const SwTabCols rOld,
const SwTableBox pStart,
bool  bCurRowOnly 
)
void SwTable::SetTableChgMode ( TableChgMode  eMode)
inline

Definition at line 329 of file swtable.hxx.

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

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

Definition at line 318 of file swtable.hxx.

Referenced by SwTableNode::MakeCopy().

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

Definition at line 235 of file swtable.hxx.

Referenced by SwDoc::SplitTable().

void SwTable::UnlockModify ( )
inline

Definition at line 182 of file swtable.hxx.

Referenced by SetTabCols().

void SwTable::UpdateCharts ( ) const

Member Data Documentation

SwTableLines SwTable::m_aLines
protected
bool SwTable::m_bModifyLocked
protected

Definition at line 136 of file swtable.hxx.

Referenced by Modify().

bool SwTable::m_bNewModel
protected
TableChgMode SwTable::m_eTableChgMode
protected

Definition at line 127 of file swtable.hxx.

Referenced by SwTable().

sal_uInt16 SwTable::m_nGraphicsThatResize
protected

Definition at line 129 of file swtable.hxx.

sal_uInt16 SwTable::m_nRowsToRepeat
protected

Definition at line 131 of file swtable.hxx.

SwTableNode* SwTable::m_pTableNode
protected

Definition at line 124 of file swtable.hxx.

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

SwTableSortBoxes SwTable::m_TabSortContentBoxes
protected

Definition at line 115 of file swtable.hxx.

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

std::shared_ptr<SwHTMLTableLayout> SwTable::m_xHTMLLayout
protected

Definition at line 118 of file swtable.hxx.

Referenced by SetHTMLTableLayout().

tools::SvRef<SwServerObject> SwTable::m_xRefObj
protected

Definition at line 116 of file swtable.hxx.

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

OUString SwTable::maTableStyleName
protected

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

Definition at line 134 of file swtable.hxx.


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