From 74917d23782413aa0f129bcf9e6bf5a1c496d23b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 2 Apr 2017 21:05:48 +0100 Subject: split up doc testing for three major variants Change-Id: Iac1b5cb1c209ba27d185c8a7ba1e59c663553d77 --- vcl/workben/fftester.cxx | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) (limited to 'vcl') 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( - aLibrary.getFunctionSymbol("TestImportDOC")); + pfnImport = reinterpret_cast( + 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( + 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( + aLibrary.getFunctionSymbol("TestImportWW2")); + aLibrary.release(); + } + SvFileStream aFileStream(out, StreamMode::READ); + ret = (int) (*pfnImport)(aFileStream); } else if (strcmp(argv[2], "rtf") == 0) { -- cgit