summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/test/screenshot_test.hxx3
-rw-r--r--test/source/screenshot_test.cxx6
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(),