xmloff/source/draw/sdpropls.cxx | 46 +++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 24 deletions(-)
New commits: commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Tue Nov 26 15:23:40 2019 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Tue Nov 26 20:07:33 2019 +0100 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.zol...@collabora.com> Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 94e976f2fc89..b2325aa84769 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1383,35 +1383,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; @@ -1504,10 +1482,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits