summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2019-12-13 07:23:35 +0800
committerMiklos Vajna <vmiklos@collabora.com>2020-01-17 17:17:42 +0100
commit598ea01b91a1b4e96c24e70089a63dcd35b29f1b (patch)
tree564706693c2392983b72d7827289a2820844c30f /oox
parentbc47eabad3f593aedd71307334fa50b222604bdd (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> Signed-off-by: xisco <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86960
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/shape/WpsContext.cxx8
2 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 438135e7c851..468c89ad7b7e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2682,7 +2682,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 cd9afdc5e177..0688c287e13d 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;