diff options
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-x | sw/qa/extras/ww8import/data/tdf110987 | bin | 0 -> 9216 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/tdf110987 b/sw/qa/extras/ww8import/data/tdf110987 Binary files differnew file mode 100755 index 000000000000..16195c0e1579 --- /dev/null +++ b/sw/qa/extras/ww8import/data/tdf110987 diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 76eb495bb499..31cfce841d3c 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -16,6 +16,8 @@ #include <editeng/boxitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> +#include <sfx2/docfile.hxx> +#include <sfx2/docfilt.hxx> class Test : public SwModelTestBase { @@ -248,6 +250,17 @@ DECLARE_WW8IMPORT_TEST(testTdf122425_2, "tdf122425_2.doc") } } +DECLARE_WW8IMPORT_TEST(testTdf110987, "tdf110987") +{ + // The input document is an empty .doc, but without file name + // extension. Check that it was loaded as a normal .doc document, + // and not a template. + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + OUString s = pTextDoc->GetDocShell()->GetMedium()->GetFilter()->GetFilterName(); + CPPUNIT_ASSERT(s != "MS Word 97 Vorlage"); +} + // tests should only be added to ww8IMPORT *if* they fail round-tripping in ww8EXPORT CPPUNIT_PLUGIN_IMPLEMENT(); |