summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-01-25Avoid -Werror=nonnull with glibc-headers-x86-2.32-1.fc33.noarchStephan Bergmann
...on Fedora 33: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx: In function ‘void Preedit_InsertText(preedit_text_t*, XIMText*, int)’: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:149:34: error: argument 1 is null but the corresponding size argument 3 value is 1024 [-Werror=nonnull] > 149 | size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */); > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from ~/gcc/trunk/inst/include/c++/11.0.0/cstdlib:75, > from ~/lo/core/include/sal/log.hxx:15, > from ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:25: > /usr/include/stdlib.h:937:15: note: in a call to function ‘size_t wcstombs(char*, const wchar_t*, size_t)’ declared with attribute ‘access (write_only, 1, 3)’ > 937 | extern size_t wcstombs (char *__restrict __s, > | ^~~~~~~~ (Allowing the first argument to wcstombs to be null, and in which case the third argument is ignored, is a POSIX extension.) Change-Id: Ic078623643010b7539bc5bc1b498f18977ae77ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 782d160458d319c6c77fffa4c003c519afffaa17)
2021-01-25ofz#26122 allow NINSIZE input full elementsCaolán McNamara
Change-Id: Ifbde8fc055a91e23db08508a34ce4664d2f1f96f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103906 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fb0c3f9d8964f8c0f40238559c32d9d73cba6b55)
2021-01-25ofz#25989 cmap parsingCaolán McNamara
Change-Id: I048e5d88d5926a4afa75afab18db5ca6354e2454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103641 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9a1202edab0cfe95572f12a8c49ef756ead49bf2)
2021-01-25fix --disable-pdfium buildCaolán McNamara
Change-Id: I580972220bc39abe16288fa62c717e4ab25833d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105015 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: René Engelhard <rene@debian.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b9e5d5347e5dece693fe56b88570abc07a30a8ba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107064 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2021-01-25xmlsecurity: handle MDP permission during PDF verifyMiklos Vajna
(cherry picked from commit 586f6abee92af3cdabdce034b607b9a046ed3946) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/source/helper/pdfsignaturehelper.cxx Change-Id: I626fca7c03079fb0374c577dcfe024e7db6ed5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105785 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 00479937dc071246cc27f33fd6397668448a7ed9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107062 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2021-01-25vcl pdf tokenizer: fix handling of dict -> array -> dict tokensMiklos Vajna
Needed to be able to parse the /Reference key of signatures. (cherry picked from commit 056c1284d6a68525002c54bef10834cc135385db) Conflicts: vcl/qa/cppunit/filter/ipdf/ipdf.cxx Change-Id: I6b81089a3f58a2de461ad92ca5a891c284f8686a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8f46af565680bef0ff8ca32781e6d813a7446543) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107061 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-12-11Fix "single print jobs" function in print dlgSamuel Mehrbrodt
Did not work at all Change-Id: I388ce579691a1e7ad2eff8420c2f8b6b3e939ef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107568 Tested-by: Vasily Melenchuk <vasily.melenchuk@cib.de> Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2020-12-07cid#1202935 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ie95426e6188253dd5f2bd77782f62647d9ddba50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-07Add 'SinglePrintJobs' to PrintOptionsSamuel Mehrbrodt
So that this option can be set via UNO API Change-Id: I0b69162661a4327d59aaed82d5eff98cb50d852c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106593 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-12-07Fixups to build on c++11-only compilersThorsten Behrens
This is a follow-up to: - c258db7bea59bd536d71fd91c960d3bd9e1b4bb4 avoiding breakage on gcc48 for CentOS6 baseline (which has no full c++14 support yet) Change-Id: I5460bce0416e2e5c3fe5b7ab9ea0c6ffdb5da9f6
2020-12-05Some more checks for correct screen sizeSamuel Mehrbrodt
Change-Id: Id5a811e4227052fd9117ab2b099de31e8e3b90c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90413 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 3741d70743c297029f54b20b0ca711f40cff7097) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90576 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-12-05Add some fallback minimum size when screen size detection goes wrongSamuel Mehrbrodt
Change-Id: I97ec2359b8ae406e310a5d043ac068ddd89b3fd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90320 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 643a1492bd648fbd803ca86aca600cc2bdaf5819) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90575 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-10-04Restore the fix for tdf#126830Maxim Monastirsky
It was lost with 1ae450504cf57457f9702684b1517fda1dd3c481 ("drop gtk2 support"), which was based on an older revision of gtksalmenu.cxx. In the meantime, the UI for settings icons on was hidden (see tdf#123265), but this can't be an excuse for carrying the broken code. The setting is also still available as an expert config. Change-Id: Iffc6342bb312230646399f2f85ef0211315f6c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103660 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 800baa9c60d8fb7b4ed8cf8ae0ba7b6b68c69c9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103663 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04tdf#134351: do not apply autofilter if all entries are selectedXisco Fauli
Change-Id: I33cdfe07cc53b579bbe16486f302daf7bd3da841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103352 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/+/103569 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-09-23ofz#25684 keep ParseCMAP within legal areaCaolán McNamara
Change-Id: Iee18b5a9390b79efa67414ea2d229d2816c84e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102776 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a014c82522834c972e247a28d8e5f42998ae3c0e) ofz#25696 OOM Change-Id: Ia69e9ce1ca0156e960dddb7e0bf98dfd2be2d7cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d57b14e3394b081adf0888ed8dcb7b86d66c246c) ofz#25774 keep ParseCMAP within legal area Change-Id: Ic68fadd3d63631cbccda76e7679d95bb89452d25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103017 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f8474367449a1b6b54918d2753e3a36798761839) Fix crash from broken font CMAP subtable ParseCMAP crashes on a broken CMAP subtable of a font used by the bugdoc of tdf#119074, which returns a negative offset (technically it's large positive offset turning into a wrong negative integer, which is still out of bounds of the CMAP overall size - you get the point). This simply ignores that broken subtable, checking for other existing ones. Regressed-by: c7482bc2904401e7d975b5721ec861b8589253f9 Change-Id: I95820fe3bb6bd2fe2e0cf9d4c3536abce31fd497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103033 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9bf4c5ac49b73cc2a8c89a87ff87238c061a579d) Missing include (for std::max, since f8474367449a1b6b54918d2753e3a36798761839 "ofz#25774 keep ParseCMAP within legal area") Change-Id: I873c788577e9ec3bd54d9e637d2cf86be7c1f6e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 8cc52b05744443c64cf5eb62ebe3098cd964c437) ofz#25855 overflow in nTmpOffset we already know nLength is >= 24 so just move the calc to the other term Change-Id: Ic52f1686ccf81e6b13d7eb7e74dbd9cb51c8ea01 ofz#25868 Timeout, encoding conversion only sane in 0..SAL_MAX_UINT16 range so ignore points outside that range to avoid ludicrous ranges that aren't possible in the input encoding Change-Id: Ifb7b9b389d4a31b8820a7da661249223fe1e110c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103261 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-09-10xmlsecurity: pdf incremental updates that are non-commenting are invalidMiklos Vajna
I.e. it's OK to add incremental updates for annotation/commenting purposes and that doesn't invalite existing signatures. Everything else does. (cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804) [ Also disable a pdfium assert on Windows, only on this branch, where it fails during CppunitTest_xmlsecurity_pdfsigning for reasons unclear to me. ] Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-10external: update pdfium from 3963 to 4137Miklos Vajna
This is a combination of 6 commits, which brings pdfium to the same version as libreoffice-7-0. This is the 1st commit message: external: update pdfium to 4021 (cherry picked from commit 1cb70721ba00dd6c6958f0a10e39aa5c1866ec96) This is the commit message #2: external/pdfium: C++20 comparison operator fix Missing const leads to overload resolution ambiguity when a synthesized candidate of operator == for a reversed-argument rewrite conflicts with the actual operator ==, due to the asymmetric const-ness of the implicit object parameter and the RHS parameter: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:7: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.h:11: > llvm/inst/include/c++/v1/vector:1369:27: error: use of overloaded operator '!=' is ambiguous (with operand types 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type' (aka 'FxAllocAllocator<unsigned char>') and 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type') > if (__base::__alloc() != __c.__alloc()) > ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ > llvm/inst/include/c++/v1/vector:1359:5: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::__move_assign' requested here > __move_assign(__x, integral_constant<bool, > ^ > workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:384:24: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::operator=' requested here > m_FontDataAllocation = std::vector<uint8_t, FxAllocAllocator<uint8_t>>( > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:74:8: note: candidate function > bool operator!=(const FxAllocAllocator& that) { return false; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function > bool operator==(const FxAllocAllocator& that) { return true; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function (with reversed parameter order) (cherry picked from commit 6e0461d576d9f386e458f98f3c57f0ba385aacb4) This is the commit message #3: pdfium: don't patch out the COMPONENT_BUILD check, define it So next time we update, no need to adapt a failing patch. (cherry picked from commit 9b4ab9bda41a818832c721933986c9c6e07a6e6c) This is the commit message #4: make update_pch also consider files in <module>/src/**/inc With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. [ Just the pdfium part. ] (cherry picked from commit 69e0d871ec1de2260f9213d3113464155eac173c) Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a This is the commit message #5: external: update pdfium to 4083 (cherry picked from commit 9054c36d4ea3bee25fb9a47a96a0ea2cd07148c3) This is the commit message #6: external: update pdfium to 4137 (cherry picked from commit 1ffe59ef31186e36ad0aa7bbcdd32e407ee8d26c) Change-Id: Ib7c12461e04fa97bf55ee967e8d6c9bcf92fdf4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102373 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-10tdf#127932 fix wrong page number in print progressJuergen Funk
- in ctor, reset start pages to non-inflated value after size calculation - update label, _then_ progress in setProgress() Change-Id: I66576e339de814922512b68167e6c0a9b1025378 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102031 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 63bf8f042abe3c0f6989f6763d13f5389182b816) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102281 Tested-by: Jenkins
2020-09-09pdfium: only init pdfium library once and destroy on LO exitTomaž Vajngerl
With more and more usage of PDFium, it is hard to keep track of the life-time of the PDFium library, so it can happen that a FPDF_DestroyLibrary happens when we still have another instance where PDFium is still use. The result of this is a crash. To prevent this, just initialize the library once and delete, when on LO exit. This can be improved in the future to only keep the library active when in actual use. [ Leaving out the vector graphic search bits, the motivation is to just have this in libreoffice-7-0, so that recent pdf sig verify improvements can be backported. ] (cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2) Conflicts: vcl/source/graphic/VectorGraphicSearch.cxx Change-Id: I5c7e5de7f8b97d10efb394c67c7a61b976c8d57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102317 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-09tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBoxCaolán McNamara
Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102130 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-09-08tdf#136323 qt5: Remember accessible objectMichael Weghorn
'QAccessibleCache::insert' from the Qt library has a 'Q_ASSERT' checking that the corresponding 'QObject' for which the 'QAccessibleInterface' provides information is actually the same as the object passed as a parameter: QAccessible::Id QAccessibleCache::insert(QObject *object, QAccessibleInterface *iface) const { // ... QObject *obj = iface->object(); -> Q_ASSERT(object == obj); However, 'Qt5AccessibleWidget::object' so far was always returning 'nullptr', triggering this assert when using a Qt version not built with 'QT_NO_DEBUG'. To fix this, remember and return the object as needed. Change-Id: I4015b4c37aa8a073b02465df580a7235884e6cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102196 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 4461d49c6cfce22c2c96185b0a1d07bfe9709268) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102126 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-07rhbz#1875377 if sort order is equivalent keep order fontconfig presentsCaolán McNamara
there are two fonts in fedora 32/33 for regular Cantarell /usr/share/fonts/cantarell/Cantarell-Regular.otf and /usr/share/fonts/cantarell/Cantarell-VF.otf where VF is the Variable Font version. The Cantarell-Regular ones has a CFF table and export to pdf creates a font subset that works perfectly fine. The VF one does not have a CFF table and the fallback case doesn't work for pdf export. Both have the same version, use a stable sort to retain their relative order that fontconfig presents so we use the Cantarell-Regular version we would see if we didn't sort by version at all. Change-Id: I750006b980810fc59e0a152d42ae17f29f46e3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101971 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-08-12tdf#135442 min supported version of gtk3 is 3.18 not 3.20Caolán McNamara
Change-Id: Iaa2eefbe08fad3a7dd6eff98bf5fb513053a263d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100541 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-07-30xmlsecurity: detect unsigned incremental update between signaturesMiklos Vajna
(cherry picked from commit 7468d5df5ec79783eae84b62bdc5ecf12f0ca255) Conflicts: vcl/source/filter/ipdf/pdfdocument.cxx xmlsecurity/source/pdfio/pdfdocument.cxx Change-Id: I269ed858852ee7d1275adf340c8cc1565fc30693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99382 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-26tdf#135077 Qt5 revert broken fix for tdf#132172Jan-Marek Glogowski
So I tested a lot of stuff, but missed the missing focus for new dialog windows :-( This is IMHO a far worse problem, then the popup, so just revert the fix. This reverts commit 14eccc62b53e202cd9ed63442481922a320fc02e. Change-Id: I391ad91ded90e4518ab024572d3f182769b0bcda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99453 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-07-08tdf#130991 Scale the drop-down arrow size-requestJan-Marek Glogowski
When requesting the size of the drop-down arrow button, the arrow rect must be scaled, like all other native size requests. Change-Id: Ic0ccd96e812527c880868d385484655526ebb09b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97536 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit ba956e60a868e98d22bc95efd041f423987e7f76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97576 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit f0daeb39aa61cc3435630cf0b9727f6da818de1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97679 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-07tdf#134054 toolbox: respect drop-down arrow rectJan-Marek Glogowski
When centering the text and icon on the button, the code didn't take the drop-down arrow rect width into account, resulting in an overlapped arrow. This is especially visible, if the drop-down is shown and the button is wrongly highlighted. There is supposed to be some vertical mode, which I couldn't find in the GUI, so this just adapts the width in horizontal mode. Change-Id: I194780dc32db610041ad0ee45a425e1026c7c4e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97358 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 8565546ce6a04f6f243f4f60d2693b148dca5a77) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97688 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-07tdf#130991 Fit the drop-down arrow into its rectJan-Marek Glogowski
Looking at the original fixed-size arrow painting code replaced in commit b62c43d1200e524369d9c7c2bd1dad3044efd672 ("Anti-alias toolbar button drop-downs."), it used some fixed values of 5 and 3 to match the arrow box width of 11. The new code assumes the width is the expected arrow size, minus a minimal margin to separate the arrow from the button border, and there is enough height available. Based on these assumptions, the code now scales, positions and paints the triangle to fill the available space. Change-Id: Ied721e494d105106086ef6252e72ae7395eafe08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97537 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 1cb897a0f65ba066d1e81b62c70c3e46bbdb7ba8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97583 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit b0315eb69c62f2108983e6a4b2177cf28a2663bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97687 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-06tdf#133877 use optimal size for hamburger buttonJan-Marek Glogowski
This way it'll properly scale, instead of using the fixed 28 pixel dimension. This is a hack, which is used a few more times in VCL. Still this should not be needed, but done automatically. If there aren't any constraints, just return the optimal size! Change-Id: I8aa32645ea95cba28d0daf56f0be27c15153b6c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96390 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit eff34e639055701b1299c07e6cdc0ce07cfc0936) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96411 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 1c73b219487b2aa60d888755cf4eca082e6b00c0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97464
2020-07-06tdf#123292 notebookbar: vertical align for shortcuts toolbarSzymon Kłos
Change-Id: I2f2ccee9d6c01962d5d8609ea55c0c2bca6b5cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92892 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 96e5121869e95a8e28788a91ce0dc480e5f10c0b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97463 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-07-01tdf#132172 Qt5 just handle visible widget's focusJan-Marek Glogowski
I investigated the state of isWindow() and the SalFrameToTop flags for the detached find toolbar (tdf#126607) and the Impress presentation and the tabbed "page size" drop-down and all had the same status (isWin: 1, flags: 12). Than I had a look at the gtk3 implementation, which just handles focus requests, if the widget is already mapped (gtk_widget_get_mapped). So I also dumped the visibility as the nearest equivalent in Qt to the X11 mapped state, and that was different. In the end Qt now also just handles the focus for already visible widgets, like gtk3, which works for all the cases I tested (incl. tdf#125517). And omiting either activateWindow or setFocus breaks some cases... and I still don't understand the GrabFocusOnly flag, which is just handled in the X11 backends at all... Note: this doesn't happen with 7.0+, because the weld'ed version of that control (commit 3afc718eddcd81232392d46fccc24b8ec626c8df "rework PageSizePopup to be a PopupWindowController") doesn't expose this bug (and also doesn't support mouse-over highlight). Change-Id: Id085732f6a52bbc69ed47fbd3d57454756a03121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97549 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 06fb3e7b7f1079c276ad2f048cd94299b4bd7006) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97575
2020-06-29tdf#131991 Qt5 RTL mirror mouse wheel X positionJan-Marek Glogowski
Just like all the other events, the mouse wheels X position must be mirrord in LO RTL mode. Change-Id: I28e8da0455d941f42f869b08edcdbe570de366c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97338 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9eda78fd53fe3c76eb9d4b63add68f266f551b10) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97354 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-06-25tdf#133859 Wizard service: disable 'Next' button if path has only base itemIlhan Yesil
If the wizard dialog for extensions has only the base item in the first path, there is no need to proceed to the next page, as there is no one. This will be checked and if so, the 'Next' button disabled. In libreoffice versions before 6.4, an ORoadmap class was used in the wizard. There, if the ORoadmap data are reinitialized, the InCompleteHyperLabel object must be destroyed first, before it will be set to nullptr. Change-Id: I5b4b2e6b3666b58acccace385c622f0a065fc368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95969 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 54a3daec02f2eeada04efcd7958da4152db4611a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96795
2020-06-05tdf#133271 sw textbox: handle TextRotateAngle shape propertyMiklos Vajna
Shape with btlr text direction is imported as TextPreRotateAngle=-270 from DOCX. Saving this to ODT turns the property name into TextRotateAngle and its type into double. Handle that as well to survive the ODF roundtrip of a shape+textbox where the textbox has a btlr text direction. (Also add a way to make multiple tests in a suite to be more independent from each other: depending on ordering, the new test made the old test fail. Calling ErrorRegistry::Reset() makes that go away.) Change-Id: Iea9212f3bbb01059caf3b0f2d809e48debf52953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95340 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 413791a65597a1808d9b98e4887864f3624b70cc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95318 (cherry picked from commit e05a39f75cd304bfc1bd59aa2eebe4889cae109f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95411 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-01Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to search resultsCaolán McNamara
in the document, looks like only the calc one actually works, and when it works on large quantities of results calc grinds to a complete halt This was introduced with: commit b41332475783c31136673fb44cf4c411bb0148f8 Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 and has been a problem on and off with calc's potentially ~infinite grid There is the on-by-default search results dialog in calc (which has a limit on how many it shows) which provides an alternative route to iterate through the results Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 0b94169d820482434dc98a37c3c1633ca46fd0dc) Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95014 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-05-19tdf#133053 reset after clear so avoid later assertCaolán McNamara
Change-Id: Ib2b637c8a6d5af04256bfd9631e43d334343b610 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94265 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 773b8e3cc1340e6f5bfc364f0705344b744edd8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94273 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-18Resolves: tdf#131076 GdkEventKey::state can contain e.g. num lockCaolán McNamara
which we don't want to consider Change-Id: Idad3ae428450590b366897d08a845b43000b48e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94388 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-05-15tdf#132788 vcl: fix redraw on theme changeMiklos Vajna
Regression from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1 (tdf#92079 vcl: fix missing image background on dialog from basic, 2019-06-13), the original scenario was about an unexpected change from bitmap wallpaper to a non-bitmap one. That means the condition for the above change can be more strict: just restore the old wallpaper if it's now a non-bitmap one, otherwise leave it alone. This way the above scenario keeps working and changing themes again doesn't require a restart of the process. (cherry picked from commit 52389ed19da6bcfdedef909532913ff3e2ab4afc) Change-Id: I256372ad30184cc150d6819dd61cdd38af7d83ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94194 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15tdf#131333 SalMenus propogate to parent their selected id conditionallyCaolán McNamara
Menu::Select depends on its handler returning false to allow propogating a submens's selected id to its parent menu to become its selected id. without this, while gen menus already have propogated this to its parent in MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS won't propogate the selected id Change-Id: I1d87cb0deacdf5fbfb837acc21c2d23b79525aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94268 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2020-05-14Keep order of GDK input events intactStephan Bergmann
As explained at <https://bugzilla.redhat.com/show_bug.cgi?id=1377293#c12> "[Wayland] When typing fast at high CPU load, LibreOffice breaks key (letter) order": "with a local LO master --with-lang=ALL ASan+UBSan build (i.e., which executes somewhat slowly): When typing 'file' in Writer right after it started up (but no longer after more typing), that gets garbled as 'fiel'." The reason for that (but probably not for the original issue reported in that rhbz#1377293) apparently was: Two GDK_KEY_PRESS events (A and B) were in the GTK event queue. GtkInstance::AnyInput consumed only A, because it broke from the first while loop as soon as it saw the first event of appropriate type. In the second while loop it put A back on the end of the GTK event loop, so that it now followed B. GtkSalFrame::signalKey (vcl/unx/gtk3/gtk3gtkframe.cxx) thus received the events in the wrong order. Dropping the "break" also reveals that GtkInstance::AnyInput should obviously use a queue (i.e., deque) rather than a stack to hold the events it consumed and needs to re-enqueue. This appears to be a regression introduced with 658954e8b50fc264428402dc5a95b0d6f690d191 "Resolves: fdo#48011 writer idle-callbacks are halting when events pending". Change-Id: I87d601df118a20ea3dd59e9cebbcf5176db04be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94202 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins (cherry picked from commit a9a19777d53beb762fabad3a67ddc68ad75bca6c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94005
2020-05-13tdf#132832 calcAdjustedSize: Take max width into accountMichael Weghorn
Actually take into account the preferred width when calculating the size of radio button, checkbox and hyperlink controls. This e.g. makes word wrap work properly when the multiline property is set for a checkbox, radio or hyperlink control and the single line text exceeds the preferred width, rather than keeping the whole text in one line that exceeds the preferred width. Change-Id: Id04668e4e1afe7c10a28468eff05cf04c10ae3c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93947 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 2539f1d142e0077dfeec36ef349a1f5443f1c94b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93798 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-05-09tdf#132267 vcl: fix missing scrollers with non-native renderingMiklos Vajna
Regression from c04169c586ef1d55b1d0ac469bb4fbd4f50bd08a (tdf#125415 vcl menu floating window: avoid flicker, 2019-05-21) the problem was that the clip region was set on the buffer, not on the render context. This means the original clip was used to determine what gets copied from the buffer to the screen, so the scroller arrows were not rendered. (cherry picked from commit a65ec136fbd0dae889b20fba657b40af467fcb27) Change-Id: Id173e6333721891798da58baf2092f4cd21a62ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93780 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08On iOS, avoid catching exceptions to just immediately exit or abort anywayTor Lillqvist
It is better to let the exception be uncaught and then catch that in the debugger. (Maybe even inspect its backtrace from a crash dump automatically sent from an end-user device.) Change-Id: Ice02d5cbd7f4a59eae7ce8a9fac47dec8b234a5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93505 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93601 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93646
2020-05-06tdf#64690 - Extend selection on find/replaceAndreas Heinisch
In the Basic code window, extend the selection on the last paragraph during the search/replace process in order to consider newly inserted text portions. Change-Id: I27ad998709ac25cffbef4a354c87d422f97e1b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e7f3731b8d3e930f85e7df0c0e55bbb1aaea191b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93377 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-05-06Revert "tdf#125609c10 vcl/button: enforce only one radio selected on init"Justin Luth
This reverts commit d35171456bc230efdaa9426da1398b2db7fa0df8, in order to resolve tdf#132581. Only applying this to LO 6.4 which is nearing stable. An attempt to find the real problem will be made for 7.0, but since this reverted commit is really obsolete, it can easily just be reverted. (It fixes a situation caused by a commit that has since been fully reverted. So it should still be a valid fix, but if it exposes other problems, it can easily just be removed to cover them up again...) Change-Id: I0d765ce0cc4ab2b9d282d36a239518d43d6015ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93522 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25tdf#131496 vcl image lazy load: speed up vector images with custom pref sizeMiklos Vajna
This speeds up the loading of the bugdoc: - old cost: 6378 ms - new cost: 1891 ms (30% of baseline) Images were initially loaded at import time, but commit acb803b730f2c6bd82e39beab58949ec14f85eb0 (tdf#125591 DOC import: lazy-load metafiles with explicit size, 2019-06-11) changed this, so that they are lazy-loaded. That improved performance, but sometimes gave incorrect results. Then commit d8371cdfd092c6426c01aae130ea4eaa6d627a6f (tdf#127446 vcl image lazy-load: fix custom size handling of metafiles, 2019-09-30) fixed the correctness problem, but the loading was no longer lazy in the tdf#131496 case. This is an attempt to bring back lazy-loading for vector-based images, while maintaining the correct preferred size. The problem was that the PPT import triggered a vector -> bitmap conversion during load: #0 0x00007ffff03c7e36 in ImpGraphic::loadPrepared() (this=this@entry=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1424 #1 0x00007ffff03c72c7 in ImpGraphic::ImplSwapIn() (this=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1444 #2 0x00007ffff03c7535 in ImpGraphic::ensureAvailable() const (this=this@entry=0x1f88a90) at vcl/source/gdi/impgraph.cxx:1402 #3 0x00007ffff03c9481 in ImpGraphic::ImplExportNative(SvStream&) const (this=0x1f88a90, rOStm=...) at vcl/source/gdi/impgraph.cxx:1590 #4 0x00007ffff03bf9a8 in Graphic::ExportNative(SvStream&) const (this=this@entry=0x20534e0, rOStream=...) at vcl/source/gdi/graph.cxx:544 #5 0x00007ffff1c79a28 in svt::EmbeddedObjectRef::SetGraphicToContainer(Graphic const&, comphelper::EmbeddedObjectContainer&, rtl::OUString const&, rtl::OUString const&) (rGraphic=..., aContainer=..., aName="Object 1", aMediaType="") at svtools/source/misc/embedhlp.cxx:773 #6 0x00007ffff1c79b6f in svt::EmbeddedObjectRef::AssignToContainer(comphelper::EmbeddedObjectContainer*, rtl::OUString const&) (this=0x207ae90, pContainer=pContainer@entry=0x1f8de40, rPersistName=...) at svtools/source/misc/embedhlp.cxx:369 #7 0x00007ffff239f736 in SdrOle2Obj::Connect_Impl() (this=this@entry=0x20734f0) at svx/source/svdraw/svdoole2.cxx:984 #8 0x00007ffff23a6310 in SdrOle2Obj::Init() (this=this@entry=0x20734f0) at svx/source/svdraw/svdoole2.cxx:695 Try to defer that conversion by not doing a maVectorGraphicData->getReplacement() in ImpGraphic::ImplSetPrefSize(), rather just store the preferred size and apply it later when getReplacement() is called. This helps, because the above OLE-from-PPT case loads the graphic, but only to export it as SVM, so it doesn't need a vector -> bitmap conversion otherwise. (cherry picked from commit 952cc68929f863784c6b01c9dc071494892877d1) Change-Id: I24790c0a3e298d5fbb3faff35d529e79cc72845a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92156 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-20Qt5 implement DELETE_ITEMS action in file pickerAlexander Volkov
It is used to clear "Version" listbox before adding new items. Change-Id: I4cb9557c8f56d80c1dfac68dc2b5b45b5c69c2f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91982 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 3a22be0178b950ab3d21eadab2bc34e7ea93eec8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92174 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-04-16fix tree view cursor leakCaolán McNamara
Change-Id: I8660db3d5eddb1596529783e13dff130bb3d0858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92008 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-09tdf#131969: Fix reading SHORT Orientation valueStephan Bergmann
<http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf> "CIPA DC- 008-Translation- 2012: Exchangeable image file format for digital still cameras: Exif Version 2.3" documents that the Orientation tag 0x0112 expects a count of 1 values of type SHORT (16 bit), and details that values <= 4 bytes are stored in the Value Offset field always using bytes starting from the left of the field. This is a regression introduced with 42c0e433aca68c669bc0f55af404b6bae1655fba "Avoid -fsanitize=misaligned-pointer-use". That commit had wondered why the original code had used OSL_SWAPWORD instead of OSL_SWAPDWORD when reading and writing such orientation values. It turns out that that original code had happened to work correctly when processing either little or big endian data on a little endian machine. (Though it would have worked incorrectly when processing either little or big endian data on a big endian machine.) And with 42c0e433aca68c669bc0f55af404b6bae1655fba, the code worked when processing little endian data on a little endian machine, but failed when processing big endian data on a little endian machine, as is the case for tdf#131669 on e.g. x86_64. (read32 has become unused and is thus removed.) Change-Id: I7992629048ac44c00ee703c75164f3d094773244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91881 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit fd5961cb0e2ebc2f5797f76a2b1f9fd52ca4b3ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91889 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-08Resolves tdf#127782 - New Print dialog is too highHeiko Tietze
Expander added Change-Id: Iea41f9cf335b75210de0acf5688fddd5e3dd3dbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86478 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit 96b4bf352b1dc43637080719c91eef61fef74bf8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91725