486458 Commits

Author SHA1 Message Date
Julien Nabet
c557b30df0 tdf#155443: MySQL/MariaDB direct connect: pb to change fieldname in table
Copy and simplify "getAlterTableColumnPart" from Mysql JDBC part which seems
to do the right job with table name.

Change-Id: I94d20b002a60f2ce1ea4d7e4de8040a9cbf04994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152247
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2023-05-25 08:28:25 +02:00
Miklos Vajna
dc69e7c52f Update pdfium to 5778
- external/pdfium/abseil-trivial.patch is no longer needed, upstream
  does what we did previously

- external/pdfium/build.patch.1: re-generate with 'patch -p1' + 'git
  diff'

- external/pdfium/include.patch is no longer needed, upstream does what
  we did previously

Change-Id: I39a6f721e436aa53914bbf43b78ac7d86e5eac59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152244
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-25 08:12:41 +02:00
Miklos Vajna
f0a9d4d4ee sw: fix wrong downcast in UndoManager::IsViewUndoActionIndependent()
In case a user types in one view, an other user types in an other view,
finally the first user deletes, then getting the undo state resulted in
a memory corruption.

This went wrong in commit 2875c65946e59f5dd7968155463bf00bd71d440b (sw,
out of order undo: allow a subset of a non-empty redo list, 2021-11-11),
the intention was to check if we have a redo item and it has the
expected type, but we checked the type of an earlier undo action that
belongs to the view.

Fix the problem by checking the type of the correct undo action, this
was probably a copy&paste error of mine.

Resolves <https://github.com/CollaboraOnline/online/issues/6412>.

Change-Id: I6cb2a081067695a045d86b4ef427cc5a76c0f9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152204
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-25 08:05:18 +02:00
Noel Grandin
839c501024 use more TypedWhichId in editeng
Change-Id: I2eb2b50ef7002e23221c985ab3218617b3832aa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25 07:52:21 +02:00
Tomaž Vajngerl
9a4b768b0a svx: combine svx::NamedThemedColor into NamedColor
Change-Id: I9a9656ddce9c12564411cfcb3e8e8714ae74a418
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152236
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-25 03:59:01 +02:00
Tomaž Vajngerl
8e87f1f2ff svx: change NamedColor be a struct instead of std::pair
Change-Id: Ice1625e8cae8da859ea8a940b3f8e40f6f9d7037
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152235
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-25 03:58:52 +02:00
Tomaž Vajngerl
68c4d1ca20 xmloff: rename *-color-theme-reference to *-complex-color
Change-Id: I63dd83522da7699162eb06a019a679d4b8750d10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152053
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-25 03:58:44 +02:00
Justin Luth
73a82b425b tdf#138279 Revert "On double click on chart select the chart backgroud"
This reverts 7.1 commit 6a915073f8400fd34274cf311994bbc9bf498ab6.

The change was simply wrong. There is NOTHING about this context
that indicates that a double-click is happening.

So whatever this patch was trying to do,
it simply was made in a completely wrong way.

So best to just revert, and put the onus back on the interested
parties to redesign a fix for their double-click issue.

Change-Id: Ia209c0552839d6cce1b348432789f0f861ac5703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152023
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2023-05-24 23:29:58 +02:00
Michael Stahl
b0e2b60fa4 tdf#148897 tdf#143239 sw: move flys off the page in SwTextFrame::Format()
The bugfix regresses testTdf143239, so we add some scary additional hacks:

* testTdf143239: turns out that this was already moving back and forth
  many times but then ran into some loop control - now with the fix for
  tdf#148897 this still happens, but the result is now bad, where
  previously it was good (by accident?).

  Move the flys off the page also in SwTextFrame::Format() - there is
  already code there to detect that footnotes have been moved off by
  Format_() - this is similar, the formatting should be redone immediately
  if there is a fly that created SwFlyPortions in the current frame, but
  the fly was actually moved to the next page by the very same
  Format_() splitting the frame.

* testKeepWithNextPlusFlyFollowTextFlow: here the problem was that the
  para with the fly didn't move back to page 1; need to clear the
  SwLayouter when toggling FieldNames.

* testKeepwithnextFullheight: this test document will loop creating
  infinite pages if the newly add move code is run during
  SwObjectFormatterTextFrame - the latter must move the flys if it is
  active, not SwTextFrame::Format().

This is all a bit experimental but i failed to have a better idea...

(regression from previous commit)

Change-Id: Icfcbd270137116198128d549b34e7f49a47b6911
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152246
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-05-24 22:29:15 +02:00
Michael Stahl
35f7f1ad9c tdf#148897 sw: layout: force invalidate background when moving fly off page
The fly 15 moves forward in SwLayAction::FormatContent(), then back
again later, without being positioned on the next page, and it happens
to go to the same position that it originally had.

Then SwFlyNotify sees that the position is the same, and doesn't do any
invalidation of the background, so the fly overlaps a text frame.

When the fly is moved by the object positioning code (before the below
commit), it first gets a new position on the next page, and then moves
back, so all invalidations happen.

Force the invalidation of the background in this case.

(regression from commit eb85de8e6b61fb3fcb6c03ae0145f7fe5478bccf
 "sw: layout: if fly's anchor moves forward, move fly off SwPageFrame")

Change-Id: Ifdc9460defe7b1f37cbb05310906146919e8fb6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152245
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-05-24 22:29:09 +02:00
Andrea Gelmini
01c12264f1 Fix typo
Change-Id: I9478777b375b69794a3ae61ee35842ca94b6ba1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152202
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-24 20:37:57 +02:00
Justin Luth
446f9d77af tdf#155465 doc export: handle para last line - justify
This was already OK for import in OOo 3.3,
but never exported. DOCX export landed in 2019 (no bug report).

No existing unit tests matched for DOC.

make CppunitTest_sw_ww8export4 \
    CPPUNIT_TEST_NAME=testTdf155465_paraAdjustDistribute

Change-Id: Iaea149c21259fe2a9002c8ce7c023327bbd13746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152199
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2023-05-24 19:52:14 +02:00
Justin Luth
2cdb48eee9 tdf#141684 tdf#147740 notebookbar: fix disappearing icons in groupbar #2
AFAICS, the code was non-sensical before.
Hopefully now it is logical.

Apparently returning the correct width doesn't mean much,
but that is the only thing that should be changing in this patch.
I would assume that returning an accurate width
is the proper thing to do for this function...

Change-Id: Iab26ac7fd8cd00127d2646f792fa552ec148dc74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152126
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-05-24 19:50:44 +02:00
Caolán McNamara
fd6cbd983a upgrade to libxml2-2.11.4
'checked' field removed with:
ce76ebfd13

win32 'run_debug' removed with:
59f2f60e3e

add libxml2-XMLCALL-redefine.patch.0 to avoid:
UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): error C2220: the following warning is treated as an error
UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): warning C4005: 'XMLCALL': macro redefinition
UnpackedTarball\expat\lib\expat_external.h(69): note: see previous definition of 'XMLCALL'

Change-Id: Ia9b1540dc1b4eccf91662c8d995c036f71de6fc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152176
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-24 15:52:03 +02:00
Andrea Gelmini
f128fc5dbb Remove triplicated include
Change-Id: I345a6e87ebf27188e9bdfe82ee364c2363b48efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152197
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2023-05-24 15:02:38 +02:00
Stephan Bergmann
72b869d1c0 Fix CppunitTest_configmgr_unit for --disable-report-builder
...after abd630e81bc150d05e4129cc22752ecf461777c7 "Allow all hierarchical path
segments to be ['...'] quoted", which failed as the checked
MimeTypeClassIDRelations group is conditional on install:module="reportbuilder".
(See the comments at
<https://gerrit.libreoffice.org/c/core/+/151673/2#message-f029dd1877f8a946647456ed73a7b60f6dfc0e8f>
"Allow all hierarchical path segments to be ['...'] quoted".)

It looks like there is no other, non-conditional property with a slash in its
name, so the test now just tests the ['...'] syntax on an otherwise
unproblematic property name.  (Alternatively, we could have extended the
configuration data used by unit tests with such a problematicaly named
property.)

Change-Id: I820004a5b824326d86e67c158994f13e71ba135e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152184
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-24 14:53:26 +02:00
Andrea Gelmini
bcad9f53c8 Remove duplicated include
Change-Id: I01ff5b522433826f560c9adbe606393e449434ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152198
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-24 14:47:46 +02:00
Rafael Lima
6c48e0b8e1 Related tdf#146518 Add Watch/Stack window commands to toolbar
This patch adds the new commands WatchWindow and StackWindow to the Basic toolbar, together with the related ObjectCatalog command.

Change-Id: Ia50d4a695271c6fae6446c18548930a3e9063489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151787
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-05-24 13:55:26 +02:00
Noel Grandin
3fbaef1db1 remove obsolete comment
Change-Id: I0b241b61f300fb3ed25b74595c3f8a7d018105b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-24 12:57:39 +02:00
Miklos Vajna
08fa2903df sw floattable: add a DoNotBreakWrappedTables compat flag
RTF doesn't break floating table across pages, and there is a matching
DOCX compat flag to handle such documents.

We can ignore floating table info on the model as a workaround, but that
would mean the info is lost on save, so that's not ideal.

Instead add a new compat flag that disables fly split at a layout level,
which allows both not splitting tables & retaining the model-level info.
This commit does the doc model, UNO API, layout & ODT filter, the Word
filters are not yet updated.

This compat flag is probably quite rare, so introduce a mechanism to
only write the compat flag when it's true: this way the majority of the
documents don't need to say anything about it and we can assume "false"
for them. Also fix two missing xmlTextWriterEndElement() calls in the
xml dumper.

Change-Id: I32321ec204d7bfe011fcf024b97c906da0db8aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152190
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-05-24 12:38:09 +02:00
Andras Timar
0ce9c61f35 Update git submodules
* Update dictionaries from branch 'master'
  to 2404521a6c320ae5e307c6c0fed31d81de751a88
  - On Linux dictionaries are packaged separately
    
    Change-Id: I604a0f12bdbedc0f35a27ead0f995e9dd3a27d8b
    Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/152191
    Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
    Tested-by: Andras Timar <andras.timar@collabora.com>
    Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-05-24 12:37:23 +02:00
Jean-Pierre Ledure
e7c4a88362 ScripForge (SF_Dialog) new OrderTabs() method
Set the tabulation index f a series of controls.
The sequence of controls are given as an array
of control names from the first to the last.

Next controls will not be accessible (anymore ?)
via the TAB key if >=1 of next conditions is met:
   - if they are not in the given list
   - if their type is FixedLine, GroupBox or ProgressBar
   - if the control is disabled

Args:
   TabsList: an array of valid control names in the order of tabulation.
   Start: the tab index to be assigned to the 1st control in the list. Default = 1.
   Increment: the difference between 2 successive tab indexes. Default = 1.
Returns:
   True when successful.

The method is available from Basic and Python user scripts

This change will require an update of the SF_Dialog help page.

Change-Id: Ie854227691c4e182b49a521b1285deaa4de3d1ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152166
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
2023-05-24 11:20:48 +02:00
Xisco Fauli
e518624da1 sw: fix crash in SwNode::GetFlyFormat()
FindFlyFrame() might return nullptr
See https://crashreport.libreoffice.org/stats/signature/SwNode::GetFlyFormat()

Change-Id: Id99a806e62f03b8912747525c8b0235c1b23232b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152156
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-05-24 11:09:02 +02:00
Stephan Bergmann
4f3a5acac5 Remove unused comphelper::adjustIndexToStartOfSurrogate
...introduced in 28cc0bff10f5dcec0c7b698ae7ba275845b2cad1 "Break
comphelper::adjustIndexToStartOfSurrogate out of o3tl::iterateCodePoints" in
preparation for bd5c3582581f37513f45b518e348f443d5d57334 "a11y: Fix returning
unpaired surrogates when retrieving characters", but which never picked it up

Change-Id: I5a10a3053d2f51333e27b74a808a41df7c1912ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152183
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-24 11:05:47 +02:00
Miklos Vajna
2c43b3f88d CppunitTest_sw_uiwriter4: restore part of testTdf107975 on Windows
Just disable the part that in fact fails, as requested at
<https://gerrit.libreoffice.org/c/core/+/152180/2#message-a9a5614df8b71f2b545ede872c5af9efa41a029b>.

Change-Id: Ic856525505d25d7b443058e6e56151270c4c1244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152181
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2023-05-24 10:17:57 +02:00
Noel Grandin
55cca83ca3 speedup drawing toolbars, cache min-width
doing the style lookup for the minWidth is really very slow in gtk

Change-Id: Ic7c44edada8d7205586fe569f30d92d4243642a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152182
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-24 10:17:03 +02:00
Miklos Vajna
50ab65a84a CppunitTest_sw_htmlexport: avoid reqif magic in testReqIfList
Set the filter options explicitly, rather than inferring it from the
test name.

Change-Id: Id24ee8755afeed0393f7ebe164f1caf27a2e0ca8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152170
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-24 09:48:02 +02:00
Baole Fang
0a90b90048 tdf#148088: Fix master related UI in Draw
Page/Master Page... -> Page/Change Master Page... (corresponds to Impress)
In the above dialog:
Available Master Slides -> Available Master Pages
Select a Slide Design -> Select a Page Design
After clickling load:
Load Master Slide -> Load Master Page
In Master mode, right click/Rename Master:
Rename Master Slide -> Rename Master Page

Change-Id: I6a8e987d6f3eaf91289ec061ec87cd76b3f90ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151489
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-05-24 09:22:48 +02:00
Miklos Vajna
a92965d518 CppunitTest_sw_uiwriter4: disable testTdf107975 on Windows
E.g. <https://gerrit.libreoffice.org/c/core/+/152138> failed 3 times in
a row, always on this test, always on Windows.

Also <https://gerrit.libreoffice.org/c/core/+/152170> failed 2 times in
a row, again only on this test, only on Windows.

At the same time, it doesn't fail reliably locally, so hard to debug the
root cause.

Change-Id: Iaf257d2b7ef5f46f6275b6ebcebc2156f4e58d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152180
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-05-24 09:02:12 +02:00
Dr. David Alan Gilbert
69384d208a CloneList::CopyConnections: Replace duplicated code by loop
There's a chunk of code copied for the two ends of the connection;
replace it by a loop with the original code.

Change-Id: I80d80f61879a08612dd8314963cccb35651c2091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152073
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-24 08:13:16 +02:00
Andrea Gelmini
f3aab159f1 Update git submodules
* Update helpcontent2 from branch 'master'
  to 2cbe21de3941407ffbd6957dfb88f142122ad057
  - Fix typo
    
    Change-Id: I68cced3d3101be527beea717e828da418834f117
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/152134
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2023-05-24 00:17:23 +02:00
Michael Meeks
b3768c69c2 perf: surprising to see getenv on a profile.
Change-Id: Id97c77d4c836e4f3c5a9eff6da07eb52d29248c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152105
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-05-23 23:15:27 +02:00
Michael Meeks
2a1e767179 perf: surprising to see PDF being vsprintf'd during JSDialog rendering.
Avoid some hundreds of these:

_cairo_pdf_surface_show_page
...
cairo_surface_destroy
CairoTextRender::CairoTextRender

via.

SvpCairoTextRender: :SvpCairoTextRender(SvpSalGraphics&)
SvpSalGraphics: :SvpSalGraphics()
Change-Id: Ieefb65138f7e685f09dbf4c36a2fccd39b4b05cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152173
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23 22:13:34 +02:00
Caolán McNamara
c43e39a7b7 tdf#155350 Do AutoCorrect of Input Method text
for all of SvxAutoCorrect::IsAutoCorrectChar() chars not just
quotes

Change-Id: I368836ea3c2dcdcc7fbe6906d7ae886f312d73d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152172
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23 22:09:44 +02:00
Caolán McNamara
010c05ca0e don't InvalidateAll in online for a OuterResize case
which is triggered on a new joiner to a shared document
but doesn't seem useful in the online case at least

https: //github.com/CollaboraOnline/online/issues/6379
Change-Id: Ic5034658d9e8a7ca1dfab44ce3905b95a5705eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152164
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23 21:52:47 +02:00
Caolán McNamara
e606d93361 categorize the reasons writer calls "LockPaint"
and bubble to a new InvalidateAll the collected
reasons for that whole document Invalidate

https: //github.com/CollaboraOnline/online/issues/6379
Change-Id: Id71c59f9cafebe42085337ee1e9591eb9f1162d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152162
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23 21:52:38 +02:00
Colomban Wendling
4dc2d5ec7a gtk a11y: Return 0xFFFFFFFF for invalid characters
Make get_character_at_offset() return 0xFFFFFFFF if fetching the
character fails, including when querying an unpaired surrogate.

https://docs.gtk.org/atspi2/method.Text.get_character_at_offset.html

Change-Id: If5e2e3b6bbd4cbc86b2b8524f305f8f0d843019d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-05-23 21:44:27 +02:00
Julien Nabet
980b5f2676 Revert "Related tdf#114286: put duplicates commands in GenericCommands..."
This reverts commit 52a695d2ceb4231a9fcc419959e29023ecef037b.

Reason: cause of tdf#155442
Accelerator to delete row(s) conflicts with the one for adding row(s)

Change-Id: If19d67a080e85d2a2716e4004db3335f0619c73f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152169
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-23 20:12:28 +02:00
Noel Grandin
6a55299234 prevent some "index hint out of range" warnings
Change-Id: Ib3d4dce2e535fb16a0f34c01c03c71927fa5cdd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152160
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23 18:53:41 +02:00
Colomban Wendling
bd5c358258 a11y: Fix returning unpaired surrogates when retrieving characters
Fix implementations of XAccessibleText's getTextAtIndex(),
getTextBeforeIndex() and getTextBehindIndex() when called with
AccessibleTextType::CHARACTER to return the whole code point rather
than an unpaired surrogate.

This is still not perfect because XAccessibleText::getCharacterCount()
will return an incorrect value (code units rather than code points),
but it fixes the most useful case of retrieving the character at e.g.
the caret offset.

This fixes the GTK3 and Windows backends as well without further
changes.  Qt6 also mostly works according to Michael Weghorn, but for a
bug on Qt's side (https://bugreports.qt.io/browse/QTBUG-113438).
MacOS backend doesn't seem to be affected in the first place.

Change-Id: I53f07bcba78c6b267939257542a521b106101e96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151303
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-05-23 18:39:08 +02:00
Justin Luth
dce8d2dbc4 tdf#140557 notebookbar: be smarter about hidden window size
This fixes a 7.1 regression from 53d73d532281b6734a7d4614bb74fc6cc15510f0
where notebookbar controls were being hidden (and then shown
after a refresh of the toolbar), leaving big empty gaps.

I don't know anything about vcl or window layout idiosyncracies,
so I just read through this code looking for some way to fix
the problem of the notebookbar not using all of its available space.

The problem was that GetOutputSizePixel was returning zero.
Why that would be I don't know. Perhaps because it had never
actually been displayed on screen yet? (This was occurring
on simply loading Calc.)

Substituting a small DUMMY_WIDTH didn't give a very accurate
reduction, so there was no space to add back in any items later on.

When adding it back, it adds using a legitimate-seeming width,
with an (unused this time) fallback to DUMMY_WIDTH.

So, unless getLayoutRequisition cannot be depended upon for
returning an accurate size, this should be a nice fix.
It will no longer hide too many controls from the notebookbar.

Change-Id: I1c39fe3532dad501c16f53612f8e26835b72638a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152125
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-05-23 17:45:33 +02:00
Miklos Vajna
807ad65661 tdf#155002 sw floattable, split but not yet moved follow: fix GetNextFlyLeaf()
Trying to open the bugdoc resulted in a layout loop since commit
b47401e12d9c45386899df0aa26653bd26c9abd4 (sw floattable: fix assert fail
when object formatter gets the wrong anchor, 2023-05-22), previously
could not open due to an assertion failure.

What happened is that the anchor hosted a fly frame with a table, but
the anchor was inside a section. Instead of splitting the fly and moving
part of it to a next page, we constantly created and deleted new pages,
without moving anything, which is a layout loop.

In fact crating a new page in SwFrame::GetNextFlyLeaf() is not correct:
we should realize that we're inside a section and let GetNextSctLeaf()
handle the page (and section) creation. Once the anchor code is improved
to detect that we're in a section, GetNextSctLeaf() creates the follow
section, and later in GetNextFlyLeaf() the call to GetNextLayoutLeaf()
will find the new follow section. Which means we have a place for the
follow anchor and don't create any new page, fixing the loop.

The import result of the bugdoc is still not perfect, but at least we
don't crash or hang while opening the document.

Change-Id: Ic0717dddbcd0949df7d4ae766f3cc0dbbbcff27a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152163
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-05-23 16:45:43 +02:00
Stephan Bergmann
e1819dfeb0 Avoid -Werror=unused-function when building against older GTK4
...as reported in the comment at
<https://gerrit.libreoffice.org/c/core/+/151866/2#message-daf995784c18439280d3280877cfcf73d0bb5e9b>
"Silence loplugin:external and lopluign:unreffun in (WIP?) a11y.cxx for now",

> In file included from /home/michi/development/git/libreoffice/vcl/unx/gtk4/a11y.cxx:17:
> /home/michi/development/git/libreoffice/vcl/unx/gtk4/a11y.hxx:19:24: error: ‘void* lo_accessible_get_instance_private(LoAccessible*)’ declared ‘static’ but never defined [-Werror=unused-function]
>    19 | static inline gpointer lo_accessible_get_instance_private(LoAccessible*);
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/michi/development/git/libreoffice/vcl/unx/gtk4/a11y.hxx:21:24: error: ‘void* ooo_fixed_get_instance_private(OOoFixed*)’ declared ‘static’ but never defined [-Werror=unused-function]
>    21 | static inline gpointer ooo_fixed_get_instance_private(OOoFixed*);
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I40811235a66e429e2472b50bcbaa3e6fefa6a593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152147
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-23 16:11:04 +02:00
Noel Grandin
1ed765c818 tdf#155235 workaround gtk3 accessiblibility crashes on close
we are still working around the problem here, which is that various bit
are not firing accessibility events when their children change.

So clear the static map in comphelper on shutdown, to prevent crashes
resulting from objects being kept alive after vcl has shutdown

Change-Id: I3ae216b345a1bb4cb4e3fde3527e4d4aa5968f76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152161
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23 16:04:32 +02:00
Gökay Şatır
d4bc98c5bf [API CHANGE] Add createShortCutManager function to uiconfigurationmanager.
We need to have different accelerator classes for differnt languages.
This PR creates a new accelerator class for different languages.

Since current code uses single instance for accelerators, i needed to add a create function.

Also we now have an unordered map for different languages and modules.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798
Tested-by: Jenkins
2023-05-23 15:40:57 +02:00
Miklos Vajna
ef76718e71 sd: fix crash in SdXImpressDocument::postMouseEvent()
Crashreport signature:

program/libsdlo.so
      SdXImpressDocument::postMouseEvent(int, int, int, int, int, int)
              sd/source/ui/unoidl/unomodel.cxx:2615
program/libmergedlo.so
      doc_postMouseEvent
              desktop/source/lib/init.cxx:5007

Change-Id: I321f39b284f5917048925bf45c9a6417ac9cb2ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152138
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-23 15:37:52 +02:00
Caolán McNamara
5719e0eb87 in online do less whole document invalidation
https://github.com/CollaboraOnline/online/issues/6379

lets at least halve the num of invalidations on joining
a session.

Change-Id: I8ceb0a9ee23d632c9fb2c4a96250cc259b4a2f29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152120
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-23 15:09:49 +02:00
Dr. David Alan Gilbert
26b0870f4e tdf#120283 CopyObjects: Use CloneList to wire up connectors
Remove the old connector wiring code and replace it by CloneList.
The copy/paste code uses CloneList to do this work, and CloneList
knows how to deal with groups; and not dealing with groups
is the cause of

tdf#120283

Change-Id: I48476a93a89c1a14f55ba206e0c8354823d0e8c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152070
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23 15:05:05 +02:00
Noel Grandin
8de6e211b7 tdf#155410 move some layer/object visibility computation inside SdrObject
which has the nice effect of
(a) removing some duplicated code
(b) being more efficient with deeply nested complex objects

Change-Id: Ifee10d40fca3faac0f5a7b79febdba756850f30f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152124
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23 14:36:47 +02:00
Stephan Bergmann
f1ac4376ff Don't even bother to introduce unused variables
With <https://gerrit.libreoffice.org/c/core/+/152157> "More conservative
SAL_WARN_UNUSED to avoid -Werror,-Wunused-private-field", these two cases would
have started to cause "unused variable declaration [loplugin:casttovoid]"
(because the call to isWarnUnusedType in compilerplugins/clang/casttovoid.cxx
would no longer return true).  Just avoid that by not introducing the variables
in the first place.

Change-Id: I3d2b085082555d1765fbd32045b5157deb0af67e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152158
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-23 14:35:03 +02:00