[Libreoffice-commits] core.git: sw/qa sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 1 07:28:14 UTC 2020
sw/qa/extras/ww8export/ww8export2.cxx | 1 +
sw/source/filter/ww8/ww8par6.cxx | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit fb8334aa79e811bb6780e072e24d2580932f1031
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Mon Aug 31 14:40:55 2020 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 1 09:27:34 2020 +0200
tdf#136282 ww8import: track para bidi, not char bidi for style
This fixes a LO 7.0 regression from tdf#99197.
Apparently I was watching the wrong SPRM for bidi change in styles.
It looks like it should be sprmPFBiDi: A Bool8 value that
specifies whether the paragraph uses right-to-left layout.
By default, a paragraph does not use right-to-left layout.
Instead, I had been using sprmCFBiDi: A ToggleOperand value that
specifies whether the text is formatted with right-to-left layout.
By default, text is displayed from right to left
if the language for the text is a right-to-left language.
[So this one looks like a character run property.]
I no longer remember why I used CfBiDi. Perhaps just because
it sets m_bBiDi which sounds good?
However, there are no existing unit tests that have a CFBiDi
in a style, but there are examples with CFBiDi.
I'm really surprised that QA didn't have any documents
that picked up on this regression. I was counting on that...
Change-Id: If5a115db5962e7e26ca1b280cd9f31d493cee69c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101726
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 48391d594236..f811fc5200e1 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -351,6 +351,7 @@ DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJ
DECLARE_WW8EXPORT_TEST(testTdf98620_rtlJustify, "tdf98620_rtlJustify.doc")
{
CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Right To Left style", text::WritingMode2::RL_TB, getProperty<sal_Int16>(getParagraph(1), "WritingMode"));
}
DECLARE_WW8EXPORT_TEST(testTdf121110_absJustify, "tdf121110_absJustify.doc")
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 711b11113e2a..ebb21ecd5199 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -403,6 +403,9 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL
}
NewAttr(SvxFrameDirectionItem(eDir, RES_FRAMEDIR));
+
+ if ( m_pCurrentColl && m_xStyles ) // in style definition
+ m_xStyles->mbBidiChanged = true;
}
}
@@ -3071,9 +3074,6 @@ void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8* pData, short nLen)
m_bBidi = true;
sal_uInt8 nBidi = *pData;
NewAttr( SfxInt16Item( RES_CHRATR_BIDIRTL, (nBidi!=0)? 1 : 0 ) );
-
- if( m_pCurrentColl && m_xStyles ) // in style definition
- m_xStyles->mbBidiChanged = true;
}
}
More information about the Libreoffice-commits
mailing list