summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
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>
2018-12-06vcl: move SysColorEntry to anonymous namespaceDmitriy Shilin
Change-Id: Ib483decf4cd7d8ec5cb73a23c36181bd3e1d49c0 Relates: tdf#107792 Reviewed-on: https://gerrit.libreoffice.org/64661 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05Revert "Compute (un-)premultiply_table at compile time"Stephan Bergmann
This reverts commit 644188bf7f3a07222f2b58a3794348197fb8ad24. It has been found to cause compilation failure ("vcl/source/bitmap/BitmapTools.cxx(1078): error C2131: expression did not evaluate to a constant") with Visual Studio 2017 version 15.9, as discussed in the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2018-December/081500.html> "Windows build failure - C2131: expression did not evaluate to a constant" (and Mike thankfully filed a bug upstream, <https://developercommunity.visualstudio.com/content/problem/398218/ c2131-error-with-stdarray-and-stdmake-integer-sequ.html>). Also, Jenkins node tb39 which runs the "Gerrit Windows" sub-job of Jenkins' "Gerrit for master" job apparently has such a Visual Studio 2017 version 15.9 installed, so keeps failing that job. Change-Id: I87d25863f2e07474fbb2df3c8f72cd2bcc89582e Reviewed-on: https://gerrit.libreoffice.org/64618 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05loplugin:singlevalfields in vclNoel Grandin
Change-Id: I66178430bf77a8c93d054a52d74890863482382e Reviewed-on: https://gerrit.libreoffice.org/64601 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05Add interface for software-only bitmap renderingJan-Marek Glogowski
When SAL_USE_VCLPLUGIN=svp is used, LO is expected to render output only to bitmaps, without real GUI windows. This adds an enabler and a getter function to the Application class, so one can query this information easy as (Enable|Is)BitmapRendering. This can be used by all VCL plugins, which can't fall back to the Cairo based SVP plugin, primary OSX and Win. A working implementation should allow to run all test via SSH. All window-requiring tests already have to set this requirement using gb_CppunitTest_use_vcl_non_headless(_with_windows)? and should be moved to a different make target, or we need some test harness to handle this correctly, before VCL fails the test. Change-Id: I4bd4c81122a6686b090fdd93256d4712ac5f05dd Reviewed-on: https://gerrit.libreoffice.org/64051 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-05Make Application::SetDialogCancelMode "private"Jan-Marek Glogowski
Change callers to Application::EnableHeadlessMode instead except for the Frame dispose sequence, which has to disable a fatal mode temporary. Since Frame is not a unique identifier, rename it to XFrameImpl, otherwise we get a "non-unique" compile error for other files. When we update our gcc baseline, we should be able to forward declare and friend XFrameImpl and really make it private. Change-Id: Ifcad0355adade8f6539ec092b174dd70af8352c2 Reviewed-on: https://gerrit.libreoffice.org/64050 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-05Adapt Qt5Graphics::SetXORModeStephan Bergmann
...to be504e8c7ef06637f055c43ad350381377df1e90 "tdf#121719: Revert fix for tdf#96971", which re-introduced the second "bool bInvertOnly" to virtual SalGraphics::SetXORMode. It had been removed with 258301879bcd20397c38bbd522dea2c923bd9fc2 "tdf#96971 SetXORMode - remove un-needed parameter" before the (back then named) Kf5Graphics::SetXORMode override was introduced with 9335945c7cb215f387ed1444e28533fac437c6e8 "KF5 initial VCL plugin". Assume that actually ignoring bInvertOnly in the implementation of Qt5Graphics::SetXORMode is fine (as is done in various other overriding implementations of SetXORMode, too). Change-Id: I5481e0884350d02425f3f0356029e7625387656c Reviewed-on: https://gerrit.libreoffice.org/64596 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05tdf#39593 vcl: extract SysColor list deletionDmitriy Shilin
Change-Id: I7d1b319a1cf551e1fd6b67f13f738ab42df1b77d Reviewed-on: https://gerrit.libreoffice.org/64591 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-05loplugin:singlevalfields in FilterConfigCacheNoel Grandin
Change-Id: Id45c9ea7f6b73c102eba5d632eff1240cbfe64f5 Reviewed-on: https://gerrit.libreoffice.org/64594 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05only scroll if the event doesn't come from the page contentCaolán McNamara
Change-Id: I579cef26964aebc89bf6c4786725b4bf85fb4fe5 Reviewed-on: https://gerrit.libreoffice.org/64555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-05-Werror=unused-but-set-variableNoel Grandin
after commit 0adbc69c81cc287386b31b25b2dc89780933e2b1 remove unused VclEventId enum values Change-Id: Idcea4bfb2c7215fa903ebac806e73b8d1c7d4f63
2018-12-05tdf#121719: Revert fix for tdf#96971Xisco Fauli
it's still used on Mac. Revert it until XOL is removed This reverts 258301879bcd20397c38bbd522dea2c923bd9fc2 Change-Id: I06548a590f370618ad640724a1b9c59a3faceec2 Reviewed-on: https://gerrit.libreoffice.org/64582 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused StateChangedType enum valueNoel Grandin
Change-Id: I5b241e35af90cc5c0a2df15e596bb5d45f110e52 Reviewed-on: https://gerrit.libreoffice.org/64560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused VclEventId enum valuesNoel Grandin
Change-Id: I7887a7de37a024f2e97dbd20a27a1aa3fdfcfbfa Reviewed-on: https://gerrit.libreoffice.org/64559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused InvertFlags::HighlightNoel Grandin
Change-Id: Id881142f39a6160b8040d0446476767aad83f260 Reviewed-on: https://gerrit.libreoffice.org/64558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused GraphicManagerDrawFlags enumNoel Grandin
Change-Id: I12ef5e6257db337c4432b251bc92107a2c2ea88b Reviewed-on: https://gerrit.libreoffice.org/64557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05tdf#121399 Join cmd reading thread in gtk3_kde5Michael Weghorn
Stop reading commands from the pipe on kde5 side once the "Quit" command has been sent, in order to have the thread that is reading commands from stdin finish properly. Join the thread in the 'FilePickerIpc' destructor, rather than just deleting it while it may still be running, which resulted in 'terminate()' being called. Change-Id: Ia184987e7994cc1de0208ff2757a3cf06c8b7194 Reviewed-on: https://gerrit.libreoffice.org/63835 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-12-05tdf#121892 Guard Gtk3KDE5FilePicker::execute with SolarMutexGuardMichael Weghorn
Adhere to what gtk3's file picker does as well. Threading is involved in Gtk3KDE5FilePickerIpc::execute(). Change-Id: I4fa0a12f46ed13ef04211cb8577e77d1db5e8eae Reviewed-on: https://gerrit.libreoffice.org/64502 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-12-04tdf#121815 just use valid cached layout glyphsJan-Marek Glogowski
I'm not exacly sure when and why the font cache is invalidated, but as a result this also invalidates the cached layouted glyphs. So just check the glyph layout cache state before trying to use it. But actually the status bar should update it's cache, so I'm not sure where to really put the fix. At least this won't crash LO anymore. Change-Id: I5f3ff8b9d56808af74d1419e878819d6019cd893 Reviewed-on: https://gerrit.libreoffice.org/64529 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>