summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)AuthorFilesLines
2017-04-13tdf#106933 vcl: delete D2DWriteTextOutRenderer before exit()Michael Stahl3-10/+21
As it happens this DirectWrite stuff is using some thread pool internally, and that must be shutdown before exit(), as Win32 will terminate all other threads at that point, and then the thread pool wants to talk to threads that don't exist any more. https://blogs.msdn.microsoft.com/oldnewthing/20120427-00/?p=7763/ So convert this from a global variable that is deleted from DllMain() to a member of SalData, so it is deleted from DeInitVCL(). Change-Id: I51408a07c78758cf0c193ab66b9214d0c9dbd9e3
2017-04-13convert DateFormat to scoped enum and rename to DateOrderNoel Grandin1-22/+24
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-13fix issue related to using namespace with pchMarkus Mohrhard1-5/+3
Just don't use using namespace at all. It is just causing in issues. In this case the using namespace basegfx; makes references to tools::Rectangle ambiguous with references to ::tools and ::basegfx::tools as options. Found by RandomConfig tb run #377. Change-Id: I0c2bacee0da44532045c13004d22477681f4ff25 Reviewed-on: https://gerrit.libreoffice.org/36498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-13Removed duplicated includesAndrea Gelmini8-12/+0
No automatic tools. Manual checked and tested. Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754 Reviewed-on: https://gerrit.libreoffice.org/36371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-12can use gb_CppunitTest_use_configuration and still access .ui filesCaolán McNamara1-2/+1
after... commit 506cab1a01b0481d0831a7a692a26dc5a5b55e91 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Apr 12 16:14:10 2017 +0100 take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258 Change-Id: I906d16037cdf0b9203a4120cb1a5e9846a5c7b7f Reviewed-on: https://gerrit.libreoffice.org/36482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-12Notebookbar: remove dependency between all containers and IPrioritableSzymon Kłos1-2/+0
Change-Id: I92bff0d68470763c88172744e82d9b5915ffb6f1 Reviewed-on: https://gerrit.libreoffice.org/36387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-04-12take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIRCaolán McNamara1-17/+3
Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258
2017-04-12fix typo @trhowsMichael Stahl1-7/+7
Change-Id: Ia57df88476b3dad0ed140d4f33a2cb813274376e
2017-04-12no need to use OUStringToOString in SAL_INFONoel Grandin3-5/+3
Change-Id: I707e0d72aba89b7e644def6f4c251e14f6599ad2 Reviewed-on: https://gerrit.libreoffice.org/36451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12infinite SetDefaultSize->SetPosSize->SetDefaultSizeCaolán McNamara1-1/+2
https://retrace.fedoraproject.org/faf/reports/1278627/ presumably the 'optimal' starting size hits the invalid size path causing another attempt usin the optimal size, so force a valid initial fallback size Change-Id: I6c38ee5e1b90ce41a4550c8a8370e791f5c351b0
2017-04-11PDF export of PDF images: compress page stream if requestedMiklos Vajna2-12/+17
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 Vajna3-37/+109
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 McNamara1-3/+3
Change-Id: I5f9b0033288ccd4b58e055998834185970f987b0
2017-04-11tdf#107089 PDF export of PDF images: handle mixed filters of page streamsMiklos Vajna3-11/+65
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 Vajna1-64/+71
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 McNamara1-0/+8
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 Gelmini1-1/+1
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 McNamara1-7/+7
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 McNamara1-29/+32
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łos1-2/+12
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 McNamara1-0/+2
Change-Id: I7b567f49651496969ca0da56de702f10e6a39494
2017-04-08vcl: Bitmap processor test - test converting to "disabled" imageTomaž Vajngerl4-1/+121
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 Vajna4-22/+65
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 Vajna1-1/+2
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 Kosiorek1-12/+12
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 McNamara1-2/+6
Change-Id: I6b8715b24792f8bbd4434c1bec584b67f8bcc0c5
2017-04-07tdf#107013 PDF export of PDF images: handle page tree and content streamsMiklos Vajna4-123/+165
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 Stahl1-5/+3
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 Grandin7-27/+26
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 Carl16-36/+36
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 Mehrbrodt1-3/+5
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 Vajna5-47/+3
Not needed anymore after commit a5a571307fb3306b74ab46b085cde6388270a770 (tdf#82580 tools: rename Rectangle to tools::Rectangle, 2017-03-30). Change-Id: I25a11ca0b6c2e9e96847bd01b5e82835d1dd4a95
2017-04-06loplugin:redundantcastStephan Bergmann1-1/+1
Change-Id: I925879cf8df630e4e20773c363b9a27a572f3093
2017-04-06tdf#106960: Fix math scaling on WindowsKhaled Hosny1-23/+0
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 Bergmann4-8/+8
Change-Id: I5c85d3df578d0b7e9ffc54679b73a0ce35de8620
2017-04-06crashtesting: empty ReadAccess on converting fdo58541-1.xls to pdfCaolán McNamara1-1/+1
Change-Id: I72c74c7224e99b090eceb8928eeddc3b50d1d2c8
2017-04-06loplugin:singlevalfieldsNoel Grandin1-4/+2
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 Grandin2-4/+4
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łos1-17/+20
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 Vajna3-2/+66
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 Vajna4-9/+99
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 Grandin3-5/+5
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 Bergmann1-0/+1
Change-Id: Ie085ea716f03f6f8438fa2b9f54e46500a0c65f4
2017-04-05loplugin:constantparamNoel Grandin7-34/+31
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 McNamara1-1/+1
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 McNamara1-3/+9
Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann7-32/+32
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 Glogowski1-2/+10
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 Budea4-30/+56
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 Michaelsen3-13/+63
- 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>