summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorDaniel Arato (NISZ) <arato.daniel@nisz.hu>2020-09-02 15:46:56 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-15 12:55:59 +0200
commit2048a2c268125f17a440ec449df4030b91758172 (patch)
tree49a86a8b2117aaf5ceb378f04ab7a797c76c795c /sw/qa
parent22886babfdb9fad2e50d40e04250d54366a9a708 (diff)
tdf#135665 DOCX: import tight wrap setting of VML shapes
The wrap setting that OOXML calls "tight" and LibreOffice calls "contour" (== true) was not supported by the import code, only the export. Change-Id: I48739ffaad48e28df05fd87a9b51a14238dc47e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101932 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 4b7ee7bd61f78be60211cc72ba36da987191266e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102124 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf135665.docxbin0 -> 25099 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx17
2 files changed, 15 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf135665.docx b/sw/qa/extras/ooxmlexport/data/tdf135665.docx
new file mode 100644
index 000000000000..2400a1c1a46c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf135665.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 792e919394b7..ab204e9c5e67 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -41,7 +41,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt")
CPPUNIT_ASSERT_EQUAL(1, getPages());
}
-DECLARE_OOXMLIMPORT_TEST(testTdf131801, "tdf131801.docx")
+DECLARE_OOXMLEXPORT_TEST(testTdf131801, "tdf131801.docx")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -126,6 +126,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/Text[3]", "nWidth").toInt32());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx")
+{
+ uno::Reference<beans::XPropertySet> xOLEProps1(getShape(1), uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xOLEProps2(getShape(2), uno::UNO_QUERY_THROW);
+ bool bSurroundContour1 = false;
+ bool bSurroundContour2 = false;
+ xOLEProps1->getPropertyValue("SurroundContour") >>= bSurroundContour1;
+ xOLEProps2->getPropertyValue("SurroundContour") >>= bSurroundContour2;
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", true, bSurroundContour1);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", false, bSurroundContour2);
+}
+
DECLARE_OOXMLEXPORT_TEST(testAtPageShapeRelOrientation, "rotated_shape.fodt")
{
// invalid combination of at-page anchor and horizontal-rel="paragraph"
@@ -179,7 +192,7 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginHasFooter,
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1147), nAnchoredHeight);
}
-DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx")
+DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx")
{
uno::Reference<beans::XPropertySet> xOLEProps(getShape(1), uno::UNO_QUERY_THROW);
sal_Int16 nVRelPos = -1;