diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-01-30 01:58:32 -0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-31 04:31:10 +0100 |
commit | 7226ac25e2edb6ee27affd576f7aa600bb43520c (patch) | |
tree | e71f09dd1ab043caeac3ad474774c60836cd8b48 /test | |
parent | 11cfcf401a68cbaf5dfe0a309fd482d3a3fbdff6 (diff) |
Use a method from UnoApitest instead of implement a new one in calc
In calc, we see a lot of implementations of createFileURL. So get ride
of all it and start to use the UnoAPitest::createFileURL method.
Also, clean the UnoApiRest::createFileURL method, fix the path from UnoApiTest and
moved some testing files to the right dir that the file belongs.
Conflicts:
sc/qa/extras/scoutlineobj.cxx
Change-Id: Ic02f13777503729ac70da590f4a42866f17ea9b2
Diffstat (limited to 'test')
-rw-r--r-- | test/inc/test/unoapi_test.hxx | 2 | ||||
-rw-r--r-- | test/source/unoapi_test.cxx | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/test/inc/test/unoapi_test.hxx b/test/inc/test/unoapi_test.hxx index b3e341a188d2..b2ebb37f88f3 100644 --- a/test/inc/test/unoapi_test.hxx +++ b/test/inc/test/unoapi_test.hxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno; class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unotest::MacrosTest { public: - UnoApiTest(); + UnoApiTest(const OUString& path); void createFileURL(const rtl::OUString& aFileBase, rtl::OUString& rFilePath); diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index 81b961c2cc93..922ef2acc69f 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -32,8 +32,8 @@ #include <com/sun/star/frame/Desktop.hpp> #include <comphelper/processfactory.hxx> -UnoApiTest::UnoApiTest() - : m_aBaseString(RTL_CONSTASCII_USTRINGPARAM("/sc/qa/extras/testdocuments")) +UnoApiTest::UnoApiTest(const OUString& path) + : m_aBaseString(path) { } @@ -58,12 +58,7 @@ void UnoApiTest::tearDown() void UnoApiTest::createFileURL(const rtl::OUString& aFileBase, rtl::OUString& rFilePath) { - rtl::OUString aSep(RTL_CONSTASCII_USTRINGPARAM("/")); - rtl::OUStringBuffer aBuffer( getSrcRootURL() ); - rtl::OUString aFileExtension(RTL_CONSTASCII_USTRINGPARAM("ods")); - aBuffer.append(m_aBaseString).append(aSep); - aBuffer.append(aFileBase); - rFilePath = aBuffer.makeStringAndClear(); + rFilePath = getSrcRootURL() + m_aBaseString + "/" + aFileBase; } void UnoApiTest::closeDocument( uno::Reference< lang::XComponent > xDocument ) |