1package org.libreoffice.canvas;
3import android.graphics.Canvas;
4import android.graphics.Color;
5import android.graphics.Paint;
6import android.graphics.PointF;
7import android.graphics.RectF;
9import org.json.JSONException;
10import org.json.JSONObject;
83 JSONObject rootJson =
new JSONObject();
85 addProperty(rootJson,
"Row",
"long",
String.valueOf(
mIndex));
86 addProperty(rootJson,
"RowHeight",
"unsigned short",
String.valueOf(
Math.round(documentDistance.y > 0 ? twipsToHMM(documentDistance.y) : 0)));
89 addProperty(rootJson,
"Column",
"long",
String.valueOf(
mIndex));
90 addProperty(rootJson,
"ColumnWidth",
"unsigned short",
String.valueOf(documentDistance.x > 0 ? twipsToHMM(documentDistance.x) : 0));
93 }
catch (JSONException e) {
Events and data that is queued and processed by LOKitThread.
static final int UNO_COMMAND
Common static LOKit functions, functions to send events.
static void sendEvent(LOEvent event)
Make sure LOKitThread is running and send event to it.
static float getDpi(Context context)
Main activity of the LibreOffice App.
GeckoLayerClient getLayerClient()
static void addProperty(JSONObject json, String parentValue, String type, String value)
static float twipsToHMM(float twips)
static float pixelToTwip(float input, float dpi)
boolean onHitTest(float x, float y)
CalcHeadersView mCalcHeadersView
void dragStart(PointF point)
AdjustLengthLine(LibreOfficeMainActivity context, CalcHeadersView view, boolean isRow, float width, float height)
void dragEnd(PointF point)
void setScreenRect(RectF position)
static final float STROKE_WIDTH
void onDraw(Canvas canvas)
PointF mStartScreenPosition
void dragging(PointF point)
static final float TOUCH_VICINITY_RADIUS
LibreOfficeMainActivity mContext
Common implementation to canvas elements.
ImmutableViewportMetrics getViewportMetrics()
Implementation of PanZoomTarget.
ImmutableViewportMetrics are used to store the viewport metrics in way that we can access a version o...
float pixelToTwip(float fInput, float zoom)