Commit Graph
12876 Commits
Author SHA1 Message Date
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
Stephan Bergmann f2ac3dff78 Consolidate on @since LibreOffice MAJOR.MINOR tags
...so even if 6a049e417b "tdf#160184 ask user if
they want to trust an untrusted certificate" gets backported to
libreoffice-24-2 towards LO 24.2.3, better keep @since tags consistent and only
officially announce it for LO 24.8

Change-Id: I32be31893823ef116603b98df7ce9ec305a96e6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165306
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-26 15:56:23 +01:00
Patrick Luby 6a049e417b tdf#160184 ask user if they want to trust an untrusted certificate
gpgme contexts uses the "auto" trust model by default which only
allows encrypting with keys that have their trust level set to
"Ultimate". The gpg command, however, gives the user the option
to encrypt with a certificate that has a lower trust level so
emulate that bahavior by asking the user if they want to trust
the certificate for just this operation only.

Also, abort saving if no certificates are selected which is an
indication that the user cancelled the Select Certificate dialog.

Change-Id: I20951b1e31b2dcf8adb82243742f8c00fbaca8c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165260
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-26 10:01:31 +01:00
László Németh 3a332d9f1c tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary
Add new hyphenation option "Compound characters at line end",
equivalent of libhyphen's COMPOUNDLEFTHYPHENMIN, to limit bad
pattern based hyphenation of compound words using morphological
analysis of Hunspell.

* Add checkbox to Text Flow in paragraph formatting dialog window
* Store property in paragraph model:
  css::style::ParagraphProperties::ParaHyphenationCompoundMinLeadingChars
* Add ODF import/export (loext:hyphenation-compound-remain-char-count)
* Add ODF unit tests

Note: slower Hunspell based hyphenation is used only if
ParaHyphenationCompoundMinLeadingChars >= 3 (we assume that
libhyphen hyphenation patterns cover the smaller distances
correctly). Hunpell based hyphenation doesn't introduce
new hyphenation breaks, only detects the stem boundaries
from the libhyphen based hyphenation breaks.

Follow-up to commit c899d3608d
"tdf#158885 sw: don't hyphenate right after a stem boundary",
replacing hyphenation zone dependence with the new "Compound
characters at line end".

Note: preset COMPOUNDLEFTHYPHENMIN values aren't loaded yet
from hyphenation dictionaries.

Note: the suffix of the last stem of the compound is always
hyphenated, i.e. the distance limits only hyphenation
inside the stem, not inside its suffix or at the end of the
stem before the suffix.

Change-Id: I46a0288929a66f7453e3ff97fbc5a0c6a01f038f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164983
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-03-20 13:04:09 +01:00
Noel Grandin cba736567a Create an UNO service to do the symbol lookup in sw
which means I can remove one usage of gb_Library_set_plugin_for, which
is blocking linking the sw module into --enable-mergelibs=more

Change-Id: I8c199421c66de2dcf339ccc2d5cb9340d3bea914
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164429
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06 12:34:10 +01:00
Stephan Bergmann 792a2847c8 Keep recently introduced UNOIDL entity unpublished for now
Change-Id: I635e08898bc2627dada89fed5a834a6145915ac9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164431
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2024-03-05 22:41:15 +01:00
Noel Grandin 4ed1536c6e Create an UNO service to do the symbol lookup in sd
which means I can remove one usage of gb_Library_set_plugin_for, which
is blocking linking the sd module into
--enable-mergelibs=more

Change-Id: I90dae749f777446f67342d121e4dc29b974cb9b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164423
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-05 18:31:48 +01:00
Noel Grandin e311a4b87b Create an UNO service to do the symbol lookup in sc
which means I can remove one usage of gb_Library_set_plugin_for, which
is blocking linking the accessibility module into
--enable-mergelibs=more

Change-Id: I389fcafd80f1a450befbffdc252be497ba20f6d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164415
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-05 13:07:36 +01:00
László Németh 9574a62add tdf#132599 cui offapi sw xmloff: implement hyphenate-keep
Both parts of a hyphenated word shall lie within a single
page with ODF paragraph setting fo:hyphenation-keep="page".
The implementation follows the default page layout of
MSO 2016 and newer by shifting the bottom hyphenated line
to the next page (and to the next column, see last note).

Note: this is a MSO DOCX interoperability feature, used
also in DTP software, XSL and CSS.

* Add checkbox/combobox to Text Flow in paragraph dialog
* Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep)
* Add ODF import/export
* Add ODF unit tests

New constants of com::sun::star::text::ParagraphHyphenationKeepType,
containing ODF AUTO and PAGE (borrowed from XSL), and for the
planned extension ParaHyphenationKeepType of ParagraphProperties:

– 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).

Note: the implementation truncates only a single hyphenated
line, like MSO does: the pages can end in hyphenated
lines (i.e. in the case of consecutive hyphenated lines),
but less often, than before.

Clean-up hyphenation dialog by collecting "Don't hyphenate"
options at the end of the hyphenation settings, and negating them
(similar to MSO and DTP), adding also the new option
"Hyphenate across column and page":

[x] Hyphenate words in CAPS
[x] Hyphenate last word
[x] Hyphenate across column and page

Note: ODF fo:hyphenation-keep has got only "auto" and
"page" attributes, while XSL defines also "column".
Because of the interoperability with MSO and DTP,
fo:hyphenation-keep="page" is interpreted as
XSL "column", avoiding hyphenation at the end
of column, not only at the end of page.

Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-03-04 23:39:51 +01:00
Stephan Bergmann 806362b915 Update the reference rdbs to libreoffice-24.2.0.3
.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-24.2.0.3/instdir/program/types.rdb \
 >.../master/udkapi/type_reference/udkapi.idl

.../master/instdir/sdk/bin/unoidl-read --published \
 .../libreoffice-24.2.0.3/instdir/program/types.rdb \
 .../libreoffice-24.2.0.3/instdir/program/types/offapi.rdb \
 >.../master/offapi/type_reference/offapi.idl

Change-Id: I276ea47ae755a2ce641eef3f508ce1dc5f6af4ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164162
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-01 07:47:26 +01:00
Noel Grandin 1af510e951 Create an UNO service to do the symbol lookup in toolkit::AccessibilityClient
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the accessibility module into --enable-mergelibs=more

Change-Id: I8664ae1d2da4526cc7eab79b36e1589eb391d7c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163680
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 14:41:48 +01:00
Noel Grandin 47bfbbdb73 Create an UNO service to do the cui symbol lookup in vcl
which means I can remove one usage of gb_Library_set_plugin_for, which
is blocking linking the cui module into --enable-mergelibs=more

Change-Id: Ic6cd48377627f94747037c7247a1cd398738b390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-25 14:45:55 +01:00
Attila Szűcs f846efa507 tdf#67347 pptx import: stacked text, minimal impl.
Display Stacked text, and
Import/Export Stacked property from/to pptx.

It is a minimal implementation, it does not import/export to .odp,
there is no user interface to set this property.

Multiline Stacked text is rendered as 1 line text.
XML_wordArtVertRtl is mapped to XML_wordArtVert.

Editing of text containing space character seems to
not work correctly.

Change-Id: I535da45e3a2f2d1550bad2a40e9909e0d561d0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163121
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-16 13:07:18 +01:00
Michael Stahl 179991383e offapi: fix misleading comment
Change-Id: Ibc585600c0aa21f18911972f4604be65d16d713c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163437
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-15 17:02:47 +01:00
Kurt Nordback 15633d637e tdf#50934: Add a version comment, and more structure for of-pie
Change-Id: I9d7c25e47a3f4a78360f9b2deffe8650e378866d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156305
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06 15:16:31 +01:00
Kurt Nordback 6c45285e86 tdf#50934: Initial plumbing and infrastructure
Change-Id: I355bdc8e6d67e7cdd47e4d6eccecedc4b53ac11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155851
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-02 06:03:23 +01:00
Justin Luth a77403d11a tdf#146756 pie chart2 import: use manualLayout Width for pie chart labels
... and use a compatible 1/5 width if not specified.

This patch depends on the previous oox patch
(commit 301e27cbeb)
which actually reads the width into the model.

Fixes a 7.2 regression from
commit b006834239
author Tünde Tóth on Wed Dec 16 18:26:26 2020 +0100
    tdf#138777 pie chart: improve long data label width

and is basically a re-write of 7.1's
commit 20da1a5dd3
author Tünde Tóth <toth.tunde@nisz.hu>	on Fri Oct 09 09:24:18 2020 +0200
    tdf#134978 Chart OOXML Import: fix pie chart label custom position

This is very risky, but then ANYTHING changing chart2 is risky.
There were a lot of changes made in 7.1,
and they all invited regressions.
However, our chart implementation is not in a good state,
and certainly is not very interoperable,
so it is worth taking the risk.

Anything dealing with manualLayout at this point
should have originated as a pptx,
so forcing a compatible max width should be fairly safe.

It probably isn't actually all that risky after all.

largely copied code from
commit 4223ff2be6
Author: Balazs Varga on Wed Jan 15 16:31:35 2020 +0100
    tdf#48436 Chart: add CustomLabelPosition UNO API property

Fortunately this all goes away after a round-trip
since custom label placement is lost on export to OOXML,
and that really helps to reduce the risk.

make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testTdf146487

Change-Id: I9722fc6c759c15ac3924780e6fc124f02fba07e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162590
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-30 10:40:43 +01:00
Noel Grandin 589f3c68ba improve docs of XSystemShellExecute
copied from a comment by sberg

Change-Id: Ia363bac0a115564265ca9169174fdfc0d8610a69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162685
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-30 09:03:18 +01:00
László Németh b5e275f47a tdf#106733 sw: implement CharNoHyphenation
Implement CharNoHyphenation character property to
disable automatic hyphenation of words in paragraphs
with enabled hyphenation.

Fix also fo:hyphenate mapping to CharNoHyphenation
using automatic inversion of their boolean values
defined by xmloff's XML_TYPE_NBOOL, as suggested by
Michael Stahl.

Update also the test for tdf#159102 to check the available
hyphenation dictionary (also custom hyphenation patterns
work only with supported locales of the hyphenator).

Note: patch of thints.cxx contains also partial revert
of commit 53b289eabb
"use more TypedWhichId".

Follow-up to commit 73bd04a71e
"tdf#106733 xmloff: keep fo:hyphenate in character formatting".

Change-Id: If99b94ddcd44a5c2426e646be149078a3b9773b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162300
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-01-19 17:37:41 +01:00
Caolán McNamara 54da61d1d9 we are at 24.8 in trunk now, not 24.2
Change-Id: Iac329b0f11a564e90d6eb1e9c4a42f36254021f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161120
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21 15:36:08 +01:00
NickWingate 13bd849f60 Add export sheet range option to calc
User can specify which sheets to export e.g. '2-5,7'
exports sheets 2,3,4,5,7.
Note: this is different from exporting pages as one
sheet may contain several pages worth of content.

Also fix a bug where exporting only a selected sheet
causes the next sheet to be exported. e.g.:
Sheet 1 is empty, Sheet 2 has content. Exporting Sheet 1
results in Sheet 2's content being exported

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: Iecd42188ddbbbcd70eb37bec80783e29e3cb5b19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156255
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159686
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21 10:49:16 +01:00
Michael Stahl 2f512aaa6c tdf#105844 offapi,package,sfx2: use Argon2 for wholesome ODF encryption
https://www.rfc-editor.org/rfc/rfc9106.html

* add css::xml::crypto::KDFID constant group
* add "KeyDerivationFunction" to setEncryptionAlgorithms sequence
* Argon2 is used by default for wholesome ODF encryption, but
  $LO_ARGON2_DISABLE can be set to use PBKDF2
* extend various structs in package
* use 3 new ODF attributes "loext:argon2-iterations" "loext:argon2-memory"
  "loext:argon2-lanes" to store the arguments
* use this URL for now:
  "urn:org:documentfoundation:names:experimental:office:manifest:argon2id"
* use default arguments according to second recommendation from "7.4.
  Recommendations" of RFC9106; 64 MiB RAM should hopefully not be too
  much even for 32 bit builds

Change-Id: I683118cc5e0706bd6544db6fb909096768ac9920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-20 18:29:36 +01:00
Michael Weghorn 8bc6119812 tdf#123864 a11y: Handle new CHECKABLE state in misc places
Add reporting/handling of the CHECKABLE a11y state
added in

    commit d6c6472bbe
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Nov 13 15:53:44 2023 +0100

        tdf#123864 a11y: Add new AccessibleStateType::CHECKABLE

in various places where it seems pretty straightforward.
`VCLXAccessibleMenuItem` is a bit more complex and will be
handled separately.

Change-Id: I212b8439609d34410413959973163aa7d809cbf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160901
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-19 09:30:15 +01:00
Samuel Mehrbrodt 6dbc5e2bf4 [API CHANGE] tdf#158041 Remove unused reverse printing option from sw
Change-Id: I8b4597dbafc78e881fe556de8ce8221e50a673bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160777
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18 13:21:55 +01:00
Samuel Mehrbrodt 6cdf523f17 [API CHANGE] tdf#158041 Remove unused drawing printing option from sw
Change-Id: I95f81f166ab9d75622c83672101925894b2f2e7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160774
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18 09:35:29 +01:00
Samuel Mehrbrodt a0782355c2 [API CHANGE] tdf#158041 Remove unused table printing option from sw
"for now it was decided that tables should always be printed"
-> make this decision from 2015 permanent

Change-Id: Ica5958a74ec6766040ab59f2c91224b75df4d807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160766
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18 09:24:35 +01:00
Samuel Mehrbrodt c9d5bf3fe0 [API CHANGE] tdf#158041 Remove unused SinglePrintJobs config option from sw
This is handled by the print dialog directly

Change-Id: Ieb4221d97444216f332501da9a3aba7dc6b8500a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160762
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18 07:48:05 +01:00
Michael Stahl 09f23a3dc5 tdf#105844 package,sfx2: remove checksum infoleak when using AEAD
AEAD provides the verification of the password automatically, by reading
the entire stream the tag at the end will be verified.

The existing attributes manifest:checksum-type/manifest:checksum leak
information about the plain text.

This was mitigated with the addChaffWhenEncryptedStorage() functions
(see commit f57baefbd3) but a better
solution that also works for non-XML streams is to simply omit the
attributes; authenticated encryption provides better verification
without any leak.

* "ChecksumAlgorithm" property can be set to void now to remove the
  checksum
* change a bunch of members in EncryptionData, ZipPackage,
  ZipPackageStream to optional
* change ZipFile::checkValidPassword() to open the stream and return it

Change-Id: Id95288d0c238c4f9940fc5a185df814e8edcbad3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160711
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-13 22:02:52 +01:00
Michael Stahl f0fda7ad22 tdf#105844 offapi,package,sfx2,xmlsecurity: add AEAD w/ AES GCM
... and use it in the new experimental ODF encryption mode.

https://www.w3.org/TR/xmlenc-core1/#sec-AES-GCM

Unfortunately it turned out that NSS PK11_CipherOp() does not work with
CKM_AES_GCM because it is initialized with "context->multi = PR_FALSE"
in sftk_CryptInit(), so the one-step functions PK11_Encrypt() and
PK11_Decrypt() have to be used.

NSS 3.52 also changed a parameter struct definition - see
https://fedoraproject.org/wiki/Changes/NssGCMParams - which is not a
problem for RHEL or SUSE system NSS since those are rebased, but it
is likely a problem for less well maintained Ubuntu LTS, so use
the old struct definition which evidently still works with NSS 3.94.

NSS 3.52 also added a new PK11_AEADOp() API but it looks like this
doesn't support incremental encryption either.

Change-Id: Ibd4a672db74b65b1218926ba35ff8d2f70444c7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160505
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-12-11 20:46:40 +01:00
Samuel Mehrbrodt 030b72df0a tdf#157432 Expert config: Allow filtering by changed values
Change-Id: Ib8bbb7fc9e8014a9367278f3fa640f53af46dd2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159986
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-07 08:03:36 +01:00
Gabor Kelemen 9e8df5bfe8 tdf#148986 Support XF86Forward / XF86Back key events
Multimedia keys found on certain presentation clicker devices.
Not added to the Customize dialog, as that was not yet asked for.
As I have no access to a MAC, did not add support for that in vcl.

Inspiration for code taken from
commit ca74511985

Change-Id: I417e6ba7e79c5f6e774a56ba747803a156d5f50f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160255
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-06 15:51:42 +01:00
Regina Henschel 44ee19c99b [API CHANGE] Add OOXML way of curved connector routing
The paths generated for curved connectors are basically incompatible
between LibreOffice and OOXML. Thus it was not possible to render curved
connectors the same way as MS Office. The patch adds an OOXML compatible
method for calculating the path. The new method results in a different
svg:d attribute when saved in ODF, but needs no change to ODF.

The patch introduces the boolean connector property 'EdgeOOXMLCurve' to
switch between the two methods. The property value is determined from
the svg:d attribute in case of import from ODF. In case of missing
svg:d attribute the property value is set to 'true', because Word
currently does not write a svg:d attribute when it exports to ODF.
The property value is set to 'true' for import of connectors on a
drawing canvas in docx. Default value for new connectors is 'false'.

The new property has no UI, but can be used via macro.

Currently the new method is used for import of curved connectors on
drawing canvas in docx documents.

Change-Id: I53d99f44febe4d74c2b611f5fdb9de86628c4519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159708
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-12-01 08:44:01 +01:00
Miklos Vajna a596070f8a sw floattable, per-frame wrap-on-all-pages mode: add UNO API
This exposes the internal property SwFormatWrapTextAtFlyStart on the UNO
API.

We need this, because otherwise the ODT filter can't read/write it.

Change-Id: I67d3c28e3531b19183f8361a6df87b7a4ca84294
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159888
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-11-24 10:05:38 +01:00
Samuel Mehrbrodt a91892ec49 Use existing types, instead of strings
as suggested in https://gerrit.libreoffice.org/c/core/+/158028/comments/b7a803f4_7e5899ca

Change-Id: I7d4c46b24307922b51e463bacdfacfca85956b80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159524
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-20 11:17:23 +01:00
Andrea Gelmini c09de4e11c Fix typo
Change-Id: Idcfcd6aca1c74cb3e10dac09cd347b69a9bdb949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159406
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-14 22:32:38 +01:00
Andrea Gelmini 5767cb0eaf Fix typo
Change-Id: Id3be5eb786bfa245155fef17e819a72dee322e18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159397
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-14 12:37:44 +01:00
Michael Weghorn d6c6472bbe tdf#123864 a11y: Add new AccessibleStateType::CHECKABLE
Both, AT-SPI and IAccessible2 have a CHECKABLE state
that describes whether an item is checkable, i.e.
whether it can be checked, i.e. whether it is possible
that this object can have the CHECKED state.

So far, LibreOffice didn't have any equivalent, and
e.g. a checkbox that is ticked would report state
CHECKED but not CHECKABLE, which is inconsistent.
("How can an object that is not checkable be checked?")

For an unchecked object, the fact that it can be checked
is unclear since that one will just have the CHECKED state
not being present.

Introduce a new a11y state, `AccessibleStateType::CHECKABLE`
with the same semantics as in AT-SPI and IAccessible2 to
bridge the gap.

Map the state in winaccessibility (to IAccessible2),
gtk3 and an the Qt-based VCL plugins, which are
responsible for mapping to AT-SPI.

While Qt has an equivalent state flag, it currently
doesn't map that to AT-SPI yet.
Pending upstream Gerrit change to implement that: [1]

The gtk4 a11y API doesn't have a direct equivalent and will
be handled separately in a following commit.

Reporting the new state where applicable will be
implemented in following commits.

[1] https://codereview.qt-project.org/c/qt/qtbase/+/517844

Change-Id: I6aa7fec3b3bd728a5cfedcdc8d6b66f06337f7ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159382
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-11-14 08:09:02 +01:00
Mike Kaganski c60a9db1f2 tdf#158185: fix Excel's Range.Find and Range.Replace wildcard recognition
VBAToRegexp is wrong, using Basic wildcards. The functionality introduced
in tdf#72196 matches the required wildcard repertoire.

This introduces a new WildcardEscapeCharacter property to SearchDescriptor
service. Interestingly, the default value there was backslash.

TODO: also fix Range.AutoFilter, and drop VBAToRegexp. To do that, a new
property is needed in service SheetFilterDescriptor, to use wildcards,
in addition to "UseRegularExpressions" property.

Change-Id: Idebcf00d4b7376e5d7feaf8ae800fb19d05689d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159391
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-13 23:06:18 +01:00
Samuel Mehrbrodt 700ac29771 Use proper type in expert config dialog
In preparation for proper editing support for the different types.

Change-Id: I7044ff100c9bfcca5fa8894ff4525a1aac692796
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158028
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-09 15:37:16 +01:00
Samuel Mehrbrodt db3078bd8c tdf#157431 Show description for expert config items
Change-Id: I7d0257c2e06ed384f90ca3b51a6d2549044f2cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157148
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-09 08:14:38 +01:00