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 29bd64dd93150cfbec646f5af7c75996fd15d8e5 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Aug 8 20:32:23 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 9 09:10:33 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. Change-Id: I37ad2e8b70c5eef655c1f00922360c0105a69158 Reviewed-on: https://gerrit.libreoffice.org/77175 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> 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 a38424cc3ce1..b8a6d4056d13 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -294,6 +294,20 @@ DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt") CPPUNIT_ASSERT(abs(xSize.Width - 17000) <= 6); } +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 919ff1fd46b0..422e007a1cbc 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2882,6 +2882,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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits