diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-12 09:32:02 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-12 16:53:22 +0100 |
commit | c45753847dfc2b4645dc2f7500a18ec2c5d438df (patch) | |
tree | 8d04962d7a4367a92d220beb0c35effb9490395b /sw/source/filter/writer | |
parent | 768cfcee178b284be6d96d384364e59e40ecb375 (diff) |
Revert "remove Fraction::operator tools::Long()"
This reverts commit 48b667a7e7d25f835f95df89162a7849d6972531.
Reason for revert: some discussion required
Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/writer')
-rw-r--r-- | sw/source/filter/writer/wrtswtbl.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index b98a76cc3a5b..6a699d6c0674 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -343,7 +343,7 @@ sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con { tools::Long nWidth = GetRawWidth( nCol, nColSpan ); - return static_cast<sal_uInt16>(static_cast<sal_Int32>(Fraction( nWidth*256 + GetBaseWidth()/2, + return static_cast<sal_uInt16>(static_cast<tools::Long>(Fraction( nWidth*256 + GetBaseWidth()/2, GetBaseWidth() ))); } @@ -353,7 +353,7 @@ sal_uInt16 SwWriteTable::GetPercentWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) // Looks funny, but is nothing more than // [(100 * nWidth) + .5] without rounding errors - return static_cast<sal_uInt16>(static_cast<sal_Int32>(Fraction( nWidth*100 + GetBaseWidth()/2, + return static_cast<sal_uInt16>(static_cast<tools::Long>(Fraction( nWidth*100 + GetBaseWidth()/2, GetBaseWidth() ))); } |