summaryrefslogtreecommitdiff
path: root/include/sfx2/lokhelper.hxx
AgeCommit message (Collapse)AuthorFilesLines
2017-11-24lokdialog: Move the painting down to Window, and enable Calc and Impress.Jan Holesovsky1-2/+2
Tested with .uno:FormatCellDialog in Calc, Impress not tested. Change-Id: I6d911c29616988db0625be9e2a63cf2172c69ee8
2017-11-24lokdialog: Move the Notifier down to vcl::Window.Jan Holesovsky1-2/+2
We need to tunnel more than just dialogs, so this is the 1st step to get the Autofilter popup rendered. Change-Id: I6523a39ddc7a6eb2a204e48ab364130a5822f548
2017-11-24lokdialog: Make vcl::DialogID an integerPranav Kant1-2/+2
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-24lokdialog: Changed dialog painting to allow for modal dialogsPranav Kant1-1/+1
Split IDialogNotifier from IDialogRenderable and make SfxViewShell implement it. We now just send the dialog UNO command to the backend and wait for core to emit a 'created' dialog callback which signals dialog creation in the backend. The client is then supposed to send the paint commands for rendering the dialog. Change-Id: I1bfbce83c17955fa0212408376d6bcd1b2d2d1dd
2017-11-15lokdialog: Expose cursor visible statusPranav Kant1-1/+4
Change the notifyDialog API a bit. Use a std::vector to keep track of each payload item that needs to be fed to the resulting JSON. Change-Id: If3229a88d2df5368e14290a0e80ebe6206780639 Reviewed-on: https://gerrit.libreoffice.org/44722 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-11-09lokdialog: Support painting parts of the dialogPranav Kant1-1/+1
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-10-02Change CB_DIALOG_INVALIDATE to CB_DIALOGPranav Kant1-2/+2
We can specify whether it is an invalidation or something else in the payload. Change-Id: I95c5fc0a0a88b5277eaa93c8d1f9b937bddce7b3
2017-10-02lokdialog: Support for rendering floating window dialog widgetsPranav Kant1-0/+2
Now gtktiledviewer can show floating window dialog widgets when user clicks any of such widget in the dialog. Change-Id: I13d756f236379bc8b2041ed41cb7b502f7fd9b24
2017-10-02lokdialog: Dialog invalidation supportPranav Kant1-0/+2
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-07-28sfx2 lokhelper: indentation fixesMiklos Vajna1-2/+2
These files had a consistent style before, let's keep them that way. Change-Id: I8a05a8fbbc193373e0815f27d2cd9ff1272ba0eb
2017-07-21loplugin:constparams in sfx2Noel Grandin1-2/+2
Change-Id: Id982c8fb5654433e9db10e2da6a86a6c8d90b9b4 Reviewed-on: https://gerrit.libreoffice.org/40261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16lok: sc: make row/col header updating, on row/col operations, tab-awareMarco Cecchetti1-2/+0
Now, on inserting/removing or resizing a row/col, the row/col header invalidation callback is notified to another view only if it is displaying the same tab of the view where the row/col operation is occurring. Conflicts: sc/source/ui/view/tabvwshc.cxx Change-Id: Ic65fd82b2e3009420c7b481e7e8c1ff8bb11bcce Reviewed-on: https://gerrit.libreoffice.org/37241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-04-21LOK - Calc: changed the way header is updated on row/col insert/removeMarco Cecchetti1-1/+2
This patch introduce a new LOK callback for informing the client that the row/col header is no more valid and needs to be updated. Change-Id: I21a3a41d69bd1a3c11c9ffaf1d7d53dbc3b9681d Reviewed-on: https://gerrit.libreoffice.org/36733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-04-14sfx2 lok: use auto when initializing with a cast to avoid duplicationMiklos Vajna1-1/+1
Change-Id: I4e462e9355db3ae44deb0762f019f097f8550eb2 Reviewed-on: https://gerrit.libreoffice.org/36548 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-16Lok: improved tile invalidation compressionAshod Nakashian1-0/+4
Handle corner cases better and eliminate invalid rects and out-of-bounds coordinates. Change-Id: Ib9247ae4f0306cf68937cd2678f6386fe7710eec Reviewed-on: https://gerrit.libreoffice.org/31665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-10-03Calc: implemented parallel cell text editingMarco Cecchetti1-1/+20
Change-Id: If8cc7a637cee6ba66813d55b25160fee13a2a219 Reviewed-on: https://gerrit.libreoffice.org/29410 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna1-0/+2
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-16sfx2: add SfxLokHelper::getViewIdsMiklos Vajna1-0/+2
and also expose it in the LOK API. This way clients don't have to keep track of what views they created / destroyed, they can also get an up to date list with this method. Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
2016-09-16lok::Document: rename getViews() to getViewsCount()Miklos Vajna1-1/+1
As this only returns the number of views, not the actual views. Since it's a rename, it's just an API (but not an ABI) change. Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
2016-08-31sfx2 lok: introduce SfxViewShell::NotifyCursor()Miklos Vajna1-0/+2
It allows removing the hide/show cursor hack in SfxViewShell::registerLibreOfficeKitViewCallback() introduced in commit 4d211384f048b689f20e46d4d586f342b110cb5c (sfx2 lok: fix missing view cursors in a new view, 2016-06-20), and instead let the application code in sw/sc/sd implement the best way to show existing cursors in a new view. This way the per-app cleanup of view cursors introduced in commit bc9b4fd4c83af3532204237157821d4884c42d8e (lok::Document::destroyView: clean up view cursors/selections, 2016-07-15) has matching per-app init code. This commit just adds the API + adapts existing sw code to use it, sc/sd still has to be implemented. Based on a patch by Marco Cecchetti, thanks! Change-Id: I38510fa4962f405b1b96a79024206c9e7f33cad2 Reviewed-on: https://gerrit.libreoffice.org/28557 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-30LOK: change back type of view ids to intMiklos Vajna1-5/+4
Commit 45c2410041c48c22bd860efb42d4daadad7869b0 (LOK: change type of view ids to uintptr_t, 2016-06-17) fixed the problem of view IDs being reused for the price of random IDs, which makes debugging harder. Implement a simple shellToView() function that makes sure view IDs are not reused, and stop exposing view shell pointer addresses, which allows reverting the LOK API change. Change-Id: I63089e6de08ee7e1c7706757d43a11f6cf4d6e06 Reviewed-on: https://gerrit.libreoffice.org/26773 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/+4
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-21sfx2 lok: fix missing view cursors in a new viewMiklos Vajna1-1/+1
When a new view was created, the old views got the position of the new view, but not the other way around. Make sure that the old views notify the new one right after registering the callback. Change-Id: If26edbd57aa939e453d95f4907a0e5722329dd65 Reviewed-on: https://gerrit.libreoffice.org/26523 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-1/+1
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-4/+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-04-04Use std::size_tMiklos Vajna1-4/+5
And include <cstddef> where necessary. Change-Id: Icc1208528d6a8b04375d55ccbf3cd6ef046b454f Reviewed-on: https://gerrit.libreoffice.org/23796 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-09-21LOK: make getViews() be a member function of DocumentMiklos Vajna1-3/+2
Just to be consistent, as all other view-related member functions are there, too. No real impact, as only the unit test uses this so far, and it always works with a single document. Change-Id: I46f1ed8265ab95017986ab45c1b510e961192241
2015-09-21Use SfxViewFrame::Current()Miklos Vajna1-2/+2
Allows getting rid of vcl::ITiledRenderable::getCurrentViewShell(), which would do the same, just not implemented outside Writer. Change-Id: Id26ceca560fb9002dc2d5c740c411b9c4a149523
2015-09-21lok::Document: add get/setView()Miklos Vajna1-0/+4
Change-Id: Ic3bce8f01d7e048e853c063c4bce1255845c60d0
2015-09-21sfx2: add missing header guardMiklos Vajna1-0/+5
Change-Id: Ide261670be475f5d54d9d12c701ad82470396aeb
2015-09-21lok::Document: add destroyView()Miklos Vajna1-0/+2
Change-Id: Id9e92593217541b4123e95279019cec3c958056c
2015-09-21lok::Office: add getViews()Miklos Vajna1-0/+3
Change-Id: Iabfb0f2a19106dc4a6bdae45f9e85d76c68a973e
2015-09-21sfx2: add SfxLokHelperMiklos Vajna1-0/+21
This is meant to be a class that is visible outside sfx2 (so e.g. desktop can use it later), but has access to various sfx2 internals. Change-Id: I83204963492b11c1c4a621e86528a64fba27acf3