summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/ww8export/ww8export4.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sw/qa/extras/ww8export/ww8export4.cxx51
1 files changed, 51 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx
new file mode 100644
index 000000000..7a19938ca
--- /dev/null
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+#include <comphelper/sequenceashashmap.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <docsh.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <unotxdoc.hxx>
+
+class Test : public SwModelTestBase
+{
+public:
+ Test()
+ : SwModelTestBase("/sw/qa/extras/ww8export/data/", "MS Word 97")
+ {
+ }
+
+ bool mustTestImportOf(const char* filename) const override
+ {
+ // If the testcase is stored in some other format, it's pointless to test.
+ return o3tl::ends_with(filename, ".doc");
+ }
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf77964)
+{
+ loadAndReload("tdf77964.doc");
+ // both images were loading as AT_PARA instead of AS_CHAR. Image2 visually had text wrapping.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShapeByName(u"Image2"), "AnchorType"));
+}
+
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */