LibreOffice Module sw (master)  1
Classes | Macros | Typedefs | Functions
tblrwcl.cxx File Reference
#include <memory>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <hintids.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/protitem.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 <cntfrm.hxx>
#include <docsh.hxx>
#include <fesh.hxx>
#include <tabfrm.hxx>
#include <frmatr.hxx>
#include <frmtool.hxx>
#include <pam.hxx>
#include <swtable.hxx>
#include <ndtxt.hxx>
#include <tblafmt.hxx>
#include <tblsel.hxx>
#include <fldbas.hxx>
#include <swundo.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.

Classes

struct  CpyTabFrame
 
struct  CR_SetBoxWidth
 
struct  CR_SetLineHeight
 
struct  CpyPara
 
struct  InsULPara
 

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< CpyTabFrameCpyTabFrames
 

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 void lcl_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 long nOffset, bool bFirst, SwShareBoxFormats &rShareFormats)
 
static void lcl_LastBoxSetWidthLine (SwTableLines &rLines, const 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)
 
static void lcl_CopyLineToDoc (const FndLine_ &rFndLine, 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

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

Definition at line 73 of file tblrwcl.cxx.

Referenced by SwTable::DeleteSel().

#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:2546

Definition at line 139 of file tblrwcl.cxx.

Referenced by SwTable::InsertCol(), SwTable::InsertRow_(), SwTable::OldMerge(), SwTable::OldSplitRow(), SwTable::SetColWidth(), and SwTable::SplitCol().

#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" ); \
} \
} \
} \
}
int i
SwRowFrame is one table row in the document layout.
Definition: rowfrm.hxx:28

Definition at line 146 of file tblrwcl.cxx.

Referenced by SwTable::DeleteSel(), SwTable::InsertCol(), SwTable::InsertRow_(), SwTable::MakeCopy(), SwTable::OldMerge(), SwTable::OldSplitRow(), SwTable::SetColWidth(), SwTable::SetRowHeight(), and SwTable::SplitCol().

#define COLFUZZY   20
#define ROWFUZZY   10

Definition at line 70 of file tblrwcl.cxx.

Referenced by lcl_SetSelLineHeight(), and SetLineHeight().

Typedef Documentation

Definition at line 199 of file tblrwcl.cxx.

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

Definition at line 135 of file tblrwcl.cxx.

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

Definition at line 197 of file tblrwcl.cxx.

Function Documentation

void CheckBoxWidth ( const SwTableLine rLine,
SwTwips  nSize 
)

Definition at line 2546 of file tblrwcl.cxx.

References CheckBoxWidth(), COLFUZZY, and SwTableLine::GetTabBoxes().

Referenced by CheckBoxWidth(), and SwTable::SetTabCols().

void DeleteBox_ ( SwTable rTable,
SwTableBox pBox,
SwUndo pUndo,
bool  bCalcNewSize,
const bool  bCorrBorder,
SwShareBoxFormats pShareFormats 
)
static SwRowFrame* GetRowFrame ( SwTableLine rLine)
static
static void lcl_AjustLines ( SwTableLine pLine,
CR_SetBoxWidth rParam 
)
static
static void lcl_BoxSetHeadCondColl ( const SwTableBox pBox)
static
static void lcl_CalcNewWidths ( const FndLines_t rFndLines,
CpyPara rPara 
)
static
static void lcl_CalcWidth ( SwTableBox pBox)
static
static void lcl_CheckRowSpan ( SwTable rTable)
static
static void lcl_CopyBoxToDoc ( FndBox_ const &  rFndBox,
CpyPara *const  pCpyPara 
)
static

Definition at line 1769 of file tblrwcl.cxx.

References CpyPara::bCpyContent, o3tl::sorted_vector< Value, Compare, Find, class >::begin(), SwTableBox::ClaimFrameFormat(), SwFormatFrameSize::Clone(), SwFormat::CopyAttrs(), sw::DocumentContentOperationsManager::CopyWithFlyInFly(), SwNodes::Delete(), o3tl::sorted_vector< Value, Compare, Find, class >::end(), SwNode::EndOfSectionNode(), SwDoc::GetAttrPool(), SwFormat::GetAttrSet(), FndBox_::GetBox(), SwDoc::GetDfltTextFormatColl(), SwFormat::GetDoc(), SwDoc::GetDocumentContentOperationsManager(), SwTableBox::GetFrameFormat(), SwFormat::GetFrameSize(), FndBox_::GetLines(), SvNumberFormatter::GetMergeFormatIndex(), SwDoc::GetNodes(), SwDoc::GetNumberFormatter(), SwTableBox::getRowSpan(), SwTableBox::GetSttNd(), SwTableLine::GetTabBoxes(), SwTableNode::GetTable(), GetValue, SvxSizeItem::GetWidth(), SvNumberFormatter::HasMergeFormatTable(), SwNodes::InsBoxen(), o3tl::sorted_vector< Value, Compare, Find, class >::insert(), SwTable::IsNewModel(), lcl_CopyLineToDoc(), o3tl::sorted_vector< Value, Compare, Find, class >::lower_bound(), SwDoc::MakeTableBoxFormat(), CpyPara::nBoxIdx, CpyPara::nInsPos, CpyPara::nLnIdx, CpyPara::nNewSize, CpyPara::nOldSize, CpyPara::pDoc, CpyPara::pInsLine, CpyTabFrame::pNewFrameFormat, CpyPara::pTableNd, CpyPara::pWidths, RES_BOXATR_FORMAT, RES_BOXATR_FORMULA, RES_BOXATR_VALUE, SwFormat::ResetFormatAttr(), CpyPara::rTabFrameArr, SwTableBox::setDummyFlag(), SwFormat::SetFormatAttr(), and SwTableBox::setRowSpan().

Referenced by lcl_CopyLineToDoc().

static void lcl_CopyCol ( FndBox_ rFndBox,
CpyPara *const  pCpyPara 
)
static
static void lcl_CopyLineToDoc ( FndLine_ const &  rpFndLn,
CpyPara *const  pCpyPara 
)
static
static void lcl_CopyLineToDoc ( const FndLine_ rFndLine,
CpyPara *const  pCpyPara 
)
static
static void lcl_CopyRow ( FndLine_ rFndLine,
CpyPara *const  pCpyPara 
)
static
static void lcl_CpyBoxes ( sal_uInt16  nStt,
sal_uInt16  nEnd,
SwTableBoxes rBoxes,
SwTableLine pInsLine 
)
static

Definition at line 1283 of file tblrwcl.cxx.

References SwTableLine::GetTabBoxes(), and nPos.

Referenced by lcl_Merge_MoveBox(), and lcl_Merge_MoveLine().

static void lcl_CpyLines ( sal_uInt16  nStt,
sal_uInt16  nEnd,
SwTableLines rLines,
SwTableBox pInsBox,
sal_uInt16  nPos = USHRT_MAX 
)
static
static SwTableBox* lcl_FndNxtPrvDelBox ( const SwTableLines rTableLns,
SwTwips  nBoxStt,
SwTwips  nBoxWidth,
sal_uInt16  nLinePos,
bool  bNxt,
SwSelBoxes pAllDelBoxes,
size_t *const  pCurPos 
)
static
static sal_uInt16 lcl_GetBoxOffset ( const FndBox_ rBox)
static
static SwTwips lcl_GetDistance ( SwTableBox pBox,
bool  bLeft 
)
static
static sal_uInt16 lcl_GetLineWidth ( const FndLine_ rLine)
static

Definition at line 1672 of file tblrwcl.cxx.

References FndLine_::GetBoxes().

Referenced by SwTable::MakeCopy().

static void lcl_InsCol ( FndLine_ pFndLn,
CpyPara rCpyPara,
sal_uInt16  nCpyCnt,
bool  bBehind 
)
static
static void lcl_LastBoxSetWidth ( SwTableBoxes rBoxes,
const long  nOffset,
bool  bFirst,
SwShareBoxFormats rShareFormats 
)
static
static void lcl_LastBoxSetWidthLine ( SwTableLines rLines,
const long  nOffset,
bool  bFirst,
SwShareBoxFormats rShareFormats 
)
static

Definition at line 612 of file tblrwcl.cxx.

References lcl_LastBoxSetWidth().

Referenced by DeleteBox_(), and lcl_LastBoxSetWidth().

static void lcl_Merge_MoveBox ( FndBox_ rFndBox,
InsULPara *const  pULPara 
)
static
static void lcl_Merge_MoveLine ( FndLine_ rFndLine,
InsULPara *const  pULPara 
)
static
static void lcl_SaveUpperLowerBorder ( SwTable rTable,
const SwTableBox rBox,
SwShareBoxFormats rShareFormats,
SwSelBoxes pAllDelBoxes = nullptr,
size_t *const  pCurPos = nullptr 
)
static
static bool lcl_SetOtherBoxWidth ( SwTableLine pLine,
CR_SetBoxWidth rParam,
SwTwips  nDist,
bool  bCheck 
)
static
static bool lcl_SetOtherLineHeight ( SwTableLine pLine,
const CR_SetLineHeight rParam,
SwTwips  nDist,
bool  bCheck 
)
static
static bool lcl_SetSelBoxWidth ( SwTableLine pLine,
CR_SetBoxWidth rParam,
SwTwips  nDist,
bool  bCheck 
)
static
static bool lcl_SetSelLineHeight ( SwTableLine pLine,
const CR_SetLineHeight rParam,
SwTwips  nDist,
bool  bCheck 
)
static
static void SetLineHeight ( SwTableLine rLine,
SwTwips  nOldHeight,
SwTwips  nNewHeight,
bool  bMinSize 
)
static
void sw_LineSetHeadCondColl ( const SwTableLine pLine)