1522 Commits

Author SHA1 Message Date
Tomaž Vajngerl
049aa53dc2 android: add CALLBACK_GRAPHIC_SELECTION to LOK facade
Change-Id: I105f8811f810b393cac8518b42d77f8bd4d0c763
2015-03-09 10:16:21 +01:00
Tomaž Vajngerl
a54fe6d7be android: fix rebase import problem
Change-Id: Id668dc509dc3fa02e9a248716050c16a8cf91419
2015-03-09 10:16:20 +01:00
Tomaž Vajngerl
1a8b898842 android: do all overlay state tracking in InvalidationHandler
Do all overlay changes and state tracking in InvalidationHandler
where we get invalidation and selection / cursor messages from
LibreOfficeKit.

Change-Id: I87ccdefedc01e8bd54666b694a9a429a1fc6af76
2015-03-09 10:16:20 +01:00
Tomaž Vajngerl
b792f60279 android: handle callbacks directly in InvalidationHandler
Change-Id: Ic4ceaadcf251f7257001f8043161ce15898d7239
2015-03-09 10:16:20 +01:00
Tomaž Vajngerl
d5c32b4518 android: minor code clean-up in TextSelectionHandle
Change-Id: I5ad3c0f853efe1cf314f3c1afd77cecfdfc59134
2015-03-09 10:16:20 +01:00
Tomaž Vajngerl
58c89e4140 android: support to make selections visible/invisible
Change-Id: Iaebf3e5a2f0c11efa7110b7062ecfc3ae38e0e64
2015-03-09 10:16:19 +01:00
Siqi Liu
619f033d39 tdf#89705: provides callback for url handling on android.
Change-Id: Ie28cd768519fbdc305f98e1d764d05bd209951ca
2015-03-09 10:16:17 +01:00
Siqi Liu
722e76350a add missing Activity import
Change-Id: I892b66265b411ea6f727bdacf41b45de055b2a37
2015-03-09 10:16:17 +01:00
Siqi Liu
053e1d9935 reapply changes to LayerView
Change-Id: I597621a0a68cf484d5117a5f5b77c3d122b14822
2015-03-09 10:16:17 +01:00
Siqi Liu
64620fe20c revert changes on LayerView
Change-Id: I724a5bbc3dcb3372a3bf3810306658f4427b95a0
2015-03-09 10:16:16 +01:00
Tomaž Vajngerl
9f2ddc5594 android: cleanup LibreOfficeUIActivity, remove PreferenceEditor
Change-Id: I4949e5d8698fda7e559ab01e3b898caa13267255
2015-03-09 10:16:16 +01:00
Tomaž Vajngerl
636e6187b5 android: LOAbout doesn't need to extend Activity
Change-Id: I74a6eaab21685ff5a857255fb3ab23ed9c896574
2015-03-09 10:16:16 +01:00
Siqi Liu
76d797b9ac tdf#89705: disable Ctrl+Click for mobile apps.
Change-Id: I7478b8e6be110ad226743281ac8fa6d77a2c15a0
2015-03-09 10:16:16 +01:00
Siqi Liu
a5b384c2e1 add license header
Change-Id: I9becbedb305daa95b39ebb084e358408df3d4d09
2015-03-09 10:16:15 +01:00
Siqi Liu
907fdbfcd2 add getPartsCount() to TileProvider
Change-Id: I8f1f61110d06333bc1140caf13d9e96e669fc231
2015-03-09 10:16:15 +01:00
Siqi Liu
2ee313fa8b tdf#89174:disable swipe gesture when zoomed in.
Change-Id: I0c3a565a3ae276fb60bf99ec32941715f1556127
2015-03-09 10:16:15 +01:00
Siqi Liu
7f5e0f85eb refactor swipegesture to be handled by layerview
Change-Id: Id094ffa7972df0477ad26b2fc579fe010e745550
2015-03-09 10:16:15 +01:00
Miklos Vajna
3851bd7332 lokdocview: render graphic selection handles
Change-Id: I8c1331c32baf92b077f45678929df0e4cf185774
2015-03-09 10:16:14 +01:00
Tomaž Vajngerl
0c4b53980e android: initialize TextCursorView with cursor invisible
Change-Id: I36c359b930a09dbcf51880d9488f335cc38fba45
2015-03-09 10:16:14 +01:00
Tomaž Vajngerl
1b36343331 android: also hide soft keyboard when hiding cursor
Change-Id: I294e1d8382d997b70cb4e5af13cdef5d606885ae
2015-03-09 10:16:13 +01:00
Tomaž Vajngerl
7373248256 android: add and handle show/hide cursor message from LOK
Change-Id: I42c0971b10e3926f8fca989884da089bec8d59d4
2015-03-09 10:16:13 +01:00
Tomaž Vajngerl
706691bd97 android: rename text selection callback messages
Change-Id: I78c8a984907d1481134426eef164f2587c0f06c6
2015-03-09 10:16:13 +01:00
Miklos Vajna
b41b9681bf android: fix long press not selecting an empty cell
A double click is a set of 4 events, only one of them was sent, that's
how it worked in gtktiledviewer, but not on Android.

Change-Id: Id0eaef3765d385aab588b834f66b9f4b4f3ccb70
2015-03-09 10:16:10 +01:00
Tomaž Vajngerl
c86b10625c android: fix mHandleType initialization
Change-Id: I40df42b941ab1fbf9d847772e8b5c0ddea5cfcb7
2015-03-09 10:16:10 +01:00
Tomaž Vajngerl
94e5223f8c android: account for handle repositioning, limit update to 50ms
Text handles are usually shown under the current selection or
cursor position. Previously this was done in InvalidationHandler,
now the TextSelectionHandle takes this into account just before
drawing. The reason is that the repositioning needs to be taken
into account when the handle moves to reposition the coordinates
back to original position.
In addition to that, the number of times the move handle update
event is send is now limited to 50ms to reduce stress for the
device (less in queue, less messages via LOKit). This also makes
the handle more fluid and jump around less.

Change-Id: Idc401375c82b3eeac66328d98c80bf3cb7b675ea
2015-03-09 10:16:09 +01:00
Siqi Liu
ef990c71e4 remove unused boolean (propagating touchEvent instead of intercepting it)
Change-Id: If05cf04414572fea809104c7fed309afb2438bfd
2015-03-02 08:51:02 +01:00
Siqi Liu
75f5168c03 implement swiping gesture as a generic event
Change-Id: I024db339bada34a544fdcc1def107c7b06332847
2015-03-02 08:51:02 +01:00
Siqi Liu
fd6129b3a0 add swipe support for presentation
Change-Id: I650d661a1656388e50e5d4e3a003b8eb4f032382
2015-03-02 08:51:02 +01:00
Miklos Vajna
6650fe947d LOK: move Office::postKeyEvent to Document
The implementation still sends them to the currently active VCL frame,
not to the given document, though.

Change-Id: I6fa2decdea3f949c55287e802cb3373c85664207
2015-03-02 08:51:01 +01:00
Tomaž Vajngerl
e85db50db9 android: reset selections in TextCursorView on empty invalidation
Change-Id: I49997520057763299add18fb7c1bc662ef0c76b3
2015-03-02 08:51:00 +01:00
Tomaž Vajngerl
6c972d2f48 android: if in selection state, reset selection on single tap
Change-Id: I8ae76ee4898087998b88ac2e1d73b3843fc00559
2015-03-02 08:51:00 +01:00
Tomaž Vajngerl
b99fe5ebc4 android: add selection reset to TileProvider
Change-Id: I9a42913069dcaa2bab1e3db51cebe3a0cdcf5746
2015-03-02 08:50:59 +01:00
Tomaž Vajngerl
b29e9060d5 android: still process cursor invalidations when in selection mode
Change-Id: I24d0b4f58e2227b289eb55cb881664e2cb5a51e9
2015-03-02 08:50:59 +01:00
Tomaž Vajngerl
b0478cb1a1 android: don't hide soft keyboard on long press
Change-Id: I8b1f6057b08752171710e1e5d4d0ab4664a63369
2015-03-02 08:50:59 +01:00
Tomaž Vajngerl
ae53e0841d android: fix parsing of selection coordinates and make more robust
Change-Id: Ie2fb81cc9c2096df4d9361887ed5bab8a0b841d3
2015-03-02 08:50:59 +01:00
Tomaž Vajngerl
d5ad8429df android: send selection/cursor change from TextSelectionHandle
Change-Id: Iac570c890717d8e2dcfde7f29da996c809df81dc
2015-03-02 08:50:58 +01:00
Tomaž Vajngerl
b2753b4666 android: connect the selection change LOEvent with TileProvider
Change-Id: Ic0b499fcafb56fd5cff6559b66a1698992c1c6ed
2015-03-02 08:50:58 +01:00
Tomaž Vajngerl
ed42840dfb android: support selection change (start,end) to TileProvider
Change-Id: If983699dacbd6c992ffff886215e8f686e0f5a2d
2015-03-02 08:50:58 +01:00
Tomaž Vajngerl
bb0892de8f android: add LOEvent to report handle position changes
With LOEvent CHANGE_HANDLE_POSITION we can report handle (start
and end selelection change and cursor change) to the LOKitThread.

Change-Id: Ia247acc147e54a1f05999a5e55786367c4377091
2015-03-02 08:50:58 +01:00
Tomaž Vajngerl
cb08fbbd2a android: no need for MotionEvent when sending TOUCH LOEvent
Change-Id: I9173f50fb60680de1bb9744d3f351c44f8175d0c
2015-03-02 08:50:57 +01:00
Tomaž Vajngerl
5fef3a0c6d android: sent -> send
Change-Id: I241a1cbfb98b9e9bb8f769980547c395427bc0b5
2015-03-02 08:50:57 +01:00
Tomaž Vajngerl
fc4672c9e2 android: first set overlay state and send mouse button event later
Change-Id: I30d909ce04baaab8bed1e8bd03b4926b95ed95ee
2015-03-02 08:50:57 +01:00
Tomaž Vajngerl
39d4b4010f android: add OverlayState to track the state of overlay
Overlay can either be in state NONE - no overlay elements should
be shown (this is the deocument reader state), CURSOR - cursor
and the cursor handle are shown, SELECTION - selection and
selection handles are shown. The states can change either by
an invalidation or touch input.

Change-Id: Ia15eb58193675b3799c0014a91f4429a729e30d4
2015-03-02 08:50:57 +01:00
Tomaž Vajngerl
a8547448f0 android: swap position of invalidateCursor and invalidateTiles
Change-Id: Iebc21915b92c82b0def3f4f61fb2128c2942d122
2015-03-02 08:50:57 +01:00
Tomaž Vajngerl
c2ab77974e android: support parsing selection rectangles, rectructure code
Add support to parse selection rectangles (series of rectangles
separated by ";"). Additionally restructure and clean up the code
in InvalidationHandler to be better readable - better comments,
better variable and method names.

Change-Id: I64d1dc4a806831bd47ca9f14478bec8192035461
2015-03-02 08:50:56 +01:00
Tomaž Vajngerl
dc43b61e6e android: create InvalidationHandler outside of LOKitTileProvider
Change-Id: I79bb20ca5a16a2ebdc6ed3f1c97a483173b0762b
2015-03-02 08:50:56 +01:00
Tomaž Vajngerl
5b4fc00b12 android: add selection support to TextCursorView{Layer}
TextCursorView is a overlay view on top of document view which
is used to draw the cursor (and blink it too). This also adds
selection rectangles drawing to the same view so both can be drawn
at the same time.

Change-Id: I3ce034d90597bac4569f04ac903a5443c28cb38e
2015-03-02 08:50:56 +01:00
Tomaž Vajngerl
c1299f0cab android: change TextCursorView parent to View and draw with canvas
Previously TextCursorView was subclassing ImageView and a drawable
to draw the cursor by scaling the drawable, which is not an ideal
solution. This is now changed so that the TextCursorView is a
proper subclass of View and draws the cursor using canvas.

Change-Id: I27b1ea73911afbfe9eee6bf382db5368ae449308
2015-03-02 08:50:55 +01:00
Miklos Vajna
cffef0927f android: let LOKitThread::touch() invoke mouseButtonUp(), too
This fixes the "click into one shape, type something, click into an
other shape" scenario that was already working in gtktiledviewer.

Change-Id: I79c7174274115b2ab61ea4d0f1de4306f5172a64
2015-03-02 08:50:54 +01:00
Miklos Vajna
d438bb287f android: enable editing by default
Change-Id: I1428c0bf5c4df8d5d0ede026d0f2e31ac48ce226
2015-03-02 08:50:52 +01:00