Commit Graph
21253 Commits
Author SHA1 Message Date
Mike Kaganski 9470fca711 deduplicate o3tl::trim
Change-Id: I5d4b3555b59b5abf622c389662e83cbd0f7d142d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150213
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-13 13:21:37 +02:00
Mike Kaganski 53a4b94d01 Use more *string_view
OUString::equalsIgnoreAsciiCaseAscii and compareToIgnoreAsciiCaseAscii
taking string_view are added as overloads, rather than replacements to
the variants taking const char*, because the latter have benefit when
the passed C-style string's length is unknown, because these variants
don't pre-calculate the length.

Change-Id: I2def689d7b7784212dc6cd6b8ae9ab1d42604079
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150272
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-12 19:49:15 +02:00
Mike Kaganski d425780215 Use o3tl::trim in strtmpl.hxx
Change-Id: I4de8658c36c21fe07fa45f697cf3145c567a95c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150210
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-12 19:48:43 +02:00
Sarper Akdemir a925476352 xmloff: ODF import/export for style:overflow-behavior "clip"
Adds initial support for style:overflow-behavior

According to OpenDocument-v1.3-part3 style:overflow-behavior can take
values of:
- "clip"
- "auto-create-new-frame"

This patch doesn't properly implement support "auto-create-new-frame",
only "clip".

If "clip" is set, TextClipVerticalOverflow is set to true, causing the
vertical overflowing text to be clipped.

"auto-create-new-frame" is treated the same as omitting the
style:overflow-behavior attribute, setting TextClipVerticalOverflow to
false.

Change-Id: Iea298f41fbf0cf18dc07f41788ba0b665515db8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150122
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12 14:47:18 +02:00
Noel Grandin 0c5c1e831a Revert "remove unnecessary UnoControlModel::setPropertyValues"
This reverts commit 19c18c9408.

Because it breaks the MRI extension, I was wrong, it does not
do quite the same thing as its superclass method.

Change-Id: I65bfb4264615dea5f6d0f2fb7b989352e7e83ee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150274
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12 14:18:35 +02:00
Noel Grandin 505647d637 remove unnecessary method
Change-Id: I9ef8f2cb2e3836c879532f690794df642c2449de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150255
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12 11:21:36 +02:00
Tomaž Vajngerl 2a7ab2ab77 oox: add model::EffectStyle and import effect style elements of a theme
Extends the SwCoreThemeTest with effect style use-cases-

Change-Id: Ifcb96a860fcbc0aae65e8ec276e069f7f60fb950
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149361
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12 09:40:09 +02:00
Noel Grandin 4c288a18e7 fix o3tl::equalsAsciiL
after I got it wrong in both the original commit
    commit d15a6560bd
    use more string_view
and in the attempted fix
    commit dd41ea3ec1
    fix for o3tl::equalsAscii
thanks to sberg for spotting that

Change-Id: Iff12879de823553b2623db48979e9a720302f2d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150240
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12 08:23:54 +02:00
Tomaž Vajngerl f69614d811 oox: add model::LineStyle and import line style elements of a theme
Also extend the SwCoreThemeTest with asserts for the LineStyles
for the example theme.

Change-Id: I72aa64345d39fea84544e39b0a37a22f3e6baa5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149360
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12 06:55:41 +02:00
Tomaž Vajngerl 0ffa50031e oox: add model::BlipFilll and import blip (graphic) fill elements
Change-Id: I610b732b1fd4eebcfcc55acb6f04a8acf84f92b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147954
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12 06:01:53 +02:00
Tomaž Vajngerl 17167dbede oox: add model::PatternFill and import pattern fill elements
Change-Id: I49ef33fd81509599f4081e6a913b05dae1e4a642
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147953
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12 05:37:33 +02:00
Tünde Tóth 7460e4f4a7 tdf#154469 DOCX export: fix hyperlink in group shape
Hyperlink inserted to shape lost after export,
if the shape was inside a group shape.

Follow-up to commit 7f4f88b883
"tdf#145147 DOCX import: fix hyperlink in group shape".

Change-Id: I48b582c04b6f779cb5393179f65a32d7a7eca5ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149716
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-11 19:35:57 +02:00
Noel Grandin f1ad6834e1 avoid some OString<->OUString back and forth conversion
Change-Id: I20d2611ca88df7daca7c56e7475fb85f98fbf888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150226
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11 17:19:01 +02:00
Noel Grandin 38640d7cb4 use more string_view in filter
Change-Id: Icbccd81fd0fa18fc15a32aa2729b1c5f9a3ee542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11 17:18:51 +02:00
Noel Grandin 8ac1dd864b use more string_view in o3tl::equalsAscii
Change-Id: I1445a179e0007152b96436da4520c30a6fe6575c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11 17:18:41 +02:00
Noel Grandin dd41ea3ec1 fix for o3tl::equalsAscii
from
    commit d15a6560bd
    use more string_view
where the new method was named incorrectly

Change-Id: Ia4513fa67f5bda8b6cb56e3db22df48b5e3c7283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150217
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11 13:29:45 +02:00
Mike Kaganski 1155def95b Drop Writer::OutLong
... and use SvStream::WriteNumberAsString, replacing Write[U]Int32AsString

Change-Id: I10e56c532494239ed40ec01b6184dd06db463a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150193
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-11 09:06:10 +02:00
Mike Kaganski 5fe96b6dce Drop SvStream::WriteCharPtr
WriteOString is a better replacement

Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10 23:13:32 +02:00
Noel Grandin 9ff063eeab use std::unordered_map for static properties in toolkit
which is faster than binary lookup

Change-Id: Ia810313af36c75fd9b5b241704f0cbd66afcb6b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10 21:51:49 +02:00
Mike Kaganski 8b6d167608 Use of O(U)StringNumber for float/double is actually a pessimisation
They use rtl_(u)str_valueOf(Float|Double), to fill the buffer, and
the latter use doubleToString, which creates an rtl_(u)String, copies
to the buffer, and releases the rtl_(u)String.

So instead just use the rtl_(u)String from rtl_math_doubleTo(U)String
directly. Even when the end result is not needed as O(U)String, this
would avoid an extra copy step. Also, this avoids separate
LIBO_INTERNAL_ONLY implementations.

Change-Id: Ib1d9ecebd7876dfff7dc758f89ee4c1536647a50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150150
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10 16:36:09 +02:00
Sarper Akdemir 1934698260 editeng, svx: introduce ability to clip vertical text overflow
Introduces editeng text property TextClipVerticalOverflow.

Which when set causes vertical text that is overflown out of a
frame/shape truncated. (Only when text isn't being edited)

This is implemented as two steps:
(if text overflows)
  1 - Vertical adjust is forced to top.
    (Forcing vert adjust to top isn't the desired behavior normally,
    but good enough for a first cut I'd say.)
       -> The desired behavior would be after the overflown text is
       truncated, doing a vertical adjust (of center/bottom/top) on
       that piece of text.

  2 - ClipRange is set to the height of the frame/shape.

This appears to work with different text directions too (vertical
etc.).

Change-Id: I697715a7d28bde94a6650609b16505ffab92173f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150106
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-10 08:52:42 +02:00
Noel Grandin 3fbadf2801 use more OUStringToOString
which makes it easier to pass around string_view in a few places.

Change-Id: Icbbb7f56494986582f1c3272404775bd98031240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09 16:28:13 +02:00
Mike Kaganski 02bf9a2e65 Delete other special copy/move functions
As suggested in
https://gerrit.libreoffice.org/c/core/+/146098/2#message-c2f0d0c43d5315650136a10470785ea2ec4d6e58

Change-Id: Ibf9ef1cf61fd2a8d05ce5e7a78c8bac793318485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150147
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-08 19:37:29 +02:00
Tomaž Vajngerl 4208d95a29 oox: add FormatScheme test case and make sure FillStyle is imorted
Extends ThemeTest in sw with the use cases relevant for import of
FormatScheme into the model::Theme (as much as it is implemented
currently).

Change-Id: I888f64c24ba455913d688be256f095d9c298dc2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147693
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-08 09:02:13 +02:00
Tomaž Vajngerl dad60bd52a oox: add model::Theme to oox::Theme and remove createSvxTheme
This is the start of the change where oox::Theme is only a holder
of model::Theme and not a oox structure. This is probably the
easiest way how to refactor that. In this commit only prepare that
and make the code work the same as it did before.

Change-Id: I926a35fd0db383ddb182dc83b36411b2d40b8530
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147692
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-08 07:56:27 +02:00
Tomaž Vajngerl 4f347ebaba use shared_ptr for model::Theme instead of unique_ptr
Also change other cases to use the shared_ptr so there is no need
to do copies and replace some of docmodel/theme/Theme.hxximports
with forward declarations.

Change-Id: I4588cb25e05e5f3e535011fffb68a8075b05aecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147691
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-08 07:56:19 +02:00
Caolán McNamara 105a9390e0 drop unused eventtesting stuff
eventtesting with input of fuzzed keystroke was a fairly nifty idea, but
I never did anything with it beyond an initial experimental run and its
cluttering up things so drop it now

Change-Id: I44571e3e33124f522374d7c6772b7a7e7721aa1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150125
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-07 16:54:36 +02:00
Caolán McNamara 70642bb7af tdf#154470 try moving the Show of the client to after the float positioning
Change-Id: I785120bdad1a3c3311aeca0c8ec5b8b014999872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150108
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-07 10:13:18 +02:00
Mike Kaganski d856be879e Use more *string_view
Change-Id: Ic82bbb1b8d6b03066e66f5eb93e9a94b16b1a9f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150072
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-06 23:02:16 +02:00
Samuel Mehrbrodt 00408d71e8 Make SvxNameDialog public
Useful as a generic text input dialog

Change-Id: Ibc6ff0c25a790da8f1226fff7244e50ed3a1cf04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150002
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-04-06 11:46:39 +02:00
Szymon Kłos c19f041f27 jsdialog: implemented mouse events for drawingarea
Change-Id: Ieab3d9fdbcee90ccd125e84f74c06cd1d6711a9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149953
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150057
Tested-by: Jenkins
2023-04-06 10:53:21 +02:00
Noel Grandin e57d5daaea fix leaks when using tools::JsonWriter
Specifically in sd/source/core/annotations/Annotation.cxx

We seem to end up fixing leaks here often.
The current tools::JsonWriter API is just very hard to use correctly.

So rather return an OString, which is cheap to copy,
and push that down into the LOK code.

AFAIK that seems to end up requiring less code and less adhoc copying
of data (specifically the queueing code in init.cxx was creating
copies when converting to std::string).

Ideally, we could have some special API to avoid the new strdup()
calls in init.cxx, but not sure how to prevent other people
from accidentally using that.

Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05 17:02:46 +02:00
Szymon Kłos c81306b7f5 jsdialog: dump menu for menubutton
Change-Id: I449ae3f8cf294e2ab81a5b47862278e325f2cb1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148937
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150041
Tested-by: Jenkins
2023-04-05 16:02:22 +02:00
Michael Stahl 5cc69594e4 vcl,sw,sd: PDF/UA export: produce better /CT for SdrMediaObj
7.18.6.2 Media clip data
  In the media clip data dictionary, the optional CT and Alt keys
  (ISO 32000-1:2008, 13.2.4.2, Table 274) are required.

Presumably writing a potentially wrong hard-coded mime type here isn't
intended.

Change-Id: Ifa8ee199a4cf9ce83f410860d59b6c30475f80e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150050
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-05 15:39:37 +02:00
Michael Stahl a5225ba82e avmedia,*: guess the mime type of media files based on file name
.. at least for the most popular types, and do it automatically in
MediaItem::setURL().

This should work in practice in most cases and is much simpler than
adding some type detection or calling into platform dependent avmedia
backends.

Remove the parameter that was only ever set to
"application/vnd.sun.star.media" anyway, the same value that would be
used if it's missing.

Stop using that silly type for everything, only use it when guessing
fails.

In case an ODF document is loaded, it will use the mime type loaded from
the file (see setting of MediaMimeType in SdXMLPluginShapeContext) and
not guess it because that would require updating the entry in
manifest.xml as well.

Change-Id: I8ce29cf7425678ae11dda1d8c875be818f8623af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150049
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-05 14:34:51 +02:00
Julien Nabet 62b5dd31ff tdf#148906: Ukrainian letters miss in bullets and numbering dialog
Change-Id: Ieef2b2a7052da342709baf298b618d2c29fa3e43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149768
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-05 13:57:03 +02:00
Mike Kaganski 90c590812e Simplify O(U)String::number implementation
Change-Id: I059f0324597a90aee01c95170a48ac5578f3caee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150037
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-05 09:57:04 +02:00
Mike Kaganski 1e9f4de320 Make O(U)String::boolean also return an O(U)StringNumber
Change-Id: I184fa0e4e45662e0fac86076d1c8733a0465bb56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149978
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-04 23:01:56 +02:00
Szymon Kłos fcb4e31983 Convert SvtLineListBox to WeldToolbarPopup
Change-Id: I1849e40508a8754ec567da5913d3454571da5bee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149063
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150015
Tested-by: Jenkins
2023-04-04 20:38:11 +02:00
Balazs Varga 89e65e6afd tdf#153880 sc: Make Calc text hyperlinks stand out more
Add underlining for links in Calc.

TODO: unit test

Change-Id: Idd5a7de7464d8ce443cdec756ac803491e73b0ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149913
Tested-by: Jenkins
Tested-by: Gabor Kelemen <kelemeng@ubuntu.com>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-04-04 20:16:47 +02:00
Armin Le Grand (allotropia) 4b5203ebf4 MCGR: Improve performance for texture-mapped MCGR processing
Change-Id: I20b32e7c272112c6c3d9f7ee0ef59c6d4d006d94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150020
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-04 18:55:49 +02:00
Michael Stahl 2a87a59a52 tdf#152234 vcl,drawinglayer: PDF/UA export: produce Role for form controls
veraPDF complains:

  Specification: ISO 14289-1:2014, Clause: 7.18.4, Test number: 2
  If the Form element omits a Role attribute (Table 348), it shall have
  only one child: an object reference (14.7.4.3) identifying the widget
  annotation per ISO 32000-1:2008, 14.8.4.5, Table 340.

LO forms produce both page content in an MCID and an /Annot, so Role is
needed.

Change-Id: Ic231931a7c35d8da37ca76e02d97501edb43347c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149626
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-04 15:01:15 +02:00
Bjoern Michaelsen 116a646a9f RES_TBLHEADINGCHG no more ...
- replaced LegacyModifyHint by a proper SfxHint
- Refactor SwTabFrame for table heading change:
  * split out Invalidate(SwTabFrameInvFlags)
  * split out HandleTableHeadlineChange()

Change-Id: I374db7a3b16a3062d6ad54c32527ec1056cbc00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149929
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-04 11:27:22 +02:00
Szymon Kłos 564d8594af jsdialog: update drawing area when resized
Change-Id: I429a5d750fc84b42d0d399cf3833f22e7479cfe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149455
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149998
Tested-by: Jenkins
2023-04-04 10:22:09 +02:00
Vojtěch Doležal 28675af84a tdf#41652: Variable width NBSP
Adds a flag that when enabled (opt-in for both old and new documents) changes behaviour of NBSP to not be strictly fixed width.

This commit also implements this behaviour such that NBSP has always the width of a standard space (0x20) on the given line. This change is only noticeable when the paragraph is justified.

Lastly a tilde or a degree character is now shown in place of NBSP when nonprintable characters are enabled, since the gray field alone is not visible in many circumstances.

Change-Id: Iabb30b5930ced62691cc4304f60c5e6dc886ed61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149576
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-04 08:23:18 +02:00
Andrea Gelmini c2cc3e696e Fix typo
Change-Id: I49fe9dbdc11291c02be1dd5e41171a987d896008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149997
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-03 20:32:21 +02:00
Armin Le Grand (allotropia) 64007cb308 MCGR: Unify Gradient intensity handling in tooling
Moved the Gradient intensity handling to tooling since
it is also needed for TransparencyGradients. Added
missing use of GradientStepCount for transparency.

Change-Id: I63ae6683fa0131be7faadc8572e19f5c43bf27e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149957
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-03 17:16:48 +02:00
Michael Weghorn 1f43726408 tdf#153806 a11y: Allow opening context menu in special char dlg using keyboard
Open the context menu for the `CommandEventId::ContextMenu`
command for the character table that is used in the special
characters dialog, so opening the context menu is not only
possible by right mouse click, but also using the keyboard
(by pressing the context menu button or Shift+F10).

Move the handling for the case where the context menu is activated
using the mouse from `SvxShowCharSet::MouseButtonDown`
to `SvxShowCharSet::Command`.

When the context menu is activated using the keyboard,
use the centre of the currently selected item for the
context menu position.

Adding support for opening the context menu for the
recently used and favorite characters further down
in the special characters dialog is independent of this
and would have to be added separately.

Change-Id: I55ef43708b95f5a90b06777a8aeb32a64609160d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149927
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-03 17:01:56 +02:00
Michael Weghorn bb4aaa4cfd Pass special char dlg context menu pos as param, drop member
The `maPosition` member was only used for the position
of the context menu. It was set before calling
`SvxShowCharSet::createContextMenu` and then only used
in there.

Pass the position directly as a parameter instead and
drop the extra member.

Change-Id: I7ba9ec60ffb993ca1269d86efeddbe0950ed7fbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149926
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-03 17:01:31 +02:00
Michael Weghorn fa7fc141e4 tdf#153806 a11y: Insert special char + close dialog on return key
As discussed in tdf#153806, insert the currently selected
character from the special characters dialog and close
the dialog when the return key is pressed on the
table of characters (either showing all characters
or just the search result).

Something similar should probably be done when the return
key is pressed with one of the recent characters or
favorite characters in the dialog having focus, but
that needs to be handled separately, possibly along
with the other remaining suggestions to improve keyboard
handling in the special characters dialog as discussed in
tdf#153806.

Change-Id: Iccc19e4808ddf6f15c32710f9bea931e46b046bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149920
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-03 17:00:55 +02:00