sw/qa/extras/ooxmlexport/data/btlr-frame.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |   10 ++++++++++
 sw/source/filter/ww8/docxsdrexport.cxx       |    2 ++
 3 files changed, 12 insertions(+)

New commits:
commit 6a4b7d1e658b4515ec9a2fe3604dd4ead4c0fec8
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu Jul 25 21:28:04 2019 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Jul 26 08:32:45 2019 +0200

    sw btlr writing mode: DOCX export of Writer textframes
    
    Do it the same way as tbrl is already handled.
    
    Change-Id: I7daad962c6349874357c38801c15adadfe8c3a50
    Reviewed-on: https://gerrit.libreoffice.org/76342
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/data/btlr-frame.odt 
b/sw/qa/extras/ooxmlexport/data/btlr-frame.odt
new file mode 100644
index 000000000000..31cb03849c53
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/btlr-frame.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 0f1226555b04..29b05a5b352a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -437,6 +437,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf78657, 
"tdf78657_picture_hyperlink.docx")
     assertXPath(pXmlRels, 
"/rels:Relationships/rels:Relationship[@Target='http://www.google.com']", 
"TargetMode", "External");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBtlrFrame, "btlr-frame.odt")
+{
+    uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), 
uno::UNO_QUERY);
+    comphelper::SequenceAsHashMap 
aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
+    // Without the accompanying fix in place, this test would have failed with 
'Expected:
+    // -270; Actual: 0', i.e. the writing direction of the frame was lost.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-270),
+                         aGeometry["TextPreRotateAngle"].get<sal_Int32>());
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf125518, "tdf125518.odt")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 8b6fa63342c2..a6a34aaa138e 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1367,6 +1367,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* 
pParentFrame, int nAncho
         const SvxFrameDirectionItem& rDirection = rFrameFormat.GetFrameDir();
         if (rDirection.GetValue() == SvxFrameDirection::Vertical_RL_TB)
             m_pImpl->getBodyPrAttrList()->add(XML_vert, "vert");
+        else if (rDirection.GetValue() == SvxFrameDirection::Vertical_LR_BT)
+            m_pImpl->getBodyPrAttrList()->add(XML_vert, "vert270");
 
         m_pImpl->setFlyFrameGraphic(true);
         m_pImpl->getExport().WriteText();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to