summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2020-10-28pdf: deduplicate resources when copying from external PDF streamTomaž Vajngerl
When using external PDF stream/data (from PDF graphic objects), make sure to copy the content of external PDF resources (fonts, bitmaps, forms) only one time (by sharing the map between calls) and every other use, just use the reference to the objects. Change-Id: Ibaa632c8f74806eb195e69404551db6fd077a986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104935 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-28use vcl lin. gradient drawing in drawinglayer + cairo impl.Tomaž Vajngerl
This adds a divert for drawing of linear gradients drawing, which can be implemented natively with a much higher quality and speed. This also adds a implementation of drawing linear gradients with cairo. Change-Id: I8c39915c3579e6eb88cdce8ae4ac9694ffdb4957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103374 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 20c09d351ee060bdde13d92d2bf86dd998cdb0cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103425 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-09tdf#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-08-19vcl: save and load the page number when swapping the graphicTomaž Vajngerl
PDF vector graphic includes a page number, of the page that the graphic is rendering. This however isn't remembered when swapping out and back in the graphic, because the serialization format doesn't include it. This adds a version 2 of the serialization format, with an additional page number (page index) attribute. Also changes the GraphicTest to account for an additional 4 bytes written and the change of the checksum. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100836 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 28beaffba6a0ecaf351c84bed41443a6721d85b6) Change-Id: Ic0fbfc4ad983f7880e06956da3b4664bd4b610d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100883 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-19Test swapping of GraphicTomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 287e39d363012788bf1f5bdb94fdebd370e8763d) Change-Id: I895002aa31380d2b5bc2593e66080f3fc94034e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100881 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-18headless: don't allow the system to set subpixel rendering eg.Michael Meeks
Change-Id: Id62c03938c88d70dabda6111b8a7cca3b175e31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100875 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-23limit exposure of methods exposed for LibreOfficeKit purposes to just thatCaolán McNamara
Change-Id: I4685651a6ecf48b7cbf3048b28788b351c655c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98212 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99285 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-07jsdialog: force update if tab is selected againSzymon Kłos
This will allow to add additional tabs in the view (not existing in the JSON) and switching tabs still will work properly. Change-Id: Ia6901da3157b391502d5170f599410bfd6ea2c61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98253 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-03jsdialog: weld text viewSzymon Kłos
Change-Id: Ia3bae7a8b812e791fc6a8888e63adca17b8910d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97764 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-02jsdialog: regenerate JSON on dialog collapseSzymon Kłos
Change-Id: I407979546a7610630e8109b57db8c98c956baaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97735 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-02jsdialog: move executor code to vclSzymon Kłos
Change-Id: I9247a652707fe3239dc488a605a2c506d8eec95c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97736 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-29sd signature line: extract page resource / content copy codeMiklos Vajna
So the "sign existing pdf" code can reuse it. (cherry picked from commit 3bb145bd4665a871491b08f75057223bab798d45) Change-Id: I63a811f0c6f2bc2eeb29507aff9bc35e92a081cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97250 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-29sd signature line: teach PDFDocument how to use PDFObjectCopierMiklos Vajna
This will allow using the object copier in PDFDocument::WriteAppearanceObject(), so we can include the signature line pdf export result in a pdf signature of the original pdf. (cherry picked from commit f9ac4ab61fa2ebcafa8ea8957db01104a927bff2) Conflicts: include/vcl/filter/pdfdocument.hxx Change-Id: Iabc508081c5820f4ca997a2d264de9bdb06f82bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97249 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-29sd signature line: extract copyExternalResources() from the pdf export codeMiklos Vajna
Because I would like to reuse this in the "sign existing pdf" code, in vcl::filter::PDFDocument::WriteAppearanceObject(). (cherry picked from commit 8277073ce3e33788d93b3df490a8f03d1814863b) Conflicts: vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/pdfwriter_impl.hxx Change-Id: Ia5e5c1e452bb0d0486bde2a082375b5131eea8c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97248 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-26notebookbar: remember LOKWindowId in interim buildersSzymon Kłos
In case of notebookbar we need to remember the same id in every builder for each view to be able to use interim widgets. Then widgets are added to the same map as main notebookbar widgets. SfxViewShell is used as a common id as it is easily accessible. Change-Id: I4fbf2da320396efc80b08bcee9e341c165b1a290 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97199 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-26revert jsdialog: always clean remember widgetsSzymon Kłos
Don't delete all widgets when nested tab page is used Change-Id: I0ce2ce976791ca0c8325013df10f01abe341b78d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97119 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-26most of jsdialogbuilder is not used outside vclCaolán McNamara
so split it into the bit that is needed and just include that. add missing license headers Change-Id: I875f91176e6881e830fee6a58368d0b28ce9a0f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96774 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97118 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-23Resolves: 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96919 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-06pdfium: support for pages when using PDF import with pdfiumTomaž Vajngerl
Moving PDF to use VectorGraphicData in Graphic has temporary removed the support for showing different PDF pages when opening the PDF using pdfium (LO_IMPORT_USE_PDFIUM=1). This adds the support for back by specifying whcih PDF page to render when creating the VectorGraphicData (and can't be changd afterwards), which is used to create a Graphic and contains the PDF source data array. Change-Id: Ib915216b8d4c0c063d0fead44ff156b1915a35d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90562 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 27ee05f860e8225a41e15e0853fcef00a9d7a621) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95628 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-06pdfium: Make Insert -> Image... use VectorGraphicData for PDF.Jan Holesovsky
In principle, the current Svg/Emf/Wmf and PDF handling is trying to achieve the same thing: Keep the original stream untouched, provide a replacement graphics, and a kind of rendering. To hold the data, the Svg/Emf/Wmf and PDF were using different structures though. This commit consolidatates that, and makes the Insert -> Image... (for PDF) actually using the VectorGraphicData to hold the original stream. This breaks loading the PDF as a document via PDFium - I'll fix it in the next commit(s). Change-Id: Iac102f32b757390a03438c165e430283851cc10b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90561 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95618 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-06vcl: move GraphicID out of impgraph.{cxx,hxx}Tomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89449 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit b6bc43f354bcbe6a98db9fb372fd47bc5b23f4d8) Change-Id: I0b3b17736a76be290f6e5b77ee547b7e650d4489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95616 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-06move GraphicReader class out of graph.hxxTomaž Vajngerl
Change-Id: Id78995bfb8e8308a388ed542690ad85e4d19ce12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88425 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 203abaaaaa33e6631315c735f6d42ad2c088a973) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95615 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-03add a SystemChildWindow::GetOptimalSize overrideCaolán McNamara
Change-Id: I812d996e78a6d627fda6612307ca4cb2f111b6a9 Reviewed-on: https://gerrit.libreoffice.org/85325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-06-03get native gtk widgets in sidebars workingCaolán McNamara
Change-Id: If65aef1249f54a87d7854c3fa2db4319a24a5a05 Reviewed-on: https://gerrit.libreoffice.org/85326 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-05-27vcl: sfx2: LOK: Support per-view popup windowsAshod Nakashian
While we do support multiple views, there is only one state for popup/floating windows, that also includes the dialogs open and related windows/data. This adds support to allow each view to have its own popups and state, thus allowing multiple users to interact with the dialogs independently of one another. (cherry picked from commit b50c341a53911f1d725947a4d8d3d2f782c94079) Change-Id: I3786a561ca6ca113ad12425bdb491e5a30bd1a28 Reviewed-on: https://gerrit.libreoffice.org/82440 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/85221 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-23tdf#130478 Enhance Dashed line drawing on all systemsArmin Le Grand (Collabora)
For more info and explanation including state of process information and discussion(s) see task please. Adding corrections for gerrit build Change-Id: Ie10fb8093a86459dee80db5ab4355b47e46c1f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88130 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-05-23tdf#129845: Better solution using already existing infoArmin Le Grand
Use calculateCombinedHoldCyclesInSeconds() in central places of system-dependent buffering and the zero value to early exclude data from buffering. This solves the problem on all system-dependent usages in a central place. Also enhanced to roughly allow buffering for bitmaps unchanged, for polygons starting with ca. 50 coordinate pairs. Added special treatments to Cairo version to allow temp buffer objects without copying the path data. This needed some extra stuff due to Cairo not allowing to work with it's cr-internal path object directly. Change-Id: Icd0a0d8091707fe356a82f5c7ec48f36ad44ccde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87199 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2020-05-18jsdialog: Remember builder connected with LOK window idSzymon Kłos
Change-Id: I9e38fe570b2296341c1694fe8128da30ba209494 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94184 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-18jsdialog: refresh on notebook changesSzymon Kłos
Change-Id: I81159d043add3d8bdd1b81f26f642f99c1430f73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94183 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-18android: Introduce --enable-android-lok configure switch to fix RGB vs. BGR.Jan Holesovsky
This indicates that the build targets the Online-based Android app, for which we need to avoid various tweaks that are needed for the 'old' Android app present in the android/ subdir of core.git. In particular, the switch used in this patch fixes a RGBA vs. BGRA confusion that caused yellow <-> cyan switch in the Online-based Android app. Change-Id: I5f394868f51ce87013677834cfafb967b9bb333e Reviewed-on: https://gerrit.libreoffice.org/83342 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 49002a143a4534df5f6139e07fefd06174621c59) Reviewed-on: https://gerrit.libreoffice.org/83718 Tested-by: Jenkins
2020-05-17widget theme: add additional settings to the theme definitionTomaž Vajngerl
Change-Id: Ib50ebadf73979068d3595f09de113aa8745eccb9 Reviewed-on: https://gerrit.libreoffice.org/83591 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-17widget theme: add centeredTabs setting to theme definition fileTomaž Vajngerl
Change-Id: I714a44d40a99e0bb5ff48e3d36ded73db60af5a0 Reviewed-on: https://gerrit.libreoffice.org/83133 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-15jsdialog: react on button state changeSzymon Kłos
Change-Id: I19b8b4f123373da1acc7e2815086a67bcdb43e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94148 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14jsdialog: Common weld::Widget implementationSzymon Kłos
Change-Id: Iab21652c6abaf143fb421d6030f6acc394733bcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94073 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14jsdialog: weld::ComboBoxSzymon Kłos
Change-Id: I672d2fd170e94e0b3e05384461983e5ae4a0ab35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94072 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Resend jsdialog on entry changeSzymon Kłos
Change-Id: Ic255b8ba56f5b355a95ddc9a9587e1747b66702a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94071 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move messagedialog header to shared includeSzymon Kłos
Change-Id: Ice8d01d2bb62667667a4c5f0366120cdb7600472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94040 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Create weld::Builder implementation for JSDialogSzymon Kłos
and use for WordCountDialog on mobile Change-Id: I12c3455ff9b16c30918067f9282b72f49141a308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94041 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceCheckButton to header fileSzymon Kłos
Change-Id: Id6597cd259abefe69a61f0ab414c6bd2114c9749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93977 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceMessageDialog to header fileSzymon Kłos
Change-Id: Ie982bae356f3e13ec40012e5dd9bac45887d2925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93976 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceNotebook to header fileSzymon Kłos
Change-Id: Id14b6fca6f12f49691a621f636300f9da320834c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceButton to header fileSzymon Kłos
Change-Id: I3f6aa1975ae5859e0c340c82627d95e49313a668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93483 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceComboBox to header fileSzymon Kłos
Change-Id: Iafa449cc1ebba93cc69da194857ea33b8f8510b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93482 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-14Move SalInstanceEdit declaration to the header fileSzymon Kłos
Change-Id: I660de317b88c4e83ccc310743dc4ef5b4c955a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89370 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93481 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-05-14Create header file for SalInstanceBuilderSzymon Kłos
Move more declarations for SalInstance to header file b7240ffd003e202be04b462209cfb2abafcc18ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89102 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93480 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Change-Id: If8d7578d9a5926cdf565efbf0bc12719e5ef6fc2
2020-05-13lok: Support per-view help dataTamás Zolnai
Used for showing tooltip windows in LO online. Change-Id: I8b6a7272c75025e717923c839fa8fd9f4cab2903 Reviewed-on: https://gerrit.libreoffice.org/84717 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84803 Tested-by: Jenkins
2020-05-09android: add abstraction to allow us to DetachThread sensibly.Michael Meeks
If we fail to do this after runLoop - some Android VMs can get really upset if we quit a thread without doing this, also ensure that we AttachThread to new polling loop threads as we come in for good measure - duplicate Attach's are NOPs. Change-Id: I32454773af4e02c97df0b6c02f61b1dc74df80b0 Reviewed-on: https://gerrit.libreoffice.org/84956 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 7241382ccc0a028c5f08304090a6344e582db068) Reviewed-on: https://gerrit.libreoffice.org/84969 Tested-by: Jenkins
2020-05-08lru_scale_cache - cache the same bitmap at multiple scales.Michael Meeks
Helps accelerate different views at different scales, as well as document / image thumbnailing on save, as well as stray views that can get rendered behind the scenes at odd scales on mobile. Each scale + bitmap combination is another key in the LRU table. Change-Id: Id82ce2e4180608082c9ca16fad35bba9e8c2e81a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89497 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89503 Tested-by: Jenkins
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-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