From 1712337d4dbdca7453a8ff701d429637edb9934b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 14 Jan 2013 15:08:22 -0500 Subject: Add new unit test to test pivot table functionalities via ScDBDocFunc. This change also introduces the following changes: 1) Special initialization routine just for the unit test runs. In particular, SfxMedium instance needs to be set even for a brand-new document (as in the actual run-time), or else the document would be always labeled "read-only". This prevented us from testing various code in Calc, which this commit fixes. 2) Several cppunit checks that checked for incorrect results, which passed because we happened to be getting those incorrect results due to the issue with the SfxMedium instance not being set. 3) Unfortunately now the test for cell function MATCH fails for some mysterious reason. The test is disabled temporarily until we figure this out. Change-Id: If231fd99e0ffddcd74f65c7cb5476e7a25f0ac7d --- sfx2/source/doc/objstor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sfx2/source/doc') diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 059bf5b20eb6..1a03a3bd0ad7 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -447,6 +447,12 @@ sal_Bool SfxObjectShell::Load( SfxMedium& rMedium ) return GeneralInit_Impl( rMedium.GetStorage(), sal_True ); } +bool SfxObjectShell::DoInitUnitTest() +{ + pMedium = new SfxMedium; + return true; // always a success! +} + sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) /* [Description] -- cgit