[Libreoffice-commits] .: sc/qa
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Feb 16 19:01:47 PST 2011
sc/qa/unit/makefile.mk | 2 +-
sc/qa/unit/ucalc.cxx | 23 +++++++++++++----------
2 files changed, 14 insertions(+), 11 deletions(-)
New commits:
commit 3b2042234febaa522950f2f5173515316b3c7e3c
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 16 20:16:30 2011 -0500
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.
diff --git a/sc/qa/unit/makefile.mk b/sc/qa/unit/makefile.mk
index db06d45..a36e909 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 6e46569..ede76f9 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()
More information about the Libreoffice-commits
mailing list