summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrochner <drochner>2002-10-26 14:31:12 +0000
committerdrochner <drochner>2002-10-26 14:31:12 +0000
commit0e96f40a771ab24545007f32df25067a6425cad5 (patch)
tree98a1bb6c0dd2b02fbc26c3ce3d66687c76784c3f
parent4890b5799e306d6b2f2e86f8c4f221485cfcc74f (diff)
downloadpkgsrc-0e96f40a771ab24545007f32df25067a6425cad5.tar.gz
from the koffice site:
21th October 2002 - Fix available for KSpread's crash A fix is available for kspread's crashes when working with long text which overlaps several cells or when working with merged cells.
-rw-r--r--misc/koffice/distinfo3
-rw-r--r--misc/koffice/patches/patch-aa55
2 files changed, 57 insertions, 1 deletions
diff --git a/misc/koffice/distinfo b/misc/koffice/distinfo
index 6e373ee0a86..8e0e1b2af68 100644
--- a/misc/koffice/distinfo
+++ b/misc/koffice/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.6 2002/10/08 14:15:53 martti Exp $
+$NetBSD: distinfo,v 1.7 2002/10/26 14:31:12 drochner Exp $
SHA1 (koffice-1.2.tar.bz2) = 5a959033358a27e8c6e9f02a1d0405fb1bd06b52
Size (koffice-1.2.tar.bz2) = 9321755 bytes
+SHA1 (patch-aa) = 6be458998e9ca7648b868c4c99a9e104d4780562
diff --git a/misc/koffice/patches/patch-aa b/misc/koffice/patches/patch-aa
new file mode 100644
index 00000000000..bbd5f82997d
--- /dev/null
+++ b/misc/koffice/patches/patch-aa
@@ -0,0 +1,55 @@
+$NetBSD: patch-aa,v 1.4 2002/10/26 14:31:13 drochner Exp $
+
+--- kspread/kspread_cell.cc.orig Wed Sep 4 23:52:50 2002
++++ kspread/kspread_cell.cc Fri Oct 25 19:12:19 2002
+@@ -1931,20 +1931,40 @@
+ while already drawing the obscuring cell -- don't want to cause an
+ infinite loop
+ */
+- // Determine the dimension of the cell.
++
++ /*
++ Store the obscuringCells list in a list of QPoint(column, row)
++ This avoids crashes during the iteration through obscuringCells,
++ when the cells may get non valid or the list itself gets changed
++ during a call of obscuringCell->paintCell (this happens e.g. when
++ there is an updateDepend)
++ */
++ QValueList<QPoint> listPoints;
+ QValueList<KSpreadCell*>::iterator it = m_ObscuringCells.begin();
+ QValueList<KSpreadCell*>::iterator end = m_ObscuringCells.end();
+- for ( ; it != end; ++it ) {
++ for ( ; it != end; ++it )
++ {
+ KSpreadCell *obscuringCell = *it;
+- QPoint obscuringCellRef( obscuringCell->column(), obscuringCell->row() );
+- double x = m_pTable->dblColumnPos( obscuringCell->column() );
+- double y = m_pTable->dblRowPos( obscuringCell->row() );
+- QPair<double,double> corner = qMakePair( x, y );
+- painter.save();
++ listPoints.append( QPoint( obscuringCell->column(), obscuringCell->row() ) );
++ }
++
++ QValueList<QPoint>::iterator it1 = listPoints.begin();
++ QValueList<QPoint>::iterator end1 = listPoints.end();
++ for ( ; it1 != end1; ++it1 )
++ {
++ QPoint obscuringCellRef = *it1;
++ KSpreadCell *obscuringCell = m_pTable->cellAt( obscuringCellRef.x(), obscuringCellRef.y() );
++ if( obscuringCell != 0 )
++ {
++ double x = m_pTable->dblColumnPos( obscuringCellRef.x() );
++ double y = m_pTable->dblRowPos( obscuringCellRef.y() );
++ QPair<double,double> corner = qMakePair( x, y );
++ painter.save();
+
+- obscuringCell->paintCell( rect, painter, view,
+- corner, obscuringCellRef );
+- painter.restore();
++ obscuringCell->paintCell( rect, painter, view,
++ corner, obscuringCellRef );
++ painter.restore();
++ }
+ }
+ }
+ }