[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Mar 8 16:44:07 UTC 2019


 sw/qa/core/test_ToxTextGenerator.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit c1a0cd9f3272f484a15ab2d6c1d9fe727a2b27f1
Author:     marxin <mliska at suse.cz>
AuthorDate: Thu Mar 7 09:28:14 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 8 17:43:33 2019 +0100

    Fix LTO segfault in libtest_sw_uwriter test.
    
    The problem was seen here:
    https://bugzilla.suse.com/show_bug.cgi?id=1127857.
    
    One needs to call SwGlobals::ensure in order to initialize
    SfxApplication via SfxApplication::SetModule(SfxToolsModule::Writer.
    
    Change-Id: I3add24b56dc44a93ad81c1b52539da821f6244fc
    Reviewed-on: https://gerrit.libreoffice.org/68841
    Reviewed-by: Tomáš Chvátal <tchvatal at suse.cz>
    Tested-by: Tomáš Chvátal <tchvatal at suse.cz>
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/qa/core/test_ToxTextGenerator.cxx b/sw/qa/core/test_ToxTextGenerator.cxx
index 25304a382ed3..ffe76233282e 100644
--- a/sw/qa/core/test_ToxTextGenerator.cxx
+++ b/sw/qa/core/test_ToxTextGenerator.cxx
@@ -22,10 +22,17 @@
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/plugin/TestPlugIn.h>
 
+#include <swdll.hxx>
+
 using namespace sw;
 
 class ToxTextGeneratorTest : public CppUnit::TestFixture {
 public:
+    virtual void setUp() override
+    {
+        SwGlobals::ensure();
+    }
+
     void EmptyStringIsReturnedForPageNumberPlaceholderOfZeroItems();
     void OneAtSignIsReturnedForPageNumberPlaceholderOfOneItem();
     void TwoAtSignsAreReturnedForPageNumberPlaceholderOfOneItem();


More information about the Libreoffice-commits mailing list