summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
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
2020-04-08Resolves: tdf#131715 don't keep trying the same page if we're already on itCaolán McNamara
return of false means we didn't change page for some reason, the idea is that it might be blocked to go to another page, in which case sync with what page we ended up on, but don't bother with that if the dest page would be the same as the current page Change-Id: I280128240601413fb6d027d001b2ecc9a4efa76f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91718 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-08tdf#131490 sw btlr: fix handling of vertical textMiklos Vajna
Latin text goes from l->r, then t->b. If we rotate to the right, then we get t->b, then r->l. Vertical text in vcl's Font means the individual glyphs are painted in a way that looks "non-rotated" in the tbrl case. btlr is not symmetric to this: if you rotate to the left, then Latin and vertical text is handled the same way, i.e. there is no compensation at a glyph level. This means that as far as vcl is concerned, the Font's vertical flag has to be true in the tbrl case, but no in the btlr one. Fix SwFont::SetVertical() to do this, which means that rotating at a character level or using the btlr text direction will result in the same rendering for a one-liner text. Regression from commit 89e5b431d468745da3a1eff14d48296107b9101b (sw btlr writing mode: implement DOC filter, 2019-03-28). (cherry picked from commit a8d26a0bb40c101394ded8061d1b58048153631b) Change-Id: I2619c77a3b2597dbf9feab6c7042e8d8c7454197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91820 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-03-31tdf#131221: blacklist Intel on Win10 deviceid 0x5917Julien Nabet
Change-Id: I718bf929a1b601a5363be1bfda7e9f5377747565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit d4c9e2130f6f065b4a97fc98cf1029593e725e65) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91298
2020-03-31tdf#131533 Qt5 defer dropping clipboard ownershipJan-Marek Glogowski
This is maybe a Qt bug. Calling QClipboard::setMimeData from Qt5Clipboard::setContents after a previous call to QClipboard::clear results in a clipboard ownership failure. In a terminal you'll see: "QXcbClipboard::setMimeData: Cannot set X11 selection owner". Calling Application::Reschedule() after the clear() doesn't help. The result is a de-sync between the LO's clipboard state and the real clipboard state, which will lead to a crash on LO shutdown. I'm not sure this fix is correct. Maybe this could also be handled by some X11 flush operation. But it's the only working solution I could find: don't clear, if LO re-claims the ownership later. I tried to reproduce the ownership error by modifying the Qt fridgemagnets example, adding some QClipboard::clear and QClipboard::setMimeData calls to the drop handling, but couldn't reproduce. Maybe the dynamic Qt5MimeData object is also involved. Change-Id: I32b6575a78a4b10a2e2b7b189303ab3a40dc69ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90990 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 313081c0703c66918e95640c74cd57312a1e8bba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90963
2020-03-25tdf#131280 Fix endless invalidation loop on documents with form controlsSamuel Mehrbrodt
Restores a condition which was removed in 8de98e61fbc96bf523b3dec7e1e52eb7e2d7693e Change-Id: I68a9f8a362d2ded9975e7c73e2a0533aa5ad9e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91053 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 4af18ebae9d74b43fcd114d5fa5b145586651bc2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90957 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-24tdf#131434 ensure expander icon column is createdCaolán McNamara
which the normal ::insert case does, but the bulk insert omitted Change-Id: I9b236e5f0e91292539164d39f0f90e109a1b503e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90825 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-03-21tdf#61274 sd PDF export: fix links ending up on wrong pages with hidden slidesMiklos Vajna
SdPage::IsExcluded() decides if a slide is hidden, SdXImpressDocument::render() checks for this and returns early if needed. In that case PDFExport::ExportSelection() detects that the produced metafile has no actions and avoids creating a PDF page. Then Impress links are created using the vcl::PDFExtOutDevData::CreateLink() call in drawinglayer::processor2d::VclMetafileProcessor2D::processTextHierarchyFieldPrimitive2D(), not specifying the PDF page number explicitly. This means the link is created on the "current" page number, set in vcl::PDFExtOutDevData::SetCurrentPageNumber(), called by PDFExport::ExportSelection(), but that filter/ code can't know about hidden slides in sd/. Fix the problem by setting the page number again in SdXImpressDocument::render(), that way the link created by drawinglayer will end on the correct page. (cherry picked from commit 01dbb38680aa39a4d3bc7afd05d44a4b2c9bc6ab) Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx Change-Id: Ic29e345d45bc7c944d65e6e450f1d742dd0e9f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90551 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-03-21tdf#100706: get blink cursor delay for MacOSJulien Nabet
See https://bugs.documentfoundation.org/show_bug.cgi?id=100706#c1 Change-Id: I2e471f093ce18c8716108c4ba793c2124e489295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-17tdf#131076 allow 'return' in GtkComboBox to activate default widgetCaolán McNamara
typically ok and accept the dialog. alt+down is documented as the default menu-activate key binding, space will also work to popup the menu from a combobox. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89950 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7a078207fbfd71b33cb51c38b3886351fedcde8d) Change-Id: I7bec880670cc006b288996d6f59a88fe9a9fb8cc tdf#131223 let return deactive active popup Change-Id: Ib116a1eb047aa9f1a5ca7a2ec9333a793addd304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90188 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 0d81a613ef5af22253e51d9917c5d5c94d764456) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90381 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-17mysterious greyed out native toggle buttons when in foregroundCaolán McNamara
and flipping to normal mode when in background. Change-Id: I100efb651515b044d56a8c3838569cf717b37d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90279 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-17tdf#130150 Improve clipping in PDF exportArmin.Le.Grand (CIB)
For more info and discusson please have a look at the task. It reverts the change from tdf#99680 which did a wrong paradigm change in how clip in Region(s) is defined and tries to fix the underlying error in a more correct way. This includes problems noted in tdf#44388 and tdf#113449. This is a decent improvement, but - due to dealing with numerical problems - not yet the whole healing. Still thinking about how to solve this for good. Adapted PdfExportTest::testTdf99680() and PdfExportTest::testTdf99680_2() as needed, empty clip regions are allowed again. Added comments, too. Had to change solvePolygonOperationAnd to work on ranges if both inputs *are* ranges. The AND-case is then completely solvable. Also increased geometry for transformations of clip geometries - may help later. Change-Id: I2370447597faa6efb81d58ee31c63654e304262e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89874 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 6dff631f8f4b964b48aadde52a1e1b8b04b9ba53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89923 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-11Resolves: tdf#130400 reserve ctrl+page_up and ctrl+page_down for notebooksCaolán McNamara
Change-Id: I627298cb844967eeb1e166720e3951be732a4dc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89016 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89481 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-11Resolves: tdf#131248 a11y crash when closing SQL Edit QueryCaolán McNamara
Change-Id: I39db7b352dd460f46092a054bfa89f5acdda54c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90273 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-09failure seen as setting length of -1 and returning nullCaolán McNamara
Change-Id: I84e7b3a4ad63e70499910f09bd4c70a43137fa10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90103 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit beabc0deddce2a5ce0a9f9b20316a7798a08318c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90031 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-03-08tdf#131210: avoid infinite loop in 'Date acceptance patterns'Julien Nabet
Change-Id: Ib049b5d44f91e2b36c068e1ef351ae81707d885e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90035 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-04Resolves tdf#127782 - New Print dialog is too highHeiko Tietze
Amends Iea41f9cf335b75210de0acf5688fddd5e3dd3dbb Change-Id: Ic669332245ad9c5ee6366765da8a5bc632dd159c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89423 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit b268715912d4c2034b9b9d38e75446bef7bbb11f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89921
2020-03-04Qt5 unify font attribute conversionsJan-Marek Glogowski
Adds conversion functions for VCLs FontWeight, FontWidth and FontItalic to Qt5FontFace and remove the partial "switch" tables from KF5SalFrame. And correctly handle the FontWidth in Qt5Font as the stretch value, so the default font in qt5 gets the correct stretch and doesn't look bold. Also contains commit b9a124aae67cbd64917f07f2dca6603f149c018b ("Qt5 just ignore invalid font attributes"). This ignores the *_DONTKNOW and _FORCE_EQUAL_SIZE values, except for the stretch, where we map DONTKNOW to QFont::AnyStretch. Change-Id: I698986416dff13e6dfaf9dfa7f95851b89e9137d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89813 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 63ea1e811a3b3806b6b2408d759a449f4e086eb3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89797 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-03-03tdf#131031 Gtk3 presume the resize did happenJan-Marek Glogowski
Regression from commit b26ca5b13733b46c2df0787502f885e15b390956 ("tdf#130841 resize to client size after SetPosSize"). It just happens for me on gtk3, not gen and not win. But since gtk3 also sets the nX and nY value SetPosSize eventually before the fact, do the same for the nWidth and nHeight. Change-Id: I2898c403b73de790f3f988b8b8ec2067f4b0b43f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89760 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit a0e8a42a45abc7e626346bf01903ed81a026287d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89791 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-03-02tdf#130515 Time field in Base form will not display correct formatNoel Grandin
regression from commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e Date: Wed Feb 8 10:40:28 2017 +0200 loplugin:unusedenumconstants read-only constants in vcl Change-Id: Icf2e385763c8ece34521895331d148a5baacf2d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 9cb07cdca78e2cb1ecff84b7a8e154b23cc2a46d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89795 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-28tdf#130071 tdf#127815 qt5: Use ExtTextInput only for multi-char key eventsMichael Weghorn
Only call the SalEvent::ExtTextInput callback for key input events if their text is longer than one character, in which case treating them as SalEvent::KeyInput would produce incorrect results, given that only the first character is set as the SalKeyEvent's mnCharCode below (s.a. tdf#124118). S.a. commit 61c8324394c690ced18ce692ab6d29c8031ad1a8 ("#88063# fixed event handling for redflag", 2001-06-12) which made events with text longer than 1 unicode char to be handled by SalEvent::ExtTextInput for the gen VCL plugin even if not in preedit mode. Process other key events by calling SalEvent::KeyInput callback, which e.g. makes shortcuts involving non-Latin characters (tdf#130071) and auto-insertion of non-breaking spaces when typing French text (tdf#127815) work. The gtk3 and gen VCL plugins also use the length of the text as one criterion to make a disctinction of whether to call SalEvent::ExtTextInput or SalEvent::KeyInput, s. GtkSalFrame::IMHandler::signalIMCommit and X11SalFrame::HandleKeyEvent. Those also take into account whether in preedit mode, but for the qt5 case, input method events when using e.g. ibus are handled in Qt5Widget::inputMethodEvent and the Qt5Widget::handleKeyEvent code path is not used anyway. Change-Id: I2f8925ea26a4fb5419226265c579242889e2a506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89663 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins (cherry picked from commit 1c6ea413cb01c0b482f87e625ba208eec230618a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89670 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-02-27tdf#130679 Draw: Convert to polygon doesn't workNoel Grandin
regression from commit 1cd32bcf1b92bd53320717626601135623dadd55 Date: Mon Dec 10 11:28:59 2018 +0200 loplugin:useuniqueptr in vcl Change-Id: I7753f54822d0249d1fcda97581051d023969fc2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89636 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit dc5be8f6020dd812664af250d03d2a14b9e8a3cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89584 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-27WIN prevent deadlock in SetForegroundWindowJan-Marek Glogowski
As mentioned in various blogs, like Raymon Chens "The old new thing", 2008-08-01, "I warned you: The dangers of attaching input queues", using AttachThreadInput to steal the input from an other thread, so SetForegroundWindow becomes more reliable, can deadlock in that call in win32u.dll!NtUserCallHwndLock. Stackoverflow also has a multitude of suggestions and links in "Win32 SetForegroundWindow unreliable", to circumvent Windows focus-stealing prevention mechanisms. A customer is experiencing these hangs reliably and often when opening LO windows via Java UNO, because the Window and the UNO thread are different and trigger this code path. Removing the calls to AttachThreadInput fixes the problem for them. This has started lately and nobody really knows why. I also know other customers with a similar Java UNO setup, which don't experience them. For better foreground handling, the calling app eventually should either use AllowSetForegroundWindow or CoAllowSetForegroundWindow (for COM servers), to give up the foreground / input handling. So this just drops the AttachThreadInput calls. Change-Id: I8de0a17aaaa44c24b1ee728b2ef6ec3aea951c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89527 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 518c0265efebf39ab6d1e90c4ec4e7cf52b701c6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89572 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-25tdf#130915 SvTreeList::Move needs to move from lower index to higherCaolán McNamara
the reverse doesn't work Change-Id: I0d84e6e44b26c0c4f1f0d221de3fad03c183f6ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89434 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-02-24Resolves: tdf#130762 honour "wrap" in FormattedFieldCaolán McNamara
Change-Id: Iefd9a537aa358eab179cf6f0eeb6f80a9a77284a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89011 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 20c08e47f7c156a4726194215b389f4d0b165904) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88953 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-22tdf#130827 Qt5 report frame-relative cursor posJan-Marek Glogowski
Qt5Frame::GetPointerState expects the cursor position relative to the frame position. Change-Id: Icaf7dcd8fc80d712f5138a9f9b843ccf345c5543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89244 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 4fe30879af391c32074a003a7a6ddd45431d212a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89268 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-02-22tdf#130831 Qt5 don't blit damage to empty imageJan-Marek Glogowski
This prevents the crash, but I'm not sure having an empty buffer image at this point is correct. But it doesn't look like anything is missing in the dialog and a crash is definitly worse. Change-Id: I7d0330b4e4a7ca64655a51c226e425e53ba12118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89203 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 813cde918338bccc4f711230616340cad2c1d4a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89140 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-02-22tdf#130499 Qt5 no qApp == main threadJan-Marek Glogowski
If there is no QApplication, we can ignore the GUI thread. Change-Id: I0d2faf4799d493ad0b6074b40242c443d4bc43dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89241 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit c6fb366e05370af553af2130b370909ed4495cff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89141 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-02-22tdf#130841 resize to client size after SetPosSizeJan-Marek Glogowski
This fixes the hack of the native menu bar with a smaller client size in relation to the frame geometry. Eventually this should be replaced by proper mnTopBorder usage, but this currently isn't working. Change-Id: Ib5825d9c8f77e463fcb086e0373228fe91d8705a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89202 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit b26ca5b13733b46c2df0787502f885e15b390956) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89144 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-02-21tdf#130573 labels exchanged in export to BMPNoel Grandin
In the commit below, I removed the 1-bit dithered output, so restore it. regression from commit b5699cd01b6a52906880c107bac6f3802ea7353d Date: Wed Feb 8 16:18:32 2017 +0200 convert BmpConversion to scoped enum Note that this bug has been around since LO5.4 which means that anyone who has adjusted their setting in officecfg/registry/schema/org/openoffice/Office/Common.xcs with key BMP runs the risk of having that setting now revert to its prior (documented) meaning. Change-Id: Ibbda8aefbac261ff37ffab7223714f5d0343c692 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit f7323482ae38c5c4bc39edeea4d1a6e282f896a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88794 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-20tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverrideMichael Weghorn
In fact, the assumption in commit 034f56015c1c7a61faede33fb5306f63b5585632 ("tdf#126785 qt5: Ignore external QEvent::ShortcutOverride") was a fallacy and it's exactly the other way around: "Normal" typing leads to "spontaneous" events of type QEvent::ShortcutOverride, since those originate from outside, are triggered via X11 events or Wayland equivalent, and the non-spontaneous ones are the additional ones that happen when e.g. the Orca screen reader is enabled. In a short test, no non-spontaneous QEvent::ShortcutOverride ever occured when using LibreOffice a bit with Orca disabled on X11 or Wayland (and on Wayland also not with Orca enabled, since Qt accessibility is broken there, s. QTBUG-73945 [1]). (Side note: In a quick test with Qt 5.12.5 and Plasma on Wayland, 'xcbSourceDispatch' from Qt library's qxcbeventdispatcher.cpp was also used in the Wayland case to when processing the keyboard events). [1] https://bugreports.qt.io/browse/QTBUG-73945 Change-Id: I1be1977e67f84fa657f6fc197e0b91822b6a3a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89073 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 69e708868f6046cada955a16bca966370ce3218a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88960 Reviewed-by: Katarina Behrens <bubli@bubli.org>
2020-02-19tdf#128921 tdf#130341 tdf#122053 qt5: Native PopupMenusMichael Weghorn
This implements native PopupMenus for the qt5 VCL plugin, which not only gives them the native look and feel, but also makes context menus faster (tdf#128921), accessible (e.g. to the Orca screen reader, tdf#122053), and makes them work for a case in Base's relationship dialog where entries in the non-native context menu were not selectable/clickable (tdf#130341). For now, this always shows the popup menu at cursor position, which can be changed by taking the Rectangle passed to 'Qt5Menu::ShowNativePopupMenu' into account if there should be any need. Change-Id: Ie52cbc682acacb92716ff51e8bf7f1ab07d34cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88512 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 1e0b16f8695498e4eea7c2208aabf7e7664ce749) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88491 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-02-19Resolves: tdf#130756 null deref in empty treeviewCaolán McNamara
Change-Id: Ie43081d5c1feb655ea1479476375ee7381f0a0ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88947 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-18tdf#126785 qt5: Ignore external QEvent::ShortcutOverrideMichael Weghorn
For some reason, an extra external QEvent::ShortcutOverride event is triggered when a key is pressed and e.g. the Orca screen reader is enabled, which would result in duplicated input when handled as key input event as well. Therefore, ignore those ShortcutOverride events that are "spontaneous", i.e. "the event originated outside the application (a system event)". [1] [1] https://doc.qt.io/qt-5/qevent.html#spontaneous Change-Id: Ibccacb69c31d4d7ebd512c704f0e4df978c5281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88852 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 034f56015c1c7a61faede33fb5306f63b5585632) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88790 Reviewed-by: Katarina Behrens <bubli@bubli.org>