summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-11-26 15:23:40 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2019-11-28 10:26:24 +0100
commitf187550e052ac659766dc8dc4ef574714e8ac46b (patch)
tree1d57f1ec95771ddbd9a10d1c3b53c736820435c4 /xmloff
parent1059cc102bc1611e3b199868045497245b3b0382 (diff)
tdf#128985: ODP: Style text directions revert to RTL on save and re-open
First we need to check duplicate writing modes and then ignore the defult LR_TB writing mode. Change-Id: I166141abd6286fc48c095ef92751e420fb197b3e Reviewed-on: https://gerrit.libreoffice.org/83785 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a) Reviewed-on: https://gerrit.libreoffice.org/83896 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdpropls.cxx46
1 files changed, 22 insertions, 24 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index de6a5e4655d5..6a59ac6967e2 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1364,35 +1364,13 @@ void XMLShapeExportPropertyMapper::ContextFilter(
}
break;
case CTF_WRITINGMODE:
- {
- pShapeWritingMode = property;
- text::WritingMode eWritingMode;
- if( property->maValue >>= eWritingMode )
- {
- if( text::WritingMode_LR_TB == eWritingMode )
- {
- property->mnIndex = -1;
- pShapeWritingMode = nullptr;
- }
- }
- }
+ pShapeWritingMode = property;
break;
case CTF_CONTROLWRITINGMODE:
pControlWritingMode = property;
break;
case CTF_TEXTWRITINGMODE:
- {
- pTextWritingMode = property;
- sal_Int32 eWritingMode;
- if (property->maValue >>= eWritingMode)
- {
- if (text::WritingMode2::LR_TB == eWritingMode)
- {
- property->mnIndex = -1;
- pTextWritingMode = nullptr;
- }
- }
- }
+ pTextWritingMode = property;
break;
case CTF_REPEAT_OFFSET_X:
pRepeatOffsetX = property;
@@ -1485,10 +1463,30 @@ void XMLShapeExportPropertyMapper::ContextFilter(
pTextWritingMode->mnIndex = -1;
if( pControlWritingMode )
pControlWritingMode->mnIndex = -1;
+
+ text::WritingMode eWritingMode;
+ if( pShapeWritingMode->maValue >>= eWritingMode )
+ {
+ if( text::WritingMode_LR_TB == eWritingMode )
+ {
+ pShapeWritingMode->mnIndex = -1;
+ pShapeWritingMode = nullptr;
+ }
+ }
}
else if( pTextWritingMode && pControlWritingMode )
{
pControlWritingMode->mnIndex = -1;
+
+ sal_Int32 eWritingMode;
+ if (pTextWritingMode->maValue >>= eWritingMode)
+ {
+ if (text::WritingMode2::LR_TB == eWritingMode)
+ {
+ pTextWritingMode->mnIndex = -1;
+ pTextWritingMode = nullptr;
+ }
+ }
}
// do not export visual area for internal ole objects