summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-28 21:44:36 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-28 21:55:14 +0200
commit125cbcbe6bbcf1cad7d885f0f6d3da5947d7fbbe (patch)
treeddba69ba595ecf10b55c88bfbb5a00135758bbf5 /sw
parenta6e28fe9c6fa8ce8be4fc9a839f1a3b55644dacd (diff)
sw: fix htmlexport test failure
Somehow this test failed on Windows, because of restoring a "NONE" field unit to SW_MOD()... apparently the "charborder.odt" test is run first, and preTest() sees a null SW_MOD() then postTest restores a NONE metric. Hack around that by calling SwGlobals::ensure() to create SW_MOD(). Change-Id: I6c0cda3aae397071bca16bf0e5d9f8105635550f
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swdll.hxx4
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx5
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx
index 707a2560a212..9f5dddfb77b7 100644
--- a/sw/inc/swdll.hxx
+++ b/sw/inc/swdll.hxx
@@ -22,6 +22,8 @@
#include <sfx2/sfxdefs.hxx>
#include <sfx2/module.hxx>
+#include <swdllapi.h>
+
namespace sw { class Filters; }
/**
@@ -31,7 +33,7 @@ namespace sw { class Filters; }
*/
namespace SwGlobals
{
- void ensure();
+ void SW_DLLPUBLIC ensure();
sw::Filters & getFilters();
}
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 9cfde5d082d7..bd0f15bfd18e 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -51,9 +51,10 @@ private:
else
setFilterOptions("");
- if (OString(filename) == "charborder.odt" && SW_MOD())
+ if (OString(filename) == "charborder.odt")
{
// FIXME if padding-top gets exported as inches, not cms, we get rounding errors.
+ SwGlobals::ensure(); // make sure that SW_MOD() is not 0
SwMasterUsrPref* pPref = const_cast<SwMasterUsrPref*>(SW_MOD()->GetUsrPref(false));
m_eUnit = pPref->GetMetric();
pPref->SetMetric(FUNIT_CM);
@@ -62,7 +63,7 @@ private:
void postTest(const char* filename) SAL_OVERRIDE
{
- if (OString(filename) == "charborder.odt" && SW_MOD())
+ if (OString(filename) == "charborder.odt")
{
SwMasterUsrPref* pPref = const_cast<SwMasterUsrPref*>(SW_MOD()->GetUsrPref(false));
pPref->SetMetric(m_eUnit);