summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)AuthorFilesLines
2016-02-24tdf#85761 vcl: JPEG export does not save PPI values correctlyChris Sherlock1-52/+1
JPEG values are currently hardcoded to 96PPI when we export JPEGs. The Graphic class doesn't have an easy way to get the PPI, but this can actually be calculated from the pref size and pref map mode (no idea why it is called "Pref"). Interestingly, you need to get a multiplier to work this out, relative to units of 100th mm. The EPS filter code had a function that does exactly this, but it's entirely based on MapMode units so it was really implemented in the wrong class IMO. I have thus moved it out of PSWriter and into MapMode. This also fixes tdf#65695, which was partially fixed, but had the JPEG PPI hardcoded to 96dpi. Also fixes tdf#97481. Change-Id: Iedb674141dd4e22fcbfb7be357dc777f732aa3aa Reviewed-on: https://gerrit.libreoffice.org/22339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/22380 Reviewed-on: https://gerrit.libreoffice.org/22454
2016-01-14tdf#65439: Export to PDF/A-1a gives transparency warningJulien Nabet2-16/+5
There was a use of transparency because Watermark was always defined Now we test if text of Watermark is empty or not Remark: it seems we don't cope not-text Watermark in pdf export (additional cleaning+renaming) Change-Id: I9d9c759a80c0a61e4f0a94c0fa295f2950caa3bc Reviewed-on: https://gerrit.libreoffice.org/20990 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 5c5017ea37e1bee205c6c1b9cafe753fcaf1a9a4) Reviewed-on: https://gerrit.libreoffice.org/21398
2016-01-07tdf#96713 OdfFlatXml: Seek to 0 before readingMaxim Monastirsky1-0/+4
Similar to tdf#45418. The problem is that sfx2 DocumentInserter code calls SfxMedium::IsStorage, which reads the stream but doesn't correctly seek back to 0. Actually SfxMedium_Impl has 2 members for the input stream, one of SvStream type and another one as Reference<XInputStream>. Turns out that reading with SvStream::Read changes the position in the object referenced by Reference<XInputStream>, but SvStream::Seek doesn't, so Seek(0) doesn't do the desired effect. My current solution is to ensure that we're reading from 0 inside the filter. I think it's a good thing to do anyway, and should be sufficient, given that other filters doesn't seem to be affected by this bug. Change-Id: I49b41077032d3e395c675e4f7824cc778c075473 (cherry picked from commit 5e4124396cafc2b0a435f17a66b33e36303ae4e4) Reviewed-on: https://gerrit.libreoffice.org/20983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-12-09svg-export: text animation didn't work - fixedMarco Cecchetti1-2/+2
That was due to 2 problems: - The namespace for an animation attribute was wrong - For debug build the bullet placeholder is not the first child Change-Id: If10c362f6fcffd4a05164cc5ca3ff6cacf5c28c1 Reviewed-on: https://gerrit.libreoffice.org/20245 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-12-09svg-export: slide transition did not work - fixedMarco Cecchetti1-6/+6
Slide transition didn't work anymore since the attribute parsing did not take into account the smil namespace prefix. Change-Id: I779f6408b1eac964f934019d219dc4111debe592 Reviewed-on: https://gerrit.libreoffice.org/20244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-12-09svg-export: animation sequence was wrongMarco Cecchetti1-19/+49
Animation sequence was wrong due to the priority queue and related compare functions implementation. Change-Id: I359abd087e922ffa0aa4f7770fcc0c9bdb029843 Reviewed-on: https://gerrit.libreoffice.org/20243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-12-09svg-export: now animation elements are exported with namespaceMarco Cecchetti2-33/+56
For debug build an assertion failed because of presentation, smil and anim namespaces were not registered before exporting. The JavaScript engine has been modified in order to handle qualified animation elements and attributes. Change-Id: I2415fd59c2d1afddb1c68b708feb62e446ea5252 Reviewed-on: https://gerrit.libreoffice.org/20242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-12-09svg export: fixed issue about text fields and shape bounding boxMarco Cecchetti2-22/+46
- issue: text fields were not displayed; this happened for debug build only: the problem was due to 2 facts: 1) the last fix for text decoration which changes the order in which tspan and desc elements are exported; 2) a workaround implemented for fixing the fact that date/time fields were not exported correctly when positioned chars are used (see commit c0a08eab). - issue: text fields were no more aligned correctly: this was due to the fact that the rect element representing the bounding box of the exported shape is not exported any more: I suspect that the rectangle was present in the generated GDIMetaFile representation of the exported shape. Change-Id: I3cd7b0d3a7f2bde8bfd8b933297cbdd7b90e6567 Reviewed-on: https://gerrit.libreoffice.org/20241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-11-25filter: fix DrMemory/valgrind warnings in PPT paragraph importMichael Stahl1-27/+124
various uninitialized variables in CppunitTest_sd_filters_test hang-8.ppt Change-Id: Id0b9f146a7ab8b5bb2b36a5c2a39d65ee52e122d (cherry picked from commit 78407eea3ddb5717a501d9336e3b3cbef188d010) Reviewed-on: https://gerrit.libreoffice.org/20157 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-20Writer image export: cmd. line, default to white backgroundTomaž Vajngerl1-1/+4
This commit fixes the writer image export (jpeg, png) that didn't work because the export pixel size was set to 0 by default. Now the default is set to document size (which depends on system DPI). When exporting to a PNG the background was transparent, which may not be desired. The background color is now by default white and can be changed for DocumentToGraphicRenderer, but the dialog or command line don't support such an option - for now. Change-Id: I16ffd3cd60c47b52768f43ae4c4c170fc821033b Reviewed-on: https://gerrit.libreoffice.org/19478 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-12ignore orcus::sax::malformed_xml_error etc tooCaolán McNamara1-8/+8
e.g. kde323651-1.pptx etc Change-Id: I59319733902a0c1298094bc1541d763938334ad4 (cherry picked from commit 70049dbeb286cb0613526e1c3c0318d32a446e58) Reviewed-on: https://gerrit.libreoffice.org/19311 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-09-14check stream status more oftenCaolán McNamara2-15/+32
Change-Id: I233c2fff9c06a81117f8114ccee83b53ea4026db (cherry picked from commit b43e03353aeb04ed74a272d98df03dd7c20f3478) Reviewed-on: https://gerrit.libreoffice.org/18505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-09-14fix size check related hangCaolán McNamara2-9/+10
Change-Id: I3e8aa5c48ba802cd363688502b44e27bfdf67f01 (cherry picked from commit b02f1c58e7bb8b6c9381107431557d3f39794fe0) Reviewed-on: https://gerrit.libreoffice.org/18464 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-09-02check for legal field sizes before readingCaolán McNamara2-6/+19
Change-Id: I3cdb647e1a057be5bb4b32d119ee5bcbbedf7473 (cherry picked from commit ad6d83defb33c414885ce6d4bfa85571d463f3c3) Reviewed-on: https://gerrit.libreoffice.org/18169 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-02tdf#93532 - Switching to 64-bit checksumMarco Cecchetti7-21/+23
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896 Reviewed-on: https://gerrit.libreoffice.org/18254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-01check stream statusCaolán McNamara2-4/+6
Change-Id: I65ed5979d35d8739367294a71620782b832cfd71 (cherry picked from commit a8fe085f973b4ccf846fe231af0fa25eda59911e) Reviewed-on: https://gerrit.libreoffice.org/18160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-08-31pClientData can be nullCaolán McNamara1-1/+1
Change-Id: I9375f84affdaef30d9b1ded31525e6b7b8709cbc (cherry picked from commit 7d4c77e374310bef538465d11980d1d610cbe0f1) Reviewed-on: https://gerrit.libreoffice.org/18149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-29eof isn't a Error, so use good not GetErrorCaolán McNamara1-14/+14
Change-Id: Ie1df87c7eb9d391d0fa4a579f744051a1f1b2ae1 (cherry picked from commit 078235028a8c4ea36b6b366348016e19759c456a) Reviewed-on: https://gerrit.libreoffice.org/18114 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-29check seeks and readsCaolán McNamara1-18/+44
Change-Id: I0c5c4784713376e0762bfbd197640f8d31b65562 (cherry picked from commit 1847753ab135f522df6a293a8539155437f0129f) Reviewed-on: https://gerrit.libreoffice.org/18112 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-28check stream state after read attemptCaolán McNamara1-1/+5
Change-Id: Ie3836f2e95acab963634181a07565343501f00f8 (cherry picked from commit 9a695e071020639926f8b038aba64eb016a1801a) Reviewed-on: https://gerrit.libreoffice.org/18092 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-28check SeekToEndOfRecord for successCaolán McNamara1-1/+3
Change-Id: I7413a4e9e491b65122eaadb38ad574161f1aa943 (cherry picked from commit d417ffb7dd93306be7c89526a75acab53dbd8831) Reviewed-on: https://gerrit.libreoffice.org/18090 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-28avoid loops in atom chainsCaolán McNamara1-3/+15
(cherry picked from commit de71eae5807ff94c8eace0eccaabf1ffa08e77b6) Change-Id: Icc40c0ee6c7d8d305cf7cc60cbf3e511c763aedd Reviewed-on: https://gerrit.libreoffice.org/18093 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-28check seeks and offsetsCaolán McNamara1-5/+10
Change-Id: I2b6ded138b9101415fc49e93e1ec3ebcd3a9d2ae (cherry picked from commit 5ed690a3e8a575784ca25048e0229ebc52e6fccd) Reviewed-on: https://gerrit.libreoffice.org/18099 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-28check seekCaolán McNamara1-2/+4
Change-Id: I358758999bb918e73cdee2224e575e72c2131453 (cherry picked from commit 0c713e45f9831073e34777f50abf9b5801f08ed9) Reviewed-on: https://gerrit.libreoffice.org/18098 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-28check returns of SeekToEndOfRecordCaolán McNamara1-4/+22
Change-Id: Ia593dd0e2239a97f17bb03f005d22028da482445 (cherry picked from commit d400f155fdc3867ad4a067c2bf85588fc0fbb2a2) Reviewed-on: https://gerrit.libreoffice.org/18096 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-28crashtesting: tiff loop detection too slowCaolán McNamara1-4/+4
moz323894-1.tiff and moz456356-1.tiff take too long to load Change-Id: Iaafa064fd05e4a4152004e7ceb6256af68aeef01 (cherry picked from commit 7e373e92fc02393732422d05264dd5115076183f) Reviewed-on: https://gerrit.libreoffice.org/18095 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-27extend seek, loop ending tests to ppt specific codeCaolán McNamara1-24/+21
Change-Id: Id4419b6b902b742117e248870b6a663c9c58955f (cherry picked from commit c249f93d96ec87b0acbd25ffe087543d6fe9fb14) Reviewed-on: https://gerrit.libreoffice.org/18052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-08-26various hangs, check seeks and record lengthsCaolán McNamara1-42/+70
Change-Id: Ided7f9376f41ee8cb1f6903e54a2d51e0e07e1a7 (cherry picked from commit a8b2dc80c41022515c3a1df6f7ea245c3390dc39) Reviewed-on: https://gerrit.libreoffice.org/18024 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-26don't hang on unreachable record endsCaolán McNamara1-2/+12
Change-Id: I288f7ff0327831603eda6e827c8acbae678dfaff (cherry picked from commit cadac8400a018c8c566379f7767ea5edff78523d) Reviewed-on: https://gerrit.libreoffice.org/18017 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-26fix crash on loading certain pptsCaolán McNamara1-3/+3
Change-Id: I544a67e3706c7d12414cc075118ef2f0f5ddd0f6 (cherry picked from commit 334dba623dfb0c4fb2b5292c2d03741b7b33aef1) Reviewed-on: https://gerrit.libreoffice.org/18015 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25Avoid overflow in PBMReader::ImplReadHeaderStephan Bergmann1-0/+24
...as found by UBSan in CppunitTest_filter_ppm_test on filter/qa/cppunit/data/pbm/fail/crash-1.pbm Change-Id: Ib7c50ef1f07aba6b78f79c608be69c3dac38ddfe (cherry picked from commit 662498ab80833a2b671c247fb859603632e52105) Reviewed-on: https://gerrit.libreoffice.org/17984 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-25in reality we are limited to max sal_Int32 hereCaolán McNamara2-5/+12
so accept that and test if the values were accepted or limited Change-Id: Iaed5ebc2f12b52055506147c71117a2ad88d28ac (cherry picked from commit 0a76c1fd6875bd094ebe2bfbed3d01c98dc0c19e) Reviewed-on: https://gerrit.libreoffice.org/17972 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25detect and reject loop in tifCaolán McNamara2-0/+12
Change-Id: I77d315fa432a3eb1a65539489a2ba6da8508b283 (cherry picked from commit 6b82437dca30eba0f0c9dde6fdc84cb8f7740f8f) Reviewed-on: https://gerrit.libreoffice.org/17957 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-13tdf#91782 - fix VirtualDevice allocation crasher in eps filter.Julien Nabet1-1/+1
Change-Id: I59cc13cebf9a15e873cd0b7f8fccffa37a6a8f39 Reviewed-on: https://gerrit.libreoffice.org/17688 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-23tdf#92471: Improve color conversion to MSO highlightingZolnai Tamás4-1/+193
The simple color distance on RGB color space is not good enough. It leads to a better result if we use the scheme of the primary colors. This method works well with MSO highlighting color palette, but not neccessarily in general. In highlighting palette light and dark variant of the same color type (e.g. blue and light blue) has the exactly same scheme. (cherry picked from commit 16f9cf57e20ffbe34cb184f694f465708250a578) filter: filter_utils test needs tools library (from Michael Stahl) (cherry picked from commit 75d0f7262004d93d457b4b0b499ebf0b23fcda04) Missing boost_headers (from Stephan Bergmann) (cherry picked from commit bd8e8db250f99445dc1a8baa7ffc6ddfe90fdf5b) Change-Id: I0de6e4598f365fda1cccd1d3466429e52cf4067f Reviewed-on: https://gerrit.libreoffice.org/17052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-21reject invalid tiff dimensionsCaolán McNamara2-0/+2
Change-Id: I64e77f12cb016a7f4a9d21c732aaeaae7959da76 (cherry picked from commit 34d062147c16090fa42c27ac7960e3f5e3b65d2b) Reviewed-on: https://gerrit.libreoffice.org/17257 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-07-20bail if offsets are past eofCaolán McNamara2-10/+19
Change-Id: I4a8e78231befff498894ec92a1f38af206e13129 (cherry picked from commit 97a0e7558b24792827d77217fb2d8b1106056963) Reviewed-on: https://gerrit.libreoffice.org/17232 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20fail on short readCaolán McNamara2-2/+4
Change-Id: I7215cf8d8b1e4a4156c87507018de3c2b7ed08d8 (cherry picked from commit 8eaef6b5217eecaa111c80e426bdf225481a71fb) Reviewed-on: https://gerrit.libreoffice.org/17219 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20don't hang on a bad ReadCodeAndDecodeCaolán McNamara2-1/+4
Change-Id: I999012d428fa84e21fe9e9f851a016eacc96a686 (cherry picked from commit 6964f67d0dd44c8a3c68caf194075ba5c649bf4b) Reviewed-on: https://gerrit.libreoffice.org/17217 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20ensure loop ends eventuallyCaolán McNamara2-17/+22
Change-Id: I318385286fcc27ffb2d938237d83e793564d2525 (cherry picked from commit c02e79874951ba86d926186e284612806d8bc0a3) Reviewed-on: https://gerrit.libreoffice.org/17214 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20test that nNumStripByteCounts value is within bounds of fileCaolán McNamara2-2/+5
Change-Id: If119628d7f510a7db30ed2180111063781cde887 (cherry picked from commit 33d43205c341e0cce36b6a1b3082c3927490cbde) Reviewed-on: https://gerrit.libreoffice.org/17210 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20tdf92789 fix reading of some PICT imagesosnola2-37/+25
(cherry picked from commit 5fa73031aa42b62ccd167f193376565df2e635fc) Conflicts: filter/source/graphicfilter/ipict/ipict.cxx add a test image (cherry picked from commit 3f0677b86f4831b011a2baece85cf93c68646cd5) Change-Id: I6809ef52c462958eed2329fe2d32b5cbc691194c Reviewed-on: https://gerrit.libreoffice.org/17203 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-20final check np boundsCaolán McNamara2-0/+2
Change-Id: I9213bb2cc059e05e286598edac03bd72c84db876 (cherry picked from commit dcbbe7741a08f6076f9e020f90cbb730c1edafb9) Reviewed-on: https://gerrit.libreoffice.org/17212 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-20check np bounds yet againCaolán McNamara2-0/+2
Change-Id: Id3f6fdc0ebed9711acec5d71f404e7a6072b765c (cherry picked from commit bca4d6f896fb12ceff37476c43ea8892898dd385) Reviewed-on: https://gerrit.libreoffice.org/17207 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-20reduce scope, etc, don't loop endlesslyCaolán McNamara2-7/+2
Change-Id: I86e4e94392527b5faf5d9cdb4251853f35813f4e (cherry picked from commit 5d32a4ac5c166264c2d44e8df625eb768eb42fbe) Reviewed-on: https://gerrit.libreoffice.org/17204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-20in reality we are limited to max sal_Int32 hereCaolán McNamara2-27/+27
so accept that and test if the values were accepted or limited Change-Id: I599cf8065a6f8786d380fdba03135857766770f3 (cherry picked from commit 80c591ea9c320fee9e975ac7b0e4e2df1bf5e447) Reviewed-on: https://gerrit.libreoffice.org/17197 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20check np boundsCaolán McNamara2-0/+2
Change-Id: Id16ae9325f3c67792941b9c88d83435aa98282ca (cherry picked from commit be4e1141be7cd54cf5362d3de534050db5505437) Reviewed-on: https://gerrit.libreoffice.org/17199 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-20check np bounds againCaolán McNamara2-0/+2
Change-Id: I0fb61954b2eaf0c015d7bdefe9f03bd459b31501 (cherry picked from commit fcdddbd30a8b5cf6a5cc4d2ff28b7d4a20f8ec6b) Reviewed-on: https://gerrit.libreoffice.org/17201 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-17Resolves: tdf#92772 missing shape bg colorCaolán McNamara1-6/+4
regression from dcad3ac445980740b6a39761cdd1f1bd0b3e6e34 coverity#1242624 Untrusted loop bound Change-Id: Idf52c09828c2bab767e9ff0d07b61befd6bfc64b The original code read 8 bytes on the nElemSizeVert == 8 branch and always 4 otherwise. I assumed that nElemSizeVert had to be read as 4 on that branch, but apparently not. So if its not 4, set it to 4 and we get the same behaviour as originally and continue to ensure we bounds check the loop Change-Id: Ica8ab7cc3bbebee93216766a2e1279a579494840 (cherry picked from commit b3cd47bd562f98ec5fcff1a9d7609353506b5083) Reviewed-on: https://gerrit.libreoffice.org/17134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-07-17in remainingSize consider that its is possible to seek past the endCaolán McNamara1-0/+0
Change-Id: I1652244d5515629f1cd8f15f4c5b15f139dba0aa (cherry picked from commit 6a1f31898d4d44d69f4f65e56f5dd087607885af) Reviewed-on: https://gerrit.libreoffice.org/17158 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>