diff options
author | Mark Hung <marklh9@gmail.com> | 2019-12-13 07:23:35 +0800 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-01-14 10:23:19 +0100 |
commit | b203b9c83d0000c8465dcd92fb6b029a2f28c724 (patch) | |
tree | 2751e971109a27bff316611a8a3568b9c140455b /oox | |
parent | 1dd9200be9f167dc802b04529a54604691fe050e (diff) |
tdf#128304 export TB_RL writing mode as eaVirt
and import eaVirt to TextWritingMode instead of TextPreRotateAngle
(-90) degree of CustomShapeGeometry. CJK text in TB_RL writing mode
are upright in Writer. It corresponds to eaVirt by its defintion.
Change-Id: I2a8bc6676ad6af06b06e023adaa2f201a028d426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86637
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 2 | ||||
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 087c51da5541..8c9f641b5d4f 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2692,7 +2692,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin if( ( mAny >>= eMode ) && eMode == WritingMode_TB_RL ) { - sWritingMode = "vert"; + sWritingMode = "eaVert"; bVertical = true; } } diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index cf637eae0606..863621b3931c 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -18,6 +18,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextCursor.hpp> +#include <com/sun/star/text/WritingMode.hpp> #include <svx/svdtrans.hxx> #include <oox/helper/attributelist.hxx> #include <oox/token/namespaces.hxx> @@ -57,7 +58,12 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken uno::Reference<lang::XServiceInfo> xServiceInfo(mxShape, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY); sal_Int32 nVert = rAttribs.getToken(XML_vert, XML_horz); - if (nVert != XML_horz) + if (nVert == XML_eaVert) + { + xPropertySet->setPropertyValue("TextWritingMode", + uno::makeAny(text::WritingMode_TB_RL)); + } + else if (nVert != XML_horz) { // Get the existing rotation of the shape. drawing::HomogenMatrix3 aMatrix; |