diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2019-11-15 11:44:30 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-11-15 18:14:58 +0100 |
commit | 4655052a5c0b80a1d2f891849245215341a5218e (patch) | |
tree | a2f39a2da717c1cbc1ab2f5a8b373e44fe171bc6 /android | |
parent | ef57b9cd3c4c37fe70b7bc89361393f6f8b36d07 (diff) |
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@collabora.com>
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |