diff options
author | Justin Luth <justin_luth@sil.org> | 2019-01-25 18:59:26 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2019-03-02 17:16:14 +0100 |
commit | 361abbf803fb77b87bb99d7e69ccec7b920f3418 (patch) | |
tree | 8a15f8074c6364dde91dea62219a43e8670714ee | |
parent | c268527f731fc0764f34ac36c48fd1b6154be80c (diff) |
filter\ww8 export: don't spam RTL if ParaStyle defined
If the paragraph itself inherits BiDi from the environment,
this just means that it gets the value of the paragraph style.
If paraStyle is defined, then we don't need to spam the bidi
property, since it ought to naturally inherit it.
I can only see two possible problems. Either my logic is wrong,
or else import might not always take the paragraph style
into account (for determining the meaning of justify for example).
I want to start spamming justify in the case where the BiDi is not
specified but is inherited from the environment (page style
or AppLanguage). Separating this into multiple patches
will help for debugging in case of any regressive tendencies.
related to tdf#98620.
Change-Id: I36bc63e6659a4b491b5c6f2c99c72ba5bb715a07
Reviewed-on: https://gerrit.libreoffice.org/66921
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 0cf9e5a15f56..9559ef9d0400 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2113,8 +2113,9 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) bool bFlyInTable = m_pParentFrame && IsInTable(); + SwTextFormatColl& rTextColl = lcl_getFormatCollection( *this, &rNode ); if ( !bFlyInTable ) - m_nStyleBeforeFly = GetId( lcl_getFormatCollection( *this, &rNode ) ); + m_nStyleBeforeFly = GetId( rTextColl ); // nStyleBeforeFly may change when we recurse into another node, so we // have to remember it in nStyle @@ -2742,11 +2743,13 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) If a given para is using the SvxFrameDirection::Environment direction we cannot export that, if it's ltr then that's ok as that is word's default. Otherwise we must add a RTL attribute to our export list + Only necessary if the ParaStyle doesn't define the direction. */ const SvxFrameDirectionItem* pItem = rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR); if ( (!pItem || pItem->GetValue() == SvxFrameDirection::Environment) && + rTextColl.GetFrameDir().GetValue() == SvxFrameDirection::Environment && aAttrIter.IsParaRTL() ) { |