summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2021-03-10 14:41:57 +0200
committerJustin Luth <justin_luth@sil.org>2021-03-18 16:40:02 +0100
commit0a32371cc2f93fad7954e0fe9c48976aae6c5b9f (patch)
tree323161673fc851c19e4e50967f492a0015568366 /sw
parent31442054520cf0a263cc17e157cfa102cff8ef6a (diff)
tdf#108518 partial revert tdf#64222 sw: better DOCX im/export
...of paragraph marker formatting 6.4 commit 5ba30f588d6e41a13d68b1461345fca7a7ca61ac Ultimately, this just reverts back to an earlier 6.4 change (which means that this really is untested and unproven)... > Also revert the change in checkApplyParagraphMarkFormatToNumbering() > to consider hints that start before the end of the paragraph, > as it has unintended side effects as pointed out by Mike Kaganski. But those side effects were from a DOCX file, and DOCX isn't processed here anymore. The (unedited) comment (still) says: //Formatting for the paragraph mark is usually set to apply only to the //non-existent extra character at end of the text node but there can be //other hints too (ending at nTextLen), so look for all matching hints. //Still the (non-existent) extra character at the end is preferred So, that suggests that there is more than one possible valid autofmt, and that not ALL autofmts will have a start==end. This is being considered since it fixes the one example file that I could find that still broke when reverting OOo's 2012 hack commit 1c22545edf9085b9f2656ca92781158b6b123db3 Fix issue #i119405: Numbering text style changed after importing the *.doc The other alternative would be to // TODO remove this fallback (for WW8/RTF) Change-Id: I69b6e31fe570742b4b9dd94d2cce2b5b9850360d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112319 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/txtfld.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index e889ada8d8d4..795228efd5b3 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -446,12 +446,12 @@ static void checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm
// (non-existent) extra character at end of the text node, but there can be
// other hints too (ending at nTextLen), so look for all matching hints.
// Still the (non-existent) extra character at the end is preferred if it exists.
- if (pHint->Which() == RES_TXTATR_AUTOFMT
- && pHint->GetStart() == *pHint->End())
+ if (pHint->Which() == RES_TXTATR_AUTOFMT)
{
pSet = pHint->GetAutoFormat().GetStyleHandle();
// When we find an empty hint (start == end) we got what we are looking for.
- break;
+ if (pHint->GetStart() == *pHint->End())
+ break;
}
}
}