summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:staticmethodsStephan Bergmann
Change-Id: I8d26503d68ed3dcc37574e247de3eae02b4e0f53
2018-11-15loplugin:staticmethods in vclNoel Grandin
Change-Id: I00333677db711761510a35dfae5ce70d61fb9491 Reviewed-on: https://gerrit.libreoffice.org/63397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-14avoid valgrind uninitialized jump warning with clangLuboš Luňák
I'm not sure what exactly the actual problem is, but valgrind reports unitialized reads of mbMulti, although that one is fine and the culprint is in fact mbCenter. Which happens to be bit 16 of the bitfield, and the generated assembly looks fishy, just for that one specific bit. Adding extra padding, extra statements or even just reordering avoids it. So this is lame, but just reorder it and be done with it, this should be otherwise harmless and I've spent enough time on this. Change-Id: I25be55ebe0e9b6dc981793aa7caeae2a40bb27a5 Reviewed-on: https://gerrit.libreoffice.org/63186 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-11-12tdf#119856: thread-proof creating frames and setting menusKatarina Behrens
This finally enables opening a new frame and setting its menu from an extension, but it is still far from stable, loads of threading landmines like this all over the code Change-Id: Icf4b67796b0669425ecb7c2c142c21e184024534 Reviewed-on: https://gerrit.libreoffice.org/62737 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-11-10tdf#120703 PVS: make ImplGet(Cleaned)FieldUnits return referenceMike Kaganski
V547 Expression 'pUnits' is always true. Change-Id: I2bd31fcc31c36b43d14ff2a10a7143b9fbe86b3d Reviewed-on: https://gerrit.libreoffice.org/63228 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-10Fix typosAndrea Gelmini
Change-Id: I94fe979fde236111b72b0b445ee2566177a3f0e3 Reviewed-on: https://gerrit.libreoffice.org/63226 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-09custom widgets: Fix various warnings.Jan Holesovsky
Change-Id: I5d657fa4d6f63b93ad3775a5641d08c6e0f3a615
2018-11-09LOK: custom widgets: simplify and correct colorsAshod Nakashian
Also remove macroni. Change-Id: I0b2914e9f0e2aba9d8ca10338b515b598126e315
2018-11-09LOK: custom widgets: reduce theme plugin API surfaceAshod Nakashian
Change-Id: I89dcf5a102be19fd1bc314a89538a121522f4a43
2018-11-09LOK: custom widgets: reduce Color into an int to reduce API surfaceAshod Nakashian
Change-Id: Ib1afbb0b5647048f24d4ea6f9859b76328568dac
2018-11-09LOK: custom widgets: check size of API structuresAshod Nakashian
Change-Id: Iff50f7aeb471870230e9e822657deed6aefad268
2018-11-09LOK: custom widgets: No need for SAL_DLLPUBLIC_RTTI here any more.Jan Holesovsky
Change-Id: I7cae61e1fa9cf74b98627d557890fd41047421df
2018-11-09LOK: custom widgets: convert WidgetThemeLibrary to POD for ABI compatibilityAshod Nakashian
Change-Id: Ibc425d8e630460547d66723ccabeaf4ac29d2719
2018-11-09LOK: custom themes: isolate LO internals headers from theme pluginAshod Nakashian
Change-Id: Ic189aecf092b9cffd800e410d2d6e88016c43052
2018-11-09custom widgets: setup style setting in the widget libraryTomaž Vajngerl
Some theme colors are set using the style settings, which are implemented by each backend to correspond to the system theme. For custom widgets these need to also be set by the library itself. This commit adds the ground work and sets some of the colors for windows backgrounds. Change-Id: Ia65b1605b2b7bef7f01ff1feff2e7470479e626a
2018-11-09custom widgets: draw fixed line widgetTomaž Vajngerl
Change-Id: Icb8cfbe09caf5cbfcf1d3f461c297c052056250d
2018-11-09custom widgets: differentiate stock and non-stock buttonsTomaž Vajngerl
Change-Id: I05f01058d7886dacec3b00dcf31313aea3939164
2018-11-09custom widgets: get the region from the lib. + custom tab widthTomaž Vajngerl
This implements getting the region rectangle from the widget library so it is possible to redefine the size of the widgets if needed. Additionally increase a tab width which are too small by default. Change-Id: If662c44e02631715efd137ecbfc4a5770fa9f6ab
2018-11-09custom widgets: add Toolbar widgetTomaž Vajngerl
Change-Id: Ia4efe711c07213f2edf472602c5b2acc81876906
2018-11-09custom widgets: add List widget - ListNode, ListWidgetTomaž Vajngerl
also added ListNet as noop Change-Id: I033f908a8fc9ce9ec4b3d202e1299f7c0a9cad6c
2018-11-09custom widgets: add Progress widgetTomaž Vajngerl
Change-Id: I573a6c28f5ddb538ca3b0abf15197695fc113802
2018-11-09vcl: simplify ControlDrawParameters construction, add nValueTomaž Vajngerl
Don't require eButtonValue as a constructor parameter as it mostly isn't necessary and required. In addition add nValue instance variable. Change-Id: I927714f715fce1549d87cec633330a0dc313f569
2018-11-09custom widgets: add Slider widgetTomaž Vajngerl
Change-Id: Ie2192edfcfc49a1953059c5947b8ea7bb03a3c7d
2018-11-09custom widgets: add Tab widgetsTomaž Vajngerl
Change-Id: If9acc47b9a7751858d3394741e3984b3c2a49936
2018-11-09custom widgets: draw ListBox widgetTomaž Vajngerl
Change-Id: I1a3b709fdc4fb21fc4ad22542ff669c98b13487d
2018-11-09custom widgets: first round of basic widgets with cairoTomaž Vajngerl
- Radiobutton - Checkbox - Combobox - Editbox - Spinbox - Scrollbar Change-Id: I46bd2753a7c1806f4cd4583455e76c77494225b4
2018-11-09Support drawing custom widgets in headless backendTomaž Vajngerl
..and fallback the headless dawing also in gtk3 where needed Change-Id: Ic5da8fa7a04089342db8e2f334ced69691a15217
2018-11-09custom widgets: Custom Widget ThemesTomaž Vajngerl
Change-Id: I7ec57d18fe99f906aeb6dbb40d0d30c2ac8b51c4
2018-11-09Resolves: tdf#121181 expand message boxes to show full titleCaolán McNamara
as MsgBox used to do Change-Id: I03d459b8c18f60a19ea5b0034a8d98f6aa4f5ce4 Reviewed-on: https://gerrit.libreoffice.org/63117 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-08Bin some leftover and actually unnecessary iOS crack in vclTor Lillqvist
We don't need the '#define SvpSalGraphics AquaSalGraphics' in vcl/inc/headless/svpgdi.hxx. The actual AquaSalGraphics we use for iOS is in vcl/inc/quartz/salgdi.h. I don't remember the details of the convoluted history behind this. Change-Id: Ie56c3c93acf7ad89e10a05e75aa4ca7fd596ba98 Reviewed-on: https://gerrit.libreoffice.org/63098 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-11-08Convert FieldUnit to scoped enumMike Kaganski
Change-Id: Id2df31daa596a18c79af5fc6ea162deb6e24d5af Reviewed-on: https://gerrit.libreoffice.org/62958 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-08Revert "Use the backend SalInstance method IsMainThread for ↵Markus Mohrhard
Application::IsMainThread" vcl/inc/unx/gtk/gtkinst.hxx's IsMainThread returns always false. This breaks in iahndl.cxx on Linux. This reverts commit bc089afb13029bae65b993992b3815430657ac24. Change-Id: I8fbd945e3704214d242f6f9e65760d44b0cc7d40 Reviewed-on: https://gerrit.libreoffice.org/63044 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2018-11-07map GtkTreeView to SvTreeViewBox now it is in vclCaolán McNamara
Change-Id: I8ab8421354a296cb6382f28fd3bd40372e0665df Reviewed-on: https://gerrit.libreoffice.org/62908 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-07move SvTreeListBox to vclCaolán McNamara
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-06Use the backend SalInstance method IsMainThread for Application::IsMainThreadAndras Timar
Change-Id: I3258268b12cb0914a5e8d1c9b57d7891e83080c6 Reviewed-on: https://gerrit.libreoffice.org/62951 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2018-11-04reweld SwWordCountFloatDlgCaolán McNamara
fixing up the bit that failed the last time Change-Id: I235f8f92cbc0c3e31837e01a9b094580c6f5aecf Reviewed-on: https://gerrit.libreoffice.org/62786 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-02Revert "weld SwWordCountFloatDlg"Stephan Bergmann
This reverts commit 26c375671aa362b2f59d84645784938677ae1719. Conflicts: vcl/qt5/Qt5Frame.cxx It caused null pointer dereference during UITest_writer_tests, as seen at <https://ci.libreoffice.org//job/lo_ubsan/1090/>: > /sfx2/source/appl/childwin.cxx:654:18: runtime error: member call on null pointer of type 'vcl::Window' > #0 0x2b97d4160fa3 in SfxChildWindow::SetWorkWindow_Impl(SfxWorkWindow*) /sfx2/source/appl/childwin.cxx:654:18 > #1 0x2b97d462ab86 in SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl*, bool) /sfx2/source/appl/workwin.cxx:1350:9 > #2 0x2b97d463e6bb in SfxWorkWindow::ToggleChildWindow_Impl(unsigned short, bool) /sfx2/source/appl/workwin.cxx:1837:21 > #3 0x2b97d6eae94d in SfxViewFrame::ToggleChildWindow(unsigned short) /sfx2/source/view/viewfrm.cxx:3080:9 > #4 0x2b987664316d in SwView::UpdateWordCount(SfxShell*, unsigned short) /sw/source/uibase/uiview/view1.cxx:212:9 > #5 0x2b9876126a5d in SwTextShell::Execute(SfxRequest&) /sw/source/uibase/shells/textsh1.cxx:1369:9 > #6 0x2b98760a2391 in SfxStubSwTextShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:2974:1 > #7 0x2b97d49050f6 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) /include/sfx2/shell.hxx:207:35 > #8 0x2b97d48c27d0 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:353:13 > #9 0x2b97d48de12d in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:854:9 > #10 0x2b97d482ea34 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1063:9 > #11 0x2b97d4e5cead in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:754:29 > #12 0x2b97d4e60b5e in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:239:9 > #13 0x2b97c6c10b19 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /comphelper/source/misc/dispatchcommand.cxx:60:9 > #14 0x2b980472020c in UITest::executeCommand(rtl::OUString const&) /vcl/source/uitest/uitest.cxx:22:12 [...] Change-Id: I276684a5617bfec3803b195af59c51735bfa470a
2018-11-02Qt5 constify some functions to fix buildJan-Marek Glogowski
Change-Id: Ic0e85b2077c89a63301cf1d5b1cede7f6a0d7dce Reviewed-on: https://gerrit.libreoffice.org/62767 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-01weld SwWordCountFloatDlgCaolán McNamara
enable modeless dialogs to emit a response so runAsync can be used with them and get something called when the dialog is dismissed Change-Id: Ie9603bcc063cefabbae635949671baf06620785d Reviewed-on: https://gerrit.libreoffice.org/61383 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-01tdf#121030 invalidate referenced FontInstancesJan-Marek Glogowski
This sets the FreetypeFont pointer of the FreetypeFontInstances to nullptr when clearing the cache. And it changes the interface functions of SalLayoutGlyphs to some variant different from std::vector. I don't know if we should prefer the mutable or the const font instance. With mutable at least one can invalidate the font instance when checking the IsValid(), so we can get rid of our referenced font instance. Change-Id: I6070cfcb3c549dbad3383bd4ec2b05b30645b753 Reviewed-on: https://gerrit.libreoffice.org/62688 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-01tdf#120777 KDE5: Dialogs get blank when they are resizedAleksei Nikiforov
On window resize qt5 only redraws changed parts of widgets. If resize is minor (i.e. height has increased by 1 pixel, for example), qt5 may consider most parts of widget not changed and skip redrawing them and redraw only certain widget elements. But if cairo is used for drawing, on resize previously drawed image of widget is discarded and new one of different size is created. New image is empty, but qt5 doesn't issue redraw for whole widget. To mitigate this issue, data from old image of widget should be copied over to image of new widget, qt5 will redraw it partially or fully if necessary. Change-Id: Id950074efece9072bbfc002dfcb6ead813d5aeff Reviewed-on: https://gerrit.libreoffice.org/62698 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins
2018-11-01loplugin:useuniqueptr in SalFrame::PostEventNoel Grandin
Change-Id: Ib066b1d6df90f330f2f93ec639bd7bc59a08c024 Reviewed-on: https://gerrit.libreoffice.org/62507 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-31qt5 a11y: Implement QAccessibleEditableTextInterfaceSamuel Mehrbrodt
Change-Id: I21106ac31484c4bf47363e3805315c5fb698e172 Reviewed-on: https://gerrit.libreoffice.org/62682 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-31qt5 a11y: Implement QAccessibleTableInterfaceSamuel Mehrbrodt
Change-Id: Ic632a2253afb960cda43f84905dd519e9052c0eb Reviewed-on: https://gerrit.libreoffice.org/62668 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-31loplugin:useuniqueptr in DeletePrinterQueueInfoNoel Grandin
Change-Id: Ia124a4af642e449dc05f5bae2d5ca766bd67bd68 Reviewed-on: https://gerrit.libreoffice.org/62388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-30Move SalGraphics glyph functions into FontInstanceJan-Marek Glogowski
As we already rely on the GlyphItem's font instance, consequently this removes the SalGraphics GlyphItem based functions. Also unifies the glyph bound rect cache handling. An interesting aspect is the rotated glyph bounding box handling moved from CairoTextRender to FreetypeFont. It doesn't look like an implementation detail for Cairo, so it may have been a bug. Change-Id: I81bbb5d8ee98fb77a1eee05568c456f9e4553023 Reviewed-on: https://gerrit.libreoffice.org/62503 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-30qt5 a11y: Fix QAccessibleValueInterfaceSamuel Mehrbrodt
Needs to be part of Qt5AccessibleWidget Change-Id: I3543cb3b5834c9967066733f0dbd73e974175892 Reviewed-on: https://gerrit.libreoffice.org/62515 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-30qt5 a11y: Implement most of QAccessibleTextInterfaceSamuel Mehrbrodt
Change-Id: I184bad8a6915048d425f8baa56d2e5675d4b97d1 Reviewed-on: https://gerrit.libreoffice.org/62512 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-30tdf#120982 add font reference to SalLayoutGlyphsImplJan-Marek Glogowski
Now that we store the LogicalFontInstance instead of the fallback level, it's not enough to keep a pointer in the glyphs in SalLayoutGlyphsImpl. We also need a reference to the font, to keep the font instance alive. Change-Id: Idc99cf9259af6be672a97ab2c67dbffd9cf29c70 Reviewed-on: https://gerrit.libreoffice.org/62520 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>