accessibility/inc/pch/precompiled_acc.hxx | 2 basctl/inc/pch/precompiled_basctl.hxx | 2 basctl/source/inc/dlgedobj.hxx | 4 basic/source/sbx/sbxarray.cxx | 4 bin/find-unneeded-includes | 3 canvas/source/directx/dx_config.hxx | 4 chart2/inc/pch/precompiled_chartcontroller.hxx | 2 chart2/source/controller/inc/CharacterPropertyItemConverter.hxx | 4 chart2/source/view/axes/VAxisProperties.hxx | 6 - comphelper/inc/pch/precompiled_comphelper.hxx | 2 comphelper/qa/unit/variadictemplates.cxx | 12 +- comphelper/source/officeinstdir/officeinstallationdirectories.hxx | 6 - compilerplugins/clang/store/stylepolice.cxx | 2 compilerplugins/clang/unusedfields.writeonly.results | 2 connectivity/inc/pch/precompiled_file.hxx | 2 connectivity/source/commontools/dbmetadata.cxx | 8 - connectivity/source/commontools/sqlerror.cxx | 36 +++---- connectivity/source/inc/java/io/Reader.hxx | 4 cppcanvas/inc/pch/precompiled_cppcanvas.hxx | 2 cppcanvas/source/inc/canvasgraphichelper.hxx | 4 cppcanvas/source/wrapper/implcanvas.hxx | 4 cui/inc/pch/precompiled_cui.hxx | 2 cui/source/options/fontsubs.cxx | 2 cui/source/options/tsaurls.cxx | 2 dbaccess/inc/pch/precompiled_dba.hxx | 2 dbaccess/inc/pch/precompiled_dbu.hxx | 2 dbaccess/source/core/api/FilteredContainer.cxx | 4 dbaccess/source/core/api/resultcolumn.cxx | 2 dbaccess/source/core/api/resultcolumn.hxx | 30 +++--- dbaccess/source/core/dataaccess/documentdefinition.cxx | 4 dbaccess/source/core/inc/ContentHelper.hxx | 2 dbaccess/source/core/inc/ModelImpl.hxx | 2 dbaccess/source/filter/xml/xmlExport.cxx | 4 dbaccess/source/ui/app/AppController.cxx | 2 dbaccess/source/ui/app/AppController.hxx | 2 dbaccess/source/ui/app/AppControllerGen.cxx | 4 dbaccess/source/ui/browser/unodatbr.cxx | 4 dbaccess/source/ui/dlg/advancedsettings.cxx | 2 dbaccess/source/ui/dlg/optionalboolitem.hxx | 6 - dbaccess/source/ui/inc/unodatbr.hxx | 2 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 4 desktop/IwyuFilter_desktop.yaml | 3 desktop/inc/app.hxx | 4 desktop/inc/pch/precompiled_deployment.hxx | 2 desktop/inc/pch/precompiled_deploymentgui.hxx | 2 desktop/inc/pch/precompiled_sofficeapp.hxx | 2 desktop/qa/desktop_app/test_desktop_app.cxx | 2 desktop/source/app/app.cxx | 2 desktop/source/app/cmdlineargs.cxx | 4 desktop/source/app/cmdlineargs.hxx | 8 - desktop/source/app/dispatchwatcher.hxx | 4 desktop/source/app/officeipcthread.cxx | 10 +- desktop/source/app/officeipcthread.hxx | 6 - desktop/source/deployment/gui/dp_gui_service.cxx | 10 +- desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 6 - desktop/source/deployment/inc/dp_descriptioninfoset.hxx | 10 +- desktop/source/deployment/inc/dp_identifier.hxx | 4 desktop/source/deployment/manager/dp_extensionmanager.cxx | 2 desktop/source/deployment/manager/dp_manager.cxx | 2 desktop/source/deployment/manager/dp_properties.hxx | 6 - desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 30 +++--- desktop/source/deployment/misc/dp_identifier.cxx | 4 desktop/source/deployment/misc/dp_update.cxx | 4 desktop/source/deployment/registry/configuration/dp_configuration.cxx | 12 +- desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx | 6 - desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx | 4 desktop/source/deployment/registry/dp_backend.cxx | 6 - desktop/source/deployment/registry/help/dp_help.cxx | 10 +- desktop/source/deployment/registry/help/dp_helpbackenddb.cxx | 6 - desktop/source/deployment/registry/help/dp_helpbackenddb.hxx | 4 desktop/source/deployment/registry/package/dp_package.cxx | 6 - desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx | 2 editeng/inc/editattr.hxx | 10 +- editeng/inc/pch/precompiled_editeng.hxx | 2 editeng/qa/unit/core-test.cxx | 2 editeng/source/editeng/editeng.cxx | 2 editeng/source/editeng/impedit.hxx | 4 editeng/source/misc/svxacorr.cxx | 10 +- editeng/source/outliner/outleeng.cxx | 2 editeng/source/outliner/outleeng.hxx | 2 editeng/source/outliner/outliner.cxx | 2 editeng/source/uno/unoedprx.cxx | 2 editeng/source/uno/unofored.cxx | 2 editeng/source/uno/unoforou.cxx | 2 editeng/source/uno/unotext.cxx | 6 - emfio/source/reader/wmfreader.cxx | 6 - filter/source/msfilter/svdfppt.cxx | 12 +- filter/source/pdf/impdialog.cxx | 2 forms/source/component/ListBox.cxx | 4 framework/inc/pch/precompiled_fwe.hxx | 2 framework/inc/pch/precompiled_fwk.hxx | 2 framework/inc/pch/precompiled_fwl.hxx | 2 framework/source/loadenv/loadenv.cxx | 2 framework/source/services/substitutepathvars.cxx | 2 idlc/inc/astexpression.hxx | 4 idlc/inc/astsequence.hxx | 2 include/comphelper/configuration.hxx | 18 +-- include/comphelper/logging.hxx | 4 include/comphelper/unwrapargs.hxx | 6 - include/connectivity/sqlerror.hxx | 14 +-- include/cppcanvas/renderer.hxx | 18 +-- include/dbaccess/genericcontroller.hxx | 10 +- include/editeng/editeng.hxx | 4 include/editeng/outliner.hxx | 16 +-- include/editeng/svxacorr.hxx | 4 include/editeng/unoedprx.hxx | 2 include/editeng/unoedsrc.hxx | 2 include/editeng/unofored.hxx | 2 include/editeng/unoforou.hxx | 2 include/editeng/unotext.hxx | 2 include/filter/msfilter/msdffimp.hxx | 6 - include/filter/msfilter/svdfppt.hxx | 10 +- include/o3tl/any.hxx | 38 ++++---- include/o3tl/optional.hxx | 46 ---------- include/oox/helper/helper.hxx | 2 include/sax/tools/converter.hxx | 4 include/sfx2/dinfdlg.hxx | 4 include/sfx2/lokhelper.hxx | 4 include/sfx2/sidebar/SidebarController.hxx | 6 - include/svx/svdomeas.hxx | 2 include/svx/svdotext.hxx | 2 include/svx/svdoutl.hxx | 2 include/toolkit/controls/unocontrols.hxx | 14 +-- include/unotools/historyoptions.hxx | 4 include/vcl/event.hxx | 6 - include/vcl/fontcapabilities.hxx | 6 - include/vcl/outdevstate.hxx | 18 +-- include/vcl/settings.hxx | 4 include/vcl/threadex.hxx | 6 - include/vcl/treelistentry.hxx | 8 - jvmfwk/inc/elements.hxx | 22 ++-- jvmfwk/inc/fwkbase.hxx | 4 jvmfwk/source/elements.cxx | 26 ++--- jvmfwk/source/fwkbase.cxx | 2 libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx | 2 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx | 2 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx | 2 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx | 2 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx | 4 libreofficekit/qa/tilebench/tilebench.cxx | 2 officecfg/registry/cppheader.xsl | 4 oox/inc/drawingml/table/tablestylepart.hxx | 10 +- oox/inc/drawingml/textbodyproperties.hxx | 12 +- oox/inc/drawingml/textparagraphproperties.hxx | 14 +-- oox/inc/pch/precompiled_oox.hxx | 2 oox/source/drawingml/shape.cxx | 4 oox/source/drawingml/textparagraphproperties.cxx | 4 oox/source/drawingml/textparagraphpropertiescontext.cxx | 4 oox/source/shape/WpsContext.cxx | 4 oox/source/vml/vmlshape.cxx | 6 - pch/inc/pch/precompiled_system.hxx | 2 reportdesign/inc/pch/precompiled_rpt.hxx | 2 reportdesign/inc/pch/precompiled_rptui.hxx | 2 sax/source/tools/converter.cxx | 6 - sc/inc/chgtrack.hxx | 4 sc/inc/colorscale.hxx | 2 sc/inc/conditio.hxx | 4 sc/inc/dpsave.hxx | 18 +-- sc/inc/dptabsrc.hxx | 18 +-- sc/inc/editutil.hxx | 6 - sc/inc/fillinfo.hxx | 4 sc/inc/fonthelper.hxx | 30 +++--- sc/inc/funcdesc.hxx | 6 - sc/inc/paramisc.hxx | 4 sc/inc/patattr.hxx | 4 sc/inc/pch/precompiled_sc.hxx | 2 sc/inc/pch/precompiled_scfilt.hxx | 2 sc/inc/sheetevents.hxx | 4 sc/qa/unit/pivottable_filters_test.cxx | 2 sc/source/core/data/colorscale.cxx | 8 - sc/source/core/data/dpobject.cxx | 2 sc/source/core/data/dpsave.cxx | 14 +-- sc/source/core/data/dptabres.cxx | 8 - sc/source/core/data/dptabsrc.cxx | 10 +- sc/source/core/data/sheetevents.cxx | 8 - sc/source/core/tool/editutil.cxx | 6 - sc/source/filter/excel/xepivot.cxx | 8 - sc/source/filter/excel/xepivotxml.cxx | 2 sc/source/filter/excel/xlpivot.cxx | 2 sc/source/filter/html/htmlpars.cxx | 2 sc/source/filter/inc/eeparser.hxx | 8 - sc/source/filter/inc/lotfntbf.hxx | 4 sc/source/filter/inc/xlpivot.hxx | 4 sc/source/filter/xml/XMLExportDataPilot.cxx | 10 +- sc/source/filter/xml/XMLExportDataPilot.hxx | 4 sc/source/filter/xml/XMLStylesImportHelper.cxx | 6 - sc/source/filter/xml/XMLStylesImportHelper.hxx | 16 +-- sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 2 sc/source/filter/xml/xmlcelli.cxx | 10 +- sc/source/filter/xml/xmlcelli.hxx | 14 +-- sc/source/ui/Accessibility/AccessibleDocument.cxx | 16 +-- sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 4 sc/source/ui/dbgui/pvfundlg.cxx | 2 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 4 sc/source/ui/inc/gridwin.hxx | 2 sc/source/ui/pagedlg/scuitphfedit.cxx | 4 sc/source/ui/unoobj/dapiuno.cxx | 4 sc/source/ui/unoobj/fielduno.cxx | 4 sc/source/ui/view/dbfunc3.cxx | 2 sc/source/ui/view/output.cxx | 14 +-- sd/inc/pch/precompiled_sd.hxx | 2 sd/inc/pch/precompiled_sdui.hxx | 2 sd/source/filter/ppt/pptin.cxx | 4 sd/source/ui/app/sdmod2.cxx | 2 sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 6 - sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 10 +- sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx | 4 sfx2/inc/pch/precompiled_sfx.hxx | 2 sfx2/source/appl/newhelp.cxx | 2 sfx2/source/appl/sfxpicklist.cxx | 2 sfx2/source/doc/SfxDocumentMetaData.cxx | 6 - sfx2/source/view/viewfrm.cxx | 6 - slideshow/inc/pch/precompiled_slideshow.hxx | 2 slideshow/source/engine/activities/activitiesfactory.cxx | 6 - slideshow/source/engine/activities/activitybase.hxx | 2 slideshow/source/engine/activities/activityparameters.hxx | 6 - slideshow/source/engine/animationnodes/animationbasenode.cxx | 4 slideshow/source/engine/shapes/drawshape.hxx | 4 slideshow/source/engine/shapes/viewshape.cxx | 2 slideshow/source/engine/slideshowimpl.cxx | 8 - slideshow/source/engine/transitions/combtransition.cxx | 2 slideshow/source/engine/transitions/combtransition.hxx | 2 slideshow/source/engine/transitions/slidechangebase.cxx | 6 - slideshow/source/engine/transitions/slidechangebase.hxx | 8 - slideshow/source/engine/transitions/slidetransitionfactory.cxx | 34 +++---- slideshow/source/inc/activitiesfactory.hxx | 6 - slideshow/source/inc/animatedsprite.hxx | 6 - starmath/inc/pch/precompiled_sm.hxx | 2 starmath/source/accessibility.cxx | 2 starmath/source/accessibility.hxx | 2 svgio/inc/svgnode.hxx | 10 +- svtools/inc/pch/precompiled_svt.hxx | 2 svtools/inc/table/tablemodel.hxx | 22 ++-- svtools/source/misc/sampletext.cxx | 4 svtools/source/table/gridtablerenderer.cxx | 14 +-- svtools/source/table/tablecontrol_impl.cxx | 40 ++++---- svtools/source/uno/svtxgridcontrol.cxx | 4 svtools/source/uno/unocontroltablemodel.cxx | 42 ++++----- svtools/source/uno/unocontroltablemodel.hxx | 20 ++-- svx/inc/pch/precompiled_svx.hxx | 2 svx/inc/pch/precompiled_svxcore.hxx | 2 svx/source/accessibility/AccessibleEmptyEditSource.cxx | 2 svx/source/dialog/ClassificationEditView.cxx | 2 svx/source/dialog/ClassificationEditView.hxx | 2 svx/source/dialog/weldeditview.cxx | 8 - svx/source/form/fmmodel.cxx | 4 svx/source/svdraw/svdedxv.cxx | 4 svx/source/svdraw/svdobj.cxx | 6 - svx/source/svdraw/svdomeas.cxx | 2 svx/source/svdraw/svdotxfl.cxx | 2 svx/source/svdraw/svdoutl.cxx | 2 sw/inc/anchoreddrawobject.hxx | 6 - sw/inc/crsrsh.hxx | 2 sw/inc/fmtpdsc.hxx | 8 - sw/inc/pch/precompiled_msword.hxx | 2 sw/inc/pch/precompiled_sw.hxx | 2 sw/inc/pch/precompiled_swui.hxx | 2 sw/inc/pch/precompiled_vbaswobj.hxx | 2 sw/inc/redline.hxx | 4 sw/inc/swabstdlg.hxx | 4 sw/inc/undobj.hxx | 4 sw/source/core/crsr/BlockCursor.hxx | 10 +- sw/source/core/crsr/bookmrk.cxx | 2 sw/source/core/crsr/findattr.cxx | 8 - sw/source/core/crsr/findtxt.cxx | 8 - sw/source/core/doc/docdraw.cxx | 2 sw/source/core/frmedt/fedesc.cxx | 2 sw/source/core/frmedt/fews.cxx | 2 sw/source/core/inc/UndoDelete.hxx | 4 sw/source/core/inc/UndoInsert.hxx | 12 +- sw/source/core/inc/swfont.hxx | 26 ++--- sw/source/core/inc/wrong.hxx | 4 sw/source/core/layout/atrfrm.cxx | 4 sw/source/core/layout/calcmove.cxx | 4 sw/source/core/layout/flowfrm.cxx | 4 sw/source/core/layout/laycache.cxx | 2 sw/source/core/layout/newfrm.cxx | 2 sw/source/core/layout/pagechg.cxx | 2 sw/source/core/layout/paintfrm.cxx | 2 sw/source/core/layout/trvlfrm.cxx | 4 sw/source/core/text/frmpaint.cxx | 2 sw/source/core/text/porlay.cxx | 6 - sw/source/core/text/wrong.cxx | 10 +- sw/source/core/tox/tox.cxx | 8 - sw/source/core/txtnode/swfont.cxx | 8 - sw/source/core/txtnode/txatbase.cxx | 4 sw/source/core/undo/undel.cxx | 2 sw/source/core/undo/unins.cxx | 8 - sw/source/filter/html/htmlatr.cxx | 6 - sw/source/filter/html/wrthtml.hxx | 2 sw/source/filter/ww8/attributeoutputbase.hxx | 4 sw/source/filter/ww8/docxattributeoutput.cxx | 20 ++-- sw/source/filter/ww8/docxattributeoutput.hxx | 6 - sw/source/filter/ww8/docxtablestyleexport.cxx | 6 - sw/source/filter/ww8/rtfattributeoutput.cxx | 6 - sw/source/filter/ww8/rtfattributeoutput.hxx | 6 - sw/source/filter/ww8/rtfexport.cxx | 2 sw/source/filter/ww8/wrtw8sty.cxx | 4 sw/source/filter/ww8/wrtww8.hxx | 6 - sw/source/filter/ww8/ww8attributeoutput.hxx | 2 sw/source/filter/xml/xmlexpit.cxx | 2 sw/source/ui/dialog/swdlgfact.cxx | 2 sw/source/ui/dialog/swdlgfact.hxx | 4 sw/source/ui/misc/titlepage.cxx | 4 sw/source/ui/table/tabledlg.cxx | 6 - sw/source/uibase/app/appenv.cxx | 2 sw/source/uibase/docvw/PageBreakWin.cxx | 2 sw/source/uibase/inc/PageBreakWin.hxx | 6 - sw/source/uibase/inc/break.hxx | 6 - sw/source/uibase/inc/edtwin.hxx | 2 sw/source/uibase/inc/toxmgr.hxx | 38 ++++---- sw/source/uibase/inc/wrtsh.hxx | 4 sw/source/uibase/shells/textsh1.cxx | 2 sw/source/uibase/uiview/viewsrch.cxx | 2 sw/source/uibase/utlui/uitool.cxx | 2 sw/source/uibase/wrtsh/wrtsh1.cxx | 2 toolkit/source/controls/unocontrols.cxx | 22 ++-- ucb/source/ucp/ext/ucpext_content.hxx | 6 - unotools/inc/pch/precompiled_utl.hxx | 2 unotools/source/config/historyoptions.cxx | 8 - unoxml/source/rdf/librdf_repository.cxx | 8 - vbahelper/inc/pch/precompiled_msforms.hxx | 2 vcl/inc/bitmapwriteaccess.hxx | 6 - vcl/inc/fontinstance.hxx | 4 vcl/inc/pch/precompiled_vcl.hxx | 2 vcl/inc/sft.hxx | 4 vcl/inc/svdata.hxx | 8 - vcl/inc/unx/screensaverinhibitor.hxx | 14 +-- vcl/inc/wall2.hxx | 4 vcl/inc/window.h | 14 +-- vcl/qt5/Qt5Frame.cxx | 4 vcl/source/app/settings.cxx | 6 - vcl/source/control/quickselectionengine.cxx | 4 vcl/source/fontsubset/sft.cxx | 4 vcl/source/outdev/text.cxx | 4 vcl/unx/generic/window/salframe.cxx | 2 vcl/unx/generic/window/screensaverinhibitor.cxx | 4 vcl/unx/gtk3/gtk3gtkframe.cxx | 4 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 2 vcl/unx/kf5/KF5SalFrame.cxx | 2 vcl/win/gdi/salnativewidgets-luna.cxx | 2 vcl/win/window/salframe.cxx | 2 writerfilter/source/dmapper/DomainMapper.cxx | 4 writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 38 ++++---- writerfilter/source/dmapper/DomainMapperTableManager.cxx | 6 - writerfilter/source/dmapper/DomainMapper_Impl.cxx | 26 ++--- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 10 +- writerfilter/source/dmapper/GraphicImport.cxx | 8 - writerfilter/source/dmapper/NumberingManager.cxx | 4 writerfilter/source/dmapper/NumberingManager.hxx | 2 writerfilter/source/dmapper/PropertyMap.cxx | 12 +- writerfilter/source/dmapper/PropertyMap.hxx | 6 - writerfilter/source/dmapper/SdtHelper.cxx | 5 - writerfilter/source/dmapper/StyleSheetTable.cxx | 6 - writerfilter/source/dmapper/TextEffectsHandler.hxx | 6 - writerfilter/source/rtftok/rtfdocumentimpl.hxx | 6 - writerfilter/source/rtftok/rtfsdrimport.cxx | 22 ++-- 357 files changed, 1084 insertions(+), 1137 deletions(-)
New commits: commit 9ad252b2e79576119c2d733a1a45fdd9e9f83140 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Feb 21 07:26:06 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Feb 21 14:50:28 2020 +0100 Drop o3tl::optional wrapper ...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 "<"/">" 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 <sberg...@redhat.com> diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx index 6d8d5ec6db69..deb1105fb30d 100644 --- a/accessibility/inc/pch/precompiled_acc.hxx +++ b/accessibility/inc/pch/precompiled_acc.hxx @@ -285,7 +285,7 @@ #include <i18nlangtag/languagetag.hxx> #include <o3tl/cow_wrapper.hxx> #include <o3tl/deleter.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx index 129cef565a54..6eb6ab17492b 100644 --- a/basctl/inc/pch/precompiled_basctl.hxx +++ b/basctl/inc/pch/precompiled_basctl.hxx @@ -358,7 +358,7 @@ #include <o3tl/cow_wrapper.hxx> #include <o3tl/deleter.hxx> #include <o3tl/enumarray.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> #include <o3tl/strong_int.hxx> diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 73b3039550d8..906451e5cb04 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/container/XContainerListener.hpp> #include <svx/svdouno.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <map> @@ -158,7 +158,7 @@ private: DlgEditor& rDlgEditor; std::vector<DlgEdObj*> pChildren; - mutable ::o3tl::optional< css::awt::DeviceInfo > mpDeviceInfo; + mutable ::std::optional< css::awt::DeviceInfo > mpDeviceInfo; private: explicit DlgEdForm( diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 172311808836..280f8ebe869e 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -24,14 +24,14 @@ #include <basic/sbx.hxx> #include <runtime.hxx> -#include <o3tl/optional.hxx> +#include <optional> using namespace std; struct SbxVarEntry { SbxVariableRef mpVar; - o3tl::optional<OUString> maAlias; + std::optional<OUString> maAlias; }; diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index a6ec228fce58..fcbabad87465 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -65,9 +65,6 @@ def ignoreRemoval(include, toAdd, absFileName, moduleRules): "cmath": "bits/std_abs.h", "ctime": "bits/types/clock_t.h", "cstdint": "bits/stdint-uintn.h", - # Keep using the o3tl wrapper for <optional>. - # Works around <https://github.com/include-what-you-use/include-what-you-use/issues/752>. - "o3tl/optional.hxx": "optional", } for k, v in bits.items(): if include == k and v in toAdd: diff --git a/canvas/source/directx/dx_config.hxx b/canvas/source/directx/dx_config.hxx index 86c719fed1b2..2a1cc8ee63d8 100644 --- a/canvas/source/directx/dx_config.hxx +++ b/canvas/source/directx/dx_config.hxx @@ -21,7 +21,7 @@ #define INCLUDED_CANVAS_SOURCE_DIRECTX_DX_CONFIG_HXX #include <unotools/configitem.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <set> namespace basegfx { class B2IVector; } @@ -72,7 +72,7 @@ namespace dxcanvas virtual void ImplCommit() override; typedef std::set< DeviceInfo > ValueSet; ValueSet maValues; - o3tl::optional<sal_Int32> maMaxTextureSize; + std::optional<sal_Int32> maMaxTextureSize; bool mbBlacklistCurrentDevice; bool mbValuesDirty; }; diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 1a5f58d6fa99..35b09a4123c5 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -314,7 +314,7 @@ #include <o3tl/cow_wrapper.hxx> #include <o3tl/deleter.hxx> #include <o3tl/enumarray.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> #include <o3tl/strong_int.hxx> diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx index 657e3d1824e4..d89b10d9b197 100644 --- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx +++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx @@ -22,7 +22,7 @@ #include "ItemConverter.hxx" #include <com/sun/star/awt/Size.hpp> -#include <o3tl/optional.hxx> +#include <optional> namespace chart { namespace wrapper { @@ -52,7 +52,7 @@ private: OUString m_aRefSizePropertyName; css::uno::Reference<css::beans::XPropertySet> m_xRefSizePropSet; - o3tl::optional<css::awt::Size> m_pRefSize; + std::optional<css::awt::Size> m_pRefSize; }; }} diff --git a/chart2/source/view/axes/VAxisProperties.hxx b/chart2/source/view/axes/VAxisProperties.hxx index c9bd687909df..93c703378f29 100644 --- a/chart2/source/view/axes/VAxisProperties.hxx +++ b/chart2/source/view/axes/VAxisProperties.hxx @@ -30,7 +30,7 @@ #include <com/sun/star/uno/Any.hxx> #include <vector> -#include <o3tl/optional.hxx> +#include <optional> namespace chart { class ExplicitCategoriesProvider; } namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } } @@ -101,8 +101,8 @@ struct AxisProperties final css::chart::ChartAxisLabelPosition m_eLabelPos; css::chart::ChartAxisMarkPosition m_eTickmarkPos; - o3tl::optional<double> m_pfMainLinePositionAtOtherAxis; - o3tl::optional<double> m_pfExrtaLinePositionAtOtherAxis; + std::optional<double> m_pfMainLinePositionAtOtherAxis; + std::optional<double> m_pfExrtaLinePositionAtOtherAxis; bool m_bCrossingAxisHasReverseDirection; bool m_bCrossingAxisIsCategoryAxes; diff --git a/comphelper/inc/pch/precompiled_comphelper.hxx b/comphelper/inc/pch/precompiled_comphelper.hxx index ffccf4ebfb98..0c2a8c4d917d 100644 --- a/comphelper/inc/pch/precompiled_comphelper.hxx +++ b/comphelper/inc/pch/precompiled_comphelper.hxx @@ -185,7 +185,7 @@ #include <cppuhelper/weakagg.hxx> #include <cppuhelper/weakref.hxx> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> #include <salhelper/salhelperdllapi.h> diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx index 587bded24702..c894cf1a7bb6 100644 --- a/comphelper/qa/unit/variadictemplates.cxx +++ b/comphelper/qa/unit/variadictemplates.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <o3tl/optional.hxx> +#include <optional> #include <sal/types.h> #include <comphelper/unwrapargs.hxx> #include <cppunit/TestAssert.h> @@ -56,7 +56,7 @@ void extract( template <typename T> void extract( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> const& seq, - sal_Int32 nArg, ::o3tl::optional<T> & v, + sal_Int32 nArg, ::std::optional<T> & v, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> const& xErrorContext ) { @@ -104,22 +104,22 @@ void VariadicTemplatesTest::testUnwrapArgs() { ::com::sun::star::uno::Any tmp9( ::com::sun::star::uno::makeAny( tmp4 ) ); - ::o3tl::optional< ::com::sun::star::uno::Any > tmp10( + ::std::optional< ::com::sun::star::uno::Any > tmp10( ::com::sun::star::uno::makeAny( tmp5 ) ); - ::o3tl::optional< ::com::sun::star::uno::Any > tmp11( + ::std::optional< ::com::sun::star::uno::Any > tmp11( ::com::sun::star::uno::makeAny( tmp1 ) ); // test equality with the baseline and template specialization with - // o3tl::optional< T > + // std::optional< T > try { ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > seq1( static_cast< sal_uInt32 >( 5 ) ); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > seq2( static_cast< sal_uInt32 >( 5 ) ); - // tmp11 should be ignored as it is ::o3tl::optional< T > + // tmp11 should be ignored as it is ::std::optional< T > ::comphelper::unwrapArgs( seq1, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11 ); unwrapArgsBaseline( seq2, tmp6, tmp7, tmp8, tmp9, tmp10 ); ::com::sun::star::uno::Any* p1 = seq1.getArray(); diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx index 256315fb2851..def6dcbd7e35 100644 --- a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx +++ b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XOfficeInstallationDirectories.hpp> -#include <o3tl/optional.hxx> +#include <optional> namespace com::sun::star::uno { class XComponentContext; } @@ -72,8 +72,8 @@ private: void initDirs(); css::uno::Reference< css::uno::XComponentContext > m_xCtx; - o3tl::optional<OUString> m_xOfficeBrandDir; - o3tl::optional<OUString> m_xUserDir; + std::optional<OUString> m_xOfficeBrandDir; + std::optional<OUString> m_xUserDir; }; } // namespace comphelper diff --git a/compilerplugins/clang/store/stylepolice.cxx b/compilerplugins/clang/store/stylepolice.cxx index 87a9e4437901..d3b2e8a4400e 100644 --- a/compilerplugins/clang/store/stylepolice.cxx +++ b/compilerplugins/clang/store/stylepolice.cxx @@ -111,7 +111,7 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl) if (!qt->isPointerType() && !qt->isArrayType() && !qt->isFunctionPointerType() && !qt->isMemberPointerType() && matchPointerVar(name) && !startswith(typeName, "boost::intrusive_ptr") - && !startswith(typeName, "o3tl::optional") + && !startswith(typeName, "std::optional") && !startswith(typeName, "boost::shared_ptr") && !startswith(typeName, "com::sun::star::uno::Reference") && !startswith(typeName, "cppu::OInterfaceIteratorHelper") diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results index dd69a4baad20..828a5d6c8186 100644 --- a/compilerplugins/clang/unusedfields.writeonly.results +++ b/compilerplugins/clang/unusedfields.writeonly.results @@ -517,7 +517,7 @@ sc/inc/compiler.hxx:265 sc/inc/document.hxx:2604 ScMutationDisable mpDocument class ScDocument * sc/inc/patattr.hxx:55 - ScPatternAttr mxHashCode o3tl::optional<size_t> + ScPatternAttr mxHashCode std::optional<size_t> sc/inc/pivot.hxx:75 ScDPLabelData mnFlags sal_Int32 sc/inc/pivot.hxx:78 diff --git a/connectivity/inc/pch/precompiled_file.hxx b/connectivity/inc/pch/precompiled_file.hxx index 72acb30e6c62..d7919bf68fd6 100644 --- a/connectivity/inc/pch/precompiled_file.hxx +++ b/connectivity/inc/pch/precompiled_file.hxx @@ -181,7 +181,7 @@ #include <file/fcode.hxx> #include <file/fcomp.hxx> #include <file/filedllapi.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> #include <resource/sharedresources.hxx> diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index cec1ec418f5c..f8afdcda692c 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -38,7 +38,7 @@ #include <comphelper/processfactory.hxx> #include <sal/log.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace dbtools @@ -71,8 +71,8 @@ namespace dbtools Reference< XDatabaseMetaData > xConnectionMetaData; ::connectivity::DriversConfig aDriverConfig; - ::o3tl::optional< OUString > sCachedIdentifierQuoteString; - ::o3tl::optional< OUString > sCachedCatalogSeparator; + ::std::optional< OUString > sCachedIdentifierQuoteString; + ::std::optional< OUString > sCachedCatalogSeparator; DatabaseMetaData_Impl() :xConnection() @@ -154,7 +154,7 @@ namespace dbtools const OUString& lcl_getConnectionStringSetting( - const DatabaseMetaData_Impl& _metaData, ::o3tl::optional< OUString >& _cachedSetting, + const DatabaseMetaData_Impl& _metaData, ::std::optional< OUString >& _cachedSetting, OUString (SAL_CALL XDatabaseMetaData::*_getter)() ) { if ( !_cachedSetting ) diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index db4c59f2f480..dee6f36f0b61 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -50,12 +50,12 @@ namespace connectivity // versions of the public SQLError methods which are just delegated to this impl-class static const OUString& getMessagePrefix(); - OUString getErrorMessage( const ErrorCondition _eCondition, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); + OUString getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); static ErrorCode getErrorCode( const ErrorCondition _eCondition ); - void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); - void raiseException( const ErrorCondition _eCondition, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); - void raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const Type& _rExceptionType, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); - SQLException getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); + void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); + void raiseException( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); + void raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const Type& _rExceptionType, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); + SQLException getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); private: /// returns the basic error message associated with the given error condition, without any parameter replacements @@ -69,7 +69,7 @@ namespace connectivity /// returns an SQLException describing the given error condition SQLException impl_buildSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, - const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ); + const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ); private: std::locale m_aResources; }; @@ -90,7 +90,7 @@ namespace connectivity /** substitutes a given placeholder in the given message with the given value */ - void lcl_substitutePlaceholder(OUString& _rMessage, const char* _pPlaceholder, const o3tl::optional<OUString>& rParamValue) + void lcl_substitutePlaceholder(OUString& _rMessage, const char* _pPlaceholder, const std::optional<OUString>& rParamValue) { size_t nPlaceholderLen( strlen( _pPlaceholder ) ); sal_Int32 nIndex = _rMessage.indexOfAsciiL( _pPlaceholder, nPlaceholderLen ); @@ -142,7 +142,7 @@ namespace connectivity } } - OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { OUString sErrorMessage( impl_getErrorMessage( _eCondition ) ); @@ -160,7 +160,7 @@ namespace connectivity } - void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { raiseTypedException( _eCondition, @@ -173,7 +173,7 @@ namespace connectivity } - void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + void SQLError_Impl::raiseException( const ErrorCondition _eCondition, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { raiseTypedException( _eCondition, @@ -186,7 +186,7 @@ namespace connectivity } void SQLError_Impl::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, - const Type& _rExceptionType, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + const Type& _rExceptionType, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { if ( !::cppu::UnoType< SQLException >::get().isAssignableFrom( _rExceptionType ) ) throw std::bad_cast(); @@ -203,13 +203,13 @@ namespace connectivity } SQLException SQLError_Impl::getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, - const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { return impl_buildSQLException( _eCondition, _rxContext, _rParamValue1, _rParamValue2, _rParamValue3 ); } SQLException SQLError_Impl::impl_buildSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, - const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) + const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) { return SQLException( getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 ), @@ -258,7 +258,7 @@ namespace connectivity OUString SQLError::getErrorMessage( const ErrorCondition _eCondition ) const { - return m_pImpl->getErrorMessage( _eCondition, o3tl::optional<OUString>(), o3tl::optional<OUString>(), o3tl::optional<OUString>() ); + return m_pImpl->getErrorMessage( _eCondition, std::optional<OUString>(), std::optional<OUString>(), std::optional<OUString>() ); } @@ -268,7 +268,7 @@ namespace connectivity } - void SQLError::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) const + void SQLError::raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const { m_pImpl->raiseException( _eCondition, _rxContext, _rParamValue1, _rParamValue2, _rParamValue3 ); } @@ -276,19 +276,19 @@ namespace connectivity void SQLError::raiseException( const ErrorCondition _eCondition ) const { - m_pImpl->raiseException( _eCondition, o3tl::optional<OUString>(), o3tl::optional<OUString>(), o3tl::optional<OUString>() ); + m_pImpl->raiseException( _eCondition, std::optional<OUString>(), std::optional<OUString>(), std::optional<OUString>() ); } void SQLError::raiseTypedException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const Type& _rExceptionType ) const { - m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, o3tl::optional<OUString>(), o3tl::optional<OUString>(), o3tl::optional<OUString>() ); + m_pImpl->raiseTypedException( _eCondition, _rxContext, _rExceptionType, std::optional<OUString>(), std::optional<OUString>(), std::optional<OUString>() ); } SQLException SQLError::getSQLException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, - const o3tl::optional<OUString>& _rParamValue1, const o3tl::optional<OUString>& _rParamValue2, const o3tl::optional<OUString>& _rParamValue3 ) const + const std::optional<OUString>& _rParamValue1, const std::optional<OUString>& _rParamValue2, const std::optional<OUString>& _rParamValue3 ) const { return m_pImpl->getSQLException( _eCondition, _rxContext, _rParamValue1, _rParamValue2, _rParamValue3 ); } diff --git a/connectivity/source/inc/java/io/Reader.hxx b/connectivity/source/inc/java/io/Reader.hxx index 45d67bbd9b11..7a2cf0524483 100644 --- a/connectivity/source/inc/java/io/Reader.hxx +++ b/connectivity/source/inc/java/io/Reader.hxx @@ -23,7 +23,7 @@ #include <java/lang/Object.hxx> #include <cppuhelper/implbase.hxx> #include <com/sun/star/io/XInputStream.hpp> -#include <o3tl/optional.hxx> +#include <optional> namespace connectivity { @@ -36,7 +36,7 @@ namespace connectivity // static Data for the Class static jclass theClass; virtual ~java_io_Reader() override; - o3tl::optional<char> m_buf; + std::optional<char> m_buf; public: virtual jclass getMyClass() const override; // a Constructor, that is needed for when Returning the Object is needed: diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx index c398076a85a3..65bc1daeb268 100644 --- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx +++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx @@ -116,7 +116,7 @@ #include <cppu/unotype.hxx> #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/cppcanvas/source/inc/canvasgraphichelper.hxx b/cppcanvas/source/inc/canvasgraphichelper.hxx index c1c23657a3f4..15ac6d825d5b 100644 --- a/cppcanvas/source/inc/canvasgraphichelper.hxx +++ b/cppcanvas/source/inc/canvasgraphichelper.hxx @@ -25,7 +25,7 @@ #include <cppcanvas/canvasgraphic.hxx> #include <cppcanvas/canvas.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace com { namespace sun { namespace star { namespace rendering { @@ -61,7 +61,7 @@ namespace cppcanvas private: mutable css::rendering::RenderState maRenderState; - o3tl::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; + std::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; CanvasSharedPtr mpCanvas; }; diff --git a/cppcanvas/source/wrapper/implcanvas.hxx b/cppcanvas/source/wrapper/implcanvas.hxx index a75b853f2c08..859f595cb61f 100644 --- a/cppcanvas/source/wrapper/implcanvas.hxx +++ b/cppcanvas/source/wrapper/implcanvas.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/rendering/ViewState.hpp> #include <cppcanvas/canvas.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <basegfx/polygon/b2dpolypolygon.hxx> @@ -77,7 +77,7 @@ namespace cppcanvas private: mutable css::rendering::ViewState maViewState; - o3tl::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; + std::optional<basegfx::B2DPolyPolygon> maClipPolyPolygon; const css::uno::Reference< css::rendering::XCanvas > mxCanvas; }; diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index 25c8af7e7414..1860efb7f1da 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -284,7 +284,7 @@ #include <o3tl/cow_wrapper.hxx> #include <o3tl/deleter.hxx> #include <o3tl/enumarray.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <o3tl/sorted_vector.hxx> #include <o3tl/strong_int.hxx> diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index d9d4debec894..d6e724fa4a95 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -178,7 +178,7 @@ bool SvxFontSubstTabPage::FillItemSet( SfxItemSet* ) if (m_xFontNameLB->get_active() != -1) sFontName = m_xFontNameLB->get_active_text(); officecfg::Office::Common::Font::SourceViewFont::FontName::set( - o3tl::optional< OUString >(sFontName), batch); + std::optional< OUString >(sFontName), batch); batch->commit(); return false; diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx index 6fc5ad50d55d..62f08298db8e 100644 --- a/cui/source/options/tsaurls.cxx +++ b/cui/source/options/tsaurls.cxx @@ -35,7 +35,7 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent) try { - o3tl::optional<css::uno::Sequence<OUString>> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get()); + std::optional<css::uno::Sequence<OUString>> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get()); if (aUserSetTSAURLs) { const css::uno::Sequence<OUString>& rUserSetTSAURLs = *aUserSetTSAURLs; diff --git a/dbaccess/inc/pch/precompiled_dba.hxx b/dbaccess/inc/pch/precompiled_dba.hxx index b49d1d43d4ae..9019973d3077 100644 --- a/dbaccess/inc/pch/precompiled_dba.hxx +++ b/dbaccess/inc/pch/precompiled_dba.hxx @@ -241,7 +241,7 @@ #include <cppuhelper/weakref.hxx> #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx index d6249192b852..c940617b9cca 100644 --- a/dbaccess/inc/pch/precompiled_dbu.hxx +++ b/dbaccess/inc/pch/precompiled_dbu.hxx @@ -176,7 +176,7 @@ #include <cppuhelper/implbase_ex.hxx> #include <cppuhelper/weak.hxx> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/typed_flags_set.hxx> #include <salhelper/simplereferenceobject.hxx> #include <salhelper/singletonref.hxx> diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 4a25d4cb31df..2e2a81669408 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -28,7 +28,7 @@ #include <connectivity/dbtools.hxx> #include <tools/wldcrd.hxx> #include <tools/diagnose_ex.h> -#include <o3tl/optional.hxx> +#include <optional> #include <sal/log.hxx> namespace dbaccess @@ -99,7 +99,7 @@ static sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std:: return bFilterMatch; } - typedef ::o3tl::optional< OUString > OptionalString; + typedef ::std::optional< OUString > OptionalString; namespace { diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx index 93b4ba1a932c..e1ddc764eedf 100644 --- a/dbaccess/source/core/api/resultcolumn.cxx +++ b/dbaccess/source/core/api/resultcolumn.cxx @@ -165,7 +165,7 @@ void OResultColumn::disposing() namespace { template< typename T > - void obtain( Any& _out_rValue, ::o3tl::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) ) + void obtain( Any& _out_rValue, ::std::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) ) { if ( !_rCache ) _rCache = (_rxResultMeta.get()->*Getter)(_nPos); diff --git a/dbaccess/source/core/api/resultcolumn.hxx b/dbaccess/source/core/api/resultcolumn.hxx index 4897e1233699..f5b150eaa1d6 100644 --- a/dbaccess/source/core/api/resultcolumn.hxx +++ b/dbaccess/source/core/api/resultcolumn.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <column.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <comphelper/proparrhlp.hxx> namespace dbaccess { @@ -38,20 +38,20 @@ namespace dbaccess css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xDBMetaData; sal_Int32 m_nPos; css::uno::Any m_aIsRowVersion; - mutable ::o3tl::optional< sal_Bool > m_isSigned; - mutable ::o3tl::optional< sal_Bool > m_isCurrency; - mutable ::o3tl::optional< sal_Bool > m_bSearchable; - mutable ::o3tl::optional< sal_Bool > m_isCaseSensitive; - mutable ::o3tl::optional< sal_Bool > m_isReadOnly; - mutable ::o3tl::optional< sal_Bool > m_isWritable; - mutable ::o3tl::optional< sal_Bool > m_isDefinitelyWritable; - mutable ::o3tl::optional< sal_Bool > m_isAutoIncrement; - mutable ::o3tl::optional< sal_Int32 > m_isNullable; - mutable ::o3tl::optional< OUString > m_sColumnLabel; - mutable ::o3tl::optional< sal_Int32 > m_nColumnDisplaySize; - mutable ::o3tl::optional< sal_Int32 > m_nColumnType; - mutable ::o3tl::optional< sal_Int32 > m_nPrecision; - mutable ::o3tl::optional< sal_Int32 > m_nScale; + mutable ::std::optional< sal_Bool > m_isSigned; + mutable ::std::optional< sal_Bool > m_isCurrency; + mutable ::std::optional< sal_Bool > m_bSearchable; + mutable ::std::optional< sal_Bool > m_isCaseSensitive; + mutable ::std::optional< sal_Bool > m_isReadOnly; + mutable ::std::optional< sal_Bool > m_isWritable; + mutable ::std::optional< sal_Bool > m_isDefinitelyWritable; + mutable ::std::optional< sal_Bool > m_isAutoIncrement; + mutable ::std::optional< sal_Int32 > m_isNullable; + mutable ::std::optional< OUString > m_sColumnLabel; + mutable ::std::optional< sal_Int32 > m_nColumnDisplaySize; + mutable ::std::optional< sal_Int32 > m_nColumnType; + mutable ::std::optional< sal_Int32 > m_nPrecision; + mutable ::std::optional< sal_Int32 > m_nScale; virtual ~OResultColumn() override; public: diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index f548637e204a..d1e569afd2a9 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -131,7 +131,7 @@ namespace DatabaseObject = sdb::application::DatabaseObject; namespace dbaccess { - typedef ::o3tl::optional< bool > optional_bool; + typedef ::std::optional< bool > optional_bool; // helper namespace @@ -790,7 +790,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons if ( xHandler.is() ) aDocumentArgs.put( "InteractionHandler", xHandler ); - ::o3tl::optional< sal_Int16 > aDocumentMacroMode; + ::std::optional< sal_Int16 > aDocumentMacroMode; if ( !lcl_extractOpenMode( _rOpenArgument, nOpenMode ) ) { diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx index 2ca3a321ee69..8e848fee4be6 100644 --- a/dbaccess/source/core/inc/ContentHelper.hxx +++ b/dbaccess/source/core/inc/ContentHelper.hxx @@ -51,7 +51,7 @@ namespace dbaccess struct ContentProperties { OUString aTitle; // Title - ::o3tl::optional< OUString > + ::std::optional< OUString > aContentType; // ContentType (aka MediaType aka MimeType) bool bIsDocument; // IsDocument bool bIsFolder; // IsFolder diff --git a/dbaccess/source/core/inc/ModelImpl.hxx b/dbaccess/source/core/inc/ModelImpl.hxx index ff02f17b6a49..84bce5c9c724 100644 --- a/dbaccess/source/core/inc/ModelImpl.hxx +++ b/dbaccess/source/core/inc/ModelImpl.hxx @@ -166,7 +166,7 @@ private: oslInterlockedCount m_refCount; /// do we have any object (forms/reports) which contains macros? - ::o3tl::optional< EmbeddedMacros > m_aEmbeddedMacros; + ::std::optional< EmbeddedMacros > m_aEmbeddedMacros; /// true if setting the Modified flag of the document is currently locked bool m_bModificationLock; diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 20aac7489ede..ccc5f123cbb7 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -55,7 +55,7 @@ #include <connectivity/DriversConfig.hxx> #include <connectivity/dbtools.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <memory> #include <iterator> @@ -350,7 +350,7 @@ void ODBExport::exportDataSource() { const OUString sPropertyName; const XMLTokenEnum eAttributeToken; - const ::o3tl::optional< OUString > aXMLDefault; + const ::std::optional< OUString > aXMLDefault; PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken ) :sPropertyName( _rPropertyName ) diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 3b7a3a607716..d8c6612c0868 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -392,7 +392,7 @@ void SAL_CALL OApplicationController::disposing() aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), aFilter, getStrippedDatabaseName(), - o3tl::nullopt); + std::nullopt); // add to recent document list if ( aURL.GetProtocol() == INetProtocol::File ) diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index 5039a97af205..e1d5903e05d7 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -349,7 +349,7 @@ namespace dbaui /** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing object of this type. Throws if not. */ - void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName ); + void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::std::optional< OUString >& i_rObjectName ); protected: // initializing members diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index db32b9a15d8e..53a9453a585c 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -377,7 +377,7 @@ namespace } } -void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::o3tl::optional< OUString >& i_rObjectName ) +void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::std::optional< OUString >& i_rObjectName ) { // ensure we're connected if ( !isConnected() ) @@ -459,7 +459,7 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArgu SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - impl_validateObjectTypeAndName_throw( i_nObjectType, ::o3tl::optional< OUString >() ); + impl_validateObjectTypeAndName_throw( i_nObjectType, ::std::optional< OUString >() ); Reference< XComponent > xComponent( newElement( lcl_objectType2ElementType( i_nObjectType ), diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 02c1e734ac6c..383da2b4e088 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3170,7 +3170,7 @@ void SbaTableQueryBrowser::impl_initialize() if ( m_bEnableBrowser ) { - m_aDocScriptSupport = ::o3tl::optional< bool >( false ); + m_aDocScriptSupport = ::std::optional< bool >( false ); } else { @@ -3178,7 +3178,7 @@ void SbaTableQueryBrowser::impl_initialize() // there is a specific database document which we belong to. Reference< XOfficeDatabaseDocument > xDocument( getDataSourceOrModel( lcl_getDataSource( m_xDatabaseContext, sInitialDataSourceName, xConnection ) ), UNO_QUERY ); - m_aDocScriptSupport = ::o3tl::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() ); + m_aDocScriptSupport = ::std::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() ); } if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEscapeProcessing, xConnection, true ) ) diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 9bffee98ef6e..f01985660758 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -203,7 +203,7 @@ namespace dbaui bool bTriState = false; - o3tl::optional<bool> aValue; + std::optional<bool> aValue; const SfxPoolItem* pItem = _rSet.GetItem<SfxPoolItem>(booleanSetting.nItemId); if (const SfxBoolItem *pBoolItem = dynamic_cast<const SfxBoolItem*>( pItem) ) diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx index 008d59046921..25aef5ceca3f 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.hxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx @@ -22,7 +22,7 @@ #include <svl/poolitem.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace dbaui { @@ -30,7 +30,7 @@ namespace dbaui // OptionalBoolItem class OptionalBoolItem : public SfxPoolItem { - ::o3tl::optional< bool > m_aValue; + ::std::optional< bool > m_aValue; public: explicit OptionalBoolItem( sal_uInt16 nWhich ); @@ -43,7 +43,7 @@ namespace dbaui bool GetValue() const { return *m_aValue; } void SetValue(bool _bValue) { m_aValue = _bValue; } - const ::o3tl::optional< bool >& + const ::std::optional< bool >& GetFullValue() const { return m_aValue; } }; diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 77e621588e9c..ed1511cde629 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -108,7 +108,7 @@ namespace dbaui bool m_bShowMenu; // if sal_True the menu should be visible otherwise not bool m_bInSuspend; bool m_bEnableBrowser; - ::o3tl::optional< bool > + ::std::optional< bool > m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc virtual OUString getPrivateTitle( ) const override; diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index 9950cbd869d0..42397bf9570c 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -123,7 +123,7 @@ namespace dbaui struct DBSubComponentController_Impl { private: - ::o3tl::optional< bool > m_aDocScriptSupport; + ::std::optional< bool > m_aDocScriptSupport; public: ::dbtools::SQLExceptionInfo m_aCurrentError; @@ -166,7 +166,7 @@ namespace dbaui { OSL_PRECOND( !m_aDocScriptSupport, "DBSubComponentController_Impl::setDocumentScriptSupport: already initialized!" ); - m_aDocScriptSupport = ::o3tl::optional< bool >( _bSupport ); + m_aDocScriptSupport = ::std::optional< bool >( _bSupport ); } }; diff --git a/desktop/IwyuFilter_desktop.yaml b/desktop/IwyuFilter_desktop.yaml index da4c75f2ce7b..c424c9815a52 100644 --- a/desktop/IwyuFilter_desktop.yaml +++ b/desktop/IwyuFilter_desktop.yaml @@ -64,9 +64,6 @@ blacklist: desktop/source/deployment/misc/lockfile.cxx: # Needed on WIN32 - memory - desktop/source/deployment/misc/dp_descriptioninfoset.cxx: - # Actually used - - o3tl/optional.hxx desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx: # Actually used - com/sun/star/uno/XComponentContext.hpp diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 2bd3051bed26..1dc5f8a790ab 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_DESKTOP_INC_APP_HXX #define INCLUDED_DESKTOP_INC_APP_HXX -#include <o3tl/optional.hxx> +#include <optional> #include <sal/log.hxx> #include <vcl/svapp.hxx> #include <vcl/timer.hxx> @@ -173,7 +173,7 @@ class Desktop final : public Application }; OUString GetURL_Impl( - const OUString& rName, o3tl::optional< OUString > const & cwdUrl ); + const OUString& rName, std::optional< OUString > const & cwdUrl ); OUString ReplaceStringHookProc(const OUString& rStr); diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx index f8753b4e6dfd..f14c28ee7bc5 100644 --- a/desktop/inc/pch/precompiled_deployment.hxx +++ b/desktop/inc/pch/precompiled_deployment.hxx @@ -72,7 +72,7 @@ #include <cppuhelper/compbase.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <svl/inettype.hxx> #include <tools/diagnose_ex.h> #include <ucbhelper/content.hxx> diff --git a/desktop/inc/pch/precompiled_deploymentgui.hxx b/desktop/inc/pch/precompiled_deploymentgui.hxx index 4ee2eea8a0ad..c55a81a717c1 100644 --- a/desktop/inc/pch/precompiled_deploymentgui.hxx +++ b/desktop/inc/pch/precompiled_deploymentgui.hxx @@ -84,7 +84,7 @@ #include <cppu/unotype.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/typed_flags_set.hxx> #include <salhelper/thread.hxx> #include <tools/gen.hxx> diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx index 20f0f17391da..79d8eed69b9a 100644 --- a/desktop/inc/pch/precompiled_sofficeapp.hxx +++ b/desktop/inc/pch/precompiled_sofficeapp.hxx @@ -150,7 +150,7 @@ #include <cppuhelper/implbase_ex_pre.hxx> #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> diff --git a/desktop/qa/desktop_app/test_desktop_app.cxx b/desktop/qa/desktop_app/test_desktop_app.cxx index a87ea1974796..0e86368e6378 100644 --- a/desktop/qa/desktop_app/test_desktop_app.cxx +++ b/desktop/qa/desktop_app/test_desktop_app.cxx @@ -47,7 +47,7 @@ class TestSupplier : public desktop::CommandLineArgs::Supplier { public: explicit TestSupplier(const std::initializer_list<OUString>& args) : m_args(args) {} - virtual o3tl::optional< OUString > getCwdUrl() override { return o3tl::optional< OUString >(); } + virtual std::optional< OUString > getCwdUrl() override { return std::optional< OUString >(); } virtual bool next(OUString * argument) override { CPPUNIT_ASSERT(argument != nullptr); if (m_index < m_args.size()) { diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 16f62e9f64a5..6d0fe6e0cb48 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2201,7 +2201,7 @@ void Desktop::OpenDefault() OUString GetURL_Impl( - const OUString& rName, o3tl::optional< OUString > const & cwdUrl ) + const OUString& rName, std::optional< OUString > const & cwdUrl ) { // if rName is a vnd.sun.star.script URL do not attempt to parse it // as INetURLObj does not handle URLs there diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 8169f541840f..e58ee2f6e2e4 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -82,7 +82,7 @@ public: } } - virtual o3tl::optional< OUString > getCwdUrl() override { return m_cwdUrl; } + virtual std::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { OSL_ASSERT(argument != nullptr); @@ -95,7 +95,7 @@ public: } private: - o3tl::optional< OUString > m_cwdUrl; + std::optional< OUString > m_cwdUrl; sal_uInt32 m_count; sal_uInt32 m_index; }; diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index 6c18bda3572d..577b50e1af3a 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -25,7 +25,7 @@ #include <vector> #include <rtl/ustring.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace desktop { @@ -46,7 +46,7 @@ class CommandLineArgs }; virtual ~Supplier(); - virtual o3tl::optional< OUString > getCwdUrl() = 0; + virtual std::optional< OUString > getCwdUrl() = 0; virtual bool next(OUString * argument) = 0; }; @@ -56,7 +56,7 @@ class CommandLineArgs CommandLineArgs(const CommandLineArgs&) = delete; const CommandLineArgs& operator=(const CommandLineArgs&) = delete; - const o3tl::optional< OUString >& getCwdUrl() const { return m_cwdUrl; } + const std::optional< OUString >& getCwdUrl() const { return m_cwdUrl; } // Access to bool parameters bool IsMinimized() const { return m_minimized;} @@ -127,7 +127,7 @@ class CommandLineArgs void ParseCommandLine_Impl( Supplier& supplier ); void InitParamValues(); - o3tl::optional< OUString > m_cwdUrl; + std::optional< OUString > m_cwdUrl; bool m_minimized; bool m_invisible; diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx index a2bb5d6b1ff0..ca66d33bf8ed 100644 --- a/desktop/source/app/dispatchwatcher.hxx +++ b/desktop/source/app/dispatchwatcher.hxx @@ -22,7 +22,7 @@ #include <cppuhelper/implbase.hxx> #include <com/sun/star/frame/XDispatchResultListener.hpp> -#include <o3tl/optional.hxx> +#include <optional> #include <vector> @@ -59,7 +59,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper< css::frame::XDispatchResu { RequestType aRequestType; OUString aURL; - o3tl::optional< OUString > aCwdUrl; + std::optional< OUString > aCwdUrl; OUString aPrinterName; // also conversion params OUString aPreselectedFactory; }; diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 0c3296ebad4f..b1674138c5cd 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -138,7 +138,7 @@ public: } } - virtual o3tl::optional< OUString > getCwdUrl() override { return m_cwdUrl; } + virtual std::optional< OUString > getCwdUrl() override { return m_cwdUrl; } virtual bool next(OUString * argument) override { return next(argument, true); } @@ -192,7 +192,7 @@ private: } } - o3tl::optional< OUString > m_cwdUrl; + std::optional< OUString > m_cwdUrl; OString m_input; sal_Int32 m_index; }; @@ -668,7 +668,7 @@ void RequestHandler::EnableRequests() pGlobal->mState = State::RequestsEnabled; } // hit the compiler over the head - ProcessDocumentsRequest aEmptyReq { o3tl::optional< OUString >() }; + ProcessDocumentsRequest aEmptyReq { std::optional< OUString >() }; // trigger already queued requests RequestHandler::ExecuteCmdLineRequests(aEmptyReq, true); } @@ -1221,7 +1221,7 @@ void PipeIpcThread::execute() static void AddToDispatchList( std::vector<DispatchWatcher::DispatchRequest>& rDispatchList, - o3tl::optional< OUString > const & cwdUrl, + std::optional< OUString > const & cwdUrl, std::vector< OUString > const & aRequestList, DispatchWatcher::RequestType nType, const OUString& aParam, @@ -1235,7 +1235,7 @@ static void AddToDispatchList( static void AddConversionsToDispatchList( std::vector<DispatchWatcher::DispatchRequest>& rDispatchList, - o3tl::optional< OUString > const & cwdUrl, + std::optional< OUString > const & cwdUrl, std::vector< OUString > const & rRequestList, const OUString& rParam, const OUString& rPrinterName, diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index d0faf6a84e06..e4f3edaf9673 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -32,7 +32,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <cppuhelper/implbase.hxx> #include <osl/conditn.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace desktop { @@ -43,10 +43,10 @@ oslSignalAction SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* p // that was given by command line or by IPC pipe communication. struct ProcessDocumentsRequest { - explicit ProcessDocumentsRequest(o3tl::optional< OUString > const & cwdUrl): + explicit ProcessDocumentsRequest(std::optional< OUString > const & cwdUrl): aCwdUrl(cwdUrl), pcProcessed( nullptr ), bTextCat( false ), bScriptCat( false ) {} - o3tl::optional< OUString > aCwdUrl; + std::optional< OUString > aCwdUrl; OUString aModule; std::vector< OUString > aOpenList; // Documents that should be opened in the default way std::vector< OUString > aViewList; // Documents that should be opened in viewmode diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index a3bd0c0ed844..8acfdc5a32f1 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/task/XJobExecutor.hpp> #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp> -#include <o3tl/optional.hxx> +#include <optional> #include "license_dialog.hxx" #include "dp_gui_dialog2.hxx" #include "dp_gui_extensioncmdqueue.hxx" @@ -111,8 +111,8 @@ class ServiceImpl task::XJobExecutor> { Reference<XComponentContext> const m_xComponentContext; - o3tl::optional< Reference<awt::XWindow> > /* const */ m_parent; - o3tl::optional<OUString> m_extensionURL; + std::optional< Reference<awt::XWindow> > /* const */ m_parent; + std::optional<OUString> m_extensionURL; OUString m_initialTitle; bool m_bShowUpdateOnly; @@ -137,8 +137,8 @@ ServiceImpl::ServiceImpl( Sequence<Any> const& args, m_bShowUpdateOnly( false ) { /* if true then this service is running in a unopkg process and not in an office process */ - o3tl::optional<sal_Bool> unopkg; - o3tl::optional<OUString> view; + std::optional<sal_Bool> unopkg; + std::optional<OUString> view; try { comphelper::unwrapArgs( args, m_parent, view, unopkg ); return; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 3214ac098fb0..4c5269499f19 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -24,7 +24,7 @@ #include <vector> -#include <o3tl/optional.hxx> +#include <optional> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -380,7 +380,7 @@ void UpdateDialog::Thread::prepareUpdateData( out_du.unsatisfiedDependencies[i] = dp_misc::Dependencies::getErrorText(ds[i]); } - const ::o3tl::optional< OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL()); + const ::std::optional< OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL()); out_du.name = getUpdateDisplayString(out_data, infoset.getVersion()); @@ -809,7 +809,7 @@ bool UpdateDialog::isIgnoredUpdate( UpdateDialog::Index * index ) { DisabledUpdate &rData = m_disabledUpdates[ index->m_nIndex ]; dp_misc::DescriptionInfoset aInfoset( m_context, rData.aUpdateInfo ); - ::o3tl::optional< OUString > aID( aInfoset.getIdentifier() ); + ::std::optional< OUString > aID( aInfoset.getIdentifier() ); if ( aID ) aExtensionID = *aID; aVersion = aInfoset.getVersion(); diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx index 03a5ededfeca..03990c9405b2 100644 --- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx +++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <o3tl/optional.hxx> +#include <optional> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <sal/types.h> @@ -83,7 +83,7 @@ public: @return the identifier, or an empty <code>optional</code> if none is specified */ - ::o3tl::optional< OUString > getIdentifier() const; + ::std::optional< OUString > getIdentifier() const; /** Return the textual version representation. @@ -135,7 +135,7 @@ public: As long as there is a simple-license element, the function will return the structure. If it does not exist, then the optional object is uninitialized. */ - ::o3tl::optional<SimpleLicenseAttributes> getSimpleLicenseAttributes() const; + ::std::optional<SimpleLicenseAttributes> getSimpleLicenseAttributes() const; /** returns the localized display name of the extensions. @@ -162,7 +162,7 @@ public: the download website URL, or an empty <code>optional</code> if none is specified */ - ::o3tl::optional< OUString > getLocalizedUpdateWebsiteURL() const; + ::std::optional< OUString > getLocalizedUpdateWebsiteURL() const; /** returns the relative URL to the description. @@ -206,7 +206,7 @@ public: bool hasDescription() const; private: - SAL_DLLPRIVATE ::o3tl::optional< OUString > getOptionalValue( + SAL_DLLPRIVATE ::std::optional< OUString > getOptionalValue( OUString const & expression) const; SAL_DLLPRIVATE css::uno::Sequence< OUString > getUrls( diff --git a/desktop/source/deployment/inc/dp_identifier.hxx b/desktop/source/deployment/inc/dp_identifier.hxx index a7ce629f42ff..a3eb0681bb1e 100644 --- a/desktop/source/deployment/inc/dp_identifier.hxx +++ b/desktop/source/deployment/inc/dp_identifier.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <o3tl/optional.hxx> +#include <optional> #include <com/sun/star/uno/Reference.hxx> #include "dp_misc_api.hxx" @@ -47,7 +47,7 @@ namespace dp_misc { on the given file name */ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC OUString generateIdentifier( - ::o3tl::optional< OUString > const & optional, + ::std::optional< OUString > const & optional, OUString const & fileName); /** diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index a82060d2c39d..708c40215fa5 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -553,7 +553,7 @@ bool ExtensionManager::doChecksForAddExtension( ExtensionProperties props(OUString(), properties, Reference<ucb::XCommandEnvironment>(), m_xContext); dp_misc::DescriptionInfoset info(dp_misc::getDescriptionInfoset(xTmpExtension->getURL())); - const ::o3tl::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes = + const ::std::optional<dp_misc::SimpleLicenseAttributes> licenseAttributes = info.getSimpleLicenseAttributes(); if (licenseAttributes && licenseAttributes->suppressIfRequired diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 3e36d77eb29d..33d8e6468159 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -1380,7 +1380,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions( // shall the license be suppressed? DescriptionInfoset info = dp_misc::getDescriptionInfoset(url); - ::o3tl::optional<dp_misc::SimpleLicenseAttributes> + ::std::optional<dp_misc::SimpleLicenseAttributes> attr = info.getSimpleLicenseAttributes(); ExtensionProperties props(url, xCmdEnv, m_xComponentContext); bool bNoLicense = false; diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx index aface6bb7f89..2d72d8cd874f 100644 --- a/desktop/source/deployment/manager/dp_properties.hxx +++ b/desktop/source/deployment/manager/dp_properties.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <o3tl/optional.hxx> +#include <optional> namespace dp_manager { @@ -35,8 +35,8 @@ class ExtensionProperties final OUString m_propFileUrl; const css::uno::Reference<css::ucb::XCommandEnvironment> m_xCmdEnv; const css::uno::Reference<css::uno::XComponentContext> m_xContext; - ::o3tl::optional< OUString> m_prop_suppress_license; - ::o3tl::optional< OUString> m_prop_extension_update; + ::std::optional< OUString> m_prop_suppress_license; + ::std::optional< OUString> m_prop_extension_update; static OUString getPropertyValue(css::beans::NamedValue const & v); public: diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 735e7373dd01..86e8c4508d9a 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -25,7 +25,7 @@ #include <comphelper/sequence.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertysequence.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/deployment/DeploymentException.hpp> @@ -325,7 +325,7 @@ DescriptionInfoset::DescriptionInfoset( DescriptionInfoset::~DescriptionInfoset() {} -::o3tl::optional< OUString > DescriptionInfoset::getIdentifier() const { +::std::optional< OUString > DescriptionInfoset::getIdentifier() const { return getOptionalValue("desc:identifier/@value"); } @@ -345,7 +345,7 @@ OUString DescriptionInfoset::getNodeValueFromExpression(OUString const & express void DescriptionInfoset::checkBlacklist() const { if (m_element.is()) { - o3tl::optional< OUString > id(getIdentifier()); + std::optional< OUString > id(getIdentifier()); if (!id) return; // nothing to check OUString currentversion(getVersion()); @@ -519,20 +519,20 @@ OUString DescriptionInfoset::getIconURL( bool bHighContrast ) const return OUString(); } -::o3tl::optional< OUString > DescriptionInfoset::getLocalizedUpdateWebsiteURL() +::std::optional< OUString > DescriptionInfoset::getLocalizedUpdateWebsiteURL() const { bool bParentExists = false; const OUString sURL (getLocalizedHREFAttrFromChild("/desc:description/desc:update-website", &bParentExists )); if (!sURL.isEmpty()) - return ::o3tl::optional< OUString >(sURL); + return ::std::optional< OUString >(sURL); else - return bParentExists ? ::o3tl::optional< OUString >(OUString()) : - ::o3tl::optional< OUString >(); + return bParentExists ? ::std::optional< OUString >(OUString()) : + ::std::optional< OUString >(); } -::o3tl::optional< OUString > DescriptionInfoset::getOptionalValue( +::std::optional< OUString > DescriptionInfoset::getOptionalValue( OUString const & expression) const { css::uno::Reference< css::xml::dom::XNode > n; @@ -544,8 +544,8 @@ OUString DescriptionInfoset::getIconURL( bool bHighContrast ) const } } return n.is() - ? ::o3tl::optional< OUString >(getNodeValue(n)) - : ::o3tl::optional< OUString >(); + ? ::std::optional< OUString >(getNodeValue(n)) + : ::std::optional< OUString >(); } css::uno::Sequence< OUString > DescriptionInfoset::getUrls( @@ -630,7 +630,7 @@ OUString DescriptionInfoset::getLocalizedLicenseURL() const } -::o3tl::optional<SimpleLicenseAttributes> +::std::optional<SimpleLicenseAttributes> DescriptionInfoset::getSimpleLicenseAttributes() const { //Check if the node exist @@ -647,22 +647,22 @@ DescriptionInfoset::getSimpleLicenseAttributes() const attributes.acceptBy = getNodeValueFromExpression("/desc:description/desc:registration/desc:simple-license/@accept-by"); - ::o3tl::optional< OUString > suppressOnUpdate = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-on-update"); + ::std::optional< OUString > suppressOnUpdate = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-on-update"); if (suppressOnUpdate) attributes.suppressOnUpdate = (*suppressOnUpdate).trim().equalsIgnoreAsciiCase("true"); else attributes.suppressOnUpdate = false; - ::o3tl::optional< OUString > suppressIfRequired = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-if-required"); + ::std::optional< OUString > suppressIfRequired = getOptionalValue("/desc:description/desc:registration/desc:simple-license/@suppress-if-required"); if (suppressIfRequired) attributes.suppressIfRequired = (*suppressIfRequired).trim().equalsIgnoreAsciiCase("true"); else attributes.suppressIfRequired = false; - return ::o3tl::optional<SimpleLicenseAttributes>(attributes); + return ::std::optional<SimpleLicenseAttributes>(attributes); } } - return ::o3tl::optional<SimpleLicenseAttributes>(); + return ::std::optional<SimpleLicenseAttributes>(); } OUString DescriptionInfoset::getLocalizedDescriptionURL() const diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx index 30a02890918b..350f9a1f0541 100644 --- a/desktop/source/deployment/misc/dp_identifier.cxx +++ b/desktop/source/deployment/misc/dp_identifier.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> -#include <o3tl/optional.hxx> +#include <optional> #include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/deployment/XPackage.hpp> #include <com/sun/star/uno/Reference.hxx> @@ -32,7 +32,7 @@ namespace dp_misc { OUString generateIdentifier( - ::o3tl::optional< OUString > const & optional, + ::std::optional< OUString > const & optional, OUString const & fileName) { return optional ? *optional : generateLegacyIdentifier(fileName); diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 1387ad015ae6..0d6f4acdee45 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -112,7 +112,7 @@ void getOwnUpdateInfos( Reference< xml::dom::XNode >(infos[j], UNO_QUERY_THROW)); if (!infoset.hasDescription()) continue; - o3tl::optional< OUString > result_id(infoset.getIdentifier()); + std::optional< OUString > result_id(infoset.getIdentifier()); if (!result_id) continue; SAL_INFO( "extensions.update", " found version " @@ -153,7 +153,7 @@ void getDefaultUpdateInfos( { Reference< xml::dom::XNode > node(infos[i], UNO_QUERY_THROW); dp_misc::DescriptionInfoset infoset(xContext, node); - o3tl::optional< OUString > id(infoset.getIdentifier()); + std::optional< OUString > id(infoset.getIdentifier()); if (!id) { continue; } diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 68f11e41ea3b..ca11affbca7c 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -130,7 +130,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend Reference<XCommandEnvironment> const & xCmdEnv ); #endif void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data); - ::o3tl::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url); + ::std::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url); void revokeEntryFromDb(OUString const & url); bool hasActiveEntry(OUString const & url); bool activateEntry(OUString const & url); @@ -240,10 +240,10 @@ void BackendImpl::addDataToDb( m_backendDb->addEntry(url, data); } -::o3tl::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb( +::std::optional<ConfigurationBackendDb::Data> BackendImpl::readDataFromDb( OUString const & url) { - ::o3tl::optional<ConfigurationBackendDb::Data> data; + ::std::optional<ConfigurationBackendDb::Data> data; if (m_backendDb) data = m_backendDb->getEntry(url); return data; @@ -488,7 +488,7 @@ bool BackendImpl::removeFromConfigmgrIni( //url to the file in the user installation (e.g. $BUNDLED_EXTENSIONS_USER) //However, m_url (getURL()) contains the URL for the file in the actual //extension installation. - ::o3tl::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_); + ::std::optional<ConfigurationBackendDb::Data> data = readDataFromDb(url_); if (data) i = std::find(rSet.begin(), rSet.end(), data->iniEntry); } @@ -680,7 +680,7 @@ void BackendImpl::PackageImpl::processPackage_( { if (getMyBackend()->activateEntry(getURL())) { - ::o3tl::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); + ::std::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); OSL_ASSERT(data); that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv ); } @@ -772,7 +772,7 @@ void BackendImpl::PackageImpl::processPackage_( } } #endif - ::o3tl::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); + ::std::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); //If an xcu file was life deployed then always a data entry is written. //If the xcu file was already in the configmr.ini then there is also //a data entry diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx index eb8775be9efa..fd5d3b3c4833 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx @@ -90,7 +90,7 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data) } -::o3tl::optional<ConfigurationBackendDb::Data> +::std::optional<ConfigurationBackendDb::Data> ConfigurationBackendDb::getEntry(OUString const & url) { try @@ -104,9 +104,9 @@ ConfigurationBackendDb::getEntry(OUString const & url) } else { - return ::o3tl::optional<Data>(); + return ::std::optional<Data>(); } - return ::o3tl::optional<Data>(retData); + return ::std::optional<Data>(retData); } catch ( const css::deployment::DeploymentException& ) { diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx index 0e0d4c4899cf..264030c0ef79 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx @@ -23,7 +23,7 @@ #include <rtl/ustring.hxx> #include <rtl/string.hxx> #include <vector> -#include <o3tl/optional.hxx> +#include <optional> #include <dp_backenddb.hxx> namespace com { namespace sun { namespace star { @@ -69,7 +69,7 @@ public: void addEntry(OUString const & url, Data const & data); - ::o3tl::optional<Data> getEntry(OUString const & url); + ::std::optional<Data> getEntry(OUString const & url); std::vector< OUString> getAllDataUrls(); }; diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 428b74d2fce1..0dab3ad8d69b 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <tools/diagnose_ex.h> #include <unotools/tempfile.hxx> -#include <o3tl/optional.hxx> +#include <optional> using namespace ::dp_misc; using namespace ::com::sun::star; @@ -79,8 +79,8 @@ PackageRegistryBackend::PackageRegistryBackend( m_eContext( Context::Unknown ) { assert(xContext.is()); - o3tl::optional<OUString> cachePath; - o3tl::optional<bool> readOnly; + std::optional<OUString> cachePath; + std::optional<bool> readOnly; comphelper::unwrapArgs( args, m_context, cachePath, readOnly ); if (cachePath) m_cachePath = *cachePath; diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 013c0648a49e..27cf615eb41b 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/deployment/ExtensionRemovedException.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/util/XMacroExpander.hpp> -#include <o3tl/optional.hxx> +#include <optional> using namespace ::dp_misc; using namespace ::com::sun::star; @@ -95,7 +95,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend void implCollectXhpFiles( const OUString& aDir, std::vector< OUString >& o_rXhpFileVector ); - ::o3tl::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url); + ::std::optional<HelpBackendDb::Data> readDataFromDb(OUString const & url); bool hasActiveEntry(OUString const & url); bool activateEntry(OUString const & url); @@ -200,10 +200,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( static_cast<sal_Int16>(-1) ); } -::o3tl::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb( +::std::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb( OUString const & url) { - ::o3tl::optional<HelpBackendDb::Data> data; + ::std::optional<HelpBackendDb::Data> data; if (m_backendDb) data = m_backendDb->getEntry(url); return data; @@ -333,7 +333,7 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL() if (m_bRemoved) throw deployment::ExtensionRemovedException(); - ::o3tl::optional<HelpBackendDb::Data> data = + ::std::optional<HelpBackendDb::Data> data = getMyBackend()->readDataFromDb(getURL()); if (data && getMyBackend()->hasActiveEntry(getURL())) diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx index cd8f65b749c0..73b7279d13de 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx @@ -87,7 +87,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data) } -::o3tl::optional<HelpBackendDb::Data> +::std::optional<HelpBackendDb::Data> HelpBackendDb::getEntry(OUString const & url) { try @@ -100,9 +100,9 @@ HelpBackendDb::getEntry(OUString const & url) } else { - return ::o3tl::optional<Data>(); + return ::std::optional<Data>(); } - return ::o3tl::optional<Data>(retData); + return ::std::optional<Data>(retData); } catch ( const css::deployment::DeploymentException& ) { diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx index 1a9eabc861aa..1f072f7429df 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx @@ -21,7 +21,7 @@ #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_REGISTRY_HELP_DP_HELPBACKENDDB_HXX #include <rtl/ustring.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <dp_backenddb.hxx> namespace com { namespace sun { namespace star { @@ -64,7 +64,7 @@ public: void addEntry(OUString const & url, Data const & data); - ::o3tl::optional<Data> getEntry(OUString const & url); + ::std::optional<Data> getEntry(OUString const & url); //must also return the data urls for entries with @active="false". That is, //those are currently revoked. std::vector< OUString> getAllDataUrls(); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 013955e0f168..9cc78c7e6bc3 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -65,7 +65,7 @@ #include <com/sun/star/deployment/LicenseException.hpp> #include <com/sun/star/deployment/PlatformException.hpp> #include <com/sun/star/deployment/Prerequisites.hpp> -#include <o3tl/optional.hxx> +#include <optional> #include <tools/diagnose_ex.h> #include <algorithm> @@ -623,7 +623,7 @@ bool BackendImpl::PackageImpl::checkLicense( { try { - ::o3tl::optional<SimpleLicenseAttributes> simplLicAttr + ::std::optional<SimpleLicenseAttributes> simplLicAttr = info.getSimpleLicenseAttributes(); if (! simplLicAttr) return true; @@ -946,7 +946,7 @@ OUString BackendImpl::PackageImpl::getLicenseText() OUString sLicense; DescriptionInfoset aInfo = getDescriptionInfoset(); - ::o3tl::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes(); + ::std::optional< SimpleLicenseAttributes > aSimplLicAttr = aInfo.getSimpleLicenseAttributes(); if ( aSimplLicAttr ) { OUString aLicenseURL = aInfo.getLocalizedLicenseURL(); diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx index a6de29ffb0b2..3f2cfed20a2e 100644 --- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx +++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx @@ -22,7 +22,7 @@ #include <rtl/ustring.hxx> #include <dp_backenddb.hxx> -#include <o3tl/optional.hxx> +#include <optional> namespace com { namespace sun { namespace star { namespace uno { diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx index 7c9215d22544..85df8454dccc 100644 --- a/editeng/inc/editattr.hxx +++ b/editeng/inc/editattr.hxx @@ -22,7 +22,7 @@ #include <editeng/eeitem.hxx> #include <svl/poolitem.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <tools/color.hxx> #include <tools/debug.hxx> @@ -343,8 +343,8 @@ public: class EditCharAttribField final : public EditCharAttrib { OUString aFieldValue; - o3tl::optional<Color> mxTxtColor; - o3tl::optional<Color> mxFldColor; + std::optional<Color> mxTxtColor; + std::optional<Color> mxFldColor; EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = delete; @@ -358,8 +358,8 @@ public: { return !(operator == ( rAttr ) ); } virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override; - o3tl::optional<Color>& GetTextColor() { return mxTxtColor; } - o3tl::optional<Color>& GetFieldColor() { return mxFldColor; } + std::optional<Color>& GetTextColor() { return mxTxtColor; } + std::optional<Color>& GetFieldColor() { return mxFldColor; } const OUString& GetFieldValue() const { return aFieldValue;} void SetFieldValue(const OUString& rVal); diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx index d791b5f23b7f..fb8bf634ae80 100644 --- a/editeng/inc/pch/precompiled_editeng.hxx +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -203,7 +203,7 @@ #include <i18nutil/transliteration.hxx> #include <libxml/xmlwriter.h> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index 745d7974bed8..b5b133f047a6 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -811,7 +811,7 @@ class UrlEditEngine : public EditEngine public: explicit UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {} - virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& ) override + virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional<Color>&, std::optional<Color>& ) override { return "j...@bob.com"; // a sophisticated view of value: } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index f41aa17e9530..9871e502316f 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2564,7 +2564,7 @@ tools::Rectangle EditEngine::GetBulletArea( sal_Int32 ) return tools::Rectangle( Point(), Point() ); } -OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& ) +OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional<Color>&, std::optional<Color>& ) { return OUString(' '); } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 62edc065347d..0eaf70f5ae26 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -55,7 +55,7 @@ #include <o3tl/deleter.hxx> #include <o3tl/typed_flags_set.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <memory> #include <vector> @@ -231,7 +231,7 @@ private: EditEngine* pEditEngine; VclPtr<vcl::Window> pOutWin; EditView::OutWindowSet aOutWindowSet; - o3tl::optional<PointerStyle> mxPointer; + std::optional<PointerStyle> mxPointer; std::unique_ptr<DragAndDropInfo> pDragAndDropInfo; css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > mxDnDListener; diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f1a682b6d5fd..6fffdb37f1b0 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2522,7 +2522,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo { for (SvxAutocorrWord & aWordToDelete : aDeleteEntries) { - o3tl::optional<SvxAutocorrWord> xFoundEntry = pAutocorr_List->FindAndRemove( &aWordToDelete ); + std::optional<SvxAutocorrWord> xFoundEntry = pAutocorr_List->FindAndRemove( &aWordToDelete ); if( xFoundEntry ) { if( !xFoundEntry->IsTextOnly() ) @@ -2545,7 +2545,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo for (const SvxAutocorrWord & aNewEntrie : aNewEntries) { SvxAutocorrWord aWordToAdd(aNewEntrie.GetShort(), aNewEntrie.GetLong(), true ); - o3tl::optional<SvxAutocorrWord> xRemoved = pAutocorr_List->FindAndRemove( &aWordToAdd ); + std::optional<SvxAutocorrWord> xRemoved = pAutocorr_List->FindAndRemove( &aWordToAdd ); if( xRemoved ) { if( !xRemoved->IsTextOnly() ) @@ -2591,7 +2591,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, const OUStrin if( bRet ) { SvxAutocorrWord aNew(rShort, rLong, true ); - o3tl::optional<SvxAutocorrWord> xRemove = pAutocorr_List->FindAndRemove( &aNew ); + std::optional<SvxAutocorrWord> xRemove = pAutocorr_List->FindAndRemove( &aNew ); if( xRemove ) { if( !xRemove->IsTextOnly() ) @@ -2727,7 +2727,7 @@ bool SvxAutocorrWordList::empty() const return mpImpl->maHash.empty() && mpImpl->maSortedVector.empty(); } -o3tl::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAutocorrWord *pWord) +std::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAutocorrWord *pWord) { if ( mpImpl->maSortedVector.empty() ) // use the hash @@ -2750,7 +2750,7 @@ o3tl::optional<SvxAutocorrWord> SvxAutocorrWordList::FindAndRemove(const SvxAuto return pMatch; } } - return o3tl::optional<SvxAutocorrWord>(); + return std::optional<SvxAutocorrWord>(); } // return the sorted contents - defer sorting until we have to. diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 97a622a59fa1..b873bd2ab963 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -163,7 +163,7 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const OUS bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor ); } -OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) +OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) { return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index 46970c75d9db..2d2119593ba3 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -71,7 +71,7 @@ public: // for text conversion virtual bool ConvertNextDocument() override; - virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor ) override; + virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor ) override; virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override; diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index c99cd4eb9c33..072851d2702f 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -640,7 +640,7 @@ void Outliner::AddText( const OutlinerParaObject& rPObj, bool bAppend ) pEditEngine->SetUpdateMode( bUpdate ); } -OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) +OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) { if ( !aCalcFieldValueHdl.IsSet() ) return OUString( ' ' ); diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index b9c06cf75a81..2eabe3e6e0c5 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -614,7 +614,7 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const return mpTextForwarder->GetPool(); } -OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) +OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) { assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder"); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 73fad9104536..8b0a55bde535 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -151,7 +151,7 @@ bool SvxEditEngineForwarder::IsValid() const return rEditEngine.GetUpdateMode(); } -OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) +OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) { return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index ceea8bceb67c..32ee462bbbfc 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -217,7 +217,7 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec rOutliner.QuickSetAttribs( rSet, rSel ); } -OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) +OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) { return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index f0ef0c30a8eb..ad5b26429e1d 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -632,8 +632,8 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM uno::Reference< text::XTextRange > xAnchor( this ); // get presentation string for field - o3tl::optional<Color> pTColor; - o3tl::optional<Color> pFColor; + std::optional<Color> pTColor; + std::optional<Color> pFColor; SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder(); OUString aPresentation( pForwarder->CalcFieldValue( SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, maSelection.nStartPos, pTColor, pFColor ) ); @@ -2356,7 +2356,7 @@ void SvxDummyTextSource::QuickInsertLineBreak( const ESelection& ) { }; -OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, o3tl::optional<Color>&, o3tl::optional<Color>& ) +OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional<Color>&, std::optional<Color>& ) { return OUString(); } diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index 7249b61017ff..e09061185541 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -21,7 +21,7 @@ #include <emfreader.hxx> #include <memory> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/safeint.hxx> #include <rtl/crc.h> #include <rtl/tencinfo.h> @@ -1490,10 +1490,10 @@ namespace emfio auto nEnd = nPos + pStm->remainingSize(); Point aWinOrg(0,0); - o3tl::optional<Size> aWinExt; + std::optional<Size> aWinExt; Point aViewportOrg(0,0); - o3tl::optional<Size> aViewportExt; + std::optional<Size> aViewportExt; if (nEnd - nPos) { diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index e704e423ee08..be84fe5f4815 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2326,7 +2326,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* rOutliner.QuickSetAttribs( aPortionAttribs, aSelection ); aSelection.nStartPos = aSelection.nEndPos; } - o3tl::optional< sal_Int16 > oStartNumbering; + std::optional< sal_Int16 > oStartNumbering; SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() ); pPara->ApplyTo( aParagraphAttribs, oStartNumbering, *this, nDestinationInstance ); @@ -3388,7 +3388,7 @@ PPTNumberFormatCreator::~PPTNumberFormatCreator() bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const & rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 nLevel, TSS_Type nInstance, TSS_Type nDestinationInstance, - o3tl::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight, PPTParagraphObj const * pPara ) + std::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight, PPTParagraphObj const * pPara ) { bool bHardAttribute = ( nDestinationInstance == TSS_Type::Unknown ); @@ -3629,7 +3629,7 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport const & } break; } - rStartNumbering = o3tl::optional< sal_Int16 >( nAnmScheme >> 16 ); + rStartNumbering = std::optional< sal_Int16 >( nAnmScheme >> 16 ); sal_Int16 nBuStart = *rStartNumbering; //The Seventh bit of nBuFlags that specifies whether fBulletHasAutoNumber exists, //and fBulletHasAutoNumber that specifies whether this paragraph has an automatic numbering scheme. @@ -3657,7 +3657,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag nTextOfs = rParaLevel.mnTextOfs; nBulletOfs = rParaLevel.mnBulletOfs; - o3tl::optional< sal_Int16 > oStartNumbering; + std::optional< sal_Int16 > oStartNumbering; ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, TSS_Type::Unknown, oStartNumbering, rCharLevel.mnFontHeight, nullptr ); if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) ) nBulletHeight = rCharLevel.mnFontHeight ? ((- static_cast<sal_Int16>(nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100; @@ -3690,7 +3690,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManag } bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport const & rManager, SvxNumberFormat& rNumberFormat, PPTParagraphObj* pParaObj, - TSS_Type nDestinationInstance, o3tl::optional< sal_Int16 >& rStartNumbering ) + TSS_Type nDestinationInstance, std::optional< sal_Int16 >& rStartNumbering ) { sal_uInt32 nHardCount = 0; nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet, nDestinationInstance ) ? 1 : 0; @@ -6156,7 +6156,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, TSS_Ty return bIsHardAttribute; } -void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, o3tl::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport const & rManager, TSS_Type nDestinationInstance ) +void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport const & rManager, TSS_Type nDestinationInstance ) { sal_Int16 nVal2; sal_uInt32 nVal, nUpperDist, nLowerDist; diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 2abce8fdeb08..af0d87c2a240 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1547,7 +1547,7 @@ IMPL_LINK_NOARG(ImpPDFTabSigningPage, ClickmaPbSignCertSelect, weld::Button&, vo try { - o3tl::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get()); + std::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get()); if (aTSAURLs) { const css::uno::Sequence<OUString>& rTSAURLs = *aTSAURLs; diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 749f10e83bc5..f33312952e44 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -47,7 +47,7 @@ #include <sal/log.hxx> #include <unotools/sharedunocomponent.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <algorithm> #include <iterator> @@ -732,7 +732,7 @@ namespace frm return; } - ::o3tl::optional< sal_Int16 > aBoundColumn(o3tl::nullopt); + ::std::optional< sal_Int16 > aBoundColumn(std::nullopt); if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT ) { sal_Int16 nBoundColumn( 0 ); diff --git a/framework/inc/pch/precompiled_fwe.hxx b/framework/inc/pch/precompiled_fwe.hxx index 7317f6a31440..06d95757ba24 100644 --- a/framework/inc/pch/precompiled_fwe.hxx +++ b/framework/inc/pch/precompiled_fwe.hxx @@ -142,7 +142,7 @@ #include <cppuhelper/cppuhelperdllapi.h> #include <i18nlangtag/lang.h> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/optional.hxx> +#include <optional> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <o3tl/underlyingenumvalue.hxx> ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits