diff options
author | Justin Luth <justin_luth@sil.org> | 2021-07-02 13:40:23 +0200 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2021-07-03 11:03:56 +0200 |
commit | 87c9940bfcbc230b5ff58dc2b1984589039151f2 (patch) | |
tree | 20984bdaba753d06f54fa41cb4a775d1c4f12807 | |
parent | 00d0d8f58cefb76bf9a8867228af1d6c9a9a5ad3 (diff) |
doc import: halt earlier for non-paragraph styles
related to work being done for tdf#104239.
This should practically be an NonFunctionalChange
that just avoids some unnecessary processing.
Unit tests prove that these semi-defined styles
are still necessary for inheritance etc.,
but they shouldn't need to be used for selecting
the outline numbering.
The "continue" that I am moving was first added with
commit d6078b0843186542398905b97c78f29d974a5d30
Author: Caolán McNamara on Wed Aug 27 09:19:30 2014 +0100
OutlineStyles can only be Paragraph Styles
which probably just failed some automated tests,
so that suggests there is plenty of room for improvement here.
Change-Id: I5d4d6ba374f0f271b5248fef3d2d8c0ce62082cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118342
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index ede4943fdc10..e1cd8915be19 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5971,7 +5971,7 @@ void SwWW8ImplReader::SetOutlineStyles() ++nStyle; // increment before the first "continue"; - if (!rSI.IsWW8BuiltInHeadingStyle() || !rSI.HasWW8OutlineLevel()) + if (!rSI.m_bColl || !rSI.IsWW8BuiltInHeadingStyle() || !rSI.HasWW8OutlineLevel()) { continue; } @@ -6022,9 +6022,6 @@ void SwWW8ImplReader::SetOutlineStyles() bool bAppliedChangedOutlineStyle = false; for (const SwWW8StyInf* pStyleInf : aWW8BuiltInHeadingStyles) { - if (!pStyleInf->m_bColl) //Character Style - continue; - const sal_uInt16 nOutlineStyleListLevelOfWW8BuiltInHeadingStyle = 1 << pStyleInf->mnWW8OutlineLevel; if (nOutlineStyleListLevelOfWW8BuiltInHeadingStyle |