[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/plugins/textshape/tests
From: Thomas Zander <zander () kde ! org>
Date: 2010-09-12 20:56:11
Message-ID: 20100912205611.8BA12AC888 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1174571 by zander:
Move mock text shape out to its own file and add license
A MockTextShape.h [License: GPL (v2+)]
M +19 -0 TestDocumentLayout.cpp
M +20 -21 TestDocumentLayout.h
--- trunk/koffice/plugins/textshape/tests/TestDocumentLayout.cpp #1174570:1174571
@@ -1,3 +1,22 @@
+/*
+ * This file is part of KOffice tests
+ *
+ * Copyright (C) 2006-2010 Thomas Zander <zander@kde.org>
+ *
+ * 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 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
#include "TestDocumentLayout.h"
#include <KoParagraphStyle.h>
--- trunk/koffice/plugins/textshape/tests/TestDocumentLayout.h #1174570:1174571
@@ -1,3 +1,22 @@
+/*
+ * This file is part of KOffice tests
+ *
+ * Copyright (C) 2006-2010 Thomas Zander <zander@kde.org>
+ *
+ * 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 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
#ifndef TESTDOCUMENTAYOUT_H
#define TESTDOCUMENTAYOUT_H
@@ -5,7 +24,7 @@
#include <qtest_kde.h>
#include "../Layout.h"
-#include "../TextShape.h"
+#include "MockTextShape.h"
#include <KoTextShapeData.h>
#include <KoTextDocumentLayout.h>
@@ -14,7 +33,6 @@
class QPainter;
class KoViewConverter;
class KoStyleManager;
-class MockTextShape;
class QTextDocument;
class QTextLayout;
@@ -95,23 +113,4 @@
Layout *m_textLayout;
};
-class MockTextShape : public TextShape
-{
-public:
- MockTextShape()
- : TextShape(0)
- {
- layout = qobject_cast<KoTextDocumentLayout*>(textShapeData()->document()->documentLayout());
- }
- void paint(QPainter &painter, const KoViewConverter &converter) {
- Q_UNUSED(painter);
- Q_UNUSED(converter);
- }
- virtual void saveOdf(KoShapeSavingContext &) const {}
- virtual bool loadOdf(const KoXmlElement &, KoShapeLoadingContext &) {
- return true;
- }
- KoTextDocumentLayout *layout;
-};
-
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic