[Libreoffice-commits] core.git: android/source
Christian Lohmaier (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 15 17:16:27 UTC 2019
android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 4655052a5c0b80a1d2f891849245215341a5218e
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Fri Nov 15 11:44:30 2019 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Nov 15 18:14:58 2019 +0100
android: keep float for row/column dimensions to unbreak build
typie is ArrayList<Float> - and code divides by/multiplies by zoom
factor later on, so won't keep whole numbers/changing remaining code to
Long would require rounding or reworking the rest of the code as well...
fallout from https://gerrit.libreoffice.org/#/c/82572/
Change-Id: I3f3c46c59f9a310bf48b8cb8b533fe51c9d6645e
Reviewed-on: https://gerrit.libreoffice.org/82775
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java b/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java
index 32c1cbb82cd4..40c9ddcd8cea 100644
--- a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java
+++ b/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java
@@ -26,6 +26,7 @@ import org.libreoffice.LibreOfficeMainActivity;
import org.libreoffice.R;
import org.mozilla.gecko.gfx.LayerView;
+import java.math.BigDecimal;
import java.util.ArrayList;
import static org.libreoffice.SearchController.addProperty;
@@ -235,12 +236,12 @@ public class CalcHeadersController {
JSONArray rowResult = collectiveResult.getJSONArray("rows");
for (int i = 0; i < rowResult.length(); i++) {
headerInfo.rowLabels.add(rowResult.getJSONObject(i).getString("text"));
- headerInfo.rowDimens.add(rowResult.getJSONObject(i).getLong("size"));
+ headerInfo.rowDimens.add(BigDecimal.valueOf(rowResult.getJSONObject(i).getLong("size")).floatValue());
}
JSONArray columnResult = collectiveResult.getJSONArray("columns");
for (int i = 0; i < columnResult.length(); i++) {
headerInfo.columnLabels.add(columnResult.getJSONObject(i).getString("text"));
- headerInfo.columnDimens.add(columnResult.getJSONObject(i).getLong("size"));
+ headerInfo.columnDimens.add(BigDecimal.valueOf(columnResult.getJSONObject(i).getLong("size")).floatValue());
}
return headerInfo;
} catch (JSONException e) {
More information about the Libreoffice-commits
mailing list