summaryrefslogtreecommitdiffstats
path: root/sc/qa
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-02-16 20:16:30 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-02-16 22:01:19 -0500
commit11b2bfe3ddd0f681d273288deff8c15f73a21fb0 (patch)
tree1e6fdd8e7f289dce918af4301ce5a9319a049a6f /sc/qa
parentRemove BLC support (diff)
downloadcore-11b2bfe3ddd0f681d273288deff8c15f73a21fb0.tar.gz
core-11b2bfe3ddd0f681d273288deff8c15f73a21fb0.zip
Create an ScDocShell instance, and take the ScDocument instance from it.
Also, we normally use #include "foo.hxx" style include for module local headers, to distinguish them from system headers or external module headers.
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/makefile.mk2
-rw-r--r--sc/qa/unit/ucalc.cxx23
2 files changed, 14 insertions, 11 deletions
diff --git a/sc/qa/unit/makefile.mk b/sc/qa/unit/makefile.mk
index db06d453c938..a36e909d7664 100644
--- a/sc/qa/unit/makefile.mk
+++ b/sc/qa/unit/makefile.mk
@@ -35,7 +35,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS) -I../../source/ui/inc
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/ucalc.obj
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 53b05d3a3da1..3df147723f76 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -58,15 +58,16 @@
#include <comphelper/processfactory.hxx>
#include <vcl/svapp.hxx>
-#include <scdll.hxx>
-#include <document.hxx>
-#include <stringutil.hxx>
-#include <scmatrix.hxx>
-#include <drwlayer.hxx>
+#include "scdll.hxx"
+#include "document.hxx"
+#include "stringutil.hxx"
+#include "scmatrix.hxx"
+#include "drwlayer.hxx"
+#include "docsh.hxx"
-#include <dpshttab.hxx>
-#include <dpobject.hxx>
-#include <dpsave.hxx>
+#include "dpshttab.hxx"
+#include "dpobject.hxx"
+#include "dpsave.hxx"
#include <svx/svdograf.hxx>
#include <svx/svdpage.hxx>
@@ -235,6 +236,7 @@ public:
private:
uno::Reference< uno::XComponentContext > m_xContext;
ScDocument *m_pDoc;
+ ScDocShellRef m_pDocShellRef;
};
Test::Test()
@@ -257,12 +259,13 @@ Test::Test()
void Test::setUp()
{
- m_pDoc = new ScDocument;
+ m_pDocShellRef = new ScDocShell;
+ m_pDoc = m_pDocShellRef->GetDocument();
}
void Test::tearDown()
{
- delete m_pDoc;
+ m_pDocShellRef.Clear();
}
Test::~Test()