summaryrefslogtreecommitdiff
path: root/vcl/workben/fftester.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-02 21:05:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-02 22:48:55 +0100
commit74917d23782413aa0f129bcf9e6bf5a1c496d23b (patch)
tree6bfbc097ccc73d254e49333c273310929aedfb6a /vcl/workben/fftester.cxx
parent6fd66ad94040d46904eba8f2ac2b4270787a756a (diff)
split up doc testing for three major variants
Change-Id: Iac1b5cb1c209ba27d185c8a7ba1e59c663553d77
Diffstat (limited to 'vcl/workben/fftester.cxx')
-rw-r--r--vcl/workben/fftester.cxx47
1 files changed, 34 insertions, 13 deletions
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 63e33e14b735..636970f6ee48 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -323,26 +323,47 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream, aGraphic, nullptr);
}
- else if ( (strcmp(argv[2], "doc") == 0) ||
- (strcmp(argv[2], "ww8") == 0) ||
- (strcmp(argv[2], "ww6") == 0) ||
- (strcmp(argv[2], "ww2") == 0) )
+ else if ((strcmp(argv[2], "doc") == 0) || (strcmp(argv[2], "ww8") == 0))
{
- static WFilterCall pfnImport(nullptr);
+ static FFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY);
- pfnImport = reinterpret_cast<WFilterCall>(
- aLibrary.getFunctionSymbol("TestImportDOC"));
+ pfnImport = reinterpret_cast<FFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportWW8"));
+ aLibrary.release();
+ }
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream);
+ }
+ else if (strcmp(argv[2], "ww6") == 0)
+ {
+ static FFilterCall pfnImport(nullptr);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<FFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportWW6"));
aLibrary.release();
}
- if (strcmp(argv[2], "ww6") == 0)
- ret = (int) (*pfnImport)(out, OUString("CWW6"));
- else if (strcmp(argv[2], "ww2") == 0)
- ret = (int) (*pfnImport)(out, OUString("WW6"));
- else
- ret = (int) (*pfnImport)(out, OUString("CWW8"));
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream);
+ }
+ else if (strcmp(argv[2], "ww2") == 0)
+ {
+ static FFilterCall pfnImport(nullptr);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libmswordlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<FFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportWW2"));
+ aLibrary.release();
+ }
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream);
}
else if (strcmp(argv[2], "rtf") == 0)
{