21#include <com/sun/star/table/XMergeableCell.hpp>
26#include <libxml/xmlwriter.h>
30#include <tablemodel.hxx>
37using ::editeng::SvxBorderLine;
51constexpr OUStringLiteral
gsSize( u
"Size" );
54: mxTable(
std::move( xTableModel ))
72 if( xCell.is() && !xCell->isMerged() )
77 sal_Int32 nRowSpan = std::max( xCell->getRowSpan(), sal_Int32(1) );
78 while( nRowSpan && (aPos.
mnRow < nRowCount) )
80 if(
static_cast<sal_Int32
>(
maRows.size()) <= aPos.
mnRow )
88 sal_Int32 nColSpan = std::max( xCell->getColumnSpan(), sal_Int32(1) );
89 while( nColSpan && (aPos.
mnCol < nColCount ) )
112 if( xCell.is() && !xCell->isMerged() &&
isValid(rPos) )
115 const bool bRTL = (
mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
157 return maRows[nRow].mnSize;
174 for ( sal_uInt32 nRow = 0; nRow < static_cast<sal_uInt32>(
maRows.size()); ++nRow )
180 sal_Int32 nSpannedColumn = nColumn;
181 bool bFindSpan =
true;
185 if ( nSpannedColumn < nColumn )
189 if ( xCell.is() && !xCell->isMerged()
190 && (xCell->getColumnSpan() == 1 || nSpannedColumn < nColumn) )
192 nWish += xCell->calcPreferredWidth(aSize);
195 else if ( xCell.is() && xCell->isMerged()
196 && nColumn == nSpannedColumn
200 bFindSpan = xCell.is() && !xCell->isMerged();
204 nRet = std::max( nRet, nWish );
214 if( (nEdgeX >= 0) && (nEdgeX < sal::static_int_cast<sal_Int32>(rMap.size())) &&
215 (nEdgeY >= 0) && (nEdgeY < sal::static_int_cast<sal_Int32>(rMap[nEdgeX].size())) )
217 return rMap[nEdgeX][nEdgeY] !=
nullptr;
221 OSL_FAIL(
"sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
231 SvxBorderLine* pLine =
nullptr;
235 if( (nEdgeX >= 0) && (nEdgeX < sal::static_int_cast<sal_Int32>(rMap.size())) &&
236 (nEdgeY >= 0) && (nEdgeY < sal::static_int_cast<sal_Int32>(rMap[nEdgeX].size())) )
238 pLine = rMap[nEdgeX][nEdgeY];
244 OSL_FAIL(
"sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
252 std::vector<EdgeInfo> aReturn;
253 sal_Int32 nRowSize = sal_Int32(
maRows.size());
254 for (sal_Int32
i = 0;
i <= nRowSize;
i++)
256 sal_Int32 nEdgeMin = 0;
257 sal_Int32 nEdgeMax = 0;
261 aReturn.emplace_back(
i, nEdge, nEdgeMin, nEdgeMax);
268 std::vector<EdgeInfo> aReturn;
269 sal_Int32 nColumnSize = sal_Int32(
maColumns.size());
270 for (sal_Int32
i = 0;
i <= nColumnSize;
i++)
272 sal_Int32 nEdgeMin = 0;
273 sal_Int32 nEdgeMax = 0;
277 aReturn.emplace_back(
i, nEdge, nEdgeMin, nEdgeMax);
286 if( (nEdgeY >= 0) && (nEdgeY <= nRowCount ) )
287 nRet =
maRows[std::min(
static_cast<sal_Int32
>(nEdgeY),nRowCount-1)].mnPos;
289 if( nEdgeY == nRowCount )
290 nRet +=
maRows[nEdgeY - 1].mnSize;
294 if( (nEdgeY > 0) && (nEdgeY <= nRowCount ) )
296 *pnMin =
maRows[nEdgeY-1].mnPos + 600;
317 if( (nEdgeX >= 0) && (nEdgeX <= nColCount ) )
318 nRet =
maColumns[std::min(
static_cast<sal_Int32
>(nEdgeX),nColCount-1)].mnPos;
320 const bool bRTL = (
mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
323 if( (nEdgeX >= 0) && (nEdgeX < nColCount) )
328 if( nEdgeX == nColCount )
337 if( nEdgeX < nColCount )
342 if( (nEdgeX > 0) && (nEdgeX <= nColCount ) )
357 if( (nEdgeX >= 0) && (nEdgeX < nColCount ) )
368 Reference< XMergeableCell > xCell( xTable->getCellByPosition( nCellX, nCellY ), UNO_QUERY );
369 if( xCell.is() && !xCell->isMerged() )
371 const sal_Int32 nRight = xCell->getColumnSpan() + nCellX;
372 const sal_Int32 nBottom = xCell->getRowSpan() + nCellY;
373 if( (nMergedX < nRight) && (nMergedY < nBottom) )
389 if( xTable.is() )
try
392 Reference< XMergeableCell > xCell( xTable->getCellByPosition( nMergedX, nMergedY ), UNO_QUERY_THROW );
393 if( !xCell->isMerged() )
396 bool bCheckVert =
true;
397 bool bCheckHorz =
true;
399 sal_Int32 nMinCol = 0;
400 sal_Int32 nMinRow = 0;
402 sal_Int32 nStep = 1,
i;
404 sal_Int32 nRow, nCol;
409 nRow = nMergedY - nStep;
410 if( nRow >= nMinRow )
413 for(
i = 0; (
i <= nStep) && (nCol >= nMinCol);
i++, nCol-- )
415 if(
checkMergeOrigin( xTable, nMergedX, nMergedY, nCol, nRow, bCheckVert ) )
417 rOriginX = nCol; rOriginY = nRow;
423 if( nCol == nMergedX )
443 nCol = nMergedX - nStep;
444 if( nCol >= nMinCol )
447 for(
i = 0; (
i < nStep) && (nRow >= nMinRow);
i++, nRow-- )
449 if(
checkMergeOrigin( xTable, nMergedX, nMergedY, nCol, nRow, bCheckHorz ) )
451 rOriginX = nCol; rOriginY = nRow;
457 if( nRow == nMergedY )
476 while( bCheckVert || bCheckHorz );
494 OSL_FAIL(
"TableLayouter::getMinimumColumnWidth(), column out of range!" );
503 sal_Int32 nSafe = 100;
505 const std::size_t
nCount = rLayouts.size();
508 bool bConstrainsBroken =
false;
512 bConstrainsBroken =
false;
530 sal_Int32 nCurrentWidth = 0;
539 if( (nCurrentWidth != 0) && (nDistribute != 0) )
541 sal_Int32 nDistributed = nDistribute;
547 sal_Int32
n(nDistributed);
558 bConstrainsBroken =
true;
562 }
while( bConstrainsBroken && --nSafe );
584 std::vector<sal_Int32> aOptimalColumns;
586 static constexpr OUStringLiteral sOptimalSize(
u"OptimalSize");
588 if( sal::static_int_cast< sal_Int32 >(
maColumns.size() ) != nColCount )
591 Reference< XTableColumns > xCols(
mxTable->getColumns(), UNO_SET_THROW );
595 sal_Int32 nCurrentWidth = 0;
596 sal_Int32 nCol = 0, nRow = 0;
597 for( nCol = 0; nCol < nColCount; nCol++ )
599 sal_Int32 nMinWidth = 0;
601 bool bIsEmpty =
true;
603 for( nRow = 0; nRow < nRowCount; ++nRow )
606 if( xCell.is() && !xCell->isMerged() )
610 sal_Int32 nColSpan = xCell->getColumnSpan();
614 aMergedCells[nCol+nColSpan-1].push_back( xCell );
618 nMinWidth = std::max( nMinWidth, xCell->getMinimumWidth() );
631 sal_Int32 nColWidth = 0;
632 Reference< XPropertySet > xColSet( xCols->getByIndex( nCol ), UNO_QUERY_THROW );
633 bool bOptimal =
false;
634 xColSet->getPropertyValue( sOptimalSize ) >>= bOptimal;
637 aOptimalColumns.push_back(nCol);
641 xColSet->getPropertyValue(
gsSize ) >>= nColWidth;
644 maColumns[nCol].mnSize = std::max( nColWidth, nMinWidth);
651 if( !bFit && !aOptimalColumns.empty() && (nCurrentWidth < rArea.
getOpenWidth()) )
654 sal_Int32 nDistribute = nLeft / aOptimalColumns.size();
656 auto iter( aOptimalColumns.begin() );
657 while( iter != aOptimalColumns.end() )
659 sal_Int32 nOptCol = *iter++;
660 if( iter == aOptimalColumns.end() )
663 maColumns[nOptCol].mnSize += nDistribute;
664 nLeft -= nDistribute;
667 DBG_ASSERT( nLeft == 0,
"svx::TableLayouter::LayoutTableWidtht(), layouting failed!" );
671 for( nCol = 1; nCol < nColCount; ++nCol )
673 bool bChanges =
false;
675 const sal_Int32 nOldSize =
maColumns[nCol].mnSize;
677 for(
const CellRef& xCell : aMergedCells[nCol] )
679 sal_Int32 nMinWidth = xCell->getMinimumWidth();
681 for( sal_Int32 nMCol = nCol - xCell->getColumnSpan() + 1; (nMCol > 0) && (nMCol < nCol); ++nMCol )
684 if( nMinWidth >
maColumns[nCol].mnMinSize )
705 sal_Int32 nNewWidth = 0;
707 const bool bRTL = (
mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB);
709 while( coliter.
next(nCol ) )
715 Reference< XPropertySet > xColSet( xCols->getByIndex(nCol), UNO_QUERY_THROW );
733 Reference< XTableRows > xRows(
mxTable->getRows() );
736 std::vector<sal_Int32> aOptimalRows;
738 static constexpr OUStringLiteral sOptimalSize(
u"OptimalSize");
742 sal_Int32 nCurrentHeight = 0;
743 sal_Int32 nCol, nRow;
744 for( nRow = 0; nRow < nRowCount; ++nRow )
746 sal_Int32 nMinHeight = 0;
748 bool bIsEmpty =
true;
750 for( nCol = 0; nCol < nColCount; ++nCol )
753 if( xCell.is() && !xCell->isMerged() )
757 sal_Int32 nRowSpan = xCell->getRowSpan();
761 aMergedCells[nRow+nRowSpan-1].push_back( xCell );
765 nMinHeight = std::max( nMinHeight, xCell->getMinimumHeight() );
770 maRows[nRow].mnMinSize = nMinHeight;
778 sal_Int32 nRowHeight = 0;
779 Reference<XPropertySet> xRowSet(xRows->getByIndex(nRow), UNO_QUERY_THROW);
781 bool bOptimal =
false;
782 xRowSet->getPropertyValue( sOptimalSize ) >>= bOptimal;
785 aOptimalRows.push_back( nRow );
789 xRowSet->getPropertyValue(
gsSize ) >>= nRowHeight;
792 maRows[nRow].mnSize = nRowHeight;
795 maRows[nRow].mnSize = nMinHeight;
802 if( !bFit && !aOptimalRows.empty() && (nCurrentHeight < rArea.
getOpenHeight()) )
805 sal_Int32 nDistribute = nLeft / aOptimalRows.size();
807 auto iter( aOptimalRows.begin() );
808 while( iter != aOptimalRows.end() )
810 sal_Int32 nOptRow = *iter++;
811 if( iter == aOptimalRows.end() )
814 maRows[nOptRow].mnSize += nDistribute;
815 nLeft -= nDistribute;
819 DBG_ASSERT( nLeft == 0,
"svx::TableLayouter::LayoutTableHeight(), layouting failed!" );
823 for( nRow = 1; nRow < nRowCount; ++nRow )
825 bool bChanges =
false;
826 sal_Int32 nOldSize =
maRows[nRow].mnSize;
828 for(
const CellRef& xCell : aMergedCells[nRow] )
830 sal_Int32 nMinHeight = xCell->getMinimumHeight();
832 for( sal_Int32 nMRow = nRow - xCell->getRowSpan() + 1; (nMRow > 0) && (nMRow < nRow); ++nMRow )
833 nMinHeight -=
maRows[nMRow].mnSize;
835 if( nMinHeight >
maRows[nRow].mnMinSize )
836 maRows[nRow].mnMinSize = nMinHeight;
840 maRows[nRow].mnSize = nMinHeight;
853 sal_Int32 nNewHeight = 0;
854 for( nRow = 0; nRow < nRowCount; ++nRow )
856 maRows[nRow].mnPos = nNewHeight;
861 Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW );
878 const sal_Int32 nRowCount =
mxTable->getRowCount();
879 const sal_Int32 nColCount =
mxTable->getColumnCount();
883 if(
static_cast< sal_Int32
>(
maRows.size() ) != nRowCount )
884 maRows.resize( nRowCount );
886 for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
889 if(
static_cast< sal_Int32
>(
maColumns.size() ) != nColCount )
892 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
923 aCellRect.
Move( rRectangle.
Left(), rRectangle.
Top() );
924 xCell->setCellRect( aCellRect );
949 if (!pThis || ((pThis == &
gEmptyBorder) && (pOther !=
nullptr)))
954 sal_uInt16 nThisSize = pThis->GetScaledWidth();
955 sal_uInt16 nOtherSize = pOther->GetScaledWidth();
957 if (nThisSize > nOtherSize)
960 else if (nThisSize < nOtherSize)
966 if ( pOther->GetInWidth() && !pThis->GetInWidth() )
970 else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
988 if( (nCol >= 0) && (nCol < sal::static_int_cast<sal_Int32>(rMap.size())) &&
989 (nRow >= 0) && (nRow < sal::static_int_cast<sal_Int32>(rMap[nCol].size())) )
991 SvxBorderLine *pOld = rMap[nCol][nRow];
1000 rMap[nCol][nRow] = pNew;
1005 OSL_FAIL(
"sdr::table::TableLayouter::SetBorder(), invalid border!" );
1017 const sal_Int32 nColCount = rMap.size();
1019 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
1021 const sal_Int32 nRowCount = rMap[nCol].size();
1022 for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
1024 SvxBorderLine* pLine = rMap[nCol][nRow];
1030 rMap[nCol][nRow] =
nullptr;
1049 if( sal::static_int_cast<sal_Int32>(rMap.size()) != nColCount )
1050 rMap.resize( nColCount );
1052 for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
1054 if( sal::static_int_cast<sal_Int32>(rMap[nCol].
size()) != nRowCount )
1055 rMap[nCol].resize( nRowCount );
1078 OSL_ENSURE(pThisAttr,
"sdr::table::TableLayouter::UpdateBorderLayout(), no border attribute?");
1083 const sal_Int32 nLastRow = xCell->getRowSpan() + aPos.
mnRow;
1084 const sal_Int32 nLastCol = xCell->getColumnSpan() + aPos.
mnCol;
1086 for( sal_Int32 nRow = aPos.
mnRow; nRow < nLastRow; nRow++ )
1092 for( sal_Int32 nCol = aPos.
mnCol; nCol < nLastCol; nCol++ )
1103 sal_Int32 nFirstCol,
1105 const bool bOptimize,
1106 const bool bMinimize )
1114 Reference< XTableColumns > xCols(
mxTable->getColumns(), UNO_SET_THROW );
1115 const Size aSize(0xffffff, 0xffffff);
1118 if ( (bOptimize || bMinimize) && nFirstCol == nLastCol )
1123 Reference< XPropertySet > xColSet( xCols->getByIndex(nFirstCol), UNO_QUERY_THROW );
1124 xColSet->setPropertyValue(
gsSize,
Any( nWish ) );
1131 if( (nFirstCol < 0) || (nFirstCol>= nLastCol) || (nLastCol >= nColCount) )
1134 sal_Int32 nAllWidth = 0;
1136 sal_Int32 nUnused = 0;
1137 std::vector<sal_Int32> aWish(nColCount);
1139 for( sal_Int32 nCol = nFirstCol; nCol <= nLastCol; ++nCol )
1142 const sal_Int32 nEqualWidth = nAllWidth / (nLastCol-nFirstCol+1);
1145 if ( bMinimize || bOptimize )
1147 for( sal_Int32 nCol = nFirstCol; nCol <= nLastCol; ++nCol )
1149 const sal_Int32
nIndex = nCol - nFirstCol;
1151 fAllWish += aWish[
nIndex];
1152 if ( aWish[
nIndex] < nEqualWidth )
1153 nUnused += nEqualWidth - aWish[
nIndex];
1156 const sal_Int32 nDistributeExcess = nAllWidth - fAllWish;
1158 sal_Int32 nWidth = nEqualWidth;
1159 for( sal_Int32 nCol = nFirstCol; nCol <= nLastCol; ++nCol )
1161 if ( !bMinimize && nCol == nLastCol )
1163 else if ( (bMinimize || bOptimize) && fAllWish )
1167 const sal_Int32
nIndex = nCol - nFirstCol;
1168 if ( aWish[
nIndex] > nEqualWidth + nUnused )
1170 nWidth = nEqualWidth + nUnused;
1176 if ( aWish[
nIndex] > nEqualWidth )
1177 nUnused -= aWish[
nIndex] - nEqualWidth;
1179 if ( !bMinimize && nDistributeExcess > 0 )
1180 nWidth += nWidth / fAllWish * nDistributeExcess;
1184 Reference< XPropertySet > xColSet( xCols->getByIndex( nCol ), UNO_QUERY_THROW );
1185 xColSet->setPropertyValue(
gsSize,
Any( nWidth ) );
1187 nAllWidth -= nWidth;
1200 sal_Int32 nFirstRow,
1202 const bool bOptimize,
1203 const bool bMinimize )
1210 const sal_Int32 nRowCount =
mxTable->getRowCount();
1211 Reference< XTableRows > xRows(
mxTable->getRows(), UNO_SET_THROW );
1212 sal_Int32 nMinHeight = 0;
1215 if ( bMinimize && nFirstRow == nLastRow )
1217 const sal_Int32 nWish = std::max(
maRows[nFirstRow].mnMinSize, nMinHeight );
1220 Reference< XPropertySet > xRowSet( xRows->getByIndex( nFirstRow ), UNO_QUERY_THROW );
1221 xRowSet->setPropertyValue(
gsSize,
Any( nWish ) );
1227 if( (nFirstRow < 0) || (nFirstRow>= nLastRow) || (nLastRow >= nRowCount) )
1230 sal_Int32 nAllHeight = 0;
1231 sal_Int32 nMaxHeight = 0;
1233 for( sal_Int32 nRow = nFirstRow; nRow <= nLastRow; ++nRow )
1235 nMinHeight = std::max(
maRows[nRow].mnMinSize, nMinHeight );
1236 nMaxHeight = std::max(
maRows[nRow].
mnSize, nMaxHeight );
1237 nAllHeight +=
maRows[nRow].mnSize;
1240 const sal_Int32 nRows = nLastRow-nFirstRow+1;
1241 sal_Int32 nHeight = nAllHeight / nRows;
1243 if ( !bMinimize && nHeight < nMaxHeight )
1247 sal_Int32 nNeededHeight = nRows * nMaxHeight;
1249 nHeight = nMaxHeight;
1250 nAllHeight = nRows * nMaxHeight;
1252 else if ( nHeight < nMinHeight )
1254 sal_Int32 nNeededHeight = nRows * nMinHeight;
1256 nHeight = nMinHeight;
1257 nAllHeight = nRows * nMinHeight;
1261 for( sal_Int32 nRow = nFirstRow; nRow <= nLastRow; ++nRow )
1264 nHeight =
maRows[nRow].mnMinSize;
1265 else if ( nRow == nLastRow )
1266 nHeight = nAllHeight;
1268 Reference< XPropertySet > xRowSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
1269 xRowSet->setPropertyValue(
gsSize,
Any( nHeight ) );
1271 nAllHeight -= nHeight;
1284 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"TableLayouter"));
1286 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"columns"));
1288 rColumn.dumpAsXml(pWriter);
1289 (void)xmlTextWriterEndElement(pWriter);
1291 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"rows"));
1292 for (
const auto& rRow :
maRows)
1293 rRow.dumpAsXml(pWriter);
1294 (void)xmlTextWriterEndElement(pWriter);
1296 (void)xmlTextWriterEndElement(pWriter);
1301 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"TableLayouter_Layout"));
1303 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"pos"), BAD_CAST(OString::number(
mnPos).getStr()));
1304 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"size"), BAD_CAST(OString::number(
mnSize).getStr()));
1305 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"minSize"), BAD_CAST(OString::number(
mnMinSize).getStr()));
1307 (void)xmlTextWriterEndElement(pWriter);
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
bool isValid(const CellPos &rPos) const
void DistributeColumns(::tools::Rectangle &rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol, const bool bOptimize, const bool bMinimize)
bool isEdgeVisible(sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal) const
checks if the given edge is visible.
TableLayouter(TableModelRef xTableModel)
BorderLineMap maVerticalBorders
void LayoutTableWidth(::tools::Rectangle &rArea, bool bFit)
std::vector< EdgeInfo > getVerticalEdges()
::sal_Int32 getRowCount() const
sal_Int32 getVerticalEdge(int nEdgeX, sal_Int32 *pnMin, sal_Int32 *pnMax)
BorderLineMap maHorizontalBorders
static sal_Int32 distribute(LayoutVector &rLayouts, sal_Int32 nDistribute)
void dumpAsXml(xmlTextWriterPtr pWriter) const
void DistributeRows(::tools::Rectangle &rArea, sal_Int32 nFirstRow, sal_Int32 nLastRow, const bool bOptimize, const bool bMinimize)
sal_Int32 getColumnWidth(sal_Int32 nColumn) const
bool isValidRow(sal_Int32 nRow) const
sal_Int32 getMinimumColumnWidth(sal_Int32 nColumn)
sal_Int32 getHorizontalEdge(int nEdgeY, sal_Int32 *pnMin, sal_Int32 *pnMax)
basegfx::B2ITuple getCellSize(const CellRef &xCell, const CellPos &rPos) const
void LayoutTable(::tools::Rectangle &rRectangle, bool bFitWidth, bool bFitHeight)
try to fit the table into the given rectangle.
void LayoutTableHeight(::tools::Rectangle &rArea, bool bFit)
CellRef getCell(const CellPos &rPos) const
static bool HasPriority(const editeng::SvxBorderLine *pThis, const editeng::SvxBorderLine *pOther)
editeng::SvxBorderLine * getBorderLine(sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal) const
returns the requested borderline in rpBorderLine or a null pointer if there is no border at this edge
void UpdateBorderLayout()
std::vector< Layout > LayoutVector
void SetBorder(sal_Int32 nCol, sal_Int32 nRow, bool bHorizontal, const editeng::SvxBorderLine *pLine)
void updateCells(::tools::Rectangle const &rRectangle)
sal_Int32 getRowHeight(sal_Int32 nRow) const
void ResizeBorderLayout()
std::vector< EdgeInfo > getHorizontalEdges()
sal_Int32 calcPreferredColumnWidth(sal_Int32 nColumn, Size aSize) const
bool isValidColumn(sal_Int32 nColumn) const
::sal_Int32 getColumnCount() const
bool getCellArea(const CellRef &xCell, const CellPos &rPos, basegfx::B2IRectangle &rArea) const
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
struct _xmlTextWriter * xmlTextWriterPtr
std::enable_if< std::is_signed< T >::value, bool >::type checked_add(T a, T b, T &result)
std::enable_if< std::is_signed< T >::value, bool >::type checked_multiply(T a, T b, T &result)
constexpr T saturating_add(T a, T b)
std::enable_if< std::is_signed< T >::value, bool >::type checked_sub(T a, T b, T &result)
static SvxBorderLine gEmptyBorder
bool findMergeOrigin(const TableModelRef &xTable, sal_Int32 nMergedX, sal_Int32 nMergedY, sal_Int32 &rOriginX, sal_Int32 &rOriginY)
returns true if the cell(nMergedX,nMergedY) is merged with other cells.
std::vector< CellRef > MergeableCellVector
std::vector< BorderLineVector > BorderLineMap
std::vector< MergeableCellVector > MergeVector
static bool checkMergeOrigin(const TableModelRef &xTable, sal_Int32 nMergedX, sal_Int32 nMergedY, sal_Int32 nCellX, sal_Int32 nCellY, bool &bRunning)
constexpr OUStringLiteral gsSize(u"Size")
void dumpAsXml(xmlTextWriterPtr pWriter) const
constexpr TypedWhichId< SvxBoxItem > SDRATTR_TABLE_BORDER(SDRATTR_TABLE_FIRST+0)