summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)AuthorFilesLines
2016-06-22lokdocview: ensure setView() + doSomethingElse is atomicMiklos Vajna1-0/+23
Otherwise it's possible that a keystroke is sent in for a different view, when that other view reacts to an invalidation (invoking paintTile()) caused by a previous keystroke. I.e. open two views, place the cursor at different positions, type fast, and some of the characters appeared at the incorrect view. Change-Id: Ie5e471f1b9c2d69adaa87111fba74d4abe184ef8 Reviewed-on: https://gerrit.libreoffice.org/26562 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21sw: add LOK_CALLBACK_TEXT_VIEW_SELECTION testcaseMiklos Vajna1-1/+0
Fails with 9f66db9c474f71f43d7a3667230241fd4fa4183f (sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTION, 2016-06-21) reverted. Change-Id: Ide21167ce2dc4287b1860b5f03a6975dc9edd4c6 Reviewed-on: https://gerrit.libreoffice.org/26550 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21lokdocview: handle LOK_CALLBACK_TEXT_VIEW_SELECTIONMiklos Vajna1-2/+28
It's similar to the normal selection, but it's colored and has no handles. Change-Id: Ibd9594b4834ff4f9b1cfd85912ed5cee3c8b8c71 Reviewed-on: https://gerrit.libreoffice.org/26543 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTIONMiklos Vajna1-0/+7
So a view can be aware where selections of other views are. Change-Id: I5026b1ff2b99a4eedfd0bde32a05ceb8e2f424bc Reviewed-on: https://gerrit.libreoffice.org/26542 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21lok: Expose LO version informationPranav Kant1-0/+9
Change-Id: Ided924e928c04385457c7a2e231fdf57e7e38970
2016-06-20lokdocview: handle LOK_CALLBACK_INVALIDATE_VIEW_CURSORMiklos Vajna1-1/+58
It's similar to the normal cursor, but it's colored and does not blink. Change-Id: I6a869a98f46979946f320905426e016fe011cbc6 Reviewed-on: https://gerrit.libreoffice.org/26522 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-20sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSORMiklos Vajna1-0/+7
So a view can be aware where cursors of other views are. Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da Reviewed-on: https://gerrit.libreoffice.org/26513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17LOK: change type of view ids to uintptr_tMiklos Vajna1-2/+5
This fixes the following problem: - createView() = 1 - createView() = 2 - destroyView(1) and then view #2 was renumbered to 1. Instead expose the pointer address of the SfxViewShell as the ID, which is not changing in such a situation. Note that the SfxViewShell <-> ID mapping is an implementation detail of SfxLokHelper, and only pointers are converted to IDs, user-supplied IDs are never converted back to pointers. Change-Id: If79ef8b99ba391011b5d82b219ad13447d44cd5a Reviewed-on: https://gerrit.libreoffice.org/26423 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17comphelper lok: remove the g_bViewCallback globalMiklos Vajna1-9/+7
Its purpose was to allow incrementally migrate all callers of SdrModel::libreOfficeKitCallback() to use SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only the currently active or all views) instead. That is done by now, so it can go. Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3 Reviewed-on: https://gerrit.libreoffice.org/26413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-16comphelper: enable LibreOfficeKit::isViewCallback() by defaultMiklos Vajna1-1/+1
This requires porting the sw/sd/sc_tiledrendering test code to the new internal API, as only the public LOK API is unchanged. Change-Id: Ic6a2f96421da4a16bdee7d0cbb3f6e35bc6ddff9 Reviewed-on: https://gerrit.libreoffice.org/26379 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-15gtktiledviewer: add a UNO command debuggerPranav Kant1-0/+113
... to fire desired UNO commands from a dialog. Helpful when you need to check some arbitrary UNO commands not supported via UI yet. Change-Id: I55df75ef235f5eb6922c50619610caf1c88241fb
2016-06-15gtktiledviewer: Fix runtime gtk warningsPranav Kant1-4/+5
Not all buttons are toggle buttons. Change-Id: I6cddc619f3f760e447ea3ffea07f776e03cdaab9
2016-06-14lok_doc_view_reset_view: don't touch the view idMiklos Vajna1-9/+46
Otherwise the following can happen: - view #0 is created - view #1 is created - view #1 changes part, so lok_doc_view_reset_view() gets called - view #1 calls postMouseEvent(), but claims it happened on view #0 Also log all setView() calls in the widget. Change-Id: Iefcf82d9396b2af75586e79dde59998320f41d60 Reviewed-on: https://gerrit.libreoffice.org/26245 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-13gtktiledviewer: fix the per-view part selectorMiklos Vajna1-3/+18
Need to populate it & register handlers for the non-first windows as well. Change-Id: I27231027c3f33fb081768c51ecc291b9f2a7e99b Reviewed-on: https://gerrit.libreoffice.org/26225 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-10gtktiledviewer: fix runtime warnings caused by .uno:InsertAnnotation buttonMiklos Vajna1-5/+8
It's a GtkToolButton, but not a GtkToggleToolButton, so don't cast command buttons down unconditionally. Change-Id: Ie7c9bdf6fa8725363e40c1544f4e1e835a559f3a Reviewed-on: https://gerrit.libreoffice.org/26171 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-11lokdocview: Add debug info; paintTile rendering timePranav Kant1-1/+9
Change-Id: Icdb14e9a5fedb3dcfbad502e323b333c3dbcc534
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann1-1/+1
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-04-27lokdocview: log postMouseEvent() argumentsMiklos Vajna1-0/+8
Change-Id: Idd4db9259448d3dcf4e0820b8845a1ab395f0bff Reviewed-on: https://gerrit.libreoffice.org/24427 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-26lokdocview: log setGraphicSelection() argumentsMiklos Vajna1-0/+5
Change-Id: I36af712274e1a3f9dacd5d62ab42032ca9e9acdd Reviewed-on: https://gerrit.libreoffice.org/24390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-19In lok_init_2, allow vnd.sun.star.pathname user_profile_urlStephan Bergmann1-1/+2
...which takes a raw filesystem pathname that is internally converted to a file URL (similarly to what is supported for the INIFILENAME and URE_BOOTSTRAP bootstrap variables in rtl::Bootstrap). That way, the gtktiledviewer executable doesn't need to try convert a pathname into a URL. Also adapted various parameter names to make it obvious that URLs get passed, not pathnames. Change-Id: I33ab31fe142d94ee47885033ef48278ef5ff55a2 Reviewed-on: https://gerrit.libreoffice.org/24241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-19tdf#99314 lokdocview: add new userprofileurl propertyMiklos Vajna2-2/+46
So that users of the widget can use a custom user profile, allowing running widgets users and LibreOffice in parallel. Change-Id: I1bd0a8e53aa3216adc721052cf30f0dd174327bd Reviewed-on: https://gerrit.libreoffice.org/24237 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-08lok context menu: Expose context menuPranav Kant1-0/+7
Change-Id: I0968689630e10f838c075e86357eb36a9a220d0d
2016-03-08New LOK_LOADLIB_GLOBAL to let clients control dlopen(RTLD_GLOBAL)Stephan Bergmann1-1/+7
...in LibreOfficeKintInit.h's lok_loadlib, now that RTLD_GLOBAL isn't only needed for UBSan (62b124b2704adf11a63681164d05a8eb49dfb105 "Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptr") but also for -stdlib=libc++ on Linux (see <https://whatofhow.wordpress.com/2016/03/01/libclibcabi-on-linux/>). Change-Id: I24ed6612c3d922eba695423d46af5635c77f7077
2016-03-01gtktiledviewer: log .uno:ViewRowColumnHeaders command resultMiklos Vajna1-0/+1
Change-Id: I6d71071371ef54f70613246162c893daa56b7bb9
2016-02-25cid#1354270 fix uninitialized membersMiklos Vajna1-0/+1
Change-Id: I35fda96885375996a1b0b05ecc04a0ac35104b88
2016-02-21tdf#97235: Protect reset_view when called with no tile buffer initializedPranav Kant1-1/+3
This can happen when no document has been loaded yet. Change-Id: Ib9c18e22b6c344528d05eb781bf9b3052060089a
2016-02-21tdf#97236: Refresh the view when part is changedPranav Kant1-0/+2
Change-Id: I189d33cd25f394f5740d54fb5fe5567ac71299e4
2016-02-21lokdocview: Protect set_part from setting an invalid part numberPranav Kant1-0/+9
Change-Id: Iffbe71ab161d5c50a98fd17ee0fdd0ab4d065e9d
2016-02-14lokdocview: Center the widget vertically inside the allocationPranav Kant1-0/+2
Change-Id: I891519d54212ecd99273a54aca2a44e2d54c1933
2016-02-14tdf#97301: Return silently when no document is loadedPranav Kant1-0/+3
Change-Id: Id6cf77ee7597fb992a306649c2f2a3639bf6dad8
2016-02-09vcl, libreofficekit: gtk_clipboard_wait_for_contents() may return nullMichael Stahl1-0/+4
Don't crash then. Change-Id: I4980fe4ea56e023cbf303fa43d1e6b383d983d2e
2016-02-05cid#1351879 missing breakMiklos Vajna1-0/+1
Change-Id: I3e86b57b6384370666f023115ae7d4671f1eaca1
2016-02-04coverity#1351757 Uninitialized pointer fieldCaolán McNamara1-0/+5
Change-Id: I996dc17ba0c01bf23283687dffb563b0eac3a31a
2016-02-04gtktiledviewer: cid#1351757 uninitialized membersMiklos Vajna1-0/+2
Change-Id: Ifb48dc528e95519097477faf79b10e3e7637869d
2016-02-04new loplugin fpcomparisonNoel Grandin1-1/+1
Find code that compares floating point values with == or != It should rather use rtl::math::approxEqual Change-Id: I9026e08823340fa1d6a042c430515344c93215bd Reviewed-on: https://gerrit.libreoffice.org/21997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-03lok interaction handler: Add handling of io and network errors.Jan Holesovsky1-0/+17
Change-Id: If7c84a7b24f2072439718fb0c473b73243f2ecc1
2016-02-02lokdocview: Handle password protected documentsPranav Kant2-5/+154
Change-Id: I606a1112c8eb4c1cc4596d6947ce1223543cc87c Reviewed-on: https://gerrit.libreoffice.org/21861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02LOK: add Document::setClientVisibleArea()Miklos Vajna1-1/+9
... and implement it in Writer. Otherwise there is no way we can perform e.g. page down in an expected way. Without this, the core visible area depends on the zoom in the document, and the client visible area can be something entirely different. Change-Id: Iadfb5a225da09a2551ffa41ddf503bb3d22b3eae
2016-02-02lokdocview: add a set_visible_area()Miklos Vajna2-1/+26
Change-Id: Ib63959ad64fe52b648e0c0d3fe6d49fb282d57ee
2016-02-01lokdocview: call lok::Document::setClientZoom() after zoom changeMiklos Vajna1-1/+24
This is similar to what is implemented in online.git's leaflet. If the zoom factor changes, then inform LOK about it on the first keyboard hit. Change-Id: I2db4ffed3897db5c852f4b8aea8f4e2d3500a25a
2016-02-01lokdocview: log lok::Document::postKeyEvent() argumentsMiklos Vajna1-0/+3
Change-Id: I16e7c0fee34077d5bbb493d9d9502ff82355c2c6
2016-01-28Missing includeStephan Bergmann1-0/+1
Change-Id: I4930837c2a5bd78c16a83dcccde34843d3026618
2016-01-27libreofficekit: password interaction optional and off by defaultMichael Stahl1-0/+2
Add setOptionalFeatures() function that clients must call during initialization, and enum LibreOfficeKitOptionalFeatures. Change-Id: I73035193c87033052921c3aad94fdc057fe81111 Reviewed-on: https://gerrit.libreoffice.org/21809 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-01-25libreofficekit: ask for password when loading encrypted documentsMichael Stahl1-0/+8
Change-Id: I3b3b0c0e64965280c24842b0cf70a21b8abb4dfb
2016-01-22lokdocview: handle page down and page upMiklos Vajna1-0/+6
Change-Id: I119633474236faa95ecf5fd26cd89789b313e382
2016-01-22lokdocview: log lok::Document::getTextSelection() parametersMiklos Vajna1-0/+4
Change-Id: I7706fe40705bc74bcebd53b58239c4b159bab7c0
2016-01-21gtktiledviewer: support pasting PNG imagesMiklos Vajna1-4/+22
Change-Id: Ifaf96dee8b6554282f6a19ac6d6e0d14318aa1f4
2016-01-21gtktiledviewer: Set buttons insensitive in view-only modePranav Kant1-45/+98
These buttons, such as, bold, italic, underline, paste, doesn't make any sense in view-only mode. Lets make them insensitive in view-only mode. Change-Id: I194f6a4d707b72d1d6aa3967aa526092445f0926 Reviewed-on: https://gerrit.libreoffice.org/21642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-01-20lokdocview: Center the widget inside the allocationPranav Kant1-2/+9
Change-Id: I8d7f8ffb1c5ddd07ccf7d56bdf0ccc866c927401 Reviewed-on: https://gerrit.libreoffice.org/21624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-19lokdocview: Package and install selection handlesPranav Kant3-6/+26
Now since, LOKDocView has started to get clients, we need to ship all of its dependencies with the widget. Reviewed on: https://gerrit.libreoffice.org/21605 Change-Id: I874eb416587a80b7760c5f00183d6004dfca4cce