Commit graph

488346 commits

Author SHA1 Message Date
Noel Grandin
da54fbce1c use sal_uInt64 when dealing with stream position
Change-Id: I2869e115941b3e1f52911d58d54ec1b2831d0524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155524
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09 20:06:54 +02:00
Noel Grandin
55c0d6caec use sal_uInt64 when dealing with stream position
Change-Id: Id94c6615f857f3ad3497b1abef1e1f2bd67bd4a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155523
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09 20:05:43 +02:00
Noel Grandin
9a1de2cfdf use sal_uInt64 when dealing with stream position
Change-Id: I0752d158c648f6ebfa17c9273bab2176e1ca6c83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155518
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09 20:04:57 +02:00
László Németh
f65c04b2b3 tdf#156487 sw tracked table column: fix Hide Changes
In Hide Changes mode, deleting table columns with change tracking
wasn't applied on the table layout immediately, only using Show
Changes and Hide Changes again. Now the deleted column removed from
the table instead leaving an empty table column.

Also revert commit 33058b5dc4
"tdf#156544 sw tracked table column: delete empty column".

See also commit a74c51025f
"tdf#146962 sw: hide deleted row at deletion in Hide Changes".

Change-Id: If03d2bc5996a168cb44839b0753effb9031edbc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155522
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2023-08-09 17:22:21 +02:00
Noel Grandin
c9da81db96 use sal_uInt64 when dealing with stream position
Change-Id: Ibb8637e4648f56d7f9895a31df006915df8f8fdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09 16:26:49 +02:00
Michael Stahl
b5a41467ef tdf#147938 sw_redlinehide: move fix into SwNodes::UndoTableOfText()
Reproducing tdf#151866 on the .odt attachment, it becomes clear that the
fix for tdf#147938 is in the wrong place.

There a node has the merge flag None although it is the last node of a
merge, because CheckParaRedlineMerge() first sets the node flags and
then calls DelFrames(), which now resets the flags.

In case there's another caller of DelFrames() that needs this, it's not
obvious, can be added later.

(regression from commit 5b55ccfd38)

Change-Id: Iba0cb83260ecb18a4b96ded20a95b2b20d696fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155516
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-09 16:25:47 +02:00
Michael Weghorn
1ba5f6682c wina11y: Drop "#CHECK#" comments
... and "#CHECK XInterface#" comments;
it's obvious that this is what the next lines do.

Change-Id: I09234d1a2f5c58cfab1580f188229d28d27fc402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155506
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-09 15:45:49 +02:00
Michael Weghorn
63a004f51f wina11y: Use return value instead of out param
... to return the `IAccessible*` in
`AccObjectWinManager::GetIAccessibleFromXAccessible` and
`CMAccessible::get_IAccessibleFromXAccessible` and adapt
the call sites accordingly.
This is more straight-forward and the extra bool return
value didn't add anything, since it was also just
saying whether the pointer was a nullptr, so rather
check that directly.

Also drop `AccObjectWinManager::GetIMAccByXAcc` that
does the same thing and switch the only call site
to use `AccObjectWinManager::GetIAccessibleFromXAccessible`
instead.

Change-Id: I72933df62aa9ac1ff3f2a84c5045dfae354c18e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155505
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-09 15:45:35 +02:00
Jean-Pierre Ledure
d2c1a4fa50 SCriptForge (SFDatabases) manage database credentials
When not embedded, databases usually
require user and password to grant
access to scripts.

When the access was refused, so far the
execution was stopped brutally with an
error message provided by LO internal
code.
This was made visible during some tests
with a MySql database server.

The code to be reviewed is located in the
creation of the "database" service. This
service has the sungularity that it can
be called from several other service
instances.

As from this commit unsuccessful tentatives
to login to a database from code are
rejected with a clean SF error message.

The different scenarios to create a
database service have been (re)tested.

Change-Id: I695d108242872d27671688af76916784908aeebe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155507
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
2023-08-09 14:45:23 +02:00
Khaled Hosny
3b7eb22241 vcl: Organize CoreText font code a bit
The code was all over the place with classes split between files or
grouped in some files and I couldn’t make a head or tail of it. Move
each class to a dedicated source/header file.

Change-Id: I35daa05b4684c13339c637819dc30fa47a60cf65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155503
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-09 12:42:57 +02:00
Justin Luth
90b23d0b45 tdf#144512 autorecovery: always wait for user idle with timed save
Only the "active" document was waiting for a user idle.
But that doesn't make sense because the background apps
still lock the foreground app during file save.

So all timed backups should wait for a user idle period
before starting their recovery / autosave.

Once an idle loop is triggered, no autosave will ever run again
until an idle timeout occurs! So a busy user who switches from
one doc to another without ever pausing still wouldn't ever
get a backup - even from the background docs!

Without this patch, only the first modified documents
(if backgrounded within 10 minutes) would ever
get a recovery save. So in pretty much every case
this patch makes sense AFAICS.

Change-Id: I6e9e04aa2e50895e53826b427cb52c129da43701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155459
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2023-08-09 12:13:44 +02:00
Caolán McNamara
13eb63f377 Resolves: tdf#156661 only set a fixed height for the single row case
of the insert special character dialog. The character popdown uses
multiple rows instead.

Change-Id: If3c5578a018a31dbdb0a0d9785f18b570e13112f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155502
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-09 11:35:22 +02:00
Michael Stahl
2f9e67d1e7 tdf#151866 sw: layout: prevent deleting newly created SwSectionFrame
A section frame is created so that content can move back from another
page into it.

Apparently only the pPrv frame is on the same page, and formatting it in
SwFrame::MakePos() moves it backward, then CheckPageDescs() sees a page
with only empty section frames on it and deletes the whole page.

(regression from commit b9ef71476f)

Change-Id: I4f8e4debd4bcf993c9355dcfc3ced779fe6732ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155467
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-09 10:27:58 +02:00
Hossein
0c9f095a01 tdf#155446 Fix problem with ccache on Windows
This patch fixes the recent problem with building LibreOffice with ccache
on Windows which was caused by the lack of double quotation mark between
ccache.exe and path to the MSVC compiler.

Change-Id: I1a714513ccb8cd674895d0c887013ea862d3b544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152277
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-09 10:15:16 +02:00
sahil
a00cf4bc77 tdf#147132 Flatten Basic function implementations
Change-Id: I0ba6e7c1e128f3216eb3b77246c659a728df1324
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155011
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-08-09 09:58:21 +02:00
Taichi Haradaguchi
af3e5bef6c openldap: upgrade to release 2.6.6
* remove Wint-conversion.patch and configure-c99.patch, which were fixed upstream.

Change-Id: Ia93b0190e60ab3420fe79c5446f22a1573b1ea6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155441
Tested-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-08-09 09:57:15 +02:00
Caolán McNamara
954b8253b7 ofz: Integer-overflow Tell() returns sal_uInt64 not sal_Int32
Change-Id: Ib17cc045316d468be306a678ddb9b2b4b08f6f4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155497
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-09 09:47:26 +02:00
Miklos Vajna
d3a0ff741f sw floattable: import <w:tblOverlap w:val="never"> from DOCX
The bugdoc has 2 floating tables, the second one is shifted down in
Word, so it doesn't overlap, even if the positioning attributes would
lay them out with an overlap.

The bugdoc has <w:tblOverlap w:val="never"> set for the second table, we
can import that to Writer's
SwFormatWrapInfluenceOnObjPos::mbAllowOverlap, which was originally
added for shapes.

writerfilter/ only has access to the UNO API, so do this via the
AllowOverlap text frame property.

The layout is still missing for this, but now the doc model is correct.

Change-Id: I25df9b75633c05af206b94ff0ad71bd240f393f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155499
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-08-09 09:35:00 +02:00
Miklos Vajna
84e39fb054 CppunitTest_sw_htmlexport: drop single-use DECLARE_HTMLEXPORT_ROUNDTRIP_TEST
Which means what the test actually does is now not hidden behind a
custom macro.

Change-Id: I75d2429dab899ab44f41c9930adbe66f09cacefd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155468
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-09 08:06:50 +02:00
Tomaž Vajngerl
3dcf2acadb sc: fix tiledrendering test execution order issue with comment IDs
ScPostIt::mnLastPostItId is a static variable, which is used for
generated the comment ID. In the test we depend that the ID are
consistent and start with 1, but as we have more tests that insert
comments this can be a problem.

testCommentCallback and testCommentCellCopyPaste, both add comments
and the expected execution order is testCommentCallback and then
testCommentCellCopyPaste, so the latter test resets the mnLastPostItId
variable to 1, so the IDs are consistent. In a LO 7.6 build for
Fedora, it happened that the testCommentCellCopyPaste was executed
first and testCommentCallback afterwards, but in testCommentCallback
we do not reset the mnLastPostItId and the build failed.

This change resets the mnLastPostItId also in testCommentCallback.

Change-Id: I123b2f47b0d6177b2f5bdefcf6d8e9c301a7413b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155498
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-09 07:33:26 +02:00
Michael Weghorn
d1d07992a8 tdf#156679 wina11y: Convert screen to local coords as needed
When `AccTextBase::get_offsetAtPoint` gets called with
screen coordinates, convert them to local coordinates
within the text object first, because that is what
`XAccessibleText::getIndexAtPoint` expects.

Not doing so resulted in NVDA failing to create
a TextInfo object in the mouse event handler [1]
when hovering over a Calc cell containing text,
because the method would always return an offset
of -1.

With this change in place, NVDA now announces the
text when hovering over the text and mouse tracking
is enabled in NVDA (which is the case by default).
Other than with Microsoft Excel, the text is only
announced when the mouse is actually over the text,
not over free space in the cell, which might be
because Excel uses UIA and the UIA equivalent,
`ITextProvider::RangeFromPoint` [2] shall also return
the index of the closest character when the point
itself is not over the actual bounds of any
character.

[1] a198c9b5f2/source/NVDAObjects/__init__.py (L1209)
[2] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint

Change-Id: I1e4ab2dd3dace5fea1de2eef67a91fe3c31218a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155492
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-09 06:14:52 +02:00
Michael Weghorn
39302875c2 tdf#156679 wina11y: Implement accHitTest via UNO equivalent
Instead of manually iterating over the children
and checking whether the given position is in the location
that they're in in `CMAccessible::accHitTest`, use
`XAccessibleComponent::XAccessibleComponent`, which
provides exactly the functionality that's needed.
(This is similar to what the Qt-based VCL plugins
on Linux do, s. `QtAccessibleWidget::childAt`.)

This also drops the need to limit this to objects
that have at most a certain amount of children
for performance reasons (previously 256) and thus
makes this work e.g. also to identify a Calc cell
that the mouse pointer is currently over while previously
the document was returned, as could be seen also in
NVDA's Python console:

1) start NVDA
2) hover over a Calc cell
3) press NVDA+Ctrl+Z to capture snapshot variables
4) check what NVDA identifies as the mouse object
   via the Python Console:

Before:

    >>> mouse
    <NVDAObjects.IAccessible.IAccessible object at 0x00FB9910>
    >>> mouse.name
    'Untitled 1 - LibreOfficeDev Spreadsheets'
    >>> mouse.role
    <Role.DOCUMENT: 52>

With this change in place:

    >>> mouse
    <NVDAObjects.Dynamic_SymphonyIATableCellEditableTextWithAutoSelectDetectionIAccessible object at 0x0774DD10>
    >>> mouse.name
    >>> mouse.role
    <Role.TABLECELL: 29>

The cell's text still isn't announced by NVDA even
with mouse tracking enabled, but that's another issue.

Change-Id: Ib821020cef6303ab786c4c3fc3ccd917398214f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155491
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-09 06:14:44 +02:00
Michael Weghorn
0044ec90b3 wina11y: Move these 2 checks out of try/catch
Change-Id: I4ae7527d9b5047d46aab44a1ab6fa42a99c43a14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155490
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-09 06:14:38 +02:00
Justin Luth
c3cf88f73e tdf#144512 autorecovery: only wait once for user idle
If we currently are in a user idle state, then don't delay
any recovery / autosave's until a future idle timeout.

Change-Id: Ie3953bb7456370d046b76a4cad816498dbfc85e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155462
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2023-08-09 04:10:48 +02:00
Jim Raykowski
383e68da6c tdf#125797 Sidebar: Skip over disabled tabbar tabs
This patch makes keyboard navigation of the sidebar tabbar skip over
disabled tabs. Tabs become disabled when a document is set in read-
only mode. They can also be disabled by user customization of the
tabbar.

Change-Id: Iafabfe27fbeaea60acf66527eafbb5396edaf647
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155442
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2023-08-08 21:21:03 +02:00
Christian Lohmaier
a921c4121d update credits
Change-Id: Id87aa5eb32e5f60f2c6a3148d762475fe87d78f0
2023-08-08 20:38:36 +02:00
Xisco Fauli
d27c206faa tdf#156286: sc_uicalc2: Add unittest
Change-Id: Iba1a473293f013e1d5d395ad6ee5f7e61fa759cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155446
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-08 20:21:58 +02:00
Michael Stahl
9c291ea8c6 tdf#147666 sw: layout: no IsShortCut() if fly was moved to page
The problem was that the fly's anchor frame was moved to page 2, and
then IsShortCut() returns true for the anchor frame, which means only
the anchor frame itself is formatted, but not its fly.

Thus the fly remains invalid and positioned on page 1 when its rectangle
is passed to SwViewShell::VisPortChgd(), and only later it is properly
positioned.

(regression from commit eb85de8e6b)

Change-Id: I9e0554bd0d9751b47a11a3917575d382139ee93a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155461
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-08 19:29:15 +02:00
Noel Grandin
009a24d64f simplify ODatabaseDocument inheritance
no need to use two different ImplHelpers here

Change-Id: I1c871f8e0e49ff8a0a540e8051f3a89a54130322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155457
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-08 18:32:32 +02:00
Khaled Hosny
1e13ee5273 Revert "UI Workaround for tdf#146653: change localized Source Han {Sans,Serif}
CN..."

This reverts commit 22c7ce6c8e.

Not needed any more as we now get the style from FontConfig, since:

commit 0b5e88bc88
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 3 13:44:43 2023 +0000

    tdf#114192: Speed up populating font list when FontConfig is used

Change-Id: If6a51ffe681896a7ffda1a06da02585e8141c81e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155458
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-08 18:19:21 +02:00
Christian Lohmaier
dac7be0a99 Update git submodules
* Update translations from branch 'master'
  to 9c0d5620123db0ea25d5ecddbc4136c00d9413a7
  - update translations for 7.6.0 rc3
    
    and force-fix errors using pocheck
    
    Change-Id: I39580c4b4ae6b4baffb5a959d7275c8f49751059
2023-08-08 17:47:42 +02:00
Caolán McNamara
f238f5bf1b when notes are not shown don't do expensive comment size calculation...
and positioning, etc.

Change-Id: Ice2f1a506bc6ae6d463e51e3d98e075a88c93cc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155450
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-08 17:02:12 +02:00
Caolán McNamara
dc915b2b9e ShowNotes() has to be true to enter this block
so checking for ShowNotes() again is redundant

Change-Id: I0045a352232ed4e09344b36d2774aae81f8b0d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155448
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-08 17:02:05 +02:00
Henry Castro
ef538b5441 tdf#155799: sc: qa: add unit test "testMouseMergeRef"
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I2e46a014a3a66fe41b06a07a68c75e52ae5530f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154602
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:44:47 +02:00
Henry Castro
cdca06306e tdf#155799: sc: qa: add unit test "testKeyboardMergeRef"
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I4d80ad5d9e5fe2c131f9397ec59c6c16ef92c094
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154601
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:44:39 +02:00
Henry Castro
3273d44baa tdf#155799: sc: add getter function "GetEditString"
Useful for QA test queries.
..

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: Ibd3c902405f478032447b10286a788cd0769c855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154600
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:44:31 +02:00
Henry Castro
a58b3984c1 tdf#155799: sc: fix formula reference "key up"
When the formula reference mode is active and it process
the keyboard event UP, it should decrease -1 according
the merge attribute row, col span.

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I278bcd9d52caeb09e4a47336af8c8e9b522397c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154599
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:44:24 +02:00
Henry Castro
6ca51786b9 tdf#155799: sc: abstraction "moveRefByCell"
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: Ib00e3cddcd4a5dc4ef3d74d3939cdf278f2cb44d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154598
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:44:15 +02:00
Henry Castro
0ccb2ace28 tdf#155799: sc: fix "UpdateRef"" to update extended merged cells
Extend the merged cell if the current has the attribute "Merged".

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: Ia2d5983d89b8661abb683d10d4de8bd0c5adea7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153657
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-08 16:43:55 +02:00
Michael Weghorn
f3754e5dbb a11y: Drop extra "no" in XAccessibleComponent doc
Change-Id: I32870920d3eacf8c557870abf4a243bb1ba9f584
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155454
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-08 16:36:16 +02:00
Noel Grandin
dddbb8a219 loplugin:unnecessarygetstr fix false +
encountering when we need to pass a std::string to an OString

Change-Id: I91d2aa1f20e7c2407c708c9ce4ae82fb52934c85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-08 15:31:57 +02:00
Michael Stahl
a9b19f78f3 tdf#156551 tdf#150606 sw: layout: only invalidate SwTabFrame if it...
... wants to move back.

In this document, the table 1709 splits across 3 columns of the section
1702 with 1 row each, and when its follows are invalidated in
CalcContent(), the later SwTabFrame::MakeAll() of the 1st follow joins
the 2nd follow and invalidates the size of the section frame, causing a
loop.

So only invalidate if that actually looks necessary.

(regression from commit 59987d3c77)

Change-Id: I360c8f697a7666a19a08d8ebcabbcfa3a7cdf844
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155452
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-08 15:12:14 +02:00
Michael Stahl
8b53c28c8a sw: tweak some comments
Change-Id: I0bb2949188378b8f1089210ad417bcb1335fad4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155451
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-08 14:44:12 +02:00
Arnaud Versini
4d54aeb67a avmedia : use std::recursive_mutex instead of osl::Mutex.
Mostly reverts 621143588b but using recursive_mutex instead.

Change-Id: I4b23410720834e19c5dd28c43bc84ed1b3e08072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153236
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2023-08-08 14:35:37 +02:00
Caolán McNamara
4582cea56e crashtesting: null-deref on kde114933-2.svg
Change-Id: If344bd676eb0eefd2d1bb4728bd0ca1e602c076e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155432
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-08 11:50:58 +02:00
Miklos Vajna
196c689b94 sw: document SwFormatFootnote/EndAtTextEnd
In this case footnote really means footnote, as there is a separate
class for endnotes.

Change-Id: Ic701e33b45d22ac42a9518a7d44b2e8a43fac4a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155431
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-08 10:35:33 +02:00
Miklos Vajna
0d571ff807 tdf#156589 sw floattable: fix follow fly moving inside a table on the next page
Opening the bugdoc and inserting a page break at the document start
resulted in a crash.

The direct problem was a nullptr deref in Notify_Background(), because
pCnt reported true for IsInTab(), but then FindTabFrame() didn't find
anything. The deeper problem was that SwFrame::GetNextFlyLeaf() had a
case where it created a follow text frame for the anchor of a floating
table, but that follow text frame went inside a table on the start of
the next page, not to the start of the page.

Fix the problem by continuing to use GetNextLayoutLeaf() (which knows
how to traverse the layout tree from a fly frame to its anchor and then
to a next page), but once we moved to a body on a next page and we would
insert inside an inline table, insert before the table instead.

Need to make sure the target is in a body frame, because a next layout
leaf in a footer's table is not OK.

Change-Id: I3ff6a0bbc2cac5f1bc2803a52a632c13053d4daa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155444
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-08-08 09:42:34 +02:00
Stephan Bergmann
9fabf47aba loplugin:redundantfcast
Change-Id: I6b19cbd146de479754b9e8833076ed7f077c87f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155443
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-08 09:07:28 +02:00
Michael Weghorn
37b72ba454 wina11y: Drop AccObjectManagerAgent indirection
`AccObjectManagerAgent` was holding an
`AccObjectWinManager` object and forwarding
everything to that one and the event listeners
were holding a pointer to the `AccObjectManagerAgent`
object.

Drop this `AccObjectManagerAgent` indirection
and let all of the classes that were interacting
with the `AccObjectManagerAgent` directly interact
with the `AccObjectWinManager` instead.

The idea of having the agent seems to have been
to have an abstraction layer and implement
different accessible object managers for all
platforms, but the agent already has quite some
Windows-/IAccessible-specific code/interface and by now, the
Linux VCL plugins and macOS have their own
a11y bridges, so the TODO do implement this here
for Linux as well seems outdated to me.

Even if implementing this for Linux and/or macOS
in a similar way, I don't see the need for the
agent layer, but one way might be to
just have an abstract base class
(e.g. `AccObjectManager`) that `AccObjectWinManager`
and implementations for other platforms derive from,
and have the SalInstance return the platform-specific
implementation that the `AccTopWindowListener` would
then retrieve and pass on.

Given that `AccObjectManagerAgent` was forwarding
all calls to `AccObjectWinManager` and the methods
and params are mostly the same by now (s.a. the
preparatory commits), this change is mostly
straightforward.

A few notes:

* `AccObjectManagerAgent::InsertAccObj` had a default
  nullptr value for the HWND that
  `AccObjectWinManager:InsertAccObj` didn't have yet,
  so add that.

* `AccObjectManagerAgent::GetIAccessibleFromResID` had
  an out param instead of a return value; call sites
  were adapted to fit
  `AccObjectWinManager:GetIAccessibleFromResID`.

* The `UpdateValue` and `UpdateAccName` methods
  taking 2 params are called `SetValue` and
  `SetAccName` in `AccObjectWinManager` instead,
  so adapt call sites accordingly.

* prewin.h and postwin.h includes had to be added
  around the windows.h include in AccObjectWinManager.hxx
  (build would otherwise fail)

* A few `AccObjectWinManager` methods had to be made
  virtual to make linking work.

Change-Id: I88741bf416d4db25d78e973c0db060a828f27926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155440
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-08 08:18:28 +02:00
Michael Weghorn
df73c73b3f wina11y: Drop unused include
Change-Id: I71659b8aa3ba0f0097aa4200ec159272c5c75b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155439
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-08 08:18:20 +02:00