summaryrefslogtreecommitdiff
path: root/include/toolkit
AgeCommit message (Collapse)Author
2022-03-05GetComponentServiceName can be constNoel Grandin
Change-Id: Iac61eec0b27660dd2ff45f70c92de5a8cdc2c301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-08move UserData bodge into VCLXMenuCaolán McNamara
Change-Id: I20c303788e576a29574a696cb20c9e8a235233b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126804 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-18use more cppu::BaseMutexNoel Grandin
Change-Id: I9defebeb9cb0ba22df3578c8aae7501add36a11c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17osl::Mutex->std::mutex in VCLXMenuNoel Grandin
Change-Id: I93883f5cd8f5f83f33eded87d995f95dbfd7989b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126989 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17osl::Mutex->std::mutex in VCLXFontNoel Grandin
Change-Id: I01fbf0c94996412129101a47171aa9f3a6a78ffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126988 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-16use more OInterfaceContainerHelper3 in toolkitCaolán McNamara
Change-Id: I3861a254d660662cbf575e9669cbacba36634856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126855 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-27use more OInterfaceContainerHelper3 in UnoControlNoel Grandin
Change-Id: I701822285acbd0edb47aaf80c8f26541abfcd53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27use more OInterfaceContainerHelper3 in UnoControlListBoxModelNoel Grandin
Change-Id: I102c6fb50506f70911456e8efd36f79969ae631a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04use more DECL_DLLPRIVATE_LINKNoel Grandin
to avoid unnecessarily exporting symbols Change-Id: I4c9c7c86f288ba9655a8b919387e30f3096ccfb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124667 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-28Prepare for removal of non-const operator[] from Sequence in includeMike Kaganski
Change-Id: I85ca453f3add5ac5b59dc6f1ccb2cdb55f0a463c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124333 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-01loplugin:constmethodNoel Grandin
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I78339f1df1f0c55c7edaa552940b07d1ada3aeb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19loplugin:constmethodsNoel Grandin
Change-Id: I786096b989daa6004a6527aafbe825b6f0a22d90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-28a11y: Expose FormattedField as spinboxMichael Weghorn
This adds a new accessibility class 'SVTXAccessibleNumericField' that implements 'XAccessibleValue' and reports having an a11y role of 'AccessibleRole::SPIN_BOX'. An object of that class is returned by 'SVTXNumericField::CreateAccessibleContext'. Create an 'SVTXNumericField' XWindow peer for windows of type 'WindowType::FORMATTEDFIELD' (instead of a 'VCLXNumericField' one), so the newly introduced accessibility class gets used for 'FormattedField'. This way, FormattedFields are now exposed to a11y tools as spinboxes. Previously, since no specific accessibility class had been implemented for VCLXNumericField (then used as XWindow peer class for FormattedField), the one for VCLXEdit, i.e. VCLXAccessibleEdit, was used. While VCLXNumericField implements XNumericField and thus in general offers the relevant methods to implement an accessible class that implements XAccessibleValue as well, it uses the Formatter from the VCLXFormattedSpinField base class to get/set values. However, that doesn't work for the FormattedField case, since FormattedField has its own formatter of a different type and the 'mpFormatter' member in the VCLXFormattedSpinField base class is a nullptr, resulting in the corresponding getter methods always returning 0 and the setters doing nothing. With this commit in place, Accerciser now reports role "spin box" instead of just "text" for FormattedFields and displays the current value as well as allows to change it via the "Value" interface when using the qt5/kf5 VCL plugin. Note: For non-integer values, Accerciser doesn't show the actual decimal value, but an integer, e.g. when the value for "Height" spinbox in Writer's "Page Style" -> "Page" dialog (section "Paper format") is set to "29.70cm", Accerciser shows "30" instead of "29.70", despite 'Qt5AccessibleWidget::currentValue' returning the exact value. This is because Accerciser appears to rely on the value for the minimum increment being reported (as a corresponding decimal value) by a call to 'atspi_value_get_minimum_increment', s.[1]. However, there is currently no corresponding method in the 'XAccesibleValue' interface for that at-spi method which 'Qt5AccessibleWidget::currentValue' could call to retrieve the value. The NVDA screen reader on Windows now also says e.g. "Width: (Type = 344) spin button editable Alt+W selected 8.50″" instead of "Width: (Type = 344) edit Alt+W selected 8.50″". [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119590 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-28Move SVTXNumericField and parents to public toolkit headerMichael Weghorn
This is in preparation for the creation of a new accessibility class for 'SVTXNumericField'. Change-Id: I41e04c71b951832e4e264a271a3d66be7b6d6ce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119589 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-06-19loplugin:finalclassesNoel Grandin
improve the plugin to detect more cases. I only apply the new final changes to classes in /include here. Which reveals that RoadmapWizard::getPageController( TabPage* _pCurrentPage ) will always return nullptr Also needed to sprinkle some SAL_DLLPUBLIC_TEMPLATE around to workaround Visual Studio linking problems. Change-Id: Iadb7d46a9e0e73dabce562375ca013c0fea6690c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14tdf#142255 Crash when trying to insert a shapeNoel Grandin
regression from commit 5aa60be574ece81b27c8f63e6e809871c694dba0 fix leak in VCLXWindow it's too dangerous to dump the Impl during dispose(), because if I do, the Impl is removed while we are iterating over listeners. So just be check mbIsDisposing more heavily to prevent new references to the VCLXWindow being added after it is disposed. Change-Id: Ibb00a289440d24f531072ef5809613d5e8a0a98f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-12forward decl vcl::Window in toolkit/awt/vclxwindow.hxxCaolán McNamara
Change-Id: I488f994fc890cacd20a6fdc224a098fe0caf3070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113960 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-12vclxtopwindow.hxx and vclxcontainer.hxx can now be private headersCaolán McNamara
Change-Id: If6d56c9f2fcaf47e1756e8645098ad86987c8b64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-12VCLXMultiPage can be in private headersCaolán McNamara
and similar VCLXFormattedSpinField can drop SAL_DLLPUBLIC_RTTI Change-Id: I72cf9eeb1a0cba45089692bc81ae0c79a32bbef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-08move set/get Pointer to VCLUnoHelperCaolán McNamara
Change-Id: I7dadc7bc881e0b892720b3eb89fdc60c8d87c541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113776 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-25avoid some ref-countingNoel Grandin
can just return a pointer here, instead of VclPtr. Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-10-26switching long to a 64-bit type on 64-bit windowsNoel
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-18Removed duplicated includesAndrea Gelmini
Change-Id: I61861d87449f83cb3a1efe8a2cf0345864c2f1db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100918 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-08-18move VCLXMultiLineEdit and MultiLineEdit to toolkitCaolán McNamara
Change-Id: I9aa4b1efbecb71141647dbf5d8809482be15d266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-03tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxxGabor Kelemen
Recheck after 7-0 branchoff Also drop the now unused file include/vcl/field.hxx Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-31ASan/UBSan build still needs VCLXEdit RTTIStephan Bergmann
...after 0c311bfbf67441823f8b3916db963e2680e9eb43 "make some classes private": > warn:sal.osl:729320:729320:sal/osl/unx/module.cxx:162: dlopen(instdir/program/libacclo.so, 1): instdir/program/libacclo.so: undefined symbol: _ZTI8VCLXEdit > warn:legacy.osl:729320:729320:toolkit/source/helper/accessibilityclient.cxx:183: AccessibilityClient::ensureInitialized: could not load the library, or not retrieve the needed symbol! > cppunittester: include/com/sun/star/uno/Reference.h:381: interface_type *com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::operator->() const [interface_type = com::sun::star::accessibility::XAccessibleContext]: Assertion `_pInterface != NULL' failed. during CppunitTest_sw_accessible_relation_set, with > $ find workdir/CxxObject/accessibility/source -name \*.o -exec bash -c 'nm "$0" | grep -F _ZTI8VCLXEdit && echo "^ $0"' {} \; > U _ZTI8VCLXEdit > ^ workdir/CxxObject/accessibility/source/standard/vclxaccessibleedit.o Change-Id: Ic1f5fcfa1ba2d415bc6f0e076a2e24daadf86d7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99823 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-30make some classes privateNoel Grandin
Change-Id: Icfce56436aafa14fe923b4d35835ed6dee52afba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-20drop unused VCLXCurrencyFieldCaolán McNamara
Change-Id: Ia2a44d64d4458c15e074522b022388e1da170e27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-20compact namespace declNoel Grandin
used git grep -lw namespace | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;' to do the initial replace, then compiled and fixed. Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15move SVTXDateField to toolkitCaolán McNamara
and svtools CalendarField to vcl Change-Id: I6f3e9a71f21ac7ca70f8172d4f8be4804f3b1c7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98818 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-21don't include vcl/fmtfield.hxx from public hxxCaolán McNamara
Change-Id: I99077c7fe204ab86eef2c5d7dce1a902d7d10df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96781 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-18tdf#133142 UnoControlTabPageContainer: Handle tab property changesMichael Weghorn
In the model, changing a tab page's title or enabled/disabled status is done via methods 'XTabPageModel.setTitle' and 'XTabPageModel.setEnabled'. Changes to the title and enabled/disabled status are propagated to the tab page container containing the tab page (s.a. 25c692c2a94ab83c2c859ac5ab334b62ac8b825e ("ControlModelContainerBase: Use property for enabled status", 2020-05-15)). Make 'VCLXTabPageContainer' derive from 'XPropertiesChangeListener' and implement the 'propertiesChange' method defined in that interface to handle property changes for the tab pages and have 'UnoControlTabPageContainer' forward 'PropertyChangeEvent's to its peer so they can be handled there. This way, changes for those tab page properties via UNO are now properly updated in the UI as well. Change-Id: I6fa1fadf781575c4ad1d066aed9c3a651b10869d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94402 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-05-03use more compact namespace syntax in /includeNoel Grandin
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-10Make BitmapPrimitive2D vcl-independentArmin Le Grand
as preparation to have drawinglayer module independent from vcl in the future Change-Id: Iaa01370f27b51cba5114a54f37d1ec73d0719918 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92048 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-03-23make more classes private in mergedlibs modeNoel Grandin
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-04make some symbols privateNoel Grandin
Change-Id: I3115dda50e77dc6a335e46026724641c08c04030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-18move SVTXFormattedField, SVTXCurrencyField, SVTXNumericField to toolkitCaolán McNamara
Change-Id: If22200a4f342d4d779c612dbace61a4cf99471ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14move VCLXFileControl to toolkitCaolán McNamara
Change-Id: I39bb417fe7e033a8f368fa04d4a30b2388bcddfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88615 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-05move some toolkit/ headers inside the moduleNoel Grandin
Change-Id: I88badb1eb586db00a350afbcd6f4903a5623c724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87988 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-27tdf#124176: Use pragma once instead of header guardPelin Kuran
Change-Id: Id28874549342349fb2727c3cb8e92da1dcdb727c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87513 Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-12-23sal_Char->char in toolkitNoel Grandin
Change-Id: I3016c8c672beb5a2d5f772f8a2ddc0047088e1da Reviewed-on: https://gerrit.libreoffice.org/85743 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-05make some classes module privateNoel Grandin
Mark some stuff SAL_DLLPUBLIC_RTTI in include/vcl/metaact.hxx in order to make ASAN happy. Change-Id: I97febe0968bf58b9cbe60ce647f0ada25e6f4bb0 Reviewed-on: https://gerrit.libreoffice.org/84202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>