summaryrefslogtreecommitdiff
path: root/libreofficekit/source
AgeCommit message (Collapse)AuthorFilesLines
2016-01-29libreofficekit: password interaction optional and off by defaultMichael Stahl1-0/+10
Add setOptionalFeatures() function that clients must call during initialization, and enum LibreOfficeKitOptionalFeatures. Reviewed-on: https://gerrit.libreoffice.org/21809 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 23a0ee3c01c3588472e1c19605909d6b9401253c) libreofficekit: ask for password when loading encrypted documents (cherry picked from commit 2b63e576a5cf06f4af877d63403ad7955ac71b72) desktop: use x prefix for uno::Reference (cherry picked from commit 0101cd3da6262169fa273309a86ba5e7cfe573bf) loplugin:defaultparams (cherry picked from commit 95c8b8e85d3328bfbe906ef3f69145842aae01db) Change-Id: I73035193c87033052921c3aad94fdc057fe81111 Reviewed-on: https://gerrit.libreoffice.org/21838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-21lokdocview: 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> (cherry picked from commit 070bfedb7c0bc01ada0c0b95622543472ccb4a1c) Reviewed-on: https://gerrit.libreoffice.org/21638 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-12tdf#96513: Limit LOKDocView's zoom in [0.25, 5.0]Pranav Kant1-2/+27
Change-Id: Ibee485909dca1ea4a3774fca7a840afbf2d9883c Reviewed-on: https://gerrit.libreoffice.org/20819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit ba539fa91f9c3316107dcdf4a95718a49335d92e) Reviewed-on: https://gerrit.libreoffice.org/21347 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-01-12lokdocview: Fix WARNING when creating an errorDebarshi Ray1-1/+1
A GError needs a valid GQuark as the domain. Passing 0 leads to: GLib-WARNING **: (gerror.c:408):g_error_new_valist: runtime check failed: (domain != 0) Change-Id: I2f252eaa83a1519b5d16c7ba22c8f593732807ca Reviewed-on: https://gerrit.libreoffice.org/21261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org> Reviewed-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit 3ba1b60c97b342c13593d37ccf2b97a919808dfc) Reviewed-on: https://gerrit.libreoffice.org/21384 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2016-01-11tdf#96421: Return if no window is realizedPranav Kant1-0/+2
Change-Id: I13de7e6eae4e73932e8441ba2e2ad3e4ff888f41 Reviewed-on: https://gerrit.libreoffice.org/20799 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 4200a678fb54f0fa5d2f0c26c655252f9267a527) Reviewed-on: https://gerrit.libreoffice.org/21346 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-11lokdocview: Use shared_ptr to fix a possible memory leakPranav Kant1-6/+6
Possible because boost::property_tree can throw an exception. Change-Id: I68394ce3b30d448d40d8e22555bafdff1ffa6092 Reviewed-on: https://gerrit.libreoffice.org/21309 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 02b49890d51ec463d32846f1108344159664a9eb) Reviewed-on: https://gerrit.libreoffice.org/21345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-11tdf#96514: Emits a 'notify' signal when zoom changesPranav Kant1-0/+2
Change-Id: I5f55e4cce26096afcae3ad3711efa37757aada39 Reviewed-on: https://gerrit.libreoffice.org/20798 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 398ef76d5dc3ec1ed22fa1d9fd9151b61cce54e2) Reviewed-on: https://gerrit.libreoffice.org/21273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-11lokdocview: Use an array to install propertiesPranav Kant1-97/+90
This way we can directly reference any property by pointers to GParamSpec stored in a static array, rather than looking for property using property name. The former is a faster approach. This will come in handy for functions, such as, g_object_notify which needs to access properties to notify the object of any property change in a faster way. Change-Id: Ic4087bff3bdb63a3e8853d158c7af688e5e67811 Reviewed-on: https://gerrit.libreoffice.org/20797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 81f31f5151b54899ac5461c9c7c4021cdf31a9a6) Reviewed-on: https://gerrit.libreoffice.org/21272 Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-11coverity#1315075 Uninitialized scalar fieldCaolán McNamara1-0/+4
Change-Id: I003839589354f02f8064b6a6af6174d2793b9b3a (cherry picked from commit 92305c3c41d120b868e0821221a583697868ad6d) Reviewed-on: https://gerrit.libreoffice.org/21271 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-11coverity#1343633 Resource leakCaolán McNamara1-8/+6
Change-Id: I2384091557c2a3b061e2c60118309f35b65b45d6 (cherry picked from commit 746da6b7fb3829e1ca23a4b8dfec6c502bac681c) Reviewed-on: https://gerrit.libreoffice.org/21270 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-11coverity#1343632 Resource leakCaolán McNamara1-3/+3
Change-Id: I79bf35a4c1a2f0463abc202f6c2b104ffdd5139c (cherry picked from commit 5b05a3fa2d6873c1046a959c545db133b1974e2c) Reviewed-on: https://gerrit.libreoffice.org/21269 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-11coverity#1343631 Resource leakCaolán McNamara1-3/+3
Change-Id: Ic5d7c88ae4080c2e103fb691c2e326a9e239aa12 (cherry picked from commit 169298fa73d2c5429d1960db6049a4ed15653b4f) Reviewed-on: https://gerrit.libreoffice.org/21268 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-11lokdocview: Return if no document is setPranav Kant1-2/+33
For example, when document has been destroyed using lok_doc_view_destroy_document() Change-Id: I531b85018ffa25bcf88fb101c912b9f11b489a97 Reviewed-on: https://gerrit.libreoffice.org/20779 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit df4a196b8f1e97d8a45d1d517942e01bd13182e7) Reviewed-on: https://gerrit.libreoffice.org/21267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-11lokdocview: Use GLib basic typesPranav Kant1-6/+6
Change-Id: I07add7b9dcb1dc53d7ed61ff71545489de3be155 Reviewed-on: https://gerrit.libreoffice.org/20778 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit b902432b431d01634c1f56e4758ec236a999650d) Reviewed-on: https://gerrit.libreoffice.org/21265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-11lokdocview: Superfluous *_set_zoom() call on widget initializationPranav Kant1-1/+1
G_PARAM_CONSTRUCT implies that parameter will be set upon widget initialization which means calling lok_doc_view_set_zoom() while document still points to null. Change-Id: Ib576ac3b32c2349be2b2df6067ae79a056a03028 Reviewed-on: https://gerrit.libreoffice.org/20775 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit a2682e4b081a9a8c6814db768e4ee9e5390907ae) Reviewed-on: https://gerrit.libreoffice.org/21264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2016-01-11lokdocview: Remove an easy FIXMEPranav Kant1-2/+2
Change-Id: I8305f3eb45330f457089ca0524a0df004410f59c Reviewed-on: https://gerrit.libreoffice.org/20774 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 244aad533b0fd714136f4f62b5a07fc136c740f0) Reviewed-on: https://gerrit.libreoffice.org/21263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Pranav Kant <pranavk@gnome.org>
2015-12-17tdf#96250 LOK: guard against 0 pRenderingArgumentsMiklos Vajna1-1/+2
(cherry picked from commit 032e34d0014d2154feaf97105d2dbe69b290b8c5) Change-Id: Ifa39777795ce966662c31c891ffc1b9b1a297b00 Reviewed-on: https://gerrit.libreoffice.org/20743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-12-11tdf#96384: Add a new signal 'text-selection' to lokdocviewPranav Kant1-1/+20
To help client know when the user has selected a non-null text. Change-Id: Ie939612fc5f38e2e50e9ad9792e04e89ae918886 Reviewed-on: https://gerrit.libreoffice.org/20621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit ea5c99428f56e1d3a3e782505aa2f56f905038a4) Signed-off-by: David Tardon <dtardon@redhat.com>
2015-12-09tdf#96317: Add API for copy/paste from/to the widgetPranav Kant1-1/+32
Change-Id: Iac869ddb65cbdd2227f96d047d83159ca7819f11 Reviewed-on: https://gerrit.libreoffice.org/20534 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 7d7fad258dfde500c5ee99b5f1691172724383bd)
2015-12-09lokdocview: Set a 'default' path for LOK initPranav Kant1-1/+1
When passed NULL to lok_doc_view_new, use the default path : $libdir/libreoffice/program as LOK install path Change-Id: I1e033c407184b29b1509cfb8c416b514591d67ce Reviewed-on: https://gerrit.libreoffice.org/20476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 424c09b10d3d6ba6edfed2dcf560d5ce2c950b9d)
2015-12-09tdf#96318: Add searching APIPranav Kant1-19/+88
Clients should now use these APIs to search for text in the widget, rather than executing UNO commands directly on the widget. This allows searching for text in the widget in view-only mode too. Change-Id: I013b6f96e69a634ec33367394d39c0f645a4994d Reviewed-on: https://gerrit.libreoffice.org/20488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 0f64cf72ff3b930e306e937bb18f4cbe55a8026a)
2015-12-09tdf#96316: Decouple view-only/editable modesPranav Kant1-132/+180
- Move text selection and graphic selection tasks into functions - Merge GDK_BUTTON_PRESS, GDK_BUTTON_RELEASE conditional code - Do not change to 'move' cursor in view-only mode - Ignore LOK_POST_COMMAND, LOK_SET_GRAPHIC_SELECTION in view-only As a consequence this commit also allows dragging handles during text selection in view-only mode which was earlier not possible. Change-Id: Iffb668d5447dd646a1e40237dee8d8d3fa3314b6 Reviewed-on: https://gerrit.libreoffice.org/20487 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit b3bfc26d0863b074bb990725718f2ab23d05425d)
2015-11-24cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: I1934441858baeeb41a46f694dbcef2d846b308b7
2015-11-23loplugin:cstylecastStephan Bergmann1-1/+1
Change-Id: I4a02309c3ef4cb8c88edd538012ed2a8c43da307
2015-11-23Do all svp text rendering with cairoCaolán McNamara3-22/+26
enabling us to delete a whole pile of foo For android we patch cairo, which is internal in that case, to swap the rgb components so that cairo then matches the OpenGL GL_RGBA format so we can use it there where we don't have GL_BGRA support. Change-Id: I25e34889c7b7263438b143dd2a2ad882fb0f190a
2015-11-23android: remove duplicated bitmapsMiklos Vajna1-3/+3
Change-Id: I5e16aa9da0aabe4302ebdd30b080b6bad4767006
2015-11-18gtktiledviewer: allow passing initializeForRendering() argumentsMiklos Vajna1-1/+4
Change-Id: Ic7b52764cf2fedbf73d4dcaaf36d1055b8ee22f2
2015-11-18lok::Document::initializeForRendering: support init. argumentsMiklos Vajna1-1/+1
Change-Id: I8aaf19a50f25f495cb87fba7ff6a4b0f56ed7d80
2015-11-13loplugin:nullptrStephan Bergmann1-4/+4
Change-Id: Iaf779157b97e4d3a3a449cc7f17e4d5c533955f0
2015-11-13LOK: calc formula callback + formula bar implementation in gtkMihai Varga1-0/+25
We need the callback to be able implement the formula bar Change-Id: I1c78ab0b9ed9304c0465a9993a7101f8efb91052 Conflicts: include/LibreOfficeKit/LibreOfficeKitEnums.h libreofficekit/source/gtk/lokdocview.cxx
2015-11-13LOK: setClientZoom() - sets the client zoom levelMihai Varga2-1/+48
We need to know the client's view level to correctly handle the mouse events in calc. PaintTile() set a zoom level that corresponds to the requested tiles and previously postMouseEvent would call SetZoom(1,1). Now we can make use of knowing the client's view level and call SetZoom() with the correct parameters Change-Id: I34b5afcdcc06a671a8ac92c03e87404e42adf4cd Conflicts: sc/source/ui/unoobj/docuno.cxx
2015-11-11lokdocview: support LOK_CALLBACK_MOUSE_POINTERAndrzej Hunt1-0/+11
Change-Id: I2052e39fa2e25988a40f293389d5a183a625acd4 Reviewed-on: https://gerrit.libreoffice.org/19903 Reviewed-by: Andrzej Hunt <andrzej@ahunt.org> Tested-by: Andrzej Hunt <andrzej@ahunt.org>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann3-91/+91
Change-Id: Ibdb6409664cdf9499b6fec95c5de3549887b8106
2015-11-10lokdocview: assert that loading of handle bitmaps succeededMiklos Vajna1-0/+13
A number of such bitmaps were removed by accident in commit 74463457b39c9def1add630b7b0581dc195549c8 (android: chanhe handles to use alias, tint handles with color, 2015-11-01). Change-Id: I253c4b5790e82de32e6fd06896645adf360fa586
2015-11-06gtktiledviewer: add Ctrl, Alt, Shift shortcut supportLászló Németh1-1/+22
For example in Writer: Ctrl-B for bold text Ctrl-Shift-B/P for subscript/superscript Ctrl-Alt-C insert comment Ctrl-1 apply Heading 1 paragraph style Change-Id: Iaeb8341f2cb273980b637ff2fed89585094e0d9d
2015-11-05sc lok: Cell Cursor callbackAndrzej Hunt1-0/+30
This only works correctly for the default zoom level - since the updateLibreOfficeKitCellCursor call happens during the internal / hidden rendering, it uses the internal zoom values, which can differ from the tiled-rendering zoom values. Conflicts: include/LibreOfficeKit/LibreOfficeKitEnums.h Change-Id: Ie4f344fe771078fca10ad9d6f7a93e88fb93880a
2015-11-04lokdocview: Don't render tiles while tile buffer has changedPranav Kant3-2/+57
This is common when widget gets a zoom request, resulting in a new tile buffer, and the tiles from the old tile buffer are still waiting to be processed in the LOK thread, for old tile buffer. If we allow these useless operations to execute successfully, they would end up writing in new tile buffer giving false results. Lets tag every paint tile operations with their respective tile buffer during `task` creation, and then check whether the tile buffer has changed or not before writing to the tile buffer. Change-Id: If784341a67ad430bc3415b765137badaad6b97f6 Reviewed-on: https://gerrit.libreoffice.org/19726 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-11-03-Werror,-Wformat-securityStephan Bergmann1-2/+2
Change-Id: I23f4b906456fdba84f2772a4ed15ac6c141a094d
2015-11-03lok: Introduce LOK_CALLBACK_UNO_COMMAND_RESULT callback.Jan Holesovsky2-2/+34
Posting of the .uno:Something commands is asynchronous. To be able to find out when eg. .uno:Save finished, this commit introduces a callback that fires when that happens. To be able to receive such a notification, the appropriate postUnoCommand() must be called with 'true' as the parameter for bNotifyWhenFinished (defaults to 'false'). Change-Id: I254939ebc8ea5f309ae39686dcaaeddd5148b0c9
2015-11-03lok: Fix typo search-result_count -> search-result-count.Jan Holesovsky1-1/+1
Change-Id: Iccd5b39f6bdf1c7a43131fc50186ea5a2838d77e
2015-11-03libreofficekit: -Werror=unused-parameterMiklos Vajna3-4/+3
Change-Id: I89c4d9752ef650d516bed8fcdc5873de8ae87e18
2015-11-03lokdocview: Separate "painting" and "saving" of tilesPranav Kant2-17/+49
Lets separate the task of painting the tile, and saving the tile in tile buffer using GAsyncReadyCallback. This will provide us with better control over tiles -- cancelling the painting operation, and filtering tiles that should not be saved in the tile buffer. Change-Id: I6aae928d8cc0c906034570ed0e9a054763d493a3 Reviewed-on: https://gerrit.libreoffice.org/19725 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-10-31lokdocview: Fix memory leaksPranav Kant3-18/+28
Change-Id: I5107e4fa1828145a709e1edffe02831f4faae3c8 Reviewed-on: https://gerrit.libreoffice.org/19676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-10-30lokdocview: ensure private structure is allocated with operator newMiklos Vajna2-48/+108
It's undesirable to malloc a struct that has a TileBuffer member, while TileBuffer doesn't have a default ctor. Change-Id: I72dfacc0088f238ee101d84838bd7eea51ced82a
2015-10-21lokdocview: Emit a warning after errorPranav Kant2-17/+112
Change-Id: Id8e20e6561239096438d420c65d0da6dcc7f5e2e Reviewed-on: https://gerrit.libreoffice.org/19474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-10-20lokdocview: Use G_PARAM_STATIC_STRINGSPranav Kant1-16/+26
... as `name`, `nick`, and `blurb` are guaranteed to remain valid and unmodified for the lifetime of the parameters. Change-Id: Ic6463b470546669d5a815842daedb170df85d161 Reviewed-on: https://gerrit.libreoffice.org/19472 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-10-09lokdocview: log postUnoCommand() argumentsMiklos Vajna1-1/+4
Change-Id: I0febc2b89d95bde59ad9d3a90d404b3932cc3624
2015-10-09LOK: CALLBACK_SEARCH_RESULT_COUNT is redundantMiklos Vajna1-8/+6
1) The size of the searchResultSelection array in LOK_CALLBACK_SEARCH_RESULT_SELECTION provides the same information. 2) None of the clients except lokdocview used it. 3) Only sw provided this callback, not sc/sd. Change-Id: I9da639b6693f24634f298f9bc4773f705e944359
2015-10-07lokdocview: invalidate after selection changeMiklos Vajna1-0/+1
Without this e.g. Calc search does not show the selection rectangle correctly. Change-Id: I5bc20a93ee861d3353bc2e1c1ed7ea8d0e6c8ed4
2015-10-06libreofficekit: -Werror=unused-macrosMichael Stahl1-3/+0
Change-Id: I154bd2c101819669d43ab475144ae400454df4d0