Age | Commit message (Collapse) | Author |
|
The suggested canvas size need to be passed to createSlideRenderer.
masterPageObjectsVisible -> masterPageObjectsVisibility as on client.
Last json message should be reset on each call to renderNextLayer.
In order to avoid to send empty layer check if the json message has
been set.
After rendering the background layer we need to return or the layer
is never received.
Change-Id: I9a83895d4f3895f3363c1b6a86fac9bd22c9fe87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173728
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I22ce959f1fe74b8eb1fa0d0fbffe8b257e7f3110
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173731
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
|
|
This reverts
commit eb13c889c760cfe153d5b41188e218bdda797d52.
"Speed up scrolling through large document with lots of patterns"
Which seems (according to buovjaga testing) to be a pessimisation now.
I can't reproduce this either way, so lets just revert it for now.
Change-Id: I6b7f95173eb875d215f1192b3a7ca44014c50886
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173641
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I52d13a7e4806d8fc34c4ff6f4cc5ab1e785a8b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173729
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
there was a system Java-WebSocket in Fedora 35, f.e. but unaware
if this is actively packaged standalone in contemporary distros,
but useful for the coverity build case.
Change-Id: Id6393dbfb1c449b75391752a8bb5e5ea4481a084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173725
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I7f67264abf3ab6e52fe74c3e0bbac86a363b45c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173724
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ideb3c4523dc6210f56c978fdab52690a54b88d1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173723
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I3e162e3b58f750b92c5939f3866fdcb8a148de99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173722
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ief73e86c6fa4459e25d98befa0dc383326f22a79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173721
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I27a8247f0674c90ea16f896c1aba465aeeaa9992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173720
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ie7a2e95cb46c0472692e91c57f0bbf4714a4a1e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173719
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I9bd34262523a7eaa430824749adee6f3e326c59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173718
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ifb9bedaaaf152c6c43454811b63bdf55a157cf2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173717
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Don't silently convert missing parameters including their error code to the request target typen when the target type can't handle the conversion.
Change-Id: I2300aa594ae3cc1045a6397c1195718b6662aa61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172593
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
|
|
...since 411e8c24a289649797c679afc084113f7f61667a "vscode: make it work better
when srcdir=buildir and add mac lldb config" removed its use in
.vscode/vs-code-template.code-workspace.in
Change-Id: I7454f5d4443eedbb8ca143eb3e140cd0a0d708f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173694
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Commit 8872f7121b4ae4dd0b51820366d3510a88f7aac2 (crashtesting: crash
on exporting kde274105-6.docx to .rtf, 2024-03-27) made sure to provide
a graphic in all cases, to avoid crashes revealed by crashtesting.
In commit f317746f55044927a180657f81e21d662102b0c5, I removed that.
This reinstates the safety measure for cases when there's no graphic
yet.
Change-Id: Ida3eecd5c7ccff087c2ca8b6076ca01b8a145adc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173697
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ia28cffdeae8ced2e19dcf695ee5c3417d4f97d64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
* Update helpcontent2 from branch 'master'
to 8487420fa9d824abcd4482cf988ccc0ed945aca6
- name= attribute is not supported in HTML5 for <a>
Change-Id: Ic2fd82900811f86c9e06f46afa547466e2831538
ref: https://www.w3schools.com/tags/tag_a.asp
ref: https://www.w3schools.com/jsref/dom_obj_anchor.asp
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/173678
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
|
|
This change removes a problematic workaround from the doc importer,
which was clearing the AddExtLeading compatibility flag for any doc file
containing a document grid.
The original intention for this workaround was to fix tdf#129808. At
some point, the workaround was disabled by inverting the value assigned
to the compatibility flag. Unfortunately, either way causes unfortunate
side effects.
Since tdf#129808 is now fixed elsewhere, this workaround no longer
serves any apparent purpose.
Change-Id: Ice46f1473916b072e183010f8888f6be62761bb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173695
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
|
|
The order of parameters for vcl::bitmap::premultiply and
vcl::bitmap::unpremultiply was wrong because when doing
that I just used the same order that the indexing that was
to be replaced used it. Corrected that.
Change-Id: I59473acca8afdc58105b3381d1fdcedd6c0fd83b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173683
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
This was already fixed in CWS sw301bf03 with commit
5559afee02fc2be18cded35a17a03aa8191b08f5 but then broken again, perhaps
by commit f2e3655255db4032738849cd4b77ce67a6e2c984 "Avoid
-fsanitize=signed-integer-overflow", which changed a magic constant,
effectively disabling the fix.
The problem (in a different document than attached at the bug) is that
the first text frame 128 in a section frame 258 gets its height set to
WIDOW_MAGIC in CalcPreps(), which grows the section frame to the maximum
allowed by its upper, and then when the real size of the text frame is
set it shrinks the section frame to be far too small, so the last text
frames and the whole table remain formatted at a position on the page
but are not painted because the paint is cut off at the (wrong) bottom
of the section frame.
(On master, the problem with the internal document cannot be reproduced
due to some other change which causes the text frame at the cut-off
position to have mbFramePrintAreaValid=false which causes it to MoveFwd
and that calls SwSectionFrame::SimpleFormat() which fixes the height,
but that all looks accidental.)
Change-Id: If13d993a0cab5701f45223a70b2c5c8b0690ebeb
(cherry picked from commit d77d3af9e4983edd7cd1cac5faecd8253db1a6ee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173672
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
|
|
This change adds a Writer compatibility flag, MS_WORD_COMP_GRID_METRICS.
When set, Writer will always use the font's external leading when
calculating line height for text grid, even if ADD_EXT_LEADING is unset.
This change also automatically sets the MS_WORD_COMP_GRID_METRICS
compatibility flag when importing DOC and DOCX files.
Change-Id: I63a94d7d20354163f1f97745a38e286686d6a4a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173693
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
|
|
I want to improve extractCertificate() so it can work on a certificate
chain, but that's easier when this code is not directly in desktop/, but
at some lower level.
This allows covering the code with tests from CppunitTest_sfx2_view in a
follow-up change.
If this code will be needed by some non-LOK area as well, then it can be
moved down further, but let's wait for a second area first.
Change-Id: I6291da0c3e56aed7dca1a8dc1446209044cace92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173691
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Connecting from an external Java process on Windows, and running a
code similar to this:
XComponent xComponent = xComponentLoader.loadComponentFromURL(url, "_default", FrameSearchFlag.ALL, args);
XTextEmbeddedObjectsSupplier textEmbeddedObjectSupplier = cast(XTextEmbeddedObjectsSupplier.class, xComponent);
XIndexAccess embeddedObjectsAccess = cast(XIndexAccess.class, textEmbeddedObjectSupplier.getEmbeddedObjects());
XEmbeddedObjectSupplier2 embeddedObjectSupplier = cast(XEmbeddedObjectSupplier2.class, embeddedObjectsAccess.getByIndex(0));
for (int i = 0; i < 100; i++)
{
XGraphic replacementGraphic = embeddedObjectSupplier.getReplacementGraphic();
String graphicStatus = replacementGraphic == null ? "missing" : "present";
System.out.println("The replacement graphic is: " + graphicStatus);
}
(when 'url' points to a file with OLE) could produce output like this:
The replacement graphic is: present
The replacement graphic is: present
The replacement graphic is: missing
... 94 more copies of "missing"
The replacement graphic is: missing
The replacement graphic is: present
The replacement graphic is: present
i.e., the replacement graphic suddenly disappears, and then re-appears.
This happens when some idle needs to update the replacement graphic,
e.g. when generating a thumbnail. This happened because the code in
EmbeddedObjectRef::GetReplacement cleared the graphic prior to calls
to OLE object's async methods to get the graphic stream.
The code does not depend on the current content of mpImpl->oGraphic,
so this change takes care to avoid this transient "no graphic" state.
Change-Id: Ia825185a6e9b749697209443ee5db187b5ddbd16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173690
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
When pasting a title on slide with a white title on a white background,
user may think that paste failed.
This change modify font colors to let pasted text visible
Change-Id: I72c82850c4ecca47e54b5de1044b0c7806a443a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173361
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
|
|
Change-Id: Iba8f58d48cbe252b12f10ba20f9f5e2b10029c25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173658
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
which is very expensive these days
Change-Id: Iae80c9d677fd1db8606a6a3f9462fe16b110a540
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173682
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which is very expensive these days
Change-Id: Idf133fc0532f12d297c0f44a3aad48b6eaa2206a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
All the rows on the table in bugdoc require to be kept with next
(their first cells' first paragraphs have that flag). The layout
finds the table break position after row 39; but then it checks
that that row should be kept with row 38, that with row 37, and
so on. The layout loop happens because the search for the break
position can't find a row.
But cell A38 spans over four rows; in this case, Word checks if
this row can split, and splits the spanning cells, apparently as
keeping "part" of the row with next.
This change implements that algorithm.
Change-Id: I234694138ac6b660781ad773cef20151daf874eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173675
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ib5780d229041823e9aa7ba1c086655eb7c8590eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173601
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ibfc8b839d4455c21293906f7e4625a09b0d3f4f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173600
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Because we could change the split row several times after first
remaining space calculation, thus obsoleting the old value.
Change-Id: Ia8027b0df2b04089c31b7031ddb05bd33e6ade98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173674
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Instead of adding heights in a loop, just get the distance between
the top of the first row and the bottom of the last.
Change-Id: I2082026c1c525f8230393ee8b59d1019f321fae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173596
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The value passed to lcl_RecalcSplitLine could be too large; then
the call to rTab.Shrink succeeds, and the height of rTab changes
as requested; but then the values of nDistanceToUpperPrtBottom
and nDistanceToFootnoteBodyPrtBottom are negative, resulting in
failed split and layout loop.
Change-Id: I797baee701b6a07e0c9310ea8cf902795c053642
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173595
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I9cd64f5fb20ccea84446909414624314b7eb956b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173684
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I9dc7bb716b29b0e9980734f254e8e385a571a560
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173679
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Fixed problems with cursor/pilcrow positions in a shrunk last
line of a paragraph with a single portion:
– clicking before the last or the last but one characters of the line,
the cursor could be positioned at the end of the line, not before
the last or the last but one characters (especially a line with
more spaces and bigger space shrinking).
– when the text cursor was there at the end, the visible cursor position
was inside the line instead of the end of the line;
– pilcrow symbol was inside the line instead of the end of the line.
Follow-up to commit 6b857398a59d16308d6185d01e003e401439f060
"tdf#162109 sw smart justify: fix overhanging last line"
and commit 22eac3145ca62d15b47d95f4df60ce38d4f5aa46
"tdf#162220 sw smart justify: fix shrinking for single portion lines".
Change-Id: I0057f17fe187381c4c5d78574dcd99e0dafc11b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173662
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Undefined symbols for architecture arm64:
"o3tl::strong_int<unsigned short, LanguageTypeTag>::strong_int<int>(int, std::__1::enable_if<std::is_integral<int>::value, int>::type)", referenced from:
sfx2::(anonymous namespace)::SvxInternalLink::Connect(sfx2::SvBaseLink*) in linkmgr2.o
SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o
SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o
SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o
SfxHTMLParser::GetTableDataOptionsValNum(unsigned int&, o3tl::strong_int<unsigned short, LanguageTypeTag>&, rtl::OUString const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, SvNumberFormatter&) in sfxhtml.o
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/noelgrandin/lode/dev/core/sfx2/Library_sfx.mk:20: /Users/noelgrandin/lode/dev/core/instdir/LibreOfficeDev.app/Contents/Frameworks/libsfxlo.dylib] Error 1
make[1]: Target 'build' not remade because of errors.
make: *** [Makefile:296: build] Error 2
Change-Id: Ia8c338a89156e18a1c96630ecad2bccbba7bb745
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173652
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change the variable that relates to the position of a footnote. Maintains the
unsigned from previous because the variable is a position. The value doesn't
seem to exceed the max.
- ftnfrm.cxx
+ Change return types of the function lcl_FindFootnotePos
+ Change initialized types of variables that call above function, or use its value.
Change-Id: Id44b8024eaa6e20d119f52ef03f62b30e6ae1c43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173578
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
Change-Id: I4be65927215dbf9c10ecd51baca42b59b569d75b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173677
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ib2f0d76465482663c7fd388ef065539c5ab2b330
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173673
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ie82c097a6c3241a9ed3642ba4985acc77cdd7f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173669
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I039c80f489657cc4f47727af2e95b095592d6946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173668
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I08beb9bd76065ea846171e07fbf6e427ada37360
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173667
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I1503ebd911abf6e1e2060ce6dc3f0ac05e325982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173666
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I236d016dd51f219b63a7d7fb6b0cb83a06b960c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173661
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Use `qobject_cast` instead of `dynamic_cast` to
cast to QtMimeData.
Add the `Q_OBJECT` macro to the class, as the
the qobject_cast doc [1] says:
> Warning: If T isn't declared with the Q_OBJECT macro, this function's
> return value is undefined.
Change-Id: I5de2d8dbf62ed1293f3660acae44e3b13ab5df71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173660
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Use `qobject_cast` instead of `dynamic_cast`
when casting to native Qt widgets.
It should be faster.
Quoting from the doc [1]:
> The qobject_cast() function behaves similarly to the standard C++
> dynamic_cast(), with the advantages that it doesn't require RTTI support
> and it works across dynamic library boundaries.
[1] https://doc.qt.io/qt-6/qobject.html#qobject_cast
Change-Id: I20d4cca6936eeeb6f8367f82a9d11f12ada63e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173659
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
When a popup gets hidden, destroy its associated
QWindow.
This prevents a "top-level" a11y object being reported
when a popup gets shown, then hidden again, e.g. after
expanding the Paragraph Style combobox in Writer's
Formatting toolbar, then closing it again.
Showing the popup results in a QWindow being created
that would not implicitly be destroyed when the
popup gets hidden again.
Due to popups in LO currently not using the Qt::Popup
type, but Qt::ToolTip, they are considered for top-level
a11y children of the app, see the commit message of
Change-Id: I7aff5c435dfa8b6aadcbbedb0d84db19bb86c8ab
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Sep 19 09:15:37 2024 +0200
qt a11y: Defer QWindow creation until frame gets shown
for more details.
Only delete the QWindow for non-spontaneous hide events,
as the QWidget::hideEvent doc [1] says:
> Note: A widget receives spontaneous show and hide events when its
> mapping status is changed by the window system, e.g. a spontaneous hide
> event when the user minimizes the window, and a spontaneous show event
> when the window is restored again. After receiving a spontaneous hide
> event, a widget is still considered visible in the sense of isVisible().
With this commit in place, after starting Writer, opening the
Paragraph Style combobox, then closing it again, only the
Writer window is shown as a top-level child of the app
in Accerciser when using the qt6 VCL plugin, as expected.
Showing the popup again works just fine, as a new QWindow
is implicitly created then.
[1] https://doc.qt.io/qt-6/qwidget.html#hideEvent
Change-Id: Iefa5d05ea128966c4417d53d122a6a0f1178fc00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173657
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Calling QtFrame::windowHandle makes sure that the
QWindow exists, by calling
QWidget::setAttribute(Qt::WA_NativeWindow).
QWindows that don't have the Qt::Popup or Qt::Desktop
type, are listed as accessible children of the application,
see QAccessibleApplication::child [1] in qtbase and the
`topLevelObjects()` [2] helper method it uses.
This resulted in various dummy "top-level" objects being
reported as children of the LibreOffice a11y app object,
and therefore shown in Accerciser.
For Writer, there are 2 instances for each of the popups for
the comboboxes in the formatting toolbar that get reported
as toplevels, as can seen by printing the accessible ID of
their parent objects in Accerciser (they have a parent different
from the app, since they're not actually top-levels):
Paragraph style combobox:
In [4]: acc.parent.accessibleId
Out[4]: 'applystyle'
Font name combobox:
In [5]: acc.parent.accessibleId
Out[5]: 'fontnamecombobox'
Font size comobobox:
In [6]: acc.parent.accessibleId
Out[6]: 'fontsizecombobox'
While these *are* popups, the Qt::Popup type is currently
not used for them in LO to work around another issue
with these popus on Wayland, but the Qt::Tooltip type
is used, see the QtFrame ctor and comments there.
To prevent these wrong "top-levels" from always being
part of the a11y tree due to that, defer creating the QWindow
by calling QtFrame::windowHandle to when the window
is actually needed, in QtFrame::Show.
Pass the Qt::UniqueConnection connection type param
in the call to QObject::connect [3], to avoid
duplicate connections if the frame gets hidden/shown
multiple times. (Other than the ctor, QtFrame::Show
could potentially get called multiple times.)
With this in place, Accerciser now only shows a single
top-level frame after starting LO Writer with the qt6
VCL plugin, which is the actual Writer window.
[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/qaccessibleobject.cpp?id=0681e720a9851f1873ce5a5f99b5567d2b418261#n160]
[2] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/qaccessibleobject.cpp?id=0681e720a9851f1873ce5a5f99b5567d2b418261#n122
[3] https://doc.qt.io/qt-6/qobject.html#connect
Change-Id: I7aff5c435dfa8b6aadcbbedb0d84db19bb86c8ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173656
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|