sw/qa/extras/ww8export/data/btlr-frame.odt |binary sw/qa/extras/ww8export/ww8export3.cxx | 14 ++++++++++++++ sw/source/filter/ww8/wrtw8esh.cxx | 3 +++ 3 files changed, 17 insertions(+)
New commits: commit 30e58e6c530916c2b125452f9cb6f7b837c07c67 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Aug 8 20:32:23 2019 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Aug 9 17:30:05 2019 +0200 sw btlr writing mode: handle DOC export of textframes DOC import is somewhat working: the rendering result is OK, but it would be rather better to convert the btlr direction to a Writer text frame as well, later. Reviewed-on: https://gerrit.libreoffice.org/77175 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 29bd64dd93150cfbec646f5af7c75996fd15d8e5) Conflicts: sw/qa/extras/ww8export/ww8export3.cxx Change-Id: I37ad2e8b70c5eef655c1f00922360c0105a69158 Reviewed-on: https://gerrit.libreoffice.org/77202 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/qa/extras/ww8export/data/btlr-frame.odt b/sw/qa/extras/ww8export/data/btlr-frame.odt new file mode 100644 index 000000000000..31cb03849c53 Binary files /dev/null and b/sw/qa/extras/ww8export/data/btlr-frame.odt differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index ab03906eaede..42c2b1ac6072 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -240,6 +240,20 @@ DECLARE_WW8EXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.doc") getProperty<OUString>(getRun(xPara, 5), "TextPortionType")); } +DECLARE_WW8EXPORT_TEST(testBtlrFrame, "btlr-frame.odt") +{ + if (!mbExported) + { + return; + } + + // Without the accompanying fix in place, this test would have failed with a + // beans.UnknownPropertyException, as the writing direction was lost, so the default direction + // resulted in a conversion to a Writer text frame. + uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(9000), getProperty<sal_Int32>(xFrame, "RotateAngle")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 849ede23b070..31d5279fe54b 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2885,6 +2885,9 @@ sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId case SvxFrameDirection::Vertical_RL_TB: nFlow=mso_txflTtoBA; break; + case SvxFrameDirection::Vertical_LR_BT: + nFlow = mso_txflBtoT; + break; } aPropOpt.AddOpt( ESCHER_Prop_txflTextFlow, nFlow ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
