summaryrefslogtreecommitdiff
path: root/include/vcl/settings.hxx
AgeCommit message (Collapse)Author
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Don't use boost::optional forward declarationsStephan Bergmann
...in preparation for wholesale replacement of boost::optional with o3tl::optional (which will be a using declaration for either std::optional or boost::optional, hence can't be forward-declared easily) Change-Id: I031ed1812a0c939f37253f7753e358f1ad9153a3 Reviewed-on: https://gerrit.libreoffice.org/84126 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-09custom widgets: support custom action button text colorsAshod Nakashian
Change-Id: I314183a1d6434c043183a600740c786e22a67503 Reviewed-on: https://gerrit.libreoffice.org/82276 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-10-03loplugin:unusedmethodsNoel Grandin
Change-Id: I9790d053248ae6bd58ecc026c774014c4e5e04aa Reviewed-on: https://gerrit.libreoffice.org/80115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03loplugin:unusedfieldsNoel Grandin
and filter out the weld fields, since we're not touching them yet Change-Id: I3cc23c46d2650f13cb29c7d381687939d23e2882 Reviewed-on: https://gerrit.libreoffice.org/80104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-01tdf#124150 increase size of color valueset widgetTomaž Vajngerl
Size of the color value set can be set through settings, but there was no setter. Added a setter and set it to a bigger value so it is better suited for touch. Change-Id: I8c9b17f7379c4702b0faf7847f1e6292cd89b0d0 Reviewed-on: https://gerrit.libreoffice.org/70031 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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-11-20Drop some headless mode variantsJan-Marek Glogowski
This fixes OSX "make debugrun" by dropping VCL_HIDE_WINDOWS handling and removing the internal GetPseudoHeadless() API. While at it moves the DialogCancelMode enum out of Application. Change-Id: I4876e752ddbfc39dd44faa673fb0e97810089a75 Reviewed-on: https://gerrit.libreoffice.org/61598 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
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-07-27tdf#118966 vcl: add a flag to determine if AA of fonts is used from the systemMiklos Vajna
This is on by default (as there are loads of vcl users who expect font AA working even if the default is off and they don't enable it), but the svx UnoGraphicExporter disables it to make everyone happy. The reason in practice AA was on by default is that the gtk backend uses the system settings in GtkInstance::GetCairoFontOptions() (and not the AA setting from the UI), and lclGetSystemTextAntiAliasMode() does the same on Windows (at least in the direct write case). So now these defaults again have higher priority than leaving the vcl-level default unchanged. Change-Id: I81267c0b036211525ac02d3282fa89d75510f4a8 Reviewed-on: https://gerrit.libreoffice.org/58199 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-27vcl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: Ife5d8eb699b8b6c84b9229ae275dc386fa189bce Reviewed-on: https://gerrit.libreoffice.org/58105 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-27Resolves: tdf#117178 distinguish between pressed vs unpressed rolloverCaolán McNamara
Change-Id: If7964c6584d83609ad08dca7e669b85dfadf036e Reviewed-on: https://gerrit.libreoffice.org/53563 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-26use less RGB_COLORDATANoel Grandin
part of removing ColorData Change-Id: If31b5b88545529863377e9a178f45f4516bf6cbb Reviewed-on: https://gerrit.libreoffice.org/50345 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-18Move toolbars to the border window tearoff mechanismMaxim Monastirsky
and remove the one from ImplPopupFloatWin. Implemented using the FloatWinTitleType::TearOff case, which was unused otherwise. Change-Id: I82a86e5f5897ce1f2e76a2404bb382cbc007700c Reviewed-on: https://gerrit.libreoffice.org/48095 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.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-11-16vcl: StyleSettings - start to unwind code duplication.Michael Meeks
This should be a pure re-factor, plus: switch from Serif -> Sans font default for the UI (wow). enable larger font size for LOK only that avoids a hard to debug svx junit test failure. Change-Id: Id438026064983ea4907819bab55c4be740954605 Reviewed-on: https://gerrit.libreoffice.org/44625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-11vcl: StyleSettings - start to unwind code duplication.Michael Meeks
This should be a pure re-factor, plus headless tweak. Change-Id: Iad7f524ea76625601b3f85cc13a50311ed1de171 Reviewed-on: https://gerrit.libreoffice.org/44624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-08-13tdf#110988 Middle click does not paste primary selectionNoel Grandin
regression from commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e "loplugin:unusedenumconstants read-only constants in vcl" Change-Id: I262dd4c9cd1dc6eca82521f5fd9fbfc952fb7745 Reviewed-on: https://gerrit.libreoffice.org/41111 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17tdf#106458 Color widget should have same number of rowsMaxim Monastirsky
... across different platforms/themes, so the standard palette will always fit without a scrollbar. For this, we must not hardcode some arbitrary fixed size, but calculate the size based on the number of rows of the standard palette. Change-Id: Ica1d615b43b350aece6b2c29a73337439dd05ac6
2017-02-26Restore the GetPreferredContextMenuShortcuts methodMaxim Monastirsky
Because of a typo in GetContextMenuShortcuts it was actually unused and removed later in 7419057e3ec4365748fa6456e207f40fd9e09c62 ("loplugin:unusedmethods in chart2..svx"). Change-Id: Iab3d8e39ef19e7c6dd7df63db5d2dcfc57007a5f
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06loplugin:unusedenumconstants in vclNoel Grandin
- drop TTCR_GLYPHSEQ - drop ImageType::Invalid - give preedit_data_t a default constructor, so my plugin spots that the eState field is being initalised to DontKnow effectively by a memset - document ToolbarIconSize::Small as unused, but can't remove since it might be stored in a user-setting somewhere Change-Id: I94b34bba83a04de16f95e4faec95b4bd29f3c652 Reviewed-on: https://gerrit.libreoffice.org/33887 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24use o3tl::typed_flags in ConfigurationListener::ConfigurationChangedNoel Grandin
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-17Resolves: tdf#87960 add and use a ToolFontColor for toolbar item entriesCaolán McNamara
instead of using the MenuBar text color, cause for Ambiance theme the menubar is dark and its font is light, while the toolbars can be light, so light font on light bg appears greyed out Change-Id: I0fa4ab8eabdd3cd69eb682e5ddba8314b8c9ff0f
2016-11-14Resolves: tdf#103915 when global dark theme is set fall back to breeze_darkCaolán McNamara
otherwise don't assume a desired iconset ending in *dark means breeze_dark is a good fallback Change-Id: Ia294a86e17a2c390b503d5200dfc7195759afa00
2016-11-11Resolves: rhbz#1391418 wayland toolbars can't be docked after undockingCaolán McNamara
see gnome#768128 for extra details under wayland, given the misery here I'm going to just disable toggling between docked and undocked under wayland, and throw away user config on toggling docked/undocked away from the defaults. You can still drag docked things around to new docking position, but you can't pull them out of the dock to float. non-wayland is unaffected Change-Id: Iaa859f3420e6d1b103a8b93d1ad8f82dbffe75d4 Reviewed-on: https://gerrit.libreoffice.org/30752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-30tdf#95014 initial support for 32 px icons in toolbarTomaž Vajngerl
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-26loplugin:expandablemethods in vclNoel Grandin
Change-Id: I1876e203d3a3a5fa36d83a9b282ba49429c1da2a Reviewed-on: https://gerrit.libreoffice.org/30261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05InfoFont/Color is not used by vcl nowCaolán McNamara
anywhere anyone wanted to Get[Font|Color] give it the Label ones instead. why this is exposed through uno is bewildering, stubbed those out for the moment Change-Id: I7a31d027287436be1c075c76a370047efd010bf3
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13tdf#74377 Keyboard shortcuts for context menusMaxim Monastirsky
Configurable through the options dialog. The default behavior depends on the current vclplug (hide for gtk2/3 and OS X, show otherwise). Menus currently affected by this change: - SfxDispatcher based context menus - chart2 context menus - vcl's Edit control context menu - Several MenuBarManager based toolbar dropdowns. Change-Id: Iad9fb99dc90e01c17cba9c07c1a2b262b920e11d Reviewed-on: https://gerrit.libreoffice.org/28849 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-08-15loplugin:unusedenumconstants in unotools..xmlhelpNoel Grandin
Change-Id: Id7ddc0fc1f57c5e8e7fb002e31d54fb8e9f8ffab Reviewed-on: https://gerrit.libreoffice.org/28050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-10ditch the font/screen-scaling thingCaolán McNamara
its of limited utility wrt the vcl layout work and optimal size widgets, and its confuses people looking for hidpi settings Change-Id: I37d21b480446f9fe2845b3a2d9fd59cdeddf1a93
2016-02-18StyleSettingsOptions Only NONE, Mono and NoMnemonics are in useCaolán McNamara
ditch the rest Change-Id: I3383023958f528d9d0d6ba715356d8d6a6aecd5a
2016-02-18StyleSettingsOptions::SpinArrow is not set by anyoneCaolán McNamara
Tragically this means the loss of a OS/2 comment Change-Id: Ia3f7b0a840e6b73cf4fae5f98dd4cf97d4e7b87c
2016-02-18StyleSettingsOptions::SpinUpDown is not set by anyoneCaolán McNamara
Change-Id: I26d5189b6a20844bac2a671a30def1b01aa786a8
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09Formatting changes across all modulesChris Sherlock
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08revert part of "loplugin:unusedmethods"Noel Grandin
<sberg> noelgrandin, just happen to look at b14224fe again; looks a bit scary to remove == or != from cases where both where declared <noelgrandin> sberg, ok, I can revert that part <sberg> noelgrandin, I guess that would be safer (there could be cases where now a different overload could kick in) Change-Id: I5dc41c05dc4439d5adee0e5b3e0a9e1dfb9de3af Reviewed-on: https://gerrit.libreoffice.org/22211 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-02valgrind: scary warning that the cairo font options were deleted before useCaolán McNamara
Change-Id: I58427aafb30eca64a67bcf7dd9a7738d8da3e085
2015-09-30Fix typosAndrea Gelmini
Change-Id: I8e9c6c72c89411d8de04e5edd9317cd54f7c472a Reviewed-on: https://gerrit.libreoffice.org/18958 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-08-03tdf#92788 - Middle Button on Mouse Paste Option Broken for X11Noel Grandin
caused by commit 5333782d090a9e147c0c431f0f741863d1d8cf8e "convert SETTINGS_ #defines to 'enum class'" Change-Id: Id0c2738a61f73223f6c8716f04a619c8cb84c0a9
2015-07-10vcl: forward declare boost::optional in settings.hxxMichael Stahl
... for 1134 fewer uses of optional.hpp and a saving of 673 MB of preprocessor input. Change-Id: I9e8020f3e1ae968db403174c1bc0c1eba1139ecb
2015-07-10loplugin:unusedmethods vcl(part2)Noel Grandin
Change-Id: I12356b3fdce68282a30cae2b270b02e46558860a Reviewed-on: https://gerrit.libreoffice.org/16847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-16Fix typosAndrea Gelmini
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56 Reviewed-on: https://gerrit.libreoffice.org/16300 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-05-22convert constants in include/vcl/settings.hxx to scoped enumsNoel Grandin
Change-Id: I2a110c017f13eca6ddbd70ef3ed195d24adef0a3 Reviewed-on: https://gerrit.libreoffice.org/15828 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-15gtk3: render native menubar and menubaritemsCaolán McNamara
this needs the addition of a new MenuBarHighlightTextColor which defaults to MenuHighlightTextColor on other platforms Change-Id: Id0550294f1778229cbbe154857ba16c629dc5a87
2015-04-30gtk3: Set tab normal/rollover/hightlight text colorsCaolán McNamara
Change-Id: I4dff83941df62bcd5ec5a70a87f59e9ce17c979d