summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)Author
2018-04-10sw lok: View jumps to cursor position even if it is moved by an other view.Tamás Zolnai
Scrolling is done twice. Once in SwCursorShell::UpdateCursor() by SCROLLWIN flag. Here we can check the actual viewid and avoid scrolling if the cursor is move by an other user. The second instance in the LO online code, for it we need to pass the viewid identifying the view which moved the cursor. Change-Id: I033274f88ce41acbb632e2aeb0d986ab11cd2d52 Reviewed-on: https://gerrit.libreoffice.org/52220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/52675 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-30Fix build with make checkAron Budea
Now CppunitTest_libreofficekit_tiledrendering compiles (but still fails). Change-Id: Icf0e8adb5be5bd75b821da127df44ec02c810e6d
2018-03-14lokdialog: debug red-colored boundary for last painted regionPranav Kant
Easier to see what's going on inside the LOK dialog. Change-Id: I59974200af3d2356b7c27eb3dd4032a59c00dbed Reviewed-on: https://gerrit.libreoffice.org/51266 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-01Fix tests - combination of the following commits:Pranav Kant
Fix build cherry-picked from 83a8527a00932d9eaf1fd07654d240bd20dc4c21 Fix build, for real this time cherry-picked from 25ca8af596342ed254eb793ad1b8d47a86be4d40 Note that one of the test is disabled; need to figure out what's going on there. Change-Id: I63f287fdc048d5636435047424e8c42842e75c2c Reviewed-on: https://gerrit.libreoffice.org/50491 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-01-04lokdocview: Handle INVALIDATE_HEADER cbPranav Kant
With this calc gtktiledviewer or any other lok client shouldn't crash anymore when a new view is opened. And while at it, update documentation of callbacks. Change-Id: I436c3b424dd4e2e6b8c312b0d3ba43d7006e944b Reviewed-on: https://gerrit.libreoffice.org/47306 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-01-04lokdocview: use std::string where possiblePranav Kant
This also prevents an invalid memory access: we were storing the pointer to a temporary in the struct and then using it after temporary was gone. Change-Id: I2b6d9df16bc24b222095ccbf45c9f0bd9c86ed65 Reviewed-on: https://gerrit.libreoffice.org/47305 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-18LOK: support tile-dumping in tilebenchAshod Nakashian
And other improvements. Change-Id: I5a27d6d2df5f946a708dd3b0b4fef8159da86e5c (cherry picked from commit b7d893d8a1ecb24290c4470e12d71caba2b85216) Reviewed-on: https://gerrit.libreoffice.org/46678 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-18Fix inefficient usage of string::find() in condition (CWE597)Muhammet Kara
string::compare() will be faster when string::find's result is compared with 0, because it will not scan the whole string. Change-Id: I78596a6d796fe9779f88b7c7b91da09aa27b7035 Reviewed-on: https://gerrit.libreoffice.org/32430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 8885343a33365d2570513073c3666428aa79dbdf) (cherry picked from commit 0f839fba28a2e50d5bfa0a131c68d493903045c0)
2017-12-15lokdialog: If we already have the title, emit it during creationPranav Kant
Some dialogs load the UI before we "Execute()" the dialog, or before the dialog fires the InitShow event. In those cases, the title event has already been fired and won't be fired after dialog is created. Make sure that we send the title for such dialogs. While at it, remove the superfluous std::make_pair calls to emplace_back. And consistently use emplace_back everywhere, not push_back Change-Id: Ib66238298ad9b0dc85bd269aff37aeadf1fc82e4 Reviewed-on: https://gerrit.libreoffice.org/46461 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-15lokdialog: gtv: Set dialog title on callbackPranav Kant
Change-Id: I6d96a9e2287afdcaad2f770e4b4c73d3671fc76b Reviewed-on: https://gerrit.libreoffice.org/46460 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-05LOK: tilebench improvementsAshod Nakashian
Minor improvements from cd-5.3 Reviewed-on: https://gerrit.libreoffice.org/45090 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 84db465fdf9314b4a775d7cfb6558bd91bae7ab9) Change-Id: If8439834cef9b0a2988a6d2c25d63b2b5bc6087f
2017-12-05lokdialog: multiview: Do not mix one view with otherPranav Kant
In GTV, use correct application window object to fetch the dialog object. Use correct view shell to notify window (dialogs, etc.) callbacks. Change-Id: I7d82b39d4522a4b4904e156757a032c342c71efb
2017-12-05lokdialog: Merge dialog & dialog child mouse event APIs into onePranav Kant
Change-Id: I91aaa6a58f33dd2d817e02533de96e0c8191f2ca
2017-12-05lokdialog: Rename postDialogKeyEvent -> postWindowKeyEventPranav Kant
Change-Id: I78b434106fbef153adde255d4fcc8f74a7169175
2017-12-05lokdialog: Simplify; make the LOK dialog API more genericPranav Kant
Merge the dialog floating window callbacks and function calls into one. Unique window ids across vcl::Window is enough to distinguish between them. Floating windows don't have a LOK notifier as they are created in the vcl itself (so we can't access them from sfx2). Use the parent LOK notifier in that case (which would be a dialog). This API should also help in autopopup filter tunneling later. Change-Id: I63a2c97ffdd84695dc967e14c793089a7c50b41b
2017-12-05lokdialog: Do not underestimate the dialog sizePranav Kant
Some of them like, EditStyle, can be much bigger. Change-Id: Iaad02fadba18846976b959369f06e2020feffc6f
2017-12-05lokdialog: Allow closing a dialog from LOK clientPranav Kant
... and rename paintDialog -> paintWindow before it's too late. We not only render dialogs now but also popups. Change-Id: I6b1253c4d9be0c79199b683df4413658a461f850
2017-12-05gtv: Remember recently executed UNO commandsPranav Kant
Saves the recently executed UNO commands in a temp file and make it accessible to user in a combo box. Useful when debugging. Change-Id: Ic66961a388cc59dee3f65cb8d4de3c29a8a75eaa
2017-12-05gtv: Width, height properties should not be construct onlyPranav Kant
Change-Id: I2d1b29f52c1fe0449cf9afe47c509ef6250804a8
2017-11-28LOK: tilebench improvementsAshod Nakashian
* Arguments for max number of parts and tiles to render (optional). + Automatic estimation of maximum tiles to render based on max parts for Writer docs, since there is only 1 part, this caps the number of pages to render, similar to other doc types. * Fixed rendering of Writer documents over and over (as many times as pages). + Writer has a single part, unlike other doc types. + No point in rendering the whole document in writer to a single tile, since that's completely unrealistic and impractical (it takes forever for large docs and artificially spikes the memory). * Rendering starts at the current part and not the first. + This gives the spreadsheet of interest priority (if saved as visible). * The tile size is now more realistic as we use the same dimensions as the Online client does. * When rendering tiles at scale, we use the same dimensions as the Online client rather than splitting the width by 4, for realism. * Rendering of tiles is done rows-first, rather than columns-first, which is similar to what the Online client does, which is more cache friendly, therefore more realistic. * Enabled compiling of tilebench when GTK3 is disabled, which was erroneous, since tilebench doesn't have any dependency on GTK. + Now it's possible to compile with local Cairo/Pixman libs. Change-Id: Ib78d030ead387748914119f95fe49ddc1ce64498 Reviewed-on: https://gerrit.libreoffice.org/44936 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-11-28lokdialog: Remove getDialogInfo + update gtktiledviewer accordingly.Pranav Kant
Change-Id: I6f810c97f2fadd3b1ea602a97e24c8b42f4a84b9
2017-11-28gtv: Kill dialog selector combo boxPranav Kant
Change-Id: I2cd27dff95f2bc49a15ab395b8282b5496e1e229
2017-11-28lokdialog: Make vcl::DialogID an integerPranav Kant
This will help launching multiple instances of dialog from multiple views. The earlier approach of using the UNO command strings as dialog id would not have been useful for multi-view case. Change-Id: I01cfb3c8b204d5654df2417efdac6b50dc920f0e
2017-11-28lokdialog: Create dialog when callback is receivedPranav Kant
With this, we do away with initial approach of rendering the dialog on a large surface. We now create the cairo surface with dimensions of the dialog. Change-Id: Icb034693c7f1c656b7daae7f5c711b5bd4d8e880
2017-11-28lokdialog: gtv: Add width and height props to Dialog GObjectPranav Kant
Change-Id: I488a94d9c6cefd37624f755c6308f0b75595df84
2017-11-16Fix gtktiledviewer crash: this should be a null terminated listTamás Zolnai
Change-Id: I06e0923980b98b37b06ab45d8db68424b01d4f71 Reviewed-on: https://gerrit.libreoffice.org/42645 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Move getting dialog information in separate LOK callPranav Kant
Using outparameters to get the dialog information with the paintDialog call was quite confusing. Change-Id: Ief331b251dc66e66084b827ce5b025ba6c9ce7d2 Reviewed-on: https://gerrit.libreoffice.org/44473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Support painting parts of the dialogPranav Kant
Pass the dimensions of the region to the paintDialog call to paint only that much of the region in the dialog. The DIALOG_INVALIDATE callback also returns a 'rectangle' field now in the payload that tells the region of the dialog invalidated. It can be used in combination with the new paintDialog call then to paint only the invalidated region in the dialog. Change-Id: Iebb228865c71684e0f75dd01271b71ae41a0f906 Reviewed-on: https://gerrit.libreoffice.org/44472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Tunnel dialog title to lokclient as outparamPranav Kant
Change-Id: I1beb5ab3f06debdca7ebf999af7ac879a41ea47e Reviewed-on: https://gerrit.libreoffice.org/43959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Clear the pointer after destroyingPranav Kant
Change-Id: Iebbe3fab6f6144f0cf1de9a1c45a0b2a62b07e0b Reviewed-on: https://gerrit.libreoffice.org/43958 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Use UNO name as dialog id when invoking lok callbacksPranav Kant
... not the frame id from the .ui file Remove temporary hacks introduced earlier in GTV also. Change-Id: I71290a5fac6547a5584094da21e2301ef8fbce0c Reviewed-on: https://gerrit.libreoffice.org/43957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-11-15lokdialog: Smoother mouse move on floating windowsPranav Kant
Do away with an early hack to create the floating window with every invalidate. This gets rid of persistent blinking when moving the mouse over a listbox, for example. Change-Id: Ida9367156605edc9835529f83529363ad97beaee
2017-11-15lokdialog: button press type debug infoPranav Kant
Change-Id: I193e0ab82e998905b670f7de73daae784de3ef00
2017-11-15lokdialog: Emit dialog close callback upon dialog closePranav Kant
Change-Id: I4ccef76cc3b2926dd8916f825671bb732e101027
2017-11-15Change CB_DIALOG_INVALIDATE to CB_DIALOGPranav Kant
We can specify whether it is an invalidation or something else in the payload. Change-Id: I95c5fc0a0a88b5277eaa93c8d1f9b937bddce7b3
2017-11-15lokdialog: Mouse events for dialog floating child windowsPranav Kant
Change-Id: I06a081835d246f752e57f8cc289162ed31fc91d4
2017-11-15lokdialog: drawing area needs to have focus to capture key eventsPranav Kant
With this, key events successfully work now. Change-Id: I6dc6aff91dea08fcbc7ab840a77e2542ab9048ce
2017-11-15lokdialog: Move the floating window to its actual positionPranav Kant
gtk_window_move them to the position broadcasted to us by vcl Change-Id: Id27b52a24e721b51d7a153cc7c0e03197a99ee2f
2017-11-15lokdialog: Support for rendering floating window dialog widgetsPranav Kant
Now gtktiledviewer can show floating window dialog widgets when user clicks any of such widget in the dialog. Change-Id: I13d756f236379bc8b2041ed41cb7b502f7fd9b24
2017-11-15lokdialog: gtv: Forward key events on dialog to corePranav Kant
Change-Id: Icfc210b08c7f1d8ebaf9c731ed64bb128cfc4356
2017-11-15lokdocview: Remove unnecessary codePranav Kant
Change-Id: I1d744c91f01eb098e9273d2459b63a5444558f39
2017-11-15lokdialog: Trigger repaint on all opened dialog with invalidatePranav Kant
For now, temporarily trigger paints for all the opened dialogs whenever a dialog invalidation callback is emitted. This solves the problem for some of the dialogs where hard coded uno command, which we are using as dialog IDs in GTV, doesn't match with the dialog id contained in the payload of the invalidation callback. With this SearchDialog, AcceptChangeTracking and few others are responding well to mouse clicks and invalidate instantaneously while to invalidate and repaint some other dialogs, one needs to refocus them. Change-Id: Iac2acbda60c8e2d0eabe65440f3fbda3ef271d7a
2017-11-15lokdialog: Forward mouse events to vcl; enable mouse movePranav Kant
The current implementation works well - the mouse events are properly handled by the opened dialog changing the dialog states. However, since the uno commands (dialog IDs) are different from what is returned by LOK_CALLBACK_DIALOG_INVALIDATE, the invalidation doesn't instantaneously, so one have to make the dialog window out-of-focus and then again back to focus to trigger the paint and see the updated dialog state. The mouse coordinates are forwarded in pixels as of now. Enable mouse GDK Motion mask too for mouse move operation. Change-Id: Ia915f734e8cbf4586da2b70da5840fe1568b39bd
2017-11-15lokdialog: Set up intial posting mouse events to dialogsPranav Kant
Events from the dialog in GTV are forwarded correctly, but the events are still not processed by the dialog in core. Change-Id: Ib95ac0a3cd23f6cc2763c21425a67402b15f2de2
2017-11-15lokdialog: Queue a redraw on invalidation in gtktiledviewerPranav Kant
Change-Id: I081508674a71c3beb89175e4f8ac3256e6bc6c6a
2017-11-15lokdialog: this is a stringPranav Kant
Change-Id: I7cb320a740cdb21da5a654cf99c887f5c7a8979d
2017-11-15lokdialog: Dialog invalidation supportPranav Kant
For now, just invalidate the whole dialog whenever any of the controls in the dialog get invalidated. Since during dialog painting, many such invalidations are triggered, don't listen to them when we are painting. Change-Id: Ia8fc12cf9469691d60e91ef770d687e5ff01a7ef
2017-11-15gtktiledviewer: Implement modeless dialog renderingPranav Kant
Hardcode modeless dialogs available in writer (very few) as of now in the combobox. Change-Id: I82d1442fbc71776dd64640ad048a0375ca041a67
2017-11-15gtv: G_OPTION_FLAG_NONE is available since 2.42 onlyPranav Kant
Change-Id: Ic3aacb79a3e828e59fede437213f2b7298e49bc1
2017-11-15libreofficekit: Update the README to match realityPranav Kant
Change-Id: Ifb7bf759e87cb654401005914ed8906ef9456fdd