Age | Commit message (Collapse) | Author |
|
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now. Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)
Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iba42eaa820001651a596b9708504fcc796b406ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138381
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
and
cid#1509292 Use of 32-bit time_t
cid#1509217 Use of 32-bit time_t
Change-Id: Icf1b2fa43e706c6d3ff783cf9bcfb5a345b8d50b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138382
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie84f4e7288cfd6b7232352988bb2718f274d7eb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138394
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
There is already a check whether `object` is a nullptr
just a few lines above, so this check is superfluous
since
commit f29e3dbe015571d49d4262f4623a165a0cbc94a3
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Aug 16 09:39:01 2022 +0200
qt a11y: Replace dynamic_cast with static_cast
Reported by cppcheck:
> .../vcl/qt5/QtAccessibleWidget.cxx:751: Condition 'pXAccessible' is always true
Change-Id: Iab69c967d97fc01dad617a25503cc5b5e50a3b4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138366
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The `QtXAccessible` only needs to hold a reference to
the `XAccessible` in order to pass it to the
`QtAccessibleWidget` ctor in `QtAccessibleWidget::customFactory`
(which gets called via `QAccessible::queryAccessibleInterface`).
After that has happened, the `QtAccessibleWidget` holds
its own reference in its `m_xAccessible` member and is the
only class in the context of the qt a11y bridge that needs
access to the `XAccessible`, so drop the reference
in the `QtXAccessible` to avoid any references being
held even after `QtAccessibleEventListener::disposing`
has been called, s.a.
Change-Id I077dffe6ca3e887707d1f578e947ccf3c2c2a492
"qt a11y: Clear XAccessible reference when disposing" for
some more context.
Change-Id: Ief80b2939e4c509fc4bc68e67500dbad66498506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138365
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The `XEventListener::disposing` doc
(in `./udkapi/com/sun/star/lang/XEventListener.idl`) says:
> /** gets called when the broadcaster is about to be disposed.
>
> <p>All listeners and all other objects, which reference the
> broadcaster should release the reference to the source.
> No method should be invoked anymore on this object (
> including XComponent::removeEventListener() ).
> </p>
>
> <p>This method is called for every listener registration
> of derived listener interfaced, not only for registrations
> at XComponent. </p>
> */
Therefore, clear the `XAccessible` reference held in
the associated `QtAccessibleWidget`
in `QtAccessibleEventListener::disposing`.
This also implies that `QtAccessibleWidget::isValid()`
(overriding the `QAccessibleInterface` method)
will return `false` from that point on.
Change-Id: I077dffe6ca3e887707d1f578e947ccf3c2c2a492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138364
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`QtAccessibleEventListener` was holding a reference
to the `XAccessible` but not making use of it.
The `QtAccessibleWidget` class that actually
operates on the `XAccessible` is holding its own reference
in its `m_xAccessible` member, so there's no need for
the corresponding `QtAccessibleEventListener` to
hold another one.
Change-Id: I5b838e55d8285b4e52287dc8c9c70e06e45ab317
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138363
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Ib4d986bf21b3294e46e52d8b2f4428aca1683321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138357
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
With this in place, selecting an object in Accerciser's
tree view of the LO a11y hierarchy and then calling
the method to get the child index returns the actual
child index instead of just 0, e.g.:
In [24]: acc.getIndexInParent()
Out[24]: 4
Change-Id: Ia3d4811226d6ffc82b86ed5a9abf3332b8b50b0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138347
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The Qt doc on implementing accessible plugins [1]
says:
> Note that `object` will always be an instance of `classname`.
Therefore, `static_cast` can be used here to avoid the
cost of `dynamic_cast`.
[1] https://doc.qt.io/qt-6/accessible-qwidget.html#implementing-accessible-plugins
Change-Id: I57721c927808fa710b7d790c54d01bd899146a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138341
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
took oss-fuzz about a picosecond to find a crasher, lets just use
sal_uInt32 here
Change-Id: I582377bc30de1c46dce9d3cd659a80237848ed73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138325
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I426ace3f1272b2cb5f40d627c9c701b903c3e632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138272
Reviewed-by: خالد حسني <khaled@aliftype.com>
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
and similar
Change-Id: I8a989465057a5b7810f6cedf370fc1cd77f5af0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138311
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
When positioning a dialog via external UNO connection,
and no LibreOffice window is visible (only quickstarter is running),
the window was mispositioned.
The ClientToScreen call changes the requested position, so skip that
for dialogs too.
Change-Id: I7656ec66b6aeccdc1fa306f5e05cf72b3cb87214
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138135
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
|
|
Otherwise reading SVM files would lose the Kashida but not the DX
adjustments and would leave blanks in their place.
Change-Id: Id37e09fed12da5e256d65e2c45c91869364c8d06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138242
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Makes it a bit more stable across zoom levels and avoids excessive
overlaps due to calculating one copy too many because of rounding
errors.
Change-Id: I6a21a89c1dfda085b1f7fa9570c9875a0d39f671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138192
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
The font in the bug document has a very small Kashida advance width and
this gets rounded to zero at smaller zoom level. Try to round up the
value to avoid returning zero too eagerly.
Change-Id: I78c309d66a9e94812827c7c6724c67c4d09bcff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138169
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
We are asked to validate the position *after* which Kashida will be
inserted, but HarfBuzz will tell us which glyph we can insert Kashida
*before*. So align both by passing down the position before and after
and make the loop iterating over glyph items a lot simpler.
As a bonus, the new code allow Kashida insertion across layout change in
both sides, old code allowed it only at the start of the layout.
Change-Id: I9f632610b92c0f4c512e50456bf7d207175f17ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138168
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Communicate Kashida insertion positions in an explicit way.
Rest of LibreOffice communicate adjustments to character widths (e.g.
for justification or spacing) using so-called DX array. DX array is an
array of absolute character positions (e.g. DX[n] is the position after
character n from the start of the lines, and its widths is DX[n] -
DX[n-1]).
This DX array is modified also when Kashidas are inserted after a given
character for Arabic justification, by expanding its width. VCL would
use this to know where to insert the Kashidas and how many ones.
But because DX array is used for both widths adjustments and kashida
insertion, this turns out to be a source of bugs since VCL has tosecond
guess the DX array to find which is pure width adjustment and which also
involves Kashida insertion, and the heuristics it uses are fragile.
This change adds a second array of booleans that records where Kashida
is inserted and communicates it all the way from where Kashida insertion
is decoded in Writer and down to VCL layout.
This change passes the Kashida array only when it seems necessary (e.g.
during drawing but not when measuring text since the DX array is enough
in this case). Hopefully no places where Kashida insertion needs to be
passed down were missed.
A couple of glyph and layout flags that were used for old heuristics and
no longer needed and are removed.
This also fixes:
tdf#87731
tdf#106309
tdf#108604
tdf#112849
tdf#114257
tdf#127176
tdf#145647
tdf#146199
Change-Id: I4ed0850ef2fdc3e9143341afac649e7e7d463c39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I44ebfc50579cbcf6482fbb445c08b31961750467
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138254
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
detect and flag as error failure to sucessfully create a cairo surface
Change-Id: I6981ec3058e37f4f4f196f6136f1d81865623c52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138238
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Thinko from commit 0b92cf674cd44bdd2c2cdf8a5d597d4407e34002
Change-Id: I66a142441f83f8cd43f2579a85651e3364e74c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138170
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Glyphs in RTL mode are in reverse, which includes the fast that
a cluster start is last, not first. So going back requires means
going back just one glyph, not a whole cluster. I'm not sure why
I originally did it this way, tdf#148954 works fine even this way,
so presumably I got confused.
Change-Id: I6ed0caf4e64e93e0643f7b88099bc7c992ea3329
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138144
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Otherwise OutputDevice::ImplLayout() might use a temporary cache
just for the subtext while SalLayoutGlyphsCache would use cache
for the whole string, and those two might differ e.g. with an arabic
string starting with numbers when the subset is just the numbers.
Change-Id: Idea7ef277beae07e39e4a714088a7585361d13e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138143
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I64747e43f76d0f214efc4bd964795517561d9693
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138163
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I3f7418380e655b6c25e675493d859444e343d646
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138149
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9390b128006dd3cec4e0b482885dbbd5492f912f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138138
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I33867397cd5783adb90e9dc2c62b037ced131e26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138081
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ibefbd727a662292995be01d6c8c04354f10e9e2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138110
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
from the sidebar tab due to the accelerators in there
its a bogus check in gtk3 in this case of a menu attached to a MenuButton
Change-Id: Ie5216e749993f3d44bfc2e4560cd3b2f49aa8aec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138086
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
This required to move the code calling Help::ShowQuickHelp from
weld objects into SvTreeListBox::RequestHelp, and have it only
request the tooltip text from those objects.
Change-Id: I25c97360bbaac4705830a13aa06e0992b68fffff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138084
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I0b0a11fe108f63b63238e2517e9151d52673bbf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138099
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
i.e deck sidebar menubutton dropdown
Change-Id: Ib33d4ed8593c6c73b51c4de4d2da4b5036c8a723
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138097
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
`QAccessibleInterface::childAt` uses screen coordinates,
but `XAccessibleComponent::getAccessibleAtPoint` wants
local coordinates (i.e. coordinates relative to the
object's top left corner), so convert accordingly.
Change-Id: I61ab695ea6fdaf336903a0dc7d4c50c90a14e656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138096
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
In a quick test with a Writer paragraph having the text
"Abcd efgh ijkl" selected in Accerciser's treeview of the
LO a11y hierarchy, the results of running these
commands looked as expected:
In [28]: text = acc.queryText()
In [29]: text.getTextBeforeOffset(4, pyatspi.text.TEXT_BOUNDARY_CHAR)
Out[29]: ('d', 3, 4)
In [30]: text.getTextAfterOffset(4, pyatspi.text.TEXT_BOUNDARY_CHAR)
Out[30]: ('e', 5, 6)
In [31]: text.getTextBeforeOffset(4, pyatspi.text.TEXT_BOUNDARY_WORD_START)
Out[31]: ('Abcd', 0, 4)
In [32]: text.getTextAfterOffset(4, pyatspi.text.TEXT_BOUNDARY_WORD_START)
Out[32]: ('efgh', 5, 9)
Change-Id: Icc310c05634763e92c298e793d87a603b654ac4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138092
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Otherwise LO crashes when invalid offsets are passed
from AT when using the qt5/qt6/kf5 VCL plugins.
One scenario that resulted in a crash:
* start Accerciser
* start Calc
* press F2 in cell A1 to enter edit mode
* navigate to the "Cell A1" object representing the
editable cell, then to its paragraph child in
Accerciser's treeview of the LO a11y hierarchy
* in Accerciser's "Interface Viewer", type
Enter, then any character
This would crash due to a
`com::sun::star::lang::IndexOutOfBoundsException`
being thrown by one of the methods of the
XAccessibleText/XAccessibleEditableText
interfaces.
Change-Id: I1b8c6057ca1e4e4485d516418bb82cd1a6697ce1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138078
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I426c3148ee9ba92f10411ff88fc6a6fad8f0da53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138064
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I5b7a0fa060c1e0ae4aa194e0c1862f303dd8a2d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138062
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
For the next patch for tdf#149956 I need the command to be
already set when the VclEventId::ToolboxItemAdded event is emitted.
Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
|
|
Change-Id: Ib2b2650da7abc9260897f9b5aad619a0ea6ae941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138052
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I23275aa9915ea47cb91a8511b219869a4d62b96a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137352
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
GraphicFormatDetector and GraphicDescriptor have duplicate format
detection code so now GraphicDescriptor uses GraphicFormatDetector
functions instead to detect the format for GIF files
Change-Id: Ieabacb302c9c712fc6f3da85eaccc07dca035eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137934
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Make GraphicFormatDetector return GraphicFileFormat instead of a string
and various variable changes so that the two can be combined in future
patches.
Change-Id: I6e184b3ba52289db02e0d4eebeeadde0ce0433b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137627
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
The start and end offset returned by
`QAccessibleTextInterface::attributes` should indicate
the start and end of a text segment where all characters
have the same text attributes (like font size, color,...).
Calling `XAccessibleText::getTextAtIndex` with type
`accessibility::AccessibleTextType::ATTRIBUTE_RUN` gives
exactly that information, so make use of it instead
of claiming that only the character itself has those
attributes.
This is e.g. used in Accerciser's "Interface Viewer"
for the text interface, to display the indices and
highlight the text portion in which all characters
have the same attributes.
Change-Id: Iefb096f30c9df74f035d2fda86299d9a5de5d604
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138008
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
This is basically commit fe38553aef2121f358fb58e450ec69314aad851e
for the native GTK widgets, so the "Edit Text" button in
Insert->Bookmarks dialog works.
Change-Id: Ifcd115de60ecee2c4e4c19535ce55156aa84ff79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137563
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I77038cbf500976703ad41365da9a675a698863a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Qt has `QEvent::MouseButtonDblClick` as a specialized
type for "Mouse press again" [1] in addition to
just `QEvent::MouseButtonPress` for a single click.
Handle that as mouse button down event in LO as well,
to make handling of double-click work again after
commit 393c9f736b10d1ea82979e9c2c43c8f91ba5831d
Date: Tue Apr 19 16:00:31 2022 +0200
Qt use QEvent::type to handle the event correctly
[1] https://doc.qt.io/qt-6/qevent.html
Change-Id: I9964b554bf71f30861ed0868e7a8000c84de50ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138006
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just convert some loops to range based and fix strange loop logic
at 216 line.
Upd: rename *iterators* as Mike Kaganski adviced
Change-Id: Idf33b65f9c4466aa49c8f3bc13a12ad072dce7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137929
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I57f924522a6fd93950f56c44ca65aa5131fb4aa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137989
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|