summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-01-17 16:25:56 +0300
committerJustin Luth <justin_luth@sil.org>2018-01-19 17:11:54 +0100
commit254c80037a3939c110d5c66fef6c28caf47625e5 (patch)
treee40162b4a2bcf2e241df1d0dd458ea7bbe0fea5c /writerfilter
parent432f4369cdb62fd05abbde50804ff4e1d5011f39 (diff)
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_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx6
1 files changed, 4 insertions, 2 deletions
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;