summaryrefslogtreecommitdiff
path: root/sw/qa/core
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-05 14:38:43 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-05 14:40:58 -0500
commit7d3ddc2c6cc39fdd671f08059528464675cd6ecc (patch)
treeb5e941937065d769dc9bdaa0ce144d1f91585360 /sw/qa/core
parenta0dd5a8d6a9213ad40d738f8639e1500a1b59caa (diff)
Pass DocumentService to the loader during macro tests.
And disable user interaction during type detection, since that would cause the test to fail. With this change, 'make check' works once again. Change-Id: I2f45a2e962e45ee64f7984e794cff814fbfe6dab
Diffstat (limited to 'sw/qa/core')
-rw-r--r--sw/qa/core/layout-test.cxx2
-rw-r--r--sw/qa/core/macros-test.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/core/layout-test.cxx b/sw/qa/core/layout-test.cxx
index 188d5942b9a7..673e86653db5 100644
--- a/sw/qa/core/layout-test.cxx
+++ b/sw/qa/core/layout-test.cxx
@@ -89,7 +89,7 @@ void SwLayoutTest::test()
rtl::OUString aFileBase(RTL_CONSTASCII_USTRINGPARAM("test."));
rtl::OUString aExtension(RTL_CONSTASCII_USTRINGPARAM("odt"));
createFileURL(aFileBase, aExtension, aFilePath);
- uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFilePath);
+ uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFilePath, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(xComponent.is());
}
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 1f127d09a8b6..036d2d236f87 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -117,7 +117,7 @@ void SwMacrosTest::testStarBasic()
rtl::OUString aFileExtension(aFileFormats[0].pName, strlen(aFileFormats[0].pName), RTL_TEXTENCODING_UTF8 );
rtl::OUString aFileName;
createFileURL(aFileNameBase, aFileExtension, aFileName);
- uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName);
+ uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is());
@@ -151,7 +151,7 @@ void SwMacrosTest::testVba()
{
rtl::OUString aFileName;
createFileURL(testInfo[i].sFileBaseName, aFileExtension, aFileName);
- uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName);
+ uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
rtl::OUStringBuffer sMsg( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Failed to load ")) );
sMsg.append ( aFileName );
CPPUNIT_ASSERT_MESSAGE( rtl::OUStringToOString( sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );