Kaydet (Commit) f9674ddf authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Markus Mohrhard

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/18466Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 6d8b9aab
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment