[Libreoffice-commits] core.git: starmath/qa
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Feb 28 08:59:00 PST 2014
starmath/qa/cppunit/test_nodetotextvisitors.cxx | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
New commits:
commit a7a47272b962543dc5bbd3c2f42e889c4f58ef96
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Fri Feb 28 11:11:10 2014 +0000
TestOutputDevice can't set meOutDevType
One of the StarMath tests was very broken - the issue is in formula tester. It
basically sets up its own derived TestOutputDevice. Because it doesn't set
meOutDevType (and can't as that's a private member function - I note this whole
design is *broken* but I digress) a few things can't get access to a
SalGraphics instance. This is fixed by removing the class and changing it to a
VirtualDevice - the test runs under headless mode anyway
Change-Id: I3d6eba793386e6db3f053aa4e6aab9a4d1c63fc3
Reviewed-on: https://gerrit.libreoffice.org/8395
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 99ae4b2..62b37fc 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -21,14 +21,6 @@
SV_DECL_REF(SmDocShell)
SV_IMPL_REF(SmDocShell)
-class TestOutputDevice : public OutputDevice
-{
-public:
- TestOutputDevice()
- {
- }
-};
-
using namespace ::com::sun::star;
namespace {
@@ -510,7 +502,7 @@ void Test::testBinomInBinHor()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- TestOutputDevice aOutputDevice;
+ VirtualDevice aOutputDevice;
// move forward (more than) enough places to be at the end
int i;
@@ -538,7 +530,7 @@ void Test::testBinVerInUnary()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- TestOutputDevice aOutputDevice;
+ VirtualDevice aOutputDevice;
// move forward (more than) enough places to be at the end
int i;
@@ -567,7 +559,7 @@ void Test::testBinHorInSubSup()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- TestOutputDevice aOutputDevice;
+ VirtualDevice aOutputDevice;
// Insert an RSup expression with a BinHor for the exponent
aCursor.InsertText("a");
@@ -595,7 +587,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- TestOutputDevice aOutputDevice;
+ VirtualDevice aOutputDevice;
// move forward (more than) enough places to be at the end
for (size_t i = 0; i < 3; ++i)
More information about the Libreoffice-commits
mailing list