summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-23 09:11:56 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-06 09:06:48 +0000
commitde1cb4039756f71d848297981b757c1cfa4609b1 (patch)
treec36c057ec9a659e78b52943a528049b39a45b98e /sw
parent6b3b080f8cedc1b496022b18e477af0c7361fba3 (diff)
Resolves: tdf#76964 fall back to primary language via getLanguage
instead of bittwiddling which ends up trying to resolve the system language (cherry picked from commit a1ff0745cc4f78777e8dba1e7bb52d18386d7394) more tdf#76964 fall back to primary language via getLanguage (cherry picked from commit 97893e56e61a466e56d12ee46d11f6e4c32a737b) sw: fix SwUiWriterTest pointlessly loading an "empty.odt" ... ... instead of just creating a new document. (cherry picked from commit 98ddd7a32fd0d5fa080fac368b9dc53a06659285) Change-Id: I545bd5e39f99003ddedf3c90031e8b818edc1de2 Reviewed-on: https://gerrit.libreoffice.org/19545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx12
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx5
2 files changed, 12 insertions, 5 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index a3bda095bf37..6b91c23e8f4d 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -572,14 +572,20 @@ protected:
void load(const char* pDir, const char* pName)
{
+ return loadURL(getURLFromSrc(pDir) + OUString::createFromAscii(pName), pName);
+ }
+
+ void loadURL(OUString const& rURL, const char* pName)
+ {
if (mxComponent.is())
mxComponent->dispose();
// Output name early, so in the case of a hang, the name of the hanging input file is visible.
- std::cout << pName << ",";
+ if (pName)
+ std::cout << pName << ",";
mnStartTime = osl_getGlobalTimer();
- mxComponent = loadFromDesktop(getURLFromSrc(pDir) + OUString::createFromAscii(pName), "com.sun.star.text.TextDocument");
+ mxComponent = loadFromDesktop(rURL, "com.sun.star.text.TextDocument");
discardDumpedLayout();
- if (mustCalcLayoutOf(pName))
+ if (pName && mustCalcLayoutOf(pName))
calcLayout();
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 364439b7ba56..9d0d1b1cecdf 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -156,8 +156,9 @@ private:
SwDoc* SwUiWriterTest::createDoc(const char* pName)
{
if (!pName)
- pName = "empty.odt";
- load(DATA_DIRECTORY, pName);
+ loadURL("private:factory/swriter", nullptr);
+ else
+ load(DATA_DIRECTORY, pName);
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);