Commit Graph
12915 Commits
Author SHA1 Message Date
Andrea Gelmini bf16bbd105 Fix typo
Change-Id: Ib40f9fa2d618cf4400a814d1d6e222768bf7bba0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175505
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-24 08:41:32 +02:00
Regina Henschel a3c40e7326 tdf#157222 swap info texts of connector end point
Change-Id: I3d1d1ed27afbdf7700882a12bcd25643e37c3564
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175513
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-10-23 22:12:15 +02:00
Julien Nabet dedc053252 Following 250e00a51d (JDBC4.3)
Change-Id: I08b71b9c0504af7ed4af84456ce49dc2fe7274af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175472
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2024-10-23 21:36:51 +02:00
Julien Nabet 250e00a51d Declare missing methods and constants to synchronize with JDBC 4.3
OpenJDK source has been used for the comments

Change-Id: Ic443ef1f50894eccd5233f2c629e227b8816a8fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173568
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-23 08:57:01 +02:00
Noel Grandin abe6ab7aec set master slide name at creation time
which avoids some expensive broadcasting when the name is changed

a similar mega-master-page scenario as reported in tdf#158773

48s -> 20s

Change-Id: Ifcfd96077a9e83868ac96671ce9f208ae3ca418f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175126
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-21 15:48:24 +02:00
Attila Szűcs 599365d293 SW: extract transform charts (using dialog code)
Implemented chart data extraction, and transformation
added insert/delete/modify row/column, and the ability to set
resize data table
setcolumndesc / setrowdesc .. for 1 descriptor,
or with multiple descriptor to set
set 1 cell value, or set the whole table cells values.
it will resize the table, but you can still use partial arrays
like
            "data": [ [ 1,2,3,4 ],
                      [ 2,3,4,5 ],
                      [ 3 ],
                      [ 4,5,6,7 ],
                      [ 2,2,1 ],
                      [ 5,6,7,8 ] ],
that means the 3. row 2,3,4th cell will not be overwritten.

for insert column, it call codes from DataBrowserModel.
(used by dialog code)

added tests, fixed a contentcontrol date problem

2. commit (made by Caolan) squashed into 1. commit:
WIP hack this to link

move stuff from chartcontroller to chartcore and adjust visibility
until it links at least

Change-Id: I5529f4da33f046eef7e947d755e29486fa966274
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172849
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175121
Tested-by: Jenkins
2024-10-18 12:49:41 +02:00
Noel Grandin 40931f8324 fix comment
the original function was removed in
    commit 47bfbbdb73
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Fri Feb 23 13:05:55 2024 +0200
    Create an UNO service to do the cui symbol lookup in vcl

Change-Id: I0f72318fd3eae0c8b34624cc8f05800b9de4d0ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174904
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-10-14 21:53:12 +02:00
Rafael Lima 2f1dcf01d7 tdf#157519 Implement Sensitivity Report in LpSolve solver
This patch implements sensitivity analysis when using the LpSolve solver engine.

It also adds the infrastructure needed for future implementations in other solver engines via the css::sheet::SensitivityReport struct.

Change-Id: I74c2ed9c6201a0b2ffc29ef612d2b778d11a3bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173642
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-09 14:49:07 +02:00
Andrea Gelmini 4ae702d675 Fix typo
Change-Id: Ie14012caf6bb97c779e647c84ea7d5bbb576f24d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174059
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-27 23:27:40 +02:00
Rafael Lima 911a57c4d6 tdf#160062 Uno API to set solver settings at the sheet level
This patch creates the API necessary to create solver models via macros, so that the model is visible in the Solver dialog, and the model is saved to the file.

This patch also includes a comprehensive unit test in scsolverobj.cxx.

Visit the bug ticket for a file with some examples of such macros.

Change-Id: Ib9cfbbdaab8243cd6b901a2bcd99e46c27be97e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171769
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-27 11:06:57 +02:00
Miklos Vajna 81d3aefd85 [API CHANGE] XDocumentDigitalSignatures: remove deprecated / unused functions
Some functions were already a stub and only aborted on calling them.
The *Package* functions were added in commit
c9ed2f359a (INTEGRATION: CWS xmlsec08
(1.4.24); FILE MERGED 2005/02/22 13:07:19 mt 1.4.24.1: #i36682# Accept
separate Stream for signatures..., 2005-03-10), but it seems nobody
called them.

This also means that DocumentSignatureMode is now never set to
DocumentSignatureMode::Package, so remove that as well.

It seems to be unlikely that this non-published service was used by
3rd-party code, since it was specific to the needs of sfx2/ code, not
generic functionality that could be useful in other contexts.

Change-Id: Icfed9a0e6568f6eb21f9236901af01f1915bf2f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173313
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-13 10:27:14 +02:00
Stephan Bergmann b418f3d8d3 Demonstrate that Embind is not multi-threading capable
Enabling the line commented out with "TODO" in embindtest.js would fail with
something like

> Aborted(Assertion failed: invalid handle: 8)
> worker.js onmessage() captured an uncaught exception: RuntimeError: unreachable
> RuntimeError: unreachable
>     at soffice.wasm.__trap (http://localhost:6931/soffice.wasm:wasm-function[446445]:0x8f952b3)
>     at ___trap (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:16657:54)
>     at abort (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:1091:5)
>     at assert (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:731:5)
>     at HandleAllocator.get (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7212:11)
>     at Object.toValue (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:7270:30)
>     at __emval_call_void_method (blob:http://localhost:6931/7e945427-df90-49c0-a2b5-28c5ecfbe1a5:10183:22)
>     at soffice.wasm.the_wrappers::com::sun::star::task::XJobExecutor::trigger(rtl::OUString const&) (http://localhost:6931/soffice.wasm:wasm-function[77042]:0xafbb24)
>     at soffice.wasm.(anonymous namespace)::JobExecutorThread::execute() (http://localhost:6931/soffice.wasm:wasm-function[243534]:0x43250b5)
>     at soffice.wasm.non-virtual thunk to salhelper::Thread::run() (http://localhost:6931/soffice.wasm:wasm-function[87641]:0xdff5cf)

Change-Id: I4e35dc19c5c0f97de7158bf9c07fd31716ffff84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173132
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-10 19:52:15 +02:00
Miklos Vajna 07df95e75a cool#9992 lok doc sign: async DocumentDigitalSignatures::ImplViewSignatures()
Currently SfxObjectShell::CheckIsReadonly() has a hack for the LOK case
to show the signatures dialog read-only, as only that is async.

The next step is to make DocumentDigitalSignatures::ImplViewSignatures()
async, though that requires all callers of the function to be async, so
make DocumentDigitalSignatures::signScriptingContent() async as well.
There is also DocumentDigitalSignatures::signPackage(), but turns out
that's dead code, so just remove it.

Once this is in place, we had a problem that the callbacks tried to
interact with libxmlsec, but the dialog was still alive in
DocumentDigitalSignatures::ImplViewSignatures() by the time the callback
was running, so there were two DocumentSignatureManager instances at the
same time, and both assumes it should call the global libxmlsec
init/uninit, which resulted in failing to verify the just created
signature.

Fix this similar to how Tomaz fixed the same problem around pdfium in
commit 067a8a954c (pdfium: only init
pdfium library one and destroy on LO exit, 2020-06-03).

Change-Id: I3fb63c06195564732e1576dbd755157e676fb762
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173117
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-10 11:27:46 +02:00
Miklos Vajna caff013bee cool#9992 lok doc sign: async DocumentDigitalSignatures::signDocumentContent()
Currently SfxObjectShell::CheckIsReadonly() has a hack for the LOK case
to show the signatures dialog read-only, as only that is async.

The next step is to make
DocumentDigitalSignatures::signDocumentContent() async, but passing an
std::function via the UNO API is tricky.

Notice how DocumentDigitalSignatures in xmlsecurity/ also implements
sfx2::DigitalSignatures, add a new SignDocumentContentAsync() there and
adapt all uses of signDocumentContent() to go with that instead.

This requires introducing some lambdas for code after
signDocumentContent() in general and for ODF/OOXML specific code in
particular, to avoid code duplication.

Change-Id: If771ced711041364988af45ad9dd0dd1a2a8660d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173060
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-09 17:30:28 +02:00
Ilmari Lauhakangas 30faedfa35 tdf#161347 Harmonise API docs for UserDefinedAttributes a bit
Change-Id: I85ce6e42d292b85ca0a54652dd733b14137afe9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172033
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-08-19 16:02:42 +02:00
Mike Kaganski 2a122f47df Add missing property to com.sun.star.graphic.MediaProperties service
An omission from commit 8484e52675
"tdf#117427 missing API for determining and loading linked graphic",
2018-05-12, that introduced it.

Change-Id: Ibf4c754931f813c5234daa5f7b7c907ed84efdef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172008
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-18 15:13:27 +02:00
Stephan Bergmann 50cd19debb Emscripten: Clean up SolarMutex
...before disappearing through the QApplication::exec() hole, or else the
SolarMutex would remain locked forever on the application's main thread.

This requires changing SalInstance::ReleaseYieldMutexAll() to
SalInstance::ReleaseYieldMutex(bool all).  (Further recursive locking of the
SolarMutex via SolarMutexGuard instances that would be present on the call stack
leading up to the call to QApplication::exec() would be released during the
stack unwinding, so just undo the one acquiring done in InitVCL, not all of
them.)

Change-Id: I9ef57abb7da7f840999700e4eaeeefd2da784645
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171956
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-18 15:10:00 +02:00
Mike Kaganski 3ad771ee7a Fix some copypaste errors in IDL documentation
Change-Id: I1f35df106ac4e41a7cce244b89b05407d7a14651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171942
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-08-16 15:53:49 +02:00
Mike Kaganski ab873780fd Clarify that XText::insertTextContent only accepts range that belongs to it
This is a widespread error; even out wiki has it.

Change-Id: Ia5a8b90a9b69bd868167ed1cfae86572c56e451c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171943
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-16 11:31:28 +02:00
Moritz Duge 8f9f042976 tdf#161909: make showing GPG keys only an explicit functionality
Before this change, selecting only GPG keys for ODF encrpytion relied on
the fact, that all X.509 implementations (nss+mscrypt) implement listing
public keys (getAllCertificates) as a stub.
See previous change Ia6b8ecb9

Change-Id: Icb36a4cefd60b94407129ff73fe62f9250bfbee5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171639
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-08-13 01:09:01 +02:00
Michael Weghorn 4c42b1c211 a11y: Clarify XAccessibleHyperlink doc
The API looks like it was modeled after
IAccessible2's `IAccessibleHyperlink` [1].

The doc was saying

> /** Returns an object that represents the link anchor, as appropriate
>     for that link.

for both, `XAccessibleHyperlink::getAccessibleActionAnchor`
and `XAccessibleHyperlink::getAccessibleActionObject`.

However, `XAccessibleHyperlink::getAccessibleActionObject` can
be used to get the link target, not the anchor, i.e. is the
equivalent of `IAccessibleHyperlink::anchorTarget` while
`XAccessibleHyperlink::getAccessibleActionAnchor` is the
equivalent of ` IAccessibleHyperlink::anchor`.

[1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_hyperlink.html

Change-Id: I7e28ac648f698592afb031fcb433f385f902c6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171635
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-08-09 07:01:55 +02:00
Stephan Bergmann af5c409205 Expose WorkWindow fullscreen mode via new XTopWindow3
...deriving from the existing XTopWindow2.  (Exposing this functionality via UNO
is useful e.g. for some embedded LOWA example application.)

Change-Id: Ib92f75510b7a2ca26933ea35afcc78882a7804fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171403
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-02 15:47:54 +02:00
Stephan Bergmann 0bf2e317ac More exhaustive org.libreoffice.embindtest.Struct
Change-Id: I91085ef8cd7cd80852c0d0ab4f87fd3226a10a00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171236
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-30 14:15:58 +02:00
Stephan Bergmann f504bd1ac9 Embind: Missing support for UNO polymorphic struct types
Change-Id: I6bb29a951e6e5a3ed7d825172ba7b92ef95a5619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171228
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-30 11:00:49 +02:00
Eike Rathke 4c3f65ea3b Resolves: tdf#159343 Implement TableRef API token conversion
Change-Id: I1b0d9e002d267e62dc7cbbbfc9f5c5c728374345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171165
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2024-07-29 16:29:19 +02:00
Stephan Bergmann 4d18fa7694 In embindtest, also test Any included in Struct
Change-Id: Id268692c750873629c1ceaf232e1e61912164872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171078
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-27 18:33:59 +02:00
Sarper Akdemir 426c641976 tdf#159040: add sign with default certificate to save dialog
Include X.509 certificates under Tools->Options->UserData
among the keys for signing.

Add a new checkbox to Save file dialog, to sign with that
selected key easily.

The checkbox is disabled if there's no matching key found.

Change-Id: I9fc16790c479819cd1f35bcad040d0ebc7c4bdef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170619
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-07-24 07:08:46 +02:00
varshneydevansh 07ae0e5ada tdf#82716 Add initial implementation of the Histogram Chart
- Add the Histogram selection to the UI
- Histogram bars showing with No Gap
- Convert X and Y axis to group data into bins and frequency
- Adjusted failing UI test (tdf138556) as a new chart type was added

Change-Id: Id1f161adac943ead5e17c7fbb7e14c9ab7f1655e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167068
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-07-21 08:02:43 +02:00
Stephan Bergmann e8e6a5f795 Add test code for UNO attributes implemented in JS
Change-Id: I74f5ef53e7850ab783ae4cd94525a55c63512bd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170544
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-16 12:48:40 +02:00
Michael Weghorn 4f63dd8b37 a11y: Clean up XAccessibleAction doc
The `XAccessibleAction::getAccessibleActionDescription`
and `XAcccessibleAction::doAccessibleAction` doc mentions
that an `IndexOutOfBoundsException` exception is thrown
when the index is invalid, which is indeed the expected
behaviour. However, they mentioned in addition that false
or an empty string is returned, which doesn't make sense
when exception gets thrown, so drop that.

Also slightly improve wording at 2 other places.

Change-Id: Idcc1fd669f32ff5a160cb35d2fbf6c2d23f65ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170567
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-07-16 12:47:34 +02:00
Stephan Bergmann a0f3225984 Turn org.libreoffice.embindtest.Test from singleton to service
...so that testing its StringAttribute stars out with a known state.  And which
revealed that the test code in unotest/source/embindtest/embindtest.js was
actually wrong in assuming that that UNO attribute would be represented by a JS
accessor property, when actually it is represented by a pair of
get-/setStringAttribute member functions.

Change-Id: I1a6e7c9f26e9a08cd089b7972a23f4c608c6b1bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170414
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-12 19:36:46 +02:00
Stephan Bergmann 74829f2a64 Fully implement the Wasm UNO bridge cpp2uno direction
...after 875997c896 "Properly implement
cppu::throwException for Emscripten" had implemented only those parts that were
absolutely necessary for that exception throwing.  As detailed in the commit
message there, wasmcallgen has been extended to additionally generate all the
required vtable slot call trampoline code (which cannot be generated on the fly
for Wasm, as would be done for other platforms).  Consequently, some of the
"callvirtualfunction"-centric file names have been changed to "generated" as the
output of wasmcallgen is now more general.  (And wasmcallgen itself should also
be renamed, in a follow-up commit.  And when adding to the wasmcallgen code
here, some existing parts of its implementation have been cleaned up, too.)

There is no direct way to test this half of the Wasm UNO bridge directly from
unotest/source/embindtest/embindtest.js, so a new
org.libreoffice.embindtest.BridgeTest singleton has been added, which triggers
new test code in unotest/source/embindtest/embindtest.cxx that tests the bridge
in a way similar to testtools' bridgetest machinery.

Change-Id: I521a1d6c2160aedc814f7603b0b99861e5fbd1eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170374
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-07-11 17:16:17 +02:00
Marco Cecchetti 1f0fd06bc0 sd: slideshow render interface and implementation
Interface and implementation to expose the ability to render
the slide's layers to a bitmap.

Change-Id: I3da48585e498354592e163d84bd29659b233c255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170214
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-10 08:05:56 +02:00
Moritz Duge c8f72c2a3a Improve documentation on key and mouse handlers and listeners.
Change-Id: I443fd0c53f1fb11df3b4e13806771c2c649cae23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169473
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Tested-by: Jenkins
2024-06-27 07:24:31 +02:00
Andrea Gelmini 9bdb7ce3a9 Fix typo
Change-Id: Ic182dcf4a1e258d9a7cd450ca45f514a7fb7f262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169175
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-06-19 09:55:02 +02:00
Stephan Bergmann e303b3bba8 Implement attribute handling
Change-Id: Ic30d2de582f952555ec672984da78a07a9319443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168224
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-05-30 09:35:06 +02:00
Balazs Varga b3a9032378 tdf#157657 - sc: add option to make data validity case-sensitive
Add option to check data validity with case sensitive and case
insensitive. The default set would remain the original case insensitive
mode for data validity.

Change-Id: Ic4fe56e2b31b7fc348b742f3b95fb44cd35bc49d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167280
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-05-13 17:20:20 +02:00
Stephan Bergmann a469aea9c0 Emscripten: Towards a working C++ UNO bridge
...by making the general UNO -> C++ function call case work (modulo handling
exceptions, which I'll look into later).

Wasm call_indirect unfortunately needs to statically know the call target's
signature, so we statically need to know all possible signatures.  So introduce
wasmcallgen helper to scan the existing UNOIDL API upfront and generate the
relevant callvirtualfunction-wrapper.cxx and callvirtualfunction-inst.s code.
(The good thing is that the number of different signatures is somewhat limited,
each parameter can only be one of i32, i64, f32, or f64.  So even if 3rd-party
extensions bring along new UNOIDL interface methods, chances are relatively high
that the signatures needed for them would already be covered by the existing
ones.)

Testing this can nicely be done in unotest/source/embindtest/embindtest.js via
css.script.Invocation (which internally exercises the relevant code).  (Instead
of adding individual org.libreoffice.embindtest.StructLong/String etc., it would
be nicer to introduce some polymorphic StructOne<T>, but the Emind UNO binding
does not support polymorphic structs, so the embindtest.js code would not work.)

Change-Id: If829c9e3772bfd27561f3ad743d38a71d11545b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167308
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-05-08 13:01:04 +02:00
Stephan Bergmann 735ea444f2 Embind: Fix out-param handling
...by using UnoInOutParam in all cases.  Some types whose Embind mappings don't
employ any smart pointers (like any and sequence) would have worked directly
with pointers, but others (like string and type) would have caused Embind errors
at runtime.  So consistently use UnoInOutParam in all cases (and generate
bindings for all the used cases in embindmaker).

Change-Id: If26551bf4e99d10748aec1597d6e99f994dfd86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166854
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-30 07:53:11 +02:00
Michael Weghorn d4f6534e88 [API CHANGE] a11y: Use XAccessible for relation targets
Use a Sequence of XAccessible rather than its base
interface XInterface for AccessibleRelation's TargetSet.

As the targets are accessible objects as well,
anything other than XAccessible doesn't make much sense.
Using XAccessible right away makes that clearer and avoids
the need to query the XAccessible interface.

(The winaccessibility bridge was already using
`static_cast`, relying on the fact that the objects
are XAccessibles.)

The a11y UNO API is not published, so an API change
should be unproblematic.

Change-Id: I7f08e98d1ec303d5343d9a7954187cdd71495ebc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166586
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-04-24 23:04:35 +02:00
Michael Weghorn b6a8fec62c a11y: Drop note about API being "not yet published"
The note about `XAccessibleMultiLineText` being
"not yet published" can be misleading, as there's
no plan to publish it.

All a11y API was unpublished in

    commit 70626249cd
    Date:   Thu Nov 29 00:27:03 2012 +0100

        API CHANGE a11y unpublishing and add/removeListener rename.

        The a11y API has never really been picked up by tools vendors, let's
        not tie ourselves up here for no good reason.

        This unpublishes all css::accessibility, and dependend API.

        With that, we can change the rather unfortunately-named add/
        removeEventListener to be add/removeAccessibleEventListener, thus
        not conflicting with the XComponent methods of the same name.

        Change-Id: I595598c3a8e46415f80b2780f333333174865fe4

There's currently no plan to change that, so drop that
note.

(Public a11y API is the corresponding platform a11y API
and it's LO's responsibility to bridge to that.)

Change-Id: I72a3d3be71f68663497364747f143e856d0b80ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166587
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-24 23:04:23 +02:00
Michael Weghorn c356b68656 Fix XAccessibleSelection::getSelectedAccessibleChild doc
The valid indices to pass as params to
`XAccessibleSelection::getSelectedAccessibleChild`
depend on the the number of selected children, i.e. the
return value of
`XAccessibleSelection::getSelectedAccessibleChildCount`.

The previously mentioned
`XAccessibleRelationSet::getAccessibleChildCount`
doesn't even exist.

Change-Id: Iaabbc9e3972c7a8274495e19978db9eae36077fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166466
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-23 08:07:08 +02:00
Stephan Bergmann e6ddfdf040 Embind: Test and Fix out-param handling
(the types that are meant to be passed directly by pointer will need more
thought, to make them actually work)

Change-Id: Ia0f2e6f5335fad1140629477e89fc96121c2927e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166318
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-20 11:57:28 +02:00
Stephan Bergmann 1c81f63e91 Embind: Consistently represent empty interface references as JS null
The existing code had two issues:  For one, e.g. calling a function that
returned a null interface reference mapped that to JS null, while querying an
object for a non-supported interface via `new css.uno.X...(y)` mapped that to
an "empty" JS object instead.  (So checking for a non-null reference needed to
be done as either `x !=== null` or as `x.is()`, depending on context.)  And for
another, while calling $is() on a non-"empty" object worked fine, it failed on
such an "empty" object (as the Embind internals of that object lacked the $$
property).

So change the querying mechanism from the `new css.uno.X...(y)` constructor to a
`css.uno.X....query(y)` function call syntax, which now returns JS null when
querying for a non-supported interface.  (And drop the broken $is method.)

Change-Id: I8fa488ab2892423f2a461d9b72db47e1d4df3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166255
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:20:59 +02:00
Stephan Bergmann 3454a73a11 Embind: support .implement()-based JS UNO objects
Change-Id: I3a8bf5986b91b886547cfe57e49275f7c79ddc11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166020
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-12 20:52:54 +02:00
Stephan Bergmann febd03e31b Move org.libreoffice.embindtest from udkapi to offapi
...so it will be able to use e.g. css.task.XJob in its tests

Change-Id: I15e50c07ee4b1b315d2687dc7e7ea0c00ccc638c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165998
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-11 15:22:40 +02:00
László Németh 6e8819f29b tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type
Support XSL attribute "column" and CSS 4 attribute "spread",
stored in loext:hyphenation-keep-type, to give better control
over hyphenation-keep. E.g. spread: both parts of a hyphenated
word shall lie within a single spread, i.e. when the next page
is not visible at the same time (e.g. the next page is not a
right page of a book).

– css::style::ParaHyphenationKeep is a boolean property now,
  importing hyphenation-keep = "page" as true.

– type of ParaHyphenationKeep, including the new non-ODF types
  is stored in the new ParagraphProperties::ParaHyphenationKeepType.

– default value of ParaHyphenationKeepType is COLUMN for
  interoperability.

– Add checkboxes to Text Flow -> Hyphenation Across in
  paragraph dialog:

  * Column (previously: Hyphenate across column and page)
  * Page
  * Spread

  – enabling/disabling them follows XSL/CSS 4/loext, i.e.
    possible combinations:

  * No Hyphenation across
    (hyphenation-keep = "page" and loext:hyphenation-keep-type = "column")

  * Hyphenation across [x] Column
    (hyphenation-keep = "page" and loext:hyphenation-keep-type = "page")

  * Hyphenation across [x] Column [x] Page
    (hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread")

  * Hyphenation across [x] Column [x] Page [x] Spread
    (hyphenation-keep = "auto")

– Add ODF import/export

– Update DOCX import

– Add ODF unit tests

Note: recent implementation depends on widow settings: disabling widow
handling allows hyphenation across columns and pages not only in table
cells.

Note: RTF import-only, but not used bPageEnd has been renamed to bKeep.
Depending on the RTF test results, likely it will need to disable
the layout change, e.g. GetKeepType()=ParagraphHyphenationKeepType::AUTO,
if PageEnd uses obsolete hyphenation rule, i.e. shifting only the
hyphenated word to the next page, not the full line.

More information:

– COLUMN (standard XSL value, defined in
  https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep)

– SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last,
  equivalent of hyphenation-keep, defined in
  https://www.w3.org/TR/css-text-4/#hyphenate-line-limits).

Follow-up to commit 9574a62add
"tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and
commit c8ee0e8f58
"tdf160518 DOCX: import hyphenation-keep to fix layout".

Change-Id: I3ac6d9e86d0ed1646f105de8607c0e8ebc534eaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165954
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-04-11 10:20:41 +02:00
Michael Weghorn 164f344312 a11y: Fix XAccessible{Editable,Multiline}Text doc
Fix typos and slightly improve wording.

Change-Id: Ib58dcb4d6039a55ade76d12d5fed33f4eac84776
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165792
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-04 17:16:05 +02:00
Patrick Luby 27b68ea28a Correct typo in comment
Typo was added in commit 6a049e417b.

Change-Id: Icfe61fde3b199505ae2107f1b790cf94ac98c456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165462
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-03-28 18:10:21 +01:00
Noel Grandin 5ec7c4eecf fix comparison of UIObject's inside UITests
using == to compare them doesnt work, because we return
a new one with every call to getTopFocusWindow and similar.
So add a equals() method to the UNO interface to do the comparison.

Change-Id: Ie909fe9b4e84fe07f4ca87bbebf65b56d3da8f78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 17:17:32 +01:00