LibreOffice Module sw (master) 1
Macros | Typedefs | Functions
tblrwcl.cxx File Reference
#include <memory>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <osl/diagnose.h>
#include <svl/numformat.hxx>
#include <hintids.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
#include <tools/fract.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <doc.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentChartDataProviderAccess.hxx>
#include <DocumentContentOperationsManager.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <docsh.hxx>
#include <fesh.hxx>
#include <tabfrm.hxx>
#include <frmatr.hxx>
#include <frmtool.hxx>
#include <pam.hxx>
#include <swtable.hxx>
#include <tblsel.hxx>
#include <fldbas.hxx>
#include <rowfrm.hxx>
#include <ddefld.hxx>
#include <hints.hxx>
#include <UndoTable.hxx>
#include <cellatr.hxx>
#include <mvsave.hxx>
#include <swtblfmt.hxx>
#include <swddetbl.hxx>
#include <poolfmt.hxx>
#include <tblrwcl.hxx>
#include <unochart.hxx>
#include <o3tl/numeric.hxx>
#include <calbck.hxx>
#include <docary.hxx>
Include dependency graph for tblrwcl.cxx:

Go to the source code of this file.

Macros

#define COLFUZZY   20
 
#define ROWFUZZY   10
 
#define CHECK_TABLE(t)   (t).CheckConsistency();
 
#define CHECKBOXWIDTH
 
#define CHECKTABLELAYOUT
 

Typedefs

typedef bool(* FN_lcl_SetBoxWidth) (SwTableLine *, CR_SetBoxWidth &, SwTwips, bool)
 
typedef bool(* FN_lcl_SetLineHeight) (SwTableLine *, CR_SetLineHeight &, SwTwips, bool)
 
typedef o3tl::sorted_vector< CpyTabFrame > CpyTabFrames
 

Functions

static bool lcl_SetSelBoxWidth (SwTableLine *pLine, CR_SetBoxWidth &rParam, SwTwips nDist, bool bCheck)
 
static bool lcl_SetOtherBoxWidth (SwTableLine *pLine, CR_SetBoxWidth &rParam, SwTwips nDist, bool bCheck)
 
static bool lcl_SetSelLineHeight (SwTableLine *pLine, const CR_SetLineHeight &rParam, SwTwips nDist, bool bCheck)
 
static bool lcl_SetOtherLineHeight (SwTableLine *pLine, const CR_SetLineHeight &rParam, SwTwips nDist, bool bCheck)
 
static SwTableLinelcl_CopyRow (FndLine_ &rFndLine, CpyPara *const pCpyPara)
 
static void lcl_CopyCol (FndBox_ &rFndBox, CpyPara *const pCpyPara)
 
static void lcl_InsCol (FndLine_ *pFndLn, CpyPara &rCpyPara, sal_uInt16 nCpyCnt, bool bBehind)
 
static SwRowFrameGetRowFrame (SwTableLine &rLine)
 
static void lcl_LastBoxSetWidth (SwTableBoxes &rBoxes, const tools::Long nOffset, bool bFirst, SwShareBoxFormats &rShareFormats)
 
static void lcl_LastBoxSetWidthLine (SwTableLines &rLines, const tools::Long nOffset, bool bFirst, SwShareBoxFormats &rShareFormats)
 
void DeleteBox_ (SwTable &rTable, SwTableBox *pBox, SwUndo *pUndo, bool bCalcNewSize, const bool bCorrBorder, SwShareBoxFormats *pShareFormats)
 
static SwTableBoxlcl_FndNxtPrvDelBox (const SwTableLines &rTableLns, SwTwips nBoxStt, SwTwips nBoxWidth, sal_uInt16 nLinePos, bool bNxt, SwSelBoxes *pAllDelBoxes, size_t *const pCurPos)
 
static void lcl_SaveUpperLowerBorder (SwTable &rTable, const SwTableBox &rBox, SwShareBoxFormats &rShareFormats, SwSelBoxes *pAllDelBoxes=nullptr, size_t *const pCurPos=nullptr)
 
static void lcl_CpyLines (sal_uInt16 nStt, sal_uInt16 nEnd, SwTableLines &rLines, SwTableBox *pInsBox, sal_uInt16 nPos=USHRT_MAX)
 
static void lcl_CpyBoxes (sal_uInt16 nStt, sal_uInt16 nEnd, SwTableBoxes &rBoxes, SwTableLine *pInsLine)
 
static void lcl_CalcWidth (SwTableBox *pBox)
 
static void lcl_Merge_MoveLine (FndLine_ &rFndLine, InsULPara *const pULPara)
 
static void lcl_Merge_MoveBox (FndBox_ &rFndBox, InsULPara *const pULPara)
 
static void lcl_BoxSetHeadCondColl (const SwTableBox *pBox)
 
static void lcl_CheckRowSpan (SwTable &rTable)
 
static sal_uInt16 lcl_GetBoxOffset (const FndBox_ &rBox)
 
static sal_uInt16 lcl_GetLineWidth (const FndLine_ &rLine)
 
static void lcl_CalcNewWidths (const FndLines_t &rFndLines, CpyPara &rPara)
 
static void lcl_CopyLineToDoc (FndLine_ const &rpFndLn, CpyPara *const pCpyPara)
 
static void lcl_CopyBoxToDoc (FndBox_ const &rFndBox, CpyPara *const pCpyPara)
 
void sw_LineSetHeadCondColl (const SwTableLine *pLine)
 
static SwTwips lcl_GetDistance (SwTableBox *pBox, bool bLeft)
 
static void lcl_AjustLines (SwTableLine *pLine, CR_SetBoxWidth &rParam)
 
void CheckBoxWidth (const SwTableLine &rLine, SwTwips nSize)
 
static void SetLineHeight (SwTableLine &rLine, SwTwips nOldHeight, SwTwips nNewHeight, bool bMinSize)
 

Macro Definition Documentation

◆ CHECK_TABLE

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

Definition at line 69 of file tblrwcl.cxx.

◆ CHECKBOXWIDTH

#define CHECKBOXWIDTH
Value:
{ \
SwTwips nSize = GetFrameFormat()->GetFrameSize().GetWidth(); \
for (size_t nTmp = 0; nTmp < m_aLines.size(); ++nTmp) \
::CheckBoxWidth( *m_aLines[ nTmp ], nSize ); \
}
void CheckBoxWidth(const SwTableLine &rLine, SwTwips nSize)
Definition: tblrwcl.cxx:2576

Definition at line 136 of file tblrwcl.cxx.

◆ CHECKTABLELAYOUT

#define CHECKTABLELAYOUT
Value:
{ \
for ( size_t i = 0; i < GetTabLines().size(); ++i ) \
{ \
SwFrameFormat* pFormat = GetTabLines()[i]->GetFrameFormat(); \
SwIterator<SwRowFrame,SwFormat> aIter( *pFormat ); \
for (SwRowFrame* pFrame=aIter.First(); pFrame; pFrame=aIter.Next())\
{ \
if ( pFrame->GetTabLine() == GetTabLines()[i] ) \
{ \
OSL_ENSURE( pFrame->GetUpper()->IsTabFrame(), \
"Table layout does not match table structure" ); \
} \
} \
} \
}
SwRowFrame is one table row in the document layout.
Definition: rowfrm.hxx:29
int i

Definition at line 143 of file tblrwcl.cxx.

◆ COLFUZZY

#define COLFUZZY   20

Definition at line 65 of file tblrwcl.cxx.

◆ ROWFUZZY

#define ROWFUZZY   10

Definition at line 66 of file tblrwcl.cxx.

Typedef Documentation

◆ CpyTabFrames

typedef o3tl::sorted_vector<CpyTabFrame> CpyTabFrames

Definition at line 200 of file tblrwcl.cxx.

◆ FN_lcl_SetBoxWidth

typedef bool(* FN_lcl_SetBoxWidth) (SwTableLine *, CR_SetBoxWidth &, SwTwips, bool)

Definition at line 132 of file tblrwcl.cxx.

◆ FN_lcl_SetLineHeight

typedef bool(* FN_lcl_SetLineHeight) (SwTableLine *, CR_SetLineHeight &, SwTwips, bool)

Definition at line 198 of file tblrwcl.cxx.

Function Documentation

◆ CheckBoxWidth()

void CheckBoxWidth ( const SwTableLine rLine,
SwTwips  nSize 
)

◆ DeleteBox_()

void DeleteBox_ ( SwTable rTable,
SwTableBox pBox,
SwUndo pUndo,
bool  bCalcNewSize,
const bool  bCorrBorder,
SwShareBoxFormats pShareFormats 
)

◆ GetRowFrame()

static SwRowFrame * GetRowFrame ( SwTableLine rLine)
static

◆ lcl_AjustLines()

static void lcl_AjustLines ( SwTableLine pLine,
CR_SetBoxWidth &  rParam 
)
static

◆ lcl_BoxSetHeadCondColl()

static void lcl_BoxSetHeadCondColl ( const SwTableBox pBox)
static

◆ lcl_CalcNewWidths()

static void lcl_CalcNewWidths ( const FndLines_t rFndLines,
CpyPara &  rPara 
)
static

◆ lcl_CalcWidth()

static void lcl_CalcWidth ( SwTableBox pBox)
static

◆ lcl_CheckRowSpan()

static void lcl_CheckRowSpan ( SwTable rTable)
static

◆ lcl_CopyBoxToDoc()

static void lcl_CopyBoxToDoc ( FndBox_ const &  rFndBox,
CpyPara *const  pCpyPara 
)
static

◆ lcl_CopyCol()

static void lcl_CopyCol ( FndBox_ rFndBox,
CpyPara *const  pCpyPara 
)
static

◆ lcl_CopyLineToDoc()

static void lcl_CopyLineToDoc ( FndLine_ const &  rpFndLn,
CpyPara *const  pCpyPara 
)
static

◆ lcl_CopyRow()

static SwTableLine * lcl_CopyRow ( FndLine_ rFndLine,
CpyPara *const  pCpyPara 
)
static

◆ lcl_CpyBoxes()

static void lcl_CpyBoxes ( sal_uInt16  nStt,
sal_uInt16  nEnd,
SwTableBoxes rBoxes,
SwTableLine pInsLine 
)
static

Definition at line 1305 of file tblrwcl.cxx.

References SwTableLine::GetTabBoxes(), n, and nPos.

Referenced by lcl_Merge_MoveBox(), and lcl_Merge_MoveLine().

◆ lcl_CpyLines()

static void lcl_CpyLines ( sal_uInt16  nStt,
sal_uInt16  nEnd,
SwTableLines rLines,
SwTableBox pInsBox,
sal_uInt16  nPos = USHRT_MAX 
)
static

◆ lcl_FndNxtPrvDelBox()

static SwTableBox * lcl_FndNxtPrvDelBox ( const SwTableLines rTableLns,
SwTwips  nBoxStt,
SwTwips  nBoxWidth,
sal_uInt16  nLinePos,
bool  bNxt,
SwSelBoxes pAllDelBoxes,
size_t *const  pCurPos 
)
static

◆ lcl_GetBoxOffset()

static sal_uInt16 lcl_GetBoxOffset ( const FndBox_ rBox)
static

◆ lcl_GetDistance()

static SwTwips lcl_GetDistance ( SwTableBox pBox,
bool  bLeft 
)
static

◆ lcl_GetLineWidth()

static sal_uInt16 lcl_GetLineWidth ( const FndLine_ rLine)
static

Definition at line 1704 of file tblrwcl.cxx.

References FndLine_::GetBoxes(), and n.

Referenced by SwTable::MakeCopy().

◆ lcl_InsCol()

static void lcl_InsCol ( FndLine_ pFndLn,
CpyPara &  rCpyPara,
sal_uInt16  nCpyCnt,
bool  bBehind 
)
static

◆ lcl_LastBoxSetWidth()

static void lcl_LastBoxSetWidth ( SwTableBoxes rBoxes,
const tools::Long  nOffset,
bool  bFirst,
SwShareBoxFormats rShareFormats 
)
static

◆ lcl_LastBoxSetWidthLine()

static void lcl_LastBoxSetWidthLine ( SwTableLines rLines,
const tools::Long  nOffset,
bool  bFirst,
SwShareBoxFormats rShareFormats 
)
static

Definition at line 637 of file tblrwcl.cxx.

References lcl_LastBoxSetWidth().

Referenced by DeleteBox_(), and lcl_LastBoxSetWidth().

◆ lcl_Merge_MoveBox()

static void lcl_Merge_MoveBox ( FndBox_ rFndBox,
InsULPara *const  pULPara 
)
static

◆ lcl_Merge_MoveLine()

static void lcl_Merge_MoveLine ( FndLine_ rFndLine,
InsULPara *const  pULPara 
)
static

◆ lcl_SaveUpperLowerBorder()

static void lcl_SaveUpperLowerBorder ( SwTable rTable,
const SwTableBox rBox,
SwShareBoxFormats rShareFormats,
SwSelBoxes pAllDelBoxes = nullptr,
size_t *const  pCurPos = nullptr 
)
static

◆ lcl_SetOtherBoxWidth()

static bool lcl_SetOtherBoxWidth ( SwTableLine pLine,
CR_SetBoxWidth &  rParam,
SwTwips  nDist,
bool  bCheck 
)
static

◆ lcl_SetOtherLineHeight()

static bool lcl_SetOtherLineHeight ( SwTableLine pLine,
const CR_SetLineHeight &  rParam,
SwTwips  nDist,
bool  bCheck 
)
static

◆ lcl_SetSelBoxWidth()

static bool lcl_SetSelBoxWidth ( SwTableLine pLine,
CR_SetBoxWidth &  rParam,
SwTwips  nDist,
bool  bCheck 
)
static

◆ lcl_SetSelLineHeight()

static bool lcl_SetSelLineHeight ( SwTableLine pLine,
const CR_SetLineHeight &  rParam,
SwTwips  nDist,
bool  bCheck 
)
static

Definition at line 2951 of file tblrwcl.cxx.

References CalcRowRstHeight(), GetRowFrame(), ROWFUZZY, and SetLineHeight().

Referenced by SwTable::SetRowHeight().

◆ SetLineHeight()

static void SetLineHeight ( SwTableLine rLine,
SwTwips  nOldHeight,
SwTwips  nNewHeight,
bool  bMinSize 
)
static

◆ sw_LineSetHeadCondColl()

void sw_LineSetHeadCondColl ( const SwTableLine pLine)