Commit graph

834 commits

Author SHA1 Message Date
Xisco Fauli
51ca3c42ad PVS: V547 Expression 'aUnoArgs.empty()' is always false
Change-Id: I9283b59499fe7739f06d926357218ef7eb916a41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176997
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-22 13:09:16 +01:00
Hossein
1163713bca Improve LOK tilebench README.md for joining test
The previous command was not working, because of the lack of absolute
path and also the wrong path to the test document. This should be fixed
now.

Change-Id: I2230041e17e4b6b33cfd44e5f15a5fce086a5f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176764
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2024-11-19 15:18:10 +01:00
Noel Grandin
69089f1737 loplugin:reftotemp in libreofficekit..oox
Change-Id: I62d868f70e33850fa933c8f413f824a523422499
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176400
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 20:11:23 +01:00
Mike Kaganski
1180b3473a com::sun::star -> css
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-10 10:50:15 +01:00
Caolán McNamara
f69980d036 Don't call std::string::erase with end()
Change-Id: I64afcbe7138de7c7655a8107fd25e3ac8393a55d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175824
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-30 14:47:26 +01:00
Caolán McNamara
28c187c8f9 cid#1606773 Check of thread-shared field evades lock acquisition
Change-Id: Ia1d9d91f1ca76e5fcf311c51fc560a41e72338d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175376
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-22 11:55:53 +02:00
Caolán McNamara
d7056b1456 cid#1558088 COPY_INSTEAD_OF_MOVE
and

cid#1558080 COPY_INSTEAD_OF_MOVE
cid#1558077 COPY_INSTEAD_OF_MOVE
cid#1558055 COPY_INSTEAD_OF_MOVE
cid#1558043 COPY_INSTEAD_OF_MOVE
cid#1558039 COPY_INSTEAD_OF_MOVE
cid#1558015 COPY_INSTEAD_OF_MOVE
cid#1558014 COPY_INSTEAD_OF_MOVE
cid#1558009 COPY_INSTEAD_OF_MOVE
cid#1558002 COPY_INSTEAD_OF_MOVE
cid#1557998 COPY_INSTEAD_OF_MOVE
cid#1557996 COPY_INSTEAD_OF_MOVE
cid#1557990 COPY_INSTEAD_OF_MOVE
cid#1557986 COPY_INSTEAD_OF_MOVE
cid#1557980 COPY_INSTEAD_OF_MOVE
cid#1557971 COPY_INSTEAD_OF_MOVE
cid#1557968 COPY_INSTEAD_OF_MOVE
cid#1557967 COPY_INSTEAD_OF_MOVE
cid#1557961 COPY_INSTEAD_OF_MOVE
cid#1557959 COPY_INSTEAD_OF_MOVE
cid#1557958 COPY_INSTEAD_OF_MOVE
cid#1557956 COPY_INSTEAD_OF_MOVE
cid#1557953 COPY_INSTEAD_OF_MOVE
cid#1557949 COPY_INSTEAD_OF_MOVE
cid#1557947 COPY_INSTEAD_OF_MOVE
cid#1557940 COPY_INSTEAD_OF_MOVE
cid#1557931 COPY_INSTEAD_OF_MOVE
cid#1557930 COPY_INSTEAD_OF_MOVE
cid#1557915 COPY_INSTEAD_OF_MOVE
cid#1557913 COPY_INSTEAD_OF_MOVE
cid#1557910 COPY_INSTEAD_OF_MOVE
cid#1557886 COPY_INSTEAD_OF_MOVE
cid#1557884 COPY_INSTEAD_OF_MOVE
cid#1557880 COPY_INSTEAD_OF_MOVE
cid#1557875 COPY_INSTEAD_OF_MOVE
cid#1557871 COPY_INSTEAD_OF_MOVE
cid#1557862 COPY_INSTEAD_OF_MOVE
cid#1557847 COPY_INSTEAD_OF_MOVE
cid#1557845 COPY_INSTEAD_OF_MOVE
cid#1557844 COPY_INSTEAD_OF_MOVE
cid#1557843 COPY_INSTEAD_OF_MOVE
cid#1557838 COPY_INSTEAD_OF_MOVE
cid#1557835 COPY_INSTEAD_OF_MOVE
cid#1557834 COPY_INSTEAD_OF_MOVE
cid#1557828 COPY_INSTEAD_OF_MOVE
cid#1557823 COPY_INSTEAD_OF_MOVE
cid#1557817 COPY_INSTEAD_OF_MOVE
cid#1557813 COPY_INSTEAD_OF_MOVE
cid#1557812 COPY_INSTEAD_OF_MOVE

Change-Id: I55d4a920daa2d148683419169eb828325fd3c757
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171732
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11 20:14:54 +02:00
Andrea Gelmini
36d898b3bc Fix "lets" -> "let's"
Change-Id: I3f55e97561323cff8a4148d8388ecd3a5550c704
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169753
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2024-06-29 17:12:55 +02:00
Mike Kaganski
2c2d84fefc Revert "LOK: Introduce LOK_CALLBACK_STATUS_UPDATE"
This reverts commit bbd32b39ea.
A following commit will implement an alternative method without a
new enum member.

Change-Id: Id00a4a0abe68fc69b1a3a81c731c8085e3dbca2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169467
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-06-25 12:03:32 +02:00
Mike Kaganski
bbd32b39ea LOK: Introduce LOK_CALLBACK_STATUS_UPDATE
This allows to send status messages separately from statechanged;
this is needed in Impress to notify about any mode update, not only
masterview-related.

Also send SlideMasterPage updates automatically from core.

Change-Id: I0a50dbe61a5f2f28cd418eb4416819a6a76810b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169314
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-06-21 15:46:17 +02:00
Darshan-upadhyay1110
40ddb619cf Add new LOK CALLBACK for vertical ruler
- We're adding a new LOK callback LOK_CALLBACK_VERTICAL_RULER_UPDATE.
- The reason is that we currently override the existing callback.
- Using the same callback for both vertical and horizontal rulers causes an issue.
- override will create problem like it will only send any one of the ruler orientation update.
- It results in online updates being limited to just one ruler orientation.
- By introducing a new callback, we ensure updates for both vertical and horizontal rulers both are captured correctly in online.

Change-Id: I02d0e3e7e4ac8a07a83644460aa0ba36e0f3c013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167481
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 11b936629d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167464
Tested-by: Jenkins
2024-06-17 10:23:27 +02:00
Miklos Vajna
ff0cb77a6c lok: document some guidelines on how to not end up with too many callbacks
In general, the existing command dispatch, command value getter &
command state callback is meant to be enough for most needs.

Change-Id: Ibba5455b461a8eac052f17ac5e824ddea42755f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168178
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-05-29 19:32:19 +02:00
Pranam Lashkari
34daf30c7a LOK: send inner text boundry information of shapes/textbox on change
instroduced new callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXT

now if innert text is changed LOK is instantly updated about new textarea

Change-Id: I0a88e1dd77556e47f14359ce0a98701a327aceda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164497
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-08 10:55:26 +01:00
Mike Kaganski
06ff6370a4 Send tooltip text to LOK
Call vcl::Window::RequestHelp from LOKPostAsyncEvent for
mouse movement. Introduce LOK_CALLBACK_TOOLTIP callback
type, and send it from SwEditWin::RequestHelp.

Intention is, that the tooltip is shown by client at the
current mouse pointer position, which is hopefully not
far away from the point that generated the mouse event.
On the next movement, the client starts a timer to hide
the tooltip. If the next tooltip message arrives, the
tooltip would be updated in the new place.

Alternatively, the payload could contain the coordinates
from the HelpEvent.

Change-Id: I8e96eb6e6983ad8d13b4c5d7be4d51ff3fd11893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161302
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-04 14:12:23 +01:00
Marco Cecchetti
96ed41755b lok: a11y: implemented support for notifying core log to client
In this way core log can be printed to the browser console.
This may help in understanding if some core event occurs earlier or
later wrt a client event.

Change-Id: I720ef9b149e98ddbc252aa069649019e79ef6cb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158780
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
(cherry picked from commit d8dc138be7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159331
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-11 22:22:52 +01:00
Marco Cecchetti
f3b20f31d5 lok: a11y: impress: help screen reader to report shape selection
Refactored LOKDocumentFocusListener::notifyEvent.

Implemented 2 new callbacks:
- LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: it says the client if
editing in a shape or cell is active or it isn't.
- LOK_CALLBACK_A11Y_SELECTION_CHANGED: it says if a shape has been
selected/unselected, the name of the shape and text content are sent
too for being reported by a screen reader.

(cherry picked from commit 76899152ec)

Conflicts:
	sfx2/source/view/viewsh.cxx

Change-Id: I644bcc7daeb8772805688a9bccdabd0631ce0a22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158562
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-27 19:28:52 +02:00
Marco Cecchetti
59c2e114f7 lok: a11y: when we are inside a table notify table and current cell info
When we get in one or more tables we notify row and column count.
When we get out one or more table we notify we are leaving a table.
When the fosused cell changes we notify the new row/col index.
The paragraph content is notified together with table info, so that
client has some opportunity for getting the screen reader to report
together content and table info.

Change-Id: Ic524259aa1879a70fc3de2467bdee27475352b7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155577
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-14 08:09:53 +02:00
Caolán McNamara
d31f61f472 cid#1533667 silence Uninitialized scalar variable
Change-Id: I6121ed3f9a316172423c9ffc2104510498a58d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153823
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-01 15:32:37 +02:00
Caolán McNamara
22ab4f30ac add an --enable-cairo-rgba to set the order of pixels for internal cairo
Change-Id: Ieab2ef59f63a7722bffea3273d2eeefadef47b56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153628
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-27 10:04:36 +02:00
Jaume Pujantell
bbf5f97967 notify async password change
Change-Id: I2d16c9804e65f093239e810d466de35286b28dee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151651
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-06-09 09:50:10 +02:00
Stephan Bergmann
436c879b35 Missing include (for std::find_if)
Change-Id: I91d70d72ea6cb18ed4fde2f3b3a3d037668767e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152615
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-06-05 15:57:33 +02:00
Tomaž Vajngerl
e86a0236e6 lok: callback to send the updated theme palette when theme changes
The callback sends the updated theme color palette when the theme
changes or initially when the view is registered, so the client
should always have the up-to-date theme color palette stored, so
it can just show the color picker with the theme at any time without
the need to call the server.

Change-Id: I7cceccc46c2fad23ba89e6d3f3643e37f8dab292
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152589
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-05 13:06:57 +02:00
Marco Cecchetti
14b3ad0b4e lok: accessibility event listener for focused paragraph
LOKDocumentFocusListener keeps track of the currently focused
paragraph.

Also includes:

	Author: Andras Timar <andras.timar@collabora.com>
	Date:   Mon May 15 22:06:10 2023 +0200

	    fix unused exception parameter 'e'

	    Change-Id: Ibfee099e4e9b724648d7500b9ebb4e8ab84989b8

and:

	Author: Marco Cecchetti <marco.cecchetti@collabora.com>
	Date:   Thu May 4 12:11:53 2023 +0200

	    lok: a11y: focused paragraph info sent to client

	    For the currently focused paragraph the following data is notified to
	    client:
	    paragraph content, caret position, text selection start/end
	    These data is kept as an instance state so the client can request such
	    info at any time.

	    Change-Id: Ic1a3be0d93472300b1b6a91fb0de5bad87c031aa

and:

	Author: Marco Cecchetti <marco.cecchetti@collabora.com>
	Date:   Sun May 7 11:52:14 2023 +0200

	    fixup! lok: accessibility event listener for focused paragraph

	    It seems it was not a good idea using a unique_ptr as smart pointer
	    for an instance of LOKDocumentFocusListener

	    Change-Id: I8e6b0f48fee3c5db3c9b074a663f7f3fb96a601e

Change-Id: I0fa400694f3129608228ade0b96e0b4e0aee87e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152488
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-06-02 08:04:38 +02:00
Paris Oplopoios
8d0cab4779 Add LoKit callback for application color change
Change-Id: I9d0fe4ab878c9d3a4a6d842be5cd534b97bf77a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149822
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
(cherry picked from commit 48650acef94147c2100eade8c583fddc770b94ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149876
Tested-by: Jenkins
2023-04-01 13:03:22 +02:00
Michael Meeks
950ad392c8 tilebench: allow save after rendering, and better load fail diagnostic.
Change-Id: I24df1a42b1d3e991a430cf0ca25e9dc53b4bbff2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148674
2023-03-11 14:40:03 +00:00
Paris Oplopoios
c1d6af3e9a sw lok: notify clients about view option changes
Send a string of the view options to the kit when the view changes

Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-10 08:48:23 +00:00
Stephan Bergmann
42d9077fc4 Missing include
...as reported at
<https://lists.freedesktop.org/archives/libreoffice/2023-January/089788.html>
"boost 1.81 breaks libetonyek and gtv-calc-header-bar.cxx",

> /home/etna/Tmpbuild/libreoffice/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:36:25: error: implicit instantiation of undefined template 'std::vector<(anonymous namespace)::GtvCalcHeaderBarPrivateImpl::Header>'
>     std::vector<Header> m_aHeaders;
>                         ^
> /home/etna/Runtime/BuildSystem/LLVM13WithWASM/bin/../include/c++/v1/iosfwd:251:28: note: template is declared here
> class _LIBCPP_TEMPLATE_VIS vector;
>                            ^

Change-Id: I6cc93195147979a5bf2785faf4bb0e71a9fd4a94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145185
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-09 08:26:19 +00:00
NickWingate
89f5912ad2 Async PDFExport dialog and parent methods
Filter dialogs are all called generically from
guisaveas.cxx in GUIStoreModel()

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: Idfbe85c09f84d4a7cf3f00b9704d5af94868a051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140403
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144511
Tested-by: Jenkins
2022-12-20 03:11:16 +00:00
Miklos Vajna
2c149dc998 libreofficekit: add a way to invoke getCommandValues()
- add a new button to the toolbar to invoke the getCommandValues() LOK
  API with user-provided command name (and parameters)

- log the result using g_info(), which is visible on the console if
  gtktiledviewer is started with G_MESSAGES_DEBUG=all

- change some labels to tooltip texts that actually show up on mouse
  hover so you can understand what button does what

- tweak the icons, so the question mark icon is the getter and the info
  icon is the setter

Change-Id: If6984d2dde3d669b42aafcc3f58a0ca757ccaaff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143477
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-11-30 10:26:06 +01:00
Mike Kaganski
32aa6697c0 gtktiledviewer: Don't call updateClientZoom until zoom is initialized
Avoids some console noise

Change-Id: I521e430eeabe8fcf5012834dc7be7af8c0ce418b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142724
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-15 10:11:06 +01:00
Mike Kaganski
616e95c704 lok: You can't assume that destroyView would only destroy one view
In case you have some in-place clients (e.g., Math in-place editing
is active), destroying the parent view would also destroy children,
and then both numberOfViewsChanged (called from doc_destroyView)
must tolerate 0 as a valid input, and lok_doc_view_destroy must
make sure to destroy the document after the last views had gone.

Change-Id: I32370fea49da0969e1fbbf971a397c4d657ec8f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141963
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
2022-10-28 13:59:36 +02:00
Mike Kaganski
4a8fa1ba2f gtktiledviewer: don't crash on sidebar creation
There's no dialog parent for the sidebar child window.
Just ignore the signal for now.

Change-Id: Iadfae9174780b10b94e8dd3e6c9efc8c4e8b4b2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141878
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-26 16:59:53 +02:00
Mike Kaganski
d8c751008a Enable gtktiledviewer on Windows
A new configure argument is introduced:

  --with-gtk3-build=<absolute path to GTK3 build>

When provided, libreofficekit_selectionhandles package, libreofficekitgtk
library and gtktiledviewer executable would be built on Windows using the
GTK3 libraries in the passed directory, that must contain lib/pkgconfig
subdirectory with correct pkg-config data.

Change-Id: I6504af6eec0fc73cceb26a1ce923337abe14b5c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141624
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-26 13:58:41 +02:00
Ashod Nakashian
038c4a4283 lok: support embedded media
Change-Id: Ie8f3ed188cec0050a10a5d49325756931b902ef1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141807
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-26 08:18:55 +02:00
Mike Kaganski
2e34b2f325 Consistently set document view also for zoom event
And extract this code to a dedicated function.

The problem was, that creating a new view sets the document's current
view shell (in SwViewGlueDocShell); upon destruction, document's view
shell is set to nullptr. In desktop case, document view shell is then
reset to another active shell e.g. inside "grab focus" event, which
makes all following operations safe. But in gtktiledviewer case, the
"grab focus" event is not handled, so setClientZoomInThread resulted
in eventual nullptr dereference.

It was workarounded in commit 25de85bc3c
  Date   Fri Oct 21 21:14:04 2022 +0200
    nullptr check

but that was not the proper fix.

Possibly it could also be reasonable to start handling "focus-in-event"
[1] in gtktiledviewer; but since just setting the view consistently in
setClientZoomInThread solves the problem, it looks excessive.

This reverts commit 25de85bc3c.

[1] https://docs.gtk.org/gtk3/signal.Widget.focus-in-event.html

Change-Id: Iac4ff4e9b043aec0e0af6ed811c0e7f018378271
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141753
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-25 16:31:01 +02:00
Mike Kaganski
56b5046e03 _MSC_VER is more appropriate to guard MSVC-specific #pragma
Thanks to sberg for noticing this

Change-Id: I37a3031cbfa3f8a0751bab126bd742dcec36664f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141743
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-24 20:01:25 +02:00
Mike Kaganski
60b9008d20 Avoid "deprecated" warning on Windows, too
Change-Id: I199adcb3e8b7fabc625b3ac1735326934cc84088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141739
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-24 17:17:54 +02:00
Mike Kaganski
b5acaa1cf3 g_get_real_name is a proper match for passwd::pw_gecos
This fixes 66fcc9db0f. Also nullptr check
is added (passing nullptr to std::string ctor taking null-terminated
string is UB).

GLib implementation:

* 476e33c3f3/glib/gutils.c (L743)
* 476e33c3f3/glib/gutils.c (L577)

Change-Id: I4e36cf836f2889f9aa03167c5ade81c69d9b1dfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141586
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-22 13:59:05 +02:00
Mike Kaganski
66fcc9db0f Use g_get_user_name instead of access through getpwuid
It is more portable - available also on Windows

Change-Id: I424e1993ad9621ca42b6f48896d5025832ac681e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141584
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-22 07:16:49 +02:00
Mike Kaganski
05df7eaa30 Missing dependency
Change-Id: I7dd74970c9e5743263546d750cb6688f9cb38d45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141577
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-21 12:48:31 +02:00
Mike Kaganski
84552eaf8c documentLoadWithOptions takes URLs
m_aDocPath is set in lok_doc_view_set_property from data
coming from gtv_application_open's calls to g_file_get_path.
So the path is not a proper file URL, which is expected by
documentLoadWithOptions. Some Linux paths can happen to be
able to convert to absolute URL in rtl::Uri::convertRelToAbs,
but not all, and not e.g. Windows paths.

Change-Id: I0a17cb84000603336a6809b0179bbda3d54aec23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141579
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-21 12:17:23 +02:00
Miklos Vajna
e368d26a7f sw content controls, alias: add LOK API
And implement sample handling of it in lokdocview.

Change-Id: Ia1975e4daef6260e2030e5d0dba8fb4293a9484f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141541
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-10-20 11:39:04 +02:00
Caolán McNamara
0797eaaa04 apply ui-rules
Change-Id: I5acc6cfe5488f8aa92ecaafa0ebdc50f2ad9758e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139591
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-07 15:56:05 +02:00
Radhey Parekh
feb8d07333 tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: Ic9009eda963f922fc4d2e75a5002026eda63a7aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138686
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-06 02:26:36 +02:00
Tor Lillqvist
c8d9744445 Tell LibreOfficeKit clients what fonts in a document are missing on the machine
Use the OutputDevice::StartTrackingFontMappingUse() and
OutputDevice::FinishTrackingFontMappingUse() functionality that was
added last year.

Add a new LibreOfficeKit document callback:
LOK_CALLBACK_FONTS_MISSING.

"Font" here means just the family name. We dont really know what style
from the family is missing.

Change-Id: Iec4349b5827e7d1dbdde7f8a9f8da92efde429e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138802
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-08-25 11:57:55 +02:00
Noel Grandin
154cffd87e clang-tidy modernize-pass-by-value in libreofficekit
Change-Id: I1a6b4eb804a8cc4eb5e67ae4bbf8f31863f323d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136273
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-23 08:53:17 +02:00
Miklos Vajna
9cb1a07dc2 sw content controls, date: add LOK API
- send a LOK_CALLBACK_CONTENT_CONTROL with date=true when entering a
  date content control

- extend lok::Document::sendContentControlEvent() to be able to set the
  date of a date content control (after the client's date picker is
  closed)

- update gtktiledviewer to work with these

Change-Id: I0abf21eb1d4ba233050f0aa2607b68740c048262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135214
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-06-01 09:09:40 +02:00
Miklos Vajna
9a76be53df sw content controls, picture: add LOK API
- send a LOK_CALLBACK_CONTENT_CONTROL callback with
  action=change-picture when a file picker should be shown

- extend lok::Document::sendContentControlEvent() to be able to replace
  the placeholder with the selected URL

- update gtktiledviewer to work with these

Change-Id: Ifb3750803885fc09fc82905b0cf85b2b8ca06e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134750
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-05-23 18:04:09 +02:00
Dennis Francis
b846fb660a lok-calc: new callback for print ranges
With this callback the lok clients can read and draw the print ranges on
each sheet of the Calc document.

Conflicts:
	include/LibreOfficeKit/LibreOfficeKitEnums.h
	libreofficekit/source/gtk/lokdocview.cxx

Change-Id: Ie19351d4420e0f3d4191f6a354ce99ab830aede2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134375
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
(cherry picked from commit 172bc7a8f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134527
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
(cherry picked from commit 29b7b25d45)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134614
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-05-21 09:14:42 +02:00
Miklos Vajna
c7d80d229a sw content controls, dropdown: add LOK API
- expose the available list items in a new "items" key of the
  LOK_CALLBACK_CONTENT_CONTROL callback

- add a new lok::Document::sendContentControlEvent() function to be able
  to select a list item from the current drop-down

- add a new listbox to the gtktiledviewer toolbar to select a content
  control list item when the cursor is inside a dropdown

- add tests for the array API of tools::JsonWriter

Change-Id: I47f1333a7815d67952f7c20a9cba1b248886f6dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134256
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-05-13 09:10:25 +02:00