Lines Matching refs:nCount
67 …late< class Vec, class Iter > void remove_range( Vec& rVector, sal_Int32 nIndex, sal_Int32 nCount ) in remove_range() argument
70 if( nCount && (nIndex >= 0) && (nIndex < nSize) ) in remove_range()
72 if( (nIndex + nCount) >= nSize ) in remove_range()
82 if( nCount == 1 ) in remove_range()
90 while( nCount-- ) in remove_range()
101 …lass Iter, class Entry > sal_Int32 insert_range( Vec& rVector, sal_Int32 nIndex, sal_Int32 nCount ) in insert_range() argument
103 if( nCount ) in insert_range()
109 rVector.resize( nIndex + nCount ); in insert_range()
120 rVector.insert( aIter, nCount, aEmpty ); in insert_range()
240 void TableModel::UndoInsertRows( sal_Int32 nIndex, sal_Int32 nCount ) in UndoInsertRows() argument
245 remove_range<RowVector,RowVector::iterator>( maRows, nIndex, nCount ); in UndoInsertRows()
256 const sal_Int32 nCount = sal::static_int_cast< sal_Int32 >( aRows.size() ); in UndoRemoveRows() local
258 nIndex = insert_range<RowVector,RowVector::iterator,TableRowRef>( maRows, nIndex, nCount ); in UndoRemoveRows()
260 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in UndoRemoveRows()
269 void TableModel::UndoInsertColumns( sal_Int32 nIndex, sal_Int32 nCount ) in UndoInsertColumns() argument
274 remove_range<ColumnVector,ColumnVector::iterator>( maColumns, nIndex, nCount ); in UndoInsertColumns()
277 maRows[nRows]->removeColumns( nIndex, nCount ); in UndoInsertColumns()
289 const sal_Int32 nCount = sal::static_int_cast< sal_Int32 >( aCols.size() ); in UndoRemoveColumns() local
294 …ex = insert_range<ColumnVector,ColumnVector::iterator,TableColumnRef>( maColumns, nIndex, nCount ); in UndoRemoveColumns()
295 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in UndoRemoveColumns()
303 CellVector::iterator aIter2 = aIter + nRow * nCount; in UndoRemoveColumns()
305 maRows[nRow]->insertColumns( nIndex, nCount, &aIter2 ); in UndoRemoveColumns()
729 void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount ) in insertColumns() argument
731 if( nCount && mpTableObj ) in insertColumns()
738 …ex = insert_range<ColumnVector,ColumnVector::iterator,TableColumnRef>( maColumns, nIndex, nCount ); in insertColumns()
742 maRows[nRows]->insertColumns( nIndex, nCount ); in insertColumns()
744 ColumnVector aNewColumns(nCount); in insertColumns()
745 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in insertColumns()
761 CellVector aNewCells( nCount * nRows ); in insertColumns()
767 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in insertColumns()
786 nColSpan += nCount; in insertColumns()
810 void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) in removeColumns() argument
814 if( mpTableObj && nCount && (nIndex >= 0) && (nIndex < nColCount) ) in removeColumns()
821 if( (nIndex + nCount) > nColCount ) in removeColumns()
822 nCount = nColCount - nIndex; in removeColumns()
835 ColumnVector aRemovedCols( nCount ); in removeColumns()
837 for( nOffset = 0; nOffset < nCount; ++nOffset ) in removeColumns()
842 CellVector aRemovedCells( nCount * nRows ); in removeColumns()
846 for( nOffset = 0; nOffset < nCount; ++nOffset ) in removeColumns()
854 nColCount = nIndex + nCount + 1; in removeColumns()
871 if( (nCol + nColSpan) > ( nIndex + nCount ) ) in removeColumns()
874 const sal_Int32 nRemove = nCount - nCol + nIndex; in removeColumns()
876 CellRef xTargetCell( getCell( nIndex + nCount, nRow ) ); in removeColumns()
889 const sal_Int32 nRemove = ::std::min( nCount, nCol + nColSpan - nIndex ); in removeColumns()
898 remove_range<ColumnVector,ColumnVector::iterator>( maColumns, nIndex, nCount ); in removeColumns()
900 maRows[nRows]->removeColumns( nIndex, nCount ); in removeColumns()
920 void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount ) in insertRows() argument
922 if( nCount && mpTableObj ) in insertRows()
930 nIndex = insert_range<RowVector,RowVector::iterator,TableRowRef>( maRows, nIndex, nCount ); in insertRows()
932 RowVector aNewRows(nCount); in insertRows()
934 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in insertRows()
960 nRowSpan += nCount; in insertRows()
983 void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount ) in removeRows() argument
987 if( mpTableObj && nCount && (nIndex >= 0) && (nIndex < nRowCount) ) in removeRows()
997 if( (nIndex + nCount) > nRowCount ) in removeRows()
998 nCount = nRowCount - nIndex; in removeRows()
1007 RowVector aRemovedRows( nCount ); in removeRows()
1008 for( sal_Int32 nOffset = 0; nOffset < nCount; ++nOffset ) in removeRows()
1015 nRowCount = nIndex + nCount + 1; in removeRows()
1032 if( (nRow + nRowSpan) > (nIndex + nCount) ) in removeRows()
1035 const sal_Int32 nRemove = nCount - nRow + nIndex; in removeRows()
1037 CellRef xTargetCell( getCell( nCol, nIndex + nCount ) ); in removeRows()
1050 const sal_Int32 nRemove = ::std::min( nCount, nRow + nRowSpan - nIndex ); in removeRows()
1059 remove_range<RowVector,RowVector::iterator>( maRows, nIndex, nCount ); in removeRows()