summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-05-29tdf#149329 Qt change cursor via QWidgetJan-Marek Glogowski
... instead of its QWindow No idea, why my initial implementation used the QWindow. Neither do I know, why it's now somehow broken. The code is called, but the cursor doesn't change. But it seems to work via QWidget, so just do that. IMHO less QWindow is preferable generally; let Qt handle more of the low-level stuff. Change-Id: Id23fba719c9a4d7e760991c51e6021c6f89be345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135051 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins (cherry picked from commit caf862fc843c89cceae2121f743a3822e09bbd46) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135080
2022-05-28tdf#148864 Qt switch QtObjectWindow to QWidgetJan-Marek Glogowski
... and therefore rename it to QtObjectWidget Replacement of the QWidget with QWindow originally happened in commit 56b19f9a814ae5a39ed760ee542d715493cd0bf3 ("tdf#121247, tdf#121266 KDE5: Add basic support for OpenGL"), but that unfortunately has a very sparce commit message with no reason for this change. Then the code was further complicated in commit 25edbded9946801effd117b9c46de0f8b4bc5632 ("tdf#125517 Qt5 implement a minimal Qt5ObjectWindow") and a few follow up fixes to restore input and focus handling. But appearingly all this QWindow handling isn't necessary and just returning to a QWidget based class fixes the problems with the video overlay (AKA QWidget::winId()) and video playback for good. The OpenGL Impress transition (Fade) mentioned in the original tdf#121266 bug still works. This also adds the previously missing SolarMutexGuard to all the overridden QtObjectWidget functions, which call the SalObject's Callback function. I accidently triggered a DBG_TESTSOLARMUTEX crashing Impress while debugging this. Change-Id: Ia22cabfd4f3585dc7fa3f9f18a913c5bd1987dd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134864 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins (cherry picked from commit 4366e0605214260e55a937173b0c2e02225dc843) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134903 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-05-28tdf#125925 Qt migrate KF5 theme font settings codeJan-Marek Glogowski
Currently all implemented Qt platforms use freetype and fontconfig to handle the font selection, so just move the font styling code from the kf5 VCL plugin to qt. This really minimizes kf5 by just keeping the special file picker handling in that VCL plugin. Change-Id: I0bbb2496379396afc46e34fe0d026702dce1492e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134862 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins (cherry picked from commit 7bf9629d4f3e8504b5d09685d7721275b3287443) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134917
2022-05-25vcl: GCC12 says fclose() causes -Werror=use-after-free on any use of FILE*Michael Stahl
In file included from vcl/inc/unx/cpdmgr.hxx:34, from vcl/unx/generic/printer/cpdmgr.cxx:25: In member function ‘size_t psp::FPtrHash::operator()(const FILE*) const’, inlined from ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::__hash_code std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::_M_hash_code(const _Key&) const [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _ExtractKey = std::__detail::_Select1st; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; bool __cache_hash_code = true]’ at /usr/include/c++/12/bits/hashtable_policy.h:1268:18, inlined from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_M_erase(std::true_type, const key_type&) [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<_IO_FILE*>; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ at /usr/include/c++/12/bits/hashtable.h:2358:43, inlined from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::size_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::erase(const key_type&) [with _Key = _IO_FILE*; _Value = std::pair<_IO_FILE* const, rtl::OString>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<_IO_FILE*>; _Hash = psp::FPtrHash; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]’ at /usr/include/c++/12/bits/hashtable.h:971:24, inlined from ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::erase(const key_type&) [with _Key = _IO_FILE*; _Tp = rtl::OString; _Hash = psp::FPtrHash; _Pred = std::equal_to<_IO_FILE*>; _Alloc = std::allocator<std::pair<_IO_FILE* const, rtl::OString> >]’ at /usr/include/c++/12/bits/unordered_map.h:763:26, inlined from ‘virtual bool psp::CPDManager::endSpool(const rtl::OUString&, const rtl::OUString&, FILE*, const psp::JobData&, bool, const rtl::OUString&)’ at vcl/unx/generic/printer/cpdmgr.cxx:725:28: vcl/inc/unx/cupsmgr.hxx:35:43: error: pointer may be used after ‘int fclose(FILE*)’ [-Werror=use-after-free] 35 | { return reinterpret_cast<size_t>(pPtr); } | ^ vcl/unx/generic/printer/cpdmgr.cxx: In member function ‘virtual bool psp::CPDManager::endSpool(const rtl::OUString&, const rtl::OUString&, FILE*, const psp::JobData&, bool, const rtl::OUString&)’: vcl/unx/generic/printer/cpdmgr.cxx:695:15: note: call to ‘int fclose(FILE*)’ here 695 | fclose( pFile ); | ~~~~~~^~~~~~~~~ Change-Id: Ib035f2287649dcf9a2d37bda85ebcf52c6c51aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134739 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 02ebfb8ed6175934a1985786e6816ecef1bd59f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134632 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25tdf#149068 reject OpenGL versions that don't support glGenVertexArraysCaolán McNamara
use a throwaway toplevel to figure that out, because if the current window is used then gtk will always call glGenVertexArrays on it due to the creation of a GLContext which is the problem we want to avoid. Change-Id: I40ccc48b5ed2d9fd99d3c242244847c8448c3803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134350 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit da50382b366d6f3de778d8a52136cd812ef5b751) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134628 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-25vcl: avoid EXCEPTION_INT_DIVIDE_BY_ZEROXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/FormattedField::Down() or https://crashreport.libreoffice.org/stats/signature/FormattedField::Up() Change-Id: I30dfb06a1261a48a75b9d9c2380ed78121758ec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134674 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit ce39195e533336ce1482e2be6b1bec2b7f992125) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134627
2022-05-25follow org.freedesktop.appearance.color-scheme settingCaolán McNamara
Change-Id: Id26d01fd19cc3ee12c0e14b785b3a5149d22baf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134634 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-05-25icon-theme not dynamically changing to match desktop if set to 'auto'Caolán McNamara
Change-Id: Id5700cff1000fe4b6df6e73c1ce9ff4f206e0a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134613 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-25Related: tdf#148197 gtk_tree_view_scroll_to_cell needs either path or columnCaolán McNamara
so a null path is invalid here Change-Id: I1958e9695e3290e0c513bce89c9548908860754f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134187 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-25tdf#137639 qt: UTF-16-encode mime data for "text/plain;charset=utf-16"Michael Weghorn
Return a `QVariant` from a `QByteArray` containing the UTF-16-encoded characters when mime data for mime type "text/plain;charset=utf-16" is requested in `QtMimeData::retrieveData`, rather than a `QVariant` created from a a `QString`, to ensure that UTF-16 encoded data is actually used in the end. While `QString` uses UTF-16 encoding itself, `QMimeDataPrivate::retrieveTypedData` from the Qt library would convert the retrieved `QString` data to UTF-8 [1], resulting in a mismatch because UTF-8 encoded data would actually be returned when UTF-16-encoded one has been requested. This gets called as follows: 0 QtMimeData::retrieveData 1 QMimeDataPrivate::retrieveTypedData 2 QMimeData::data 3 QtMimeData::deepCopy [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qmimedata.cpp?h=6.3.0#n212 Change-Id: I3db1476838336682584145fb43d397c8eed29ce2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134456 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 6fc3ec85a32cd70216b4bbf21e479b4fc32a38dc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134451 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-05-25tdf#148706: map value prop in numericfield to textXisco Fauli
Change-Id: Ifc37b0aa8dc657d7a7f05199c8132896d03eb437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134240 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 3bd7111fe29ce19a007915af87f1f9269d27d9ff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134183 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-05-25tdf#143612: map SecondaryRefValue in form pdf exportXisco Fauli
Change-Id: I590784eb94fb6f4f3a20c4f6d8e3fb618f60d0fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134227 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134242 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-25related: tdf#148442: do not replace 'Yes' if onValue is emptyXisco Fauli
Change-Id: I748422dfbe7a385f4206c5d129eb3091289a180d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134220 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134241 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-25tdf#148442: map RefValue property to onValue in pdfXisco Fauli
Similar to what it's already done for radiobuttons Change-Id: I708d23dc5f9d4470a9850d7ecc60bd71fada594e Change-Id: I34107c757b0e0933f392a6d0845fa0d2e07aed62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134170 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 6ee5fb6d32147e180552f66e615d1de932fdcf9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134176
2022-05-25tdf#119686: fix tiff with 1 bit per pixelJulien Nabet
On the 30 pixels width images, the 3 first bytes were ok, that's why the 24 first pixels of each line was ok. The pb was in the fourth byte, you must read each bit of this last byte until reaching 30 pixels, so 6 bits (since width 30 corresponds to 3 * 8 + (8 - 2)). Here LO always shifted this byte with the same value, so used the value of the first bit for the last 6 bits of the last byte. => just decrement the shift value at the end of each loop With this patch initial, attachment of the bugtracker https://bugs.documentfoundation.org/attachment.cgi?id=144656 and the more complex one https://bugs.documentfoundation.org/attachment.cgi?id=144656 are ok Change-Id: I17339c54d6822c724184f167fb3a25b240e06543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134235 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134248 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-25tdf#148470 if macOS glyph fallback provided a partial result flag what failedCaolán McNamara
so another font can be attempted for the remainder Change-Id: Ie2c67c7c63510d02c99f2377c0c43ed6050ccd86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4b693a0c594fb3b73f4a4c1e03e9916f1a107012) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134070 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-20jsdialog: introduce popup managementSzymon Kłos
Popup windows are managed by vcl (some moving between parents happens on show/hide popup). We need to access correct popup window to correctly close popup in LOK. So remember popup instances. Change-Id: I9e1ba18ded5a1bf675f95bd7178043eebd9bbd5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134576 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134675
2022-05-13Delete CJK-style mnemonics on macOSxuenhua
Delete CJK-style mnemonics for the dropdown menu of the 'New button' and lower menu of 'File > New' on macOS Change-Id: Idd0ab671cd75151095c92b37e5b6b5e81ddae7e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133872 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-13vertical text test fails with latest harfbuzzCaolán McNamara
with font "Droid Sans Japanese" which doesn't seem to be available in ci, but is by default in the Fedora 37 build roots I suspect since: https://github.com/harfbuzz/harfbuzz/issues/537 Change-Id: I23d9415444668ce379765f32a96ed67f057ebfd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133858 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-13tdf#147283 allow 'fake italic/bold' glyph fallback results to be cachedCaolán McNamara
see also tdf#32665 Change-Id: I69746b815fec3c73f87de4dc3fe84dbc91e61f0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 04f9a8957c04b8c5abaa58140328d2c83381f4ff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133724 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-13do not allow reusing already used SalLayoutGlyphs (tdf#148477)Luboš Luňák
If the glyphs have already been used, the AdjustLayout() call in OutputDevice::ImplLayout might have altered them, since MultiSalLayout::ImplAdjustMultiLayout() drops glyphs that need falllback from the base layout. And then then GenericSalLayout::LayoutText() would not know to call SetNeedFallback(). Change-Id: I2f79d26c8b861f20d7d52abaa0d917aaeefb37a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133758 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 22191901bc91535121a5e8dc7ee6137233824d36) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133726 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-13ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I9ca24a135494a49449aec63615b2d945a93e8b27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133717 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-13Delete mnemonics for CJK translations on macOSxuenhua
'Cop~y' translated into Chinese is '复制(~Y)' But the mnemonics '(Y)' is useless on macOS. In English, 'Cop~y' with the '~' removed is the correct result. But in CJK should remove along with '(' and ')', not just only for mbMenuBar. Use the method MnemonicGenerator::EraseAllMnemonicChars already defined in vcl/mnemonic.hxx Change-Id: Ic37ce566923e3dea47535d187b1b3dba2088e960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7fd1b0aa2ba741103a7d9ac835514ebbeae3bcff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133714
2022-05-02tdf#140272 gtk3: fix crash with dnd using touchCaolán McNamara
gdk_wayland_drag_context_manage_dnd needs gdk_device_window_at_position(device, ...) to succeed similar to the problem of https://gitlab.gnome.org/GNOME/gtk/-/issues/1080 Change-Id: I2e1956b40a622b1d74d3aef3b5fac654fc1256eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133409 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-02tdf#141000 replacing underscores with spaces of multi words icon pack nameZain Iftikhar
patch will replace underscores with spaces of multi words icon pack name. Change-Id: If37f6617b7c90eb912ab2f58fff0f1df225efa66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133094 Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit 02b740a7a047052e60274b8649f3624267eb079f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133280 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-02Fix Method EraseAllMnemonicChars bugxuenhua
MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END defined in 'core/include/vcl/mnemonic.hxx' are 'a' and 'z' This variable c is UpperCase, should be converted to lowercase, and thencompare with MNEMONIC_RANGE_2_START and MNEMONIC_RANGE_2_END. Change-Id: I721e293e88bf1b8260b7ea2dc39ae6a7fd4f3d79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133587 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133619
2022-05-02Following tdf#142151: Red cast rendered in 16 bit TIFF imageJulien Nabet
Just simplify by merging both almost identical parts. Change-Id: I1658621609e10312feed530090adfa873602d2f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133115 Tested-by: Jenkins (cherry picked from commit dc97aac5cdfa3789d4e71e9d92df6e7e68802825) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133485 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-02Related: tdf#148779 Avoid endless recursion in ImplSmallBorderWindowView::InitStephan Bergmann
At least on macOS, some `make screenshot` tests crashed for me due to endless recursion, like the processing of modules/swriter/ui/converttexttable.ui in CppunitTest_sw_dialogs_test for LO_TEST_LOCALE=gu: [...] > ImplSmallBorderWindowView::Init at vcl/source/window/brdwin.cxx:557:20 > ImplBorderWindow::Resize at vcl/source/window/brdwin.cxx:1736 > vcl::Window::queue_resize at vcl/source/window/window2.cxx:1351:28 > ImplSmallBorderWindowView::Init at vcl/source/window/brdwin.cxx:557:20 > ImplBorderWindow::Resize at vcl/source/window/brdwin.cxx:1736 > vcl::Window::queue_resize at vcl/source/window/window2.cxx:1351:28 > ImplSmallBorderWindowView::Init at vcl/source/window/brdwin.cxx:557:20 [...] where in the calls to ImplSmallBorderWindowView::Init, nWidth=24 and nHeight=31, as well as mnLeftBorder=6, mnTopBorder=6, and mnBottomBorder=6 remain stable, but mnRightBorder keeps changing between 6 and 5. This appears to be caused by instabilities in the ImplLogicToDevicePixel and ImplDevicePixelToLogic calculations in OutputDevice::GetNativeControlRegion (vcl/source/outdev/nativecontrols.cxx), which can be avoided when we compute a hypothetical native control region from aCtrolRegion that includes the borders, and only remove the borders from the resulting aBounds and aContent. (The code to shrink aCtrlRegion prior to calling GetNativeControlRegion had been introduced with 27be8a263eddb54cb6b66cc0f832bfd02016a694 "KDE4 fix edit box borders".) Change-Id: I88c0d15ae7045a6888768226ca4d5fdd66bb41ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128549 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins (cherry picked from commit 31700036e517691d154701f4b8aeecb85cde607f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133482 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-27ofz#46905 Null-dereferenceCaolán McNamara
Change-Id: I26427ee1e010ce79e40c550459d9f53598570a7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133291 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-25tdf#148699 Qt track the active / shown popupJan-Marek Glogowski
I have no idea, if there can be multiple active popups in LO in some way. There can be multiple FloatingWindow and gtk does count them in m_nFloats... There is a whole lot going on in gtk3 related to isFloatGrabWindow(), with "funny" comments like: // FIXME: find out who the hell steals the focus from our frame So this goes with some "optimistic" approach: there is just one active popup, so we can track it in QtInstance. It WFM... Change-Id: I9778587696e1ad9e641dba4f102e2e921266eee6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133249 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 347622a98f512dae709f938a85498dcdcf9f225a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133260 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-04-25tdf#140463 Qt handle mouse enter+leave eventsJan-Marek Glogowski
Currently just implemented for the QtWidget, but still as a static function, so it may be used for QtObject at some point too. But there is no (mouse) enter or leave event function in QWindow, so no way to handle these there. And since we can't modify the returned QWidget from QWidget::createWindowContainer, the only way would be to expand the static QtWidget::handleEvent used by QtObjectWindow::event ... if it's actually needed at some point. Includes squashed commit 5d56255c22c79b72c1cedb48cfe0a200f89bdc66 ("qt6: Fix build (QtWidget::enterEvent)"). Change-Id: If9009e5dfca508acd1e702df1a17eb8ad7c29690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133190 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit dc886bc6de2c0061a840bea2426663c3be2ecd26) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133149 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-25tdf#148197 gtk_tree_row_reference_new_proxy warning on docking navigatorCaolán McNamara
Gtk-CRITICAL **: 09:05:11.124: gtk_tree_row_reference_new_proxy: assertion 'path->depth > 0' failed from TreeView::set_cursor(-1) gtk_tree_view_set_cursor is ok (and documented as such) with an "invalid" path to unset the cursor, but there isn't the same for gtk_tree_view_scroll_to_cell, though there null is docs as acceptable. Change-Id: I11b94ba997fbbd2f31031d9e73765ea1882ad9ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132872 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-23jsdialog: export symbol for buttonsSzymon Kłos
Change-Id: I412961bd59855dcb4204dfb917b30539dac0eac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132756 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-23jsdialog: handle formulabar as textinputSzymon Kłos
mostly boilerplate code jsdialog changes: - added force parameter to sendAction - added support for key press/release and command events - moved ActionDataMap to jsdialog namespace for sharing formulabar changes: - added calls to send jsdialog messages with formula - added cursor moving support - on command event Change-Id: I714715133901941ba0758655e2d5907a3bae79f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133010 Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-23jsdialog: used for formulabarSzymon Kłos
- do not block painting - use welded wrappers to send JSON - don't send tunneled dialog Change-Id: I54c3cd02ab63bad4a50a3623a32f13b0c94a3595 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132757 Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-19Related: tdf#147237 change the SalObject background when the settings changeCaolán McNamara
which solves the problem of parts of the gtk ui remaining in the old theme when switching dark<->light Change-Id: I59060dfdf3937ca13cd706eefc9e67c133478992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133043 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-19tdf#142151: Red cast rendered in 16 bit TIFF imageJulien Nabet
I found this fix by testing "pure" red/green/blue files (see attachments in the bugtracker) where red 16 bits file was ok but not green and blue 16 bits ones. Change-Id: Ic700a0fa17c3056d1d4f1d1a7f16a799ff4c7378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133108 (cherry picked from commit 49ee1c889665c3539fa9a1c99a865a42fc08ee97) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133051 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-04-19Avoid LOKClipboard harder on iOSTor Lillqvist
When I back- or side-ported cde6577dcb9c94aca7605790d34c83a5ff62edad to this branch (as 0111b70afdce44118a3616496c70c75962e7f57f) I could not apply all of it because this branch was so different, or something, then. But now more of it is needed, and does apply. Change-Id: I2710a7537594c486878a68c630f762a24ac81c49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133017 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-04-19sc: introduce SparklineShell and Sparkline contextTomaž Vajngerl
Having a separate sparkline context is very useful, so we can add a custom UI when the user has the cursor over a sparkline. This will allow a "Sparkline" tab for NotebookBar and its own deck in Sidebar, activated only when the sparkline is present. Also the pop-up menu can be customized specifically for the sparkline, but this may be less useful. For the sparkline context we need a custom shell - SparklineShell where now all the UNO commands can be implemented (not done in this commit). Change-Id: Idca2ad946af3afdd1b494744b80c9c093eec602c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit e1f3f2e00c37173e5f6f1cbb5235ab95b100bde7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133062 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-15jsdialogs: added WidgetTestDialog to test different vcl widgets in online siderash419
Signed-off-by: rash419 <rashesh.padia@collabora.com> Change-Id: I27cbb72b4ccd486b58934503b1d3d5d7ff47cbfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132865 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-14tdf#148115 Qt handle tooltips via event loopJan-Marek Glogowski
Instead of calling QToolTip::showText directly from LO, this defers showing the tooltip to the QEvent processing, which takes the tooltip timeouts into account. So tooltips are shown with a slight delay, therefore they happen less fast on mouse move, reducing / avoiding artifacts of fast changing windows. This unfortunately comes with yet an other hack in the area of our fake popup windows... New handling is based on the code of the Qt Tool Tips example. Change-Id: I42634ad36dd12171c30f52f07a02a88d3c48a718 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132841 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins (cherry picked from commit af6dd54d53eee0d0de1164bff0a77c6b433b3935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132864 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-04-14tdf#143447 ignore IME candidate window state.Mark Hung
Some traditional Chinese IMEs ( Input Method Editors ) under Windows10 send WM_IME_NOTIFY with IMN_OPENCANDIDATE but not IMN_CLOSECANDIDATE. The behavior is different if users configure the IME and enable "legacy" option. That caused the cursor been hidden, misled by mbCandidateMode. The patch ignores the candidate window mode in case the length of the composition string is 0, assume in that case candidate window is useless, and resets the candidate window mode when composition ended to maintain the state as much as we can. Change-Id: I91a1c23ee1a031313243e032653f50f39b0f2a3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132512 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 2b2d1c08c94fdc3982971c2b19ea241f05e578c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132858 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-14tdf#148491 Qt reconnect the QMenuBar close buttonJan-Marek Glogowski
When the QMenuBar of a QMainWindow is replaced, an existing corner widget is preserved / transferred, but its connections are still severed; a bit unexpected... The documentation for QMenuBar::setCornerWidget is not really clear what is happening, but the code has this nice comment: "// Reparent corner widgets before we delete the old menu". At least there is no need to explicitly delete the button. Still we must reconnect an existing button on each SetFrame. Regression from commit 9c4ef8ce3183e27ca174475cf4a8d15cc0368f60 ("tdf#145954 Qt unshare QMenubar usage"). This includes commit 4a537cf77affc4f1f2e2e5be9ff0b1ff11724509 ("Qt drop unused QtMenu::mpCloseButton"). Change-Id: I13c31734e665b78231a08cd76ca6305122e08879 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132836 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit f751417b77e6573a0c639778e76ec943449f4573) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132894 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-04-14ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I87cfad2da9b90bc4487dc4deb2fda5bb31a6b763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132856 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-14tdf#148481 Map RefHand cursor to Qt::PointingHandJan-Marek Glogowski
Change-Id: I79c7008655f22737f92a4a6430f1380e81c1c386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132833 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9ae398054833120df36bf51738cc4cfd7efb3fdc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132713 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-14Handle "addfont" from Collabora OnlineTor Lillqvist
We use the AddTempDevFont() API to add a new font. Sadly there is no corresponding way to remove such a temporarily added font. In this branch this commit also includes a follow-up fix to avoid an assertion failure (in a build with assertions). Change-Id: I6fe61919daa5af29e964cec1caf7293aefa8ea4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132948 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132967 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-11jsdialog: autofilter: unify with regular popupSzymon Kłos
- remove special type "autofilter" - now autofilter will be handled by dialog code in online Change-Id: I3478c3e05ab2e83030a8d68632d0426a5cc0accd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132539 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-04-11jsdialog: reenable after welding, unify with dialogsSzymon Kłos
Change-Id: I4a589f68fcdaa1c62ac08bd6075071d0fed0b28b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132538 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-04-09tdf#141578 Qt handle QtFrame screen changesJan-Marek Glogowski
LO doesn't provide any way to notify screen changes / scaling factors of a window and in fact doesn't really handle scaling factors in VCL. The QWidget doesn't receive a resize event, because it's size doesn't change, just the scaling factor. So we trigger a faked resize on QWindow::screenChanged signal. Change-Id: I6928c4c62d1c0995c70fea0088cff17849bcd1d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132650 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins (cherry picked from commit 881cfbf77567194f5016a961d1c3db869734d68b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132740 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-04-09Red used instead of GreenCaolán McNamara
Change-Id: I1261154fcff6f4904b4360099cbf26e33b9e7463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132694 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>