diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-08-23 18:11:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-08-24 09:28:32 +0200 |
commit | 66604baf08c47cc0c77ab3b9ee7e77f987c64722 (patch) | |
tree | 7bef8f275ffcb9557b97e84707478f0be880406a /test/source | |
parent | 844b3c067ccef7c8fcd38f4456689065dee5a447 (diff) |
Consistently use OUString in test::Directories
Change-Id: Ia5fd8af34ee9d2f37e4450ab241f6bb9a06445b2
Reviewed-on: https://gerrit.libreoffice.org/41466
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'test/source')
-rw-r--r-- | test/source/screenshot_test.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx index b0c73b3b5573..5c53e96738e5 100644 --- a/test/source/screenshot_test.cxx +++ b/test/source/screenshot_test.cxx @@ -54,7 +54,7 @@ void ScreenshotTest::setUp() mxDesktop = css::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is()); - osl::Directory::create( m_directories.getURLFromWorkdir( OUStringToOString(m_aScreenshotDirectory, RTL_TEXTENCODING_UTF8).getStr())) ; + osl::Directory::create( m_directories.getURLFromWorkdir( m_aScreenshotDirectory)) ; // initialize maKnownDialogs if (maKnownDialogs.empty()) @@ -70,8 +70,7 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString aDirname = m_aScreenshotDirectory + "/" + aDirname + ( (maCurrentLanguage == "en-US") ? OUString() : "/" + maCurrentLanguage ); - auto const path = m_directories.getURLFromWorkdir( - OUStringToOString(aDirname, RTL_TEXTENCODING_UTF8).getStr()); + auto const path = m_directories.getURLFromWorkdir(aDirname); auto const e = osl::Directory::createPath(path); if (e != osl::FileBase::E_EXIST) { CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -80,7 +79,7 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString osl::FileBase::E_None, e); } - OUString aFullPath = m_directories.getPathFromWorkdir(OUStringToOString("/" + aDirname + "/" + aBasename + ".png",RTL_TEXTENCODING_UTF8).getStr()); + OUString aFullPath = m_directories.getPathFromWorkdir("/" + aDirname + "/" + aBasename + ".png"); SvFileStream aNew(aFullPath, StreamMode::WRITE | StreamMode::TRUNC); CPPUNIT_ASSERT_MESSAGE(OUStringToOString("Failed to open <" + aFullPath + ">: " + OUString::number(sal_uInt32(aNew.GetErrorCode())), RTL_TEXTENCODING_UTF8).getStr(), aNew.IsOpen()); |