LibreOffice Module sw (master) 1
Macros | Typedefs | Functions | Variables
ndtbl.cxx File Reference
#include <libxml/xmlwriter.h>
#include <config_wasm_strip.h>
#include <memory>
#include <fesh.hxx>
#include <hintids.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/protitem.hxx>
#include <editeng/boxitem.hxx>
#include <svl/stritem.hxx>
#include <editeng/shaditem.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <fmtfordr.hxx>
#include <fmtpdsc.hxx>
#include <fmtanchr.hxx>
#include <fmtlsplt.hxx>
#include <frmatr.hxx>
#include <cellfrm.hxx>
#include <pagefrm.hxx>
#include <tabcol.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <UndoManager.hxx>
#include <DocumentSettingManager.hxx>
#include <IDocumentChartDataProviderAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentState.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
#include <swcrsr.hxx>
#include <swtable.hxx>
#include <swundo.hxx>
#include <tblsel.hxx>
#include <poolfmt.hxx>
#include <tabfrm.hxx>
#include <UndoCore.hxx>
#include <UndoRedline.hxx>
#include <UndoDelete.hxx>
#include <UndoNumbering.hxx>
#include <UndoTable.hxx>
#include <hints.hxx>
#include <tblafmt.hxx>
#include <frminf.hxx>
#include <cellatr.hxx>
#include <swtblfmt.hxx>
#include <swddetbl.hxx>
#include <mvsave.hxx>
#include <docary.hxx>
#include <redline.hxx>
#include <rolbck.hxx>
#include <tblrwcl.hxx>
#include <editsh.hxx>
#include <txtfrm.hxx>
#include <section.hxx>
#include <frmtool.hxx>
#include <node2lay.hxx>
#include <strings.hrc>
#include <docsh.hxx>
#include <unochart.hxx>
#include <node.hxx>
#include <ndtxt.hxx>
#include <cstdlib>
#include <map>
#include <algorithm>
#include <rootfrm.hxx>
#include <fldupde.hxx>
#include <calbck.hxx>
#include <fntcache.hxx>
#include <frameformats.hxx>
#include <o3tl/numeric.hxx>
#include <o3tl/string_view.hxx>
#include <svl/numformat.hxx>
#include <tools/datetimeutils.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
Include dependency graph for ndtbl.cxx:

Go to the source code of this file.


#define CHECK_TABLE(t)   (t).CheckConsistency();
#define ROWFUZZY   25


typedef std::map< SwFrameFormat *, SwTableBoxFormat * > DfltBoxAttrMap_t
typedef std::vector< DfltBoxAttrMap_t * > DfltBoxAttrList_t


static void lcl_SetDfltBoxAttr (SwFrameFormat &rFormat, sal_uInt8 nId)
static void lcl_SetDfltBoxAttr (SwTableBox &rBox, DfltBoxAttrList_t &rBoxFormatArr, sal_uInt8 const nId, SwTableAutoFormat const *const pAutoFormat=nullptr)
static SwTableBoxFormatlcl_CreateDfltBoxFormat (SwDoc &rDoc, std::vector< SwTableBoxFormat * > &rBoxFormatArr, sal_uInt16 nCols, sal_uInt8 nId)
static SwTableBoxFormatlcl_CreateAFormatBoxFormat (SwDoc &rDoc, std::vector< SwTableBoxFormat * > &rBoxFormatArr, const SwTableAutoFormat &rAutoFormat, const sal_uInt16 nRows, const sal_uInt16 nCols, sal_uInt8 nId)
static void lcl_RemoveBreaks (SwContentNode &rNode, SwTableFormat *const pTableFormat)
static void lcl_BalanceTable (SwTable &rTable, size_t const nMaxBoxes, SwTableNode &rTableNd, SwTableBoxFormat &rBoxFormat, SwTextFormatColl &rTextColl, SwUndoTextToTable *const pUndo, std::vector< sal_uInt16 > *const pPositions)
 balance lines in table, insert empty boxes so all lines have the size More...
static void lcl_SetTableBoxWidths (SwTable &rTable, size_t const nMaxBoxes, SwTableBoxFormat &rBoxFormat, SwDoc &rDoc, std::vector< sal_uInt16 > *const pPositions)
static void lcl_SetTableBoxWidths2 (SwTable &rTable, size_t const nMaxBoxes, SwTableBoxFormat &rBoxFormat, SwDoc &rDoc)
static void lcl_DelBox (SwTableBox *pBox, DelTabPara *pDelPara)
static void lcl_DelLine (SwTableLine *pLine, DelTabPara *pPara)
static bool lcl_IsFrameInColumn (const SwCellFrame &rFrame, SwSelBoxes const &rBoxes)
bool sw_Line_CollectBox (const SwTableLine *&rpLine, void *pPara)
void sw_Box_CollectBox (const SwTableBox *pBox, SwCollectTableLineBoxes *pSplPara)
void sw_BoxSetSplitBoxFormats (SwTableBox *pBox, SwCollectTableLineBoxes *pSplPara)
static bool lcl_ChgTableSize (SwTable &rTable)
static void lcl_SplitTable_CpyBox (SwTableBox *pBox, SplitTable_Para *pPara)
static void lcl_SplitTable_CpyLine (SwTableLine *pLn, SplitTable_Para *pPara)
static bool lcl_SetAFormatBox (FndBox_ &, SetAFormatTabPara *pSetPara, bool bResetDirect)
static bool lcl_SetAFormatLine (FndLine_ &, SetAFormatTabPara *pPara, bool bResetDirect)


const sal_Unicode T2T_PARA = 0x0a

Macro Definition Documentation


#define CHECK_TABLE (   t)    (t).CheckConsistency();

Definition at line 100 of file ndtbl.cxx.


#define ROWFUZZY   25

Definition at line 2566 of file ndtbl.cxx.

Typedef Documentation

◆ DfltBoxAttrList_t

typedef std::vector<DfltBoxAttrMap_t *> DfltBoxAttrList_t

Definition at line 143 of file ndtbl.cxx.

◆ DfltBoxAttrMap_t

Definition at line 142 of file ndtbl.cxx.

Function Documentation

◆ lcl_BalanceTable()

static void lcl_BalanceTable ( SwTable rTable,
size_t const  nMaxBoxes,
SwTableNode rTableNd,
SwTableBoxFormat rBoxFormat,
SwTextFormatColl rTextColl,
SwUndoTextToTable *const  pUndo,
std::vector< sal_uInt16 > *const  pPositions 

balance lines in table, insert empty boxes so all lines have the size

Definition at line 934 of file ndtbl.cxx.

References SwUndoTextToTable::AddFillBox(), SwNode::GetNodes(), SwTableLine::GetTabBoxes(), SwTable::GetTabLines(), i, SwNodes::InsBoxen(), n, and size.

Referenced by SwNodes::TextToTable().

◆ lcl_ChgTableSize()

static bool lcl_ChgTableSize ( SwTable rTable)

◆ lcl_CreateAFormatBoxFormat()

static SwTableBoxFormat * lcl_CreateAFormatBoxFormat ( SwDoc rDoc,
std::vector< SwTableBoxFormat * > &  rBoxFormatArr,
const SwTableAutoFormat rAutoFormat,
const sal_uInt16  nRows,
const sal_uInt16  nCols,
sal_uInt8  nId 

◆ lcl_CreateDfltBoxFormat()

static SwTableBoxFormat * lcl_CreateDfltBoxFormat ( SwDoc rDoc,
std::vector< SwTableBoxFormat * > &  rBoxFormatArr,
sal_uInt16  nCols,
sal_uInt8  nId 

◆ lcl_DelBox()

static void lcl_DelBox ( SwTableBox pBox,
DelTabPara *  pDelPara 

◆ lcl_DelLine()

static void lcl_DelLine ( SwTableLine pLine,
DelTabPara *  pPara 

Definition at line 1505 of file ndtbl.cxx.

References SwTableLine::GetTabBoxes(), SwTableLine::GetUpper(), and lcl_DelBox().

Referenced by lcl_DelBox(), and SwNodes::TableToText().

◆ lcl_IsFrameInColumn()

static bool lcl_IsFrameInColumn ( const SwCellFrame rFrame,
SwSelBoxes const &  rBoxes 

◆ lcl_RemoveBreaks()

static void lcl_RemoveBreaks ( SwContentNode rNode,
SwTableFormat *const  pTableFormat 

◆ lcl_SetAFormatBox()

static bool lcl_SetAFormatBox ( FndBox_ rBox,
SetAFormatTabPara *  pSetPara,
bool  bResetDirect 

◆ lcl_SetAFormatLine()

static bool lcl_SetAFormatLine ( FndLine_ rLine,
SetAFormatTabPara *  pPara,
bool  bResetDirect 

Definition at line 3656 of file ndtbl.cxx.

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

Referenced by lcl_SetAFormatBox().

◆ lcl_SetDfltBoxAttr() [1/2]

static void lcl_SetDfltBoxAttr ( SwFrameFormat rFormat,
sal_uInt8  nId 

◆ lcl_SetDfltBoxAttr() [2/2]

static void lcl_SetDfltBoxAttr ( SwTableBox rBox,
DfltBoxAttrList_t rBoxFormatArr,
sal_uInt8 const  nId,
SwTableAutoFormat const *const  pAutoFormat = nullptr 

◆ lcl_SetTableBoxWidths()

static void lcl_SetTableBoxWidths ( SwTable rTable,
size_t const  nMaxBoxes,
SwTableBoxFormat rBoxFormat,
SwDoc rDoc,
std::vector< sal_uInt16 > *const  pPositions 

◆ lcl_SetTableBoxWidths2()

static void lcl_SetTableBoxWidths2 ( SwTable rTable,
size_t const  nMaxBoxes,
SwTableBoxFormat rBoxFormat,
SwDoc rDoc 

◆ lcl_SplitTable_CpyBox()

static void lcl_SplitTable_CpyBox ( SwTableBox pBox,
SplitTable_Para *  pPara 

◆ lcl_SplitTable_CpyLine()

static void lcl_SplitTable_CpyLine ( SwTableLine pLn,
SplitTable_Para *  pPara 

◆ sw_Box_CollectBox()

void sw_Box_CollectBox ( const SwTableBox pBox,
SwCollectTableLineBoxes pSplPara 

◆ sw_BoxSetSplitBoxFormats()

void sw_BoxSetSplitBoxFormats ( SwTableBox pBox,
SwCollectTableLineBoxes pSplPara 

◆ sw_Line_CollectBox()

bool sw_Line_CollectBox ( const SwTableLine *&  rpLine,
void *  pPara 

Variable Documentation


const sal_Unicode T2T_PARA = 0x0a

Definition at line 108 of file ndtbl.cxx.

Referenced by lcl_DelBox(), and SwNodes::TextToTable().