summaryrefslogtreecommitdiff
path: root/vcl/source/filter
AgeCommit message (Collapse)Author
2018-10-30Fix build in the !HAVE_FEATURE_PDFIUM caseTor Lillqvist
Change-Id: Ia9263e67c3a4094a58141a8140de66a22accb768 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2018-08-10forcepoint#66 make sure we don't get stuck endlessly reparsingCaolán McNamara
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)
2018-08-10forcepoint#66 protect against infinite parse recurseCaolán McNamara
Change-Id: I0313cc141469a00b7d6a5bd15400e9d5a8f686cf Reviewed-on: https://gerrit.libreoffice.org/58452 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 171657a1f675268839526b1a13e5f3549fb73516)
2018-08-10forcepoint#65 pdf page visiting revisits itselfCaolán McNamara
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)
2018-06-27tdf#102928 PDF export: do recompress CMYK imagesMiklos Vajna
The export filter writes /DeviceRGB unconditionally, so for now don't optimize CMYK image handling here. Though the added GraphicDescriptor API allows supporting this natively in the export filter in the future. (cherry picked from commit 70537c8295f1b0a0c58b061dfca6cbc9def0d65b) Change-Id: I76b44b910948467aeb1f15e5ae765201d183c99d Reviewed-on: https://gerrit.libreoffice.org/55378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4aaf958cdad2a19be49dbd5f9ca661753f8a94ab)
2018-06-01vcl: fix pdf rendering regressionAshod Nakashian
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-06-01pdf: preserve the original page dimensions on importAshod Nakashian
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-06-01sd: render the correct PDF page on swapping inAshod Nakashian
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-06-01vcl: svx: preserve the imported PDF page number in GraphicAshod Nakashian
Change-Id: I1bb3fa7d44d5f92df2bb8c4ed4b85ccd984c2617
2018-06-01sd: import PDFs as images using Pdfium new SdPdfFilterAshod Nakashian
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-06-01vcl: support rendering multiple PDF pages to bitmapAshod Nakashian
Change-Id: Id42ecabcad90dde84475a01e5df4ed94f221f5ce Reviewed-on: https://gerrit.libreoffice.org/51255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-03-02forcepoint #16: fix heap-use-after-freeMiklos Vajna
PDFDocument::Tokenize() in the aKeyword == "obj" case allocates a PDFObjectElement, stores it as an owning pointer inside rElements, and also stores two non-owning references to it in m_aOffsetObjects and m_aIDObjects. So make sure those 2 other containers are also cleared then elements go away. LO_TRACE="valgrind" bin/run pdfverify <sample> doesn't report errors anymore after the fix. Change-Id: Ie103de3e24a1080257a79e53b994e8536a9597bc Reviewed-on: https://gerrit.libreoffice.org/50631 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2018-02-05tdf#115416 allow build with classic libjpegCaolán McNamara
Change-Id: I96252e1a78dbc52d21095e11b7bdb0807e5d76b6 Reviewed-on: https://gerrit.libreoffice.org/49205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-23tdf#114460 vcl: handle nested parentheses in PDF roundtripMiklos Vajna
The roundtrip of the pdf image failed due to this. (cherry picked from commit f58a16d5987c8e8c16580c514ce0c7b0895b4105) Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-11-22replace check of eof and GetError with goodCaolán McNamara
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291 Reviewed-on: https://gerrit.libreoffice.org/45076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22drop duplicate methodCaolán McNamara
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17ofz#4291 Direct-leakCaolán McNamara
can't reproduce this, but throw a guess at it Change-Id: Iff6198c463bbab4e3ef87ec62eaa13e88d016a23 Reviewed-on: https://gerrit.libreoffice.org/44890 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17loplugin:casttovoid (--disable-pdfium)Stephan Bergmann
Change-Id: I38017e3b191ef210facf46323c9a3bb5f54bf0a3
2017-11-16ofz#3002 set a limit to how broken a jpeg is to give up recoveringCaolán McNamara
take ImageMagicks 1000 warnings as the starting point Change-Id: Id685764404d27b151daf031a4860055f64dd0915 Reviewed-on: https://gerrit.libreoffice.org/44818 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-15loplugin:flatten in vclNoel Grandin
Change-Id: I3527477277a9ae96eaf9fd068232f672da7c28c3 Reviewed-on: https://gerrit.libreoffice.org/44753 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Fix typosAndrea Gelmini
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-11ofz: XPMReader::ImplGetColKey short readCaolán McNamara
like commit 10a2388558df957b30136ba32ecc97ddef43fb57 Date: Tue Jan 17 12:35:24 2017 +0000 ofz#411: XPMReader::ImplGetColKey short read Change-Id: Iffc7ddb00b2849b2f9fad17314086b87d3097660 Reviewed-on: https://gerrit.libreoffice.org/44628 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-10loplugin:unusedmethodsNoel Grandin
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07fix !HAVE_FEATURE_PDFIUM buildCaolán McNamara
Change-Id: Ied661aafbaf9d85b01ef57e83bbacd9f9a828f2b
2017-11-07tdf#113550 RTF import: fix incorrect text indentMiklos Vajna
Left indent was set to non-zero in the style, but direct formatting set it back to zero. Teach deduplication to remove the NS_ooxml::LN_CT_PPrBase_ind SPRM itself in case the last attribute was removed. Change-Id: I01b202f0241b02816b2b392326737b1150caffc2 Reviewed-on: https://gerrit.libreoffice.org/44385 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-06tdf#108748 generate PDF preview on SwapInJan-Marek Glogowski
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>
2017-11-03loplugin:constparam in vcl,svtoolsNoel Grandin
Change-Id: I7a3eb2bfda869e9e66db919f929ead60cf8890a4 Reviewed-on: https://gerrit.libreoffice.org/44209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-03vcl: remove sgf/sgv ancient gfx filtersThorsten Behrens
Change-Id: Ib02986e5b3d54d65982836e22ebcb70eb7a0e7b3 Reviewed-on: https://gerrit.libreoffice.org/44216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-02improve constparam lopluginNoel Grandin
lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-30loplugin:constantparam in vclNoel Grandin
Change-Id: Ic32e4098dcdae5ca5d7fe2749badedabda86a90d Reviewed-on: https://gerrit.libreoffice.org/44043 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26vcl: minor cleanups in pdfdocumentMiklos Vajna
Change-Id: Ib1284b819d4af2e8055698be4160bbb41acba851 Reviewed-on: https://gerrit.libreoffice.org/43866 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-23loplugin:includeform: vclStephan Bergmann
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-19Avoid throwing C++ exception across libjpeg C framesStephan Bergmann
It causes trouble at least for (non-debug) 32-bit ARM Flatpak builds, where CppunitTest_vcl_filters_test aborts with an uncaught css::uno::RuntimeException. This is a partial revert of 6889fa826eef6bd1074d77507818e71dfe8ba152 "rework jpeg error handling to throw rather than setjmp to avoid leaks", switching back to setjmp/longjmp but trying to keep the leaks fixed by introducing any relevant local variables before the setjmps. Change-Id: Ia5984528ea98be1c89a21aee800b247120f88a89 Reviewed-on: https://gerrit.libreoffice.org/43494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-13Fix typoAndrea Gelmini
Change-Id: Icb23e192961aadcd23d17546aa397df18dd32979 Reviewed-on: https://gerrit.libreoffice.org/43366 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-10-05loplugin:finalclasses in vclNoel Grandin
Change-Id: I7de9cd6c5569217aa8d379c6d112cd1874bca8e2 Reviewed-on: https://gerrit.libreoffice.org/43151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-28RTF export: various minor cleanupsMiklos Vajna
Change-Id: I6bdbe246bf65dcfa193289210f7c464769d5e2ad Reviewed-on: https://gerrit.libreoffice.org/42887 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-26Don't pessimize to RTL_TEXTENCODING_DONTKNOWStephan Bergmann
...when aTextEncodingOrg can't represent all chars, but getBestMSEncodingByChar doesn't know any better encoding, either. (This happened during CppunitTest_sw_rtfexport, where it caused OUStringToOString to be called with RTL_TEXTENCODING_DONTKNOW from WMFWriter::WMFRecord_Escape_Unicode.) Change-Id: Ia975a2907f519172e7da4a370d97e1f4317b78b3
2017-09-14clang-tidy modernize-use-emplace in vclNoel Grandin
Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070 Reviewed-on: https://gerrit.libreoffice.org/42259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11Translate German comments/debug strings (leftovers in dirs vbahelper and vcl)Johnny_M
Translates leftovers found using a custom regex. Additionally: - Translated the "SGV Fonts for StarView" INI file parameter group in vcl/source/filter/sgf.ini and .../sgvtext.cxx Change-Id: I1360aac1a2f3fa825f86d77ac1b05e2de9ffb007 Reviewed-on: https://gerrit.libreoffice.org/42145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-06loplugin:unnecessaryparen include case statementsNoel Grandin
Change-Id: I79fb3eec0d5d466e33b2e18621a7169695edf82f Reviewed-on: https://gerrit.libreoffice.org/41920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-05Drop lazywrite property, which is silently ignored by configmgr anywayStephan Bergmann
...at least ever since the "new" configmgr reimplementation, 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e "#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module 'configmgr2')" et al Change-Id: I43430d991647fb2e26762463d51175247db0604b
2017-08-31ofz#3240: avoid oom in gif loaderCaolán McNamara
Change-Id: Ifd00962ed607166b5521a3977a3021fb7b24957e Reviewed-on: https://gerrit.libreoffice.org/41747 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-28Resolves: tdf#111925 we need to take the buffered data len into accountCaolán McNamara
Change-Id: I8aee1f17e6ec1042e7b67942e5bcad0bb3bbf840 Reviewed-on: https://gerrit.libreoffice.org/41644 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-24remove unused error code in vclNoel Grandin
ever since commit 920d4463f6e59b815852c173e2974ffc7b4bb284 Date: Thu Jun 23 13:13:28 2016 +0200 loplugin:singlevalfields in vcl(part1) Change-Id: I3691d03dadff10585a119ca8db8aa193b5a01702 Reviewed-on: https://gerrit.libreoffice.org/41492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24unnecessary condition:rGraphic.IsDummyContext()ccsheller
when bDummyContext is true at pre code,and call the rGraphic.SetDummyContext( false ). so this is unnecessary condition at follow code. Change-Id: I69da58485fd7b81c9111e188d47b98fe8065fc47 Reviewed-on: https://gerrit.libreoffice.org/41489 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-22unnecessary conditionccsheller
truth table pContext bDummyContext !pContext || bDummyContext pContext && !bDummyContext T T T F T F F T F T T F F F T F Change-Id: I52e4647cb081eae265b3cc31e60a1ac6b0a5337d Reviewed-on: https://gerrit.libreoffice.org/41418 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-21Fix typoAndrea Gelmini
Change-Id: Ife6c317187915ba8df0351b7b96d481345343df6 Reviewed-on: https://gerrit.libreoffice.org/41404 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-21emfplus: Corrected ReadWindowMetafileArmin Le Grand
There are two places which do hand over not a complete SvStream staring at pos zero, but pass a seek position indirectly in that stream. Thus this needs to be used. There is one usage in sc that copies the data to a MemStream to avoid that, so this hints that this 'trap/feature' was not known to everyone using it Change-Id: I94139b86c8bdd82879124c574bc3014e02d9ab5f Reviewed-on: https://gerrit.libreoffice.org/41399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>