Lines Matching refs:nIndex

67 template< class Vec, class Iter > void remove_range( Vec& rVector, sal_Int32 nIndex, sal_Int32 nCou…  in remove_range()  argument
70 if( nCount && (nIndex >= 0) && (nIndex < nSize) ) in remove_range()
72 if( (nIndex + nCount) >= nSize ) in remove_range()
75 rVector.resize( nIndex ); in remove_range()
80 while( nIndex-- ) in remove_range()
101 …lass Iter, class Entry > sal_Int32 insert_range( Vec& rVector, sal_Int32 nIndex, sal_Int32 nCount ) in insert_range() argument
105 if( nIndex >= static_cast< sal_Int32 >( rVector.size() ) ) in insert_range()
108 nIndex = static_cast< sal_Int32 >( rVector.size() ); // cap to end in insert_range()
109 rVector.resize( nIndex + nCount ); in insert_range()
114 sal_Int32 nFind = nIndex; in insert_range()
123 return nIndex; 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()
252 void TableModel::UndoRemoveRows( sal_Int32 nIndex, RowVector& aRows ) in UndoRemoveRows() argument
258 nIndex = insert_range<RowVector,RowVector::iterator,TableRowRef>( maRows, nIndex, nCount ); in UndoRemoveRows()
261 maRows[nIndex+nOffset] = aRows[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()
285 void TableModel::UndoRemoveColumns( sal_Int32 nIndex, ColumnVector& aCols, CellVector& aCells ) in UndoRemoveColumns() argument
294nIndex = insert_range<ColumnVector,ColumnVector::iterator,TableColumnRef>( maColumns, nIndex, nCou… in UndoRemoveColumns()
296 maColumns[nIndex+nOffset] = aCols[nOffset]; in UndoRemoveColumns()
305 maRows[nRow]->insertColumns( nIndex, nCount, &aIter2 ); in UndoRemoveColumns()
729 void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount ) in insertColumns() argument
738nIndex = insert_range<ColumnVector,ColumnVector::iterator,TableColumnRef>( maColumns, nIndex, nCou… in insertColumns()
742 maRows[nRows]->insertColumns( nIndex, nCount ); in insertColumns()
747 TableColumnRef xNewCol( new TableColumn( this, nIndex+nOffset ) ); in insertColumns()
748 maColumns[nIndex+nOffset] = xNewCol; in insertColumns()
768 (*aCellIter++) = getCell( nIndex + nOffset, nRow ); in insertColumns()
771 pModel->AddUndo( new InsertColUndo( xThis, nIndex, aNewColumns, aNewCells ) ); in insertColumns()
776 for( sal_Int32 nCol = 0; nCol < nIndex; ++nCol ) in insertColumns()
782 if( (nColSpan != 1) && ((nColSpan + nCol ) > nIndex) ) 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()
839 aRemovedCols[nOffset] = maColumns[nIndex+nOffset]; in removeColumns()
847 (*aCellIter++) = getCell( nIndex + nOffset, nRow ); in removeColumns()
850 pModel->AddUndo( new RemoveColUndo( xThis, nIndex, aRemovedCols, aRemovedCells ) ); in removeColumns()
854 nColCount = nIndex + nCount + 1; in removeColumns()
868 if( nCol >= nIndex ) 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()
886 else if( nColSpan > (nIndex - nCol) ) 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
930 nIndex = insert_range<RowVector,RowVector::iterator,TableRowRef>( maRows, nIndex, nCount ); in insertRows()
936 TableRowRef xNewRow( new TableRow( this, nIndex+nOffset, nColCount ) ); in insertRows()
937 maRows[nIndex+nOffset] = xNewRow; in insertRows()
946 pModel->AddUndo( new InsertRowUndo( xThis, nIndex, aNewRows ) ); in insertRows()
950 for( sal_Int32 nRow = 0; nRow < nIndex; ++nRow ) in insertRows()
956 if( (nRowSpan > 1) && ((nRowSpan + nRow) > nIndex) ) 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()
1009 aRemovedRows[nOffset] = maRows[nIndex+nOffset]; in removeRows()
1011 pModel->AddUndo( new RemoveRowUndo( xThis, nIndex, aRemovedRows ) ); in removeRows()
1015 nRowCount = nIndex + nCount + 1; in removeRows()
1029 if( nRow >= nIndex ) 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()
1047 else if( nRowSpan > (nIndex - nRow) ) 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()