diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-11-16 23:41:08 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-11-17 08:54:41 +0000 |
commit | 9ed4f270d0135551a5fd7f9b93c0de8977936448 (patch) | |
tree | 1e5848399c46c60eef304ba55ab79ce34bd8185f | |
parent | 53778372a269da7c51958a7e234df4d41027fb77 (diff) |
Put generated screenshots in lang-dependant subdir
Change-Id: Ida481fcef52fa70390a539ab8f3a838a15084256
Reviewed-on: https://gerrit.libreoffice.org/30913
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | include/test/screenshot_test.hxx | 3 | ||||
-rw-r--r-- | test/source/screenshot_test.cxx | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx index 1868e18eab28..5f8fbf89f022 100644 --- a/include/test/screenshot_test.hxx +++ b/include/test/screenshot_test.hxx @@ -27,6 +27,9 @@ private: /// the target directory for screenshots OUString m_aScreenshotDirectory; + /// The current UI language + OUString maCurrentLanguage; + /// the set of known dialogs and their ID for usage in createDialogByID mapType maKnownDialogs; diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx index df107b8f080d..2077344199b9 100644 --- a/test/source/screenshot_test.cxx +++ b/test/source/screenshot_test.cxx @@ -15,6 +15,8 @@ #include <vcl/abstdlg.hxx> #include <vcl/pngwrite.hxx> #include <vcl/svapp.hxx> +#include <unotools/syslocaleoptions.hxx> + namespace { void splitHelpId( const OString& rHelpId, OUString& rDirname, OUString &rBasename ) @@ -36,6 +38,8 @@ ScreenshotTest::ScreenshotTest() : m_aScreenshotDirectory("/workdir/screenshots/"), maKnownDialogs() { + SvtSysLocaleOptions localeOptions; + maCurrentLanguage = localeOptions.GetLocaleConfigString(); } ScreenshotTest::~ScreenshotTest() @@ -63,7 +67,7 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString { OUString aDirname, aBasename; splitHelpId(rScreenshotId, aDirname, aBasename); - aDirname = m_aScreenshotDirectory + aDirname; + aDirname = m_aScreenshotDirectory + maCurrentLanguage + "/" + aDirname; osl::FileBase::RC err = osl::Directory::createPath(m_directories.getURLFromSrc(aDirname)); CPPUNIT_ASSERT_MESSAGE(OUStringToOString("Failed to create " + aDirname, RTL_TEXTENCODING_UTF8).getStr(), |