Pranav Kant
f4278176b0
lokdocview: fixed rectangle format in documentation/comments
...
Change-Id: Iaf4a5fba5c4c34d03b91ca9ca4dd4eff1dbf39f6
2015-06-09 10:44:22 +02:00
Pranav Kant
c074cfa4d4
lokdocview, tilebuffer: clean up
...
Improve documentation, style fixes
Change-Id: I5000e32e90cd8e3b75e8df2907673efc303a55fd
2015-06-09 10:44:22 +02:00
Pranav Kant
ad0a404ef3
lokdocview: wrap a functionality inside a member function
...
Lets use a member function to set invalid tiles that come under the
given GdkRectangle.
Change-Id: I440336ddf3c5fd9094f35bb89479aa76a42477fa
2015-06-09 10:44:22 +02:00
Pranav Kant
a5d3efa4a0
lokdocview: move commonly used functions and variables to common header
...
twipToPixel and pixelToTwip are also being used by the new TileBuffer
clsas. Lets move these utility functions to a common header,
tilebuffer.hxx
The variables for DPI and tileSize are also moved to tilebuffer.hxx
Change-Id: I9d0bec7f2aefe412df232040a7a9abc6db3e4ccb
2015-06-09 10:44:22 +02:00
Pranav Kant
82a208a08f
lokdocview: Add support for editing documents
...
Change-Id: I8637d99e6fa59129af207e667bcdf03dc212efeb
2015-06-09 10:44:22 +02:00
Pranav Kant
cc78267f27
lokdocview: Use maps instead of vector
...
Using vector each tile needs to be allocated memory irrespective of
whether tile is required or not. This approach fails when we zoom in to
a very high level to have thousands of tiles due to lot of memory
required. Using maps instead of vector takes care of this, and only
allocates Tiles when required.
Change-Id: I523f815618451a7f014e28258e0de7b1c0693370
2015-06-09 10:44:21 +02:00
Pranav Kant
42dc4f3ed8
Add tile buffering support
...
The TileBuffer class now manages all the tiles. The tile rendering calls
to LO core is also managed by this class.
Change-Id: Ic667a93dcf1c097e0601c0496e8a083c4742e8cb
2015-06-09 10:44:21 +02:00
Pranav Kant
a13d4671bf
lokdocview: use GtkDrawingArea for drawing tiles
...
Change-Id: I1a3d8a9229f416418f0f3e9c720b78af09b35978
2015-06-09 10:44:21 +02:00
Pranav Kant
d2ea6d817d
lokdocview: add width and height to the visible rectangle
...
Change-Id: I64212113750893f33f8a859ba52ecd8815a820f4
2015-06-09 10:44:21 +02:00
Stephan Bergmann
b2f490e862
loplugin:cstylecast: deal with remaining pointer casts
...
Change-Id: I6fcd79094bb09f9068a4182eaace794b19633f4c
2015-06-08 16:26:12 +02:00
Miklos Vajna
3c9fb58981
gtktiledviewer: use SearchItem.SearchStartPoint*
...
Change-Id: If0219eda3a2ca3b97c37bea70e35d47e49d38e02
2015-05-28 17:37:18 +02:00
Stephan Bergmann
5af7ca55a3
loplugin:staticmethods
...
Change-Id: Idb1072ecedd9ab0315d67e296da6d306c098b183
2015-05-27 20:53:16 +02:00
Andrzej Hunt
176c27f194
loplugin:staticmethods
...
Change-Id: I8a6a6dcac8355796b984f6b37b791596fe9dca02
2015-05-27 19:30:20 +01:00
Miklos Vajna
8cbb94a2b7
lokdocview: handle LOK_CALLBACK_DOCUMENT_SIZE_CHANGED
...
Change-Id: Ib1b99221afbf9810bad5fd49fbf62c7a20fd28e4
2015-05-27 17:33:06 +02:00
Miklos Vajna
c7ecbbbb6a
lokdocview: fix not updated part selector when search changes part
...
Change-Id: I337eed47c56dbbbebda4d7fe716eab6177936dc0
2015-05-27 11:48:53 +02:00
Miklos Vajna
96041179d4
lokdocview: handle LOK_CALLBACK_SET_PART
...
Change-Id: I47fc389590d581155074fec63cca79bea3596860
2015-05-26 17:18:23 +02:00
Miklos Vajna
490365b245
lokdocview: update doc size on LOK_CALLBACK_PAGE_COUNT_CHANGED
...
No need to do any actual rendering, the invalidation callback takes care
of that.
Change-Id: I9a3e45cab5250fc45eccb4577fe76377f76354eb
2015-05-23 11:20:04 +01:00
Miklos Vajna
124c937f3b
lokdocview: it's enough to query the document size once
...
Change-Id: Id99c9f1a814bc5f935eeb4e301ef3014ccb0bd07
2015-05-22 13:56:54 +01:00
Miklos Vajna
562d8f57f0
lokdocview: adapt Android path
...
Change-Id: I786fd580b3d08fa076eeb2bf90bd23b09c9f8182
2015-05-21 17:57:38 +01:00
Miklos Vajna
cb0b7ff34d
gtktiledviewer: handle LOK_CALLBACK_SEARCH_NOT_FOUND
...
Change-Id: Ic545bbd14d11a3b310f4d72ee02e51a7cb6f4f22
2015-05-21 13:31:08 +01:00
Miklos Vajna
7c0efaab35
lokdocview: use postMouseEvent(LOK_MOUSEEVENT_MOUSEMOVE)
...
This is much better than using setTextSelection() directly, as that was
introduced only to adjust an existing selection.
Change-Id: I881c3e4e5b0c97891f29dac0da42c1d3a51361e8
2015-05-20 12:38:05 +02:00
Mihai Varga
158614a2ab
LOKit callback for search not found
...
Needed for signaling the user when no match was found for
the searched input
Change-Id: I171ee956d94d6fd83036ae34102c2f1bdd5661de
Reviewed-on: https://gerrit.libreoffice.org/15798
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-05-19 09:59:35 +00:00
Stephan Bergmann
626b1e9177
loplugin:staticmethods
...
Change-Id: I660d68b9b596be531d595c35666a33fb02d6fd6a
2015-05-18 09:33:53 +02:00
Miklos Vajna
b6744874cb
lokdocview: use lok::Office::registerCallback()
...
This way we get some feedback on the state of the loading at least on
the console.
Change-Id: I95bf6cebcdd8b879c817b4e027d4f5b4acb9cd4c
2015-05-18 07:47:21 +02:00
Miklos Vajna
f1d86fc7af
lokdocview: implement desktop style click+move selection creation
...
Change-Id: I69663c0801bc95b8876c8dcbdf68d7a99fec4fb3
2015-05-15 10:41:08 +02:00
Miklos Vajna
6a8719b12e
lok::Document::postUnoCommand: allow passing arguments
...
Change-Id: I6c24a8e392473f3985d3bde9b76a3148fd03bc9a
2015-04-22 15:42:36 +02:00
Miklos Vajna
2831714ef1
CID#1294410 missing break
...
Change-Id: Ibfb4a60bfdce303264ef1826f943672695cdf274
2015-04-16 09:30:45 +02:00
Miklos Vajna
f9339d1ba3
lokdocview: implement LOK_CALLBACK_STATE_CHANGED
...
Change-Id: I239849056dd88f785dce239c4d53d6c905177b64
2015-04-14 11:53:30 +02:00
Tor Lillqvist
c10f132aa8
WaE: format string is not a string literal
...
Change-Id: I0346c98ec1e075009ac6b563119ee44178e9c773
2015-04-13 18:36:11 +03:00
Siqi Liu
0632f77ee8
LOK_STATE_CHANGED callback implemented with sfx events interception.
2015-04-13 16:23:32 +02:00
Miklos Vajna
c3699a4c48
lokdocview: gtk_show_uri() requires Gtk 2.14
...
Change-Id: I54454fec250b74238a1c064cc2136889e1a28972
2015-04-07 09:21:04 +02:00
Miklos Vajna
bf11827971
lokdocview: move callback handling to LOKDocView_Impl
...
These were the last free functions that passed around a LOKDocView_Impl*
manually just because it was not possible to have them in a C++ class
when lokdocview was C code.
Change-Id: I6229a853336db0e47f7d1ba4687d198e076934a3
2015-04-07 09:18:15 +02:00
Miklos Vajna
6041261092
lokdocview: move CallbackData to LOKDocView_Impl
...
Change-Id: If2aff61df7efd5c291e4cc7c7196e7f6f3937b32
2015-04-07 09:18:14 +02:00
Miklos Vajna
267fd94a51
lokdocview: GList -> std::vector
...
Primarily because I'm worried about the untyped GList.
Change-Id: I0ae6610019f6e80b0cad12086782fd89ac74943b
2015-04-07 09:18:06 +02:00
Miklos Vajna
aea29f64d7
lokdocview: move document rendering to LOKDocView_Impl
...
Change-Id: Ie1d61b35f07400c2bd1c32240c15eb908d587d59
2015-04-07 09:18:01 +02:00
Miklos Vajna
fa2948bc43
lokdocview: move timeout handling to LOKDocView_Impl
...
Change-Id: Id1e14f259af68acbd29784436bb2c5062a0d6563
2015-04-07 09:18:00 +02:00
Miklos Vajna
dc755a3f75
lokdocview: move handle rendering to LOKDocView_Impl
...
Change-Id: I52537a96af596db076c38dc607abe857d0771257
2015-03-30 09:23:55 +02:00
Miklos Vajna
ffc571462b
lokdocview: move cursor / selection overlay to LOKDocView_Impl
...
Change-Id: I48a6906382fd41906a06704855d2f054467c1716
2015-03-30 09:23:54 +02:00
Miklos Vajna
986c685e9f
lokdocview: move motion handling to LOKDocView_Impl
...
Change-Id: Ibace4a943fb61e2f897c9571cc2c8814935b6e75
2015-03-30 09:23:53 +02:00
Miklos Vajna
9d76382efb
lokdocview: move button handling to LOKDocView_Impl
...
Change-Id: Iac5d9e97f04af92ff6f6945d691abe94a3d785b0
2015-03-30 09:23:49 +02:00
Miklos Vajna
ffd4b87966
lokdocview: move keyboard handling to LOKDocView_Impl
...
Change-Id: I1117ec42bdf0f2cb19f77723b87597d301d20ddb
2015-03-30 09:23:48 +02:00
Miklos Vajna
a7f1ec6dd6
lokdocview: always use zoom factor when doing twips <-> pixel conversion
...
Change-Id: I81ce20c54bb62bec68152ca228eb222f3fd3c597
2015-03-30 09:23:46 +02:00
Miklos Vajna
baa0ef26dc
lokdocview: sync graphic move behavior with Android
...
Android behavior is: if there is a graphic selection, then drag inside
the shape is a move.
lokdocivew behavior was: drag on the border of a graphic selection is a
move, but inside, it's just a pair of clicks.
Since commit 658534d36f87f9ab03d862e57b04ea268b73ccab (SdrMarkView tiled
rendering: suppress handles during text edit, 2015-03-19), we can depend
on the availability of the handles to decide if we want to move the
shape or do text editing, so do the same in lokdocview as well.
Change-Id: I2b105089e9acbbda75568622d4f2b1adecfe08f1
2015-03-30 09:23:46 +02:00
Miklos Vajna
d0e6250a56
lokdocview: lcl_onDestroy() -> LOKDocView_Impl::destroy()
...
Change-Id: I0910afdb6a0d031cb64f545b5b2c0d16f18a0f04
2015-03-30 09:23:42 +02:00
Miklos Vajna
f7e23565ed
lokdocview: add LOKDocView_Impl ctor
...
It simplifies lok_docview_init() a lot and makes harder to add a
LOKDocView_Impl member without initializing it.
Change-Id: I02d91b97fecd86896c11facca98fabd6a79157e5
2015-03-30 09:23:38 +02:00
Miklos Vajna
2730944192
lokdocview: add lok_docview_get_document()
...
And move private data out of LibreOfficeKitGtk.h, so that clients are
forced to use the getter/setter functions.
Change-Id: I6565312b5ec5a8e882c3763164ff5aa81ed9720c
2015-03-23 09:19:06 +01:00
Miklos Vajna
2a081a0f9b
Rectangle::toString(): output position, then size
...
This order seems to be less confusing.
Change-Id: I95a7e3e2f6244915c820bb86e67745a777714e2d
2015-03-23 09:18:58 +01:00
Tor Lillqvist
7edd92c557
Drop paintTile's row stride output parameter that nobody is interested in
...
Change-Id: I166b4b713c2ea52c62c52045bb2073b6d84c1547
2015-03-20 13:14:44 +02:00
Miklos Vajna
81f0c285de
lok_docview_init: ignore the second, not the first param
...
Fixes the crash on startup.
Change-Id: I991537644dfb6a5335d08d3d03c3d25491a0c335
2015-03-16 12:45:21 +01:00
Stephan Bergmann
45b82d9f6d
libreofficekit: various loplugin fixes
...
Change-Id: I317f8f5397bfeb9c0d6ecaaa656cb31e66eece0b
2015-03-16 12:21:20 +01:00