-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index d4419af..88847da 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp | |||
@@ -2068,53 +2068,53 @@ void Sheet::setPen(int row, int col, int vertical, const QPen &pen) | |||
2068 | typeCellData *cellData=findCellData(row, col); | 2068 | typeCellData *cellData=findCellData(row, col); |
2069 | if (!cellData) cellData=createCellData(row, col); | 2069 | if (!cellData) cellData=createCellData(row, col); |
2070 | if (cellData) | 2070 | if (cellData) |
2071 | { | 2071 | { |
2072 | if (vertical) | 2072 | if (vertical) |
2073 | cellData->borders.right=pen; | 2073 | cellData->borders.right=pen; |
2074 | else | 2074 | else |
2075 | cellData->borders.bottom=pen; | 2075 | cellData->borders.bottom=pen; |
2076 | emit sheetModified(); | 2076 | emit sheetModified(); |
2077 | } | 2077 | } |
2078 | } | 2078 | } |
2079 | 2079 | ||
2080 | QPen Sheet::getPen(int row, int col, int vertical) | 2080 | QPen Sheet::getPen(int row, int col, int vertical) |
2081 | { | 2081 | { |
2082 | typeCellData *cellData=findCellData(row, col); | 2082 | typeCellData *cellData=findCellData(row, col); |
2083 | if (!cellData) cellData=&defaultCellData; | 2083 | if (!cellData) cellData=&defaultCellData; |
2084 | return (vertical ? cellData->borders.right : cellData->borders.bottom); | 2084 | return (vertical ? cellData->borders.right : cellData->borders.bottom); |
2085 | } | 2085 | } |
2086 | 2086 | ||
2087 | void Sheet::getSelection(int *row1, int *col1, int *row2, int *col2) | 2087 | void Sheet::getSelection(int *row1, int *col1, int *row2, int *col2) |
2088 | { | 2088 | { |
2089 | int selectionNo=currentSelection(); | 2089 | int selectionNo=currentSelection(); |
2090 | if (selectionNo>=0) | 2090 | if (selectionNo>=0) |
2091 | { | 2091 | { |
2092 | QTableSelection selection(selection(selectionNo)); | 2092 | QTableSelection select(selection(selectionNo)); |
2093 | *row1=selection.topRow(); | 2093 | *row1=select.topRow(); |
2094 | *row2=selection.bottomRow(); | 2094 | *row2=select.bottomRow(); |
2095 | *col1=selection.leftCol(); | 2095 | *col1=select.leftCol(); |
2096 | *col2=selection.rightCol(); | 2096 | *col2=select.rightCol(); |
2097 | } | 2097 | } |
2098 | else | 2098 | else |
2099 | { | 2099 | { |
2100 | *row1=*row2=currentRow(); | 2100 | *row1=*row2=currentRow(); |
2101 | *col1=*col2=currentColumn(); | 2101 | *col1=*col2=currentColumn(); |
2102 | } | 2102 | } |
2103 | } | 2103 | } |
2104 | 2104 | ||
2105 | void Sheet::editClear() | 2105 | void Sheet::editClear() |
2106 | { | 2106 | { |
2107 | int row1, row2, col1, col2; | 2107 | int row1, row2, col1, col2; |
2108 | getSelection(&row1, &col1, &row2, &col2); | 2108 | getSelection(&row1, &col1, &row2, &col2); |
2109 | 2109 | ||
2110 | int row, col; | 2110 | int row, col; |
2111 | for (row=row1; row<=row2; ++row) | 2111 | for (row=row1; row<=row2; ++row) |
2112 | for (col=col1; col<=col2; ++col) | 2112 | for (col=col1; col<=col2; ++col) |
2113 | { | 2113 | { |
2114 | setText(row, col, ""); | 2114 | setText(row, col, ""); |
2115 | slotCellChanged(row, col); | 2115 | slotCellChanged(row, col); |
2116 | } | 2116 | } |
2117 | } | 2117 | } |
2118 | 2118 | ||
2119 | void Sheet::editCopy() | 2119 | void Sheet::editCopy() |
2120 | { | 2120 | { |