[Libreoffice-commits] core.git: include/test test/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Thu Nov 17 08:55:12 UTC 2016


 include/test/screenshot_test.hxx |    3 +++
 test/source/screenshot_test.cxx  |    6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 9ed4f270d0135551a5fd7f9b93c0de8977936448
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Wed Nov 16 23:41:08 2016 +0100

    Put generated screenshots in lang-dependant subdir
    
    Change-Id: Ida481fcef52fa70390a539ab8f3a838a15084256
    Reviewed-on: https://gerrit.libreoffice.org/30913
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/include/test/screenshot_test.hxx b/include/test/screenshot_test.hxx
index 1868e18..5f8fbf8 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 df107b8..2077344 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(),


More information about the Libreoffice-commits mailing list