summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-04-07tdf#104686: do not crash if Menu has been somehow disposedAron Budea
The rare crashes in MenuFloatingWindow::ImplGetStartY() and MenuFloatingWindow::ImplScroll(bool) likely happen because of a disposed Menu. Let's guard against invalid accesses. Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16 Reviewed-on: https://gerrit.libreoffice.org/36026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/36151 Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 9fcb6cb86893b991ceb6395fbabba63c962f59db)
2017-04-06Related: tdf#106972 vcl PDF export, PDF images: ignore PDF >= 1.5Miklos Vajna
When copying their page steam into ours, we need to make sure their syntax is <= 1.4; so when checking if the image has PDF data, ignore the case when it has, but it's >= 1.5 (at least in the default case when not using reference XObjects). Change-Id: I6bd77803b92fe16bdd327e5e7c3d2b42adeacca4 Reviewed-on: https://gerrit.libreoffice.org/36161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4443d7be61a9ae45630183d856a566cecd06ad95)
2017-04-06tdf#106972 vcl PDF export, PDF images: handle indirect font referencesMiklos Vajna
There were a number of problems here: - the /Resources key of a page object may be an indirect object - the /Font key of a resource object may be an indirect object - the /Length key of an object may be an indirect object So in all these cases handle not only a direct dictionary / number but also when we have a reference-to-dictionary/number. Change-Id: Ie74371f0ba43a133a1299843ef20cbfc75fe26d7 (cherry picked from commit 242a9b634213acf03cabc373928555dc81afc672)
2017-03-31vcl PDF export, norefxobj: add test for thisMiklos Vajna
Assert two important properties: - the pdf image is described using the form xobject markup (not the reference xobject one) - the form xobject refers to a vector image, not to a bitmap one Change-Id: I94b88976c1e5392758d56254143fbeeeeba51412 Reviewed-on: https://gerrit.libreoffice.org/35901 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 932f6a8f37fbd99fc2ed16aa37966658d388c975)
2017-03-30vcl PDF export, norefxobj: copy each object only onceMiklos Vajna
Even if they are referenced multiple times. This is especially important as objects can refer to each other, creating a cyclic graph. But it also makes the output a tiny bit smaller. Change-Id: I561ac319683a19a797282fe259cc68f3a4c50c3e Reviewed-on: https://gerrit.libreoffice.org/35855 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 92ddc0409c8d3276183afdee543d28e1c307c2c7)
2017-03-30vcl PDF export, norefxobj: avoid replacement bitmapMiklos Vajna
The whole point of "no reference XObjects" is knowing this vector markup is supported everywhere, so no need to provide a fallback bitmap. It was already unreferenced, but now it's not even written to the file, making the PDF export result smaller. Change-Id: Idf766c8eeded4235ebea49d13698a13c6b60f014 Reviewed-on: https://gerrit.libreoffice.org/35841 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 30102ded91b9ecfea172ffc6443154230ee37cbd)
2017-03-30vcl PDF export, norefxobj: add UI for thisMiklos Vajna
Disable the "use reference XObjects" (old behavior) by default, but keep it as an option in case someone wants it. Summary till the help is updated: the old way is simpler code, so it's always correct, but really only Acrobat supports that markup. The new way is supported by all readers, but more complex, so it's more likely it goes wrong. Change-Id: I4769474f29d98412be496a0aa4e8254ae4f0919e Reviewed-on: https://gerrit.libreoffice.org/35826 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 9c944b0d1bff9a0ab1b7e8454c9ac5e7194aa533)
2017-03-30vcl PDF export, norefxobj: have the list of keys to copy at one placeMiklos Vajna
To avoid repeting ourselves. Change-Id: I39667620b9cf391251327c8f66ad8b9649ead36f Reviewed-on: https://gerrit.libreoffice.org/35810 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f86c3fd8e95f378061d57b77d1c700e076996086)
2017-03-30tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied arraysMiklos Vajna
Also fix confusion about dictionaries in arrays and arrays in dictionaries. Change-Id: I0d71d5796b1eb4f89e3fd9a5b1f807d2a7340a35 Reviewed-on: https://gerrit.libreoffice.org/35806 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 30608c66374f8effa9d534f7f9a22d41daa9770f)
2017-03-30tdf#106693 vcl PDF export, norefxobj: copy nested arrays correctlyMiklos Vajna
When copying an array we're only interested in the start/end position of the outermost array, otherwise only part of the array is copied. Change-Id: I9f5cb5e3ed395142fd82db34e1153ddfdf9f0eb3 Reviewed-on: https://gerrit.libreoffice.org/35797 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 3ea5e3401e567bfe956817fd5abd17530da664f5)
2017-03-30tdf#106693 vcl PDF export, norefxobj: handle multiple refs in copied dictsMiklos Vajna
When copying font definitions the dictionary has multiple values where the type is a reference. Improve PDFWriterImpl::copyExternalResource(), so that multiple references are copied correctly as well. With this the bugdoc (from comment 5) text appears in the output. Reviewed-on: https://gerrit.libreoffice.org/35760 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 2ba9d58d5978c94352c4c6cf9c47aa3de79d05fe) Change-Id: I2343e616d8b36e3cdcbd4e713bd3f7fa7bce6d3b
2017-03-30Missing check for rStream.IsEof()Stephan Bergmann
...after a324099538916eae7f7239d32fd98ec8018cbb72 "xmlsecurity PDF signing: only write incremental xref in an incremental update" inserted the 'if' before the 'while (!rStream.IsEof())' Change-Id: Ib527894031f356c3d6df40b70259469ef4c338de (cherry picked from commit e8aaaa52fa5abe4a70224ab6e6eee6265b0d61c8)
2017-03-30vcl PDF export, norefxobj: improve ref handling in dictsMiklos Vajna
When copying objects referenced from the page stream support references in any item value, not just for one single item key. Also move the dictionary entry generator code to PDFWriterImpl::copyExternalResources(), so other keys can be copied without code duplication. Change-Id: I4004e82014cec915c66a8a9d3aed2155fa2452ef Reviewed-on: https://gerrit.libreoffice.org/35755 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 06d073695c764744d308c74f80c40a317255fc05)
2017-03-30tdf#106693 vcl PDF export, norefxobj: copy array objectsMiklos Vajna
So far only the dictionary and the stream of the object was copied, see if it has an array, and take care of that as well. Also check if the array contains a reference and act accordingly. Change-Id: I7f3bb12ec0bbc6f6e1db4f43625c7768b862c895 Reviewed-on: https://gerrit.libreoffice.org/35744 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 044e8d795276cc495c1f796a14ad36e6a5f9cdb9)
2017-03-30tdf#106693 vcl PDF export, norefxobj: update XObject refsMiklos Vajna
Start copying referenced objects recursively, and also take care of updating references to the object IDs as they appear in our output. With this, the 4th image referenced from the PDF image has a correctly updated reference in its dictionary's ColorSpace key. Change-Id: I8b49701c1f60bd0ef5a097b24ce59164554c44fa Reviewed-on: https://gerrit.libreoffice.org/35653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f135a8bdeba15cf72dd31c7d613d335bbfc7017b)
2017-03-30tdf#106693 vcl PDF export, norefxobj: copy XObject referencesMiklos Vajna
With this the images inside the PDF image show up correctly. Change-Id: I430502fb6ae9de8111dda7e67db33642ff263317 Reviewed-on: https://gerrit.libreoffice.org/35621 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1f2bccf2d28d4257aa0e325658d35182367b59d9)
2017-03-30tdf#106693 vcl PDF export, norefxobj: handle compressed page streamMiklos Vajna
Since we want to avoid re-compressing the page stream create two form XObjects: one that resets the graphic state to the default (e.g. line width) and an other one that contains the original page stream as-is. With this PDF images where the page stream is compressed are handled correctly. Change-Id: Ib44dae2e167e4d5604a0a3a3cf91e09795137343 (cherry picked from commit d0c24cbb027130f3781bfc3475dd225190afd560)
2017-03-30tdf#106693 vcl PDF export, norefxobj: copy page streamMiklos Vajna
This gives correct result in very simple cases when the page stream is not compressed and it references no other objects from the original file. Change-Id: I11ed50180a256bdb5c587fd8927d21c925100a4d Reviewed-on: https://gerrit.libreoffice.org/35580 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit d27818c1f34b01190bf419c34d6a174f3cad7894)
2017-03-30tdf#106693 vcl PDF export: initial UseReferenceXObject optionMiklos Vajna
It's still on, but in experimental mode start work towards the ability to not use that markup. Change-Id: Idf11c0e0a3c61ad93af331346ec7107304f6dc0f Reviewed-on: https://gerrit.libreoffice.org/35538 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 5f4826d89bfa1398b16fc85cf593ff58ce5e36a9)
2017-03-30vcl: move in PDF tokenizer from xmlsecurityMiklos Vajna
The PDF code in xmlsecurity served two purposes: - a generic PDF tokenizer - signature verification The first purpose is useful to have in VCL, so the PDF export code can use it as well when it comes to PDF image handling. This commit just moves most of the PDF code to VCL, it does not touch the PDF export code yet. With this, also the somewhat odd xmlsecurity dependency of CppunitTest_vcl_pdfexport can be removed as well. Change-Id: I6fe8294ed5c4aa4d79f4b2ddef80a4d1c9d566cc Reviewed-on: https://gerrit.libreoffice.org/35513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 7415b71b7976319b0c04e670facabd20b30e3fe2)
2017-03-30Resolves: tdf#106155 avoid opengl for toplevel X window iconsCaolán McNamara
because an opengl context requires a toplevel window so it recurses to death. Only the gen/kde4 vclplugs are affected here Change-Id: If5396d183d90d1872931b170dc90c3a70d8ea6b6 (cherry picked from commit b012e83e1cd09a0b6f9ede94a5c2d72d24459ce4) Reviewed-on: https://gerrit.libreoffice.org/35803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit b96c52baa6b9607d9a31cd1b34162e4ee041f9b6)
2017-03-30Resolves: rhbz#1436050 im window misplaced for gtk3Caolán McNamara
events are relative to event window not the toplevel window which includes a menubar widget (and maybe the decoration topbar as well) Change-Id: I5101bd4a35d6e3aee03191594e5f6edb7ca34c69 (cherry picked from commit 32351d1bd34a0a0d3bb8fa41667a770c125de460) Reviewed-on: https://gerrit.libreoffice.org/35761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit b986fa2c66e272d926b189683c12cca81bcb5125)
2017-03-30Resolves: tdf#106645 gtk3 scrollbar is too wideCaolán McNamara
Change-Id: I4041dff0945c4bd34e085078a7130b637124c6cd (cherry picked from commit aa5d6f5acbab12b1ba76365f776ba228ba5e7e0e) Related: tdf#106645 make gtk3 scrollbar themes with arrows work properly, e.g. breeze-dark has arrows Change-Id: Ic59c0de3fb385adc2f8fddc605edd7498230d5fb (cherry picked from commit 9b7c35b4b7fd5a5347a3602f110d78e1019a54e9) Reviewed-on: https://gerrit.libreoffice.org/35540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 97a036e5a4b410b3f260a27566c695ac801b7ffb)
2017-03-29Attempted fix for mirrored geometry crasher.Michael Meeks
Only plausible cause is pWindow->GetParent() being null, while we have a pParent which has to be valid. http://crashreport.libreoffice.org/stats/crash_details/6161398d-17b6-4a93-aa70-a559efa07868 Code was initially introduced in this form: commit 4716735ba7d0ad133ff018481f94d6b4f201bbd9 Author: Stephan Schäfer <ssa@openoffice.org> Date: Thu Sep 19 15:46:19 2002 +0000 #103362# improve positioning and resizing of system windows No public report, sadly. And modified by commit fba46c6efd08d50fee92cc11546f3ed253a57af8 Author: Chris Sherlock <chris.sherlock79@gmail.com> Date: Mon Feb 3 16:46:04 2014 +1100 fdo#74424 Use Window::GetOutDev() to access ImplReMirrored() Part of the decoupling of Window from OutputDevice. We now get he Window's OutputDevice instance and manipulate this. Do not rely on the inherited function. where the GetParent()/pWindow->GetParent() problem surfaces Change-Id: Ia261028a4719525135e3fe4b00074427c1d9df6c Reviewed-on: https://gerrit.libreoffice.org/35796 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit d93b8268da982ad26db9e03156ce9b89f3410486) Reviewed-on: https://gerrit.libreoffice.org/35827 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 39a09641a1d2e1b50c831fe5ecf3dc0b0174a210)
2017-03-24lok: Scheduler::ProcessEventsToIdle() needs the solar mutex locked.Jan Holesovsky
Change-Id: Ibd2e40a995e670db09ca7dbf09465a998f832446
2017-03-24lok: Unit test for setting of the language during load of the document.Jan Holesovsky
Change-Id: Idf4d3ba6b55be1f885f9d8fc89157e7e498d4e42
2017-03-24Resolves: tdf#105463 convert bmps to pngCaolán McNamara
because bmps aren't seen since... commit c3043a3072465c489d3b20991b17d222771305eb Date: Mon Oct 31 13:28:26 2016 +0100 tdf#103591 icon theme name resolving, ui fixes, prioritize png - Prefer "png" over "svg" because for Tango theme we include both (cherry picked from commit a3c4f39868226151b4b01906cbcf1b6d40740a28) convert from bmp to png (cherry picked from commit 1b7d1d16e3a6826433271b3eed4a2d542585961b) Change-Id: I93755ac95c170c457b32adac07557ed48ad8beee 7fe47f47f19b93eab5d0cef0afde63e6f61c21b4 Reviewed-on: https://gerrit.libreoffice.org/35534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 2fd3d2256096b6cb3565fbeeb9342c9b983a4018)
2017-03-24Keep menubar hidden after Unity registrar activatedMaxim Monastirsky
... if it was hidden before. Otherwise it becomes out of sync with MenuBar::mbDisplayable. Change-Id: I03c551ee70131a50fa694b7009c24833ac391990 Reviewed-on: https://gerrit.libreoffice.org/35487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 6d4844558268ec03da863175e1dc8d571c05ec46)
2017-03-24gtk3: Keep menubar hidden after customizationMaxim Monastirsky
... if it was hidden before. Otherwise it becomes out of sync with MenuBar::mbDisplayable. Change-Id: I4957f5cef916abfa54add2901b330463364d3dba Reviewed-on: https://gerrit.libreoffice.org/35486 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 519254aa32b5ad8a3ae8544d89f76884ab2f6afb)
2017-03-24tdf#106295 fix vertical orientation for fullwidth colon and semicolon.Mark Hung
Chinese users would expect fullwidth colon (U+FF1A) and semi-colon (U+FF1B) to be Tu( transformed upright ) instead of Tr ( Transformed rotated ) in vertical writing mode. Make them exceptions of UTR50 when language is zh. Change-Id: If7d01199973d73136a621bf2f32377da76ccb22a Reviewed-on: https://gerrit.libreoffice.org/34980 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/35382 (cherry picked from commit 465da7d95e17367e615ec5ef65f368d89c8d7f5d)
2017-03-24Handle Tr vertical orientation before shapingKhaled Hosny
See https://github.com/behdad/harfbuzz/issues/355 (cherry picked from commit 5c617a811724a45dd8688869eeafac4c44f6a8aa) Change-Id: Ic82d74046980fae3e7a973fee90fe5bb4f2b8588 Reviewed-on: https://gerrit.libreoffice.org/35387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 49eadd40b5f0de6fa97498d89f20118b996385d2)
2017-03-17tdf#106466: Use graphite2 shaper firstKhaled Hosny
We want to always prefer Graphite shaping when supported by the font, which is also what HarfBuzz does by default. Change-Id: I6670fc03b8e6b3d7e07e1b8e0062880524da1655 Reviewed-on: https://gerrit.libreoffice.org/35046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 3cee50476e422e3ed84169cdcbe6bd9883fc9316) Reviewed-on: https://gerrit.libreoffice.org/35058 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 68b546b17afa0082862f2a20b8f089ae9124a16a)
2017-03-16tdf#106271 Cannot disable Menubar under UnitySamuel Mehrbrodt
Empty the global menu when the user wants to hide the menubar. When showing it again, the global menu is refilled. (cherry picked from commit f2fa5951bf3d02439a3e96d1f9d89962f0901edc) The following commits have been squashed into this commit: 1. Destroy menu widget when enabling Unity integration Like GtkSalMenu::ShowMenuBar did before f2fa5951bf3d02439a3e96d1f9d89962f0901edc ("tdf#106271 Cannot disable Menubar under Unity") Should fix https://lists.freedesktop.org/archives/libreoffice/2017- March/077225.html (cherry-picked from commit 27f89f08cf4086802ce67f12389414bef6ab64ca) 2. Don't use SetDisplayable when enabling Unity mode because now it tracks the global menu too, but all we need here is to hide the in-window menubar widget. (cherry-picked from commit 3daa6c66eb9a4c334d6f72a8fd4bb09d7360a913) Change-Id: I3c5e17100622cd8d22c4348cf90a76233dd0fd4c Reviewed-on: https://gerrit.libreoffice.org/34919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 449733a5c3b59c7b56db1db3dbc7fd0dcefd1a55)
2017-03-16rhbz#1431476 dnd has started copying instead of moving slidesCaolán McNamara
Is suspect something has changed in gtk3, and I think we're not supposed to use gdk_drag_drop_succeeded at this point, but instead we'd get a dragFailed signal on the failure case Change-Id: I6b305db56a29255b468ca9182d1f7e57cb4c10f4 (cherry picked from commit 4ea76db5e53235971b597a2810a6d12618d6aaea) Reviewed-on: https://gerrit.libreoffice.org/35135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 3a4d2433fbf2ef6f41b82482ea99ed79fb2d6735)
2017-03-16Collabora Office: hackish fix of repaint problem of vcl widgetsAndras Timar
Change-Id: Ib0eaba0767ff18d03464ba7d1ec1ffdd2ba3ca78 (cherry picked from commit 55066180e80b77cdf8520b11cc60dec73c6e0d58)
2017-03-14tdf#106270 vcl PDF import: use BitmapWriteAccess::CopyScanline()Miklos Vajna
This requires one function call / row only, cross-platform and works with OpenGL enabled as well. Change-Id: I12fd0f52a1a7e8e683b50071ded95f63fecc4d40 Reviewed-on: https://gerrit.libreoffice.org/34774 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f1d6f202e2b8ff555cedde6315685342325b16fc)
2017-03-14tdf#106206 PDF export: fix unexpected /Im0 in page contents streamMiklos Vajna
The early return should just skip the code that's specific to pdf images, not everything. Change-Id: Ia9e02b05051a085a9fdf2f690c21f9ffccb7bf4d Reviewed-on: https://gerrit.libreoffice.org/34685 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e7adffff8039175bc50b56b4c07ce0b9d8fed629)
2017-03-14tdf#105093 vcl PDF export: add embedded video testcaseMiklos Vajna
Fails with commit 4ad249af88d15f2c8a09f0721a59d82718fcc201 (tdf#105093 sd PDF export: handle embedded videos, 2017-01-04) reverted. Change-Id: I413ec9a5da3c0783541dcd28fb9a62dd896f955b Reviewed-on: https://gerrit.libreoffice.org/34681 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 64bac5c0f005afd46bbf402c5d548e2ee6c9e5c4)
2017-03-14tdf#105461 vcl: add text highlight textcaseMiklos Vajna
Fails with commit ee32c7d8083ae1449d6b379034be92995c142da9 (tdf#105461 PDF export: handle text fill color, 2017-02-01) reverted. Change-Id: I3628a16d0810e3be3fb352340d06cdba472dcd3f Reviewed-on: https://gerrit.libreoffice.org/34621 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 4e203ca3915e0cee2e7e02b95e78b3f5a8870098)
2017-03-14the test implicitly requires pdfiumMarkus Mohrhard
Attempt to fix build issue found by "RandomCondig" tb build #244 Change-Id: I8b6a0a3d0f812a3220fb0d7d21318871454f7eca Reviewed-on: https://gerrit.libreoffice.org/34646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 89b64e865bfb6739be07d1fb0b5dfa5fa3651a44)
2017-03-14vcl: add initial CppunitTest_vcl_pdfexportMiklos Vajna
Invoke the PDF export filter and then use the PDF tokenizer from xmlsecurity to assert the contents of created PDF file. The testcase fails with commit 6db0f1feb1d9931d2726dd11a889c58815710ce0 (tdf#106059 PDF export: create a reference XObject for PDF images, 2017-02-22) reverted. Reviewed-on: https://gerrit.libreoffice.org/34609 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 58eac1105f8504bd5320911fc6fe967ccaa3d469) Conflicts: vcl/Module_vcl.mk Change-Id: I90526fef41d9560ae447f586df766bc50a491c43
2017-03-14vcl PDF import: there is no PNG encoding hereMiklos Vajna
It was a copy&paste error from xmlsecurity/workben/pdfverify.cxx, which does PNG encoding. Change-Id: I7b5108a7cddffdc859276b656a6e1168f23d3863 (cherry picked from commit 89e339fc1937b7de0d0e1f4ced802db7b4a68a9b)
2017-03-14tdf#106059 PDF export: create a reference XObject for JPG images with PDF dataMiklos Vajna
In case the bitmap is large enough, the bitmap for the PDF image is a JPG one, not a PNG one. Handle this case as well. Also stop compressing the PDF data: Adobe Acrobat gets confused when the second bugdoc is compressed and it doesn't provide much as most of a PDF is already compressed anyway. The rest is just refactoring to decouple the reference XObject code from PNG, to be able to use it for JPG as well. Change-Id: I5314a39b0f6d8c6493ecb36a0c588c895f5a70ee (cherry picked from commit 78e25558e86188314b9b72048b8ddca18697cb86)
2017-03-14tdf#106059 PDF export: create a reference XObject for PDF imagesMiklos Vajna
If a reader is capable of showing reference XObjects, then it can show the original/vector PDF image instead of the bitmap fallback. Change-Id: Iac8a460c43ff7467e3a5fd8ee4cbf2179084335b (cherry picked from commit 6db0f1feb1d9931d2726dd11a889c58815710ce0)
2017-03-14tdf#106059 PDF export: set matrix and bbox for PDF imagesMiklos Vajna
We still unconditionally refer to the bitmap, but now the correct /Matrix and /BBox is set along with the necessary scaling inside the stream, so that when there will be a vector image reference, it'll appear at the correct position / size. Change-Id: I9c13c11fe76995b3b3d31a135eeaa895ee0abb0d Reviewed-on: https://gerrit.libreoffice.org/34543 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 57c5ad79609134e0ff0013a002cc80a570e81c20)
2017-03-14vcl: use auto when initializing with a cast in pdfreadMiklos Vajna
Change-Id: Ic785ef3f767cf529dc51e4d49234145fc8d14f97 Reviewed-on: https://gerrit.libreoffice.org/34535 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit af8c0696e56395d48f8d8d75a37ced1c58a5be17)
2017-03-14vcl PDF filter: avoid copy&pasteMiklos Vajna
By using a single ifdef block for the disable-pdfium case and by adding PDFWriterImpl::BitmapEmit::getObject(). Change-Id: Ia21e16d469bc75e9b1a95342ed01caef3e91ccd9 Reviewed-on: https://gerrit.libreoffice.org/34462 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 711bc66ca34d3b1293a01fa7db16522b87055495)
2017-03-14new loplugin: useuniqueptr: vclNoel Grandin
Reviewed-on: https://gerrit.libreoffice.org/32948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e8b49f09074fe184374bee5062715357427ae044) Conflicts: include/vcl/graph.hxx vcl/source/filter/ixbm/xbmread.cxx Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec
2017-03-14Werror=unused-function in some configsCaolán McNamara
Change-Id: I7cc4106063831f342c82c57b0476b9ac8c4b479a (cherry picked from commit 3713c17ee474af6bcb22c219ab81108411083fa0)
2017-03-14tdf#106059 PDF export: write form XObject proxy for PDF imagesMiklos Vajna
PDF allows referencing a page of an existing (embedded) PDF file together with a fallback bitmap, but this is only allowed for form XObjects, not for image XObjects. So case the image is a PDF one, wrap the image XObject in a form XObject, that will allow later referring to the embedded PDF image. Change-Id: I30839dd6696f1fddd8ca2caa0d33123e90fcedbc Reviewed-on: https://gerrit.libreoffice.org/34376 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 42c0dfbd6b08ecbc5893595a4100d572a3082d8a)