From 66bbf08f08dafe38c02edbca11ca01e7906d4b81 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 9 Nov 2019 18:18:15 +0000 Subject: lok: calc: switch row / column / grouping data to pixels. This simplifies lots of logic in the clients, making it trivial to get good row/column header alignment at any zoom. Ultimately TWIPS here are highly misleading print-twips, and in this state are ~impossible to map to pixels accurately unless all data is present back to the origin (which is not the current approach). Change-Id: I6ca30e77865b62e886e23860f7c23350e544c9fc Reviewed-on: https://gerrit.libreoffice.org/82572 Tested-by: Jenkins Reviewed-by: Michael Meeks --- .../src/java/org/libreoffice/overlay/CalcHeadersController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'android') diff --git a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java b/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java index 8bce80afd851..32c1cbb82cd4 100644 --- a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java +++ b/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java @@ -29,7 +29,6 @@ import org.mozilla.gecko.gfx.LayerView; import java.util.ArrayList; import static org.libreoffice.SearchController.addProperty; -import static org.libreoffice.UnitConverter.twipToPixel; public class CalcHeadersController { private static final String LOGTAG = CalcHeadersController.class.getSimpleName(); @@ -236,12 +235,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(twipToPixel(rowResult.getJSONObject(i).getLong("size"), LOKitShell.getDpi(mContext))); + headerInfo.rowDimens.add(rowResult.getJSONObject(i).getLong("size")); } JSONArray columnResult = collectiveResult.getJSONArray("columns"); for (int i = 0; i < columnResult.length(); i++) { headerInfo.columnLabels.add(columnResult.getJSONObject(i).getString("text")); - headerInfo.columnDimens.add(twipToPixel(columnResult.getJSONObject(i).getLong("size"), LOKitShell.getDpi(mContext))); + headerInfo.columnDimens.add(columnResult.getJSONObject(i).getLong("size")); } return headerInfo; } catch (JSONException e) { -- cgit