summaryrefslogtreecommitdiff
path: root/android/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-11-09 18:18:15 +0000
committerMichael Meeks <michael.meeks@collabora.com>2019-11-13 11:16:56 +0100
commit66bbf08f08dafe38c02edbca11ca01e7906d4b81 (patch)
tree55573da535ab3cbeef748014cc8e530f9baf861f /android/source
parent71f9961488232697bcdb37db349569a20f15bb2d (diff)
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 <michael.meeks@collabora.com>
Diffstat (limited to 'android/source')
-rw-r--r--android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java5
1 files changed, 2 insertions, 3 deletions
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) {