-rw-r--r-- | noncore/apps/opie-sheet/Excel.cpp | 83 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/Excel.h | 47 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/cellformat.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/cellformat.h | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/finddlg.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/finddlg.h | 39 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/main.cpp | 35 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.cpp | 43 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/mainwindow.h | 43 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/numberdlg.cpp | 38 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/numberdlg.h | 36 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/opie-sheet.pro | 19 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 122 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sheet.h | 36 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.cpp | 42 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.h | 39 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/textdlg.cpp | 38 | ||||
-rw-r--r-- | noncore/apps/opie-sheet/textdlg.h | 36 |
18 files changed, 618 insertions, 204 deletions
diff --git a/noncore/apps/opie-sheet/Excel.cpp b/noncore/apps/opie-sheet/Excel.cpp index fc49d56..57aef20 100644 --- a/noncore/apps/opie-sheet/Excel.cpp +++ b/noncore/apps/opie-sheet/Excel.cpp @@ -1,3 +1,32 @@ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ +#include "Excel.h" +/* STD */ #include <stdio.h> @@ -8,3 +37,2 @@ #include <strings.h> -#include "Excel.h" @@ -65,3 +93,4 @@ int ExcelBook::Integer4Byte(int b1,int b2,int b3,int b4) -int ExcelBook::Integer2ByteFile(FILE *f) { +int ExcelBook::Integer2ByteFile(FILE *f) +{ int i1, i2; @@ -104,3 +133,4 @@ double ExcelBook::Double4Byte(int b1, int b2, int b3, int b4) return value; - }else + } + else { @@ -134,6 +164,9 @@ void ExcelBook::DetectEndian(void) end = (*a != 0x11); - if (end == 1) { + if (end == 1) + { endian = BIG_ENDIAN; printf("BIGENDIAN!\r\n"); - } else { + } + else + { endian = LITTLE_ENDIAN; @@ -150,3 +183,4 @@ double ExcelBook::Double8Byte(int b1, int b2, int b3, int b4, int b5, int b6, in for (i = 0; i < 8; i++) ieee[i] = 0; - if (endian == BIG_ENDIAN) { + if (endian == BIG_ENDIAN) + { ieee[0] = ((int)b8) & 0xff;ieee[1] = ((int)b7) & 0xff; @@ -155,3 +189,5 @@ double ExcelBook::Double8Byte(int b1, int b2, int b3, int b4, int b5, int b6, in ieee[6] = ((int)b2) & 0xff;ieee[7] = ((int)b1) & 0xff; - } else { + } + else + { ieee[0] = ((int)b1) & 0xff;ieee[1] = ((int)b2) & 0xff; @@ -395,3 +431,4 @@ int ExcelBook::SheetHandleRecord(ExcelSheet* sheet, ExcelBREC* record) sheet->cols = Integer2Byte(data[6], data[7]); - } else + } + else { @@ -604,3 +641,4 @@ void ExcelBook::HandleBoundSheet(ExcelBREC* rec) name=GetASCII(data,pos,length); - }else + } + else { @@ -810,3 +848,4 @@ QString* ExcelBook::CellDataString(ExcelSheet* sh, int row, int col) strftime(str,1024,dateformat.ascii(),tmptr); - } else + } + else { @@ -814,3 +853,4 @@ QString* ExcelBook::CellDataString(ExcelSheet* sh, int row, int col) }; - } else + } + else if (XFRecords[c->xfindex]->type == NUMBERFORMAT) @@ -823,3 +863,4 @@ QString* ExcelBook::CellDataString(ExcelSheet* sh, int row, int col) sprintf(str,"%.*f",precision,c->valued); - }else + } + else { @@ -1004,3 +1045,4 @@ void ExcelBook::HandleFormula(ExcelSheet* sheet, ExcelBREC* record) // string - } else + } + else if (data[6] == 1 && data[12] == -1 && data[13] == -1) @@ -1008,3 +1050,4 @@ void ExcelBook::HandleFormula(ExcelSheet* sheet, ExcelBREC* record) // boolean - } else + } + else if ( data[6] == 2 && data[12] == -1 && data[13] == -1) @@ -1125,3 +1168,4 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i operands.prepend(new QString(s1)); - }else + } + else { @@ -1144,3 +1188,4 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i w4=Integer2Byte(data[idx],data[idx+1]) & 0x00FF;idx=idx+2;//col2 - }else + } + else { @@ -1163,3 +1208,4 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i w2=Integer2Byte(data[idx],data[idx+1]) & 0x00FF;idx=idx+2;//col - }else + } + else { @@ -1334,3 +1380,4 @@ QString ExcelBook::GetFormula(int row, int col, ExcelSheet* sheet, char* data, i w1=Integer2Byte(data[idx],data[idx+1]);idx=idx+2; - }else + } + else { diff --git a/noncore/apps/opie-sheet/Excel.h b/noncore/apps/opie-sheet/Excel.h index 0a581cf..51ccf5c 100644 --- a/noncore/apps/opie-sheet/Excel.h +++ b/noncore/apps/opie-sheet/Excel.h @@ -1,2 +1,35 @@ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +/* QT */ +#include <qstring.h> +#include <qarray.h> +#include <qlist.h> +/* STD */ #include <stdio.h> @@ -7,5 +40,2 @@ #include <strings.h> -#include <qstring.h> -#include <qarray.h> -#include <qlist.h> @@ -116,3 +146,4 @@ public: -struct mulrk { +struct mulrk +{ int row; @@ -126,5 +157,2 @@ struct mulrk { - - - class ExcelBook @@ -198,7 +226,2 @@ QString GetFormula(int row, int col, ExcelSheet* sheet, char* data, int sz); QString FindCellName(int row, int col); - - - - - }; diff --git a/noncore/apps/opie-sheet/cellformat.cpp b/noncore/apps/opie-sheet/cellformat.cpp index 342ebe9..602d20d 100644 --- a/noncore/apps/opie-sheet/cellformat.cpp +++ b/noncore/apps/opie-sheet/cellformat.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -16,2 +35,3 @@ +/* QT */ #include <qlistbox.h> @@ -151,4 +171,3 @@ CellFormat::CellFormat(QWidget *parent) CellFormat::~CellFormat() -{ -} +{} @@ -531,4 +550,3 @@ BorderEditor::BorderEditor(QWidget *parent) BorderEditor::~BorderEditor() -{ -} +{} diff --git a/noncore/apps/opie-sheet/cellformat.h b/noncore/apps/opie-sheet/cellformat.h index b569b7f..e07af9c 100644 --- a/noncore/apps/opie-sheet/cellformat.h +++ b/noncore/apps/opie-sheet/cellformat.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,3 +36,8 @@ +#include "sheet.h" + +/* OPIE */ #include <qpe/fontdatabase.h> + +/* QT */ #include <qdialog.h> @@ -25,4 +49,2 @@ -#include "sheet.h" - class BorderEditor: public QFrame diff --git a/noncore/apps/opie-sheet/finddlg.cpp b/noncore/apps/opie-sheet/finddlg.cpp index e4c6ec8..c724159 100644 --- a/noncore/apps/opie-sheet/finddlg.cpp +++ b/noncore/apps/opie-sheet/finddlg.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -14,5 +33,7 @@ +#include "finddlg.h" + +/* QT */ #include <qlabel.h> #include <qradiobutton.h> -#include "finddlg.h" @@ -66,4 +87,3 @@ FindDialog::FindDialog(QWidget *parent) FindDialog::~FindDialog() -{ -} +{} diff --git a/noncore/apps/opie-sheet/finddlg.h b/noncore/apps/opie-sheet/finddlg.h index 1af2da5..b456f21 100644 --- a/noncore/apps/opie-sheet/finddlg.h +++ b/noncore/apps/opie-sheet/finddlg.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,2 +36,5 @@ +#include "sheet.h" + +/* QT */ #include <qdialog.h> @@ -24,3 +46,2 @@ #include <qvbuttongroup.h> -#include "sheet.h" diff --git a/noncore/apps/opie-sheet/main.cpp b/noncore/apps/opie-sheet/main.cpp index 861473e..bf35908 100644 --- a/noncore/apps/opie-sheet/main.cpp +++ b/noncore/apps/opie-sheet/main.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp index 061748e..bb85a24 100644 --- a/noncore/apps/opie-sheet/mainwindow.cpp +++ b/noncore/apps/opie-sheet/mainwindow.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -16,2 +35,3 @@ +/* OPIE */ #include <qpe/resource.h> @@ -19,2 +39,3 @@ +/* QT */ #include <qmessagebox.h> @@ -22,2 +43,3 @@ +/* STD */ #include "cellformat.h" @@ -40,3 +62,3 @@ MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) currentDoc=0; - fileSelector=new FileSelector("application/sheet-qt", this, QString::null); + fileSelector=new FileSelector("application/opie-sheet", this, QString::null); ExcelSelector=new FileSelector("application/excel",this,QString::null,FALSE); @@ -48,3 +70,2 @@ MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl) - listSheets.setAutoDelete(TRUE); @@ -92,3 +113,3 @@ void MainWindow::documentSave(DocLnk *lnkDoc) - lnkDoc->setType("application/sheet-qt"); + lnkDoc->setType("application/opie-sheet"); if (!fm.saveFile(*lnkDoc, streamBuffer)) diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h index eacbe36..642b7ae 100644 --- a/noncore/apps/opie-sheet/mainwindow.h +++ b/noncore/apps/opie-sheet/mainwindow.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,4 +36,10 @@ +#include "Excel.h" +#include "sheet.h" + +/* OPIE */ #include <qpe/applnk.h> #include <qpe/fileselector.h> + +/* QT */ #include <qmenubar.h> @@ -27,4 +52,2 @@ #include <qtoolbutton.h> -#include "Excel.h" -#include "sheet.h" diff --git a/noncore/apps/opie-sheet/numberdlg.cpp b/noncore/apps/opie-sheet/numberdlg.cpp index 90fbaa2..43574e9 100644 --- a/noncore/apps/opie-sheet/numberdlg.cpp +++ b/noncore/apps/opie-sheet/numberdlg.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -30,4 +49,3 @@ NumberDialog::NumberDialog(QWidget *parent) NumberDialog::~NumberDialog() -{ -} +{} diff --git a/noncore/apps/opie-sheet/numberdlg.h b/noncore/apps/opie-sheet/numberdlg.h index 81e3326..497c076 100644 --- a/noncore/apps/opie-sheet/numberdlg.h +++ b/noncore/apps/opie-sheet/numberdlg.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,2 +36,3 @@ +/* QT */ #include <qdialog.h> diff --git a/noncore/apps/opie-sheet/opie-sheet.pro b/noncore/apps/opie-sheet/opie-sheet.pro index ced4daf..d0beb93 100644 --- a/noncore/apps/opie-sheet/opie-sheet.pro +++ b/noncore/apps/opie-sheet/opie-sheet.pro @@ -1,4 +1,19 @@ CONFIG = qt warn_on quick-app -HEADERS = mainwindow.h sheet.h cellformat.h finddlg.h numberdlg.h sortdlg.h textdlg.h Excel.h -SOURCES = main.cpp mainwindow.cpp sheet.cpp cellformat.cpp finddlg.cpp numberdlg.cpp sortdlg.cpp textdlg.cpp Excel.cpp +HEADERS = mainwindow.h \ + sheet.h \ + cellformat.h \ + finddlg.h \ + numberdlg.h \ + sortdlg.h \ + textdlg.h \ + Excel.h +SOURCES = main.cpp \ + mainwindow.cpp \ + sheet.cpp \ + cellformat.cpp \ + finddlg.cpp \ + numberdlg.cpp \ + sortdlg.cpp \ + textdlg.cpp \ + Excel.cpp INCLUDEPATH += $(OPIEDIR)/include diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index 88847da..477c982 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -16,3 +35,6 @@ +/* QT */ #include <qmessagebox.h> + +/* STD */ #include <math.h> @@ -50,4 +72,3 @@ Sheet::Sheet(int numRows, int numCols, QWidget *parent) Sheet::~Sheet() -{ -} +{} @@ -69,3 +90,4 @@ void Sheet::slotCellSelected(int row, int col) emit currentDataChanged(cellData->data); - }else + } + else emit currentDataChanged(""); @@ -230,3 +252,4 @@ double Sheet::BesselI0(double x) ans=1.0+y*(3.5156229+y*(3.0899424+y*(1.2067492 +y*(0.2659732+y*(0.360768e-1+y*0.45813e-2))))); - }else + } + else { @@ -247,3 +270,4 @@ double Sheet::BesselI1(double x) ans=ax*(0.5+y*(0.87890594+y*(0.51498869+y*(0.15084934 +y*(0.2658733e-1+y*(0.301532e-2+y*0.32411e-3)))))); - } else + } + else { @@ -294,3 +318,4 @@ double Sheet::BesselK0(double x) ans=(-log(x/2.0)*BesselI0(x))+(-0.57721566+y*(0.42278420 +y*(0.23069756+y*(0.3488590e-1+y*(0.262698e-2 +y*(0.10750e-3+y*0.74e-5)))))); - } else + } + else { @@ -309,3 +334,4 @@ double Sheet::BesselK1(double x) ans=(log(x/2.0)*BesselI1(x))+(1.0/x)*(1.0+y*(0.15443144 +y*(-0.67278579+y*(-0.18156897+y*(-0.1919402e-1 +y*(-0.110404e-2+y*(-0.4686e-4))))))); - } else + } + else { @@ -344,3 +370,4 @@ double Sheet::BesselJ0(double x) ans=ans1/ans2; - } else + } + else { @@ -366,3 +393,4 @@ double Sheet::BesselY0(double x) ans=(ans1/ans2)+0.636619772*BesselJ0(x)*log(x); - } else + } + else { @@ -388,3 +416,4 @@ double Sheet::BesselJ1(double x) ans=ans1/ans2; - } else + } + else { @@ -409,3 +438,4 @@ double Sheet::BesselY1(double x) ans=(ans1/ans2)+0.636619772*(BesselJ1(x)*log(x)-1.0/x); - } else + } + else { @@ -460,3 +490,4 @@ double Sheet::BesselJ(int n, double x) ans=bj; - } else + } + else { @@ -520,3 +551,4 @@ double Sheet::GammaP(double a, double x) return gamser; - }else + } + else { @@ -546,3 +578,4 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln) return; - } else + } + else { @@ -560,3 +593,4 @@ void Sheet::GammaSeries(double *gamser, double a, double x, double *gln) } - } return; + } + return; return; @@ -664,3 +698,4 @@ double Sheet::functionSum(const QString ¶m1, const QString ¶m2) return result; - }else + } + else { @@ -791,3 +826,4 @@ double Sheet::functionSumSQ(const QString ¶m1, const QString ¶m2) return result; - }else + } + else { @@ -821,3 +857,4 @@ double Sheet::functionMin(const QString ¶m1, const QString ¶m2) return min; - }else + } + else { @@ -849,3 +886,4 @@ double Sheet::functionMax(const QString ¶m1, const QString ¶m2) return max; - }else + } + else { @@ -879,3 +917,4 @@ double Sheet::functionCount(const QString ¶m1, const QString ¶m2) return divider; - }else + } + else { @@ -994,3 +1033,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(text(row,col).length()==0) val1=1; else val1=0; - }else + } + else { @@ -999,3 +1039,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(text(row,col).length()==0) val1=1; else val1=0; - }else + } + else { @@ -1014,3 +1055,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(ok) val1=1; else val1=0; - }else + } + else { @@ -1020,3 +1062,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, if(ok) val1=1; else val1=0; - }else + } + else { @@ -1391,3 +1434,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, return QString(s1); - }else + } + else { @@ -1554,3 +1598,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, return QString::number(GammaQ(floor(val1)+1, val2)); - }else + } + else { @@ -1568,3 +1613,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, return QString::number(GammaP(val2/2.0,val1*val1/2.0)); - } else + } + else { @@ -1584,3 +1630,4 @@ QString Sheet::calculateFunction(const QString &func, const QString ¶meters, return QString::number(GammaP(val2/2.0,val1/2.0)); - } else + } + else { @@ -2387,3 +2434,4 @@ void Expression::GetNext() }//else if -};//end function +} +;//end function diff --git a/noncore/apps/opie-sheet/sheet.h b/noncore/apps/opie-sheet/sheet.h index f705cd0..92c8061 100644 --- a/noncore/apps/opie-sheet/sheet.h +++ b/noncore/apps/opie-sheet/sheet.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,2 +36,3 @@ +/* QT */ #include <qtable.h> diff --git a/noncore/apps/opie-sheet/sortdlg.cpp b/noncore/apps/opie-sheet/sortdlg.cpp index c2cdec8..47d666f 100644 --- a/noncore/apps/opie-sheet/sortdlg.cpp +++ b/noncore/apps/opie-sheet/sortdlg.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -14,2 +33,5 @@ +#include "sortdlg.h" + +/* QT */ #include <qlabel.h> @@ -17,3 +39,2 @@ #include <qmessagebox.h> -#include "sortdlg.h" @@ -57,4 +78,3 @@ SortDialog::SortDialog(QWidget *parent) SortDialog::~SortDialog() -{ -} +{} diff --git a/noncore/apps/opie-sheet/sortdlg.h b/noncore/apps/opie-sheet/sortdlg.h index b3699a9..5a1025e 100644 --- a/noncore/apps/opie-sheet/sortdlg.h +++ b/noncore/apps/opie-sheet/sortdlg.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,2 +36,5 @@ +#include "sheet.h" + +/* QT */ #include <qdialog.h> @@ -24,3 +46,2 @@ #include <qvbuttongroup.h> -#include "sheet.h" diff --git a/noncore/apps/opie-sheet/textdlg.cpp b/noncore/apps/opie-sheet/textdlg.cpp index 34cec29..020b9ae 100644 --- a/noncore/apps/opie-sheet/textdlg.cpp +++ b/noncore/apps/opie-sheet/textdlg.cpp @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -30,4 +49,3 @@ TextDialog::TextDialog(QWidget *parent) TextDialog::~TextDialog() -{ -} +{} diff --git a/noncore/apps/opie-sheet/textdlg.h b/noncore/apps/opie-sheet/textdlg.h index 78ef580..d54da16 100644 --- a/noncore/apps/opie-sheet/textdlg.h +++ b/noncore/apps/opie-sheet/textdlg.h @@ -1,9 +1,28 @@ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* + =. This file is part of the Opie Project + .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -17,2 +36,3 @@ +/* QT */ #include <qdialog.h> |