Changeset 846 for trunk/src/gui/text/qtexttable.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/text/qtexttable.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 755 755 p->beginEditBlock(); 756 756 757 757 758 for (int i = 0; i < d->nRows; ++i) { 758 759 int cell; … … 761 762 else 762 763 cell = d->grid[i*d->nCols + pos]; 763 QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);764 QTextCharFormat fmt = c->charFormat(it->format);765 764 if (pos > 0 && pos < d->nCols && cell == d->grid[i*d->nCols + pos - 1]) { 766 765 // cell spans the insertion place, extend it 767 fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num); 768 p->setCharFormat(it.position(), 1, fmt); 766 if (!extendedSpans.contains(cell)) { 767 QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); 768 QTextCharFormat fmt = c->charFormat(it->format); 769 fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num); 770 p->setCharFormat(it.position(), 1, fmt); 771 d->dirty = true; 772 extendedSpans << cell; 773 } 769 774 } else { 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 770 790 fmt.setTableCellRowSpan(1); 771 791 fmt.setTableCellColumnSpan(1); … … 916 936 for (int c = pos; c < pos + num; ++c) { 917 937 int cell = d->grid[r*d->nCols + c]; 918 if (touchedCells.contains(cell))919 continue;920 touchedCells << cell;921 938 QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); 922 939 QTextCharFormat fmt = collection->charFormat(it->format); 923 940 int span = fmt.tableCellColumnSpan(); 941 942 943 944 924 945 if (span > 1) { 925 946 fmt.setTableCellColumnSpan(span - 1);
Note:
See TracChangeset
for help on using the changeset viewer.