summaryrefslogtreecommitdiff
path: root/vcl/source/filter
AgeCommit message (Collapse)AuthorFilesLines
2017-11-22replace check of eof and GetError with goodCaolán McNamara1-7/+6
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 McNamara3-24/+24
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 McNamara1-60/+70
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 Bergmann1-7/+2
Change-Id: I38017e3b191ef210facf46323c9a3bb5f54bf0a3
2017-11-16ofz#3002 set a limit to how broken a jpeg is to give up recoveringCaolán McNamara1-0/+20
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 Grandin2-234/+239
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 Gelmini1-1/+1
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 McNamara1-0/+3
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 Grandin1-16/+0
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 McNamara1-1/+1
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 McNamara1-1/+1
Change-Id: Ied661aafbaf9d85b01ef57e83bbacd9f9a828f2b
2017-11-07tdf#113550 RTF import: fix incorrect text indentMiklos Vajna1-3/+3
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 Glogowski3-49/+45
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 Grandin2-2/+2
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 Behrens12-4194/+1
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 Grandin2-7/+7
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 Grandin2-14/+12
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 Stahl4-7/+7
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26vcl: minor cleanups in pdfdocumentMiklos Vajna1-21/+6
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 Bergmann9-11/+11
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-19Avoid throwing C++ exception across libjpeg C framesStephan Bergmann1-286/+321
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 Gelmini1-1/+1
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 Grandin1-2/+0
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 Vajna1-4/+1
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 Bergmann1-0/+6
...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 Grandin1-1/+1
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_M3-4/+4
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 Grandin4-79/+79
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 Bergmann1-7/+1
...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 McNamara1-3/+10
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 McNamara1-1/+1
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 Grandin1-2/+0
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()ccsheller1-22/+2
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 conditionccsheller1-2/+1
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 Gelmini1-1/+1
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 Grand1-4/+17
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>
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin7-29/+29
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin2-3/+3
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-09Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixelCaolán McNamara1-3/+3
move the code which can do this from sw to vcl Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701 Reviewed-on: https://gerrit.libreoffice.org/40925 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-04svl: move DecodeHexString from vclAshod Nakashian1-45/+1
Change-Id: I86da993050bde20f9ff0413ad5424673647a0e5c Reviewed-on: https://gerrit.libreoffice.org/40720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-01move resmgr to unotoolsCaolán McNamara1-1/+1
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-07-31loplugin:oncevarNoel Grandin1-1/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31vcl PDF tokenizer: indentation fixesMiklos Vajna1-1/+1
Change-Id: Ic8c652085c3132c0245c2629b71b0e2555d167cb
2017-07-28loplugin:constparams handle constructorsNoel Grandin4-5/+5
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20loplugin:unusedfields in vclNoel Grandin1-1/+0
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6 Reviewed-on: https://gerrit.libreoffice.org/40217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18vcl pdf tokenizer: indentation fixesMiklos Vajna1-3/+3
These files had a consistent style before, let's keep them that way. Change-Id: I32cf4ae61d0fac37df5e5412ae9cf3e2b3c92d17
2017-07-18Clean up android specific template functions defined in std namespacebrainbreaker1-10/+1
Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b Reviewed-on: https://gerrit.libreoffice.org/39890 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18loplugin:constparams in vclNoel Grandin11-18/+18
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4 Reviewed-on: https://gerrit.libreoffice.org/40116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-16vcl: use svl signing and remove moved codeAshod Nakashian1-8/+5
Change-Id: Id875a675d7ab649c9223ecca5de2da69ff4b8786 Reviewed-on: https://gerrit.libreoffice.org/39718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand7-6855/+139
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a