summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorAttila Bakos <bakos.attilakaroly@nisz.hu>2020-03-19 14:40:36 +0100
committerLászló Németh <nemeth@numbertext.org>2020-04-07 12:44:17 +0200
commit27d04f6dbf38aa28fb7215590d578c4567db5770 (patch)
tree1243823be2e628f88b10492ba9f68836e6793af0 /sw/qa
parent9977fbeed1461a8f5cfa8029c02e914c099f3230 (diff)
tdf#119038 DOCX: fix FollowTextFlow handling
This fix also a clean-up for the following commits: ad8857dab30e099a0cf6ec18d184a6c836b33317 (tdf#130120 DOCX: export o:allowincell) 14ad64270e4fbca3c24da6f55f260b1fb229556a (tdf#129888 DOCX shape import: handle o:allowincell) 10f29d8bf05d44ca8bc11d34d1294ec17f8ac0f1 (tdf#87569 tdf#109411 DOCX import: fix shape anchor in tables) where these patches ignored the option "Follow text flow" and there was no possibility to switch this setting on GUI. Now this is handled on GUI as well by replacing the grab-bag with UNO property "IsFollowingTextFlow". The tdf#119038 bug also fixed. Note: Unit tests for the commits mentioned above were modified for testing the new property, so new tests were not added. Change-Id: Ie35c6e280f8b33d8535ca4cd9749f110f9d592ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90753 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index e59b25a430a6..abac561df575 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -98,10 +98,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf129888vml, "tdf129888vml.docx")
//to be calculated from the page frame instead of the table:
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
- sal_Int16 nValue;
- xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf129888vml The line shape has bad place!",
- text::RelOrientation::PAGE_FRAME, nValue);
+ false, bValue);
}
DECLARE_OOXMLIMPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
@@ -112,18 +112,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
//to be calculated from the page frame instead of the table:
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
- sal_Int16 nValue;
- xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf129888dml The shape has bad place!",
- text::RelOrientation::PAGE_FRAME, nValue);
+ false, bValue);
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130120, "tdf130120.docx")
{
- //Text for exporting the allowincell attribute:
+ //Text for exporting the allowincell attribute:
xmlDocPtr p_XmlDoc = parseExport("word/document.xml");
assertXPath(p_XmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/mc:AlternateContent/"
- "mc:Choice/w:drawing/wp:anchor","layoutInCell","0");
+ "mc:Choice/w:drawing/wp:anchor", "layoutInCell", "0");
}
@@ -131,10 +131,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569v, "tdf87569_vml.docx")
{
//the original tdf87569 sample has vml shapes...
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
- sal_Int16 nValue;
- xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf87569_vml: The Shape is not in the table!",
- text::RelOrientation::FRAME, nValue);
+ true, bValue);
}
DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.docx")
@@ -249,10 +249,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569d, "tdf87569_drawingml.docx")
{
//if the original tdf87569 sample is upgraded it will have drawingml shapes...
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
- sal_Int16 nValue;
- xShapeProperties->getPropertyValue("HoriOrientRelation") >>= nValue;
+ bool bValue;
+ xShapeProperties->getPropertyValue("IsFollowingTextFlow") >>= bValue;
CPPUNIT_ASSERT_EQUAL_MESSAGE("tdf87569_drawingml: The Shape is not in the table!",
- text::RelOrientation::FRAME, nValue);
+ true, bValue);
}
DECLARE_OOXMLEXPORT_TEST(testTdf130610, "tdf130610_bold_in_2_styles.ott")