From kde-commits Sun Sep 18 22:54:33 2011 From: "Dr. Robert Marmorstein" Date: Sun, 18 Sep 2011 22:54:33 +0000 To: kde-commits Subject: [koffice] kcells/ui: Minor efficiency things. Message-Id: <20110918225433.BDEF3A60C6 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=131638649900599 Git commit 9eedf5b321cb6e61f5b54216ac2acd4fda43ff67 by Dr. Robert Marmorstein. Committed on 19/09/2011 at 00:53. Pushed by robertm into branch 'master'. Minor efficiency things. M +4 -4 kcells/ui/CellToolBase.cpp http://commits.kde.org/koffice/9eedf5b321cb6e61f5b54216ac2acd4fda43ff67 diff --git a/kcells/ui/CellToolBase.cpp b/kcells/ui/CellToolBase.cpp index 580dae1..1535d22 100644 --- a/kcells/ui/CellToolBase.cpp +++ b/kcells/ui/CellToolBase.cpp @@ -2636,7 +2636,7 @@ void CellToolBase::autoSum() } else if ((selection()->marker().x() > 1) && KCCell(selection()->activeSheet(), selection()->marker().x() - 1, selection()->marker().y()).value().isNumber()) { // check cells to the left of the current one start = end = selection()->marker().x() - 1; - for (start--; (start > 0) && KCCell(selection()->activeSheet(), start, selection()->marker().y()).value().isNumber(); start--) ; + for (--start; (start > 0) && KCCell(selection()->activeSheet(), start, selection()->marker().y()).value().isNumber(); --start) ; const KCRegion region(QRect(QPoint(start + 1, selection()->marker().y()), QPoint(end, selection()->marker().y())), selection()->activeSheet()); @@ -2816,9 +2816,9 @@ void CellToolBase::subtotals() return; } - QPointer dialog = new SubtotalDialog(canvas()->canvasWidget(), selection()); - dialog->exec(); - delete dialog; + QPointer sdialog = new SubtotalDialog(canvas()->canvasWidget(), selection()); + sdialog->exec(); + delete sdialog; } void CellToolBase::setAreaName()