[Libreoffice-commits] core.git: oox/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Sep 10 02:13:44 PDT 2015
oox/source/ole/vbaexport.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f9674ddf81f9600a74edcf59324ad99624be1348
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Sep 10 10:58:36 2015 +0200
oox: work around Android build problem
Android seems to be missing std::log2(), see
<https://code.google.com/p/android/issues/detail?id=68906>.
Change-Id: Iab335cec0c9c5fac0908579a65ea2d434ce2f68a
Reviewed-on: https://gerrit.libreoffice.org/18466
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 10c0d21..b9c9676 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -271,7 +271,7 @@ void VBACompressionChunk::CopyTokenHelp(sal_uInt16& rLengthMask, sal_uInt16& rOf
sal_uInt16& rBitCount, sal_uInt16& rMaximumLength)
{
sal_uInt16 nDifference = mnDecompressedCurrent;
- sal_uInt16 nBitCount = std::ceil(std::log2(nDifference));
+ sal_uInt16 nBitCount = std::ceil(std::log(nDifference)/std::log(2));
rBitCount = std::max<sal_uInt16>(nBitCount, 4);
rLengthMask = 0xffff >> rBitCount;
rOffsetMask = ~rLengthMask;
More information about the Libreoffice-commits
mailing list