summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-04-11PDF export of PDF images: compress page stream if requestedMiklos Vajna
compressStream() automatically takes care of VCL_DEBUG_DISABLE_PDFCOMPRESSION, so this also simplifies code. Change-Id: I7661123e6ba73f8f064ec0543a03e2ec15fd2468 Reviewed-on: https://gerrit.libreoffice.org/36415 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-11Related: tdf#106972 vcl PDF import: downgrade PDF >= 1.5Miklos Vajna
There are two problems with these newer PDF versions: - the current PDF export code doesn't know how to roundtrip such PDF images (needs work on both the import and export side) - upgrading the default PDF export version would upset readers who can't parse PDF >= 1.5 So instead of raising the default PDF export version, for now just be conservative and depend on pdfium to downgrade the PDF image version to 1.4 if it would be higher. Given that this modifies the input of the graphic filter this also needs changes in the ODF export, so that the filter result will contain that downgraded data, not the original one. Change-Id: I1efa97af8110e9a6ee3e8a7339bcc7d70457cfb0 Reviewed-on: https://gerrit.libreoffice.org/36413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-11convert ruler menu to .uiCaolán McNamara
Change-Id: I5f9b0033288ccd4b58e055998834185970f987b0
2017-04-11tdf#107089 PDF export of PDF images: handle mixed filters of page streamsMiklos Vajna
It's allowed to compress different page streams differently, and we must have a single object stream for our form XObject, so just incompress all of them to be consistent. Change-Id: I7a20dc2084a902a37dcefa3420d59a576f120bcd Reviewed-on: https://gerrit.libreoffice.org/36409 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-10Related: tdf#107013 PDF export of PDF images: improve content streamsMiklos Vajna
It can happen that the list of content streams have an equal number of "q" and "Q" operators when all of them is parsed. This means it's not correct to represent these separate streams with separate form objects, as those require equal number of "q" and "Q" operators by the end of each object. Instead concatenate the streams and always write a single form object, not only in case there is a single content stream. Change-Id: I62e4ee4c86403376155d10447404416686c84ef9 Reviewed-on: https://gerrit.libreoffice.org/36385 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-10Resolves: tdf#107031 writer depends on ACTION_DEFAULTCaolán McNamara
to do its standard "honor the DragDropMode setting" on drag and drop of outline headings into a document Change-Id: Ie154fb237de57ae18fa22d6f50dbf890fb9ebc77
2017-04-10Fix typos to complete commit b35552f39503Andrea Gelmini
Change-Id: I2a10f9989e682dfc88f3b1d5864bfce1637933ab Reviewed-on: https://gerrit.libreoffice.org/36359 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-04-09std::unique[]->std::vectorCaolán McNamara
Change-Id: If1b66f273e412f2206274a903a06bee90a2a6c91 Reviewed-on: https://gerrit.libreoffice.org/36307 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-09make this more readableCaolán McNamara
no logic change intended Change-Id: I097247ab1da409e56dce01fdb000e8d416e82add Reviewed-on: https://gerrit.libreoffice.org/36306 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-09Notebookbar: warn if priority is set for unsupported itemSzymon Kłos
Change-Id: I9d8e5aa64f7330f55b703b9ef0aaa5fec6ad611d Reviewed-on: https://gerrit.libreoffice.org/36314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-04-08ofz#1069 avoid oomCaolán McNamara
Change-Id: I7b567f49651496969ca0da56de702f10e6a39494
2017-04-08vcl: Bitmap processor test - test converting to "disabled" imageTomaž Vajngerl
Change-Id: I7146d2c667ec439a07e709e0aba96c37dc780db4 Reviewed-on: https://gerrit.libreoffice.org/36293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-07tdf#107018 PDF export of PDF images: handle references in nested dictionariesMiklos Vajna
Also get rid of the GetKeyOffset() and GetKeyValueLength() calls when copying dictionaries: the reference already knows its offset and length, so no need to call them. This makes the dictionary and the array handling more similar. Change-Id: I65936acfaf857636a8d83da3a4cec69289eb89d8 Reviewed-on: https://gerrit.libreoffice.org/36282 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-07PDF export of PDF images: avoid invalid offset for not used jpeg bitmapsMiklos Vajna
I missed the JPEG case in commit 30102ded91b9ecfea172ffc6443154230ee37cbd (vcl PDF export, norefxobj: avoid replacement bitmap, 2017-03-29). Change-Id: If1f74c7873d05d5d7da5eb881626d4e5e535a0a1 Reviewed-on: https://gerrit.libreoffice.org/36272 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-04-07Read number of polylines as UInt32 according to documentationBartosz Kosiorek
Change-Id: I7ef8c66485044e2543dc8d9a9e589537eb36f70f Reviewed-on: https://gerrit.libreoffice.org/36025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-04-07extend catch all here for std::exception derived exceptions tooCaolán McNamara
Change-Id: I6b8715b24792f8bbd4434c1bec584b67f8bcc0c5
2017-04-07tdf#107013 PDF export of PDF images: handle page tree and content streamsMiklos Vajna
Handle when the page objects are not contained in a single list, but a tree of "pages" objects. Also handle when the page object has multiple content streams. Change-Id: I7c5b0949314768af5915d37830a45e843e629446 Reviewed-on: https://gerrit.libreoffice.org/36256 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-07Revert "Related tdf#105566 Update Infobar when signature status changes"Michael Stahl
This reverts commit d8faf3bf9a82e8f49340b5020ec4ee931cc2f3f4. This causes an infinite recursion in JunitTest_sfx2_complex involving the newly added SignatureHelper::updateInfoBarState().
2017-04-07loplugin:redundantcast find cstyle arithmetic castsNoel Grandin
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-07tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in dbaccess/, extensions/, formula/, include/, reportdesign/, rsc/, sd/, svtools/, and vcl/ Change-Id: Ie20dadda0eeb0786eb328c6c652287d5481c5e3b Reviewed-on: https://gerrit.libreoffice.org/36249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-07Related tdf#105566 Update Infobar when signature status changesSamuel Mehrbrodt
gpg4libre Change-Id: I8f29cf16905c79d19d46662b087f4fd8778c8147 Reviewed-on: https://gerrit.libreoffice.org/36251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-04-07vcl: remove no longer needed WIN_Rectangle()Miklos Vajna
Not needed anymore after commit a5a571307fb3306b74ab46b085cde6388270a770 (tdf#82580 tools: rename Rectangle to tools::Rectangle, 2017-03-30). Change-Id: I25a11ca0b6c2e9e96847bd01b5e82835d1dd4a95
2017-04-06loplugin:redundantcastStephan Bergmann
Change-Id: I925879cf8df630e4e20773c363b9a27a572f3093
2017-04-06tdf#106960: Fix math scaling on WindowsKhaled Hosny
Remove this leftoever code from 1b7e788eb3bf9cbe56ed5cc4a3fa7fa5e70ac40a which does nothing useful now. Change-Id: Ia7fa888d5687c9da110b44139a8217558a7f641b Reviewed-on: https://gerrit.libreoffice.org/36222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: vclStephan Bergmann
Change-Id: I5c85d3df578d0b7e9ffc54679b73a0ce35de8620
2017-04-06crashtesting: empty ReadAccess on converting fdo58541-1.xls to pdfCaolán McNamara
Change-Id: I72c74c7224e99b090eceb8928eeddc3b50d1d2c8
2017-04-06loplugin:singlevalfieldsNoel Grandin
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1 Reviewed-on: https://gerrit.libreoffice.org/36145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Fix crash while running the Notebookbar modeSzymon Kłos
Change-Id: Ifc9b900e49968c46768af3b9ee18bbb834f60557 Reviewed-on: https://gerrit.libreoffice.org/36165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-04-05Related: tdf#106972 vcl PDF export, PDF images: ignore PDF >= 1.5Miklos Vajna
When copying their page steam into ours, we need to make sure their syntax is <= 1.4; so when checking if the image has PDF data, ignore the case when it has, but it's >= 1.5 (at least in the default case when not using reference XObjects). Change-Id: I6bd77803b92fe16bdd327e5e7c3d2b42adeacca4 Reviewed-on: https://gerrit.libreoffice.org/36161 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-05tdf#106972 vcl PDF export, PDF images: handle indirect font referencesMiklos Vajna
There were a number of problems here: - the /Resources key of a page object may be an indirect object - the /Font key of a resource object may be an indirect object - the /Length key of an object may be an indirect object So in all these cases handle not only a direct dictionary / number but also when we have a reference-to-dictionary/number. Change-Id: Ie74371f0ba43a133a1299843ef20cbfc75fe26d7
2017-04-05loplugin:redundantcast find c-style bool castsNoel Grandin
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2 Reviewed-on: https://gerrit.libreoffice.org/36137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05loplugin:unreffun (clang-cl)Stephan Bergmann
Change-Id: Ie085ea716f03f6f8438fa2b9f54e46500a0c65f4
2017-04-05loplugin:constantparamNoel Grandin
Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec Reviewed-on: https://gerrit.libreoffice.org/36070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04ofz#984 better match post-creation aBitmap.HasGreyPalette() logicCaolán McNamara
i.e. Bitmap::HsGreyPalette checks that the palette has entries before calling Palette::IsGreyPalette Change-Id: I287647869ad615327f3119b7798f410e22140302
2017-04-04Resolves: tdf#106725 paint default window bg before spin button bgCaolán McNamara
Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04Workaround VCL complextext failure on Win7 KVM QXLJan-Marek Glogowski
My Windows 7 KVM QXL VM fails the bounding rect test with: complextext.cxx:98 VclComplexTextTest::testArabic equality .. failed - Expected: 71x14@(0,1) - Actual : 70x14@(1,1) This doesn't happen using a SSHd on Cygwin64 based session. Adding a SAL_DEBUG to WinSalGraphics::GetGlyphBoundRect shows many different glyph rects, which - probably by pure chance - almost add up to just a single pixel line missing on the left. So this simply drops the first pixel column, if the bounding rect starts with an offset. Works for me. Change-Id: Ia496a208523a9c358d4128ecad887b5c77283fbc Reviewed-on: https://gerrit.libreoffice.org/35647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-04-04tdf#104686: do not crash if Menu has been somehow disposedAron Budea
The rare crashes in MenuFloatingWindow::ImplGetStartY() and MenuFloatingWindow::ImplScroll(bool) likely happen because of a disposed Menu. Let's guard against invalid accesses. Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16 Reviewed-on: https://gerrit.libreoffice.org/36026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-04tdf#99352: assert on stray VclPtrs past DeInitBjoern Michaelsen
- ignore on Windows for now, as it is acting up Change-Id: I98dbb887ed556b58188870c3eb3de1327bc58109 Reviewed-on: https://gerrit.libreoffice.org/35816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-04-04loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef Reviewed-on: https://gerrit.libreoffice.org/36065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:loopvartoosmall (clang-cl)Stephan Bergmann
Change-Id: Ibdfdc5c66cf1e81d9e43c94df31120c476a78572 Reviewed-on: https://gerrit.libreoffice.org/36064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:redundantinline (clang-cl)Stephan Bergmann
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430 Reviewed-on: https://gerrit.libreoffice.org/36063 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()Tor Lillqvist
Somewhere, in time before calling epoxy-wrapper OpenGL functions. This seems to be a good place. Educated guess based on debugging, turned out to work. Change-Id: Id3f1dfb0c5a9dbfb166c47ea81db902af1a4fc08
2017-04-04loplugin:unusedmethodsNoel Grandin
Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b Reviewed-on: https://gerrit.libreoffice.org/36047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03vcl: avoid divide by zero in PDFExtOutDevData::HasAdequateCompression()Miklos Vajna
My stub graphic import filter created a graphic with 0 data size, don't crash on that. Change-Id: Ie9b93fce1bcae04d555a0610f674603c6945a54a Reviewed-on: https://gerrit.libreoffice.org/36048 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-04-03iOS update for Rectanglejan Iversen
Updated Rectangle to tools::Rectangle Change-Id: I1577dffe8d51ac3a33bbc2e0771b338d5fdd0220
2017-04-03use actual UNO enums in vcl..xmlsecurityNoel Grandin
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-02split up doc testing for three major variantsCaolán McNamara
Change-Id: Iac1b5cb1c209ba27d185c8a7ba1e59c663553d77
2017-04-02we're either reading or writing, not bothCaolán McNamara
Change-Id: I6b004c7f7957f3843d37063b182cac0cd07e5f44