summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-01-12More loplugin:cstylecast: vclStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I363c01a1ae9e863fca4fb4589829492d7280d711
2018-01-12loplugin:useuniqueptr in Accelerator and ImplSplitSetNoel Grandin
Change-Id: Ic7f3f2653a1d28b8f18804981de788c93eb97c56 Reviewed-on: https://gerrit.libreoffice.org/47729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11loplugin:redundantcast: vclStephan Bergmann
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: I5e515738a29c6d79154560d69c8b86885800ba88
2018-01-11[API CHANGE] migrate PackageKit usage to Modify2Caolán McNamara
xid dropped in favour of application_id Change-Id: Id1eb43aa9c8dfb4eac82f99eff0f84c5320e0da0 Reviewed-on: https://gerrit.libreoffice.org/47661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-11loplugin:useuniqueptr in ImplAccelManagerNoel Grandin
Change-Id: Ie7968fc709255b07a7045d50aa7641aa4fa70098 Reviewed-on: https://gerrit.libreoffice.org/47728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-10tdf#79077: Harmonize PapersizeFromSetup checkboxes in printer configKatarina Behrens
job setup and options tab page. Also fix a small UI regression Change-Id: I48532ac4e188d68008e947924da651239262d8b2 Reviewed-on: https://gerrit.libreoffice.org/47703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-01-10tdf#113874 Guard against invalid statesSamuel Mehrbrodt
Change-Id: I013dd4eb81f0fbef25d9f58e27fe72d800d910ba Reviewed-on: https://gerrit.libreoffice.org/47702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-09route cff typedefs to our sal onesCaolán McNamara
Change-Id: Idbe907195f6e800e42c59ac8dbe4385d60afee80 Reviewed-on: https://gerrit.libreoffice.org/47610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-09tdf#114704 use of float as intermediate causes out by one on large offsetsCaolán McNamara
table offset integer value of 21281769 is correctly read, but on cast to float it is represented as 21281768 and we're off by one when cast back to integer later Change-Id: I5694e14d72c04493ba15cc77485a734498a45468 Reviewed-on: https://gerrit.libreoffice.org/47607 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-09convert COLOR_CHANNEL_MERGE to constexpr functionNoel Grandin
Change-Id: Ie46e0a47b433517b0bae0deabb447ff5c1000f22 Reviewed-on: https://gerrit.libreoffice.org/47595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-08vcl: mask must alwasy be argb32 even when we can use rgb24Ashod Nakashian
Change-Id: I932669fc5ead7de60561d769dd21d2c35c1f957d Reviewed-on: https://gerrit.libreoffice.org/47564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-01-08lokdialog: Few more places that need to take LOK's LanguageTag into account.Jan Holesovsky
Change-Id: Ida41025c70d45f426304fabe702a3bccd6e2385d Reviewed-on: https://gerrit.libreoffice.org/47474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-01-08set_warnings_not_errors not necessary in qt5 plugin anymoreNoel Grandin
Change-Id: I8ed8c07ce5b34d6a03a2ec9a5f9782cd506529e5
2018-01-08loplugin:useuniqueptr in qt5Noel Grandin
Change-Id: Ic7135e6ca3be7848fa39cd442d6dd716ea090713
2018-01-08loplugin:unnecessaryparen in qt5 pluginNoel Grandin
Change-Id: I07c5cee0b7fa7d05370c8dc61cae0e6a2aead348
2018-01-08loplugin:staticaccess in qt5 pluginNoel Grandin
Change-Id: Ic6a895f9dd9d1474681217d6ddfd31898f916c2c
2018-01-08-Wunused-parameter in qt5 pluginNoel Grandin
Change-Id: I2d17ccdc9addb911fef8925d87b794075946c3ca
2018-01-08fix qt5 pluginNoel Grandin
after commit b0fd921441e1e1066e232282843317514375c8ec Date: Fri Jan 5 13:24:28 2018 +0200 convert tolerance params to sal_uInt8 (second try) Change-Id: I15c2f0a3724976f17bb83e1d07639296cfbb3051
2018-01-07uitest: port the selection code from multi line edit to normal editMarkus Mohrhard
Change-Id: I3ecc2cb55e53af532e5f525542437e904f7ce5dc Reviewed-on: https://gerrit.libreoffice.org/47530 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-07uitest: add support for GtkTextView/VclMultiLineEditMarkus Mohrhard
Change-Id: If1f22ee562b73a54042985254e0b9cd127025b55 Reviewed-on: https://gerrit.libreoffice.org/47529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-07vcl, added checks for HAVE_FEATURE_OPENGLjan Iversen
missing HAVE_FEATURE_OPENGL caused link errors Change-Id: I1c44f9c9f729f351b6acf17ae60cd855b69394db
2018-01-07use the rect from all primitives when converting svg to BitmapTomaž Vajngerl
In some cases we assume wrong size in svgio filter which we tried to "fix" outside when we render svg to bitmap. This reverts the "fix" and is now practically the same when rendering a svg graphic (might be good to combine in the future). The fix for svgio is fixed in a different commit. Change-Id: I43ee35d3220b3a750b8f72f22085f6a34b9d26b8 Reviewed-on: https://gerrit.libreoffice.org/47497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-07svg icon caching even for 1x scalingTomaž Vajngerl
Previously we cached an icon only if we changed the scaling factor or re-colored the icon, however if we have svg icons we want to cache all of the variants, including the unscaled/un-colored one as svg rendering is slower than loading cached png icons. Change-Id: Ie2c14687892bbd12b8e04c690a66c5a1a92ac8b0 Reviewed-on: https://gerrit.libreoffice.org/47498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-06tdf#114818 hold the mutex before executing the error dialogXisco Fauli
Also add an assert to ErrorBox to ensure the mutex is acquired Change-Id: I3e426024dad6ddfc5cffc7861b0cba9e8989c018 Reviewed-on: https://gerrit.libreoffice.org/47388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-06convert tolerance params to sal_uInt8 (second try)Noel Grandin
first attempt was in commit e75abe6e0a4ea250366bb29c0ece697e9b1b80a1, reverted in 7accac097688832d8682a88a0176c3e1482ffade Change-Id: I460e9ab5fcca3a99656e5d8434fa04c2387d7183 Reviewed-on: https://gerrit.libreoffice.org/47463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-06iOS, correct DPIX calculationjan Iversen
Patch is thanks to Jon N. Change-Id: Idba9ec9b32b144523f0e7da5f7273f6af9fdfd31
2018-01-06use std::unique_ptr in GDIMetaFileNoel Grandin
Change-Id: Id3f223d8d2220fb7d7bb2aaa50bb1a8e29bc0f70 Reviewed-on: https://gerrit.libreoffice.org/47462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-06remove pCols from ImplBmpReplaceParamNoel Grandin
it is always nullptr Change-Id: I0eae17a58423cceda08867f4dc5945a3e5553d5e Reviewed-on: https://gerrit.libreoffice.org/47461 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05fix qt5 pluginNoel Grandin
after commit commit 7accac097688832d8682a88a0176c3e1482ffade Date: Fri Jan 5 11:12:54 2018 +0200 tdf#114837 FILEOPEN: Image is blank Change-Id: I2f89e7d292a658ef99f93281a318046c4e9329be
2018-01-05tdf#114837 FILEOPEN: Image is blankNoel Grandin
revert commit e75abe6e0a4ea250366bb29c0ece697e9b1b80a1 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Dec 12 09:33:14 2017 +0200 convert tolerance params to sal_uInt8 for now. Change-Id: Iafaada0fb338f60ecc9f94aafe138500dfb27cf7 Reviewed-on: https://gerrit.libreoffice.org/47453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05Fix typosAndrea Gelmini
Change-Id: I766862d255ac285329ae423629c7445837ddd55f Reviewed-on: https://gerrit.libreoffice.org/47280 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2018-01-04drop ChecksumType typedefNoel Grandin
adds no value Change-Id: I14c168d16eb98eb8c065c4c9a8f2a486c59feebb Reviewed-on: https://gerrit.libreoffice.org/47341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03Qt5 set and update the frame geometryJan-Marek Glogowski
The geometry is used for mouse hit tests for mapping LO mouse events to popup positions. This way (popup) menus become at at least usable. Change-Id: Ic2b409d7a8937320c70b9f377374fe7d51e4ebf3 Reviewed-on: https://gerrit.libreoffice.org/47276 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-01-03Qt5 fix alpha drawing of start center imageJan-Marek Glogowski
Drawing the bottom-left start center image had multiple errors. New images didn't set the default clip rect and weren't correctly resized. The damage handling was also missing for alpha bitmaps. Change-Id: Idabacbb8b507c990a24006152f064ae4f144b89e Reviewed-on: https://gerrit.libreoffice.org/47277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-12-29loplugin:unnecessaryparen improve return checkNoel Grandin
Change-Id: I8128aa4b5fc60efd1dbf5971cdde11e588f5f64b Reviewed-on: https://gerrit.libreoffice.org/47167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29Fix typosAndrea Gelmini
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e Reviewed-on: https://gerrit.libreoffice.org/47126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-28coverity#1311653 Uninitialized scalar fieldCaolán McNamara
Change-Id: I3006cf4397df6b04fa66bd181470756f39dac1e5
2017-12-28Try to handle fonts orphaned from cache gracefullyMike Kaganski
ImplFontCache::Invalidate deletes unused entries (with zero ref count), and keeps other entries, but clears everything (including still used fonts) from its instance list. In the same time, those fonts' mpFontCache pointers kept pointing to this cache object. External clients released font instance by calling its cache's Release method; this itself allows for broken invariants that cache's mnRef0Count is equal to number of unused font instances in its list. Also, those fonts never got released, leaking because ImplFontCache only ever deletes objects in its list. What is worse, sometimes font caches get deleted after invalidation (see OutputDevice::ImplClearFontData). As the instance list of the cache is empty at the point of delete, the cache destructor doesn't delete those fonts that were orphaned at the moment of invalidation (those fonts are still used by some client objects, so deleting them is clearly wrong). But since the font instances still have cache pointer referring the already deleted cache, releasing the instances (by calling deleted cache's Release member function) must lead do some weird results. This patch moves the Acquire/Release to LogicalFontInstance, which now checks if its cache pointer is valid, and if it is, the cache is used to do the work (as before); otherwise, the font handles its lifetime itself, and deletes itself when its reference counter is zero. The cache invalidation clears the cache pointer of the still-used instances. Change-Id: I29811272dda814cbc81f14668d63e385ce772332 Reviewed-on: https://gerrit.libreoffice.org/47111 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-27Make line color consitent between CategoryListBox and simple ListBoxTamás Zolnai
Line color is changed in CategoryListBox::UserDraw() method so we need to explicitely specify it here too. Change-Id: Ia3dcbf70e0a53cfba16d5d2df0fc2e4d7e23ad71 Reviewed-on: https://gerrit.libreoffice.org/47083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-12-27tdf#111781 Drawing selection highlight twice in listBoxesBán Róbert
The selection highlight is drawn tiwce: a rectangle and the background of the text. The fix removes the text backround by setting it to transparent. Change-Id: I969cb5b27619df07d0a37f1a38c859dbf2565483 Reviewed-on: https://gerrit.libreoffice.org/47064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-12-26vcl-svp: add 24-bit (3-byte) RGB surface support to CairoAshod Nakashian
(cherry picked from commit e8ba02b1d56dc7b59a4f0a7373995b28653a0597) Reviewed-on: https://gerrit.libreoffice.org/46681 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 31c044e2501b9d4a0917e4e09133660bbe2a24dc) Change-Id: I7707219eae4c2d6d40c8dc957207b63d3049a75f Reviewed-on: https://gerrit.libreoffice.org/47010 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-26vcl-svp: Store 24-bit images in 3-byte pixelsAshod Nakashian
This adds support in headless rendering for more compact 24-bit RGB image storage in 3-byte pixels instead of 4 bytes. There is a conversion necessary to accomodate Cairo, which requires 4-byte pixels, but that is relatively. Early tests show no loss of performance at runtime. Unit tests updated since the bitmap memory bytes are crc-ed, which obviously are different in size if not in content. (cherry picked from commit 354ad875092fd0c3b12f232950375206ec5d66a6) Reviewed-on: https://gerrit.libreoffice.org/46679 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 11adb51f2553dc4a838c8668d94909771d70e1ab) Change-Id: I3919f7c56d14d09e67f163f035b4c7683b49087c Reviewed-on: https://gerrit.libreoffice.org/47009 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-26Remove redundant call to OutputDevice::ImplRefreshAllFontDataMike Kaganski
Since commit 40809ce46999e9cedb2fe5db8e9d53ebb6c182bf, OutputDevice::AddTempDevFont called OutputDevice::ImplRefreshAllFontData twice: first time explicitly before return, second time in UpdateFontsGuard destructor. Change-Id: Ie67bdcbd98de5f6053379af700239246412b88db Reviewed-on: https://gerrit.libreoffice.org/47066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-25coverity#1426921 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ic264c74c2fc4cc5677895b50394a933b3e3fa9d2 Reviewed-on: https://gerrit.libreoffice.org/47038 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-24loplugin:passstuffbyref even more return improvementsNoel Grandin
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2 Reviewed-on: https://gerrit.libreoffice.org/47021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23loplugin:passstuffbyref improved returns in vclNoel Grandin
Change-Id: I0b103df2e7ce59093869f547225c95865d33da27 Reviewed-on: https://gerrit.libreoffice.org/46916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22use SyncDbusSessionHelper for font install requestsCaolán McNamara
don't need to have two implementations here and can reduce ifdef forest Change-Id: I972159ece9cce417aefd5ec4acf5ba5d1d08317b Reviewed-on: https://gerrit.libreoffice.org/46968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>