writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 254c80037a3939c110d5c66fef6c28caf47625e5 Author: Justin Luth <justin_l...@sil.org> Date: Wed Jan 17 16:25:56 2018 +0300 writerfilter: move TopContextType==Para requirement This is prep work for tdf#95377. I need this function to run when there is no TopContext. This function doesn't do anything with the context, so in that regard I wonder if it is even necessary? My guess would be that it is a leftover piece from discovering the fix for n75883. However, to avoid causing a regression, I'm just pulling this test into the calling functions. (Of the three instances calling this function, two need to be contextless..) This is not truly NFC because if the followup patch is reverted, then this one will cause a change. But that is actually OK, because if my follow-up patch breaks because of these two functions changing to become contextless, then I'll be better able to pin-point the reason for the regression. Original commit adding this function was commit 2123ede032ca64f696ef54af4ad3238974ca2b5d Change-Id: I471aa852aa48527d69e0343a2ac28fa6e8acb209 Reviewed-on: https://gerrit.libreoffice.org/48062 Reviewed-by: Justin Luth <justin_l...@sil.org> Tested-by: Justin Luth <justin_l...@sil.org> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index ee3533bc134e..c66b087eca67 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5409,7 +5409,7 @@ uno::Reference<container::XIndexAccess> DomainMapper_Impl::GetCurrentNumberingRu try { OUString aStyle = GetCurrentParaStyleId(); - if (aStyle.isEmpty() || GetTopContextType() != CONTEXT_PARAGRAPH) + if (aStyle.isEmpty()) return xRet; const StyleSheetEntryPtr pEntry = GetStyleSheetTable()->FindStyleSheetByISTD(aStyle); if (!pEntry) @@ -5446,7 +5446,9 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::GetCurrentNumberingCharSt try { sal_Int32 nListLevel = -1; - uno::Reference<container::XIndexAccess> xLevels = GetCurrentNumberingRules(&nListLevel); + uno::Reference<container::XIndexAccess> xLevels; + if ( GetTopContextType() == CONTEXT_PARAGRAPH ) + xLevels = GetCurrentNumberingRules(&nListLevel); if (!xLevels.is()) { PropertyMapPtr pContext = m_pTopContext; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits