LibreOffice Module sw (master)  1
Classes | Macros | Functions
ndtbl1.cxx File Reference
#include <hintids.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <fesh.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtlsplt.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 <IDocumentLayoutAccess.hxx>
#include <pam.hxx>
#include <swcrsr.hxx>
#include <viscrs.hxx>
#include <swtable.hxx>
#include <htmltbl.hxx>
#include <tblsel.hxx>
#include <swtblfmt.hxx>
#include <docary.hxx>
#include <ndindex.hxx>
#include <undobj.hxx>
#include <calbck.hxx>
#include <UndoTable.hxx>
#include <o3tl/enumrange.hxx>
Include dependency graph for ndtbl1.cxx:

Go to the source code of this file.

Classes

class  SwTableFormatCmp
 
struct  LinesAndTable
 

Macros

#define COLFUZZY   20L
 

Functions

static bool IsSame (long nA, 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, bool bColumnWidth)
 Retrieves new values to set the TabCols. More...
 

Macro Definition Documentation

#define COLFUZZY   20L

Definition at line 59 of file ndtbl1.cxx.

Referenced by IsSame(), lcl_CalcCellFit(), and lcl_CalcSubColValues().

Function Documentation

static bool FindBox_ ( FndBox_ rBox,
LinesAndTable pPara 
)
static
bool FindLine_ ( FndLine_ rLine,
LinesAndTable pPara 
)
static

Definition at line 223 of file ndtbl1.cxx.

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

Referenced by FindBox_().

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

Definition at line 530 of file ndtbl1.cxx.

Referenced by lcl_CollectCells().

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

Definition at line 161 of file ndtbl1.cxx.

Referenced by CompareData::CheckRanges(), and FindBox_().

static bool IsSame ( long  nA,
long  nB 
)
static

Definition at line 61 of file ndtbl1.cxx.

References COLFUZZY.

Referenced by lcl_CalcColValues().

static sal_uInt16 lcl_CalcCellFit ( const SwLayoutFrame pCell)
static
static void lcl_CalcColValues ( std::vector< sal_uInt16 > &  rToFill,
const SwTabCols rCols,
const SwLayoutFrame pStart,
const SwLayoutFrame pEnd,
bool  bWishValues,
bool  bColumnWidth 
)
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: Calculate the desired width of the content The highest desired value is returned.
bWishValues== false: Calculate the minimum width of the content
bColumnWidth== false: We calculate the desired value of all affected Cells for the current Selection only.
bColumnWidth== true: The Selection is expanded vertically. We calculate the wish/minimum value for each cell in every Column that intersects with the Selection.

Definition at line 1383 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().

static void lcl_CalcSubColValues ( std::vector< sal_uInt16 > &  rToFill,
const SwTabCols rCols,
const SwLayoutFrame pCell,
const SwLayoutFrame pTab,
bool  bWishValues 
)
static
static void lcl_CollectCells ( std::vector< SwCellFrame * > &  rArr,
const SwRect rUnion,
SwTabFrame pTab 
)
static
static void lcl_CollectLines ( std::vector< SwTableLine * > &  rArr,
const SwCursor rCursor,
bool  bRemoveLines 
)
static
static bool lcl_GetBoxSel ( const SwCursor rCursor,
SwSelBoxes rBoxes,
bool  bAllCursor = false 
)
static
static void lcl_GetStartEndCell ( const SwCursor rCursor,
SwLayoutFrame *&  prStart,
SwLayoutFrame *&  prEnd 
)
static
static bool lcl_IsAnLower ( const SwTableLine pLine,
const SwTableLine pAssumed 
)
static

Definition at line 167 of file ndtbl1.cxx.

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

Referenced by lcl_CollectLines().

static void lcl_ProcessBoxSize ( std::vector< std::unique_ptr< SwTableFormatCmp >> &  rFormatCmp,
SwTableBox pBox,
const SwFormatFrameSize rNew 
)
static
static void lcl_ProcessRowAttr ( std::vector< std::unique_ptr< SwTableFormatCmp >> &  rFormatCmp,
SwTableLine pLine,
const SfxPoolItem rNew 
)
static
static void lcl_ProcessRowSize ( std::vector< std::unique_ptr< SwTableFormatCmp >> &  rFormatCmp,
SwTableLine pLine,
const SwFormatFrameSize rNew 
)
static
static void lcl_SetLineStyle ( SvxBorderLine *  pToSet,
const Color pColor,
const SvxBorderLine *  pBorderLine 
)
static

Definition at line 825 of file ndtbl1.cxx.

Referenced by SwDoc::SetTabLineStyle().