diff options
author | Justin Luth <justin_luth@sil.org> | 2018-06-27 16:19:57 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-07-10 07:52:58 +0200 |
commit | 139750d7c295b84f4c42bf9409ccbdfb0c46b9f6 (patch) | |
tree | 7054cd937ec270b4dfc83e04b61d317640199389 /sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | |
parent | 700407594c0d6e1f2fa4227c7dd359c35486d3c4 (diff) |
tdf#118361 sw ooxmlimport: set footnote separator alignment
If RTL is defined in the default (Normal) paragraph style,
then the footnote separator should be right-aligned.
In MSWORD, the alignment is not a property that is stored
with the footnote separator definition, and it is not a
page property like it is in LO.
The reverse needs to happen for LTR default paragraph style.
Based on my MSWORD observations, the only place where you can
indirectly set RightToLeft is in the "Normal" paragraph style.
That option is disabled in all of the other styles.
In LibreOffice, this is typically handled by the locale properties.
The default PAGE style's Footnotes - Position is RIGHT for
RTL locales, but LEFT for LTR locales.
It is kinda interesting that no one from a RTL locale complained
about wrongly-right-aligned footnote separator
from imported LTR .docx's.
None of this belongs in export code, since MSO doesn't support
specifying the location - it is just a consequence of the
RTL/LTR settings.
Change-Id: I07d26640116cb12cb9157cd1d902b4c774dbba26
Reviewed-on: https://gerrit.libreoffice.org/56532
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport11.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 6c07df297779..e6ac19f3df91 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -84,6 +84,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112694, "tdf112694.docx") CPPUNIT_ASSERT(!getProperty<bool>(aPageStyle, "HeaderIsOn")); } +DECLARE_OOXMLEXPORT_TEST(testTdf118361_RTLfootnoteSeparator, "tdf118361_RTLfootnoteSeparator.docx") +{ + uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard"); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Footnote separator RTL", sal_Int16(2), getProperty<sal_Int16>(aPageStyle, "FootnoteLineAdjust")); +} + DECLARE_OOXMLEXPORT_TEST(testTdf115861, "tdf115861.docx") { // Second item in the paragraph enumeration was a table, 2nd paragraph was |