summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)AuthorFilesLines
2015-12-17lokdocview: 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>
2015-12-16tdf#96250 LOK: guard against 0 pRenderingArgumentsMiklos Vajna1-1/+2
Change-Id: Ifa39777795ce966662c31c891ffc1b9b1a297b00
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>
2015-12-10Crash fix in gtktiledviewer when creating new viewAshod Nakashian1-0/+1
Change-Id: I85bb71e775f300214e05e75636bbee200d35ffaa Reviewed-on: https://gerrit.libreoffice.org/20418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-12-10loplugin:nullptr: More NULL -> nullptr automatic rewriteStephan Bergmann2-47/+47
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-09tdf#96317: Add API for copy/paste from/to the widgetPranav Kant2-6/+35
Change-Id: Iac869ddb65cbdd2227f96d047d83159ca7819f11 Reviewed-on: https://gerrit.libreoffice.org/20534 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-12-09loplugin:nullptrStephan Bergmann1-1/+1
Change-Id: Id249baebf047bae083e36ad6e23d5bb8989f9a98
2015-12-09tdf#96318: Add searching APIPranav Kant2-52/+101
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>
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>
2015-12-09lokdocview: Set a 'default' path for LOK initPranav Kant2-1/+5
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>
2015-12-07Let LIBO_INTERNAL_ONLY imply LOK_USE_UNSTABLE_APIMiklos Vajna6-7/+1
Change-Id: Ifbed5e534ba79d32b7188bb7fb7108338b6e124d
2015-11-26cid#1340232 uncaught exceptionMiklos Vajna1-6/+13
Change-Id: Idb80a055aca67a3fb90aef597ace932f47af8e05
2015-11-26cid#1340231 uncaught exceptionMiklos Vajna1-6/+13
Change-Id: I69f2078093c2c23ae0a02a6a292e51fdbdde9ed4
2015-11-24cppcheck: noExplicitConstructorCaolán McNamara2-2/+2
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-20-Werror,-Wdeprecated-declarationsStephan Bergmann1-0/+4
Change-Id: I7c7d3dda02a3745128a5a125b4b6952e087cdcda
2015-11-19gtktiledviewer: allow setting custom background colorMiklos Vajna1-1/+9
E.g. it helps testing the semi-transparent shadow around Writer pages to append "--background-color yellow" to the commandline arguments. Change-Id: Ib94750e936abe3f41e4982534431fd5115e2c543
2015-11-18gtktiledviewer: allow passing initializeForRendering() argumentsMiklos Vajna2-5/+25
Change-Id: Ic7b52764cf2fedbf73d4dcaaf36d1055b8ee22f2
2015-11-18lok::Document::initializeForRendering: support init. argumentsMiklos Vajna1-1/+1
Change-Id: I8aaf19a50f25f495cb87fba7ff6a4b0f56ed7d80
2015-11-17gtktiledviewer: set author name when inserting a commentMiklos Vajna1-1/+16
Change-Id: Iee66687ce813ff801f29e4568329ed2a39f905ba
2015-11-14gtktiledviewer: add toolbar buttons to insert / delete commentsMiklos Vajna1-0/+17
Change-Id: Ia566e983548a89d974c133823da2f07d5c2e35e4
2015-11-14gtktiledviewer: the formula bar is calc-onlyMiklos Vajna1-0/+2
Change-Id: Ib989a23e5ece49b6eb16b25bb1fb6f635df25829
2015-11-13loplugin:nullptrStephan Bergmann1-4/+4
Change-Id: Iaf779157b97e4d3a3a449cc7f17e4d5c533955f0
2015-11-13libreofficekit: loplugin:cstylecastMiklos Vajna1-1/+1
Change-Id: Iea7ba258b661c09744191933fc23a06ed57fdf3b
2015-11-13LOK: calc formula callback + formula bar implementation in gtkMihai Varga2-0/+49
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-10gtktiledviewer: don't hide cursor after doc size changedMiklos Vajna1-1/+3
Unconditional call to lok_doc_view_reset_view() resulted in hiding the cursor, but then nothing enabled it. As a result, the cursor got hidden after the doc size changed. Change-Id: I06e7c9293e7a4cdbc73421a82430816ab0001f90
2015-11-10Add a check for non-LIBO_INTERNAL_ONLY, C++03-compatible LibreOfficeKit.hxxStephan Bergmann3-0/+54
Change-Id: I56336b8163de48e424526f5f426c2ad350292627
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