summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-03-01ofz: glyph data must be at least 10 bytes long to be usefulCaolán McNamara
Change-Id: I312c33c598013feced15c6f2dbcc66e493b703e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130752 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01ofz: measure legal range from glyph offset, not table startCaolán McNamara
Change-Id: I04c1036e004be678b70a7df197141970aa3c8b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130750 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01ofz: measure maximum possible contoursCaolán McNamara
Change-Id: Ie039abd835fef06514edde12b99e17360f5481a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01ofz: verify table offsetsCaolán McNamara
Change-Id: I49fa886508b3bf553d4f638bfe53c37fa3e2f338 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130730 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01Always join thread before destroying itStephan Bergmann
m_aDestThread had been added with 7d6c646ec244f9ea1db9b5bd160ecfc43ac27f13 "INTEGRATION: CWS vcl24", apparently for "#i28763# workaround possibly hanging CUPS calls" to address <https://bz.apache.org/ooo/show_bug.cgi?id=28763> "Loading document hangs if CUPS printer doesn't deliver PPD" and its duplicate <https://bz.apache.org/ooo/show_bug.cgi?id=30513> "OO.o hangs if cupsd hangs". However, PythonTest_sc_python now occasionally failed for me with a SIGSEGV in thread #1 of python.bin at > Thread 2 (Thread 0x7fc8df392fc0 (LWP 2268774)): > #0 0x00007fc8df42ee28 in _int_free () at /lib64/libc.so.6 > #1 0x00007fc8df431c05 in free () at /lib64/libc.so.6 > #2 0x00007fc8df7e4fe9 in _PyMem_RawFree (ctx=0x0, ptr=0xff64c0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:127 > #3 0x00007fc8df7e5af7 in _PyMem_DebugRawFree (ctx=0x7fc8dfb36d88 <_PyMem_Debug>, p=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2187 > #4 0x00007fc8df7e5ff0 in PyMem_RawFree (ptr=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:595 > #5 0x00007fc8df7e5301 in _PyObject_Free (ctx=0x0, p=0xff64d0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:1898 > #6 0x00007fc8df7e5af7 in _PyMem_DebugRawFree (ctx=0x7fc8dfb36de8 <_PyMem_Debug+96>, p=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2187 > #7 0x00007fc8df7e5bb2 in _PyMem_DebugFree (ctx=0x7fc8dfb36de8 <_PyMem_Debug+96>, ptr=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:2318 > #8 0x00007fc8df7e64c0 in PyObject_Free (ptr=0xff64e0) at workdir/UnpackedTarball/python3/Objects/obmalloc.c:709 > #9 0x00007fc8df853d8d in unicode_dealloc (unicode=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Objects/unicodeobject.c:1879 > #10 0x00007fc8df7e47b6 in _Py_Dealloc (op=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Objects/object.c:2215 > #11 0x00007fc8df81aeff in _Py_DECREF (filename=0x7fc8dfa46c76 "Objects/unicodeobject.c", lineno=15296, op=<unknown at remote 0xff64e0>) at workdir/UnpackedTarball/python3/Include/object.h:478 > #12 0x00007fc8df81adc6 in PyUnicode_InternInPlace (p=0x7ffdf1d0b048) at workdir/UnpackedTarball/python3/Objects/unicodeobject.c:15296 > #13 0x00007fc8df7c7791 in PyDict_SetItemString (v={'__name__': 'sys', '__doc__': "This module provides access to some objects used or maintained by the\ninterpreter and to functions that interact strongly with the interpreter.\n\nDynamic objects:\n\nargv -- command line arguments; argv[0] is the script pathname if known\npath -- module search path; path[0] is the script directory, else ''\nmodules -- dictionary of loaded modules\n\ndisplayhook -- called to show results in an interactive session\nexcepthook -- called to handle any uncaught exception other than SystemExit\n To customize printing in an interactive session or to install a custom\n top-level exception handler, assign other functions to replace these.\n\nstdin -- standard input file object; used by input()\nstdout -- standard output file object; used by print()\nstderr -- standard error object; used for error messages\n By assigning other file objects (or objects that behave like files)\n to these, it is possible to redirect all of the interpreter's I/O.\n\nlast_type -- type of last uncaught e...(truncated), key=0x7fc8dfa71535 "stdin", item=<_io.TextIOWrapper at remote 0x1079630>) at workdir/UnpackedTarball/python3/Objects/dictobject.c:3416 > #14 0x00007fc8df92af89 in PyImport_Cleanup () at workdir/UnpackedTarball/python3/Python/import.c:447 > #15 0x00007fc8df94af6d in Py_FinalizeEx () at workdir/UnpackedTarball/python3/Python/pylifecycle.c:1229 > #16 0x00007fc8df981f2d in Py_RunMain () at workdir/UnpackedTarball/python3/Modules/main.c:691 > #17 0x00007fc8df9822fd in pymain_main (args=0x7ffdf1d0b1f0) at workdir/UnpackedTarball/python3/Modules/main.c:719 > #18 0x00007fc8df982347 in Py_BytesMain (argc=4, argv=0x7ffdf1d0b378) at workdir/UnpackedTarball/python3/Modules/main.c:743 > #19 0x0000000000401152 in main (argc=4, argv=0x7ffdf1d0b378) at workdir/UnpackedTarball/python3/Programs/python.c:16 > #20 0x00007fc8df3c1560 in __libc_start_call_main () at /lib64/libc.so.6 > #21 0x00007fc8df3c160c in __libc_start_main_impl () at /lib64/libc.so.6 > #22 0x0000000000401065 in _start () > > Thread 1 (Thread 0x7fc8be2dc640 (LWP 2269049)): > #0 0x00007fc8df424e24 in pthread_mutex_lock@@GLIBC_2.2.5 () at /lib64/libc.so.6 > #1 0x00007fc8d19a8e57 in osl_acquireMutex(oslMutex) (pMutex=0xcdcdcdcdcdcdcdcd) at sal/osl/unx/mutex.cxx:100 > #2 0x00007fc8ce0870b8 in osl::Mutex::acquire() (this=0x2b9f120) at include/osl/mutex.hxx:61 > #3 0x00007fc8ce18a2a3 in osl::Guard<osl::Mutex>::Guard(osl::Mutex&) (this=0x7fc8be2dbd88, t=...) at include/osl/mutex.hxx:142 > #4 0x00007fc8cec6dbb6 in psp::CUPSManager::runDests() (this=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:246 > #5 0x00007fc8cec6d965 in psp::CUPSManager::runDestThread(void*) (pThis=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:223 > #6 0x00007fc8cec6d7f1 in run_dest_thread_stub(void*) (pThis=0x2b9ef40) at vcl/unx/generic/printer/cupsmgr.cxx:193 > #7 0x00007fc8d19c9f2d in osl_thread_start_Impl(void*) (pData=0x30a9aa0) at sal/osl/unx/thread.cxx:264 > #8 0x00007fc8df421b1a in start_thread () at /lib64/libc.so.6 > #9 0x00007fc8df4a6650 in clone3 () at /lib64/libc.so.6 Hoping that any blocking (if that is even still an issue today) is not indefinite, turn this one osl_terminateThread into osl_joinWithThread as already used in all the other places (CUPSManager::initialize, CUPSManager::checkPrintersChanged). (Also note that osl_terminateThread was effectively a no-op here, as the relevant thread never calls osl_scheduleThread.) Change-Id: Ic9c6d6dba1c42f802e09e95feaa7e4d093b5b2cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130732 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-28Fix the tests failing when invalid certificate is in cert storeMike Kaganski
Change-Id: I72055c814a11a76c4934610bcad9c24aae21164e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130690 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28ofz#45117 Integer-overflowCaolán McNamara
Change-Id: I1827c1bf3e0153d071b354f9b958d5f84bb2d8a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130710 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-28Related: tdf#147667 don't toggle radiobutton on mnemonic if it's not uniqueCaolán McNamara
which we already do with checkbuttons, and is what gtk also does when this arises Change-Id: I1b5a4c98bd5062f3a340a53a5d6d977a4af3e384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-28cid#1473807 Untrusted value as argumentCaolán McNamara
rearrange to make it more obvious to coverity that the value of ttf->glyphOffset(glyphID + 1) is the same as nNextOffset and rename the initial use of length to glyflength to make that clearer to me Change-Id: I0e5c53d9929e1e41d500b7c0833b827808b610f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130695 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-27ofz#45082 Out-of-memoryCaolán McNamara
Change-Id: I274a6beeec0013f5b974017500fe31bcecabfa86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130623 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-27ofz#45081 check font lengthCaolán McNamara
Change-Id: Ib8cea70652ae90403db3546c07d24a517b1ec93e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-27ofz#45073 initialize names to NULL in case of 0 glyphsCaolán McNamara
Change-Id: Ie410d2a6f3d2fcda19b1925675bd7515673b07a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130614 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-27ofz#45073 don't dereference null pointer on bogus fontCaolán McNamara
Change-Id: I28616696833b87c300d2ee7061a15921042934b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130613 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26cid#708598 Uninitialized scalar fieldCaolán McNamara
Change-Id: I35ee291afe6af5a20e7fca3e03af9cbc0d1d6b32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26cid#1500406 Uninitialized scalar fieldCaolán McNamara
Change-Id: I1e2de80f8943d2bfe288b8ddcabd376561269d24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26cid#1500651 Uninitialized scalar fieldCaolán McNamara
Change-Id: If22e0931c13c6945640264c55edb1af52b2c4187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130594 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26cid#1500670 Uninitialized scalar variableCaolán McNamara
Change-Id: Ib4b873194c6db55212a5b786322b2a6d45277369 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-25do more work in sftfuzzerCaolán McNamara
Change-Id: I8a0ae472988f9166dc35eea561a9d5d7084563e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-25lastPoint might be 0xFFFFCaolán McNamara
LIBREOFFICE-KYYAZMB9 Change-Id: Ic0d95bd39a01dc1e5e0fec83dcc2c40b3f23b747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130534 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-24cid#1500677 Dereference after null checkCaolán McNamara
Change-Id: Ie6eacd21943939e586cdc6712757f34825f17913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130486 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23qt a11y: Handle HYPERTEXT_CHANGED eventMichael Weghorn
Change-Id: Ib4e6f06a5cdac1ac47eb3d273ca103fb5081550e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130361 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-23qt a11y: Handle VALUE_CHANGED eventMichael Weghorn
Change-Id: I34d813ced29a591b0a6652eeb1271a978980bba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130359 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-23qt a11y: Better handle TEXT_CHANGED eventMichael Weghorn
Trigger the corresponding Qt accessibility events for deleted and inserted text rather than sending a QAccessible::TextColumnChanged event (which looks like a rather arbitrary choice...). Qt also has a 'QAccessibleTextUpdateEvent' class that could be used to send a combined event, but since we get the relevant data separately in the LO event, using the latter wouldn't make things easier. And at least for the AT-SPI case on Linux, Qt sends separate AT-SPI events via D-Bus anyway. [1] Unfortunately, qt5/qt6 VCL a11y is not yet functional enough to e.g. test that the correct AT-SPI events are actually received when using the the script mentioned in Change-Id: Ibcae27ecfccf41a909e06d01ce681e4b7b97eb25 (gtk3 a11y: Migrate from deprecated "text-changed" ATK signal). [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp#n964 Change-Id: Ia9282382b6d5fd6bffd536dcda2989a6da901e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130356 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-23gtk3 a11y: Migrate from deprecated "text-changed" ATK signalMichael Weghorn
The "text-changed" ATK signal (which has a detail of "insert" or "delete" to indicate what type of change happened) is deprecated since ATK 2.9.4 and "text-insert" or "text-remove" should be used instead [1], so do this. Those have the inserted/removed text as a third argument, so this also obsoletes the workaround to remember the deleted text under the "ooo::text_changed::delete" key for the ATK object in the "text-changed:delete" case. (See inline comments dropped in this commit for more details on how that was used, by now "appropriate API exists in atk to pass the string value directly".) Note that this only changes the signal on the ATK layer, the corresponding signal on the (underlying) AT-SPI layer is still "object::text-changed::inserted" or "object::text-changed::deleted", but other than the ATK signal of the same name, this event already has the inserted/deleted text as extra data. [2] (The conversion from the ATK signal to the AT-SPI one happens in at-spi2-atk. [3]). I used this script to check the emitted AT-SPI events: #!/usr/bin/python3 import pyatspi def listener(e): try: if e.host_application.name != 'soffice': return if e.source.role != pyatspi.role.ROLE_PARAGRAPH: return except: return print(e) pyatspi.Registry.registerEventListener(listener, "object:text-changed") pyatspi.Registry.start() Pasting the Chinese sample text from tdf#147285 into an empty Writer document, removing the third character and typing "a" instead resulted in the expected output: > object:text-changed:insert(0, 12, 维基百科,自由的百科全书) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] > object:text-changed:delete(2, 1, 百) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] > object:text-changed:insert(2, 1, a) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] Given this test worked, drop the old > // TESTME: and remove this comment: comment as well, and also drop the > // TODO: when GNOME starts to send "update" kind of events, change > // we need to re-think this implementation as well comment. From what I can see this is still the way to handle events using ATK (i.e. for Gtk 3 at least, Gtk 4 has a new a11y implementation [4], but that will have to be looked at separately anyway). [1] https://docs.gtk.org/atk/signal.Text.text-changed.html [2] https://accessibility.linuxfoundation.org/a11yspecs/atspi/adoc/atspi-events.html [3] https://gitlab.gnome.org/GNOME/at-spi2-atk/-/blob/0af3f73b/atk-adaptor/event.c#L962 [4] https://blog.gtk.org/2020/10/21/accessibility-in-gtk-4/ Change-Id: Ibcae27ecfccf41a909e06d01ce681e4b7b97eb25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130352 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-23gtk3 a11y: Replace deprecated atk_component_get_position in atktextMichael Weghorn
Change-Id: I06689dd0ff2f47c06879bdc3c61ce5b5db90a120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130334 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-23gtk3 a11y: Replace deprecated atk_component_get_position in atkimageMichael Weghorn
'atk_component_get_position' is deprecated since ATK 2.12 and 'atk_component_get_extents' should be used instead, which also returns the width and the height (that we don't need here). [1] https://docs.gtk.org/atk/method.Component.get_position.html Change-Id: I8c49cc6942406051bca1fcdfa4ca0bfc8d326911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130333 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-22gtk3 a11y: Make a11y role mapping more explicitMichael Weghorn
Use switch-case instead of an array that uses the numerical value of the accessibility::AccessibleRole as an index. Change-Id: Id7fbc31c058d0db716d2b60a4a7eb7e7e954af95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130330 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-22gtk3 a11y: Just use ATK constants for rolesMichael Weghorn
The ATK role used here that was added to ATK latest is ATK_ROLE_FOOTNOTE, which was added in ATK 2.26. With a minimum ATK version of ATK 2.28.1 (s.a. Change-Id: Id7084366d2359deb60948b8969c1d3dcc68ddb47 "gtk3 a11y: Require atk >= 2.28.1, drop code for < 2.15.2"), all constants can simply be used as is, so drop the special handling that was there for older ATK versions which involved calling 'atk_role_register' that was deprecated in ATK 2.12 [1]: > Deprecated since: > Since 2.12. If your application/toolkit doesn’t find a suitable > role for a specific object defined at AtkRole, please submit a > bug in order to add a new role to the specification. [1] https://docs.gtk.org/atk/type_func.Role.register.html Change-Id: I93579e84576feb1bcae8cecf2dc8b264e8be3153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130329 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-22gtk3 a11y: Require atk >= 2.28.1, drop code for < 2.15.2Michael Weghorn
README.md lists RHEL 7 or CentOS 7 as runtime baseline, which has ATK 2.28.1 [1]. Therefore, check for that version in configure.ac and drop some code for versions < 2.15.2. Requiring 2.28.1 as minimum ATK version will allow for further cleanup in follow-up commits. [1] https://centos.pkgs.org/7/centos-x86_64/atk-2.28.1-2.el7.x86_64.rpm.html Change-Id: Id7084366d2359deb60948b8969c1d3dcc68ddb47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130328 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-21tdf#147164: vcl_pdfexport: Add unittestXisco Fauli
Change-Id: I254e9d7fa3795ee56080b9f065ab5112677fb7d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130244 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-21Fix Bitmap::RotateSzymon Kłos
Bug introduced in: commit 74c46b12340f1afb1752f5df0bab91caca3ef63f speed up bitmap rotation it was showing some artifacts in LOK when using previews in rotation -> sin and cos values were used incorrectly Change-Id: Id85c54d0aa4488f19e7b5db2e242fdb446626699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129528 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130233 Tested-by: Jenkins
2022-02-21Use JSDialogBuilder for "Find and Replace" dialog.Gökay ŞATIR
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com> Change-Id: I31307601f067c9b303854899258139678ddbba57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124586 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130231 Tested-by: Jenkins
2022-02-20WASM depend on Emscripten 3.1.3 for native EHJan-Marek Glogowski
This reverts the special SjLj handling introduced in commit ae22f7d06246ee21f9c8e9f35f4477e88843c58b ("WASM add option to build with native exceptions"). This is supposed to work now; at least it compiles. Change-Id: I5ebceea9c7fe3c982d7c9a8818fd79f2018f03cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130219 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-02-19uilogger: make vertical tab handling more robustIlmari Lauhakangas
For example hyperlink dialog does not have numeric ids for tabs. Now the rule matches both integers and "common identifiers" as per https://textx.github.io/textX/stable/grammar/#textx-base-types Parent argument was removed as it does not seem to be used and it was empty in the case of the hyperlink dialog, causing the DSL parser to fail. More work is needed as self.xUITest.getTopFocusWindow() in a hyperlink dialog opening test does not contain the child "tabcontrol" and thus it errors out. Change-Id: I1637f7300884881ee4d869e8f04700e56935f2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130111 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-02-18qt a11y: Map CARET_CHANGED event to Qt equivalentMichael Weghorn
The previous handling of mapping that to QAccessible::TableSummaryChanged looks rather arbitrary. Change-Id: I066cee4bd90a49a47dd29252c11f8f74edccb637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130141 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-02-18lok: reset and cancel properly Drag & Drop actionSzymon Kłos
used patch from Henry as a template: https://gerrit.libreoffice.org/c/core/+/118844/17 but without custom actions invocation Change-Id: I8bce66deffee0de16f3c24f009cfee077eb26e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123243 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129469 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-18Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: Ieddb3d76a960d4b87cd2a1e89bce3fcbe0fce7e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130113 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-16Add sanity check to avoid potential crash in the Collabora Online serverTor Lillqvist
Make sure some coordinates don't become huge negative numbers. This doesn't fix the unknown root cause of course. There already was such a sanity check here in this branch, but for Android only. I now made it cross-platform. Let's use the same Change-Id as in the corresponding commit in the co-2021 branch. Change-Id: I28e343271b3f80ac203b52db1be58d2add89eecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128932 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130051 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-02-15tdf#145759 Use symbolic constants instead of magic numerical constantsKunal Pawar
1.4142... -> M_SQRT2 0.4142... -> M_SQRT2 - 1 3.1415... -> M_PI 2.7182... -> M_E Change-Id: If5b19aa38d9902b1a4b717f89f18bdf2f73a47cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129745 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2022-02-15lok: fix sending mouse pointerHenry Castro
The ScGridWindow is a document window, but the Parent is not the notifier, fix it to send mouse pointer when action is drag & drop. Change-Id: I5071dce2566331ce0268a96e023ffd61a1f09e56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118870 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118139 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-15lok: sc: introduce LocalStartDrag methodHenry Castro
Update the mouse mode to start drag, otherwise it will conflict with normal cell selection. Change-Id: I6d4939b704114e7de1c9c051459fd02100a7536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118874 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118203 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-15tdf#145759 Using M_PI from cmath instead of magic constants.pragat-pandya
Replace the instances of Pi's value as magic number by M_PI Use M_PI_2 and 2_M_PI instead of calculating these values in code. Use basegfx functions to convert angle units. Change-Id: I6cca7cc93704a70ccf3a0571a56a789bc9df51ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129479 Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com> Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
2022-02-15loplugin:fakeboolStephan Bergmann
("use 'bool' instead of 'gboolean' (aka 'int')") Change-Id: I9a2e830ecf22f65a8313985a07c98d4e92ea5688 Change-Id: I2cf51ce0ad6107339c8ec18592c952c829a7af42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129951 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-15-Werror,-Wunused-private-fieldStephan Bergmann
(all its uses are wrapped in #if 0) Change-Id: I16ad0406327a9ced791bbd1baae40d66a2e5b3ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-14tdf#147027: vcl_pdfexport: Add unittestXisco Fauli
This is the only way I could find to test this issue Change-Id: Ib47355562abd69f9d15184e1f044e21da3a87fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129923 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-11lok: add drag & drop functionalityHenry Castro
In the desktop case, the drag over and drag drop events are handled external like GTK framework. In tiled rendering case, we do not have it, so handle the drag and drop events in the cloned ImplLOKHandleMouseEvent function. Change-Id: Ib41232b3b9d5d6d859b2c965311b87af5d193ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118869 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117896 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-11lok: fix the "mbStartDragCalled" statusHenry Castro
The drag starts it is only called when mouse down + mouse move. Change-Id: Ifadfd904c2be28bd123c17a47a82f49dd6d5a04a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118867 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117895 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-11lok: add private member transfer data to GenericDragSourceHenry Castro
In tiled rendering case, the class GenericDragSource is created by default, but it does not hold the transfer data and it cancels the drag & drop. Change-Id: Ib96f426a42e1fdae823e2412dc5280d70b59c44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118866 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117894 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-10lok: add generic class DragContext, DropContextHenry Castro
In tiled rendering case, there is no exists a generic dummy to fire drag over and drag drop events. Change-Id: I1d334df8316a09950c11bc365f12f28f0352dfc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118860 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117893 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-10lok: introduce local mouse trackingHenry Castro
Add the term local mouse tracking per frame window (per user) instead of global mouse tracking in the desktop case. Change-Id: I3f8c55fc770b4ac7dea167385586d8639ac4d93b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118856 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117777 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>