diff --git a/apps/calculation/history_controller.cpp b/apps/calculation/history_controller.cpp index 431c9635c..a1f557e81 100644 --- a/apps/calculation/history_controller.cpp +++ b/apps/calculation/history_controller.cpp @@ -147,23 +147,6 @@ KDCoordinate HistoryController::rowHeight(int j) { return calculation->height(calculationApp->localContext()) + 3*HistoryViewCell::k_digitVerticalMargin; } -KDCoordinate HistoryController::cumulatedHeightFromIndex(int j) { - int result = 0; - for (int k = 0; k < j; k++) { - result += rowHeight(k); - } - return result; -} - -int HistoryController::indexFromCumulatedHeight(KDCoordinate offsetY) { - int result = 0; - int j = 0; - while (result < offsetY && j < numberOfRows()) { - result += rowHeight(j++); - } - return (result < offsetY || offsetY == 0) ? j : j - 1; -} - int HistoryController::typeAtLocation(int i, int j) { return 0; } diff --git a/apps/calculation/history_controller.h b/apps/calculation/history_controller.h index 77a5537bc..3f88fc95e 100644 --- a/apps/calculation/history_controller.h +++ b/apps/calculation/history_controller.h @@ -24,8 +24,6 @@ public: int reusableCellCount(int type) override; void willDisplayCellForIndex(HighlightCell * cell, int index) override; KDCoordinate rowHeight(int j) override; - KDCoordinate cumulatedHeightFromIndex(int j) override; - int indexFromCumulatedHeight(KDCoordinate offsetY) override; int typeAtLocation(int i, int j) override; void tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) override; void scrollToCell(int i, int j); diff --git a/apps/variable_box_controller.cpp b/apps/variable_box_controller.cpp index 05d0cd985..02a8ea27a 100644 --- a/apps/variable_box_controller.cpp +++ b/apps/variable_box_controller.cpp @@ -173,23 +173,6 @@ KDCoordinate VariableBoxController::ContentViewController::rowHeight(int index) return Metric::ToolboxRowHeight; } -KDCoordinate VariableBoxController::ContentViewController::cumulatedHeightFromIndex(int j) { - int result = 0; - for (int k = 0; k < j; k++) { - result += rowHeight(k); - } - return result; -} - -int VariableBoxController::ContentViewController::indexFromCumulatedHeight(KDCoordinate offsetY) { - int result = 0; - int j = 0; - while (result < offsetY && j < numberOfRows()) { - result += rowHeight(j++); - } - return (result < offsetY || offsetY == 0) ? j : j - 1; -} - int VariableBoxController::ContentViewController::typeAtLocation(int i, int j) { if (m_currentPage == Page::RootMenu) { return 1; diff --git a/apps/variable_box_controller.h b/apps/variable_box_controller.h index bd536d80c..2ada661ea 100644 --- a/apps/variable_box_controller.h +++ b/apps/variable_box_controller.h @@ -28,8 +28,6 @@ private: int reusableCellCount(int type) override; void willDisplayCellForIndex(HighlightCell * cell, int index) override; KDCoordinate rowHeight(int j) override; - KDCoordinate cumulatedHeightFromIndex(int j) override; - int indexFromCumulatedHeight(KDCoordinate offsetY) override; int typeAtLocation(int i, int j) override; void setSender(Responder * responder) { m_sender = responder; } void reloadData(); diff --git a/escher/include/escher/toolbox.h b/escher/include/escher/toolbox.h index 7c4f22bb5..fe86619f9 100644 --- a/escher/include/escher/toolbox.h +++ b/escher/include/escher/toolbox.h @@ -26,8 +26,6 @@ public: HighlightCell * reusableCell(int index, int type) override; int reusableCellCount(int type) override; void willDisplayCellForIndex(HighlightCell * cell, int index) override; - KDCoordinate cumulatedHeightFromIndex(int j) override; - int indexFromCumulatedHeight(KDCoordinate offsetY) override; int typeAtLocation(int i, int j) override; protected: diff --git a/escher/src/toolbox.cpp b/escher/src/toolbox.cpp index a587ea251..fde37b9cc 100644 --- a/escher/src/toolbox.cpp +++ b/escher/src/toolbox.cpp @@ -155,23 +155,6 @@ void Toolbox::willDisplayCellForIndex(HighlightCell * cell, int index) { myCell->setMessage(messageTree->label()); } -KDCoordinate Toolbox::cumulatedHeightFromIndex(int j) { - int result = 0; - for (int k = 0; k < j; k++) { - result += rowHeight(k); - } - return result; -} - -int Toolbox::indexFromCumulatedHeight(KDCoordinate offsetY) { - int result = 0; - int j = 0; - while (result < offsetY && j < numberOfRows()) { - result += rowHeight(j++); - } - return (result < offsetY || offsetY == 0) ? j : j - 1; -} - int Toolbox::typeAtLocation(int i, int j) { MessageTree * messageTree = (MessageTree *)m_messageTreeModel->children(j); if (messageTree->numberOfChildren() == 0) {