Diffstat (limited to 'noncore/apps/opie-sheet/sheet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index 1d7ec6f..2279191 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp | |||
@@ -104,13 +104,13 @@ void Sheet::swapCells(int row1, int col1, int row2, int col2) | |||
104 | setText(cellData1->row, cellData1->col, dataParser(cellData1->data)); | 104 | setText(cellData1->row, cellData1->col, dataParser(cellData1->data)); |
105 | setText(cellData2->row, cellData2->col, dataParser(cellData2->data)); | 105 | setText(cellData2->row, cellData2->col, dataParser(cellData2->data)); |
106 | emit sheetModified(); | 106 | emit sheetModified(); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | QString Sheet::getParameter(const QString ¶meters, int paramNo, bool giveError=FALSE, const QString funcName="") | 110 | QString Sheet::getParameter(const QString ¶meters, int paramNo, bool giveError, const QString funcName) |
111 | { | 111 | { |
112 | QString params(parameters); | 112 | QString params(parameters); |
113 | int position; | 113 | int position; |
114 | for (int i=0; i<paramNo; ++i) | 114 | for (int i=0; i<paramNo; ++i) |
115 | { | 115 | { |
116 | position=params.find(','); | 116 | position=params.find(','); |
@@ -142,13 +142,13 @@ bool Sheet::findRange(const QString &variable1, const QString &variable2, int *r | |||
142 | *col1=*col2; | 142 | *col1=*col2; |
143 | *col2=col; | 143 | *col2=col; |
144 | } | 144 | } |
145 | return TRUE; | 145 | return TRUE; |
146 | } | 146 | } |
147 | 147 | ||
148 | bool Sheet::findRowColumn(const QString &variable, int *row, int *col, bool giveError=FALSE) | 148 | bool Sheet::findRowColumn(const QString &variable, int *row, int *col, bool giveError) |
149 | { | 149 | { |
150 | int position=variable.find(QRegExp("\\d")); | 150 | int position=variable.find(QRegExp("\\d")); |
151 | if (position<1) | 151 | if (position<1) |
152 | { | 152 | { |
153 | if (giveError) QMessageBox::critical(this, tr("Error"), tr("Invalid variable: '"+variable+'\'')); | 153 | if (giveError) QMessageBox::critical(this, tr("Error"), tr("Invalid variable: '"+variable+'\'')); |
154 | return FALSE; | 154 | return FALSE; |
@@ -449,13 +449,13 @@ QString Sheet::getData() | |||
449 | typeCellData *cellData=findCellData(currentRow(), currentColumn()); | 449 | typeCellData *cellData=findCellData(currentRow(), currentColumn()); |
450 | if (cellData) | 450 | if (cellData) |
451 | return cellData->data; | 451 | return cellData->data; |
452 | return ""; | 452 | return ""; |
453 | } | 453 | } |
454 | 454 | ||
455 | void Sheet::lockClicks(bool lock=TRUE) | 455 | void Sheet::lockClicks(bool lock) |
456 | { | 456 | { |
457 | clicksLocked=lock; | 457 | clicksLocked=lock; |
458 | } | 458 | } |
459 | 459 | ||
460 | void Sheet::paintCell(QPainter *p, int row, int col, const QRect & cr, bool selected) | 460 | void Sheet::paintCell(QPainter *p, int row, int col, const QRect & cr, bool selected) |
461 | { | 461 | { |
@@ -733,13 +733,13 @@ void Sheet::editCopy() | |||
733 | void Sheet::editCut() | 733 | void Sheet::editCut() |
734 | { | 734 | { |
735 | editCopy(); | 735 | editCopy(); |
736 | editClear(); | 736 | editClear(); |
737 | } | 737 | } |
738 | 738 | ||
739 | void Sheet::editPaste(bool onlyContents=FALSE) | 739 | void Sheet::editPaste(bool onlyContents) |
740 | { | 740 | { |
741 | int row1=currentRow(), col1=currentColumn(); | 741 | int row1=currentRow(), col1=currentColumn(); |
742 | typeCellData *cellData, *tempCellData; | 742 | typeCellData *cellData, *tempCellData; |
743 | 743 | ||
744 | for (tempCellData=clipboardData.first(); tempCellData; tempCellData=clipboardData.next()) | 744 | for (tempCellData=clipboardData.first(); tempCellData; tempCellData=clipboardData.next()) |
745 | { | 745 | { |
@@ -758,13 +758,13 @@ void Sheet::editPaste(bool onlyContents=FALSE) | |||
758 | setText(cellData->row, cellData->col, dataParser(cellData->data)); | 758 | setText(cellData->row, cellData->col, dataParser(cellData->data)); |
759 | emit sheetModified(); | 759 | emit sheetModified(); |
760 | } | 760 | } |
761 | } | 761 | } |
762 | } | 762 | } |
763 | 763 | ||
764 | void Sheet::insertRows(int no=1, bool allColumns=TRUE) | 764 | void Sheet::insertRows(int no, bool allColumns) |
765 | { | 765 | { |
766 | setNumRows(numRows()+no); | 766 | setNumRows(numRows()+no); |
767 | 767 | ||
768 | typeCellData *tempCellData; | 768 | typeCellData *tempCellData; |
769 | int row=currentRow(), col=currentColumn(); | 769 | int row=currentRow(), col=currentColumn(); |
770 | 770 | ||
@@ -780,13 +780,13 @@ void Sheet::insertRows(int no=1, bool allColumns=TRUE) | |||
780 | updateCell(tempCellData->row-no, tempCellData->col); | 780 | updateCell(tempCellData->row-no, tempCellData->col); |
781 | setText(tempCellData->row, tempCellData->col, dataParser(tempCellData->data)); | 781 | setText(tempCellData->row, tempCellData->col, dataParser(tempCellData->data)); |
782 | } | 782 | } |
783 | emit sheetModified(); | 783 | emit sheetModified(); |
784 | } | 784 | } |
785 | 785 | ||
786 | void Sheet::insertColumns(int no=1, bool allRows=TRUE) | 786 | void Sheet::insertColumns(int no, bool allRows) |
787 | { | 787 | { |
788 | int noCols=numCols(); | 788 | int noCols=numCols(); |
789 | int newCols=noCols+no; | 789 | int newCols=noCols+no; |
790 | setNumCols(newCols); | 790 | setNumCols(newCols); |
791 | for (int i=noCols; i<newCols; ++i) | 791 | for (int i=noCols; i<newCols; ++i) |
792 | horizontalHeader()->setLabel(i, getHeaderString(i+1), DEFAULT_COL_WIDTH); | 792 | horizontalHeader()->setLabel(i, getHeaderString(i+1), DEFAULT_COL_WIDTH); |
@@ -806,13 +806,13 @@ void Sheet::insertColumns(int no=1, bool allRows=TRUE) | |||
806 | updateCell(tempCellData->row, tempCellData->col-no); | 806 | updateCell(tempCellData->row, tempCellData->col-no); |
807 | setText(tempCellData->row, tempCellData->col, dataParser(tempCellData->data)); | 807 | setText(tempCellData->row, tempCellData->col, dataParser(tempCellData->data)); |
808 | } | 808 | } |
809 | emit sheetModified(); | 809 | emit sheetModified(); |
810 | } | 810 | } |
811 | 811 | ||
812 | void Sheet::dataFindReplace(const QString &findStr, const QString &replaceStr, bool matchCase=TRUE, bool allCells=TRUE, bool entireCell=FALSE, bool replace=FALSE, bool replaceAll=FALSE) | 812 | void Sheet::dataFindReplace(const QString &findStr, const QString &replaceStr, bool matchCase, bool allCells, bool entireCell, bool replace, bool replaceAll) |
813 | { | 813 | { |
814 | typeCellData *tempCellData; | 814 | typeCellData *tempCellData; |
815 | int row1, col1, row2, col2; | 815 | int row1, col1, row2, col2; |
816 | getSelection(&row1, &col1, &row2, &col2); | 816 | getSelection(&row1, &col1, &row2, &col2); |
817 | bool found=FALSE; | 817 | bool found=FALSE; |
818 | 818 | ||