Pranav Kant
cf14391bc2
lokdocview: Use *get_instance_private () to get private structure
...
Let lok_doc_view_get_instance_private () do the pointer
arithmatic. Additionally, we are saving sizeof (void*) already in
the _LOKDocView struct with this approach.
Change-Id: I6d991d5834ef15dad24acb14a1d4bbf7d03df762
2015-06-22 12:33:24 +02:00
Pranav Kant
a2aaf911e2
lokdocview: Use GInitable
...
The construction of LokDocView widget can fail because it
involves initializing the lok context via lok_init.
Having lok_init calls in constructed virtual method is a bad idea
since it assumes that construction will never fail. So, implement
GInitable for this class, and move the object initialization from
constructed to initable.
Change-Id: Idf18a054cf8ef2e946392458ec52cb0107bd7454
2015-06-22 12:33:24 +02:00
Miklos Vajna
9dcd2d119a
lokdocview: couple for missing static_cast<GParamFlags>()
...
Change-Id: I038c05c0d081f52e4ac90688f73397565413632d
2015-06-16 11:34:36 +02:00
Pranav Kant
3061e486f9
lokdocview: Restructure this GObject class
...
This is a big messy commit restructuring the whole class to follow most
common practices followed by standard GObject classes, so that it can
keep gobject-introspection happy; hence, allowing this widget to be used
from other languages.
Change-Id: I10c34dad402d1ec586958b2db21ff44412c36cea
2015-06-16 11:18:07 +02:00
Pranav Kant
0bb2ae2d00
lokdocview, gtktiledviewer: Remove gtk version checks
...
We already have the global ENABLE_GTK3 guard for RHEL5 baseline.
Change-Id: Id814a4063861a1e750952b44686ed24864c0394f
2015-06-15 12:09:58 +02:00
Pranav Kant
256a9cef8b
lokdocview: Port to gtk3; 'expose-event' -> 'draw'
...
Change-Id: I8d2541f5cbd2b908c2b0dc52cccf9b936bbc307a
2015-06-15 12:09:58 +02:00
Pranav Kant
9b3679301f
lokdocview, gtktiledviewer: Port to gtk3
...
Change-Id: I57f2d7b9383790e5c34fc517a905dd537519598f
2015-06-15 12:09:58 +02:00
Pranav Kant
7a9dc7fd35
lokdocview: Create LOK context inside of lok_doc_view_new
...
Change-Id: I675192d6bd6d10e6c7974a5de6f488f9a087ac32
2015-06-12 15:20:52 +02:00
Pranav Kant
97c9a87ac8
lokdocview: Make this GObject class introspectable
...
... so that this widget can be used from other languages.
Change-Id: Icd7d6df6aa587ffdb018af0b911300dc81ec6560
2015-06-12 15:20:52 +02:00
Pranav Kant
8d0b34c3a6
lokdocview: Change parent class to GtkDrawingArea
...
It is not the job of the widget to provide the scroll bars.
Change-Id: Iafc5724ed5b21717d711bb8f7e1a076dd1288b76
2015-06-12 15:20:52 +02:00
Stephan Bergmann
e52bae9370
-Werror,-Wignored-attributes ("attribute declaration must precede definition")
...
Change-Id: Iee0e9ef3a623706c33f84c34c1fbbf5b173f7f5d
2015-06-09 12:10:46 +02:00
Stephan Bergmann
3f0e8bdabe
loplugin:unreffun
...
Change-Id: I2011b491012dfd623ece9fd24a265107ac690cba
2015-06-09 12:10:46 +02:00
Stephan Bergmann
3a1a5b9744
-Werror,-Wunused-private-field
...
Change-Id: I76cf487c66e048b5e9d0877a1b690cd066b73528
2015-06-09 12:10:45 +02:00
Pranav Kant
2afe94dbfc
tilebuffer: tileSize as member variable is superfluous
...
Change-Id: I1eae8c96c12ba4d272341f45fee6c1fd66ab9e28
2015-06-09 10:44:24 +02:00
Pranav Kant
16222190ec
tilebuffer: ZoomFactor as member variable is superfluous
...
Change-Id: I9f533f577f959c9a715e5214be99ca59cb0d206c
2015-06-09 10:44:24 +02:00
Pranav Kant
03655e67cb
lokdocview: Make tilebuffer an instance
...
Change-Id: I06dae2e7a5067160326f4c65f5975c4e5afb05ce
2015-06-09 10:44:24 +02:00
Miklos Vajna
a0ce0dd519
libreofficekit: fix RHEL5 build of tilebuffer
...
Change-Id: I27da86c774f0450c844e742563c4a8de3f23ad34
2015-06-09 10:44:23 +02:00
Pranav Kant
c5f1f7ad27
lokdocview: Modernise LOKDocView as GObject
...
Change-Id: I3bbd07ce8163890f9b88567966622dd4fbe9d94d
2015-06-09 10:44:23 +02:00
Pranav Kant
c8caa803b4
lokdocview: Lets follow the GObject naming convention
...
If we are mentioning this type as DocView, we should break it at each
capital letter.
Change-Id: I76c7eea455281e541b2196a03778018aa127cebe
2015-06-09 10:44:23 +02:00
Pranav Kant
085f31a435
lokdocview: fix render calls after LOK callbacks
...
Change-Id: Ib33f0e1dcf257350be1e2cf6c49cd92494472a55
2015-06-09 10:44:23 +02:00
Pranav Kant
1483643ba5
lokdocview: move GtkDrawingArea size request out of renderDocument()
...
... and place it at places only where the widget can change its size.
Change-Id: I4a4b28b35eba06a6faab434677d4d70d2a33339a
2015-06-09 10:44:23 +02:00
Pranav Kant
35e0361506
lokdocview: check payload for inconsistencies before using it
...
Lets follow the old advice: "Be liberal in what you accept, be strict in
what you produce".
This is after noticing negative values for x, y in
the payload in some situation, such as, hitting a backspace key when the
cursor is at the start of a line
Change-Id: I11939b981f75969b88214baee66b4c69c5e41906
2015-06-09 10:44:22 +02:00
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
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