summaryrefslogtreecommitdiff
path: root/filter
AgeCommit message (Collapse)Author
2019-11-26tdf#127939: Make slideshow touch input work properly again on iOS 13Tor Lillqvist
For some reason, navigator.userAgent in WebKit on iOS 13 claims it to be a Macintosh, so our old code to recognise iOS did not work any longer. Also the Hammer.js included in this file looked at navigator.userAgent and its decision what to do based on that did not work properly either. Simplify our code by handling swipe gestures all the time, even when such won't be generated (on mouse-only devices). Also, Hammer.JS was too eager to think it detected a pointer-only device based on the presense of window.PointerEvent. That sems to be present now in iOS 13. Let's not blindly think that means it is a pointer-only device. If the device supports touch events, don't bother with PointerEvents. Change-Id: I57d972415798967e871c6e262f16043561ed6af5 Reviewed-on: https://gerrit.libreoffice.org/81404 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 8f78d6a0d1b4d8d2e21aad9e90510fe6be4df5bb) Reviewed-on: https://gerrit.libreoffice.org/83731
2019-11-11Added Orientation argument to LOKIT renderFontMert Tumer
method for rendering watermarks with angle Change-Id: Id422ed62e4f78390661e4e1efa45101af9ecfc23 Reviewed-on: https://gerrit.libreoffice.org/82404 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-10-12filter: svg: presentation engine: autoadvanceMarco Cecchetti
It seems I missed a use case in 8e3f0afc33119e5320d35ca49ee0325ea73fc1e7: when a slide has no transition or animation at all. Change-Id: I36041e6488a728964a2f5096715b62d0ce024f1d Reviewed-on: https://gerrit.libreoffice.org/80687 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11filter: svg export: presentation engine: automatic slide transitionMarco Cecchetti
Added support for having the presentation engine to advance automatically to the next slide after a given timeout. Change-Id: I765ab5116686af78d24dfcc51bb9183418072e70 Reviewed-on: https://gerrit.libreoffice.org/80686 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-11Rename 'Single-page sheets' to 'Full-Sheet Previews' to avoid confusionMuhammet Kara
Because this option creates a pdf output which simply contains full-sheet preview, disregarding most of the other options. The created output is meant for preview, to see all content of all shaeets at once, and not meant for usual printing. And also put in some explicit casts, to avoid compiler warnings. Change-Id: I62936337e26f04878ecb7291335a5da952d8dced Reviewed-on: https://gerrit.libreoffice.org/80638 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-04filter: XHTML: make "calc-heading-digit" a little fasterMichael Stahl
Exporting OpenDocument-v1.3-csd01-part3-schema.odt to XHTML fails with: runtime error: file share/xslt/export/xhtml/body.xsl line 1404 element variable xsltApplySequenceConstructor: A potential infinite template recursion was detected. You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000). Unfortunately the document contains this many headings, and the calc-heading-digit computes the value by recursively looking at every preceding heading in the document, without TCO apparently... Try to improve this by using XPath to filter early the headings that are effectively ignored in the 3rd xsl:when case anyway: the ones with a level lower than the one for which the number is requested; this limits the recursive calls to the number of headings on the same level. Change-Id: Iddf5a91664402a57a0138731ddc9cebb06b0a126 Reviewed-on: https://gerrit.libreoffice.org/79720 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 86cca6b40ced4031dec4b708ac67b5cbe70cddf9) Reviewed-on: https://gerrit.libreoffice.org/79841 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-10-01Avoid unnecessary iterations in for loopMuhammet Kara
Change-Id: I9f2d0fba4754b8d4db906012dc1429640fe444b5 Reviewed-on: https://gerrit.libreoffice.org/79954 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-01Handle SinglePageSheets option for pdf exportMuhammet Kara
When the single page sheets option is selected on the pdf export dialog of Calc, a pdf for general preview of the document is created, which is not meant for printing. Each sheet is exported as a single page, thus causing the resulting pdf to have pages with different sizes. This is a follow-up to commit 079cd016408d54d91 Change-Id: I038761f06bbf4b0425df89bcda4ee111a61be1d5 Reviewed-on: https://gerrit.libreoffice.org/79895 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-09-26tdf#124377: enable anti-aliasing metafile during redactionAron Budea
Change-Id: I6c8a0f6ceaad5d9ec47cce1b00b8ccdd77530aaf Reviewed-on: https://gerrit.libreoffice.org/79266 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> (cherry picked from commit cd6780aae1392d4c1af0b15b311a4966834a9602) Reviewed-on: https://gerrit.libreoffice.org/79479 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-09-23Add 'SinglePageSheets' option to the PDF export dialogMuhammet Kara
This handles the UI, and carrying the filter option to the pdfexport code. It will be handled in PDFExport class. Change-Id: I92c3f14a4ae38c4ab81f4f9eee63e5f3c864d0a6 Reviewed-on: https://gerrit.libreoffice.org/79397 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-20tdf#122582: Add touch gestures to iOS app slideshow, also for exiting itTor Lillqvist
Left swipt shows the next slide, right swipe shows the previoius slide. Up or down swipe exit the slideshow. Use the same hammer.js as Online does for touch gestures in dialogs. With one addition that was necessary to avoid a runtime error: look for a comment starting with '// tml:'. No idea why this is not needed in Online. Change-Id: I7a22b16dfbc069dcdc1be344005ab7503dcd1ba7 (cherry picked from commit da79a587f359538a5444bfe64e4ada0a8394f7a4) Reviewed-on: https://gerrit.libreoffice.org/79168 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-09-20tdf#122582: Add ways to exit the slideshow in the iOS appTor Lillqvist
Either going past the end, or pressing the 'q' key on a hardware keyboard will exit the slideshow by posting an 'EXITSLIDESHOW' message to the app. (The app will have to handle that, of course, will commit in a moment.) Change-Id: I075e5e3fa86cc632cb3071d6546721b010ff77a2 (cherry picked from commit 47ecfa0d8bd64ad946b5ec1238f43df5632b1960) Reviewed-on: https://gerrit.libreoffice.org/79167 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-09-20Handle arrow keys (from a hardware keyboard) on iOSTor Lillqvist
Change-Id: Ia5946a77215eba565c3ff8c4dfbc08b95af493c0 (cherry picked from commit 06405cae7ccd596f2e0f4dd49a3e7612a883e654) Reviewed-on: https://gerrit.libreoffice.org/79166 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-09-18tdf#115549 Enable handling background object.Gülşah Köse
Change-Id: Ibb9c01d83572259b812981aa6229e9aa9b7c60f3 Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/67215 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/78382 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-08-29tdf#126642 correctly handle the PDF/A settingsJan-Marek Glogowski
This is in the spirit of the master fix. But instead of enabling broken PDF/A form handling, which would eventually require many more fixes, this correctly handles the user setting and disables the form export for PDF/A. The code therefore is almost the same, minus the radio button PDF/A type handling plus disabling the form frame. Change-Id: I31f96a36d776468a5547042fb9e4c0605751fbba Reviewed-on: https://gerrit.libreoffice.org/76820 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/77898 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-08-19Make pdf export watermarks look like watermarks on onlinemerttumer
Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/69317 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/76289 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e6bbfd641c6c65ebdebae92f2382689d3ea4a089) Change-Id: Ib5af8c61dd9a539c63594a91b8ec17ff07327feb Reviewed-on: https://gerrit.libreoffice.org/77575 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-05lok: writer: svg export transformed imagesMarco Cecchetti
Change-Id: I908a6e01573c35c0641519f4995730af0b033c33 Reviewed-on: https://gerrit.libreoffice.org/70565 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2019-08-05svg.js: the SVG Path polyfill doesn't work with Firefox 59 and laterMarco Cecchetti
We use a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from SVG2. Unfortunately the embedded version of this polyfill doesn't work anymore with Firefox 59 and later. It has been needed to adapt a new version of the same polyfill. (See https://github.com/progers/pathseg) Change-Id: Ib5208d67022e585b7a5fb24e37cc446f50e57ee3 (cherry picked from commit 1b2aedb7b9f81bb6b43b64559cab00956c189f82) Reviewed-on: https://gerrit.libreoffice.org/65548 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2019-08-05Added tiled watermark export option for pdfmerttumer
Change-Id: I3f28ad64c13dd4bc1b2862e86d2190e46a0ced46 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/67779 Tested-by: Jenkins
2019-08-05Resolves: tdf#126147 relax sanity check and allow truncated tiffsCaolán McNamara
now the start of the row of data must still exist, but the full length of the row doesn't have to exist Change-Id: I5ed8ffef2cab19f040ba789a5d82560ca6847f26 Reviewed-on: https://gerrit.libreoffice.org/75795 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 38bf835b48efa2e32d917538cabc4fa2e1dec56d) Reviewed-on: https://gerrit.libreoffice.org/76933 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-06-20tdf#123780: Fix SVG export of Writer imagesTamás Zolnai
Used for LO online to generate preview. Change-Id: I25107bedecc5a60e6a3ac094b7defd5dcb822138 Reviewed-on: https://gerrit.libreoffice.org/68543 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5f4df4b39722b9b3aa45d669e932d054d264ffbf)
2019-06-20lok: Implement SVG export of selected Writer imageTamás Zolnai
A Writer image does not behave similar to other shapes, so we need to generate a shape to get the export code working. Change-Id: Icfb25ceb40f73f1018d379863b836d8303e539f3 Reviewed-on: https://gerrit.libreoffice.org/65176 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit d856ba77faa8db9300c99f7dcaa9101bdeca849b)
2019-06-20lok: Implement SVG export for Calc (SelectionOnly mode)Tamás Zolnai
(cherry picked from commit fc0d2f1510d34d675c35d57c21da82612053cf85) Change-Id: Ic305e5305890fd1efa3a3130e5216f9c672870e5
2019-06-20lok: Implement SVG export for Writer (SelectionOnly mode)Tamás Zolnai
Separate generic code from Impress / Draw specific code and implement shape selection handling in case of Writer. This is an internal filter, so it can be called only from the code. (cherry picked from commit e54700c45b22b10ec4f364800e0ad7c0627a6d3b) Change-Id: I807e04a0949530d6029037bb964c10c80197ff33
2019-06-20Avoid writing out unneeded data to SVG file in SelectionOnly modeTamás Zolnai
(cherry picked from commit 8ade6298814a7223eb1b11d72534dd4bb4257a4d) Change-Id: I6d0ce089be051667e965aff45a63f6b1a8342952
2019-06-20Remove noise from the SVG file exported in SelectionOnly modeTamás Zolnai
Change-Id: Ia09f6ab40c20c17230e8b544987a5d11b7359f2f (cherry picked from commit 13f8545b84ab62fe9c19b58c024f46f89518ce03)
2019-06-20Introduce client-server message for requesting the selected shape as SVGTamás Zolnai
It works for Impress only now. Change-Id: I95e3e37ae7df49b567108f6d6467038b715e886d (cherry picked from commit 1a5b2d2b6f28ec33c5e100fbc5b0c3438df6b006)
2019-06-17Support bitmap PDF export for RedactionMuhammet Kara
* Add a new parameter IsRedactMode (SID_IS_REDACT_MODE) to .uno:ExportDirectToPDF * Make sure the new param makes it into PDFExport as part of FilterData * Hijack the metafile before being sent to ImplExportPage(), convert to bitmap, and replace the original * Add a new entry to GenericCommands.xcu to make our button with param visible * Nitpick: For things to be included in the bitmap conversion, they need to be added to the metafile before the conversion in PDFExport::ExportSelection(). Things added after that point (inside ImplExportPage() for example) will not be bitmapped/pixelized Change-Id: Iec7020917da920a968ea969b98e53f17eadaa275 Reviewed-on: https://gerrit.libreoffice.org/67108 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/74201 Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-06-15StarOffice XML is not exotic, old binary format is exoticAndras Timar
Change-Id: Ie435dda390e434e34ef753b5cb2715ac2252e82e Reviewed-on: https://gerrit.libreoffice.org/53450 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
2019-06-15Flag a few more import filters as EXOTICAndras Timar
Change-Id: I171efc7e533039ab61d7ae607673aaf81d88c73d
2019-06-13tdf#125591 DOC import: lazy-load metafiles with explicit sizeMiklos Vajna
Regression from commit 69b62cfcbd364d7f62142149c2f690104b217ca1 (tdf#125281 DOC import: fix size of lazy-loaded metafiles, 2019-05-27), the problem is that setting the preferred size of a Graphic swaps it in. Avoid this by extending ImportUnloadedGraphic(): if a size hint is provided, then that will be used instead of info from the graphic descriptor (which is usually only meaningful for bitmaps). This way we maintain the correct size and we're back to lazy-loading metafiles from binary MSO files as well. (cherry picked from commit acb803b730f2c6bd82e39beab58949ec14f85eb0) and: CppunitTest_sw_ww8import: disable failing assert on Windows It fails only sometimes, it's yet clear why. (cherry picked from commit b5d624c4af1085d4670149e9c1d280da7bc9add0) Change-Id: Ide12d12166110e98ea47b5347dd24fb203b22da3 Reviewed-on: https://gerrit.libreoffice.org/73961 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-06-13tdf#125281 DOC import: fix size of lazy-loaded metafilesMiklos Vajna
Metafiles may have an external header, so once graphic data is read, we need to set the size explicitly. Otherwise the width of the EMF image in the bugdoc will be too small. (cherry picked from commit 69b62cfcbd364d7f62142149c2f690104b217ca1) Conflicts: filter/source/msfilter/msdffimp.cxx sw/qa/extras/ww8import/ww8import.cxx Change-Id: I2441eda61278b0f4973db5d9aa14618ccd17c397 Reviewed-on: https://gerrit.libreoffice.org/73180 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-04-24lazy image loading shouldn't read the entire .xls file (tdf#124828)Luboš Luňák
b11188835d3b87cd changed msfilter to use GraphicFilter::ImportUnloadedGraphic() to lazy-load images from the document. However, that function in some cases simply reads the entire rest of the passed SvStream, which in this case is the entire .xls file. And the document from tdf#124828 is ~50MiB and contains ~4000 images => 100+ GiB memory required. Change-Id: I74926383204ec642eabb28b62e2cf2e1ff8054a9 Reviewed-on: https://gerrit.libreoffice.org/71136 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit af84fc9d906626255aaf136eefc5e55236e0e8a6) Reviewed-on: https://gerrit.libreoffice.org/71221 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-03-10Check svg URLs before exportingSamuel Mehrbrodt
Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed Reviewed-on: https://gerrit.libreoffice.org/68668 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648) Reviewed-on: https://gerrit.libreoffice.org/68732 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-01-15Resolves: tdf#122711 fix order of columnsCaolán McNamara
Change-Id: I04c078257fd9290ca17410b4833828f7f6bfd266 Reviewed-on: https://gerrit.libreoffice.org/66353 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-11Resolves: tdf#122404 unlock just the toplevels that were lockedCaolán McNamara
push what toplevels got locked to just unlock those ones. otherwise the just dismissed toplevel may still be present in the Application toplevel list. merge all the similar examples of this. Change-Id: I77c0d55d1e4b3bcc3b8d88fef00ba289edd1e831 Reviewed-on: https://gerrit.libreoffice.org/66078 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-07Resolves: tdf#122219 base form writer-window doesn't honour CloseVeto properlyCaolán McNamara
just hit this with the same all-modal hammer we now use in the extension manager, a modeless dialog, with modal subdialogs run by a normal non-async subloop, turns into a modal dialog for all other toplevels Change-Id: Ia35fad7a1be2ec493011c7e4354b70231b78a7fc Reviewed-on: https://gerrit.libreoffice.org/65504 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-12-23tdf#122204 reversed checked_multiply checkCaolán McNamara
since... Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Oct 24 14:06:03 2018 +0100 ofz#11103 Integer-overflow Change-Id: Id32a5c14cfce2d7f22ca319c104908c441c3abc5 Reviewed-on: https://gerrit.libreoffice.org/65581 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-19tdf#122171 block closing final window while xslt filter dialog is modalCaolán McNamara
Change-Id: Ic40d4074bad7c06d1c1e395de74442f2a3bca5cd Reviewed-on: https://gerrit.libreoffice.org/65420 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-17Resolves: tdf#122153 keep Execute for modal dialogsCaolán McNamara
and not modeless ones cause you get one main loop running inside another, and everything is running inside the modeless dialog main loop until it exits. Change-Id: I45e92380288727669e287b62e84b815d5dc1960c Reviewed-on: https://gerrit.libreoffice.org/65282 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-06Fix reading 16 bit millisecond valueStephan Bergmann
It had originally been read as 16 bit via >> in d2000efb31f864e912c6cf52760eea0e602b6893 "#i106421#: move msfilter to filter", then accidentally changed to be read as 32 bit via >> in 9830fd36dbdb72c79703b0c61efc027fba793c5a "date/time IDL datatypes incompatible change" (and later changed to be read as 32 bit explicitly via ReadUInt32 with 15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 "convert SvStream::operator>> methods to ReadXXX methods"). Change-Id: I5062e67a578d182a0df2726ab8d0bae465f154f3 Reviewed-on: https://gerrit.libreoffice.org/64604 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins (cherry picked from commit f84f5b0a0cdb82f444de572f9d8554a96056f874) Reviewed-on: https://gerrit.libreoffice.org/64635 Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-30tdf#93005, tdf#100611, remove the incomplete ODC export featureMarkus Mohrhard
Change-Id: I96a3882cd412ea5d993971df7e20b1fd8da73642 Reviewed-on: https://gerrit.libreoffice.org/64283 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit d543e8dfd3d8ae718e29304a155e1cf70d08325d) Reviewed-on: https://gerrit.libreoffice.org/64311
2018-11-22weld SwCondCollPageCaolán McNamara
and put back original SvTreeListBox a11y factory use Change-Id: I4ad8ce29d8fed6ec5d44e9a1d641919a89226b79 Reviewed-on: https://gerrit.libreoffice.org/63501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 47897fdd936d9b6e9ac8cb6110c79352ab080df7) Reviewed-on: https://gerrit.libreoffice.org/63770
2018-11-22tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 492ea7e08571e466e37f870b7642a79df55c2e92) Reviewed-on: https://gerrit.libreoffice.org/63768 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-19weld TreeViewCaolán McNamara
a) use GtkTreeStores for GtkTreeViews b) ironically can't store GtkTreeStore contents in .ui apparently c) set show_expanders for all non-trees and unconverted cases d) on-demand subtrees Change-Id: I3c1036a222daba2c129b1a22ffeb3fe35005ae31 Reviewed-on: https://gerrit.libreoffice.org/63558 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:buriedassign in dbaccess..ooxNoel Grandin
Change-Id: Ic0ca695a1d9d05418213475a68e233953136cc8e Reviewed-on: https://gerrit.libreoffice.org/63468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-13Clamp equation values when exporting to binary MS formatStephan Bergmann
CppunitTest_sw_ooxmlexport failed under -fsanitize=implicit-signed-integer-truncation when writing 100000 (from the triangle equation in oox/source/drawingml/customshapes/oox-drawingml-cs-presets) as a 16-bit value (see below), and as discussed at FreeNode #libreoffice-dev: Nov 12 09:12:32 <vmiklos> sberg: ah, that's custom shape equation, read from ooxml but then written to ms binary format; i'm not sure if there is a better option there other than just clamping the value. Nov 12 09:14:33 <vmiklos> sberg: i would expect that information is 1) used in general when writing drawingml+vml markup for a shape (where the vml fallback is not read by LO nor by MSO) and 2) i don't expect that our poor vml export actually reads those equations. so the vml export builds on top of the binary export, but at the end probably that information (equations) is not read by anyone (At least for CppunitTest_sw_ooxmlexport, equation.nPara[1] never needed such clamping, just nPara[0] and nPara[2].) > filter/source/msfilter/escherex.cxx:2929:50: runtime error: implicit conversion from type 'sal_Int32' (aka 'int') of value 100000 (32-bit, signed) to type 'sal_Int16' (aka 'short') changed the value to -31072 (16-bit, signed) > #0 in EscherPropertyContainer::CreateCustomShapeProperties(MSO_SPT, com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at filter/source/msfilter/escherex.cxx:2929:50 (instdir/program/libmsfilterlo.so +0x54f1e6) > #1 in ImplEESdrWriter::ImplWriteShape(ImplEESdrObject&, EscherSolverContainer&, bool) at filter/source/msfilter/eschesdo.cxx:283:26 (instdir/program/libmsfilterlo.so +0x67a775) > #2 in ImplEESdrWriter::ImplWriteTheShape(ImplEESdrObject&, bool) at filter/source/msfilter/eschesdo.cxx:932:12 (instdir/program/libmsfilterlo.so +0x69059d) > #3 in EscherEx::AddSdrObject(SdrObject const&, bool) at filter/source/msfilter/eschesdo.cxx:951:35 (instdir/program/libmsfilterlo.so +0x691064) > #4 in oox::vml::VMLExport::AddSdrObject(SdrObject const&, short, short, short, short, bool) at oox/source/export/vmlexport.cxx:1425:15 (instdir/program/libooxlo.so +0x2ab3157) > #5 in DocxSdrExport::writeVMLDrawing(SdrObject const*, SwFrameFormat const&) at sw/source/filter/ww8/docxsdrexport.cxx:772:38 (instdir/program/libmswordlo.so +0x168bfb2) > #6 in DocxSdrExport::writeDMLAndVMLDrawing(SdrObject const*, SwFrameFormat const&, int) at sw/source/filter/ww8/docxsdrexport.cxx:975:9 (instdir/program/libmswordlo.so +0x16938f5) > #7 in DocxAttributeOutput::OutputFlyFrame_Impl(ww8::Frame const&, Point const&) at sw/source/filter/ww8/docxattributeoutput.cxx:5357:57 (instdir/program/libmswordlo.so +0x1371a67) > #8 in AttributeOutputBase::OutputFlyFrame(ww8::Frame const&) at sw/source/filter/ww8/wrtw8nds.cxx:3173:5 (instdir/program/libmswordlo.so +0x1befe5a) > #9 in SwWW8AttrIter::OutFlys(int) at sw/source/filter/ww8/wrtw8nds.cxx:667:41 (instdir/program/libmswordlo.so +0x1beeb70) > #10 in MSWordExportBase::OutputTextNode(SwTextNode&) at sw/source/filter/ww8/wrtw8nds.cxx:2275:42 (instdir/program/libmswordlo.so +0x1c32e4d) > #11 in MSWordExportBase::OutputContentNode(SwContentNode&) at sw/source/filter/ww8/wrtw8nds.cxx:3237:13 (instdir/program/libmswordlo.so +0x1c5c7e4) > #12 in MSWordExportBase::WriteText() at sw/source/filter/ww8/wrtww8.cxx:2725:13 (instdir/program/libmswordlo.so +0x1efcdc2) > #13 in DocxExport::WriteMainText() at sw/source/filter/ww8/docxexport.cxx:1453:5 (instdir/program/libmswordlo.so +0x1607d1f) > #14 in DocxExport::ExportDocument_Impl() at sw/source/filter/ww8/docxexport.cxx:514:5 (instdir/program/libmswordlo.so +0x1604baf) > #15 in MSWordExportBase::ExportDocument(bool) at sw/source/filter/ww8/wrtww8.cxx:3206:19 (instdir/program/libmswordlo.so +0x1f3f022) > #16 in DocxExportFilter::exportDocument() at sw/source/filter/ww8/docxexportfilter.cxx:86:17 (instdir/program/libmswordlo.so +0x166b5e3) > #17 in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at oox/source/core/filterbase.cxx:489:55 (instdir/program/libooxlo.so +0x1bc3880) > #18 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:144:23 (instdir/program/libwriterfilterlo.so +0x1a250bf) > #19 in SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2441:25 (instdir/program/libsfxlo.so +0x38d1352) > #20 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1535:19 (instdir/program/libsfxlo.so +0x38c1818) > #21 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&) at sfx2/source/doc/objstor.cxx:2848:39 (instdir/program/libsfxlo.so +0x38f0e90) > #22 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objstor.cxx:2705:9 (instdir/program/libsfxlo.so +0x38ea470) > #23 in SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objserv.cxx:308:19 (instdir/program/libsfxlo.so +0x38667e3) > #24 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:2969:46 (instdir/program/libsfxlo.so +0x3a3c48e) > #25 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1639:13 (instdir/program/libsfxlo.so +0x3a425d5) > #26 in SwModelTestBase::reload(char const*, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:797:20 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlexport.so +0x364711) > #27 in SwModelTestBase::executeImportExportImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:283:9 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlexport.so +0x362d08) > #28 in testTextboxTable::Import_Export_Import() at sw/qa/extras/ooxmlexport/ooxmlexport.cxx:559:1 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlexport.so +0x43c8dd) [...] Change-Id: I21d028af121691d51b053c1bf9e49c656be62b77 Reviewed-on: https://gerrit.libreoffice.org/63309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-13Silence -fsanitize=implicit-signed-integer-truncationStephan Bergmann
...as happens during CppunitTest_sw_ooxmlimport2: > filter/source/graphicfilter/itiff/itiff.cxx:866:29: runtime error: implicit conversion from type 'int' of value 498 (32-bit, signed) to type 'sal_uInt8' (aka 'unsigned char') changed the value to 242 (8-bit, unsigned) > #0 in TIFFReader::ConvertScanline(int) at filter/source/graphicfilter/itiff/itiff.cxx:866:29 (instdir/program/libgielo.so +0x294419) > #1 in TIFFReader::ReadMap() at filter/source/graphicfilter/itiff/itiff.cxx:695:19 (instdir/program/libgielo.so +0x292291) > #2 in TIFFReader::ReadTIFF(SvStream&, Graphic&) at filter/source/graphicfilter/itiff/itiff.cxx:1597:32 (instdir/program/libgielo.so +0x2ac5c5) > #3 in itiGraphicImport at filter/source/graphicfilter/itiff/itiff.cxx:1673:28 (instdir/program/libgielo.so +0x2af1ed) > #4 in GraphicFilter::ImportGraphic(Graphic&, rtl::OUString const&, SvStream&, unsigned short, unsigned short*, GraphicFilterImportFlags, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>*, WmfExternal const*) at vcl/source/filter/graphicfilter.cxx:2031:22 (instdir/program/libvcllo.so +0x684e246) > #5 in GraphicFilter::ImportGraphic(Graphic&, rtl::OUString const&, SvStream&, unsigned short, unsigned short*, GraphicFilterImportFlags, WmfExternal const*) at vcl/source/filter/graphicfilter.cxx:1281:12 (instdir/program/libvcllo.so +0x6845817) > #6 in (anonymous namespace)::GraphicProvider::queryGraphic(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at vcl/source/graphic/UnoGraphicProvider.cxx:418:33 (instdir/program/libvcllo.so +0x623ca3a) > #7 in non-virtual thunk to (anonymous namespace)::GraphicProvider::queryGraphic(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at vcl/source/graphic/UnoGraphicProvider.cxx (instdir/program/libvcllo.so +0x62407e2) > #8 in oox::GraphicHelper::importGraphic(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, WmfExternal const*) const at oox/source/helper/graphichelper.cxx:263:39 (instdir/program/libooxlo.so +0x2b33a1f) > #9 in oox::GraphicHelper::importEmbeddedGraphic(rtl::OUString const&, WmfExternal const*) const at oox/source/helper/graphichelper.cxx:351:24 (instdir/program/libooxlo.so +0x2b370da) > #10 in oox::drawingml::BlipContext::BlipContext(oox::core::ContextHandler2Helper const&, oox::AttributeList const&, oox::drawingml::BlipFillProperties&) at oox/source/drawingml/misccontexts.cxx:154:72 (instdir/program/libooxlo.so +0x23c35e0) > #11 in oox::drawingml::BlipFillContext::onCreateContext(int, oox::AttributeList const&) at oox/source/drawingml/misccontexts.cxx:237:24 (instdir/program/libooxlo.so +0x23c6da4) > #12 in non-virtual thunk to oox::drawingml::BlipFillContext::onCreateContext(int, oox::AttributeList const&) at oox/source/drawingml/misccontexts.cxx (instdir/program/libooxlo.so +0x23c8638) > #13 in oox::core::ContextHandler2Helper::implCreateChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at oox/source/core/contexthandler2.cxx:94:34 (instdir/program/libooxlo.so +0x1b877e4) > #14 in oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at oox/source/core/contexthandler2.cxx:191:12 (instdir/program/libooxlo.so +0x1b8a37c) > #15 in non-virtual thunk to oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at oox/source/core/contexthandler2.cxx (instdir/program/libooxlo.so +0x1b8a3c8) > #16 in writerfilter::ooxml::OOXMLFastContextHandlerWrapper::lcl_createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1908:31 (instdir/program/libwriterfilterlo.so +0x1ade3d6) > #17 in writerfilter::ooxml::OOXMLFastContextHandler::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:208:21 (instdir/program/libwriterfilterlo.so +0x1aa7c37) > #18 in non-virtual thunk to writerfilter::ooxml::OOXMLFastContextHandler::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx (instdir/program/libwriterfilterlo.so +0x1aa7ed8) > #19 in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event const*) at sax/source/fastparser/fastparser.cxx:439:44 (instdir/program/libexpwraplo.so +0x24df0c) > #20 in sax_fastparser::FastSaxParserImpl::callbackStartElement(unsigned char const*, unsigned char const*, unsigned char const*, int, unsigned char const**, int, unsigned char const**) at sax/source/fastparser/fastparser.cxx:1254:21 (instdir/program/libexpwraplo.so +0x24943f) > #21 in (anonymous namespace)::call_callbackStartElement(void*, unsigned char const*, unsigned char const*, unsigned char const*, int, unsigned char const**, int, int, unsigned char const**) at sax/source/fastparser/fastparser.cxx:310:18 (instdir/program/libexpwraplo.so +0x240f8e) > #22 in xmlParseStartTag2 at workdir/UnpackedTarball/libxml2/parser.c:9583:6 (instdir/program/libxml2.so.2 +0x6f8f90) > #23 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11342:14 (instdir/program/libxml2.so.2 +0x73005c) > #24 in xmlParseChunk__internal_alias at workdir/UnpackedTarball/libxml2/parser.c:12244:13 (instdir/program/libxml2.so.2 +0x7241ea) > #25 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1061:21 (instdir/program/libexpwraplo.so +0x23e2e4) > #26 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:870:9 (instdir/program/libexpwraplo.so +0x237beb) > #27 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1377:13 (instdir/program/libexpwraplo.so +0x2528ab) > #28 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:503:22 (instdir/program/libwriterfilterlo.so +0x1a69417) > #29 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:186:24 (instdir/program/libwriterfilterlo.so +0x1a25e0b) > #30 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2251:34 (instdir/program/libsfxlo.so +0x38dc7ff) > #31 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:772:23 (instdir/program/libsfxlo.so +0x38a5979) > #32 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1795:36 (instdir/program/libsfxlo.so +0x3a47e1e) > #33 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:688:28 (instdir/program/libsfxlo.so +0x40c92b0) > #34 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1149:37 (instdir/program/libfwklo.so +0x1521191) > #35 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:383:20 (instdir/program/libfwklo.so +0x1511b76) > #36 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:169:14 (instdir/program/libfwklo.so +0x150d828) > #37 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:619:12 (instdir/program/libfwklo.so +0x167057e) > #38 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx (instdir/program/libfwklo.so +0x167078a) > #39 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:50:60 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x8f176) > #40 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:762:23 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlimport2.so +0x1256b1) > #41 in SwModelTestBase::load(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:717:16 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlimport2.so +0x123fd6) > #42 in SwModelTestBase::executeImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:264:13 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlimport2.so +0x1236bf) > #43 in testTdf115094::Import() at sw/qa/extras/ooxmlimport/ooxmlimport2.cxx:226:1 (workdir/LinkTarget/CppunitTest/libtest_sw_ooxmlimport2.so +0x18e87d) [...] Change-Id: I04bf52ac9ee45d5bfefe2a406d9c601112baeef9 Reviewed-on: https://gerrit.libreoffice.org/63307 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-10tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>