summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)AuthorFilesLines
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann5-142/+142
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-06gtktiledviewer: larger default window sizeMiklos Vajna1-1/+1
So comments in an otherwise empty Writer doc are immediately visible. Change-Id: I189c4eff6e83274f609ce016f9610c307c47ff16
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-04yyyyyNoel Grandin1-1/+1
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
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-04sc lok: return absolute positions for row/column headersMiklos Vajna1-23/+13
This simplifies both LOK API implementation and client code, and also clients are no longer required to floor() the twip -> pixel conversion result. Change-Id: I63dbc05f53e8f7582b964c43d5da3aad51ede10d
2015-11-03-Werror,-Wformat-securityStephan Bergmann1-2/+2
Change-Id: I23f4b906456fdba84f2772a4ed15ac6c141a094d
2015-11-03-Werror,-Wformat-securityStephan Bergmann1-1/+1
Change-Id: I34976a4900a73505a91d3e58736675ab39ad174c
2015-11-03sc lok: allow requesting row headers only for a logic areaMiklos Vajna1-2/+10
So that for large documents it's not needed to query all of them on load, but (similar to tiled rendering itself) it's possible to query the data that affects the visible area. One catch is that the row sizes are relative, so there is a placeholder row in case the visible area is not the top left corner, and constructing its size needs special care. Normally the handed out twip values have to be floored after twip->px conversion, but this one is already rounded (as the total is a sum of px values, again becase of the previous floor rule), so need to play the +0.5 trick to allow clients always just flooring the logic conversion result they get. Change-Id: I64a155582acdee7b2acc741d77a2c462409b91a8
2015-11-03lok: Introduce LOK_CALLBACK_UNO_COMMAND_RESULT callback.Jan Holesovsky3-4/+47
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-11-02gtktiledviewer: adjust spreadsheet row/column headers on scrollingMiklos Vajna1-4/+39
Change-Id: I7ed9e19df071b6baf1e941faee24c332c7b5e804
2015-11-02sc lok: fix rounding errors with non-100% zoomMiklos Vajna1-2/+2
There were two problems here: 1) ScTabView::getRowColumnHeaders() did not expose twip values directly, but used ScRow/ColBar::GetEntrySize(), which does a twip -> pixel conversion, and then converted it back to twip. Avoid this unnecessary roundtrip. 2) ScViewData::ToPixel() trunaces the resulting float to an integer, so if the result is e.g. 67.7 pixels, then Calc handled that as 67, but gtktiledviewer rounded that up to 68, resulting in non-matching headers for the rendered tiles. Change-Id: Ie6ed1ea923a423d1526eeb235b7b87106fd2f20b
2015-11-02gtktiledviewer: show zoom in the status barMiklos Vajna1-7/+27
Change-Id: I4ab00a269b0a8435a278f93e1d92d102a80c8506
2015-11-02sc lok: emit RowColumnHeader info in twipsMiklos Vajna1-2/+4
As that's the unit we use everywhere else in the LOK API. Also, make the ScGlobal::nScreenPPTX/Y calculation more precise, otherwise rounding errors occur during the pixel -> twip conversion. Example with the old precision: col height is 103 px, nScreenPPTY is 0.067, twips is 1537.3134328358208, convering it back is 102.487562189 px. Example with the new precision: col height is 103 px, nScreenPPTY is 0.0667, twips is 1544.2278860569716, convering it back is 102.948525737 px. Change-Id: I19f5285508ef0c751614d07969b3a7a037e7d1ec
2015-11-02gtktiledviewer: add a few more trivial buttons and break the toolbar into twoMiklos Vajna1-48/+120
Change-Id: Iea8f32fb8c388b49dad8119f816502f593ebadeb
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-30loplugin:staticmethodsStephan Bergmann1-3/+3
Change-Id: I9ac908d0981734e4b2930a79f160ec0462127483
2015-10-30gtktiledviewer: add missing spreadsheet corner buttonMiklos Vajna1-1/+51
Change-Id: I3a7af693ccdce2012ddbaa6a3ac8321f29b6356c
2015-10-30gtktiledviewer: initial column headers for spreadsheet documentsMiklos Vajna1-48/+83
Change-Id: I10e88b4ff4ab0cfb29e97fa608d8acd69ce0f062
2015-10-30loplugin:staticmethodsNoel Grandin1-1/+1
Change-Id: I4cdf2fa91dde1968cfb984faf0bdd3aad42eefd2
2015-10-30gtktiledviewer: initial row headers for spreadsheet documentsMiklos Vajna1-1/+127
Change-Id: Iec9080d7017ddcf2b605243bc820f9664110c2e8
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-26gtktiledviwer: try to paste as html, then as plain textMiklos Vajna1-0/+28
Change-Id: I8e1c93fd36fb903c0625b29f9f73825438c9e113
2015-10-22gtktiledviewer: initial paste supportMiklos Vajna1-0/+18
Change-Id: I50b4dfa456d3518f5ef7faf5f634642973441a3e
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-20Add DLOPEN_LIBS to configure for some cases where -ldl is neededRichard PALO4-10/+7
use std::sqrt in vcldemo.cxx Change-Id: I24d8ba15ee267d0cad3b063df9b7cfd8d284f4ee Reviewed-on: https://gerrit.libreoffice.org/18591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-10-14Bump gtk+ version to 2.18Riccardo Magliocchetti1-2/+0
2.18 is the version available in RHEL 6 released in 2010. Change-Id: I4cd4fc89f6b51e6f58ca72b8182f80316b1f4f88 Reviewed-on: https://gerrit.libreoffice.org/19330 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-12gtktiledviewer: drop tiles on set-part eventMiklos Vajna1-3/+1
When changePart() is called, we have two type of actions: - the ones we want to execute only in case the part was changed by the user (and not programatically -- e.g. because the request came from the widget) - the ones we want to execute all the time Resetting the view (so the tile buffer drops all the tiles) is something we want to do all the time, that's one of the needed things when the set-part event is emitted. Change-Id: Ic6bfbe460dc5a3fd8834f3b1ef93436fc9d3ad84
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
2015-10-06lokdocview: log paintTile() argumentsMiklos Vajna3-9/+7
Change-Id: I8015c8030c1c7f53ae1de053fe268a33464834ad
2015-10-06gtktiledviewer: recognize LOK_CALLBACK_SEARCH_RESULT_SELECTIONMiklos Vajna1-0/+6
Change-Id: Ib932ee36e41afcb53d15a6362b998cc673d474f2
2015-10-05LOK: fixed duplicated switch case valuesMihai Varga1-10/+1
2015-10-05LOK: add the search phrase to the search result count callbackMihai Varga1-0/+10
We need this to notify the user for which search phrase no results were found Change-Id: I8cc7ab235b9129dfdcb022145456180ff7e4ca92
2015-10-05LOK: added the button type and key modifier to postMouseEvent()Mihai Varga3-2/+63
To get a better functionality we need to know the button type (left, right, middle). We also need the key modifier (ctrl, alt, shift) for actions such as ctrl+click (to open a link) or shift+click to select Change-Id: Iaccb93b276f8a6870dd41cc5132dbb85d2bbf71b
2015-10-05gtktiledviewer: make it possible to trigger SearchItem.CommandMiklos Vajna1-1/+21
Change-Id: I210da07802bae1f2f2948976bc0faf90e93152b4
2015-10-05lokdocview: handle LOK_CALLBACK_SEARCH_RESULT_COUNTMiklos Vajna2-0/+37
Change-Id: I0d1b641654e0de65169e19bb5843ea11b43a90a3
2015-09-29lokdocview: Reset view completelyPranav Kant1-0/+37
Resetting tiles only is not enough. We need to empty stale selection rectangles, handle bars, cursor positions etc., so that they do not interfere with next view to be opened using same widget instance. We are not destroying the document here, so the widget would still point to the same document unless it is made to point to another document by subsequent lok_doc_view_open_document calls. Change-Id: I3c7cc789c8c7393b3793b4edf6aa96d54bc0b1a3 Reviewed-on: https://gerrit.libreoffice.org/18866 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-28libreofficekit: fix mismatched free() / deleteMiklos Vajna3-17/+25
Change-Id: I60eb53d4bf9943fd52e0a9d8e3574a7d1cc027e0
2015-09-25Move all introspection comments to header filePranav Kant1-86/+1
... wherever possible. There are few things we can't move to header file, for example, the comments corresponding to GObject properties, and signals. Change-Id: If74d61b17ccee11f8a056f3a93040d2cff2dd98d Reviewed-on: https://gerrit.libreoffice.org/18863 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-21gtktiledviewer: fix leftover import progressbar in createView()Miklos Vajna1-3/+6
Change-Id: Ia71e80c521cdc6a8e4df52e51e063a44a0dd53df
2015-09-21gtktiledviewer: don't crash on opening non-existing filesMiklos Vajna2-4/+14
Change-Id: Ic48adaf038e8fbcc86a94b5e351d2f963fcfcd16