File indexing completed on 2024-05-12 16:35:56

0001 /* This file is part of the KDE project
0002    Copyright 2007 Ariya Hidayat <ariya@kde.org>
0003    Copyright 2006 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
0004    Copyright 2005 Tomas Mecir <mecirt@gmail.com>
0005 
0006    This library is free software; you can redistribute it and/or
0007    modify it under the terms of the GNU Library General Public
0008    License as published by the Free Software Foundation; only
0009    version 2 of the License.
0010 
0011    This library is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014    Library General Public License for more details.
0015 
0016    You should have received a copy of the GNU Library General Public License
0017    along with this library; see the file COPYING.LIB.  If not, write to
0018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019    Boston, MA 02110-1301, USA.
0020 */
0021 
0022 #ifndef CALLIGRA_SHEETS_TEST_OPENFORMULA
0023 #define CALLIGRA_SHEETS_TEST_OPENFORMULA
0024 
0025 #include <QObject>
0026 
0027 namespace Calligra
0028 {
0029 namespace Sheets
0030 {
0031 class Value;
0032 
0033 class TestOpenFormula: public QObject
0034 {
0035     Q_OBJECT
0036 
0037 private Q_SLOTS:
0038     void initTestCase();
0039     void testEvaluation();
0040     void testFormulaConversion();
0041     void testReferenceLoading();
0042     void testReferenceSaving();
0043 
0044 private:
0045     Value evaluate(const QString&, Value&);
0046     QString convertToOpenFormula(const QString& expr);
0047     QString convertFromOpenFormula(const QString& expr);
0048 };
0049 
0050 } // namespace Sheets
0051 } // namespace Calligra
0052 
0053 #endif // CALLIGRA_SHEETS_TEST_OPENFORMULA