[Libreoffice-commits] core.git: writerfilter/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 16 17:37:09 UTC 2021
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 2 +-
writerfilter/source/dmapper/TableManager.hxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 33d588ab553652637e90ecd543c1ffa6301c762b
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Sat Aug 14 20:33:33 2021 +0200
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Mon Aug 16 19:31:00 2021 +0200
related tdf#134569 writerfilter: negative means table end
TableManager's EndParagraph uses mnTableDepthNew - mnTableDepth
to identify that a positive is startLevel,
and a negative is endLevel.
So it doesn't make much sense to have this function
return a huge unsigned int in case of a negative.
As expected, an assert proves that LN_CT_TcPrBase_tcW
can happen for both positive and negative,
so the equivalent test is just a non-zero.
An assert proves that startLevel always has
a positive difference, so that clause can stay as is.
Change-Id: I1b49dfae7087258e4ceed5fb45da0e62fd1f3b50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120525
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 35749d60bd59..e0f0ae18a160 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -331,7 +331,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
else
// store the original value to limit rounding mistakes, if it's there in a recognized measure (twip)
getCurrentCellWidths()->push_back(pMeasureHandler->getMeasureValue() ? pMeasureHandler->getValue() : sal_Int32(0));
- if (getTableDepthDifference() > 0)
+ if (getTableDepthDifference())
m_bPushCurrentWidth = true;
}
}
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index aa611e412b59..e6600d35793d 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -358,7 +358,7 @@ protected:
/**
Return the current table difference, i.e. 1 if we are in the first cell of a new table, etc.
*/
- sal_uInt32 getTableDepthDifference() const { return mnTableDepthNew - mnTableDepth; }
+ sal_Int32 getTableDepthDifference() const { return mnTableDepthNew - mnTableDepth; }
sal_uInt32 getTableDepth() const { return mnTableDepthNew; }
More information about the Libreoffice-commits
mailing list