summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)AuthorFilesLines
2018-11-13LOK: update main threadAndras Timar1-0/+7
Change-Id: I75df6ae9f9fb41b08a8774ce026f79fdd120b629 Reviewed-on: https://gerrit.libreoffice.org/62921 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 6f076e75b2adb4628ee3cea311781c40f219bba7)
2018-09-13lokdialog: no invalidation when in init showPranav Kant1-1/+1
This improves LOK dialog opening time considerably. libreofficekit/tilebench results: Before: profile run: initialization - 346.5185(ms) load document - 2162.5881(ms) open dialog - 7077.8980(ms) wait for dialog - 52.7742(ms) render dialog - 256.9597(ms) post close dialog - 523.7811(ms) destroy document - 58.3723(ms) Total: 10.4789(s) After: profile run: initialization - 336.5867(ms) load document - 2155.5481(ms) open dialog - 1151.4130(ms) wait for dialog - 51.5332(ms) render dialog - 260.3197(ms) post close dialog - 519.8729(ms) destroy document - 56.7322(ms) Total: 4.5320(s) Change-Id: I6345aca33c5881aba33c8a5f74765b99fe098711 Reviewed-on: https://gerrit.libreoffice.org/57561 Tested-by: Jenkins Reviewed-by: pranavk <pranavk@collabora.co.uk> (cherry picked from commit 8de98e61fbc96bf523b3dec7e1e52eb7e2d7693e) Reviewed-on: https://gerrit.libreoffice.org/57562 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit a861adc9b0f4a527d1fe8c415dab33ce9d396de0)
2018-08-20lok: sc: tunneled spell-check context menu appear in bottom right cornerMarco Cecchetti1-7/+16
In the end it seems that in this context LogicToLogic is used for converting non-pixel units, too. Change-Id: I268e5522e929dd55af1284c38780064315d8cd41 Reviewed-on: https://gerrit.libreoffice.org/54465 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 873f09df02a14c8e16ff13ce189c0af3317a754a)
2018-08-20lok: charts context menu was misplaced + wrong LogicToLogic conversionMarco Cecchetti1-4/+7
Chart context menu was misplaced since the context menu expects a position related to the document window not to the chart window. Moreover map mode is not enabled for chart window, that leads to use the LogicToLogic routine which unfortunately provides a wrong pixel to twips conversion. In fact we gets a 20 twips per pixel conversion since LogicToLogic uses a fixed 72 dpi value, instead of a correctly computed output device real dpi or at least the most commonly used 96 dpi value. Change-Id: Idb4220d03fddd4b6d643c1c0fb52754bafed7e36 Reviewed-on: https://gerrit.libreoffice.org/53118 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit fc409bae21ff400736278294ab6a82a5f3cedfa7)
2018-08-08forcepoint#66 make sure we don't get stuck endlessly reparsingCaolán McNamara1-3/+8
Change-Id: Ie2733e8d7f73e5f6a072604c477e949cd944189a Reviewed-on: https://gerrit.libreoffice.org/58466 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit cc8140fe71becc92976167e2a96dbe1d727097dc) (cherry picked from commit fab30b5d512edf8d5252ddde4132b0f310431afd)
2018-08-08forcepoint#66 protect against infinite parse recurseCaolán McNamara1-9/+12
Reviewed-on: https://gerrit.libreoffice.org/58452 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 171657a1f675268839526b1a13e5f3549fb73516) Change-Id: I0313cc141469a00b7d6a5bd15400e9d5a8f686cf (cherry picked from commit 9291178596c4e5165de51c0be5a525cbaa564140)
2018-08-08forcepoint#65 pdf page visiting revisits itselfCaolán McNamara1-4/+16
Change-Id: I6d9eb75f0850a94814fb4d69ea1442b826674496 Reviewed-on: https://gerrit.libreoffice.org/58418 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit e6d5ef741c75895ed97801112823b8332557d79a) (cherry picked from commit d63463b0001cc6a439840d0cee36b6678aea467e)
2018-08-08forcepoint#53 restrict to expected index rangeCaolán McNamara1-2/+7
Change-Id: I22f01e5a3e3cf51b014ac841cd14071dce5baf0f Reviewed-on: https://gerrit.libreoffice.org/57922 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit fa82b6a5c74b527dc2aed9d3b63c997580cdb277) (cherry picked from commit d0f42b02c29c1e6aeeaa13d5f0d4a2e8b5ccb881)
2018-06-22pdfium: Delay the swap out.Jan Holesovsky2-10/+8
If we swap out too early, the constructor of GraphicObject forces a swap in, so we'd render everything during the load anyway. Change-Id: I0ea1a755242fd57ef28d082ce4bf534a32199f87 Reviewed-on: https://gerrit.libreoffice.org/56286 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-06-22pdfium: Avoid unnecessary copying + some warning fixes.Jan Holesovsky1-7/+5
Change-Id: I114fa6b2d3dda86c55eb245d31ca3a1019197ae9 Reviewed-on: https://gerrit.libreoffice.org/56285 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-06-22pdfium: Import PDF with unloaded images.Ashod Nakashian2-1/+79
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8 Reviewed-on: https://gerrit.libreoffice.org/56268 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-06-22pdfium: Keep the PDF data in memory, so that we can really share them.Jan Holesovsky2-73/+88
Otherwise the swap out / swap in creates new copy of the underlying PDF stream. Change-Id: I88a16a69143783a998201e183bea1a9553e337bd Reviewed-on: https://gerrit.libreoffice.org/56266 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-06-22pdfium: Share the GfxLink for PDF files.Jan Holesovsky2-5/+31
Partially based on work by Ashod Nakashian, thanks! Change-Id: Id7e8c4543368b0caf3e459abaff8c53997779c83 Reviewed-on: https://gerrit.libreoffice.org/56265 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-05-28vcl: fix pdf rendering regressionAshod Nakashian1-1/+3
Change-Id: I6c2c48c033facb317b4ca7ed2af07348d6386b98 Reviewed-on: https://gerrit.libreoffice.org/54921 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-05-25pdf: preserve the original page dimensions on importAshod Nakashian1-13/+21
Also allow for rendering PDFs to images at custom resolution, instead of hard-coded (old hard-coded value of 96 dpi is now default arguments). Change-Id: Ia5b52f72d6ce7130a2debc7c6f86504aa041bdc8 Reviewed-on: https://gerrit.libreoffice.org/54786 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-05-24sd: render the correct PDF page on swapping inAshod Nakashian2-3/+6
Change-Id: I81225e228d9cf2b9849110715dbfdeb59f2805dd Reviewed-on: https://gerrit.libreoffice.org/54746 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-05-22sd: support breaking any PDF pageAshod Nakashian1-2/+2
Change-Id: Ifa5f58163bef209a988fc0f88e2b609b1973e0d4
2018-05-22svx: support importing PDF imagesAshod Nakashian1-0/+16
Change-Id: Id4524a30b8f9fa4228c4acb4bf8714700da3017c
2018-05-22svx: support breaking PDFs imported as imagesAshod Nakashian1-2/+2
Change-Id: I990c2b3c3055fbffddedc407c34beb5824277b38
2018-05-22vcl: svx: preserve the imported PDF page number in GraphicAshod Nakashian2-6/+19
Change-Id: I1bb3fa7d44d5f92df2bb8c4ed4b85ccd984c2617
2018-05-22sd: import PDFs as images using Pdfium new SdPdfFilterAshod Nakashian4-4/+37
LOK now opens PDFs as images using Pdfium, which has a superior accuracy and support to poppler, the default pdf reader. (cherry picked from commit 0e8f4f45b44935c7c8002d606b97a48e60e37b23) Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
2018-05-22vcl: support rendering multiple PDF pages to bitmapAshod Nakashian1-36/+49
Change-Id: Id42ecabcad90dde84475a01e5df4ed94f221f5ce Reviewed-on: https://gerrit.libreoffice.org/51255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-05-22pdf: share pdf data in GraphicTomaž Vajngerl3-27/+48
(cherry picked from commit e3b59350ddceb158d01dedfe368bb600a9b37ea8) Also includes... graphic: move access to cxx for PDFData and VectorGraphicData We need strict control when PDFData and VectorGraphicData is accessed and changed, so create access methods for PDFData and move the access methods to cxx (for VectorGraphicData). Reviewed-on: https://gerrit.libreoffice.org/52395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 18caee072ccbd2be7b947ef2659204d3c18a05f1) Change-Id: I39324a807a4db559bad5501b5913e62a0aeabf01 8146aa4e206788afff71142e1877fd7a885f4652
2018-05-22replace originURL with GraphicExternalLink class (internally)Tomaž Vajngerl1-5/+5
For now just introduce the GraphicExternalLink internally in ImpGraphic, and use it for the origin URL. In a future patch this will store additional data about the link. Reviewed-on: https://gerrit.libreoffice.org/52393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit a50897107bca839af5665ee0f9621e9cce54900b) Change-Id: I7b4edac80d0e71603d37243ff28bcac1b18fdc01
2018-05-22vcl JPEG import: remove unused pCallerDataMiklos Vajna5-6/+6
Which is always set to nullptr, is passed around, finally just ignored. Reviewed-on: https://gerrit.libreoffice.org/36662 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 13414a637f30375a62c02f54c054e358f7565d05) Change-Id: I81aecbed33ea249e63fbb412a54345fbb8335e47
2018-05-22add GraphicLoader and funct. to load graphic from URLTomaž Vajngerl1-0/+49
Reviewed-on: https://gerrit.libreoffice.org/50538 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 5f618375a5360160e67f6aac4aece90ab218c081) Change-Id: Ib722ee5bc20908d50642b1371b20c878158204cf
2018-05-22bool cast operator for Graphic objectTomaž Vajngerl1-0/+5
Change-Id: Iec236538271b33eb9e6dcfd98903657c1198476e Reviewed-on: https://gerrit.libreoffice.org/50332 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6fa55d39bc43383fcdb3276e9b7f612fa96d1b67)
2018-05-22graphic: Remember the origin URL after swap out - swap inTomaž Vajngerl1-2/+4
Change-Id: I3874fb43d1b545b334cb7e69fe119945d127f380 Reviewed-on: https://gerrit.libreoffice.org/49646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 075e2d8b8d98b1c6daa430e9b9a396b15ba22837)
2018-05-22Add origin URL to Graphic to remember where the image came fromTomaž Vajngerl2-0/+22
Reviewed-on: https://gerrit.libreoffice.org/49554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit c6a23023150c164a19236139fa413d43006ce21c) Change-Id: I73e7377c2049211de0b464efff03058dc5de33a6
2018-05-22make animation loop sal_uInt32 consistentlyCaolán McNamara3-6/+5
all this foo is ultimately animated gifs and the count there is limited to unsigned 16bit (cherry picked from commit 81047eaebc0e25ff926bf944c57e082a8727c7f2) Change-Id: Ib6e6dde7355f3619bb7735743e686e6338a235ee
2018-05-22tdf#108748 generate PDF preview on SwapInJan-Marek Glogowski4-54/+53
When including a PDF as an image, it's represented internally as a Bitmap with additional PDF data. On SwapIn, LibreOffice just imported the PDF data missing the PDF preview. The Graphic also gad the wrong image type, which results in a busy loop on master, with a strange / unhelpful STR_COMCORE_READERROR generated by SwNoTextFrame::PaintPicture. This is a workaround to generate the Bitmap on SwapIn, which will really slow down LibreOffice when importing many PDFs. I guess the job of generating the PDF previews should probably be deferred to a thread or a low priority Scheduler task, just like the general image loading is handled. Change-Id: I8084e4533995ecddc5b03ef19cb0c6a2dbf60ebd Reviewed-on: https://gerrit.libreoffice.org/43906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-05-22coverity#1079165 Uninitialized scalar variableCaolán McNamara1-9/+10
(cherry picked from commit 9960002118fda6515c6985bc2908a69c0568a71d) Change-Id: I49284d409bbe678e1e018c9d9502d79db5553faa
2018-05-22use c++11 data()Caolán McNamara1-1/+1
Change-Id: Id111686979d6002d4b4206d18980c38e6260971f (cherry picked from commit 73cc391e9c9646e09722ce4324918646202c693b)
2018-05-22Need <config_features.h> hereTor Lillqvist1-0/+2
Change-Id: I391554dff6f92d7639d0a391f4b00437c7648a6b (cherry picked from commit f2278a10b27c6ca53bfdecf385aae6f1d29a36fb)
2018-05-22coverity#1371303 Missing move assignment operatorCaolán McNamara1-0/+41
Change-Id: I0dec3e192f3da895398a8b011c0e7275aab59d73 (cherry picked from commit f40aba6bf6ebe6a2b0da7d5e2fe53e470fe9e0f2)
2018-05-22everything ImplClear clears is managed by their dtors anywayCaolán McNamara1-1/+0
Change-Id: Icafd4a4915d2fb3159b50409e5fc443c58d43d57 (cherry picked from commit 15a2a39ce621dc78449f28301beee895e67aa64f)
2018-05-22Animation dtor will be called anyway, so drop ClearCaolán McNamara1-7/+1
Change-Id: Ifa5a1cf6d782af0bb73ceff10f5a2a2daa4457d4 (cherry picked from commit 9aebc26c9b0aa85acdd8429d16c996f359de3062)
2018-05-22everything reset by ImplClear is going to be overwritten anywayCaolán McNamara1-2/+0
Change-Id: I94de8723a43d177fdf2caf0d8d3e529200d2e718 (cherry picked from commit 00f0694c09241e7708e9443c34b3896be50dfda5)
2018-05-22we copy the flag for the context in the ctor, but not the contextCaolán McNamara1-1/+15
which is worrying, copy the other missing maSwapInfo too which should be safe to do. in the assignment operator, we don't copy any of those three fields at all, which is inconsistent save and restore the context and context flags on the piece where we overwrite ourself via *this = tempobj Change-Id: I06a7d491f95dcb113a3c705ceeb41f576ab0a514 (cherry picked from commit a42e8baed472933d706578916d00b672bb62dedc)
2018-05-22remove weirdness of ImpGraphic assignment operatorCaolán McNamara1-19/+13
seems to me that this hackery is to avoid the swapfile getting pulled out from underneath it during swapin Change-Id: I6b58d7e31731db8edc4026460beabc667204dcae Reviewed-on: https://gerrit.libreoffice.org/33620 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9bf03203cdc789fb7be58e1b8bc6caa63c6dd09c)
2018-05-22move these into the member init listCaolán McNamara1-3/+2
Change-Id: I94a1ea4cb81e2b7383c3e7c56314d08eea754434 (cherry picked from commit ac33904d05ce40b5998b3f1b66a1454d049781be)
2018-05-22ImplClear sets mbSwapOut false, so mbSwapOut is actually always false hereCaolán McNamara1-3/+5
i.e. failure to swap in does not mean that mbSwapOut is true afterwards, and mpSwapFile is discarded. It means the whole thing is thrown away. Change-Id: I73704866d77078c73d053047a7d2ef6499a3e69d (cherry picked from commit 1ddf5b0ecb68333e00df72a9e367b709ff664661)
2018-05-22reformat member initializationCaolán McNamara1-9/+9
Change-Id: I6c86da271d01d63ad426d3ac99068a6ad9663705 (cherry picked from commit 5ff2ae5d727d8e596ead075b46d9203d9acd5d25)
2018-05-22coverity#1399156 split ImplCreateSwapInfo and ImplClearGraphicsCaolán McNamara1-6/+10
Change-Id: Iab449967c70a55c03c3e6b95de8e7d973cb68089 (cherry picked from commit 761af268383e4e7b62e993b262df012f6e1fb332)
2018-05-22vcl: Fix a small chance of memleaksTakeshi Abe1-0/+4
Change-Id: I4fe286486f9cad57c4220d10367442a51f077f00 Reviewed-on: https://gerrit.libreoffice.org/33294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 9aeccd9ac7b71bfa225e4a2c4dd6692a4659da71)
2018-05-22return earlier, no logic change intendedCaolán McNamara1-70/+71
(cherry picked from commit a2aceeb00de1529292709894bdb39b676a3f2337) Change-Id: Icd75c46eb57c059fb60fd9701e6bb1fb651d8f3f
2018-05-22return earlier, no logic change intendedCaolán McNamara1-128/+127
Change-Id: I39679d1c24ffa6f11c067a8fc3957c6a870f7403 (cherry picked from commit 8332bc39f507b659b07fe01a31164c0805175dd6)
2018-05-22Revert "lokdialog: Give non-programmatic name to autofilter"Jan Holesovsky1-2/+0
The online now shows no title when no title name is provided, which is better for the AutoFilter too. This reverts commit 04abf03ecb18ccf1f805faa763d6f29013efc6bb. Change-Id: If3e26e2b6d5b5b5a6d6a85c95ce1b8a7e6d358c8 Reviewed-on: https://gerrit.libreoffice.org/51953 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2018-05-22lokdialog: For the tunneled top-level popups, provide the position in twips.Jan Holesovsky1-5/+15
Change-Id: I7b1ca50b06c3bdf0958bb88946873c6ddf717b0e Reviewed-on: https://gerrit.libreoffice.org/51952 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2018-05-22lokdialog: Invalidate upon window size changePranav Kant1-0/+6
This problem can be seen with some of the dialogs like chart dialogs where not all of the area which should be invalidated is invalidated. The reason being that their container gets resized but not lok-invalidated. Change-Id: I12eb68e8644ca67b2666badb7b772b92a145c624 (cherry picked from commit 73fa910577ec99cf6331123d2fedffa5687b7e6f) Reviewed-on: https://gerrit.libreoffice.org/51265 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>