summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-12-12tdf#98253 Qt5 rely on VCL for SetDeactiveColorSumit Chauhan
Keep the DeactiveColor from generic vcl style without overriding it with the Qt5 style. Change-Id: I10ffdc79e1b6878d27ae13c6394ad50d7470f073 Reviewed-on: https://gerrit.libreoffice.org/64522 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-12tdf#107792 vcl: split MakeBrush into functionsDmitriy Shilin
Change-Id: I531442ca1e121c059fb21bd86ff0c6ac7fa0cac4 Reviewed-on: https://gerrit.libreoffice.org/64914 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-12use std::<some_container>::swap, instead of copy and clearNoel Grandin
Change-Id: If49c33e271426ff5c2d0c6cc4010670f797bdd38 Reviewed-on: https://gerrit.libreoffice.org/65001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-12tdf#120454: Implement native rendering of tooltipsKatarina Behrens
side-step the entire misery of proper positioning of non-native tooltips just like in gtk3 Change-Id: I09a75fae672d3d999c946c50c547d5f2cfa3ec14 Reviewed-on: https://gerrit.libreoffice.org/64956 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-12-12tdf#107792 vcl: simplify SetFillColor()Dmitriy Shilin
Change-Id: If01e88d80922ca140e7e5d388cb5760f0bb20d79 Reviewed-on: https://gerrit.libreoffice.org/64913 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-11Adapt MACOSX/IOS ifdef for the now constness of the nFlags variableTor Lillqvist
Change-Id: Ic6c51cdc219e663c59dee32f61e337709c90fbd2
2018-12-11Do as the docs say: Use the CGContext property instead of graphicsPortTor Lillqvist
The graphicsPort property of NSGraphicsContext is deprecated in 10.14. CGContext is there since 10.10 so we can use it unconditionally. But sadly this did not enable me to un-comment the assert() a few lines below. Wonder if this deprecation is just a cleanup of the API, and functionality-wise the CGContext property is exactly the same as graphicsPort? Change-Id: I2d5d0c766c343faa2d8cabea3a0729ce5b3a34e3
2018-12-11Comment out an assertion that fails every time for me on macOSTor Lillqvist
Change-Id: I458f44d16b242700b228db647582c4b40b14661a
2018-12-11OSX implement bitmap-only rendering modeJan-Marek Glogowski
Eventually OSX should also depend on SVP and SVP should just export the platform agnostic code, so we can get rid of all the IOS and ANDROID ifdefs. Since the SVP mode now also uses a default DPI value of 96, we can get rid of those "broken" adjustments to the tests in commit a4ab0c08e747 ("Row height tolerance level increase for unittest") and commit 1e55a47e89a9 ("tdf#62268: allow row height recalculation on document load"). The DPI handling on OSX seems really broken. Additionally DPI should probably a float value, as rounding results in various of-by-one errors in tests. Change-Id: I47881683a9c3d3e1b4f8e7aba1d03842da4d6652 Reviewed-on: https://gerrit.libreoffice.org/64736 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-11tdf#121962 Don't treat closing bracket as invalid syntaxSamuel Mehrbrodt
Somehow there is a difference how the formula looks when converting via command line vs exporting from UI. In UI the sum formula looks like: 'sum( (0) ) (0|0|0|0)' while in cmd line it looks like: 'sum( (0) ) () ' Both look sane, so just don't treat the second one as error. Change-Id: I345c062a9e7c8b9c849885bc6cb88167a3491dd8 Reviewed-on: https://gerrit.libreoffice.org/64941 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-12-11OSX always fall back to a bitmap contextJan-Marek Glogowski
I'm not sure this is the best idea, but without a context many things will definitly break. In theory this is just needed for bitmap-only rendering mode. This is a more general solution of commit e659c6a1857f ("Work around odd macOS 10.14 graphicsContextWithWindow failure"). Change-Id: I3708c25b302a38e1b0c0cccbcacd6cb9b5ff33dc Reviewed-on: https://gerrit.libreoffice.org/64952 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-11OSX cleanup some AquaSalFrame codeJan-Marek Glogowski
Don't send a SalEvent from AquaSalFrame::SetWindowState, if we don't have a NSWindow and therefore can't actually move. Just like most other function, we can return early in this case. Also clean up duplicate code in AquaSalFrame::ShowFullScreen and remove some duplicate mpNSWindow checks. Change-Id: I90365ea64191682a7e867b80467c0a1bafdbc868 Reviewed-on: https://gerrit.libreoffice.org/64951 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-11gtk takes care of the ordering itselfCaolán McNamara
Change-Id: I5d77a3dddeb5524bfef13a4871ffc5bb6be6cae0 Reviewed-on: https://gerrit.libreoffice.org/64900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-11SvListAction::REVERSING is unusedNoel Grandin
Change-Id: I188fbdd3855abff340790451e3939d2486067180 Reviewed-on: https://gerrit.libreoffice.org/64922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11SvListView::CreateViewData unnecessaryNoel Grandin
the method and the only override all do the same thing Change-Id: Id8cb131845f3303fbd51736879aa15661d672400 Reviewed-on: https://gerrit.libreoffice.org/64923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11tdf#107792 vcl: simplify SetLineColor()Dmitriy Shilin
Change-Id: Ie40ef8f4c0b8fe510ead1e8ad66bce88ee6cb913 Reviewed-on: https://gerrit.libreoffice.org/64842 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-11loplugin:useuniqueptr in vclNoel Grandin
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10missing includesStephan Bergmann
Change-Id: I1a393d402a066a42b066eb9f270cf1adf644c7e6
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 tdf#39593 vcl/win/gdi: extract brush updating into methodDmitriy Shilin
Change-Id: I569a8e1ce30054b2e01e9f774fe7332fa6874083 Reviewed-on: https://gerrit.libreoffice.org/64802 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-09Related: tdf#120371 a scheme to provide multi-level notebook tabsCaolán McNamara
Change-Id: Ib92b5e63aa6457f5df8e51fe5404d2341aae5ffb Reviewed-on: https://gerrit.libreoffice.org/64767 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-09tdf#39593 vcl/win/gdi: extract pen resetting into methodDmitriy Shilin
Change-Id: I5abb3ed26376b38b2469f124d2ac1864083a09ef Reviewed-on: https://gerrit.libreoffice.org/64801 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-09Fix typos in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I8cfe93e58bb5a006d69ea7420b5f2aa07a0864c2 Reviewed-on: https://gerrit.libreoffice.org/64739 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-09loplugin:unusedmethodsNoel Grandin
Change-Id: I4f2635d468c9ad83b3ac93733529e01a4d03f38e Reviewed-on: https://gerrit.libreoffice.org/64805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-09missing g_signal_handler_disconnect in GtkInstanceWidgetNoel Grandin
found by loplugin:unusedfields Change-Id: Iefd64e879b32f696456c51da595e462295e5c58e Reviewed-on: https://gerrit.libreoffice.org/64820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-08Clean up LIBO_INTERNAL_ONLY uses of SAL_WARN_UNUSED_RESULTStephan Bergmann
Change-Id: I98b2d90c8345f07010f6defd82557188d5cd35c7 Reviewed-on: https://gerrit.libreoffice.org/64808 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08tdf#121974 Convert Qt menu text as neededMichael Weghorn
Just as is already done in 'Qt5Menu::InsertMenuItem', the text needs to be converted in 'Qt5Menu::SetItemText' as well. Change-Id: I03c8f2e6fe0e926a3f7e4be5b7eac70f1bd9850f Reviewed-on: https://gerrit.libreoffice.org/64796 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-12-08vcl/win/gdi: include header guardDmitriy Shilin
Change-Id: I04c55d196a26a5f3319bac08b2f406397335ee32 Reviewed-on: https://gerrit.libreoffice.org/64797 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-08Remove misguided FALLTHROUGH commentsStephan Bergmann
...between adjacent switch labels without any intervening statements Change-Id: Ieb8a0d9f71ea4382b5f7d005cdf7111d06aeb5d0 Reviewed-on: https://gerrit.libreoffice.org/64789 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08reduce the amount of senseless exceptions during document loadMarkus Mohrhard
Change-Id: If9d0a0539002c013f077b8fb692de4c29ca032b7 Reviewed-on: https://gerrit.libreoffice.org/64791 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-12-07utility constructor for Image "private:graphicrepository" urlsNoel Grandin
Change-Id: I118039f4e47818a43da9302ce3550ea800522675 Reviewed-on: https://gerrit.libreoffice.org/64765 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2018-12-07Use ref for SvTreeList's parent SvListViewMike Kaganski
Follow-up of commit 74816dd665fb2980823e01f81446147fe7fe6688 Change-Id: I246df80586c8fc60efc68b5deeb865cbfcd0da13 Reviewed-on: https://gerrit.libreoffice.org/64762 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-07custom widgets: Rename 'stock' to 'action'.Jan Holesovsky
If the button has this property, it means it is located in the action area, not that it is a stock button per se. Change-Id: Ia57ad24d8cd4ff1d7b74d7ef82da0f352fe3deb3
2018-12-07custom widgets: Better way to find out whether to use the 'stock' theming.Jan Holesovsky
Change-Id: I75ea7b2d407d3acfd3094f17509c89240c48f50a
2018-12-07LOK: dialogs: limit listbox/combobox drop-down lengthAshod Nakashian
Dialogs routed to the LOK client have limited real estate on the screen because dialogs are rendered on a canvas. When the listbox drop-down bleeds outside the dialog area, on the desktop it's no problem, but in the browser, that requires a larger canvas and that brings a host of problems. Here we limit the maximum length of listbox/combobox drop-down lists to avoid this situation. This would ideally be configured via ListBoxMaximumLineCount alas it doesn't work. Change-Id: I55fff28dbfc59dec36714e221f76cf4160ba1505
2018-12-07tdf#39593 vcl: reduce copy-paste in ImplCalcOutSideRgnDmitriy Shilin
Change-Id: I13e13e5e17815bbffef6132ed28fadd3fb12f99b Reviewed-on: https://gerrit.libreoffice.org/64750 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-07vcl: use ref to const while iterating over palette entriesDmitriy Shilin
Change-Id: I2a1b36d9f4bb17f8b60af86a48bc9ec84588a32b Reviewed-on: https://gerrit.libreoffice.org/64749 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-07SvTreeList only ever belongs to one and only one SvListViewNoel Grandin
so simplify that Change-Id: I6db807c5aa8ed1e6487bdb4f5ac5c96cf8abbcf6 Reviewed-on: https://gerrit.libreoffice.org/64752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07remove unused ConfigItemMode::DelayedUpdateNoel Grandin
unused ever since commit c1758889cbd5e8e4afb1044425c908715eb3e1cd Date: Fri Nov 11 22:48:37 2011 +0100 Heavily simplified utl::ConfigManager. and rename ConfigItemMode::ImmediateUpdate to NONE, since it doesn't mean that anymore Change-Id: Ia1d06142a25c9eea0f1d30b70653eed325a21b37 Reviewed-on: https://gerrit.libreoffice.org/64719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07tdf#120625: All vcl windows now share 1 instance of clipboardKatarina Behrens
so we can copy'n'pasta between apps (or 2 instances of the same app) Copy'n'pasta into system clipboard is still buggy for non-Writer apps Change-Id: I07f025172654dd3e6c0ef9cd5ad78d24224f039f Reviewed-on: https://gerrit.libreoffice.org/64721 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-12-07No need to silence -Wregister in lcms2.h any moreStephan Bergmann
...since 2bea600f0295cab7fad3edb55f0c5e092640e49e "external/lcms2: Stop warnings/errors about 'register'" patched those uses away Change-Id: Ib21bb60d158172c8c4e9e93bc3ebaf3729cdecd9 Reviewed-on: https://gerrit.libreoffice.org/64745 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07move a couple of method from SvTreeList to SvListViewNoel Grandin
where they really want to be anyway, instead of passing "this" as a pointer into them Change-Id: Id2a3824c4603a10a7387b6e5afd21d26da121ce4 Reviewed-on: https://gerrit.libreoffice.org/64714 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-06Default all tests to run with the svp pluginJan-Marek Glogowski
Otherwise a test can already require a windowed VCL plugin by calling gb_CppunitTest_use_vcl_non_headless(_with_windows)?. For compatibility on unix --headless still implies the use of the svp plugin, but now a SAL_USE_VCLPLUGIN will override it. All the explicit SAL_USE_VCLPLUGIN=svp are not needed, as this is now included in the gb_TEST_ENV_VARS variable and gengal already calls Application::EnableConsoleOnly(). Change-Id: I6b4e75282aa88d747db87d60ffe6c8f282187c5f Reviewed-on: https://gerrit.libreoffice.org/64052 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-06Resolves: tdf#121936 uninitialized value usedCaolán McNamara
since... commit e194f597ae5882e1cda2cac2925577fff609f101 Date: Sun Sep 30 16:07:16 2018 +0200 Change GlyphItem::nFallbackLevel to font instance Change-Id: I14b40a63cd48ef527e76e15af8f421ce48cce769 Reviewed-on: https://gerrit.libreoffice.org/64698 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-06loplugin:unnecessaryparenStephan Bergmann
Change-Id: Id951b94240b487f8c8cc3f612906d4b2e0bfd76d
2018-12-06Don't fail assertion when setting the dialog cancel mode to its current valueTor Lillqvist
Change-Id: Ie9d78346bb104734fddeb27ff0414b4c7ef64ae9
2018-12-06vcl: split ImplIsPaletteEntry into low-level functionsDmitriy Shilin
Change-Id: I785d70cf05452ce3dbe209f595670d68b9653e22 Reviewed-on: https://gerrit.libreoffice.org/64668 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>