LibreOffice Module sw (master) 1
Macros | Functions
ndtbl1.cxx File Reference
#include <hintids.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <fesh.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtrowsplt.hxx>
#include <tabcol.hxx>
#include <frmatr.hxx>
#include <cellfrm.hxx>
#include <tabfrm.hxx>
#include <cntfrm.hxx>
#include <txtfrm.hxx>
#include <svx/svxids.hrc>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentState.hxx>
#include <IDocumentContentOperations.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <pam.hxx>
#include <swcrsr.hxx>
#include <viscrs.hxx>
#include <swtable.hxx>
#include <htmltbl.hxx>
#include <tblsel.hxx>
#include <swtblfmt.hxx>
#include <ndindex.hxx>
#include <undobj.hxx>
#include <calbck.hxx>
#include <UndoTable.hxx>
#include <o3tl/enumrange.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <redline.hxx>
Include dependency graph for ndtbl1.cxx:

Go to the source code of this file.

Macros

#define COLFUZZY   20L
 

Functions

static bool IsSame (tools::Long nA, tools::Long nB)
 
static void lcl_GetStartEndCell (const SwCursor &rCursor, SwLayoutFrame *&prStart, SwLayoutFrame *&prEnd)
 
static bool lcl_GetBoxSel (const SwCursor &rCursor, SwSelBoxes &rBoxes, bool bAllCursor=false)
 
static void InsertLine (std::vector< SwTableLine * > &rLineArr, SwTableLine *pLine)
 
static bool lcl_IsAnLower (const SwTableLine *pLine, const SwTableLine *pAssumed)
 
static bool FindLine_ (FndLine_ &rLine, LinesAndTable *pPara)
 
static bool FindBox_ (FndBox_ &rBox, LinesAndTable *pPara)
 
static void lcl_CollectLines (std::vector< SwTableLine * > &rArr, const SwCursor &rCursor, bool bRemoveLines)
 
static void lcl_ProcessRowAttr (std::vector< std::unique_ptr< SwTableFormatCmp > > &rFormatCmp, SwTableLine *pLine, const SfxPoolItem &rNew)
 
static void lcl_ProcessBoxSize (std::vector< std::unique_ptr< SwTableFormatCmp > > &rFormatCmp, SwTableBox *pBox, const SwFormatFrameSize &rNew)
 
static void lcl_ProcessRowSize (std::vector< std::unique_ptr< SwTableFormatCmp > > &rFormatCmp, SwTableLine *pLine, const SwFormatFrameSize &rNew)
 
static void InsertCell (std::vector< SwCellFrame * > &rCellArr, SwCellFrame *pCellFrame)
 
static void lcl_CollectCells (std::vector< SwCellFrame * > &rArr, const SwRect &rUnion, SwTabFrame *pTab)
 
static void lcl_SetLineStyle (SvxBorderLine *pToSet, const Color *pColor, const SvxBorderLine *pBorderLine)
 
static sal_uInt16 lcl_CalcCellFit (const SwLayoutFrame *pCell)
 
static void lcl_CalcSubColValues (std::vector< sal_uInt16 > &rToFill, const SwTabCols &rCols, const SwLayoutFrame *pCell, const SwLayoutFrame *pTab, bool bWishValues)
 
static void lcl_CalcColValues (std::vector< sal_uInt16 > &rToFill, const SwTabCols &rCols, const SwLayoutFrame *pStart, const SwLayoutFrame *pEnd, bool bWishValues)
 Retrieves new values to set the TabCols. More...
 

Macro Definition Documentation

◆ COLFUZZY

#define COLFUZZY   20L

Definition at line 61 of file ndtbl1.cxx.

Function Documentation

◆ FindBox_()

static bool FindBox_ ( FndBox_ rBox,
LinesAndTable *  pPara 
)
static

◆ FindLine_()

bool FindLine_ ( FndLine_ rLine,
LinesAndTable *  pPara 
)
static

Definition at line 235 of file ndtbl1.cxx.

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

Referenced by FindBox_().

◆ InsertCell()

static void InsertCell ( std::vector< SwCellFrame * > &  rCellArr,
SwCellFrame pCellFrame 
)
static

Definition at line 659 of file ndtbl1.cxx.

Referenced by lcl_CollectCells().

◆ InsertLine()

static void InsertLine ( std::vector< SwTableLine * > &  rLineArr,
SwTableLine pLine 
)
static

Definition at line 169 of file ndtbl1.cxx.

Referenced by FindBox_().

◆ IsSame()

static bool IsSame ( tools::Long  nA,
tools::Long  nB 
)
static

Definition at line 63 of file ndtbl1.cxx.

References abs(), and COLFUZZY.

Referenced by lcl_CalcColValues().

◆ lcl_CalcCellFit()

static sal_uInt16 lcl_CalcCellFit ( const SwLayoutFrame pCell)
static

◆ lcl_CalcColValues()

static void lcl_CalcColValues ( std::vector< sal_uInt16 > &  rToFill,
const SwTabCols rCols,
const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
bool  bWishValues 
)
static

Retrieves new values to set the TabCols.

We do not iterate over the TabCols' entries, but over the gaps that describe Cells. We set TabCol entries for which we did not calculate Cells to 0.

Parameters
bWishValues== true: We calculate the desired value of all affected Cells for the current Selection/current Cell. If more Cells are within a Column, the highest desired value is returned. We set TabCol entries for which we did not calculate Cells to 0.
bWishValues== false: The Selection is expanded vertically. We calculate the minimum value for every Column in the TabCols that intersects with the Selection.

Definition at line 1521 of file ndtbl1.cxx.

References Col, SwTabCols::Count(), SwFrame::FindTabFrame(), SwLayoutFrame::FirstCell(), SwFrameAreaDefinition::getFrameArea(), SwFrameAreaDefinition::getFramePrintArea(), SwTabCols::GetLeft(), SwRectFnSet::GetLeft(), SwTabCols::GetLeftMin(), SwFrame::GetNextLayoutLeaf(), SwTabCols::GetRight(), SwRectFnSet::GetRight(), SwSelUnion::GetTable(), SwSelUnion::GetUnion(), i, SwLayoutFrame::IsAnLower(), SwFrame::IsCellFrame(), IsFrameInTableSel(), SwFrame::IsRightToLeft(), IsSame(), lcl_CalcCellFit(), lcl_CalcSubColValues(), MakeSelUnions(), MINLAY, NONE, and SwRect::Width().

Referenced by SwDoc::AdjustCellWidth().

◆ lcl_CalcSubColValues()

static void lcl_CalcSubColValues ( std::vector< sal_uInt16 > &  rToFill,
const SwTabCols rCols,
const SwLayoutFrame pCell,
const SwLayoutFrame pTab,
bool  bWishValues 
)
static

◆ lcl_CollectCells()

static void lcl_CollectCells ( std::vector< SwCellFrame * > &  rArr,
const SwRect rUnion,
SwTabFrame pTab 
)
static

◆ lcl_CollectLines()

static void lcl_CollectLines ( std::vector< SwTableLine * > &  rArr,
const SwCursor rCursor,
bool  bRemoveLines 
)
static

◆ lcl_GetBoxSel()

static bool lcl_GetBoxSel ( const SwCursor rCursor,
SwSelBoxes rBoxes,
bool  bAllCursor = false 
)
static

◆ lcl_GetStartEndCell()

static void lcl_GetStartEndCell ( const SwCursor rCursor,
SwLayoutFrame *&  prStart,
SwLayoutFrame *&  prEnd 
)
static

◆ lcl_IsAnLower()

static bool lcl_IsAnLower ( const SwTableLine pLine,
const SwTableLine pAssumed 
)
static

Definition at line 175 of file ndtbl1.cxx.

References SwTableLine::GetUpper(), and SwTableBox::GetUpper().

Referenced by lcl_CollectLines().

◆ lcl_ProcessBoxSize()

static void lcl_ProcessBoxSize ( std::vector< std::unique_ptr< SwTableFormatCmp > > &  rFormatCmp,
SwTableBox pBox,
const SwFormatFrameSize rNew 
)
static

◆ lcl_ProcessRowAttr()

static void lcl_ProcessRowAttr ( std::vector< std::unique_ptr< SwTableFormatCmp > > &  rFormatCmp,
SwTableLine pLine,
const SfxPoolItem rNew 
)
static

◆ lcl_ProcessRowSize()

static void lcl_ProcessRowSize ( std::vector< std::unique_ptr< SwTableFormatCmp > > &  rFormatCmp,
SwTableLine pLine,
const SwFormatFrameSize rNew 
)
static

◆ lcl_SetLineStyle()

static void lcl_SetLineStyle ( SvxBorderLine *  pToSet,
const Color pColor,
const SvxBorderLine *  pBorderLine 
)
static

Definition at line 950 of file ndtbl1.cxx.

Referenced by SwDoc::SetTabLineStyle().