summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-06-17loplugin:unusedfields in vcl part3Noel Grandin
Change-Id: I5a6319ba1667af6e9b7b92c22f858188c28c4c61 Reviewed-on: https://gerrit.libreoffice.org/38835 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part2Noel Grandin
Change-Id: Icd02f63e9738c0bb91348e2084649f9edc281e67 Reviewed-on: https://gerrit.libreoffice.org/38833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17loplugin:unusedfields in vcl part1Noel Grandin
Change-Id: I67d176003f39992cd0ff9271a7d6ce26d2cb6619 Reviewed-on: https://gerrit.libreoffice.org/38828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16silence DrMemory warning about Selected font handle deletedCaolán McNamara
This might actually matter in practice given https://stackoverflow.com/questions/27422871/does-deletedc-automatically-unselect-objects "DCs get a default 1x1x1 bitmap when they're created. This will leak if you don't put it back." Change-Id: Ib2d361995621ad429277ff52cb8c9fdfc0009953 Reviewed-on: https://gerrit.libreoffice.org/38875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-16Profiling API: add ProfileZonesLászló Németh
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-15make LANGUAGE setting universal, not just gtk specificCaolán McNamara
Change-Id: I845e808be27e2fad959a73d0d34a204b4bdcdd1f Reviewed-on: https://gerrit.libreoffice.org/38211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-15add quattro pro filter to fftesterCaolán McNamara
Change-Id: If59114dca8adb94266838f496d8b5d60d322bca2
2017-06-15continue if theme cannot be determinedCaolán McNamara
Change-Id: Ia5b6e77b66357dd74c5163472e07a5c31166e8d2
2017-06-15tdf#99680 save graphic state even for empty clipping regionVasily Melenchuk
Previous fix was causing Adobe Reader errors due to mistmatch of save and restore operators. Corresponding unittest is extended to verify save/restore operators count. Change-Id: I102722140e216cb9ad29107aae3bdaa70472d471 Reviewed-on: https://gerrit.libreoffice.org/38694 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use more SAL_N_ELEMENTS part 1Noel Grandin
- teach comphelper::containerToSequence to handle sized arrays - also use range based for-loop where appropriate. Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99 Reviewed-on: https://gerrit.libreoffice.org/38769 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13make opengl transitions under X flicker free on enter/leaveCaolán McNamara
Change-Id: I109637dc6b3d23c0beca21f3cf0c7ba918ecb4f8 Reviewed-on: https://gerrit.libreoffice.org/38749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-13remove TDE integration (vclplug, address book, config backend)Michael Stahl
It has ~no users, can't even be built on modern Linuxes, and it annoys folks who want to refactor VCL. Per ESC decision from 2017-06-08, remove --enable-tde and --enable-tdeab. Change-Id: I51ce4786f29f8fcac2e2bb2a654c41fbfbbd8afd Reviewed-on: https://gerrit.libreoffice.org/38718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-12Avoid use-after-freeStephan Bergmann
...as seen in UITest_calc_demo: > ==1010== Invalid read of size 4 > ==1010== at 0x58DA550: __pthread_mutex_unlock_usercnt (/usr/src/debug/glibc-2.24-33-ge9e69e4/nptl/pthread_mutex_unlock.c:39) > ==1010== by 0x58DA550: pthread_mutex_unlock (/usr/src/debug/glibc-2.24-33-ge9e69e4/nptl/pthread_mutex_unlock.c:324) > ==1010== by 0x1085FB42: __gthread_mutex_unlock(pthread_mutex_t*) (/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/x86_64-redhat-linux/bits/gthr-default.h:778) > ==1010== by 0x10861414: std::mutex::unlock() (/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/bits/std_mutex.h:121) > ==1010== by 0x10861901: std::unique_lock<std::mutex>::unlock() (/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/bits/std_mutex.h:323) > ==1010== by 0x108604C6: std::unique_lock<std::mutex>::~unique_lock() (/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/bits/std_mutex.h:232) > ==1010== by 0x1085FA5E: (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) (/vcl/source/uitest/uno/uiobject_uno.cxx:103) > ==1010== by 0x1085EDE7: (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) (/vcl/source/uitest/uno/uiobject_uno.cxx:85) > ==1010== by 0x10715647: Link<Timer*, void>::Call(Timer*) const (/include/tools/link.hxx:84) > ==1010== by 0x107154A6: Timer::Invoke() (/vcl/source/app/timer.cxx:89) > ==1010== by 0x106D3841: ImplSchedulerData::Invoke() (/vcl/source/app/scheduler.cxx:46) > ==1010== by 0x106D3D28: Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:159) > ==1010== by 0x107040EF: ImplYield(bool, bool, unsigned long) (/vcl/source/app/svapp.cxx:508) > ==1010== by 0x106FE9A7: Application::Yield() (/vcl/source/app/svapp.cxx:558) > ==1010== by 0x106FE92A: Application::Execute() (/vcl/source/app/svapp.cxx:458) > ==1010== by 0x513F498: desktop::Desktop::DoExecute() (/desktop/source/app/app.cxx:1354) > ==1010== by 0x5141660: desktop::Desktop::Main() (/desktop/source/app/app.cxx:1698) > ==1010== by 0x10711884: ImplSVMain() (/vcl/source/app/svmain.cxx:192) > ==1010== by 0x10713197: SVMain() (/vcl/source/app/svmain.cxx:230) > ==1010== by 0x51AEDF7: soffice_main (/desktop/source/app/sofficemain.cxx:166) > ==1010== by 0x40091C: sal_main (/desktop/source/app/main.c:48) > ==1010== by 0x4008F6: main (/desktop/source/app/main.c:47) > ==1010== Address 0x2ccca4e8 is 72 bytes inside a block of size 96 free'd > ==1010== at 0x4C2F21A: operator delete(void*) (/builddir/build/BUILD/valgrind-3.12.0/coregrind/m_replacemalloc/vg_replace_malloc.c:576) > ==1010== by 0x1085FA55: (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) (/vcl/source/uitest/uno/uiobject_uno.cxx:102) > ==1010== by 0x1085EDE7: (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) (/vcl/source/uitest/uno/uiobject_uno.cxx:85) > ==1010== by 0x10715647: Link<Timer*, void>::Call(Timer*) const (/include/tools/link.hxx:84) > ==1010== by 0x107154A6: Timer::Invoke() (/vcl/source/app/timer.cxx:89) > ==1010== by 0x106D3841: ImplSchedulerData::Invoke() (/vcl/source/app/scheduler.cxx:46) > ==1010== by 0x106D3D28: Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:159) > ==1010== by 0x107040EF: ImplYield(bool, bool, unsigned long) (/vcl/source/app/svapp.cxx:508) > ==1010== by 0x106FE9A7: Application::Yield() (/vcl/source/app/svapp.cxx:558) > ==1010== by 0x106FE92A: Application::Execute() (/vcl/source/app/svapp.cxx:458) > ==1010== by 0x513F498: desktop::Desktop::DoExecute() (/desktop/source/app/app.cxx:1354) > ==1010== by 0x5141660: desktop::Desktop::Main() (/desktop/source/app/app.cxx:1698) > ==1010== by 0x10711884: ImplSVMain() (/vcl/source/app/svmain.cxx:192) > ==1010== by 0x10713197: SVMain() (/vcl/source/app/svmain.cxx:230) > ==1010== by 0x51AEDF7: soffice_main (/desktop/source/app/sofficemain.cxx:166) > ==1010== by 0x40091C: sal_main (/desktop/source/app/main.c:48) > ==1010== by 0x4008F6: main (/desktop/source/app/main.c:47) Change-Id: Ie95bf07f2fcd9420c9c24e6829272430895957a6
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12Refactor create layout cache in status barTamas Bunth
Create SalLayout in StatusBar instead of getting cache through output parameter. Pass cache as a constant to the output device afterwards. Results in a more readable code, with more evident memory management. Change-Id: I4f949ea8f390b31379f661d611a183ceb3d91c25 Reviewed-on: https://gerrit.libreoffice.org/38651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-11refactor fuzzer army a bitCaolán McNamara
the core lib has grown sufficiently large that the fuzzing tooling complains of too many instrumented conditions so split things up to hopefully fit again Change-Id: I58899d143925f958aec95b5f213c2dc75a6686ec Reviewed-on: https://gerrit.libreoffice.org/38647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-11Fix typo in codesAndrea Gelmini
Change-Id: If52ff2c0bb4c8a703e883f25d0ba567236cbe479 Reviewed-on: https://gerrit.libreoffice.org/38609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-10re-add quattro pro fuzzerCaolán McNamara
Change-Id: Idcd7efaed2a87c727712bb00ddfbf8ed8f5ed34d
2017-06-09Cache text layout of statusbar itemsTamas Bunth
Extend lifecycle of SalLayout created by the output device. A layout is stored for each status bar item and used as a cache. The layout may be updated through output device method parameters. This way it's no longer necessary to calculate the layout again and again when painting the status bar item multiple times, provided that its text does not change. Change-Id: I6494c2d6b676e8f4fdda2cde6165ff0755fd4fa2 Reviewed-on: https://gerrit.libreoffice.org/38578 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-07remove some more qpw depends for the momentCaolán McNamara
Change-Id: Ia4a24d946921ec460a8fce567806e69372dad80a
2017-06-07Replace vcl::SalLayout Release with destructorTamas Bunth
Replace SalLayout::Release() with normal destructor mechanism. Release() uses reference counting for the layout. But in practice, the reference counting variable is initialized in ctor and is not incremented elsewhere. So I removed the Release() method and replaced all the Release() calls with 'delete'. It will make easier the use of smart pointers and decrease the chance of memory leaks. Change-Id: Ia2e142dea10b87e232d5757d84778e62d87cf081 Reviewed-on: https://gerrit.libreoffice.org/38488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-07Remove gb_LinkTarget_add_generated_cxxobjectsStephan Bergmann
...in favor of gb_LinkTarget_add_generated_exception_objects. The former would have needed any flags to be passed in explicitly (but no call sites did), so e.g. StaticLibrary_graphite didn't have any debug information (when building with --enable-debug). I guess there is no downside to having C++ exception support enabled in these places, and using _add_generated_cxxobjects instead was likely an oversight in the first place (at least in the case of external/graphite/StaticLibrary_graphite.mk, it was that way ever since 1ceb47d96da9e7977c96241f49ad291ff0466970 "graphite: convert to gbuild", but for no apparent reason). Change-Id: I9986a6c5ec30a521095dbe5315e5ca649741a790
2017-06-06something not right with qpwfuzzer depends, disable for nowCaolán McNamara
Change-Id: I0aadbd552d1ba4a64daddba5bfcb3d6ffe534488
2017-06-06coverity#1371243 Missing move assignment operatorCaolán McNamara
Change-Id: Idbd8b87d1336105cc34054277ae492077d86e8c9 Reviewed-on: https://gerrit.libreoffice.org/38453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06use member initialization listCaolán McNamara
Change-Id: Iedfc255306428a4354bb73a67da4f93c714e7817
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06tdf#99680 unittest to ensure there are no empty clipping regionsVasily Melenchuk
Change-Id: Id4565858b0135b3177044558db87a68ef828955b Reviewed-on: https://gerrit.libreoffice.org/38403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-06replace PRINTER_OK with ERRORCODE_NONENoel Grandin
since the first is #define'd to the second, and offers no extra value Change-Id: Id3ce344e246d88b34d0e0fc2619da13f67587000 Reviewed-on: https://gerrit.libreoffice.org/38409 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06tdf#94632 Enable sifr dark and set fallbackYousuf Philips
Change-Id: If77b33acf4f8d3e2e9c38b3e5ef359a1fc966910 Reviewed-on: https://gerrit.libreoffice.org/38387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2017-06-05typosJulien Nabet
Change-Id: I3a28b5ce7464de724799997234925533d45f6121 Reviewed-on: https://gerrit.libreoffice.org/38420 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-05Improved loplugin:cstylecast to reference types: vclStephan Bergmann
Change-Id: I86d31a6dcd01700d6ac8712134f82f0cc83e46f6
2017-06-05Improved loplugin:redundantcast, const/static_cast combinations: vclStephan Bergmann
Change-Id: I1d104fc0dbaa75a401eb9c405062c157f29ef42c
2017-06-05spelling instanciate -> instantiateNoel Grandin
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81 Reviewed-on: https://gerrit.libreoffice.org/38401 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-04wrong qpwfuzzer libsCaolán McNamara
Change-Id: I558061f6a7671109bfe095e22940428b88e7076a
2017-06-04no need to construct unique_ptr hereJochen Nitschke
and std::move is not needed when returning unique_ptr Change-Id: I9b4d2d6b8a41b570a9bd99e44a743ff161b78c59 Reviewed-on: https://gerrit.libreoffice.org/38385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-03add quattro pro fuzzerCaolán McNamara
Change-Id: Ic9ba37af508eabce528ea57ae5839b1cd603b3e1
2017-06-02PPD parsing: set default as well as value, add more parsing info.Michael Meeks
Change-Id: I44ea2518d957b5ceee70df1b9a15779ffd5eb7a4 Reviewed-on: https://gerrit.libreoffice.org/38317 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-02Improved loplugin:redundantcast const_cast handling: vclStephan Bergmann
Change-Id: I7ecc72d4a5a68db8755ff0147fa1326e33827a82
2017-06-02no need to assign a nullptr after a bad_allocNoel Grandin
since if the allocation failed, the assignment would never happen Also use early exit to simplify the code in X11SalBitmap::ImplCreateDIB Change-Id: I73301bfad6492c2b42c08744c24cfb78237983f0 Reviewed-on: https://gerrit.libreoffice.org/38346 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02rework ScQProReader to take SvStream instead of SfxMediumCaolán McNamara
its only uses the stream anyway and this makes it far easier to build a fuzzer on Change-Id: I4aa8b56d4b041708c4de1730d503641ab23c14e8
2017-06-02Improved loplugin:redundantcast static_cast handling: vclStephan Bergmann
Change-Id: I3cf2f05b0076c6c99b84eef4246d3d5c149d6f3d
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01ofz#1605 check multiply and shiftCaolán McNamara
Change-Id: I6aad9ad23e7bf080b3b610223f92df7074530beb Reviewed-on: https://gerrit.libreoffice.org/37632 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-01add ww8 fuzzerCaolán McNamara
Change-Id: Icb8b385e3c59b6476ac58da5e76bbe73eaa82d88
2017-06-01tdf#99680 modified clipping for PDF exportVasily Melenchuk
If clipping is requested, but no clipping region is defined, clipping is ignored. Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413 Reviewed-on: https://gerrit.libreoffice.org/38021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>