[Libreoffice-commits] .: sw/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Feb 18 01:44:53 PST 2011
sw/qa/core/swdoc-test.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 0622845a56a3fa7cf4a586da8194e9fe332fae0f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Feb 17 20:45:49 2011 +0000
tidy test
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 5e70d64..3dd3007 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -52,6 +52,7 @@
#include <sfx2/sfxmodelfactory.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
+#include <ucbhelper/contentbroker.hxx>
#include "init.hxx"
#include "swtypes.hxx"
@@ -122,10 +123,10 @@ void SwDocTest::testFileNameFields()
INetURLObject aTempFileURL(aTempFile.GetURL());
String sFileURL = aTempFileURL.GetMainURL(INetURLObject::NO_DECODE);
- SfxMedium* pDstMed = new SfxMedium(sFileURL, STREAM_STD_READWRITE, true);
+ SfxMedium aDstMed(sFileURL, STREAM_STD_READWRITE, true);
- m_xDocShRef->DoSaveAs(*pDstMed);
- m_xDocShRef->DoSaveCompleted(pDstMed);
+ m_xDocShRef->DoSaveAs(aDstMed);
+ m_xDocShRef->DoSaveCompleted(&aDstMed);
const INetURLObject &rUrlObj = m_xDocShRef->GetMedium()->GetURLObject();
@@ -160,6 +161,8 @@ void SwDocTest::testFileNameFields()
sExpected = sExpected.copy(0, sExpected.getLength() - 4);
CPPUNIT_ASSERT_MESSAGE("Expected Readable FileName", sResult == sExpected);
}
+
+ m_xDocShRef->DoInitNew(0);
}
void SwDocTest::randomTest()
More information about the Libreoffice-commits
mailing list