summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-24 13:50:11 (UTC)
committer mickeyl <mickeyl>2004-04-24 13:50:11 (UTC)
commit0e24210ea7aa2deaf2facf29c366413aa93d0482 (patch) (unidiff)
tree1adae72f49c3f5005be836e6e7525dc79fb098cd
parent9ac401fbe5c80f710757926920d734e93a7e159b (diff)
downloadopie-0e24210ea7aa2deaf2facf29c366413aa93d0482.zip
opie-0e24210ea7aa2deaf2facf29c366413aa93d0482.tar.gz
opie-0e24210ea7aa2deaf2facf29c366413aa93d0482.tar.bz2
gcc 3.4 fixlet
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/sheet.cpp10
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
@@ -2060,69 +2060,69 @@ QColor Sheet::getFontColor(int row, int col)
2060{ 2060{
2061 typeCellData *cellData=findCellData(row, col); 2061 typeCellData *cellData=findCellData(row, col);
2062 if (!cellData) cellData=&defaultCellData; 2062 if (!cellData) cellData=&defaultCellData;
2063 return cellData->fontColor; 2063 return cellData->fontColor;
2064} 2064}
2065 2065
2066void Sheet::setPen(int row, int col, int vertical, const QPen &pen) 2066void Sheet::setPen(int row, int col, int vertical, const QPen &pen)
2067{ 2067{
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
2080QPen Sheet::getPen(int row, int col, int vertical) 2080QPen 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
2087void Sheet::getSelection(int *row1, int *col1, int *row2, int *col2) 2087void 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
2105void Sheet::editClear() 2105void 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
2119void Sheet::editCopy() 2119void Sheet::editCopy()
2120{ 2120{
2121 clipboardData.clear(); 2121 clipboardData.clear();
2122 2122
2123 int row1, row2, col1, col2; 2123 int row1, row2, col1, col2;
2124 getSelection(&row1, &col1, &row2, &col2); 2124 getSelection(&row1, &col1, &row2, &col2);
2125 2125
2126 typeCellData *cellData, *newCellData; 2126 typeCellData *cellData, *newCellData;
2127 int row, col; 2127 int row, col;
2128 for (row=row1; row<=row2; ++row) 2128 for (row=row1; row<=row2; ++row)