summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/inc/pch/precompiled_acc.hxx2
-rw-r--r--basctl/inc/pch/precompiled_basctl.hxx2
-rw-r--r--basctl/source/inc/dlgedobj.hxx4
-rw-r--r--basic/source/sbx/sbxarray.cxx4
-rwxr-xr-xbin/find-unneeded-includes3
-rw-r--r--canvas/source/directx/dx_config.hxx4
-rw-r--r--chart2/inc/pch/precompiled_chartcontroller.hxx2
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx4
-rw-r--r--chart2/source/view/axes/VAxisProperties.hxx6
-rw-r--r--comphelper/inc/pch/precompiled_comphelper.hxx2
-rw-r--r--comphelper/qa/unit/variadictemplates.cxx12
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.hxx6
-rw-r--r--compilerplugins/clang/store/stylepolice.cxx2
-rw-r--r--compilerplugins/clang/unusedfields.writeonly.results2
-rw-r--r--connectivity/inc/pch/precompiled_file.hxx2
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx8
-rw-r--r--connectivity/source/commontools/sqlerror.cxx36
-rw-r--r--connectivity/source/inc/java/io/Reader.hxx4
-rw-r--r--cppcanvas/inc/pch/precompiled_cppcanvas.hxx2
-rw-r--r--cppcanvas/source/inc/canvasgraphichelper.hxx4
-rw-r--r--cppcanvas/source/wrapper/implcanvas.hxx4
-rw-r--r--cui/inc/pch/precompiled_cui.hxx2
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/options/tsaurls.cxx2
-rw-r--r--dbaccess/inc/pch/precompiled_dba.hxx2
-rw-r--r--dbaccess/inc/pch/precompiled_dbu.hxx2
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx4
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.hxx30
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx4
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx2
-rw-r--r--dbaccess/source/core/inc/ModelImpl.hxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppController.hxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx2
-rw-r--r--dbaccess/source/ui/dlg/optionalboolitem.hxx6
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx4
-rw-r--r--desktop/IwyuFilter_desktop.yaml3
-rw-r--r--desktop/inc/app.hxx4
-rw-r--r--desktop/inc/pch/precompiled_deployment.hxx2
-rw-r--r--desktop/inc/pch/precompiled_deploymentgui.hxx2
-rw-r--r--desktop/inc/pch/precompiled_sofficeapp.hxx2
-rw-r--r--desktop/qa/desktop_app/test_desktop_app.cxx2
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--desktop/source/app/cmdlineargs.cxx4
-rw-r--r--desktop/source/app/cmdlineargs.hxx8
-rw-r--r--desktop/source/app/dispatchwatcher.hxx4
-rw-r--r--desktop/source/app/officeipcthread.cxx10
-rw-r--r--desktop/source/app/officeipcthread.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx10
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx6
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx10
-rw-r--r--desktop/source/deployment/inc/dp_identifier.hxx4
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_properties.hxx6
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx30
-rw-r--r--desktop/source/deployment/misc/dp_identifier.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_update.cxx4
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx12
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx6
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx6
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx10
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx6
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx6
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx2
-rw-r--r--editeng/inc/editattr.hxx10
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx2
-rw-r--r--editeng/qa/unit/core-test.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx4
-rw-r--r--editeng/source/misc/svxacorr.cxx10
-rw-r--r--editeng/source/outliner/outleeng.cxx2
-rw-r--r--editeng/source/outliner/outleeng.hxx2
-rw-r--r--editeng/source/outliner/outliner.cxx2
-rw-r--r--editeng/source/uno/unoedprx.cxx2
-rw-r--r--editeng/source/uno/unofored.cxx2
-rw-r--r--editeng/source/uno/unoforou.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx6
-rw-r--r--emfio/source/reader/wmfreader.cxx6
-rw-r--r--filter/source/msfilter/svdfppt.cxx12
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--forms/source/component/ListBox.cxx4
-rw-r--r--framework/inc/pch/precompiled_fwe.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx2
-rw-r--r--framework/inc/pch/precompiled_fwl.hxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx2
-rw-r--r--framework/source/services/substitutepathvars.cxx2
-rw-r--r--idlc/inc/astexpression.hxx4
-rw-r--r--idlc/inc/astsequence.hxx2
-rw-r--r--include/comphelper/configuration.hxx18
-rw-r--r--include/comphelper/logging.hxx4
-rw-r--r--include/comphelper/unwrapargs.hxx6
-rw-r--r--include/connectivity/sqlerror.hxx14
-rw-r--r--include/cppcanvas/renderer.hxx18
-rw-r--r--include/dbaccess/genericcontroller.hxx10
-rw-r--r--include/editeng/editeng.hxx4
-rw-r--r--include/editeng/outliner.hxx16
-rw-r--r--include/editeng/svxacorr.hxx4
-rw-r--r--include/editeng/unoedprx.hxx2
-rw-r--r--include/editeng/unoedsrc.hxx2
-rw-r--r--include/editeng/unofored.hxx2
-rw-r--r--include/editeng/unoforou.hxx2
-rw-r--r--include/editeng/unotext.hxx2
-rw-r--r--include/filter/msfilter/msdffimp.hxx6
-rw-r--r--include/filter/msfilter/svdfppt.hxx10
-rw-r--r--include/o3tl/any.hxx38
-rw-r--r--include/o3tl/optional.hxx46
-rw-r--r--include/oox/helper/helper.hxx2
-rw-r--r--include/sax/tools/converter.hxx4
-rw-r--r--include/sfx2/dinfdlg.hxx4
-rw-r--r--include/sfx2/lokhelper.hxx4
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx6
-rw-r--r--include/svx/svdomeas.hxx2
-rw-r--r--include/svx/svdotext.hxx2
-rw-r--r--include/svx/svdoutl.hxx2
-rw-r--r--include/toolkit/controls/unocontrols.hxx14
-rw-r--r--include/unotools/historyoptions.hxx4
-rw-r--r--include/vcl/event.hxx6
-rw-r--r--include/vcl/fontcapabilities.hxx6
-rw-r--r--include/vcl/outdevstate.hxx18
-rw-r--r--include/vcl/settings.hxx4
-rw-r--r--include/vcl/threadex.hxx6
-rw-r--r--include/vcl/treelistentry.hxx8
-rw-r--r--jvmfwk/inc/elements.hxx22
-rw-r--r--jvmfwk/inc/fwkbase.hxx4
-rw-r--r--jvmfwk/source/elements.cxx26
-rw-r--r--jvmfwk/source/fwkbase.cxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx4
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx2
-rw-r--r--officecfg/registry/cppheader.xsl4
-rw-r--r--oox/inc/drawingml/table/tablestylepart.hxx10
-rw-r--r--oox/inc/drawingml/textbodyproperties.hxx12
-rw-r--r--oox/inc/drawingml/textparagraphproperties.hxx14
-rw-r--r--oox/inc/pch/precompiled_oox.hxx2
-rw-r--r--oox/source/drawingml/shape.cxx4
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx4
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx4
-rw-r--r--oox/source/shape/WpsContext.cxx4
-rw-r--r--oox/source/vml/vmlshape.cxx6
-rw-r--r--pch/inc/pch/precompiled_system.hxx2
-rw-r--r--reportdesign/inc/pch/precompiled_rpt.hxx2
-rw-r--r--reportdesign/inc/pch/precompiled_rptui.hxx2
-rw-r--r--sax/source/tools/converter.cxx6
-rw-r--r--sc/inc/chgtrack.hxx4
-rw-r--r--sc/inc/colorscale.hxx2
-rw-r--r--sc/inc/conditio.hxx4
-rw-r--r--sc/inc/dpsave.hxx18
-rw-r--r--sc/inc/dptabsrc.hxx18
-rw-r--r--sc/inc/editutil.hxx6
-rw-r--r--sc/inc/fillinfo.hxx4
-rw-r--r--sc/inc/fonthelper.hxx30
-rw-r--r--sc/inc/funcdesc.hxx6
-rw-r--r--sc/inc/paramisc.hxx4
-rw-r--r--sc/inc/patattr.hxx4
-rw-r--r--sc/inc/pch/precompiled_sc.hxx2
-rw-r--r--sc/inc/pch/precompiled_scfilt.hxx2
-rw-r--r--sc/inc/sheetevents.hxx4
-rw-r--r--sc/qa/unit/pivottable_filters_test.cxx2
-rw-r--r--sc/source/core/data/colorscale.cxx8
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpsave.cxx14
-rw-r--r--sc/source/core/data/dptabres.cxx8
-rw-r--r--sc/source/core/data/dptabsrc.cxx10
-rw-r--r--sc/source/core/data/sheetevents.cxx8
-rw-r--r--sc/source/core/tool/editutil.cxx6
-rw-r--r--sc/source/filter/excel/xepivot.cxx8
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx2
-rw-r--r--sc/source/filter/excel/xlpivot.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/inc/eeparser.hxx8
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx4
-rw-r--r--sc/source/filter/inc/xlpivot.hxx4
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.hxx4
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx6
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.hxx16
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx10
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx14
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx16
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx4
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx2
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx4
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/output.cxx14
-rw-r--r--sd/inc/pch/precompiled_sd.hxx2
-rw-r--r--sd/inc/pch/precompiled_sdui.hxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx4
-rw-r--r--sd/source/ui/app/sdmod2.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx10
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx4
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx2
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--slideshow/inc/pch/precompiled_slideshow.hxx2
-rw-r--r--slideshow/source/engine/activities/activitiesfactory.cxx6
-rw-r--r--slideshow/source/engine/activities/activitybase.hxx2
-rw-r--r--slideshow/source/engine/activities/activityparameters.hxx6
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx4
-rw-r--r--slideshow/source/engine/shapes/drawshape.hxx4
-rw-r--r--slideshow/source/engine/shapes/viewshape.cxx2
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx8
-rw-r--r--slideshow/source/engine/transitions/combtransition.cxx2
-rw-r--r--slideshow/source/engine/transitions/combtransition.hxx2
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx6
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.hxx8
-rw-r--r--slideshow/source/engine/transitions/slidetransitionfactory.cxx34
-rw-r--r--slideshow/source/inc/activitiesfactory.hxx6
-rw-r--r--slideshow/source/inc/animatedsprite.hxx6
-rw-r--r--starmath/inc/pch/precompiled_sm.hxx2
-rw-r--r--starmath/source/accessibility.cxx2
-rw-r--r--starmath/source/accessibility.hxx2
-rw-r--r--svgio/inc/svgnode.hxx10
-rw-r--r--svtools/inc/pch/precompiled_svt.hxx2
-rw-r--r--svtools/inc/table/tablemodel.hxx22
-rw-r--r--svtools/source/misc/sampletext.cxx4
-rw-r--r--svtools/source/table/gridtablerenderer.cxx14
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx40
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx4
-rw-r--r--svtools/source/uno/unocontroltablemodel.cxx42
-rw-r--r--svtools/source/uno/unocontroltablemodel.hxx20
-rw-r--r--svx/inc/pch/precompiled_svx.hxx2
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx2
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx2
-rw-r--r--svx/source/dialog/ClassificationEditView.cxx2
-rw-r--r--svx/source/dialog/ClassificationEditView.hxx2
-rw-r--r--svx/source/dialog/weldeditview.cxx8
-rw-r--r--svx/source/form/fmmodel.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx6
-rw-r--r--svx/source/svdraw/svdomeas.cxx2
-rw-r--r--svx/source/svdraw/svdotxfl.cxx2
-rw-r--r--svx/source/svdraw/svdoutl.cxx2
-rw-r--r--sw/inc/anchoreddrawobject.hxx6
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/fmtpdsc.hxx8
-rw-r--r--sw/inc/pch/precompiled_msword.hxx2
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/pch/precompiled_swui.hxx2
-rw-r--r--sw/inc/pch/precompiled_vbaswobj.hxx2
-rw-r--r--sw/inc/redline.hxx4
-rw-r--r--sw/inc/swabstdlg.hxx4
-rw-r--r--sw/inc/undobj.hxx4
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx10
-rw-r--r--sw/source/core/crsr/bookmrk.cxx2
-rw-r--r--sw/source/core/crsr/findattr.cxx8
-rw-r--r--sw/source/core/crsr/findtxt.cxx8
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/frmedt/fedesc.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/inc/UndoDelete.hxx4
-rw-r--r--sw/source/core/inc/UndoInsert.hxx12
-rw-r--r--sw/source/core/inc/swfont.hxx26
-rw-r--r--sw/source/core/inc/wrong.hxx4
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/layout/calcmove.cxx4
-rw-r--r--sw/source/core/layout/flowfrm.cxx4
-rw-r--r--sw/source/core/layout/laycache.cxx2
-rw-r--r--sw/source/core/layout/newfrm.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx6
-rw-r--r--sw/source/core/text/wrong.cxx10
-rw-r--r--sw/source/core/tox/tox.cxx8
-rw-r--r--sw/source/core/txtnode/swfont.cxx8
-rw-r--r--sw/source/core/txtnode/txatbase.cxx4
-rw-r--r--sw/source/core/undo/undel.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx8
-rw-r--r--sw/source/filter/html/htmlatr.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx20
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx6
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx6
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx6
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx6
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx2
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx4
-rw-r--r--sw/source/ui/misc/titlepage.cxx4
-rw-r--r--sw/source/ui/table/tabledlg.cxx6
-rw-r--r--sw/source/uibase/app/appenv.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx2
-rw-r--r--sw/source/uibase/inc/PageBreakWin.hxx6
-rw-r--r--sw/source/uibase/inc/break.hxx6
-rw-r--r--sw/source/uibase/inc/edtwin.hxx2
-rw-r--r--sw/source/uibase/inc/toxmgr.hxx38
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx4
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
-rw-r--r--toolkit/source/controls/unocontrols.cxx22
-rw-r--r--ucb/source/ucp/ext/ucpext_content.hxx6
-rw-r--r--unotools/inc/pch/precompiled_utl.hxx2
-rw-r--r--unotools/source/config/historyoptions.cxx8
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx8
-rw-r--r--vbahelper/inc/pch/precompiled_msforms.hxx2
-rw-r--r--vcl/inc/bitmapwriteaccess.hxx6
-rw-r--r--vcl/inc/fontinstance.hxx4
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx2
-rw-r--r--vcl/inc/sft.hxx4
-rw-r--r--vcl/inc/svdata.hxx8
-rw-r--r--vcl/inc/unx/screensaverinhibitor.hxx14
-rw-r--r--vcl/inc/wall2.hxx4
-rw-r--r--vcl/inc/window.h14
-rw-r--r--vcl/qt5/Qt5Frame.cxx4
-rw-r--r--vcl/source/app/settings.cxx6
-rw-r--r--vcl/source/control/quickselectionengine.cxx4
-rw-r--r--vcl/source/fontsubset/sft.cxx4
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/unx/generic/window/screensaverinhibitor.cxx4
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx4
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/kf5/KF5SalFrame.cxx2
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx2
-rw-r--r--vcl/win/window/salframe.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx38
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx26
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx10
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx8
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx4
-rw-r--r--writerfilter/source/dmapper/NumberingManager.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx12
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx6
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx5
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx6
-rw-r--r--writerfilter/source/dmapper/TextEffectsHandler.hxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx6
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx22
357 files changed, 1084 insertions, 1137 deletions
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 "jim@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>
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index 6095da597bc4..34af88a24c65 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -217,7 +217,7 @@
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.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/framework/inc/pch/precompiled_fwl.hxx b/framework/inc/pch/precompiled_fwl.hxx
index 9d09880ad525..bab212a353bc 100644
--- a/framework/inc/pch/precompiled_fwl.hxx
+++ b/framework/inc/pch/precompiled_fwl.hxx
@@ -180,7 +180,7 @@
#include <i18nlangtag/lang.h>
#include <macros/xserviceinfo.hxx>
#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/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 78897aa813cc..12368afce638 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -918,7 +918,7 @@ bool LoadEnv::impl_furtherDocsAllowed()
try
{
- o3tl::optional<sal_Int32> x(officecfg::Office::Common::Misc::MaxOpenDocuments::get(xContext));
+ std::optional<sal_Int32> x(officecfg::Office::Common::Misc::MaxOpenDocuments::get(xContext));
// NIL means: count of allowed documents = infinite !
// => return true
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 371b5e808c6b..651847c6ecd0 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -256,7 +256,7 @@ OUString SubstitutePathVariables::GetWorkPath() const
OUString SubstitutePathVariables::GetWorkVariableValue() const
{
OUString aWorkPath;
- o3tl::optional<OUString> x(officecfg::Office::Paths::Variables::Work::get(m_xContext));
+ std::optional<OUString> x(officecfg::Office::Paths::Variables::Work::get(m_xContext));
if (!x)
{
// fallback to $HOME in case platform dependent config layer does not return
diff --git a/idlc/inc/astexpression.hxx b/idlc/inc/astexpression.hxx
index b146e9c85a07..05d20baa51cd 100644
--- a/idlc/inc/astexpression.hxx
+++ b/idlc/inc/astexpression.hxx
@@ -24,7 +24,7 @@
#include <memory>
#include "idlc.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
// Enum to define all the different operators to combine expressions
enum class ExprComb
@@ -130,7 +130,7 @@ private:
m_subExpr2;
std::unique_ptr<AstExprValue>
m_exprValue;
- o3tl::optional<OString>
+ std::optional<OString>
m_xSymbolicName;
};
diff --git a/idlc/inc/astsequence.hxx b/idlc/inc/astsequence.hxx
index 68a98dfe5162..41024894f47a 100644
--- a/idlc/inc/astsequence.hxx
+++ b/idlc/inc/astsequence.hxx
@@ -38,7 +38,7 @@ public:
virtual const char* getRelativName() const override;
private:
AstType const * m_pMemberType;
- mutable o3tl::optional<OString> m_xRelativName;
+ mutable std::optional<OString> m_xRelativName;
};
#endif // INCLUDED_IDLC_INC_ASTSEQUENCE_HXX
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx
index 7c2a0a7fb4ec..de65a7ad3f1e 100644
--- a/include/comphelper/configuration.hxx
+++ b/include/comphelper/configuration.hxx
@@ -12,7 +12,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
@@ -158,18 +158,18 @@ private:
};
/// @internal
-template< typename T > struct Convert< o3tl::optional< T > >
+template< typename T > struct Convert< std::optional< T > >
{
- static css::uno::Any toAny(o3tl::optional< T > const & value) {
+ static css::uno::Any toAny(std::optional< T > const & value) {
return value
? css::uno::makeAny(*value)
: css::uno::Any();
}
- static o3tl::optional< T > fromAny(css::uno::Any const & value)
+ static std::optional< T > fromAny(css::uno::Any const & value)
{
return value.hasValue()
- ? o3tl::optional< T >(value.get< T >()) : o3tl::optional< T >();
+ ? std::optional< T >(value.get< T >()) : std::optional< T >();
}
private:
@@ -200,7 +200,7 @@ template< typename T, typename U > struct ConfigurationProperty
/// Get the value of the given (non-localized) configuration property.
///
- /// For nillable properties, U is of type o3tl::optional<U'>.
+ /// For nillable properties, U is of type std::optional<U'>.
static U get(
css::uno::Reference< css::uno::XComponentContext >
const & context = comphelper::getProcessComponentContext())
@@ -216,7 +216,7 @@ template< typename T, typename U > struct ConfigurationProperty
/// Set the value of the given (non-localized) configuration property, via a
/// given changes batch.
///
- /// For nillable properties, U is of type o3tl::optional<U'>.
+ /// For nillable properties, U is of type std::optional<U'>.
static void set(
U const & value,
std::shared_ptr< ConfigurationChanges > const & batch)
@@ -244,7 +244,7 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty
/// locale currently set at the
/// com.sun.star.configuration.theDefaultProvider.
///
- /// For nillable properties, U is of type o3tl::optional<U'>.
+ /// For nillable properties, U is of type std::optional<U'>.
static U get(css::uno::Reference< css::uno::XComponentContext > const & context)
{
// Folding this into one statement causes a bogus error at least with
@@ -260,7 +260,7 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty
/// com.sun.star.configuration.theDefaultProvider, via a given changes
/// batch.
///
- /// For nillable properties, U is of type o3tl::optional<U'>.
+ /// For nillable properties, U is of type std::optional<U'>.
static void set(
U const & value,
std::shared_ptr< ConfigurationChanges > const & batch)
diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx
index 7719e86da201..d7bd806c8f84 100644
--- a/include/comphelper/logging.hxx
+++ b/include/comphelper/logging.hxx
@@ -23,7 +23,7 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
namespace com::sun::star::uno { template <class interface_type> class Reference; }
@@ -65,7 +65,7 @@ namespace comphelper
//= EventLogger
class EventLogger_Impl;
- typedef ::o3tl::optional< OUString > OptionalString;
+ typedef ::std::optional< OUString > OptionalString;
/** encapsulates a css::logging::XLogger
diff --git a/include/comphelper/unwrapargs.hxx b/include/comphelper/unwrapargs.hxx
index 3ba4e213c266..041c69da1818 100644
--- a/include/comphelper/unwrapargs.hxx
+++ b/include/comphelper/unwrapargs.hxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -67,7 +67,7 @@ namespace detail {
template< typename T, typename... Args >
inline void unwrapArgs(
const css::uno::Sequence< css::uno::Any >& seq,
- sal_Int32 nArg, ::o3tl::optional< T >& v, Args&... args );
+ sal_Int32 nArg, ::std::optional< T >& v, Args&... args );
template< typename T, typename... Args >
inline void unwrapArgs(
@@ -95,7 +95,7 @@ namespace detail {
template< typename T, typename... Args >
inline void unwrapArgs(
const css::uno::Sequence< css::uno::Any >& seq,
- sal_Int32 nArg, ::o3tl::optional< T >& v, Args&... args )
+ sal_Int32 nArg, ::std::optional< T >& v, Args&... args )
{
if( nArg < seq.getLength() )
{
diff --git a/include/connectivity/sqlerror.hxx b/include/connectivity/sqlerror.hxx
index b10d8ae570b6..252fe479e566 100644
--- a/include/connectivity/sqlerror.hxx
+++ b/include/connectivity/sqlerror.hxx
@@ -22,7 +22,7 @@
#include <com/sun/star/sdbc/SQLException.hpp>
#include <connectivity/dbtoolsdllapi.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
namespace connectivity
@@ -138,9 +138,9 @@ namespace connectivity
void raiseException(
const ErrorCondition _eCondition,
const css::uno::Reference< css::uno::XInterface >& _rxContext,
- const o3tl::optional<OUString>& _rParamValue1 = o3tl::nullopt,
- const o3tl::optional<OUString>& _rParamValue2 = o3tl::nullopt,
- const o3tl::optional<OUString>& _rParamValue3 = o3tl::nullopt
+ const std::optional<OUString>& _rParamValue1 = std::nullopt,
+ const std::optional<OUString>& _rParamValue2 = std::nullopt,
+ const std::optional<OUString>& _rParamValue3 = std::nullopt
) const;
/** throws an SQLException describing the given error condition
@@ -221,9 +221,9 @@ namespace connectivity
getSQLException(
const ErrorCondition _eCondition,
const css::uno::Reference< css::uno::XInterface >& _rxContext,
- const o3tl::optional<OUString>& _rParamValue1 = o3tl::nullopt,
- const o3tl::optional<OUString>& _rParamValue2 = o3tl::nullopt,
- const o3tl::optional<OUString>& _rParamValue3 = o3tl::nullopt
+ const std::optional<OUString>& _rParamValue1 = std::nullopt,
+ const std::optional<OUString>& _rParamValue2 = std::nullopt,
+ const std::optional<OUString>& _rParamValue3 = std::nullopt
) const;
private:
diff --git a/include/cppcanvas/renderer.hxx b/include/cppcanvas/renderer.hxx
index ed1dc04a11f7..d71be2f09e89 100644
--- a/include/cppcanvas/renderer.hxx
+++ b/include/cppcanvas/renderer.hxx
@@ -22,7 +22,7 @@
#include <sal/types.h>
#include <rtl/ustring.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <cppcanvas/canvasgraphic.hxx>
#include <cppcanvas/color.hxx>
@@ -100,16 +100,16 @@ namespace cppcanvas
struct Parameters
{
/// Optionally forces the fill color attribute for all actions
- ::o3tl::optional< IntSRGBA > maFillColor;
+ ::std::optional< IntSRGBA > maFillColor;
/// Optionally forces the line color attribute for all actions
- ::o3tl::optional< IntSRGBA > maLineColor;
+ ::std::optional< IntSRGBA > maLineColor;
/// Optionally forces the text color attribute for all actions
- ::o3tl::optional< IntSRGBA > maTextColor;
+ ::std::optional< IntSRGBA > maTextColor;
/// Optionally forces the given fontname for all text actions
- ::o3tl::optional< OUString > maFontName;
+ ::std::optional< OUString > maFontName;
/** Optionally transforms all text output actions with the
given matrix (in addition to the overall canvas
@@ -119,16 +119,16 @@ namespace cppcanvas
rect coordinate system, i.e. the metafile is assumed
to be contained in the unit rect.
*/
- ::o3tl::optional< ::basegfx::B2DHomMatrix > maTextTransformation;
+ ::std::optional< ::basegfx::B2DHomMatrix > maTextTransformation;
/// Optionally forces the given font weight for all text actions
- ::o3tl::optional< sal_Int8 > maFontWeight;
+ ::std::optional< sal_Int8 > maFontWeight;
/// Optionally forces the given font letter form (italics etc.) for all text actions
- ::o3tl::optional< sal_Int8 > maFontLetterForm;
+ ::std::optional< sal_Int8 > maFontLetterForm;
/// Optionally forces underlining for all text actions
- ::o3tl::optional< bool > maFontUnderline;
+ ::std::optional< bool > maFontUnderline;
};
};
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 60c75236475f..805131548f28 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -27,7 +27,7 @@
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/awt/XUserInputInterception.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
@@ -94,7 +94,7 @@ namespace dbaui
class ODataView;
template< typename T >
- inline bool SAL_CALL operator >>= (const css::uno::Any& _any, o3tl::optional< T >& _value)
+ inline bool SAL_CALL operator >>= (const css::uno::Any& _any, std::optional< T >& _value)
{
_value.reset(); // de-init the optional value
@@ -118,10 +118,10 @@ namespace dbaui
{
bool bEnabled;
- o3tl::optional<bool> bChecked;
- o3tl::optional<bool> bInvisible;
+ std::optional<bool> bChecked;
+ std::optional<bool> bInvisible;
css::uno::Any aValue;
- o3tl::optional<OUString> sTitle;
+ std::optional<OUString> sTitle;
FeatureState() : bEnabled(false) { }
};
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 01dcffe10022..5f45dd1fbf29 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -23,7 +23,7 @@
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/WordType.hpp>
@@ -506,7 +506,7 @@ public:
virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
virtual bool SpellNextDocument();
virtual void FieldClicked( const SvxFieldItem& rField );
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor );
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor );
// override this if access to bullet information needs to be provided
virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 2f6cc2d9abf3..991a5e3ba58f 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -40,7 +40,7 @@
#include <editeng/paragraphdata.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <functional>
#include <memory>
#include <vector>
@@ -484,8 +484,8 @@ private:
Outliner* pOutliner;
const SvxFieldItem& rFldItem;
- o3tl::optional<Color> mxTxtColor;
- o3tl::optional<Color> mxFldColor;
+ std::optional<Color> mxTxtColor;
+ std::optional<Color> mxFldColor;
OUString aRepresentation;
@@ -509,11 +509,11 @@ public:
const SvxFieldItem& GetField() const { return rFldItem; }
- o3tl::optional<Color> const & GetTextColor() const { return mxTxtColor; }
- void SetTextColor( o3tl::optional<Color> xCol ) { mxTxtColor = xCol; }
+ std::optional<Color> const & GetTextColor() const { return mxTxtColor; }
+ void SetTextColor( std::optional<Color> xCol ) { mxTxtColor = xCol; }
- o3tl::optional<Color> const & GetFieldColor() const { return mxFldColor; }
- void SetFieldColor( o3tl::optional<Color> xCol ) { mxFldColor = xCol; }
+ std::optional<Color> const & GetFieldColor() const { return mxFldColor; }
+ void SetFieldColor( std::optional<Color> xCol ) { mxFldColor = xCol; }
sal_Int32 GetPara() const { return nPara; }
sal_Int32 GetPos() const { return nPos; }
@@ -880,7 +880,7 @@ public:
bool UpdateFields();
void RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} );
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor );
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor );
void SetSpeller( css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller );
css::uno::Reference< css::linguistic2::XSpellChecker1 > const &
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index e0624aaaf8f0..df6a3214792b 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -28,7 +28,7 @@
#include <editeng/swafopt.hxx>
#include <editeng/editengdllapi.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <map>
#include <memory>
@@ -155,7 +155,7 @@ public:
~SvxAutocorrWordList();
void DeleteAndDestroyAll();
const SvxAutocorrWord* Insert(SvxAutocorrWord aWord) const;
- o3tl::optional<SvxAutocorrWord> FindAndRemove(const SvxAutocorrWord *pWord);
+ std::optional<SvxAutocorrWord> FindAndRemove(const SvxAutocorrWord *pWord);
void LoadEntry(const OUString& sWrong, const OUString& sRight, bool bOnlyTxt);
bool empty() const;
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index a3aa0b915cc3..59d83c38c8bd 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -54,7 +54,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index ab8a567d78d2..44d8944bc442 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -159,7 +159,7 @@ public:
virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0;
virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) = 0;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) = 0;
virtual void FieldClicked( const SvxFieldItem& rField ) = 0;
virtual SfxItemPool* GetPool() const = 0;
diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx
index a0cf70caf5f8..989b5c36511d 100644
--- a/include/editeng/unofored.hxx
+++ b/include/editeng/unofored.hxx
@@ -54,7 +54,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx
index 17029f9ca85c..4695077fa7c7 100644
--- a/include/editeng/unoforou.hxx
+++ b/include/editeng/unoforou.hxx
@@ -72,7 +72,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 6dbcea427e8e..f85c6c657efb 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -190,7 +190,7 @@ public:
virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) override;
virtual void QuickInsertLineBreak( const ESelection& rSel ) override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 48feab870805..2af6fdfa4682 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -28,7 +28,7 @@
#include <vector>
#include <unordered_map>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <comphelper/stl_types.hxx>
@@ -226,9 +226,9 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
pClientDataBuffer;
sal_uInt32 nClientDataLen;
sal_uInt32 nXAlign;
- o3tl::optional<sal_uInt32> nXRelTo;
+ std::optional<sal_uInt32> nXRelTo;
sal_uInt32 nYAlign;
- o3tl::optional<sal_uInt32> nYRelTo;
+ std::optional<sal_uInt32> nYRelTo;
sal_uInt32 nLayoutInTableCell;
ShapeFlag nFlags;
sal_Int32 nDxTextLeft; ///< distance of text box from surrounding shape
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index ec50015bb191..9ee6944f1138 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -25,7 +25,7 @@
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/uno/Reference.hxx>
#include <editeng/eeitem.hxx>
@@ -491,7 +491,7 @@ struct MSFILTER_DLLPUBLIC PPTFieldEntry
sal_uInt16 nTextRangeEnd;
std::unique_ptr<SvxFieldItem> xField1;
std::unique_ptr<SvxFieldItem> xField2;
- o3tl::optional<OUString> xString;
+ std::optional<OUString> xString;
PPTFieldEntry()
: nPos(0)
@@ -813,7 +813,7 @@ class PPTNumberFormatCreator
sal_uInt32 nLevel,
TSS_Type nInstance,
TSS_Type nInstanceInSheet,
- o3tl::optional< sal_Int16 >& rStartNumbering,
+ std::optional< sal_Int16 >& rStartNumbering,
sal_uInt32 nFontHeight,
PPTParagraphObj const * pPara
);
@@ -841,7 +841,7 @@ public:
SvxNumberFormat& rNumberFormat,
PPTParagraphObj* pPara,
TSS_Type nInstanceInSheet,
- o3tl::optional< sal_Int16 >& rStartNumbering
+ std::optional< sal_Int16 >& rStartNumbering
);
};
@@ -1177,7 +1177,7 @@ public:
void AppendPortion( PPTPortionObj& rPortion );
void ApplyTo(
SfxItemSet& rSet,
- o3tl::optional< sal_Int16 >& rStartNumbering,
+ std::optional< sal_Int16 >& rStartNumbering,
SdrPowerPointImport const & rManager,
TSS_Type nInstanceInSheet
);
diff --git a/include/o3tl/any.hxx b/include/o3tl/any.hxx
index b4d9e5272fc5..0acccff6439f 100644
--- a/include/o3tl/any.hxx
+++ b/include/o3tl/any.hxx
@@ -16,7 +16,7 @@
#include <type_traits>
#include <utility>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
@@ -36,37 +36,37 @@ namespace detail {
struct Void {};
template<typename T> struct Optional { using type = T const *; };
-template<> struct Optional<void> { using type = o3tl::optional<Void const>; };
-template<> struct Optional<bool> { using type = o3tl::optional<bool const>; };
+template<> struct Optional<void> { using type = std::optional<Void const>; };
+template<> struct Optional<bool> { using type = std::optional<bool const>; };
template<> struct Optional<sal_Int8> {
- using type = o3tl::optional<sal_Int8 const>;
+ using type = std::optional<sal_Int8 const>;
};
template<> struct Optional<sal_Int16> {
- using type = o3tl::optional<sal_Int16 const>;
+ using type = std::optional<sal_Int16 const>;
};
template<> struct Optional<sal_uInt16> {
- using type = o3tl::optional<sal_uInt16 const>;
+ using type = std::optional<sal_uInt16 const>;
};
template<> struct Optional<sal_Int32> {
- using type = o3tl::optional<sal_Int32 const>;
+ using type = std::optional<sal_Int32 const>;
};
template<> struct Optional<sal_uInt32> {
- using type = o3tl::optional<sal_uInt32 const>;
+ using type = std::optional<sal_uInt32 const>;
};
template<> struct Optional<sal_Int64> {
- using type = o3tl::optional<sal_Int64 const>;
+ using type = std::optional<sal_Int64 const>;
};
template<> struct Optional<sal_uInt64> {
- using type = o3tl::optional<sal_uInt64 const>;
+ using type = std::optional<sal_uInt64 const>;
};
template<> struct Optional<float> {
- using type = o3tl::optional<float const>;
+ using type = std::optional<float const>;
};
template<> struct Optional<double> {
- using type = o3tl::optional<double const>;
+ using type = std::optional<double const>;
};
template<typename T> struct Optional<css::uno::Reference<T>> {
- using type = o3tl::optional<css::uno::Reference<T> const>;
+ using type = std::optional<css::uno::Reference<T> const>;
};
template<> struct Optional<css::uno::Reference<css::uno::XInterface>> {
using type = css::uno::Reference<css::uno::XInterface> const *;
@@ -85,12 +85,12 @@ template<typename T> struct IsUnoSequenceType<cppu::UnoSequenceType<T>>:
std::true_type
{};
-template<typename T> inline o3tl::optional<T const> tryGetConverted(
+template<typename T> inline std::optional<T const> tryGetConverted(
css::uno::Any const & any)
{
T v;
return (any >>= v)
- ? o3tl::optional<T const>(std::move(v)) : o3tl::optional<T const>();
+ ? std::optional<T const>(std::move(v)) : std::optional<T const>();
}
}
@@ -105,7 +105,7 @@ template<typename T> inline o3tl::optional<T const> tryGetConverted(
proxy is positive. For a positive proxy P representing a value of requested
type T, for any T other than void, the expression *P yields that value of
type T. (Technically, the proxy is either a plain pointer or a
- o3tl::optional, depending on whether a plain pointer into the given Any can
+ std::optional, depending on whether a plain pointer into the given Any can
be returned for the specified type.)
@attention A proxy returned from this function must not outlive the
@@ -124,7 +124,7 @@ template<typename T> inline o3tl::optional<T const> tryGetConverted(
@note Ideally this would be a public member function of css::uno::Any (at
least conditional on LIBO_INTERNAL_ONLY, as it requires C++11). However, as
std::optional (which would be needed to implement the proxies) is only
- available since C++14, we need to use o3tl::optional for now. But To not
+ available since C++14, we need to use std::optional for now. But To not
make every entity that includes <com/sun/star/uno/Any.hxx> depend on
boost_headers, keep this here for now.
@@ -156,8 +156,8 @@ template<> inline detail::Optional<void>::type tryAccess<void>(
css::uno::Any const & any)
{
return any.hasValue()
- ? o3tl::optional<detail::Void const>()
- : o3tl::optional<detail::Void const>(detail::Void());
+ ? std::optional<detail::Void const>()
+ : std::optional<detail::Void const>(detail::Void());
}
template<> inline detail::Optional<bool>::type tryAccess<bool>(
diff --git a/include/o3tl/optional.hxx b/include/o3tl/optional.hxx
deleted file mode 100644
index 524818230e3e..000000000000
--- a/include/o3tl/optional.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-// A wrapper selecting either std::optional or boost::optional as a fallback for Xcode < 10. To be
-// removed once std::optional is available everywhere.
-
-#ifndef INCLUDED_O3TL_OPTIONAL_HXX
-#define INCLUDED_O3TL_OPTIONAL_HXX
-
-#include <sal/config.h>
-
-#if defined __APPLE__ && !__has_include(<optional>)
-
-#include <boost/none.hpp>
-#include <boost/optional.hpp>
-
-namespace o3tl
-{
-using boost::make_optional;
-using boost::optional;
-
-inline auto const nullopt = boost::none;
-}
-
-#else
-
-#include <optional>
-
-namespace o3tl
-{
-using std::make_optional;
-using std::nullopt;
-using std::optional;
-}
-
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 168116b9db84..412b2d049c34 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -169,7 +169,7 @@ inline void setFlag( Type& ornBitField, Type nMask, bool bSet = true )
}
-/** Optional value, similar to ::o3tl::optional<>, with convenience accessors.
+/** Optional value, similar to ::std::optional<>, with convenience accessors.
*/
template< typename Type >
class OptValue
diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx
index 42b769706da0..bb1e66e25ec0 100644
--- a/include/sax/tools/converter.hxx
+++ b/include/sax/tools/converter.hxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <sax/saxdllapi.h>
@@ -196,7 +196,7 @@ public:
css::util::Date * pDate,
css::util::DateTime & rDateTime,
bool & rbDateTime,
- o3tl::optional<sal_Int16> * pTimeZoneOffset,
+ std::optional<sal_Int16> * pTimeZoneOffset,
const OUString & rString );
/** gets the position of the first comma after npos in the string
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 6cc71e319cda..2501e44903bd 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -34,7 +34,7 @@
#include <sfx2/tabdlg.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
namespace com::sun::star::beans { struct PropertyValue; }
@@ -238,7 +238,7 @@ class CustomPropertiesDateField
private:
std::unique_ptr<SvtCalendarBox> m_xDateField;
public:
- ::o3tl::optional<sal_Int16> m_TZ;
+ ::std::optional<sal_Int16> m_TZ;
CustomPropertiesDateField(SvtCalendarBox* pDateField);
void set_visible(bool bVisible);
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 3689b0086b58..c05920f548ac 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -17,7 +17,7 @@
#include <sfx2/viewsh.hxx>
#include <cstddef>
#include <rtl/string.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
struct SFX2_DLLPUBLIC LokMouseEventData
{
@@ -27,7 +27,7 @@ struct SFX2_DLLPUBLIC LokMouseEventData
MouseEventModifiers meModifiers;
int mnButtons;
int mnModifier;
- o3tl::optional<Point> maLogicPosition;
+ std::optional<Point> maLogicPosition;
LokMouseEventData(int nType, Point aPosition, int nCount, MouseEventModifiers eModifiers, int nButtons, int nModifier)
: mnType(nType)
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 66959b8a0d50..b9fa004f7db2 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/ui/XContextChangeEventListener.hpp>
#include <com/sun/star/ui/XSidebar.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
@@ -197,8 +197,8 @@ private:
mbIsDeckRequestedOpen. Normally both flags have the same
value. A document being read-only can prevent the deck from opening.
*/
- ::o3tl::optional<bool> mbIsDeckRequestedOpen;
- ::o3tl::optional<bool> mbIsDeckOpen;
+ ::std::optional<bool> mbIsDeckRequestedOpen;
+ ::std::optional<bool> mbIsDeckOpen;
bool mbFloatingDeckClosed;
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 84a31fb3bb6e..18a0fb47596e 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -140,7 +140,7 @@ public:
virtual OutlinerParaObject* GetOutlinerParaObject() const override;
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
- bool bEdit, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor, OUString& rRet) const override;
+ bool bEdit, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const override;
// #i97878#
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 6e60f20c9b1c..3e4782416e47 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -498,7 +498,7 @@ public:
virtual void NbcReformatText() override;
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
- bool bEdit, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor, OUString& rRet) const;
+ bool bEdit, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 0e1ee7f3dd4f..767d8231862b 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -43,7 +43,7 @@ public:
void setVisualizedPage(const SdrPage* pPage) { if(pPage != mpVisualizedPage) mpVisualizedPage = pPage; }
const SdrPage* getVisualizedPage() const { return mpVisualizedPage; }
- virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor) override;
+ virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor) override;
bool hasEditViewCallbacks() const;
};
diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx
index 683c6f1901e3..4c8f696d2c3c 100644
--- a/include/toolkit/controls/unocontrols.hxx
+++ b/include/toolkit/controls/unocontrols.hxx
@@ -54,7 +54,7 @@
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
namespace com { namespace sun { namespace star { namespace graphic { class XGraphicObject; } } } }
@@ -784,15 +784,15 @@ protected:
private:
void impl_notifyItemListEvent_nolck(
const sal_Int32 i_nItemPosition,
- const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL,
+ const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL,
void ( SAL_CALL css::awt::XItemListListener::*NotificationMethod )( const css::awt::ItemListEvent& )
);
void impl_handleInsert(
const sal_Int32 i_nItemPosition,
- const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL,
+ const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL,
::osl::ClearableMutexGuard& i_rClearBeforeNotify
);
@@ -803,8 +803,8 @@ private:
void impl_handleModify(
const sal_Int32 i_nItemPosition,
- const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL,
+ const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL,
::osl::ClearableMutexGuard& i_rClearBeforeNotify
);
diff --git a/include/unotools/historyoptions.hxx b/include/unotools/historyoptions.hxx
index b723dc9326b7..fd852dde0d24 100644
--- a/include/unotools/historyoptions.hxx
+++ b/include/unotools/historyoptions.hxx
@@ -27,7 +27,7 @@
#include <unotools/options.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
@@ -86,7 +86,7 @@ public:
*/
void AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
- const o3tl::optional<OUString>& sThumbnail);
+ const std::optional<OUString>& sThumbnail);
/** Delete item from the specified list.
*/
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 900838d11b5c..177442cb474b 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -27,7 +27,7 @@
#include <vcl/vclptr.hxx>
#include <vcl/outdev.hxx>
#include <vcl/window.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class CommandEvent;
@@ -109,7 +109,7 @@ private:
sal_uInt16 mnCode;
// Set, if the document relative logic position are available
- o3tl::optional<Point> maLogicPosition;
+ std::optional<Point> maLogicPosition;
public:
explicit MouseEvent();
@@ -127,7 +127,7 @@ public:
maLogicPosition = aLogicPosition;
}
- o3tl::optional<Point> getLogicPosition() const
+ std::optional<Point> getLogicPosition() const
{
return maLogicPosition;
}
diff --git a/include/vcl/fontcapabilities.hxx b/include/vcl/fontcapabilities.hxx
index 539dd2710d0c..9698be7a535e 100644
--- a/include/vcl/fontcapabilities.hxx
+++ b/include/vcl/fontcapabilities.hxx
@@ -10,7 +10,7 @@
#ifndef INCLUDED_VCL_FONTCAPABILITIES_HXX
#define INCLUDED_VCL_FONTCAPABILITIES_HXX
-#include <o3tl/optional.hxx>
+#include <optional>
#include <bitset>
//See OS/2 table, i.e. http://www.microsoft.com/typography/otspec/os2.htm#ur
@@ -193,8 +193,8 @@ namespace vcl
struct FontCapabilities
{
- o3tl::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> oUnicodeRange;
- o3tl::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> oCodePageRange;
+ std::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> oUnicodeRange;
+ std::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> oCodePageRange;
};
}
diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index 5f0b12d41d86..62a4af7fbd94 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -28,7 +28,7 @@
#include <tools/fontenum.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <i18nlangtag/lang.h>
namespace vcl { class Font; }
@@ -81,17 +81,17 @@ struct OutDevState
OutDevState(OutDevState&&);
~OutDevState();
- o3tl::optional<MapMode> mpMapMode;
+ std::optional<MapMode> mpMapMode;
bool mbMapActive;
std::unique_ptr<vcl::Region> mpClipRegion;
- o3tl::optional<Color> mpLineColor;
- o3tl::optional<Color> mpFillColor;
+ std::optional<Color> mpLineColor;
+ std::optional<Color> mpFillColor;
std::unique_ptr<vcl::Font> mpFont;
- o3tl::optional<Color> mpTextColor;
- o3tl::optional<Color> mpTextFillColor;
- o3tl::optional<Color> mpTextLineColor;
- o3tl::optional<Color> mpOverlineColor;
- o3tl::optional<Point> mpRefPoint;
+ std::optional<Color> mpTextColor;
+ std::optional<Color> mpTextFillColor;
+ std::optional<Color> mpTextLineColor;
+ std::optional<Color> mpOverlineColor;
+ std::optional<Point> mpRefPoint;
TextAlign meTextAlign;
RasterOp meRasterOp;
ComplexTextLayoutFlags mnTextLayoutMode;
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index dafae8735682..347c861bc5aa 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -29,7 +29,7 @@
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
class BitmapEx;
class LanguageTag;
@@ -549,7 +549,7 @@ public:
BitmapEx const & GetPersonaFooter() const;
- const o3tl::optional<Color>& GetPersonaMenuBarTextColor() const;
+ const std::optional<Color>& GetPersonaMenuBarTextColor() const;
// global switch to allow EdgeBlenging; currently possible for ValueSet and ListBox
// when activated there using Get/SetEdgeBlending; default is true
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index 39c1633d2054..af2978ce3bdb 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -24,7 +24,7 @@
#include <tools/link.hxx>
#include <vcl/dllapi.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
namespace vcl
@@ -84,9 +84,9 @@ private:
#else
FuncT const m_func;
#endif
- // using o3tl::optional here omits the need that ResultT is default
+ // using std::optional here omits the need that ResultT is default
// constructable:
- ::o3tl::optional<ResultT> m_result;
+ ::std::optional<ResultT> m_result;
};
template <typename FuncT>
diff --git a/include/vcl/treelistentry.hxx b/include/vcl/treelistentry.hxx
index deb733b7bf9a..456a99c3fd67 100644
--- a/include/vcl/treelistentry.hxx
+++ b/include/vcl/treelistentry.hxx
@@ -27,7 +27,7 @@
#include <vcl/treelistentries.hxx>
#include <o3tl/typed_flags_set.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <vector>
#include <memory>
@@ -64,7 +64,7 @@ class VCL_DLLPUBLIC SvTreeListEntry
void* pUserData;
SvTLEntryFlags nEntryFlags;
Color maBackColor;
- o3tl::optional<Color> mxTextColor;
+ std::optional<Color> mxTextColor;
private:
void ClearChildren();
@@ -112,8 +112,8 @@ public:
void SetBackColor( const Color& rColor ) { maBackColor = rColor; }
const Color& GetBackColor() const { return maBackColor; }
- void SetTextColor( o3tl::optional<Color> xColor ) { mxTextColor = xColor; }
- o3tl::optional<Color> const & GetTextColor() const { return mxTextColor; }
+ void SetTextColor( std::optional<Color> xColor ) { mxTextColor = xColor; }
+ std::optional<Color> const & GetTextColor() const { return mxTextColor; }
SvTreeListEntry* GetParent() const { return pParent; }
diff --git a/jvmfwk/inc/elements.hxx b/jvmfwk/inc/elements.hxx
index 89802e9ec200..eeaff7c4b835 100644
--- a/jvmfwk/inc/elements.hxx
+++ b/jvmfwk/inc/elements.hxx
@@ -27,7 +27,7 @@
#include <rtl/ustring.hxx>
#include <rtl/byteseq.hxx>
#include <libxml/parser.h>
-#include <o3tl/optional.hxx>
+#include <optional>
struct JavaInfo;
@@ -159,28 +159,28 @@ private:
If /java/enabled@xsi:nil == true then the value will be uninitialized
after a call to load().
*/
- o3tl::optional<sal_Bool> m_enabled;
+ std::optional<sal_Bool> m_enabled;
/** User configurable option. /java/userClassPath
If /java/userClassPath@xsi:nil == true then the value is uninitialized
after a call to load().
*/
- o3tl::optional< OUString> m_userClassPath;
+ std::optional< OUString> m_userClassPath;
/** User configurable option. /java/javaInfo
If /java/javaInfo@xsi:nil == true then the value is uninitialized
after a call to load.
*/
- o3tl::optional<CNodeJavaInfo> m_javaInfo;
+ std::optional<CNodeJavaInfo> m_javaInfo;
/** User configurable option. /java/vmParameters
If /java/vmParameters@xsi:nil == true then the value is uninitialized
after a call to load.
*/
- o3tl::optional< ::std::vector< OUString> > m_vmParameters;
+ std::optional< ::std::vector< OUString> > m_vmParameters;
/** User configurable option. /java/jreLocations
If /java/jreLocaltions@xsi:nil == true then the value is uninitialized
after a call to load.
*/
- o3tl::optional< ::std::vector< OUString> > m_JRELocations;
+ std::optional< ::std::vector< OUString> > m_JRELocations;
public:
@@ -225,22 +225,22 @@ public:
/** returns the value of the element /java/enabled
*/
- const o3tl::optional<sal_Bool> & getEnabled() const { return m_enabled;}
+ const std::optional<sal_Bool> & getEnabled() const { return m_enabled;}
/** returns the value of the element /java/userClassPath.
*/
- const o3tl::optional< OUString> & getUserClassPath() const { return m_userClassPath;}
+ const std::optional< OUString> & getUserClassPath() const { return m_userClassPath;}
/** returns the value of the element /java/javaInfo.
*/
- const o3tl::optional<CNodeJavaInfo> & getJavaInfo() const { return m_javaInfo;}
+ const std::optional<CNodeJavaInfo> & getJavaInfo() const { return m_javaInfo;}
/** returns the parameters from the element /java/vmParameters/param.
*/
- const o3tl::optional< ::std::vector< OUString> > & getVmParameters() const { return m_vmParameters;}
+ const std::optional< ::std::vector< OUString> > & getVmParameters() const { return m_vmParameters;}
/** returns the parameters from the element /java/jreLocations/location.
*/
- const o3tl::optional< ::std::vector< OUString> > & getJRELocations() const { return m_JRELocations;}
+ const std::optional< ::std::vector< OUString> > & getJRELocations() const { return m_JRELocations;}
};
/** merges the settings for shared, user and installation during construction.
diff --git a/jvmfwk/inc/fwkbase.hxx b/jvmfwk/inc/fwkbase.hxx
index 07ea10a67ad1..a729f6ad52e4 100644
--- a/jvmfwk/inc/fwkbase.hxx
+++ b/jvmfwk/inc/fwkbase.hxx
@@ -21,7 +21,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <rtl/ustring.hxx>
#include "libxmlutil.hxx"
@@ -40,7 +40,7 @@ class VendorSettings
public:
VendorSettings();
- o3tl::optional<VersionInfo> getVersionInformation(const OUString & sVendor) const;
+ std::optional<VersionInfo> getVersionInformation(const OUString & sVendor) const;
};
/* The class offers functions to retrieve verified bootstrap parameters.
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 807a65a3a154..5f7ff045b302 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -34,7 +34,7 @@
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <string.h>
// For backwards compatibility, the nFeatures and nRequirements flag words are
@@ -236,9 +236,9 @@ void NodeJava::load()
CXmlCharPtr sEnabled( xmlNodeListGetString(
docUser, cur->children, 1));
if (xmlStrcmp(sEnabled, reinterpret_cast<xmlChar const *>("true")) == 0)
- m_enabled = o3tl::optional<sal_Bool>(true);
+ m_enabled = std::optional<sal_Bool>(true);
else if (xmlStrcmp(sEnabled, reinterpret_cast<xmlChar const *>("false")) == 0)
- m_enabled = o3tl::optional<sal_Bool>(false);
+ m_enabled = std::optional<sal_Bool>(false);
}
}
else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("userClassPath")) == 0)
@@ -251,7 +251,7 @@ void NodeJava::load()
{
CXmlCharPtr sUser(xmlNodeListGetString(
docUser, cur->children, 1));
- m_userClassPath = o3tl::optional<OUString>(OUString(sUser));
+ m_userClassPath = std::optional<OUString>(OUString(sUser));
}
}
else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("javaInfo")) == 0)
@@ -264,7 +264,7 @@ void NodeJava::load()
if (xmlStrcmp(sNil, reinterpret_cast<xmlChar const *>("false")) == 0)
{
if (! m_javaInfo)
- m_javaInfo = o3tl::optional<CNodeJavaInfo>(CNodeJavaInfo());
+ m_javaInfo = std::optional<CNodeJavaInfo>(CNodeJavaInfo());
m_javaInfo->loadFromNode(docUser, cur);
}
}
@@ -277,7 +277,7 @@ void NodeJava::load()
if (xmlStrcmp(sNil, reinterpret_cast<xmlChar const *>("false")) == 0)
{
if ( ! m_vmParameters)
- m_vmParameters = o3tl::optional<std::vector<OUString> >(
+ m_vmParameters = std::optional<std::vector<OUString> >(
std::vector<OUString> ());
xmlNode * pOpt = cur->children;
@@ -302,7 +302,7 @@ void NodeJava::load()
if (xmlStrcmp(sNil, reinterpret_cast<xmlChar const *>("false")) == 0)
{
if (! m_JRELocations)
- m_JRELocations = o3tl::optional<std::vector<OUString> >(
+ m_JRELocations = std::optional<std::vector<OUString> >(
std::vector<OUString>());
xmlNode * pLoc = cur->children;
@@ -418,7 +418,7 @@ void NodeJava::write() const
reinterpret_cast<xmlChar const *>("nil"),
reinterpret_cast<xmlChar const *>("false"));
- if (m_enabled == o3tl::optional<sal_Bool>(true))
+ if (m_enabled == std::optional<sal_Bool>(true))
xmlNodeSetContent(nodeEnabled,reinterpret_cast<xmlChar const *>("true"));
else
xmlNodeSetContent(nodeEnabled,reinterpret_cast<xmlChar const *>("false"));
@@ -531,19 +531,19 @@ void NodeJava::write() const
void NodeJava::setEnabled(bool bEnabled)
{
- m_enabled = o3tl::optional<sal_Bool>(bEnabled);
+ m_enabled = std::optional<sal_Bool>(bEnabled);
}
void NodeJava::setUserClassPath(const OUString & sClassPath)
{
- m_userClassPath = o3tl::optional<OUString>(sClassPath);
+ m_userClassPath = std::optional<OUString>(sClassPath);
}
void NodeJava::setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect)
{
if (!m_javaInfo)
- m_javaInfo = o3tl::optional<CNodeJavaInfo>(CNodeJavaInfo());
+ m_javaInfo = std::optional<CNodeJavaInfo>(CNodeJavaInfo());
m_javaInfo->bAutoSelect = bAutoSelect;
m_javaInfo->bNil = false;
@@ -571,13 +571,13 @@ void NodeJava::setJavaInfo(const JavaInfo * pInfo, bool bAutoSelect)
void NodeJava::setVmParameters(std::vector<OUString> const & arOptions)
{
- m_vmParameters = o3tl::optional<std::vector<OUString> >(arOptions);
+ m_vmParameters = std::optional<std::vector<OUString> >(arOptions);
}
void NodeJava::addJRELocation(OUString const & sLocation)
{
if (!m_JRELocations)
- m_JRELocations = o3tl::optional<std::vector<OUString> >(
+ m_JRELocations = std::optional<std::vector<OUString> >(
std::vector<OUString> ());
//only add the path if not already present
std::vector<OUString>::const_iterator it =
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index df00365fd4c7..a064b93f80be 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -113,7 +113,7 @@ VendorSettings::VendorSettings():
}
}
-o3tl::optional<VersionInfo> VendorSettings::getVersionInformation(const OUString & sVendor) const
+std::optional<VersionInfo> VendorSettings::getVersionInformation(const OUString & sVendor) const
{
OSL_ASSERT(!sVendor.isEmpty());
OString osVendor = OUStringToOString(sVendor, RTL_TEXTENCODING_UTF8);
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx b/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
index fec03e046dc2..2ebaf0e49aec 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx
@@ -24,7 +24,7 @@
#include "gtv-lok-dialog.hxx"
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace {
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index 43037b5059f5..ff6023d5a74f 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -19,7 +19,7 @@
#include <map>
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/unreachable.hxx>
namespace {
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
index bcee979766f5..359b6ad20833 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
@@ -18,7 +18,7 @@
#include "gtv-lok-dialog.hxx"
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <iostream>
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
index 25f7d7890fdb..f2b76c1a93e3 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx
@@ -20,7 +20,7 @@
#include <memory>
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace {
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
index 1b0233fee66c..dd601375a32c 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
@@ -20,7 +20,7 @@
#include <vector>
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
void btn_clicked(GtkWidget* pButton, gpointer)
{
@@ -89,7 +89,7 @@ void doPaste(GtkWidget* pButton, gpointer /*pItem*/)
g_free(pTargets);
}
- o3tl::optional<GdkAtom> oTarget;
+ std::optional<GdkAtom> oTarget;
std::string aTargetName;
std::vector<std::string> aPreferredNames =
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 8802cb83be4b..28b6bc54d915 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -23,7 +23,7 @@
#include <LibreOfficeKit/LibreOfficeKit.hxx>
#include <boost/property_tree/json_parser.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
using namespace lok;
diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl
index 2280df5848ef..2cabcf330a49 100644
--- a/officecfg/registry/cppheader.xsl
+++ b/officecfg/registry/cppheader.xsl
@@ -78,7 +78,7 @@
<xsl:if test=".//prop or .//set">
<xsl:if
test=".//prop[count(@oor:nillable) = 0 or @oor:nillable = 'true']">
- <xsl:text>#include "o3tl/optional.hxx"&#xA;</xsl:text>
+ <xsl:text>#include &lt;optional&gt;&#xA;</xsl:text>
</xsl:if>
<xsl:if test=".//prop/@oor:type = 'oor:any'">
<xsl:text>#include "com/sun/star/uno/Any.hxx"&#xA;</xsl:text>
@@ -198,7 +198,7 @@
<xsl:value-of select="$name"/>
<xsl:text>, </xsl:text>
<xsl:if test="not(@oor:nillable = 'false')">
- <xsl:text>o3tl::optional&lt;</xsl:text>
+ <xsl:text>std::optional&lt;</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="@oor:type='oor:any'">
diff --git a/oox/inc/drawingml/table/tablestylepart.hxx b/oox/inc/drawingml/table/tablestylepart.hxx
index 056b79b393f1..f79591f35206 100644
--- a/oox/inc/drawingml/table/tablestylepart.hxx
+++ b/oox/inc/drawingml/table/tablestylepart.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
#include <rtl/ustring.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <oox/drawingml/color.hxx>
#include <drawingml/textfont.hxx>
#include <oox/drawingml/shape.hxx>
@@ -40,8 +40,8 @@ public:
TableStylePart();
::oox::drawingml::Color& getTextColor(){ return maTextColor; }
- ::o3tl::optional< bool >& getTextBoldStyle(){ return maTextBoldStyle; }
- ::o3tl::optional< bool >& getTextItalicStyle(){ return maTextItalicStyle; }
+ ::std::optional< bool >& getTextBoldStyle(){ return maTextBoldStyle; }
+ ::std::optional< bool >& getTextItalicStyle(){ return maTextItalicStyle; }
::oox::drawingml::TextFont& getAsianFont(){ return maAsianFont; }
::oox::drawingml::TextFont& getComplexFont(){ return maComplexFont; }
::oox::drawingml::TextFont& getSymbolFont(){ return maSymbolFont; }
@@ -55,8 +55,8 @@ public:
private:
::oox::drawingml::Color maTextColor;
- ::o3tl::optional< bool > maTextBoldStyle;
- ::o3tl::optional< bool > maTextItalicStyle;
+ ::std::optional< bool > maTextBoldStyle;
+ ::std::optional< bool > maTextItalicStyle;
::oox::drawingml::TextFont maAsianFont;
::oox::drawingml::TextFont maComplexFont;
::oox::drawingml::TextFont maSymbolFont;
diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx
index 4c378cf094a0..eddf78a5f97f 100644
--- a/oox/inc/drawingml/textbodyproperties.hxx
+++ b/oox/inc/drawingml/textbodyproperties.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <oox/helper/helper.hxx>
#include <oox/helper/propertymap.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace oox {
namespace drawingml {
@@ -35,11 +35,11 @@ struct TextBodyProperties
OptValue< sal_Int32 > moRotation;
bool mbAnchorCtr;
OptValue< sal_Int32 > moVert;
- o3tl::optional< sal_Int32 > moInsets[4];
- o3tl::optional< sal_Int32 > moTextOffUpper;
- o3tl::optional< sal_Int32 > moTextOffLeft;
- o3tl::optional< sal_Int32 > moTextOffLower;
- o3tl::optional< sal_Int32 > moTextOffRight;
+ std::optional< sal_Int32 > moInsets[4];
+ std::optional< sal_Int32 > moTextOffUpper;
+ std::optional< sal_Int32 > moTextOffLeft;
+ std::optional< sal_Int32 > moTextOffLower;
+ std::optional< sal_Int32 > moTextOffRight;
css::drawing::TextVerticalAdjust meVA;
OUString msPrst;
/// Number of requested columns.
diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx
index 6b9d93ccdf78..ccca29a0750d 100644
--- a/oox/inc/drawingml/textparagraphproperties.hxx
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <drawingml/textfont.hxx>
#include <drawingml/textspacing.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star {
namespace graphic { class XGraphic; }
@@ -90,10 +90,10 @@ public:
TextSpacing& getParaTopMargin() { return maParaTopMargin; }
TextSpacing& getParaBottomMargin() { return maParaBottomMargin; }
- o3tl::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; }
- o3tl::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; }
+ std::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; }
+ std::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; }
- o3tl::optional< css::style::ParagraphAdjust >& getParaAdjust() { return moParaAdjust; }
+ std::optional< css::style::ParagraphAdjust >& getParaAdjust() { return moParaAdjust; }
void setParaAdjust( css::style::ParagraphAdjust nParaAdjust ) { moParaAdjust = nParaAdjust; }
TextSpacing& getLineSpacing() { return maLineSpacing; }
@@ -124,9 +124,9 @@ protected:
BulletList maBulletList;
TextSpacing maParaTopMargin;
TextSpacing maParaBottomMargin;
- o3tl::optional< sal_Int32 > moParaLeftMargin;
- o3tl::optional< sal_Int32 > moFirstLineIndentation;
- o3tl::optional< css::style::ParagraphAdjust > moParaAdjust;
+ std::optional< sal_Int32 > moParaLeftMargin;
+ std::optional< sal_Int32 > moFirstLineIndentation;
+ std::optional< css::style::ParagraphAdjust > moParaAdjust;
sal_Int16 mnLevel;
TextSpacing maLineSpacing;
};
diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx
index db3a2b78ff43..637a6b7b560f 100644
--- a/oox/inc/pch/precompiled_oox.hxx
+++ b/oox/inc/pch/precompiled_oox.hxx
@@ -171,7 +171,7 @@
#include <filter/msfilter/msfilterdllapi.h>
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <sax/fshelper.hxx>
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d055513686bd..0cf633369959 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1167,7 +1167,7 @@ Reference< XShape > const & Shape::createAndInsert(
xPropertySet->setPropertyValue(aGrabBagPropName, uno::makeAny(aGrabBag));
}
// TextFrames have ShadowFormat, not individual shadow properties.
- o3tl::optional<sal_Int32> oShadowDistance;
+ std::optional<sal_Int32> oShadowDistance;
if (aShapeProps.hasProperty(PROP_ShadowXDistance))
{
oShadowDistance = aShapeProps.getProperty(PROP_ShadowXDistance).get<sal_Int32>();
@@ -1178,7 +1178,7 @@ Reference< XShape > const & Shape::createAndInsert(
// There is a single 'dist' attribute, so no need to count the avg of x and y.
aShapeProps.erase(PROP_ShadowYDistance);
}
- o3tl::optional<sal_Int32> oShadowColor;
+ std::optional<sal_Int32> oShadowColor;
if (aShapeProps.hasProperty(PROP_ShadowColor))
{
oShadowColor = aShapeProps.getProperty(PROP_ShadowColor).get<sal_Int32>();
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index 1af30b047267..bb708b0d5395 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -412,8 +412,8 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
if ( maParaBottomMargin.bHasValue || bPushDefaultValues )
aPropSet.setProperty( PROP_ParaBottomMargin, maParaBottomMargin.toMargin( fCharacterSize != 0.0 ? fCharacterSize : getCharHeightPoints ( 12.0 ) ) );
- o3tl::optional< sal_Int32 > noParaLeftMargin( moParaLeftMargin );
- o3tl::optional< sal_Int32 > noFirstLineIndentation( moFirstLineIndentation );
+ std::optional< sal_Int32 > noParaLeftMargin( moParaLeftMargin );
+ std::optional< sal_Int32 > noFirstLineIndentation( moFirstLineIndentation );
if ( nNumberingType != NumberingType::NUMBER_NONE )
{
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index e59a2babb392..f4b8ec5e62a6 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -91,7 +91,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
if ( rAttribs.hasAttribute( XML_indent ) )
{
sValue = rAttribs.getString( XML_indent ).get();
- mrTextParagraphProperties.getFirstLineIndentation() = o3tl::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
+ mrTextParagraphProperties.getFirstLineIndentation() = std::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
}
// ST_TextIndentLevelType
@@ -114,7 +114,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
if ( rAttribs.hasAttribute( XML_marL ) )
{
sValue = rAttribs.getString( XML_marL ).get();
- mrTextParagraphProperties.getParaLeftMargin() = o3tl::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
+ mrTextParagraphProperties.getParaLeftMargin() = std::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) );
}
// ParaRightMargin
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 28c0a1f7cafc..f78c38ff91e9 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -25,7 +25,7 @@
#include <oox/token/tokens.hxx>
#include <oox/drawingml/shape.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
using namespace com::sun::star;
@@ -100,7 +100,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
{
// Handle inset attributes for Writer textframes.
sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns };
- o3tl::optional<sal_Int32> oInsets[4];
+ std::optional<sal_Int32> oInsets[4];
for (std::size_t i = 0; i < SAL_N_ELEMENTS(aInsets); ++i)
{
OptValue<OUString> oValue = rAttribs.getString(aInsets[i]);
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 70b673258dc6..c28f9c44ca5d 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -20,7 +20,7 @@
#include <algorithm>
#include <cassert>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <oox/vml/vmlshape.hxx>
@@ -526,7 +526,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
aPropMap.erase(PROP_FillTransparence);
}
// And no LineColor property; individual borders can have colors and widths
- o3tl::optional<sal_Int32> oLineWidth;
+ std::optional<sal_Int32> oLineWidth;
if (maTypeModel.maStrokeModel.moWeight.has())
oLineWidth = ConversionHelper::decodeMeasureToHmm(
rGraphicHelper, maTypeModel.maStrokeModel.moWeight.get(), 0, false, false);
@@ -660,7 +660,7 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType
Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
{
awt::Rectangle aShapeRect(rShapeRect);
- o3tl::optional<sal_Int32> oRotation;
+ std::optional<sal_Int32> oRotation;
bool bFlipX = false, bFlipY = false;
if (!maTypeModel.maRotation.isEmpty())
oRotation = ConversionHelper::decodeRotation(maTypeModel.maRotation);
diff --git a/pch/inc/pch/precompiled_system.hxx b/pch/inc/pch/precompiled_system.hxx
index 93268fcd82a7..0f9afc9f9b0a 100644
--- a/pch/inc/pch/precompiled_system.hxx
+++ b/pch/inc/pch/precompiled_system.hxx
@@ -33,7 +33,7 @@
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/operators.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <boost/property_tree/json_parser.hpp>
#include <boost/rational.hpp>
#include <boost/version.hpp>
diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx
index 2c5d455f4136..2daa9192d1c7 100644
--- a/reportdesign/inc/pch/precompiled_rpt.hxx
+++ b/reportdesign/inc/pch/precompiled_rpt.hxx
@@ -245,7 +245,7 @@
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.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/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx
index 1cb01665f7f4..e5f49237d2de 100644
--- a/reportdesign/inc/pch/precompiled_rptui.hxx
+++ b/reportdesign/inc/pch/precompiled_rptui.hxx
@@ -339,7 +339,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/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 42fb660bbcdf..9c19ef5d0b7d 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/Duration.hpp>
#include <com/sun/star/util/Time.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
@@ -1595,7 +1595,7 @@ static bool lcl_parseDate(
static bool lcl_parseDateTime(
util::Date *const pDate, util::DateTime & rDateTime,
bool & rbDateTime,
- o3tl::optional<sal_Int16> *const pTimeZoneOffset,
+ std::optional<sal_Int16> *const pTimeZoneOffset,
const OUString & rString,
bool const bIgnoreInvalidOrMissingDate)
{
@@ -1831,7 +1831,7 @@ bool Converter::parseTimeOrDateTime(
bool Converter::parseDateOrDateTime(
util::Date *const pDate, util::DateTime & rDateTime,
bool & rbDateTime,
- o3tl::optional<sal_Int16> *const pTimeZoneOffset,
+ std::optional<sal_Int16> *const pTimeZoneOffset,
const OUString & rString )
{
return lcl_parseDateTime(
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index fc15a982acd1..21e846e69829 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -32,7 +32,7 @@
#include <tools/link.hxx>
#include <tools/solar.h>
#include <unotools/options.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include "global.hxx"
#include "bigrange.hxx"
#include "scdllapi.h"
@@ -849,7 +849,7 @@ class SAL_DLLPUBLIC_RTTI ScChangeTrack : public utl::ConfigurationListener
ScChangeActionLinkEntry* pLinkInsertRow;
ScChangeActionLinkEntry* pLinkInsertTab;
ScChangeActionLinkEntry* pLinkMove;
- o3tl::optional<ScChangeTrackMsgInfo> xBlockModifyMsg;
+ std::optional<ScChangeTrackMsgInfo> xBlockModifyMsg;
ScDocument* pDoc;
sal_uLong nActionMax;
sal_uLong nGeneratedMin;
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index dea9de5c6d72..6a6253d75d1e 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -268,7 +268,7 @@ public:
virtual void SetParent(ScConditionalFormat* pParent) override;
- o3tl::optional<Color> GetColor(const ScAddress& rAddr) const;
+ std::optional<Color> GetColor(const ScAddress& rAddr) const;
void AddEntry(ScColorScaleEntry* pEntry);
virtual void UpdateReference( sc::RefUpdateContext& rCxt ) override;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 4ddb17c5573a..dce4563d0c90 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -37,7 +37,7 @@
#include <tools/date.hxx>
#include <tools/link.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <map>
#include <memory>
#include <set>
@@ -216,7 +216,7 @@ struct ScCondFormatData
ScCondFormatData(ScCondFormatData&&);
~ScCondFormatData();
- o3tl::optional<Color> mxColorScale;
+ std::optional<Color> mxColorScale;
std::unique_ptr<ScDataBarInfo> pDataBar;
std::unique_ptr<ScIconSetInfo> pIconSet;
OUString aStyleName;
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index e7c9d0b8462c..f8aa2d100b23 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -32,7 +32,7 @@
#include <unordered_map>
#include <unordered_set>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star { namespace sheet {
class XDimensionsSupplier;
@@ -52,7 +52,7 @@ class ScDPSaveMember
{
private:
OUString aName;
- o3tl::optional<OUString> mpLayoutName; // custom name to be displayed in the table.
+ std::optional<OUString> mpLayoutName; // custom name to be displayed in the table.
sal_uInt16 nVisibleMode;
sal_uInt16 nShowDetailsMode;
@@ -79,7 +79,7 @@ public:
void SetName( const OUString& rNew ); // used if the source member was renamed (groups)
SC_DLLPUBLIC void SetLayoutName( const OUString& rName );
- SC_DLLPUBLIC const o3tl::optional<OUString> & GetLayoutName() const;
+ SC_DLLPUBLIC const std::optional<OUString> & GetLayoutName() const;
void RemoveLayoutName();
void WriteToSource( const css::uno::Reference<css::uno::XInterface>& xMember,
@@ -94,8 +94,8 @@ class SC_DLLPUBLIC ScDPSaveDimension
{
private:
OUString aName;
- o3tl::optional<OUString> mpLayoutName;
- o3tl::optional<OUString> mpSubtotalName;
+ std::optional<OUString> mpLayoutName;
+ std::optional<OUString> mpSubtotalName;
bool bIsDataLayout;
bool bDupFlag;
css::sheet::DataPilotFieldOrientation nOrientation;
@@ -170,10 +170,10 @@ public:
{ return nUsedHierarchy; }
void SetLayoutName(const OUString& rName);
- const o3tl::optional<OUString> & GetLayoutName() const;
+ const std::optional<OUString> & GetLayoutName() const;
void RemoveLayoutName();
void SetSubtotalName(const OUString& rName);
- const o3tl::optional<OUString> & GetSubtotalName() const;
+ const std::optional<OUString> & GetSubtotalName() const;
void RemoveSubtotalName();
bool IsMemberNameInUse(const OUString& rName) const;
@@ -252,7 +252,7 @@ private:
* created. */
bool mbDimensionMembersBuilt;
- o3tl::optional<OUString> mpGrandTotalName;
+ std::optional<OUString> mpGrandTotalName;
mutable std::unique_ptr<DimOrderType> mpDimOrder; // dimension order for row and column dimensions, to traverse result tree.
public:
@@ -265,7 +265,7 @@ public:
bool operator== ( const ScDPSaveData& r ) const;
SC_DLLPUBLIC void SetGrandTotalName(const OUString& rName);
- SC_DLLPUBLIC const o3tl::optional<OUString> & GetGrandTotalName() const;
+ SC_DLLPUBLIC const std::optional<OUString> & GetGrandTotalName() const;
const DimsType& GetDimensions() const { return m_DimList; }
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index a6ddf33e5c12..d0f23365fdc6 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -48,7 +48,7 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace com { namespace sun { namespace star {
namespace sheet {
@@ -109,7 +109,7 @@ private:
bool bResultOverflow;
bool bPageFiltered; // set if page field filters have been applied to cache table
- o3tl::optional<OUString> mpGrandTotalName;
+ std::optional<OUString> mpGrandTotalName;
void CreateRes_Impl();
void FillMemberResults();
@@ -144,7 +144,7 @@ public:
ScDPTableData* GetData() { return pData; }
const ScDPTableData* GetData() const { return pData; }
- const o3tl::optional<OUString> &
+ const std::optional<OUString> &
GetGrandTotalName() const;
css::sheet::DataPilotFieldOrientation
@@ -268,8 +268,8 @@ class ScDPDimension : public cppu::WeakImplHelper<
rtl::Reference<ScDPHierarchies> mxHierarchies;
ScGeneralFunction nFunction;
OUString aName; // if empty, take from source
- o3tl::optional<OUString> mpLayoutName;
- o3tl::optional<OUString> mpSubtotalName;
+ std::optional<OUString> mpLayoutName;
+ std::optional<OUString> mpSubtotalName;
long nSourceDim; // >=0 if dup'ed
css::sheet::DataPilotFieldReference
aReferenceValue; // settings for "show data as" / "displayed value"
@@ -291,8 +291,8 @@ public:
ScDPDimension* CreateCloneObject();
ScDPHierarchies* GetHierarchiesObject();
- const o3tl::optional<OUString> & GetLayoutName() const;
- const o3tl::optional<OUString> & GetSubtotalName() const;
+ const std::optional<OUString> & GetLayoutName() const;
+ const std::optional<OUString> & GetSubtotalName() const;
// XNamed
virtual OUString SAL_CALL getName() override;
@@ -604,7 +604,7 @@ private:
long const nLev;
SCROW const mnDataId;
- o3tl::optional<OUString> mpLayoutName;
+ std::optional<OUString> mpLayoutName;
sal_Int32 nPosition; // manual sorting
bool bVisible;
@@ -622,7 +622,7 @@ public:
SCROW GetItemDataId() const { return mnDataId; }
bool IsNamedItem(SCROW nIndex) const;
- const o3tl::optional<OUString> & GetLayoutName() const;
+ const std::optional<OUString> & GetLayoutName() const;
long GetDim() const { return nDim;}
sal_Int32 Compare( const ScDPMember& rOther ) const; // visible order
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index f523ee646e8e..101d5740ca73 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -74,7 +74,7 @@ public:
static std::unique_ptr<EditTextObject> Clone( const EditTextObject& rSrc, ScDocument& rDestDoc );
static OUString GetCellFieldValue(
- const SvxFieldData& rFieldData, const ScDocument* pDoc, o3tl::optional<Color>* ppTextColor );
+ const SvxFieldData& rFieldData, const ScDocument* pDoc, std::optional<Color>* ppTextColor );
public:
ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ,
@@ -186,7 +186,7 @@ public:
void SetExecuteURL(bool bSet) { bExecuteURL = bSet; }
virtual void FieldClicked( const SvxFieldItem& rField ) 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;
};
// 1/100 mm
@@ -223,7 +223,7 @@ private:
public:
ScHeaderEditEngine( SfxItemPool* pEnginePool );
- 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;
void SetNumType(SvxNumType eNew) { aData.eNumType = eNew; }
void SetData(const ScHeaderFieldData& rNew) { aData = rNew; }
diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index d15537c33607..1b945991bd23 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -28,7 +28,7 @@
#include "colorscale.hxx"
#include "cellvalue.hxx"
#include <o3tl/typed_flags_set.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class SfxItemSet;
class SvxBrushItem;
@@ -134,7 +134,7 @@ struct CellInfo
const ScPatternAttr* pPatternAttr;
const SfxItemSet* pConditionSet;
- o3tl::optional<Color> mxColorScale;
+ std::optional<Color> mxColorScale;
std::unique_ptr<const ScDataBarInfo> pDataBar;
std::unique_ptr<const ScIconSetInfo> pIconSet;
diff --git a/sc/inc/fonthelper.hxx b/sc/inc/fonthelper.hxx
index 0f94b41400cc..ae4a778570a9 100644
--- a/sc/inc/fonthelper.hxx
+++ b/sc/inc/fonthelper.hxx
@@ -10,7 +10,7 @@
#pragma once
#include "scdllapi.h"
-#include <o3tl/optional.hxx>
+#include <optional>
#include <tools/fontenum.hxx>
#include <tools/color.hxx>
#include <vcl/fntstyle.hxx>
@@ -20,20 +20,20 @@ class SvxFontItem;
struct SC_DLLPUBLIC ScDxfFont
{
- o3tl::optional<const SvxFontItem*> pFontAttr;
- o3tl::optional<sal_uInt32> nFontHeight;
- o3tl::optional<FontWeight> eWeight;
- o3tl::optional<FontItalic> eItalic;
- o3tl::optional<FontLineStyle> eUnder;
- o3tl::optional<FontLineStyle> eOver;
- o3tl::optional<bool> bWordLine;
- o3tl::optional<FontStrikeout> eStrike;
- o3tl::optional<bool> bOutline;
- o3tl::optional<bool> bShadow;
- o3tl::optional<FontEmphasisMark> eEmphasis;
- o3tl::optional<FontRelief> eRelief;
- o3tl::optional<Color> aColor;
- o3tl::optional<LanguageType> eLang;
+ std::optional<const SvxFontItem*> pFontAttr;
+ std::optional<sal_uInt32> nFontHeight;
+ std::optional<FontWeight> eWeight;
+ std::optional<FontItalic> eItalic;
+ std::optional<FontLineStyle> eUnder;
+ std::optional<FontLineStyle> eOver;
+ std::optional<bool> bWordLine;
+ std::optional<FontStrikeout> eStrike;
+ std::optional<bool> bOutline;
+ std::optional<bool> bShadow;
+ std::optional<FontEmphasisMark> eEmphasis;
+ std::optional<FontRelief> eRelief;
+ std::optional<Color> aColor;
+ std::optional<LanguageType> eLang;
bool isEmpty() const
{
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index 10d57b221a50..4e8d62777258 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -27,7 +27,7 @@
#include <formula/IFunctionDescription.hxx>
#include <sal/types.h>
#include <rtl/ustring.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <map>
#include <memory>
@@ -207,8 +207,8 @@ public:
ParameterFlags() : bOptional(false) {}
};
- o3tl::optional<OUString> mxFuncName; /**< Function name */
- o3tl::optional<OUString> mxFuncDesc; /**< Description of function */
+ std::optional<OUString> mxFuncName; /**< Function name */
+ std::optional<OUString> mxFuncDesc; /**< Description of function */
std::vector<OUString> maDefArgNames; /**< Parameter name(s) */
std::vector<OUString> maDefArgDescs; /**< Description(s) of parameter(s) */
ParameterFlags *pDefArgFlags; /**< Flags for each parameter */
diff --git a/sc/inc/paramisc.hxx b/sc/inc/paramisc.hxx
index 992c4fcc2bca..7548212dfb72 100644
--- a/sc/inc/paramisc.hxx
+++ b/sc/inc/paramisc.hxx
@@ -21,13 +21,13 @@
#define INCLUDED_SC_INC_PARAMISC_HXX
#include "address.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
struct ScSolveParam
{
ScAddress aRefFormulaCell;
ScAddress aRefVariableCell;
- o3tl::optional<OUString> pStrTargetVal;
+ std::optional<OUString> pStrTargetVal;
ScSolveParam();
ScSolveParam( const ScSolveParam& r );
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index d5f170db4a4a..1c21460f0351 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -51,8 +51,8 @@ enum ScAutoFontColorMode
class SC_DLLPUBLIC ScPatternAttr final : public SfxSetItem
{
- o3tl::optional<OUString> pName;
- mutable o3tl::optional<size_t> mxHashCode;
+ std::optional<OUString> pName;
+ mutable std::optional<size_t> mxHashCode;
ScStyleSheet* pStyle;
sal_uInt64 mnKey;
public:
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index a9d7b47a3666..0fd221f2f845 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -329,7 +329,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/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx
index 533fb42377ef..c22daa46f180 100644
--- a/sc/inc/pch/precompiled_scfilt.hxx
+++ b/sc/inc/pch/precompiled_scfilt.hxx
@@ -179,7 +179,7 @@
#include <filter/msfilter/msocximex.hxx>
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
diff --git a/sc/inc/sheetevents.hxx b/sc/inc/sheetevents.hxx
index fb9d5dfcdd66..2c789417a411 100644
--- a/sc/inc/sheetevents.hxx
+++ b/sc/inc/sheetevents.hxx
@@ -23,7 +23,7 @@
#include <rtl/ustring.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
enum class ScSheetEventId {
FOCUS, UNFOCUS, SELECT, DOUBLECLICK, RIGHTCLICK, CHANGE, CALCULATE, COUNT,
@@ -32,7 +32,7 @@ enum class ScSheetEventId {
class ScSheetEvents
{
- std::unique_ptr<o3tl::optional<OUString>[]> mpScriptNames;
+ std::unique_ptr<std::optional<OUString>[]> mpScriptNames;
void Clear();
diff --git a/sc/qa/unit/pivottable_filters_test.cxx b/sc/qa/unit/pivottable_filters_test.cxx
index 1c7d57a6c6de..5e4efe06a447 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -2432,7 +2432,7 @@ void ScPivotTableFiltersTest::testTdf112106()
// Check that we have an existing data layout dimension
const ScDPSaveDimension* pDim = pSaveData->GetExistingDataLayoutDimension();
CPPUNIT_ASSERT(pDim);
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
CPPUNIT_ASSERT(pLayoutName);
CPPUNIT_ASSERT_EQUAL(ScResId(STR_PIVOT_DATA), (*pLayoutName));
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 2da00e1f03d6..2fc667a17b74 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -585,17 +585,17 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, const ScColorScal
return (*itr)->GetValue();
}
-o3tl::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
+std::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
{
ScRefCellValue rCell(*mpDoc, rAddr);
if(!rCell.hasNumeric())
- return o3tl::optional<Color>();
+ return std::optional<Color>();
// now we have for sure a value
double nVal = rCell.getValue();
if (maColorScales.size() < 2)
- return o3tl::optional<Color>();
+ return std::optional<Color>();
double nMin = std::numeric_limits<double>::max();
double nMax = std::numeric_limits<double>::min();
@@ -603,7 +603,7 @@ o3tl::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) con
// this check is for safety
if(nMin >= nMax)
- return o3tl::optional<Color>();
+ return std::optional<Color>();
ScColorScaleEntries::const_iterator itr = begin();
double nValMin = CalcValue(nMin, nMax, itr);
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 2cd0e6f0ef56..b85365146816 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1315,7 +1315,7 @@ public:
bool operator() (const ScDPSaveDimension* pDim) const
{
// Layout name takes precedence.
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName && ScGlobal::pCharClass->uppercase(*pLayoutName) == maName)
return true;
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 109e9da01767..0f0d687bd762 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -120,7 +120,7 @@ void ScDPSaveMember::SetLayoutName( const OUString& rName )
mpLayoutName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveMember::GetLayoutName() const
+const std::optional<OUString> & ScDPSaveMember::GetLayoutName() const
{
return mpLayoutName;
}
@@ -355,7 +355,7 @@ void ScDPSaveDimension::SetSubtotalName(const OUString& rName)
mpSubtotalName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveDimension::GetSubtotalName() const
+const std::optional<OUString> & ScDPSaveDimension::GetSubtotalName() const
{
return mpSubtotalName;
}
@@ -371,7 +371,7 @@ bool ScDPSaveDimension::IsMemberNameInUse(const OUString& rName) const
if (rName.equalsIgnoreAsciiCase(pMem->GetName()))
return true;
- const o3tl::optional<OUString> & pLayoutName = pMem->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMem->GetLayoutName();
return pLayoutName && rName.equalsIgnoreAsciiCase(*pLayoutName);
});
}
@@ -381,7 +381,7 @@ void ScDPSaveDimension::SetLayoutName(const OUString& rName)
mpLayoutName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveDimension::GetLayoutName() const
+const std::optional<OUString> & ScDPSaveDimension::GetLayoutName() const
{
return mpLayoutName;
}
@@ -502,7 +502,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
if (mpLayoutName)
ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName);
- const o3tl::optional<OUString> & pSubTotalName = GetSubtotalName();
+ const std::optional<OUString> & pSubTotalName = GetSubtotalName();
if (pSubTotalName)
// Custom subtotal name, with '?' being replaced by the visible field name later.
ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_FIELD_SUBTOTALNAME, *pSubTotalName);
@@ -768,7 +768,7 @@ void ScDPSaveData::SetGrandTotalName(const OUString& rName)
mpGrandTotalName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveData::GetGrandTotalName() const
+const std::optional<OUString> & ScDPSaveData::GetGrandTotalName() const
{
return mpGrandTotalName;
}
@@ -1054,7 +1054,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
// no error
}
- const o3tl::optional<OUString> & pGrandTotalName = GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = GetGrandTotalName();
if (pGrandTotalName)
ScUnoHelpFunctions::SetOptionalPropertyValue(xSourceProp, SC_UNO_DP_GRANDTOTAL_NAME, *pGrandTotalName);
}
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index db117a13f638..6e14356ea7b1 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -858,7 +858,7 @@ OUString ScDPResultData::GetMeasureString(long nMeasure, bool bForce, ScSubTotal
const ScDPDimension* pDataDim = mrSource.GetDataDimension(nMeasure);
if (pDataDim)
{
- const o3tl::optional<OUString> & pLayoutName = pDataDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDataDim->GetLayoutName();
if (pLayoutName)
return *pLayoutName;
}
@@ -1380,7 +1380,7 @@ void ScDPResultMember::FillMemberResults(
const ScDPMember* pMemberDesc = GetDPMember();
if (pMemberDesc)
{
- const o3tl::optional<OUString> & pLayoutName = pMemberDesc->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMemberDesc->GetLayoutName();
if (pLayoutName)
{
aCaption = *pLayoutName;
@@ -1482,7 +1482,7 @@ void ScDPResultMember::FillMemberResults(
if (pMemberDesc)
{
// single data field layout.
- const o3tl::optional<OUString> & pSubtotalName = pParentDim->GetSubtotalName();
+ const std::optional<OUString> & pSubtotalName = pParentDim->GetSubtotalName();
if (pSubtotalName)
aSubStr = lcl_parseSubtotalName(*pSubtotalName, aCaption);
pArray[rPos].Flags &= ~sheet::MemberResultFlags::GRANDTOTAL;
@@ -1490,7 +1490,7 @@ void ScDPResultMember::FillMemberResults(
else
{
// root member - subtotal (grand total?) for multi-data field layout.
- const o3tl::optional<OUString> & pGrandTotalName = pResultData->GetSource().GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = pResultData->GetSource().GetGrandTotalName();
if (pGrandTotalName)
aSubStr = *pGrandTotalName;
pArray[rPos].Flags |= sheet::MemberResultFlags::GRANDTOTAL;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index bfc89049a708..1e674cc6e972 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -111,7 +111,7 @@ ScDPSource::~ScDPSource()
pResData.reset();
}
-const o3tl::optional<OUString> & ScDPSource::GetGrandTotalName() const
+const std::optional<OUString> & ScDPSource::GetGrandTotalName() const
{
return mpGrandTotalName;
}
@@ -1289,12 +1289,12 @@ ScDPHierarchies* ScDPDimension::GetHierarchiesObject()
return mxHierarchies.get();
}
-const o3tl::optional<OUString> & ScDPDimension::GetLayoutName() const
+const std::optional<OUString> & ScDPDimension::GetLayoutName() const
{
return mpLayoutName;
}
-const o3tl::optional<OUString> & ScDPDimension::GetSubtotalName() const
+const std::optional<OUString> & ScDPDimension::GetSubtotalName() const
{
return mpSubtotalName;
}
@@ -2152,7 +2152,7 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const OUString& aPropertyName )
if (!pDim)
return aRet;
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (!pLayoutName)
return aRet;
@@ -2512,7 +2512,7 @@ ScDPItemData ScDPMember::FillItemData() const
return (pData ? *pData : ScDPItemData());
}
-const o3tl::optional<OUString> & ScDPMember::GetLayoutName() const
+const std::optional<OUString> & ScDPMember::GetLayoutName() const
{
return mpLayoutName;
}
diff --git a/sc/source/core/data/sheetevents.cxx b/sc/source/core/data/sheetevents.cxx
index d3ebc7a48719..2ffeff608143 100644
--- a/sc/source/core/data/sheetevents.cxx
+++ b/sc/source/core/data/sheetevents.cxx
@@ -19,7 +19,7 @@
#include <sheetevents.hxx>
#include <com/sun/star/script/vba/VBAEventId.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
OUString ScSheetEvents::GetEventName(ScSheetEventId nEvent)
{
@@ -88,7 +88,7 @@ ScSheetEvents& ScSheetEvents::operator=(const ScSheetEvents& rOther)
Clear();
if (rOther.mpScriptNames)
{
- mpScriptNames.reset( new o3tl::optional<OUString>[COUNT] );
+ mpScriptNames.reset( new std::optional<OUString>[COUNT] );
for (sal_Int32 nEvent=0; nEvent<COUNT; ++nEvent)
mpScriptNames[nEvent] = rOther.mpScriptNames[nEvent];
}
@@ -100,7 +100,7 @@ const OUString* ScSheetEvents::GetScript(ScSheetEventId nEvent) const
{
if (mpScriptNames)
{
- o3tl::optional<OUString> const & r = mpScriptNames[static_cast<int>(nEvent)];
+ std::optional<OUString> const & r = mpScriptNames[static_cast<int>(nEvent)];
if (r)
return &*r;
}
@@ -112,7 +112,7 @@ void ScSheetEvents::SetScript(ScSheetEventId eEvent, const OUString* pNew)
int nEvent = static_cast<int>(eEvent);
if (!mpScriptNames)
{
- mpScriptNames.reset( new o3tl::optional<OUString>[COUNT] );
+ mpScriptNames.reset( new std::optional<OUString>[COUNT] );
}
if (pNew)
mpScriptNames[nEvent] = *pNew;
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 3e0689410adc..4e64fd8cc08a 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -195,7 +195,7 @@ std::unique_ptr<EditTextObject> ScEditUtil::Clone( const EditTextObject& rObj, S
}
OUString ScEditUtil::GetCellFieldValue(
- const SvxFieldData& rFieldData, const ScDocument* pDoc, o3tl::optional<Color>* ppTextColor )
+ const SvxFieldData& rFieldData, const ScDocument* pDoc, std::optional<Color>* ppTextColor )
{
OUString aRet;
switch (rFieldData.GetClassId())
@@ -796,7 +796,7 @@ ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP )
OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- o3tl::optional<Color>& /* rTxtColor */, o3tl::optional<Color>& /* rFldColor */ )
+ std::optional<Color>& /* rTxtColor */, std::optional<Color>& /* rFldColor */ )
{
const SvxFieldData* pFieldData = rField.GetField();
if (!pFieldData)
@@ -860,7 +860,7 @@ ScFieldEditEngine::ScFieldEditEngine(
OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& /* rFldColor */ )
+ std::optional<Color>& rTxtColor, std::optional<Color>& /* rFldColor */ )
{
const SvxFieldData* pFieldData = rField.GetField();
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 33d0a8aa2200..30c973abda8e 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -922,7 +922,7 @@ void XclExpPTItem::SetPropertiesFromMember( const ScDPSaveMember& rSaveMem )
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDEDETAIL, rSaveMem.HasShowDetails() && !rSaveMem.GetShowDetails() );
// visible name
- const o3tl::optional<OUString> & pVisName = rSaveMem.GetLayoutName();
+ const std::optional<OUString> & pVisName = rSaveMem.GetLayoutName();
if (pVisName && *pVisName != GetItemName())
maItemInfo.SetVisName(*pVisName);
}
@@ -1005,11 +1005,11 @@ void XclExpPTField::SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
::set_flag( maFieldExtInfo.mnFlags, EXC_SXVDEX_SHOWALL, rSaveDim.HasShowEmpty() && rSaveDim.GetShowEmpty() );
// visible name
- const o3tl::optional<OUString> & pLayoutName = rSaveDim.GetLayoutName();
+ const std::optional<OUString> & pLayoutName = rSaveDim.GetLayoutName();
if (pLayoutName && *pLayoutName != GetFieldName())
maFieldInfo.SetVisName(*pLayoutName);
- const o3tl::optional<OUString> & pSubtotalName = rSaveDim.GetSubtotalName();
+ const std::optional<OUString> & pSubtotalName = rSaveDim.GetSubtotalName();
if (pSubtotalName)
{
OUString aSubName = lcl_convertCalcSubtotalName(*pSubtotalName);
@@ -1076,7 +1076,7 @@ void XclExpPTField::SetDataPropertiesFromDim( const ScDPSaveDimension& rSaveDim
rDataInfo.SetApiAggFunc( eFunc );
// visible name
- const o3tl::optional<OUString> & pVisName = rSaveDim.GetLayoutName();
+ const std::optional<OUString> & pVisName = rSaveDim.GetLayoutName();
if (pVisName)
rDataInfo.SetVisName(*pVisName);
else
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 8bb77f5eb1a0..91958bbf82a4 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -1121,7 +1121,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
long nDimIdx = rDataField.mnPos;
assert(aCachedDims[nDimIdx]); // the loop above should have screened for NULL's.
const ScDPSaveDimension& rDim = *rDataField.mpDim;
- o3tl::optional<OUString> pName = rDim.GetLayoutName();
+ std::optional<OUString> pName = rDim.GetLayoutName();
// tdf#124651: despite being optional in CT_DataField according to ECMA-376 Part 1,
// Excel (at least 2016) seems to insist on the presence of "name" attribute in
// dataField element.
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index c2d07ffa3dd7..d0f9df3d4fe1 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -994,7 +994,7 @@ void XclPTViewEx9Info::Init( const ScDPObject& rDPObj )
const ScDPSaveData* pData = rDPObj.GetSaveData();
if (pData)
{
- const o3tl::optional<OUString> & pGrandTotal = pData->GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotal = pData->GetGrandTotalName();
if (pGrandTotal)
maGrandTotalName = *pGrandTotal;
}
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index a1ccfb6e4ded..8e4a1dd6d63d 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2058,7 +2058,7 @@ void ScHTMLTable::DataOn( const HtmlImportInfo& rInfo )
{
// read needed options from the <td> tag
ScHTMLSize aSpanSize( 1, 1 );
- o3tl::optional<OUString> pValStr, pNumStr;
+ std::optional<OUString> pValStr, pNumStr;
const HTMLOptions& rOptions = static_cast<HTMLParser*>(rInfo.pParser)->GetOptions();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
for (const auto& rOption : rOptions)
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index 90fe0960a810..dbd0cbd56137 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -24,7 +24,7 @@
#include <vcl/graph.hxx>
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <address.hxx>
#include <memory>
#include <vector>
@@ -52,11 +52,11 @@ struct ScEEParseEntry
{
SfxItemSet aItemSet;
ESelection aSel; // Selection in EditEngine
- o3tl::optional<OUString>
+ std::optional<OUString>
pValStr; // HTML possibly SDVAL string
- o3tl::optional<OUString>
+ std::optional<OUString>
pNumStr; // HTML possibly SDNUM string
- o3tl::optional<OUString>
+ std::optional<OUString>
pName; // HTML possibly anchor/RangeName
OUString aAltText; // HTML IMG ALT Text
std::vector< std::unique_ptr<ScHTMLImage> > maImageList; // graphics in this cell
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 8fa9a5c56522..4483b645a643 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -22,7 +22,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
// Code in fontbuff.cxx (excel)
@@ -31,7 +31,7 @@ class LotusFontBuffer
private:
struct ENTRY
{
- o3tl::optional<OUString> xTmpName;
+ std::optional<OUString> xTmpName;
std::unique_ptr<SvxFontItem> pFont;
std::unique_ptr<SvxFontHeightItem> pHeight;
sal_Int32 nType = -1; // < 0 -> undefined
diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx
index c0df275cab24..2e784cef8d42 100644
--- a/sc/source/filter/inc/xlpivot.hxx
+++ b/sc/source/filter/inc/xlpivot.hxx
@@ -26,7 +26,7 @@
#include "xladdress.hxx"
#include <dpobject.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class XclImpStream;
class XclExpStream;
@@ -624,7 +624,7 @@ struct XclPTFieldExtInfo
sal_uInt16 mnSortField; /// Index to data field sorting bases on.
sal_uInt16 mnShowField; /// Index to data field AutoShow bases on.
sal_uInt16 mnNumFmt;
- o3tl::optional<OUString> mpFieldTotalName;
+ std::optional<OUString> mpFieldTotalName;
explicit XclPTFieldExtInfo();
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index fdf042f7ad4b..67d365cb2126 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -431,7 +431,7 @@ void ScXMLExportDataPilot::WriteLayoutInfo(const ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteSubTotals(const ScDPSaveDimension* pDim)
{
sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount();
- o3tl::optional<OUString> pLayoutName;
+ std::optional<OUString> pLayoutName;
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
// Export display names only for 1.2 extended or later.
pLayoutName = pDim->GetSubtotalName();
@@ -467,7 +467,7 @@ void ScXMLExportDataPilot::WriteMembers(const ScDPSaveDimension* pDim)
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Export display names only for ODF 1.2 extended or later.
- const o3tl::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
if (pLayoutName)
rExport.AddAttribute(XML_NAMESPACE_TABLE_EXT, XML_DISPLAY_NAME, *pLayoutName);
}
@@ -678,7 +678,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Export display names only for ODF 1.2 extended or later.
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName)
rExport.AddAttribute(XML_NAMESPACE_TABLE_EXT, XML_DISPLAY_NAME, *pLayoutName);
}
@@ -724,7 +724,7 @@ void ScXMLExportDataPilot::WriteDimensions(const ScDPSaveData* pDPSave)
}
}
-void ScXMLExportDataPilot::WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const o3tl::optional<OUString> & pGrandTotal)
+void ScXMLExportDataPilot::WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const std::optional<OUString> & pGrandTotal)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, bVisible ? XML_TRUE : XML_FALSE);
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ORIENTATION, eOrient);
@@ -812,7 +812,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
// grand total elements.
- const o3tl::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
if (pGrandTotalName && rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Use the new data-pilot-grand-total element.
diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx
index 806e270028ec..8e0d0affcd76 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.hxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.hxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <rtl/ustring.hxx>
#include <global.hxx>
@@ -65,7 +65,7 @@ class ScXMLExportDataPilot
void WriteDimension(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData);
void WriteDimensions(const ScDPSaveData* pDPSave);
- void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const o3tl::optional<OUString> & pGrandTotal);
+ void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const std::optional<OUString> & pGrandTotal);
public:
explicit ScXMLExportDataPilot(ScXMLExport& rExport);
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 21fb889e8e43..e7dffa697e36 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -109,7 +109,7 @@ void ScMyStyleRanges::AddRange(const ScRange& rRange, const sal_Int16 nType)
}
}
-void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange, const o3tl::optional<OUString> & pCurrency)
+void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange, const std::optional<OUString> & pCurrency)
{
if (!pCurrencyList)
pCurrencyList.reset( new ScMyCurrencyStylesSet );
@@ -327,8 +327,8 @@ void ScMyStylesImportHelper::SetRowStyle(const OUString& sStyleName)
aRowDefaultStyle = GetIterator(sStyleName);
}
-void ScMyStylesImportHelper::SetAttributes(o3tl::optional<OUString> pStyleNameP,
- o3tl::optional<OUString> pCurrencyP, const sal_Int16 nCellTypeP)
+void ScMyStylesImportHelper::SetAttributes(std::optional<OUString> pStyleNameP,
+ std::optional<OUString> pCurrencyP, const sal_Int16 nCellTypeP)
{
pStyleName = std::move(pStyleNameP);
pCurrency = std::move(pCurrencyP);
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index 4a8748ad12ff..45ac02b9a8fd 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -29,7 +29,7 @@
#include <set>
#include <map>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
class ScXMLImport;
@@ -101,7 +101,7 @@ public:
ScMyStyleRanges();
~ScMyStyleRanges();
void AddRange(const ScRange& rRange, const sal_Int16 nType);
- void AddCurrencyRange(const ScRange& rRange, const o3tl::optional<OUString> & pCurrency);
+ void AddCurrencyRange(const ScRange& rRange, const std::optional<OUString> & pCurrency);
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab);
void SetStylesToRanges(const OUString* pStyleName, ScXMLImport& rImport);
};
@@ -115,13 +115,13 @@ class ScMyStylesImportHelper
std::vector<ScMyStylesMap::iterator> aColDefaultStyles;
ScMyStylesMap::iterator aRowDefaultStyle;
ScXMLImport& rImport;
- o3tl::optional<OUString>
+ std::optional<OUString>
pStyleName;
- o3tl::optional<OUString>
+ std::optional<OUString>
pPrevStyleName;
- o3tl::optional<OUString>
+ std::optional<OUString>
pCurrency;
- o3tl::optional<OUString>
+ std::optional<OUString>
pPrevCurrency;
ScRange aPrevRange;
sal_Int16 nCellType;
@@ -138,8 +138,8 @@ public:
~ScMyStylesImportHelper();
void AddColumnStyle(const OUString& rStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat);
void SetRowStyle(const OUString& rStyleName);
- void SetAttributes(o3tl::optional<OUString> pStyleName,
- o3tl::optional<OUString> pCurrency, const sal_Int16 nCellType);
+ void SetAttributes(std::optional<OUString> pStyleName,
+ std::optional<OUString> pCurrency, const sal_Int16 nCellType);
void AddRange(const ScRange& rRange);
void AddCell(const ScAddress& rAddress);
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab); // a col is inserted before nCol
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 64260d2c3e58..7c5d1d8c2c0b 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -94,7 +94,7 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int32 nEndX(-1);
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- o3tl::optional<OUString> xRangeList;
+ std::optional<OUString> xRangeList;
SdrLayerID nLayerID = SDRLAYER_NOTFOUND;
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 7baff729c77b..353bdb429f18 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -144,8 +144,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
rXMLImport.GetTables().AddColumn(bTempIsCovered);
- o3tl::optional<OUString> xStyleName;
- o3tl::optional<OUString> xCurrencySymbol;
+ std::optional<OUString> xStyleName;
+ std::optional<OUString> xCurrencySymbol;
if ( rAttrList.is() )
{
for (auto &it : *rAttrList)
@@ -1028,7 +1028,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
}
void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
- const SCCOL nCurrentCol, const ::o3tl::optional< OUString >& pOUText )
+ const SCCOL nCurrentCol, const ::std::optional< OUString >& pOUText )
{
ScDocument* pDoc = rXMLImport.GetDocument();
bool bDoIncrement = true;
@@ -1167,7 +1167,7 @@ bool isEmptyOrNote( const ScDocument* pDoc, const ScAddress& rCurrentPos )
}
void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos,
- const ::o3tl::optional< OUString >& pOUText, ScAddress& rCurrentPos )
+ const ::std::optional< OUString >& pOUText, ScAddress& rCurrentPos )
{
ScDocument* pDoc = rXMLImport.GetDocument();
ScMyTables& rTables = rXMLImport.GetTables();
@@ -1303,7 +1303,7 @@ OUString getOutputString( ScDocument* pDoc, const ScAddress& aCellPos )
void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos )
{
- ::o3tl::optional< OUString > pOUText;
+ ::std::optional< OUString > pOUText;
ScDocument* pDoc = rXMLImport.GetDocument();
if( nCellType == util::NumberFormat::TEXT )
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index eefeb8ead221..f1ce2e1b6bd6 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -25,7 +25,7 @@
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
#include <vector>
@@ -62,10 +62,10 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
typedef std::vector<std::unique_ptr<Field> > FieldsType;
typedef std::pair<OUString, OUString> FormulaWithNamespace;
- o3tl::optional<FormulaWithNamespace> maFormula; /// table:formula attribute
- o3tl::optional<OUString> maStringValue; /// office:string-value attribute
- o3tl::optional<OUString> maContentValidationName;
- o3tl::optional<OUString> maFirstParagraph; /// unformatted first paragraph, for better performance.
+ std::optional<FormulaWithNamespace> maFormula; /// table:formula attribute
+ std::optional<OUString> maStringValue; /// office:string-value attribute
+ std::optional<OUString> maContentValidationName;
+ std::optional<OUString> maFirstParagraph; /// unformatted first paragraph, for better performance.
ScEditEngineDefaulter* mpEditEngine;
OUStringBuffer maParagraph{32};
@@ -109,10 +109,10 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
void SetFormulaCell ( ScFormulaCell* pFCell ) const;
void PutTextCell ( const ScAddress& rScCurrentPos, const SCCOL nCurrentCol,
- const ::o3tl::optional< OUString >& pOUText );
+ const ::std::optional< OUString >& pOUText );
void PutValueCell ( const ScAddress& rScCurrentPos );
void AddTextAndValueCell ( const ScAddress& rScCellPos,
- const ::o3tl::optional< OUString >& pOUText, ScAddress& rScCurrentPos );
+ const ::std::optional< OUString >& pOUText, ScAddress& rScCurrentPos );
void AddNonFormulaCell ( const ScAddress& rScCellPos );
void PutFormulaCell ( const ScAddress& rScCurrentPos );
void AddFormulaCell ( const ScAddress& rScCellPos );
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index f5a0ecd3d6b9..9601a8637a3b 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -93,13 +93,13 @@ struct ScAccessibleShapeData
ScAccessibleShapeData(css::uno::Reference< css::drawing::XShape > xShape_);
~ScAccessibleShapeData();
mutable rtl::Reference< ::accessibility::AccessibleShape > pAccShape;
- mutable o3tl::optional<ScAddress> xRelationCell; // if it is NULL this shape is anchored on the table
+ mutable std::optional<ScAddress> xRelationCell; // if it is NULL this shape is anchored on the table
css::uno::Reference< css::drawing::XShape > xShape;
mutable bool bSelected;
bool bSelectable;
// cache these to make the sorting cheaper
- o3tl::optional<sal_Int16> mxLayerID;
- o3tl::optional<sal_Int32> mxZOrder;
+ std::optional<sal_Int16> mxLayerID;
+ std::optional<sal_Int32> mxZOrder;
};
}
@@ -270,7 +270,7 @@ private:
void FillShapes(std::vector < uno::Reference < drawing::XShape > >& rShapes) const;
bool FindSelectedShapesChanges(const css::uno::Reference<css::drawing::XShapes>& xShapes) const;
- o3tl::optional<ScAddress> GetAnchor(const uno::Reference<drawing::XShape>& xShape) const;
+ std::optional<ScAddress> GetAnchor(const uno::Reference<drawing::XShape>& xShape) const;
uno::Reference<XAccessibleRelationSet> GetRelationSet(const ScAccessibleShapeData* pData) const;
void SetAnchor(const uno::Reference<drawing::XShape>& xShape, ScAccessibleShapeData* pData) const;
void AddShape(const uno::Reference<drawing::XShape>& xShape, bool bCommitChange) const;
@@ -1118,7 +1118,7 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
return bResult;
}
-o3tl::optional<ScAddress> ScChildrenShapes::GetAnchor(const uno::Reference<drawing::XShape>& xShape) const
+std::optional<ScAddress> ScChildrenShapes::GetAnchor(const uno::Reference<drawing::XShape>& xShape) const
{
if (mpViewShell)
{
@@ -1129,12 +1129,12 @@ o3tl::optional<ScAddress> ScChildrenShapes::GetAnchor(const uno::Reference<drawi
if (SdrObject *pSdrObj = pShapeImp->GetSdrObject())
{
if (ScDrawObjData *pAnchor = ScDrawLayer::GetObjData(pSdrObj))
- return o3tl::optional<ScAddress>(pAnchor->maStart);
+ return std::optional<ScAddress>(pAnchor->maStart);
}
}
}
- return o3tl::optional<ScAddress>();
+ return std::optional<ScAddress>();
}
uno::Reference<XAccessibleRelationSet> ScChildrenShapes::GetRelationSet(const ScAccessibleShapeData* pData) const
@@ -1170,7 +1170,7 @@ void ScChildrenShapes::SetAnchor(const uno::Reference<drawing::XShape>& xShape,
{
if (pData)
{
- o3tl::optional<ScAddress> xAddress = GetAnchor(xShape);
+ std::optional<ScAddress> xAddress = GetAnchor(xShape);
if ((xAddress && pData->xRelationCell && (*xAddress != *(pData->xRelationCell))) ||
(!xAddress && pData->xRelationCell) || (xAddress && !pData->xRelationCell))
{
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 4bb3f1fee9dd..9127f879d17a 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -175,7 +175,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
double parameter1 = parameterInteger1 / static_cast<double>(PRECISION);
double parameter2 = parameterInteger2 / static_cast<double>(PRECISION);
- o3tl::optional<sal_Int8> aDecimalPlaces;
+ std::optional<sal_Int8> aDecimalPlaces;
if (mxEnableRounding->get_active())
{
aDecimalPlaces = static_cast<sal_Int8>(mxDecimalPlaces->get_value());
@@ -250,7 +250,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
}
template<class RNG>
-void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, o3tl::optional<sal_Int8> aDecimalPlaces)
+void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, std::optional<sal_Int8> aDecimalPlaces)
{
OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE);
OUString aDistributionName = ScResId(pDistributionStringId);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 3d03cf867b4e..e73bcc4c8085 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -868,7 +868,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg(weld::Window* pParent, ScDPObject& rDPObj,
{
if (pDimension)
{
- const o3tl::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
if (pLayoutName)
aName = *pLayoutName;
}
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index ff2fbd1f6351..32b26505db12 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -13,7 +13,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <address.hxx>
#include "anyrefdg.hxx"
@@ -63,7 +63,7 @@ private:
template<class RNG>
- void GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, const o3tl::optional<sal_Int8> aDecimalPlaces);
+ void GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, const std::optional<sal_Int8> aDecimalPlaces);
void SelectGeneratorAndGenerateNumbers();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index f66e419ebc9c..c46c01dda25c 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -104,7 +104,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOHeader;
std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOShrink;
- o3tl::optional<tools::Rectangle> mpAutoFillRect;
+ std::optional<tools::Rectangle> mpAutoFillRect;
/// LibreOfficeKit needs a persistent FmFormView for tiled rendering,
/// otherwise the invalidations from drawinglayer do not work.
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index af74df3d718e..638ed247be6c 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -183,8 +183,8 @@ void ScHFEditPage::InitPreDefinedList()
{
SvtUserOptions aUserOpt;
- o3tl::optional<Color> pTxtColour;
- o3tl::optional<Color> pFldColour;
+ std::optional<Color> pTxtColour;
+ std::optional<Color> pFldColour;
// Get the all field values at the outset.
OUString aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c17908803c50..ad174f970127 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -873,7 +873,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
}
else if ( aPropertyName == SC_UNO_DP_GRANDTOTAL_NAME )
{
- const o3tl::optional<OUString> & pGrandTotalName = aNewData.GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = aNewData.GetGrandTotalName();
if (pGrandTotalName)
aRet <<= *pGrandTotalName; // same behavior as in ScDPSource
}
@@ -1672,7 +1672,7 @@ OUString SAL_CALL ScDataPilotFieldObj::getName()
aName = SC_DATALAYOUT_NAME;
else
{
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName)
aName = *pLayoutName;
else
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index fcb986514ef8..5cf63e574936 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -177,7 +177,7 @@ public:
explicit ScUnoEditEngine(ScEditEngineDefaulter* pSource);
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor ) override;
+ std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor ) override;
sal_uInt16 CountFields();
SvxFieldData* FindByIndex(sal_uInt16 nIndex);
@@ -203,7 +203,7 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* pSource)
}
OUString ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor )
+ sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor )
{
OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor ));
if (eMode != SC_UNO_COLLECT_NONE)
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 0a76a774fa8e..2ca08843fd42 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1541,7 +1541,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
if (pDim->GetSubTotalFunc(0) != ScGeneralFunction::AUTO)
break;
- const o3tl::optional<OUString> & pLayoutName = pMem->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMem->GetLayoutName();
OUString aMemberName;
if (pLayoutName)
aMemberName = *pLayoutName;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 35cd545b2a6e..8683ecdadf77 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -774,8 +774,8 @@ static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
for ( nX=nX1; nX<=nX2; nX++ )
{
- o3tl::optional<Color> const & pCol1 = rFirst.pCellInfo[nX+1].mxColorScale;
- o3tl::optional<Color> const & pCol2 = rOther.pCellInfo[nX+1].mxColorScale;
+ std::optional<Color> const & pCol1 = rFirst.pCellInfo[nX+1].mxColorScale;
+ std::optional<Color> const & pCol2 = rOther.pCellInfo[nX+1].mxColorScale;
if( (pCol1 && !pCol2) || (!pCol1 && pCol2) )
return false;
@@ -909,7 +909,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() + 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon );
}
-void drawCells(vcl::RenderContext& rRenderContext, o3tl::optional<Color> const & pColor, const SvxBrushItem* pBackground, o3tl::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
+void drawCells(vcl::RenderContext& rRenderContext, std::optional<Color> const & pColor, const SvxBrushItem* pBackground, std::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
tools::Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo,
const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo,
sc::IconSetBitmapMap & rIconSetBitmapMap)
@@ -1059,7 +1059,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
const SvxBrushItem* pOldBackground = nullptr;
const SvxBrushItem* pBackground = nullptr;
- o3tl::optional<Color> pOldColor;
+ std::optional<Color> pOldColor;
const ScDataBarInfo* pOldDataBarInfo = nullptr;
const ScIconSetInfo* pOldIconSetInfo = nullptr;
SCCOL nMergedCols = 1;
@@ -1104,7 +1104,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
pBackground = lcl_FindBackground( mpDoc, nX, nY, nTab );
}
- o3tl::optional<Color> const & pColor = pInfo->mxColorScale;
+ std::optional<Color> const & pColor = pInfo->mxColorScale;
const ScDataBarInfo* pDataBarInfo = pInfo->pDataBar.get();
const ScIconSetInfo* pIconSetInfo = pInfo->pIconSet.get();
@@ -1136,7 +1136,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, o3tl::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
+ drawCells(rRenderContext, std::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
nArrY += nSkip;
}
@@ -1650,7 +1650,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
else
{
tools::Polygon aPoly(4, aPoints);
- o3tl::optional<Color> const & pColor = pInfo->mxColorScale;
+ std::optional<Color> const & pColor = pInfo->mxColorScale;
// for DrawPolygon, without Pen one pixel is left out
// to the right and below...
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 672fbcd5f8d4..d352ebae06e3 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -294,7 +294,7 @@
#include <model/SlsPageEnumerationProvider.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/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index cfdbb0e86e72..d8fec6e26373 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -334,7 +334,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/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 6aeb33182b31..90c515fb1f85 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -87,7 +87,7 @@
#include <comphelper/string.hxx>
#include <oox/ole/olehelper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <cassert>
#include <memory>
@@ -583,7 +583,7 @@ bool ImplSdPPTImport::Import()
pPage->SetAutoLayout( AUTOLAYOUT_NOTES, true );
if ( nMasterNum )
{
- o3tl::optional< sal_Int16 > oStartNumbering;
+ std::optional< sal_Int16 > oStartNumbering;
SfxStyleSheet* pSheet;
if ( nMasterNum == 1 )
{
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 5bc72ad5fde9..427228c0a7d5 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -335,7 +335,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
}
else if ( dynamic_cast< const SdrMeasureField* >(pField))
{
- pInfo->SetFieldColor(o3tl::optional<Color>()); // clear the field color
+ pInfo->SetFieldColor(std::optional<Color>()); // clear the field color
}
else if ((pCustomPropertyField = dynamic_cast<const editeng::CustomPropertyField*>(pField)) != nullptr)
{
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 8c4b0979bee9..5ed5359e8655 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -51,7 +51,7 @@
#include <o3tl/deleter.hxx>
#include <sfx2/dispatch.hxx>
#include <vcl/ptrstyle.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <sdmod.hxx>
namespace {
@@ -198,7 +198,7 @@ protected:
virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor) override;
private:
- ::o3tl::optional<Point> maButtonDownLocation;
+ ::std::optional<Point> maButtonDownLocation;
/** Select all pages between and including the selection anchor and the
specified page.
@@ -1180,7 +1180,7 @@ void NormalModeHandler::RangeSelect (const model::SharedPageDescriptor& rpDescri
void NormalModeHandler::ResetButtonDownLocation()
{
- maButtonDownLocation = ::o3tl::optional<Point>();
+ maButtonDownLocation = ::std::optional<Point>();
}
//===== MultiSelectionModeHandler =============================================
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index 52bc377f4e91..a0f79f984d5e 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -107,7 +107,7 @@ void VisibleAreaManager::MakeVisible()
return;
const Point aCurrentTopLeft (pWindow->PixelToLogic(Point(0,0)));
- const ::o3tl::optional<Point> aNewVisibleTopLeft (GetRequestedTopLeft());
+ const ::std::optional<Point> aNewVisibleTopLeft (GetRequestedTopLeft());
maVisibleRequests.clear();
if ( ! aNewVisibleTopLeft)
return;
@@ -121,11 +121,11 @@ void VisibleAreaManager::MakeVisible()
aAnimation(1.0);
}
-::o3tl::optional<Point> VisibleAreaManager::GetRequestedTopLeft() const
+::std::optional<Point> VisibleAreaManager::GetRequestedTopLeft() const
{
sd::Window *pWindow (mrSlideSorter.GetContentWindow().get());
if ( ! pWindow)
- return ::o3tl::optional<Point>();
+ return ::std::optional<Point>();
// Get the currently visible area and the model area.
const ::tools::Rectangle aVisibleArea (pWindow->PixelToLogic(
@@ -166,9 +166,9 @@ void VisibleAreaManager::MakeVisible()
const Point aRequestedTopLeft (nVisibleLeft, nVisibleTop);
if (aRequestedTopLeft == aVisibleArea.TopLeft())
- return ::o3tl::optional<Point>();
+ return ::std::optional<Point>();
else
- return ::o3tl::optional<Point>(aRequestedTopLeft);
+ return ::std::optional<Point>(aRequestedTopLeft);
}
//===== VisibleAreaManager::TemporaryDisabler =================================
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
index 8ac72f786ec2..a8e1510a49c6 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSVISIBLEAREAMANAGER_HXX
#include <model/SlsSharedPageDescriptor.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <tools/gen.hxx>
#include <vector>
@@ -81,7 +81,7 @@ private:
int mnDisableCount;
void MakeVisible();
- ::o3tl::optional<Point> GetRequestedTopLeft() const;
+ ::std::optional<Point> GetRequestedTopLeft() const;
};
} } } // end of namespace ::sd::slidesorter::view
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index bbfd1a63a4dd..87d51ac85d54 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -299,7 +299,7 @@
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <officecfg/Office/Common.hxx>
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 7f7ae61767f1..ee9040e0e6f1 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1157,7 +1157,7 @@ void BookmarksBox_Impl::dispose()
for ( sal_Int32 i = 0; i < nCount; ++i )
{
OUString* pURL = static_cast<OUString*>(GetEntryData(i));
- aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, "", GetEntry(i), o3tl::nullopt);
+ aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, "", GetEntry(i), std::nullopt);
delete pURL;
}
ListBox::dispose();
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 67b5b1765331..ec32dd038d3d 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -102,7 +102,7 @@ void SfxPickListImpl::AddDocumentToPickList( const SfxObjectShell* pDocSh )
if ( pFilter )
aFilter = pFilter->GetFilterName();
- o3tl::optional<OUString> aThumbnail;
+ std::optional<OUString> aThumbnail;
// generate the thumbnail
//fdo#74834: only generate thumbnail for history if the corresponding option is not disabled in the configuration
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index f995be2c56ee..8c2e577eda67 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -75,7 +75,7 @@
#include <sfx2/docfile.hxx>
#include <sax/tools/converter.hxx>
#include <i18nlangtag/languagetag.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <utility>
#include <vector>
@@ -450,7 +450,7 @@ OUString getNameSpace(const char* i_qname) throw ()
bool
textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt,
- bool & o_rIsDateTime, o3tl::optional<sal_Int16> & o_rTimeZone,
+ bool & o_rIsDateTime, std::optional<sal_Int16> & o_rTimeZone,
const OUString& i_text) throw ()
{
if (::sax::Converter::parseDateOrDateTime(
@@ -1184,7 +1184,7 @@ void SfxDocumentMetaData::init(
bool isDateTime;
css::util::Date d;
css::util::DateTime dt;
- o3tl::optional<sal_Int16> nTimeZone;
+ std::optional<sal_Int16> nTimeZone;
if (textToDateOrDateTime(d, dt, isDateTime, nTimeZone, text)) {
if (isDateTime) {
if (nTimeZone) {
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 4d697710c0af..3bf812e439a6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -85,7 +85,7 @@
#include <framework/framelistanalyzer.hxx>
#include <shellimpl.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <unotools/configmgr.hxx>
@@ -450,7 +450,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
bool bOK = false;
bool bRetryIgnoringLock = false;
bool bOpenTemplate = false;
- o3tl::optional<bool> aOrigROVal;
+ std::optional<bool> aOrigROVal;
if (!pVersionItem)
{
auto pRO = pMed->GetItemSet()->GetItem<SfxBoolItem>(SID_DOC_READONLY, false);
@@ -2356,7 +2356,7 @@ void SfxViewFrame::ExecView_Impl
static bool impl_maxOpenDocCountReached()
{
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- o3tl::optional<sal_Int32> x(officecfg::Office::Common::Misc::MaxOpenDocuments::get(xContext));
+ std::optional<sal_Int32> x(officecfg::Office::Common::Misc::MaxOpenDocuments::get(xContext));
// NIL means: count of allowed documents = infinite !
if (!x)
return false;
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx
index ace76f44f501..b813b79475c2 100644
--- a/slideshow/inc/pch/precompiled_slideshow.hxx
+++ b/slideshow/inc/pch/precompiled_slideshow.hxx
@@ -209,7 +209,7 @@
#include <editeng/macros.hxx>
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx
index 6f5a05b197cb..4732197657ba 100644
--- a/slideshow/source/engine/activities/activitiesfactory.cxx
+++ b/slideshow/source/engine/activities/activitiesfactory.cxx
@@ -35,7 +35,7 @@
#include "continuousactivitybase.hxx"
#include "continuouskeytimeactivitybase.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
#include <vector>
@@ -101,7 +101,7 @@ class FromToByActivity : public BaseType
{
public:
typedef typename AnimationType::ValueType ValueType;
- typedef o3tl::optional<ValueType> OptionalValueType;
+ typedef std::optional<ValueType> OptionalValueType;
private:
// some compilers don't inline whose definition they haven't
@@ -389,7 +389,7 @@ AnimationActivitySharedPtr createFromToByActivity(
const ::basegfx::B2DVector& rSlideBounds )
{
typedef typename AnimationType::ValueType ValueType;
- typedef o3tl::optional<ValueType> OptionalValueType;
+ typedef std::optional<ValueType> OptionalValueType;
OptionalValueType aFrom;
OptionalValueType aTo;
diff --git a/slideshow/source/engine/activities/activitybase.hxx b/slideshow/source/engine/activities/activitybase.hxx
index 8fdc6be71601..fdf492aca9ef 100644
--- a/slideshow/source/engine/activities/activitybase.hxx
+++ b/slideshow/source/engine/activities/activitybase.hxx
@@ -126,7 +126,7 @@ private:
AnimatableShapeSharedPtr mpShape; // only to pass on to animation
ShapeAttributeLayerSharedPtr mpAttributeLayer; // only to pass on to anim
- ::o3tl::optional<double> const maRepeats;
+ ::std::optional<double> const maRepeats;
const double mnAccelerationFraction;
const double mnDecelerationFraction;
diff --git a/slideshow/source/engine/activities/activityparameters.hxx b/slideshow/source/engine/activities/activityparameters.hxx
index d915230fe792..a8835a4cce21 100644
--- a/slideshow/source/engine/activities/activityparameters.hxx
+++ b/slideshow/source/engine/activities/activityparameters.hxx
@@ -25,7 +25,7 @@
#include <expressionnode.hxx>
#include <wakeupevent.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <vector>
namespace slideshow {
@@ -80,7 +80,7 @@ struct ActivityParameters
EventQueue& rEventQueue,
ActivitiesQueue& rActivitiesQueue,
double nMinDuration,
- ::o3tl::optional<double> const& rRepeats,
+ ::std::optional<double> const& rRepeats,
double nAccelerationFraction,
double nDecelerationFraction,
sal_uInt32 nMinNumberOfFrames,
@@ -117,7 +117,7 @@ struct ActivityParameters
/// Total duration of activity (including all repeats)
const double mnMinDuration;
- ::o3tl::optional<double> const& mrRepeats;
+ ::std::optional<double> const& mrRepeats;
const double mnAccelerationFraction;
const double mnDecelerationFraction;
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 01059ec39b77..4dcb640795aa 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -30,7 +30,7 @@
#include <delayevent.hxx>
#include <framerate.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <algorithm>
using namespace com::sun::star;
@@ -397,7 +397,7 @@ AnimationBaseNode::fillCommonParameters() const
const bool bAutoReverse( mxAnimateNode->getAutoReverse() );
- o3tl::optional<double> aRepeats;
+ std::optional<double> aRepeats;
double nRepeats = 0;
if( mxAnimateNode->getRepeatCount() >>= nRepeats ) {
aRepeats = nRepeats;
diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx
index a7bfa8812032..e4def440fe3d 100644
--- a/slideshow/source/engine/shapes/drawshape.hxx
+++ b/slideshow/source/engine/shapes/drawshape.hxx
@@ -30,7 +30,7 @@
#include "viewshape.hxx"
#include <hyperlinkarea.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <vector>
class Graphic;
@@ -292,7 +292,7 @@ namespace slideshow
mutable int mnCurrMtfLoadFlags;
/// Contains the current shape bounds, in unit rect space
- mutable ::o3tl::optional<basegfx::B2DRectangle> maCurrentShapeUnitBounds;
+ mutable ::std::optional<basegfx::B2DRectangle> maCurrentShapeUnitBounds;
// The attributes of this Shape
const double mnPriority;
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index 4b69c4320c45..f2d909524c06 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -542,7 +542,7 @@ namespace slideshow::internal
// shape needs repaint - setup all that's needed
- o3tl::optional<basegfx::B2DPolyPolygon> aClip;
+ std::optional<basegfx::B2DPolyPolygon> aClip;
if( pAttr )
{
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 0e3d0f87e927..7125f5191895 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -400,13 +400,13 @@ private:
//map of vector of Polygons, containing polygons drawn on each slide.
PolygonMap maPolygons;
- o3tl::optional<RGBColor> maUserPaintColor;
+ std::optional<RGBColor> maUserPaintColor;
double maUserPaintStrokeWidth;
//changed for the eraser project
- o3tl::optional<bool> maEraseAllInk;
- o3tl::optional<sal_Int32> maEraseInk;
+ std::optional<bool> maEraseAllInk;
+ std::optional<sal_Int32> maEraseInk;
//end changed
std::shared_ptr<canvas::tools::ElapsedTime> mpPresTimer;
@@ -840,7 +840,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition(
nTransitionDuration,
nMinFrames,
false,
- o3tl::optional<double>(1.0),
+ std::optional<double>(1.0),
0.0,
0.0,
ShapeSharedPtr(),
diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx
index d1dbe9b15db5..3fcdbb2e0d2c 100644
--- a/slideshow/source/engine/transitions/combtransition.cxx
+++ b/slideshow/source/engine/transitions/combtransition.cxx
@@ -65,7 +65,7 @@ basegfx::B2DPolyPolygon createClipPolygon(
}
CombTransition::CombTransition(
- o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
diff --git a/slideshow/source/engine/transitions/combtransition.hxx b/slideshow/source/engine/transitions/combtransition.hxx
index 2446e4923b95..082e673135b9 100644
--- a/slideshow/source/engine/transitions/combtransition.hxx
+++ b/slideshow/source/engine/transitions/combtransition.hxx
@@ -38,7 +38,7 @@ public:
@param nNumStripes
Number of comb-like stripes to show in this effect
*/
- CombTransition( ::o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ CombTransition( ::std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index a3edf1a8e882..bee40c9480aa 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -32,7 +32,7 @@ using namespace com::sun::star;
namespace slideshow::internal {
-SlideChangeBase::SlideChangeBase( o3tl::optional<SlideSharedPtr> const & leavingSlide,
+SlideChangeBase::SlideChangeBase( std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
@@ -71,13 +71,13 @@ SlideBitmapSharedPtr SlideChangeBase::getEnteringBitmap( const ViewEntry& rViewE
{
if( !rViewEntry.mpEnteringBitmap )
rViewEntry.mpEnteringBitmap = createBitmap( rViewEntry.mpView,
- o3tl::optional<SlideSharedPtr>(mpEnteringSlide) );
+ std::optional<SlideSharedPtr>(mpEnteringSlide) );
return rViewEntry.mpEnteringBitmap;
}
SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr& rView,
- const o3tl::optional<SlideSharedPtr>& rSlide ) const
+ const std::optional<SlideSharedPtr>& rSlide ) const
{
SlideBitmapSharedPtr pRet;
if( !rSlide )
diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx
index 443c8ed81ebe..492bc597128c 100644
--- a/slideshow/source/engine/transitions/slidechangebase.hxx
+++ b/slideshow/source/engine/transitions/slidechangebase.hxx
@@ -28,7 +28,7 @@
#include <soundplayer.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace cppcanvas
{
@@ -73,7 +73,7 @@ protected:
entering slides.
*/
SlideChangeBase(
- ::o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ ::std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
@@ -114,7 +114,7 @@ protected:
SlideBitmapSharedPtr getEnteringBitmap( const ViewEntry& rViewEntry ) const;
SlideBitmapSharedPtr createBitmap( const UnoViewSharedPtr& pView,
- const o3tl::optional<SlideSharedPtr>& rSlide_ ) const;
+ const std::optional<SlideSharedPtr>& rSlide_ ) const;
::basegfx::B2ISize getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const;
@@ -184,7 +184,7 @@ private:
EventMultiplexer& mrEventMultiplexer;
ScreenUpdater& mrScreenUpdater;
- ::o3tl::optional<SlideSharedPtr> maLeavingSlide;
+ ::std::optional<SlideSharedPtr> maLeavingSlide;
SlideSharedPtr mpEnteringSlide;
ViewsVecT maViewData;
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 6c12603836f1..e28aa070d46c 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -108,7 +108,7 @@ public:
*/
PluginSlideChange( sal_Int16 nTransitionType,
sal_Int16 nTransitionSubType,
- o3tl::optional<SlideSharedPtr> const& leavingSlide_,
+ std::optional<SlideSharedPtr> const& leavingSlide_,
const SlideSharedPtr& pEnteringSlide,
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
@@ -270,7 +270,7 @@ public:
SlideChangeBase(
// leaving bitmap is empty, we're leveraging the fact that the
// old slide is still displayed in the background:
- o3tl::optional<SlideSharedPtr>(),
+ std::optional<SlideSharedPtr>(),
pEnteringSlide,
pSoundPlayer,
rViewContainer,
@@ -331,9 +331,9 @@ public:
entering slides, which applies a fade effect.
*/
FadingSlideChange(
- o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
- o3tl::optional<RGBColor> const& rFadeColor,
+ std::optional<RGBColor> const& rFadeColor,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
@@ -364,7 +364,7 @@ public:
double t ) override;
private:
- const o3tl::optional< RGBColor > maFadeColor;
+ const std::optional< RGBColor > maFadeColor;
};
void FadingSlideChange::prepareForRun(
@@ -429,7 +429,7 @@ public:
entering slides, which applies a cut effect.
*/
CutSlideChange(
- o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const RGBColor& rFadeColor,
const SoundPlayerSharedPtr& pSoundPlayer,
@@ -533,7 +533,7 @@ public:
final slide position. The vector must have unit length.
*/
MovingSlideChange(
- const o3tl::optional<SlideSharedPtr>& leavingSlide,
+ const std::optional<SlideSharedPtr>& leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const SoundPlayerSharedPtr& pSoundPlayer,
const UnoViewContainer& rViewContainer,
@@ -651,7 +651,7 @@ void MovingSlideChange::performOut(
NumberAnimationSharedPtr createPushWipeTransition(
- o3tl::optional<SlideSharedPtr> const & leavingSlide_,
+ std::optional<SlideSharedPtr> const & leavingSlide_,
const SlideSharedPtr& pEnteringSlide,
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
@@ -661,7 +661,7 @@ NumberAnimationSharedPtr createPushWipeTransition(
bool /*bTransitionDirection*/,
const SoundPlayerSharedPtr& pSoundPlayer )
{
- o3tl::optional<SlideSharedPtr> leavingSlide; // no bitmap
+ std::optional<SlideSharedPtr> leavingSlide; // no bitmap
if (leavingSlide_ && *leavingSlide_ != nullptr)
{
// opt: only page, if we've an
@@ -752,7 +752,7 @@ NumberAnimationSharedPtr createPushWipeTransition(
}
NumberAnimationSharedPtr createSlideWipeTransition(
- o3tl::optional<SlideSharedPtr> const & leavingSlide,
+ std::optional<SlideSharedPtr> const & leavingSlide,
const SlideSharedPtr& pEnteringSlide,
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
@@ -814,7 +814,7 @@ NumberAnimationSharedPtr createSlideWipeTransition(
return std::make_shared<MovingSlideChange>(
- o3tl::optional<SlideSharedPtr>() /* no slide */,
+ std::optional<SlideSharedPtr>() /* no slide */,
pEnteringSlide,
pSoundPlayer,
rViewContainer,
@@ -844,7 +844,7 @@ NumberAnimationSharedPtr createSlideWipeTransition(
NumberAnimationSharedPtr createPluginTransition(
sal_Int16 nTransitionType,
sal_Int16 nTransitionSubType,
- o3tl::optional<SlideSharedPtr> const& pLeavingSlide,
+ std::optional<SlideSharedPtr> const& pLeavingSlide,
const SlideSharedPtr& pEnteringSlide,
const UnoViewContainer& rViewContainer,
ScreenUpdater& rScreenUpdater,
@@ -912,7 +912,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
createPluginTransition(
nTransitionType,
nTransitionSubType,
- o3tl::make_optional(pLeavingSlide),
+ std::make_optional(pLeavingSlide),
pEnteringSlide,
rViewContainer,
rScreenUpdater,
@@ -1006,7 +1006,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
case animations::TransitionType::PUSHWIPE:
{
return createPushWipeTransition(
- o3tl::make_optional(pLeavingSlide),
+ std::make_optional(pLeavingSlide),
pEnteringSlide,
rViewContainer,
rScreenUpdater,
@@ -1020,7 +1020,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
case animations::TransitionType::SLIDEWIPE:
{
return createSlideWipeTransition(
- o3tl::make_optional(pLeavingSlide),
+ std::make_optional(pLeavingSlide),
pEnteringSlide,
rViewContainer,
rScreenUpdater,
@@ -1035,8 +1035,8 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
case animations::TransitionType::FADE:
{
// black page:
- o3tl::optional<SlideSharedPtr> leavingSlide;
- o3tl::optional<RGBColor> aFadeColor;
+ std::optional<SlideSharedPtr> leavingSlide;
+ std::optional<RGBColor> aFadeColor;
switch( nTransitionSubType )
{
diff --git a/slideshow/source/inc/activitiesfactory.hxx b/slideshow/source/inc/activitiesfactory.hxx
index 1734fc1ea8b0..ce4a1d3ee0b7 100644
--- a/slideshow/source/inc/activitiesfactory.hxx
+++ b/slideshow/source/inc/activitiesfactory.hxx
@@ -36,7 +36,7 @@
#include "boolanimation.hxx"
#include "pairanimation.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
/* Definition of ActivitiesFactory class */
@@ -55,7 +55,7 @@ namespace ActivitiesFactory
double nMinDuration,
sal_uInt32 nMinNumberOfFrames,
bool bAutoReverse,
- ::o3tl::optional<double> const& aRepeats,
+ ::std::optional<double> const& aRepeats,
double nAcceleration,
double nDeceleration,
const ShapeSharedPtr& rShape,
@@ -110,7 +110,7 @@ namespace ActivitiesFactory
unspecified, the activity will repeat
indefinitely.
*/
- ::o3tl::optional<double> const maRepeats;
+ ::std::optional<double> const maRepeats;
/// Fraction of simple time to accelerate animation
double const mnAcceleration;
diff --git a/slideshow/source/inc/animatedsprite.hxx b/slideshow/source/inc/animatedsprite.hxx
index aa7384841412..c76b06b73bd1 100644
--- a/slideshow/source/inc/animatedsprite.hxx
+++ b/slideshow/source/inc/animatedsprite.hxx
@@ -26,7 +26,7 @@
#include "viewlayer.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
@@ -145,8 +145,8 @@ namespace slideshow
double const mnSpritePrio;
double mnAlpha;
- ::o3tl::optional< ::basegfx::B2DPoint > maPosPixel;
- ::o3tl::optional< ::basegfx::B2DPolyPolygon > maClip;
+ ::std::optional< ::basegfx::B2DPoint > maPosPixel;
+ ::std::optional< ::basegfx::B2DPolyPolygon > maClip;
bool mbSpriteVisible;
};
diff --git a/starmath/inc/pch/precompiled_sm.hxx b/starmath/inc/pch/precompiled_sm.hxx
index 07bbd9b59988..bc12faddfc78 100644
--- a/starmath/inc/pch/precompiled_sm.hxx
+++ b/starmath/inc/pch/precompiled_sm.hxx
@@ -106,7 +106,7 @@
#include <editeng/editstat.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 <salhelper/simplereferenceobject.hxx>
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 23f4c6cb0a42..e7f0bf900d78 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -997,7 +997,7 @@ bool SmTextForwarder::IsValid() const
return pEditEngine && pEditEngine->GetUpdateMode();
}
-OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor )
+OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor) : OUString();
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index dceff88ae478..60e247973b67 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -197,7 +197,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) override;
virtual void FieldClicked(const SvxFieldItem&) override;
virtual bool IsValid() const override;
diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx
index ecba14022f57..dd9f53cc9d2f 100644
--- a/svgio/inc/svgnode.hxx
+++ b/svgio/inc/svgnode.hxx
@@ -26,7 +26,7 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
// predefines
namespace svgio
@@ -94,10 +94,10 @@ namespace svgio
std::vector< std::unique_ptr<SvgNode> > maChildren;
/// Id svan value
- o3tl::optional<OUString> mpId;
+ std::optional<OUString> mpId;
/// Class svan value
- o3tl::optional<OUString> mpClass;
+ std::optional<OUString> mpClass;
/// XmlSpace value
XmlSpace maXmlSpace;
@@ -167,11 +167,11 @@ namespace svgio
double getCurrentXHeight() const;
/// Id access
- o3tl::optional<OUString> const & getId() const { return mpId; }
+ std::optional<OUString> const & getId() const { return mpId; }
void setId(OUString const &);
/// Class access
- o3tl::optional<OUString> const & getClass() const { return mpClass; }
+ std::optional<OUString> const & getClass() const { return mpClass; }
void setClass(OUString const &);
/// XmlSpace access
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index 341212e13319..2797de08da3a 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -314,7 +314,7 @@
#include <i18nutil/transliteration.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/svtools/inc/table/tablemodel.hxx b/svtools/inc/table/tablemodel.hxx
index a27d6b0e5834..b2913615b201 100644
--- a/svtools/inc/table/tablemodel.hxx
+++ b/svtools/inc/table/tablemodel.hxx
@@ -29,7 +29,7 @@
#include <sal/types.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
#include <vector>
#include <o3tl/typed_flags_set.hxx>
@@ -364,55 +364,55 @@ namespace svt { namespace table
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getLineColor() const = 0;
+ virtual ::std::optional< ::Color > getLineColor() const = 0;
/** returns the color to be used for rendering the header background.
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getHeaderBackgroundColor() const = 0;
+ virtual ::std::optional< ::Color > getHeaderBackgroundColor() const = 0;
/** returns the color to be used for rendering the header text.
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getHeaderTextColor() const = 0;
+ virtual ::std::optional< ::Color > getHeaderTextColor() const = 0;
/** returns the color to be used for the background of selected cells, when the control has the focus
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getActiveSelectionBackColor() const = 0;
+ virtual ::std::optional< ::Color > getActiveSelectionBackColor() const = 0;
/** returns the color to be used for the background of selected cells, when the control does not have the focus
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getInactiveSelectionBackColor() const = 0;
+ virtual ::std::optional< ::Color > getInactiveSelectionBackColor() const = 0;
/** returns the color to be used for the text of selected cells, when the control has the focus
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getActiveSelectionTextColor() const = 0;
+ virtual ::std::optional< ::Color > getActiveSelectionTextColor() const = 0;
/** returns the color to be used for the text of selected cells, when the control does not have the focus
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getInactiveSelectionTextColor() const = 0;
+ virtual ::std::optional< ::Color > getInactiveSelectionTextColor() const = 0;
/** returns the color to be used for rendering cell texts.
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getTextColor() const = 0;
+ virtual ::std::optional< ::Color > getTextColor() const = 0;
/** returns the color to be used for text lines (underline, strikethrough) when rendering cell text.
If this value is not set, a default color from the style settings will be used.
*/
- virtual ::o3tl::optional< ::Color > getTextLineColor() const = 0;
+ virtual ::std::optional< ::Color > getTextLineColor() const = 0;
/** returns the colors to be used for the row backgrounds.
@@ -425,7 +425,7 @@ namespace svt { namespace table
If value is a non-empty sequence, then rows will have the background colors as specified in the sequence,
in alternating order.
*/
- virtual ::o3tl::optional< ::std::vector< ::Color > >
+ virtual ::std::optional< ::std::vector< ::Color > >
getRowBackgroundColors() const = 0;
/** determines the vertical alignment of content within a cell
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index e62da1690090..a08c2867abfc 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -705,7 +705,7 @@ static OUString makeRepresentativeTextForLanguage(LanguageType eLang)
namespace
{
#if OSL_DEBUG_LEVEL > 0
- void lcl_dump_unicode_coverage(const o3tl::optional<std::bitset<vcl::UnicodeCoverage::MAX_UC_ENUM>> &roIn)
+ void lcl_dump_unicode_coverage(const std::optional<std::bitset<vcl::UnicodeCoverage::MAX_UC_ENUM>> &roIn)
{
if (!roIn)
{
@@ -976,7 +976,7 @@ namespace
SAL_INFO("svtools", "RESERVED5");
}
- void lcl_dump_codepage_coverage(const o3tl::optional<std::bitset<vcl::CodePageCoverage::MAX_CP_ENUM>> &roIn)
+ void lcl_dump_codepage_coverage(const std::optional<std::bitset<vcl::CodePageCoverage::MAX_CP_ENUM>> &roIn)
{
if (!roIn)
{
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index 5fb786cd13d3..8ab7ae182d48 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -203,7 +203,7 @@ namespace svt::table
namespace
{
- Color lcl_getEffectiveColor(o3tl::optional<Color> const& i_modelColor,
+ Color lcl_getEffectiveColor(std::optional<Color> const& i_modelColor,
StyleSettings const& i_styleSettings,
Color const& (StyleSettings::*i_getDefaultColor) () const)
{
@@ -229,7 +229,7 @@ namespace svt::table
rRenderContext.DrawRect(_rArea);
// delimiter lines at bottom/right
- o3tl::optional<Color> aLineColor(m_pImpl->rModel.getLineColor());
+ std::optional<Color> aLineColor(m_pImpl->rModel.getLineColor());
Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
rRenderContext.SetLineColor(lineColor);
rRenderContext.DrawLine(_rArea.BottomLeft(), _rArea.BottomRight());
@@ -261,7 +261,7 @@ namespace svt::table
nDrawTextFlags |= DrawTextFlags::Disable;
rRenderContext.DrawText( aTextRect, sHeaderText, nDrawTextFlags );
- o3tl::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
+ std::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
rRenderContext.SetLineColor( lineColor );
rRenderContext.DrawLine( _rArea.BottomRight(), _rArea.TopRight());
@@ -309,7 +309,7 @@ namespace svt::table
Color backgroundColor = _rStyle.GetFieldColor();
- o3tl::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
+ std::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
Color const activeSelectionBackColor = lcl_getEffectiveColor(m_pImpl->rModel.getActiveSelectionBackColor(),
@@ -325,7 +325,7 @@ namespace svt::table
}
else
{
- o3tl::optional< std::vector<Color> > aRowColors = m_pImpl->rModel.getRowBackgroundColors();
+ std::optional< std::vector<Color> > aRowColors = m_pImpl->rModel.getRowBackgroundColors();
if (!aRowColors)
{
// use alternating default colors
@@ -370,7 +370,7 @@ namespace svt::table
{
rRenderContext.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR );
- o3tl::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
+ std::optional<Color> const aLineColor( m_pImpl->rModel.getLineColor() );
Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
rRenderContext.SetLineColor(lineColor);
rRenderContext.DrawLine(_rArea.BottomLeft(), _rArea.BottomRight());
@@ -428,7 +428,7 @@ namespace svt::table
if ( m_pImpl->bUseGridLines )
{
- ::o3tl::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() );
+ ::std::optional< ::Color > aLineColor( m_pImpl->rModel.getLineColor() );
::Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
if ( _bSelected && !aLineColor )
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index dbdaa91ce536..b4cf5591761f 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -149,45 +149,45 @@ namespace svt::table
}
virtual void addTableModelListener( const PTableModelListener& ) override {}
virtual void removeTableModelListener( const PTableModelListener& ) override {}
- virtual ::o3tl::optional< ::Color > getLineColor() const override
+ virtual ::std::optional< ::Color > getLineColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getHeaderBackgroundColor() const override
+ virtual ::std::optional< ::Color > getHeaderBackgroundColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getHeaderTextColor() const override
+ virtual ::std::optional< ::Color > getHeaderTextColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getActiveSelectionBackColor() const override
+ virtual ::std::optional< ::Color > getActiveSelectionBackColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getInactiveSelectionBackColor() const override
+ virtual ::std::optional< ::Color > getInactiveSelectionBackColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getActiveSelectionTextColor() const override
+ virtual ::std::optional< ::Color > getActiveSelectionTextColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getInactiveSelectionTextColor() const override
+ virtual ::std::optional< ::Color > getInactiveSelectionTextColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getTextColor() const override
+ virtual ::std::optional< ::Color > getTextColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::Color > getTextLineColor() const override
+ virtual ::std::optional< ::Color > getTextLineColor() const override
{
- return ::o3tl::optional< ::Color >();
+ return ::std::optional< ::Color >();
}
- virtual ::o3tl::optional< ::std::vector< ::Color > > getRowBackgroundColors() const override
+ virtual ::std::optional< ::std::vector< ::Color > > getRowBackgroundColors() const override
{
- return ::o3tl::optional< ::std::vector< ::Color > >();
+ return ::std::optional< ::std::vector< ::Color > >();
}
virtual css::style::VerticalAlignment getVerticalAlign() const override
{
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index 0526b2e4f680..c19137a313c4 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -452,7 +452,7 @@ void SVTXGridControl::impl_checkTableModelInit()
namespace
{
- void lcl_convertColor( ::o3tl::optional< ::Color > const & i_color, Any & o_colorValue )
+ void lcl_convertColor( ::std::optional< ::Color > const & i_color, Any & o_colorValue )
{
if ( !i_color )
o_colorValue.clear();
@@ -535,7 +535,7 @@ Any SVTXGridControl::getProperty( const OUString& PropertyName )
case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS:
{
- ::o3tl::optional< ::std::vector< ::Color > > aColors( m_xTableModel->getRowBackgroundColors() );
+ ::std::optional< ::std::vector< ::Color > > aColors( m_xTableModel->getRowBackgroundColors() );
if ( !aColors )
aPropertyValue.clear();
else
diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx
index 0477b82ca53d..e1adde72524e 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -70,16 +70,16 @@ namespace svt::table
TableMetrics nRowHeight;
TableMetrics nColumnHeaderHeight;
TableMetrics nRowHeaderWidth;
- ::o3tl::optional< ::Color > m_aGridLineColor;
- ::o3tl::optional< ::Color > m_aHeaderBackgroundColor;
- ::o3tl::optional< ::Color > m_aHeaderTextColor;
- ::o3tl::optional< ::Color > m_aActiveSelectionBackColor;
- ::o3tl::optional< ::Color > m_aInactiveSelectionBackColor;
- ::o3tl::optional< ::Color > m_aActiveSelectionTextColor;
- ::o3tl::optional< ::Color > m_aInactiveSelectionTextColor;
- ::o3tl::optional< ::Color > m_aTextColor;
- ::o3tl::optional< ::Color > m_aTextLineColor;
- ::o3tl::optional< ::std::vector< ::Color > > m_aRowColors;
+ ::std::optional< ::Color > m_aGridLineColor;
+ ::std::optional< ::Color > m_aHeaderBackgroundColor;
+ ::std::optional< ::Color > m_aHeaderTextColor;
+ ::std::optional< ::Color > m_aActiveSelectionBackColor;
+ ::std::optional< ::Color > m_aInactiveSelectionBackColor;
+ ::std::optional< ::Color > m_aActiveSelectionTextColor;
+ ::std::optional< ::Color > m_aInactiveSelectionTextColor;
+ ::std::optional< ::Color > m_aTextColor;
+ ::std::optional< ::Color > m_aTextLineColor;
+ ::std::optional< ::std::vector< ::Color > > m_aRowColors;
VerticalAlignment m_eVerticalAlign;
bool bEnabled;
ModellListeners m_aListeners;
@@ -532,7 +532,7 @@ namespace svt::table
namespace
{
- void lcl_setColor( Any const & i_color, ::o3tl::optional< ::Color > & o_convertedColor )
+ void lcl_setColor( Any const & i_color, ::std::optional< ::Color > & o_convertedColor )
{
if ( !i_color.hasValue() )
o_convertedColor.reset();
@@ -552,7 +552,7 @@ namespace svt::table
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getLineColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getLineColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aGridLineColor;
@@ -566,7 +566,7 @@ namespace svt::table
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getHeaderBackgroundColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getHeaderBackgroundColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aHeaderBackgroundColor;
@@ -580,35 +580,35 @@ namespace svt::table
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getHeaderTextColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getHeaderTextColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aHeaderTextColor;
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getActiveSelectionBackColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getActiveSelectionBackColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aActiveSelectionBackColor;
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getInactiveSelectionBackColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getInactiveSelectionBackColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aInactiveSelectionBackColor;
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getActiveSelectionTextColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getActiveSelectionTextColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aActiveSelectionTextColor;
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getInactiveSelectionTextColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getInactiveSelectionTextColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aInactiveSelectionTextColor;
@@ -650,7 +650,7 @@ namespace svt::table
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getTextColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getTextColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aTextColor;
@@ -664,7 +664,7 @@ namespace svt::table
}
- ::o3tl::optional< ::Color > UnoControlTableModel::getTextLineColor() const
+ ::std::optional< ::Color > UnoControlTableModel::getTextLineColor() const
{
DBG_CHECK_ME();
return m_pImpl->m_aTextColor;
@@ -678,7 +678,7 @@ namespace svt::table
}
- ::o3tl::optional< ::std::vector< ::Color > > UnoControlTableModel::getRowBackgroundColors() const
+ ::std::optional< ::std::vector< ::Color > > UnoControlTableModel::getRowBackgroundColors() const
{
DBG_CHECK_ME();
return m_pImpl->m_aRowColors;
diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx
index 8dddb1c27690..cbaae6b151bb 100644
--- a/svtools/source/uno/unocontroltablemodel.hxx
+++ b/svtools/source/uno/unocontroltablemodel.hxx
@@ -67,16 +67,16 @@ namespace svt { namespace table
virtual void getCellContent( ColPos const i_col, RowPos const i_row, css::uno::Any& o_cellContent ) override;
virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, css::uno::Any & o_cellToolTip ) override;
virtual css::uno::Any getRowHeading( RowPos const i_rowPos ) const override;
- virtual ::o3tl::optional< ::Color > getLineColor() const override;
- virtual ::o3tl::optional< ::Color > getHeaderBackgroundColor() const override;
- virtual ::o3tl::optional< ::Color > getHeaderTextColor() const override;
- virtual ::o3tl::optional< ::Color > getActiveSelectionBackColor() const override;
- virtual ::o3tl::optional< ::Color > getInactiveSelectionBackColor() const override;
- virtual ::o3tl::optional< ::Color > getActiveSelectionTextColor() const override;
- virtual ::o3tl::optional< ::Color > getInactiveSelectionTextColor() const override;
- virtual ::o3tl::optional< ::Color > getTextColor() const override;
- virtual ::o3tl::optional< ::Color > getTextLineColor() const override;
- virtual ::o3tl::optional< ::std::vector< ::Color > >
+ virtual ::std::optional< ::Color > getLineColor() const override;
+ virtual ::std::optional< ::Color > getHeaderBackgroundColor() const override;
+ virtual ::std::optional< ::Color > getHeaderTextColor() const override;
+ virtual ::std::optional< ::Color > getActiveSelectionBackColor() const override;
+ virtual ::std::optional< ::Color > getInactiveSelectionBackColor() const override;
+ virtual ::std::optional< ::Color > getActiveSelectionTextColor() const override;
+ virtual ::std::optional< ::Color > getInactiveSelectionTextColor() const override;
+ virtual ::std::optional< ::Color > getTextColor() const override;
+ virtual ::std::optional< ::Color > getTextLineColor() const override;
+ virtual ::std::optional< ::std::vector< ::Color > >
getRowBackgroundColors() const override;
virtual css::style::VerticalAlignment
getVerticalAlign() const override;
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index f08526683f9f..74ded456eab0 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -266,7 +266,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 4d9b28ba20df..1de3d34c0636 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -350,7 +350,7 @@
#include <libxml/xmlwriter.h>
#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/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 297315a32bb7..7a8598cc1806 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -121,7 +121,7 @@ namespace accessibility
//XTextCopy
void CopyText(const SvxTextForwarder& ) override {}
- OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_Int32 /*nPos*/, o3tl::optional<Color>& /*rpTxtColor*/, o3tl::optional<Color>& /*rpFldColor*/ ) override
+ OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_Int32 /*nPos*/, std::optional<Color>& /*rpTxtColor*/, std::optional<Color>& /*rpFldColor*/ ) override
{
return OUString();
}
diff --git a/svx/source/dialog/ClassificationEditView.cxx b/svx/source/dialog/ClassificationEditView.cxx
index e7e80f58c356..4dd5c337ebb4 100644
--- a/svx/source/dialog/ClassificationEditView.cxx
+++ b/svx/source/dialog/ClassificationEditView.cxx
@@ -23,7 +23,7 @@ ClassificationEditEngine::ClassificationEditEngine(SfxItemPool* pItemPool)
{}
OUString ClassificationEditEngine::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 /*nPara*/,
- sal_Int32 /*nPos*/, o3tl::optional<Color>& /*rTxtColor*/, o3tl::optional<Color>& /*rFldColor*/)
+ sal_Int32 /*nPos*/, std::optional<Color>& /*rTxtColor*/, std::optional<Color>& /*rFldColor*/)
{
OUString aString;
const ClassificationField* pClassificationField = dynamic_cast<const ClassificationField*>(rField.GetField());
diff --git a/svx/source/dialog/ClassificationEditView.hxx b/svx/source/dialog/ClassificationEditView.hxx
index dda6e8aff6e3..96adf83abfe9 100644
--- a/svx/source/dialog/ClassificationEditView.hxx
+++ b/svx/source/dialog/ClassificationEditView.hxx
@@ -24,7 +24,7 @@ class ClassificationEditEngine final : public EditEngine
public:
ClassificationEditEngine(SfxItemPool* pItemPool);
- 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;
};
class ClassificationEditView final : public WeldEditView
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index fe7872ac6eba..ff9fc741564e 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -241,8 +241,8 @@ public:
virtual SfxItemPool* GetPool() const override;
virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- o3tl::optional<Color>& rpTxtColor,
- o3tl::optional<Color>& rpFldColor) override;
+ std::optional<Color>& rpTxtColor,
+ std::optional<Color>& rpFldColor) override;
virtual void FieldClicked(const SvxFieldItem&) override;
virtual bool IsValid() const override;
@@ -905,8 +905,8 @@ bool WeldTextForwarder::IsValid() const
}
OUString WeldTextForwarder::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara,
- sal_Int32 nPos, o3tl::optional<Color>& rpTxtColor,
- o3tl::optional<Color>& rpFldColor)
+ sal_Int32 nPos, std::optional<Color>& rpTxtColor,
+ std::optional<Color>& rpFldColor)
{
EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor)
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 5942abfa6454..908fdd193cb0 100644
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -28,7 +28,7 @@
#include <sfx2/objsh.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
using ::com::sun::star::uno::Reference;
using ::com::sun::star::container::XNameContainer;
@@ -39,7 +39,7 @@ struct FmFormModelImplData
{
rtl::Reference<FmXUndoEnvironment> mxUndoEnv;
bool bOpenInDesignIsDefaulted;
- o3tl::optional<bool> aControlsUseRefDevice;
+ std::optional<bool> aControlsUseRefDevice;
FmFormModelImplData()
:bOpenInDesignIsDefaulted( true )
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 2d0a58749e5e..91f7d2101139 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1008,8 +1008,8 @@ IMPL_LINK(SdrObjEditView, ImpOutlinerCalcFieldValueHdl, EditFieldInfo*, pFI, voi
SdrTextObj* pTextObj = mxTextEditObj.get();
if (pTextObj != nullptr)
{
- o3tl::optional<Color> pTxtCol;
- o3tl::optional<Color> pFldCol;
+ std::optional<Color> pTxtCol;
+ std::optional<Color> pFldCol;
bOk = pTextObj->CalcFieldValue(pFI->GetField(), pFI->GetPara(), pFI->GetPos(), true,
pTxtCol, pFldCol, rStr);
if (bOk)
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 59ffc2ee9a8d..bf8650439aa3 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -138,7 +138,7 @@
#include <unordered_set>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <libxml/xmlwriter.h>
#include <memory>
@@ -207,8 +207,8 @@ struct SdrObject::Impl
{
sdr::ObjectUserVector maObjectUsers;
std::shared_ptr<DiagramDataInterface> mpDiagramData;
- o3tl::optional<double> mnRelativeWidth;
- o3tl::optional<double> mnRelativeHeight;
+ std::optional<double> mnRelativeWidth;
+ std::optional<double> mnRelativeHeight;
sal_Int16 meRelativeWidthRelation;
sal_Int16 meRelativeHeightRelation;
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 6facde80b742..18e964a01830 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -550,7 +550,7 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol)
bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
bool bEdit,
- o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor, OUString& rRet) const
+ std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, OUString& rRet) const
{
const SvxFieldData* pField=rField.GetField();
const SdrMeasureField* pMeasureField=dynamic_cast<const SdrMeasureField*>( pField );
diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx
index 11fe15d6eedd..4992c6017677 100644
--- a/svx/source/svdraw/svdotxfl.cxx
+++ b/svx/source/svdraw/svdotxfl.cxx
@@ -22,7 +22,7 @@
#include <svx/svdotext.hxx>
bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_uInt16 /*nPos*/,
- bool /*bEdit*/, o3tl::optional<Color>& /*rpTxtColor*/, o3tl::optional<Color>& /*rpFldColor*/, OUString& /*rRet*/) const
+ bool /*bEdit*/, std::optional<Color>& /*rpTxtColor*/, std::optional<Color>& /*rpFldColor*/, OUString& /*rRet*/) const
{
return false;
}
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 31fb093bedb2..d283af395772 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -72,7 +72,7 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj )
}
OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- o3tl::optional<Color>& rpTxtColor, o3tl::optional<Color>& rpFldColor)
+ std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor)
{
bool bOk = false;
OUString aRet;
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 2524994f07f9..bd74d6ea479a 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -20,7 +20,7 @@
#define INCLUDED_SW_INC_ANCHOREDDRAWOBJECT_HXX
#include "anchoredobject.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
namespace tools { class Rectangle; }
@@ -33,7 +33,7 @@ class SwAnchoredDrawObject final : public SwAnchoredObject
bool mbValidPos;
// rectangle, keeping the last object rectangle after the positioning
- o3tl::optional<tools::Rectangle> maLastObjRect;
+ std::optional<tools::Rectangle> maLastObjRect;
// boolean, indicating that anchored drawing object hasn't been attached
// to an anchor frame yet. Once, it is attached to an anchor frame the
@@ -120,7 +120,7 @@ class SwAnchoredDrawObject final : public SwAnchoredObject
// accessors to the object area and its position
virtual SwRect GetObjRect() const override;
- o3tl::optional<tools::Rectangle> const & GetLastObjRect() const { return maLastObjRect;}
+ std::optional<tools::Rectangle> const & GetLastObjRect() const { return maLastObjRect;}
void SetLastObjRect( const tools::Rectangle& _rNewObjRect );
/** adjust positioning and alignment attributes for new anchor frame
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 3c49316b74f3..f18050eec156 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -129,7 +129,7 @@ bool ReplaceImpl(SwPaM & rCursor, OUString const& rReplacement,
bool const bRegExp, SwDoc & rDoc, SwRootFrame const*const pLayout);
/// Helperfunction to resolve backward references in regular expressions
-o3tl::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt,
+std::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt,
SwPaM* pPam, SwRootFrame const* pLayout );
bool GetRanges(std::vector<std::shared_ptr<SwUnoCursor>> & rRanges,
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 9b5a59702952..887ddbcf49e1 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -24,7 +24,7 @@
#include "hintids.hxx"
#include "format.hxx"
#include "calbck.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
#include "pagedesc.hxx"
class IntlWrapper;
@@ -34,7 +34,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFormatPageDesc : public SfxPoolItem, public SwClient
{
- ::o3tl::optional<sal_uInt16> m_oNumOffset; ///< Offset page number.
+ ::std::optional<sal_uInt16> m_oNumOffset; ///< Offset page number.
SwModify* m_pDefinedIn; /**< Points to the object in which the
attribute was set (ContentNode/Format). */
protected:
@@ -62,8 +62,8 @@ public:
SwPageDesc *GetPageDesc() { return static_cast<SwPageDesc*>(GetRegisteredIn()); }
const SwPageDesc *GetPageDesc() const { return static_cast<const SwPageDesc*>(GetRegisteredIn()); }
- const ::o3tl::optional<sal_uInt16>& GetNumOffset() const { return m_oNumOffset; }
- void SetNumOffset( const ::o3tl::optional<sal_uInt16>& oNum ) { m_oNumOffset = oNum; }
+ const ::std::optional<sal_uInt16>& GetNumOffset() const { return m_oNumOffset; }
+ void SetNumOffset( const ::std::optional<sal_uInt16>& oNum ) { m_oNumOffset = oNum; }
/// Query / set where attribute is anchored.
const SwModify* GetDefinedIn() const { return m_pDefinedIn; }
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index 92377e666028..3e8c55bf5942 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -340,7 +340,7 @@
#include <i18nutil/transliteration.hxx>
#include <o3tl/cow_wrapper.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/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 83ced7f22e1c..bfd07f24abad 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -274,7 +274,7 @@
#include <o3tl/any.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx
index f84dfe35cd5c..39909eb342bc 100644
--- a/sw/inc/pch/precompiled_swui.hxx
+++ b/sw/inc/pch/precompiled_swui.hxx
@@ -367,7 +367,7 @@
#include <i18nutil/transliteration.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
diff --git a/sw/inc/pch/precompiled_vbaswobj.hxx b/sw/inc/pch/precompiled_vbaswobj.hxx
index b19ca8c76888..26ed24e28f76 100644
--- a/sw/inc/pch/precompiled_vbaswobj.hxx
+++ b/sw/inc/pch/precompiled_vbaswobj.hxx
@@ -247,7 +247,7 @@
#include <editeng/svxenum.hxx>
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 8503eca4f7f9..5bbccc87dc93 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -29,7 +29,7 @@
#include <cstddef>
#include <memory>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
class SfxItemSet;
@@ -158,7 +158,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
bool m_bIsVisible : 1;
sal_uInt32 const m_nId;
- o3tl::optional<long> m_oLOKLastNodeTop;
+ std::optional<long> m_oLOKLastNodeTop;
void MoveToSection();
void CopyToSection();
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index dfe31d8978f6..45edeb57e28b 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -23,7 +23,7 @@
#include <sfx2/sfxdlg.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include "dbmgr.hxx"
#include <cnttab.hxx>
#include "tblenum.hxx"
@@ -232,7 +232,7 @@ protected:
public:
virtual OUString GetTemplateName() = 0;
virtual sal_uInt16 GetKind() = 0;
- virtual ::o3tl::optional<sal_uInt16> GetPageNumber() = 0;
+ virtual ::std::optional<sal_uInt16> GetPageNumber() = 0;
};
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 4b9b0f48ee51..80f90e302db6 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -27,7 +27,7 @@
#include "SwRewriter.hxx"
#include "swundo.hxx"
#include <o3tl/typed_flags_set.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class SwHistory;
class SwPaM;
@@ -58,7 +58,7 @@ class SwUndo
protected:
bool m_bCacheComment;
- mutable o3tl::optional<OUString> maComment;
+ mutable std::optional<OUString> maComment;
static void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, const sal_uLong* pEndIdx = nullptr );
static void RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext );
diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx
index dfbb71abdce1..28b09e0e84c9 100644
--- a/sw/source/core/crsr/BlockCursor.hxx
+++ b/sw/source/core/crsr/BlockCursor.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_SW_SOURCE_CORE_CRSR_BLOCKCURSOR_HXX
#define INCLUDED_SW_SOURCE_CORE_CRSR_BLOCKCURSOR_HXX
-#include <o3tl/optional.hxx>
+#include <optional>
#include <tools/gen.hxx>
#include <viscrs.hxx>
@@ -39,8 +39,8 @@ struct SwPosition;
class SwBlockCursor
{
SwShellCursor maCursor;
- o3tl::optional<Point> maStartPt;
- o3tl::optional<Point> maEndPt;
+ std::optional<Point> maStartPt;
+ std::optional<Point> maEndPt;
public:
SwBlockCursor( const SwCursorShell& rCursorSh, const SwPosition &rPos ) :
@@ -69,12 +69,12 @@ public:
@return 0, if no start point has been set
*/
- o3tl::optional<Point> const & getStartPoint() const { return maStartPt; }
+ std::optional<Point> const & getStartPoint() const { return maStartPt; }
/** The document coordinates where the block selection ends (at the moment)
@return 0, if no end point has been set
*/
- o3tl::optional<Point> const & getEndPoint() const { return maEndPt; }
+ std::optional<Point> const & getEndPoint() const { return maEndPt; }
/** Deletion of the mouse created rectangle
When start and end points exist, the block cursor depends on this. If the
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index f299436eeb61..796da73697af 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -55,7 +55,7 @@ namespace sw::mark
sal_uLong const nStartNode(rStartPos.nNode.GetIndex());
sal_uLong const nEndNode(rEndPos.nNode.GetIndex());
int nFields(0);
- o3tl::optional<SwPosition> ret;
+ std::optional<SwPosition> ret;
for (sal_uLong n = nEndNode; nStartNode <= n; --n)
{
SwNode *const pNode(rNodes[n]);
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index d58cedfbf919..29ff1e41edd9 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -40,7 +40,7 @@
#include <pamtyp.hxx>
#include <txtfrm.hxx>
#include <swundo.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <algorithm>
#include <memory>
@@ -64,9 +64,9 @@ static bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
return static_cast<const SvxColorItem&>(rItem1).GetValue().IsRGBEqual(
static_cast<const SvxColorItem&>(rItem2).GetValue() );
case RES_PAGEDESC:
- ::o3tl::optional<sal_uInt16> const oNumOffset1 =
+ ::std::optional<sal_uInt16> const oNumOffset1 =
static_cast<const SwFormatPageDesc&>(rItem1).GetNumOffset();
- ::o3tl::optional<sal_uInt16> const oNumOffset2 =
+ ::std::optional<sal_uInt16> const oNumOffset2 =
static_cast<const SwFormatPageDesc&>(rItem2).GetNumOffset();
if (oNumOffset1 != oNumOffset2)
@@ -1302,7 +1302,7 @@ int SwFindParaAttr::DoFind(SwPaM & rCursor, SwMoveFnCollection const & fnMove,
const_cast<SwPaM &>(rRegion).GetRingContainer().merge( m_rCursor.GetRingContainer() );
}
- o3tl::optional<OUString> xRepl;
+ std::optional<OUString> xRepl;
if (bRegExp)
xRepl = sw::ReplaceBackReferences(*pSearchOpt, &rCursor, m_pLayout);
sw::ReplaceImpl(rCursor,
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index cda6ef6161b3..0f8d83f3a035 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -140,7 +140,7 @@ public:
class MaybeMergedIter
{
- o3tl::optional<sw::MergedAttrIter> m_oMergedIter;
+ std::optional<sw::MergedAttrIter> m_oMergedIter;
SwTextNode const*const m_pNode;
size_t m_HintIndex;
@@ -951,7 +951,7 @@ int SwFindParaText::DoFind(SwPaM & rCursor, SwMoveFnCollection const & fnMove,
const_cast<SwPaM&>(rRegion).GetRingContainer().merge( m_rCursor.GetRingContainer() );
}
- o3tl::optional<OUString> xRepl;
+ std::optional<OUString> xRepl;
if (bRegExp)
xRepl = sw::ReplaceBackReferences(m_rSearchOpt, &rCursor, m_pLayout);
bool const bReplaced = sw::ReplaceImpl(rCursor,
@@ -1094,10 +1094,10 @@ bool ReplaceImpl(
return bReplaced;
}
-o3tl::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt,
+std::optional<OUString> ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt,
SwPaM *const pPam, SwRootFrame const*const pLayout)
{
- o3tl::optional<OUString> xRet;
+ std::optional<OUString> xRet;
if( pPam && pPam->HasMark() &&
SearchAlgorithms2::REGEXP == rSearchOpt.AlgorithmType2 )
{
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 6a9b4d290096..cdc449943fca 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -526,7 +526,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
else if (dynamic_cast<const SdrMeasureField*>( pField))
{
// Clear measure field
- pInfo->SetFieldColor(o3tl::optional<Color>());
+ pInfo->SetFieldColor(std::optional<Color>());
}
else if ( auto pTimeField = dynamic_cast<const SvxExtTimeField*>( pField) )
{
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index ac914db0bb68..819fd1d4cb32 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -55,7 +55,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
SwPageFrame *pPage = GetCurrFrame()->FindPageFrame();
const SwFrame *pFlow = nullptr;
- ::o3tl::optional<sal_uInt16> oPageNumOffset;
+ ::std::optional<sal_uInt16> oPageNumOffset;
OSL_ENSURE( !GetCursor()->HasMark(), "ChgCurPageDesc only without selection!");
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index b608d2e8e4a8..1751c9d913e0 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -408,7 +408,7 @@ sal_uInt16 SwFEShell::GetPageOffset() const
{
if ( pFlow->IsInTab() )
pFlow = pFlow->FindTabFrame();
- ::o3tl::optional<sal_uInt16> oNumOffset = pFlow->GetPageDescItem().GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = pFlow->GetPageDescItem().GetNumOffset();
if ( oNumOffset )
return *oNumOffset;
}
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index 210c7f668d5e..2049d8b502f2 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -23,7 +23,7 @@
#include <undobj.hxx>
#include <rtl/ustring.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
class SwRedlineSaveDatas;
class SwTextNode;
@@ -38,7 +38,7 @@ class SwUndoDelete
, private SwUndoSaveContent
{
std::unique_ptr<SwNodeIndex> m_pMvStt; // Position of Nodes in UndoNodes-Array
- o3tl::optional<OUString> m_aSttStr, m_aEndStr;
+ std::optional<OUString> m_aSttStr, m_aEndStr;
std::unique_ptr<SwRedlineSaveDatas> m_pRedlSaveData;
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
index 8d1cf55c78d6..1e62a0a30c9c 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -27,7 +27,7 @@
#include <rtl/ustring.hxx>
#include <swtypes.hxx>
#include <IDocumentContentOperations.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class Graphic;
class SwGrfNode;
@@ -41,8 +41,8 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent
{
/// start of Content in UndoNodes for Redo
std::unique_ptr<SwNodeIndex> m_pUndoNodeIndex;
- o3tl::optional<OUString> maText;
- o3tl::optional<OUString> maUndoText;
+ std::optional<OUString> maText;
+ std::optional<OUString> maUndoText;
std::unique_ptr<SwRedlineData> m_pRedlData;
sal_uLong m_nNode;
sal_Int32 m_nContent, m_nLen;
@@ -59,7 +59,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent
SwDoc * m_pDoc;
void Init(const SwNodeIndex & rNode);
- o3tl::optional<OUString> GetTextFromDoc() const;
+ std::optional<OUString> GetTextFromDoc() const;
public:
SwUndoInsert( const SwNodeIndex& rNode, sal_Int32 nContent, sal_Int32 nLen,
@@ -135,8 +135,8 @@ private:
class SwUndoReRead : public SwUndo
{
std::unique_ptr<Graphic> mpGraphic;
- o3tl::optional<OUString> maNm;
- o3tl::optional<OUString> maFltr;
+ std::optional<OUString> maNm;
+ std::optional<OUString> maFltr;
sal_uLong mnPosition;
MirrorGraph mnMirror;
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 53e1027f488d..7603efb463a2 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -28,7 +28,7 @@
#include <swtypes.hxx>
#include "drawfont.hxx"
#include <editeng/borderline.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/enumarray.hxx>
class SfxItemSet;
@@ -140,10 +140,10 @@ class SwFont
Color m_aOverColor; // color of the overlining
// character borders
- o3tl::optional<editeng::SvxBorderLine> m_aTopBorder;
- o3tl::optional<editeng::SvxBorderLine> m_aBottomBorder;
- o3tl::optional<editeng::SvxBorderLine> m_aRightBorder;
- o3tl::optional<editeng::SvxBorderLine> m_aLeftBorder;
+ std::optional<editeng::SvxBorderLine> m_aTopBorder;
+ std::optional<editeng::SvxBorderLine> m_aBottomBorder;
+ std::optional<editeng::SvxBorderLine> m_aRightBorder;
+ std::optional<editeng::SvxBorderLine> m_aLeftBorder;
// border distance
sal_uInt16 m_nTopBorderDist;
@@ -336,19 +336,19 @@ public:
void SetRightBorder( const editeng::SvxBorderLine* pRightBorder );
void SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder );
- const o3tl::optional<editeng::SvxBorderLine>& GetTopBorder() const { return m_aTopBorder; }
- const o3tl::optional<editeng::SvxBorderLine>& GetBottomBorder() const { return m_aBottomBorder; }
- const o3tl::optional<editeng::SvxBorderLine>& GetRightBorder() const { return m_aRightBorder; }
- const o3tl::optional<editeng::SvxBorderLine>& GetLeftBorder() const { return m_aLeftBorder; }
+ const std::optional<editeng::SvxBorderLine>& GetTopBorder() const { return m_aTopBorder; }
+ const std::optional<editeng::SvxBorderLine>& GetBottomBorder() const { return m_aBottomBorder; }
+ const std::optional<editeng::SvxBorderLine>& GetRightBorder() const { return m_aRightBorder; }
+ const std::optional<editeng::SvxBorderLine>& GetLeftBorder() const { return m_aLeftBorder; }
// Get absolute border correspond to the layout verticality and orientation.
- const o3tl::optional<editeng::SvxBorderLine>&
+ const std::optional<editeng::SvxBorderLine>&
GetAbsTopBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const;
- const o3tl::optional<editeng::SvxBorderLine>&
+ const std::optional<editeng::SvxBorderLine>&
GetAbsBottomBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const;
- const o3tl::optional<editeng::SvxBorderLine>&
+ const std::optional<editeng::SvxBorderLine>&
GetAbsRightBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const;
- const o3tl::optional<editeng::SvxBorderLine>&
+ const std::optional<editeng::SvxBorderLine>&
GetAbsLeftBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const;
void SetTopBorderDist( const sal_uInt16 nTopDist );
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 4d063cace493..c5b4df884b9e 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -29,7 +29,7 @@
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <tools/color.hxx>
#include <swtypes.hxx>
@@ -407,7 +407,7 @@ public:
WrongListIteratorCounter(SwWrongList const& rWrongList);
sal_uInt16 GetElementCount();
- o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>> GetElementAt(sal_uInt16 nIndex);
+ std::optional<std::pair<TextFrameIndex, TextFrameIndex>> GetElementAt(sal_uInt16 nIndex);
};
} // namespace sw
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index b1553c36bcd5..78f47d47d731 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -701,7 +701,7 @@ bool SwFormatPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
case MID_PAGEDESC_PAGENUMOFFSET:
{
- ::o3tl::optional<sal_uInt16> oOffset = GetNumOffset();
+ ::std::optional<sal_uInt16> oOffset = GetNumOffset();
if (oOffset)
{
rVal <<= static_cast<sal_Int16>(*oOffset);
@@ -745,7 +745,7 @@ bool SwFormatPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nOffset = 0;
if (!rVal.hasValue())
{
- SetNumOffset(o3tl::nullopt);
+ SetNumOffset(std::nullopt);
}
else if (rVal >>= nOffset)
SetNumOffset( nOffset );
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index ce5d753524f6..5094c145c217 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -408,8 +408,8 @@ void SwFrame::PrepareCursor()
std::list<FlowFrameJoinLockGuard> tabGuard;
std::list<SwFrameDeleteGuard> rowGuard;
#else
- o3tl::optional<FlowFrameJoinLockGuard> tabGuard;
- o3tl::optional<SwFrameDeleteGuard> rowGuard;
+ std::optional<FlowFrameJoinLockGuard> tabGuard;
+ std::optional<SwFrameDeleteGuard> rowGuard;
#endif
SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr;
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index a10239af226f..6a4b853196ca 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -848,7 +848,7 @@ bool SwFrame::WrongPageDesc( SwPageFrame* pNew )
//My Pagedesc doesn't count if I'm a follow!
const SwPageDesc *pDesc = nullptr;
- o3tl::optional<sal_uInt16> oTmp;
+ std::optional<sal_uInt16> oTmp;
SwFlowFrame *pFlow = SwFlowFrame::CastFlowFrame( this );
if ( !pFlow || !pFlow->IsFollow() )
{
@@ -2531,7 +2531,7 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
#if BOOST_VERSION < 105600
std::list<SwFrameDeleteGuard> g;
#else
- ::o3tl::optional<SwFrameDeleteGuard> g;
+ ::std::optional<SwFrameDeleteGuard> g;
#endif
if (m_rThis.GetUpper()->IsCellFrame())
{
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 94c2ff2ae12a..2f0608056008 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -654,7 +654,7 @@ bool SwLayHelper::CheckInsertPage()
if ( bBrk || pDesc )
{
- ::o3tl::optional<sal_uInt16> oPgNum;
+ ::std::optional<sal_uInt16> oPgNum;
if ( !pDesc )
{
pDesc = mrpPage->GetPageDesc()->GetFollow();
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index a712007f8c49..2827a5ca68de 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -462,7 +462,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
// Get hold of PageDesc (either via FrameFormat of the first node or the initial one).
SwPageDesc *pDesc = nullptr;
- ::o3tl::optional<sal_uInt16> oPgNum;
+ ::std::optional<sal_uInt16> oPgNum;
if ( pTableNd )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 588b650fb920..b93b5a23440b 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1303,7 +1303,7 @@ SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote )
pDesc = rDesc.GetPageDesc();
if ( rDesc.GetNumOffset() )
{
- ::o3tl::optional<sal_uInt16> oNumOffset = rDesc.GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = rDesc.GetNumOffset();
bWishedRightPage = sw::IsRightPageByNumber(*pRoot, *oNumOffset);
// use the opportunity to set the flag at root
pRoot->SetVirtPageNum( true );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 50cc2aaac8a7..0e7969a32b93 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4759,7 +4759,7 @@ namespace drawinglayer::primitive2d
namespace {
-editeng::SvxBorderLine const * get_ptr(o3tl::optional<editeng::SvxBorderLine> const & opt) {
+editeng::SvxBorderLine const * get_ptr(std::optional<editeng::SvxBorderLine> const & opt) {
return opt ? &*opt : nullptr;
}
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 6e2c7fba14c9..f8a5a3b423e0 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1716,7 +1716,7 @@ bool SwFrame::WannaRightPage() const
const SwFrame *pFlow = pPage->FindFirstBodyContent();
const SwPageDesc *pDesc = nullptr;
- ::o3tl::optional<sal_uInt16> oPgNum;
+ ::std::optional<sal_uInt16> oPgNum;
if ( pFlow )
{
if ( pFlow->IsInTab() )
@@ -1840,7 +1840,7 @@ sal_uInt16 SwFrame::GetVirtPageNum() const
}
if ( pFrame )
{
- ::o3tl::optional<sal_uInt16> oNumOffset = pFrame->GetPageDescItem().GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = pFrame->GetPageDescItem().GetNumOffset();
if (oNumOffset)
{
return nPhyPage - pFrame->GetPhyPageNum() + *oNumOffset;
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index f69fdfbfc5b9..ec3fd196d60a 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -112,7 +112,7 @@ SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh,
if( m_aRect.Bottom() > nBottom )
m_aRect.Bottom( nBottom );
}
- o3tl::optional<bool> oIsRightPage;
+ std::optional<bool> oIsRightPage;
if( bLineNum )
{
/* Initializes the Members necessary for line numbering:
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 9fa74a0d4833..d572ddd45312 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <paratr.hxx>
#include <sal/log.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <editeng/adjustitem.hxx>
#include <editeng/charhiddenitem.hxx>
#include <svl/asiancfg.hxx>
@@ -729,7 +729,7 @@ SwFontScript SwScriptInfo::WhichFont(sal_Int32 nIdx, OUString const& rText)
}
static void InitBookmarks(
- o3tl::optional<std::vector<sw::Extent>::const_iterator> oPrevIter,
+ std::optional<std::vector<sw::Extent>::const_iterator> oPrevIter,
std::vector<sw::Extent>::const_iterator iter,
std::vector<sw::Extent>::const_iterator const end,
TextFrameIndex nOffset,
@@ -917,7 +917,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
{
SwTextNode const* pNode(nullptr);
TextFrameIndex nOffset(0);
- o3tl::optional<std::vector<sw::Extent>::const_iterator> oPrevIter;
+ std::optional<std::vector<sw::Extent>::const_iterator> oPrevIter;
for (auto iter = pMerged->extents.begin(); iter != pMerged->extents.end();
oPrevIter = iter, ++iter)
{
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index be570670593d..5a70c7be9507 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -875,7 +875,7 @@ sal_uInt16 WrongListIteratorCounter::GetElementCount()
return 0;
}
-o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>>
+std::optional<std::pair<TextFrameIndex, TextFrameIndex>>
WrongListIteratorCounter::GetElementAt(sal_uInt16 nIndex)
{
if (m_pMergedPara)
@@ -906,7 +906,7 @@ WrongListIteratorCounter::GetElementAt(sal_uInt16 nIndex)
{
if (nIndex == 0)
{
- return o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>>(
+ return std::optional<std::pair<TextFrameIndex, TextFrameIndex>>(
std::pair<TextFrameIndex, TextFrameIndex>(
m_CurrentIndex - TextFrameIndex(rExtent.nStart -
std::max(rExtent.nStart, pWrong->mnPos)),
@@ -919,17 +919,17 @@ WrongListIteratorCounter::GetElementAt(sal_uInt16 nIndex)
m_CurrentIndex += TextFrameIndex(rExtent.nEnd - rExtent.nStart);
++m_CurrentExtent;
}
- return o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>>();
+ return std::optional<std::pair<TextFrameIndex, TextFrameIndex>>();
}
else if (m_pWrongList)
{
SwWrongArea const*const pWrong(m_pWrongList->GetElement(nIndex));
- return o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>>(
+ return std::optional<std::pair<TextFrameIndex, TextFrameIndex>>(
std::pair<TextFrameIndex, TextFrameIndex>(
TextFrameIndex(pWrong->mnPos),
TextFrameIndex(pWrong->mnPos + pWrong->mnLen)));
}
- return o3tl::optional<std::pair<TextFrameIndex, TextFrameIndex>>();
+ return std::optional<std::pair<TextFrameIndex, TextFrameIndex>>();
}
} // namespace sw
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 7857b2eaa2c5..e62f8d1fb6eb 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -30,7 +30,7 @@
#include <hints.hxx>
#include <calbck.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <sal/log.hxx>
#include <osl/diagnose.h>
@@ -817,7 +817,7 @@ lcl_SearchNextToken(const OUString & sPattern, sal_Int32 const nStt)
@return the token
*/
-static o3tl::optional<SwFormToken>
+static std::optional<SwFormToken>
lcl_BuildToken(const OUString & sPattern, sal_Int32 & nCurPatternPos)
{
OUString sToken( lcl_SearchNextToken(sPattern, nCurPatternPos) );
@@ -827,7 +827,7 @@ lcl_BuildToken(const OUString & sPattern, sal_Int32 & nCurPatternPos)
if (TOKEN_END == eTokenType) // invalid input? skip it
{
nCurPatternPos = sPattern.getLength();
- return o3tl::optional<SwFormToken>();
+ return std::optional<SwFormToken>();
}
// at this point sPattern contains the
@@ -906,7 +906,7 @@ SwFormTokensHelper::SwFormTokensHelper(const OUString & rPattern)
while (nCurPatternPos < rPattern.getLength())
{
- o3tl::optional<SwFormToken> const oToken(
+ std::optional<SwFormToken> const oToken(
lcl_BuildToken(rPattern, nCurPatternPos));
if (oToken)
m_Tokens.push_back(*oToken);
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 8d7a4f42468e..b8789594bb84 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -121,7 +121,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
m_aSub[SwFontScript::Latin].m_nFontCacheId = m_aSub[SwFontScript::CJK].m_nFontCacheId = m_aSub[SwFontScript::CTL].m_nFontCacheId = nullptr;
}
-const o3tl::optional<editeng::SvxBorderLine>&
+const std::optional<editeng::SvxBorderLine>&
SwFont::GetAbsTopBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
{
switch (GetOrientation(bVertLayout, bVertLayoutLRBT))
@@ -145,7 +145,7 @@ SwFont::GetAbsTopBorder(const bool bVertLayout, const bool bVertLayoutLRBT) cons
}
}
-const o3tl::optional<editeng::SvxBorderLine>&
+const std::optional<editeng::SvxBorderLine>&
SwFont::GetAbsBottomBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
{
switch (GetOrientation(bVertLayout, bVertLayoutLRBT))
@@ -169,7 +169,7 @@ SwFont::GetAbsBottomBorder(const bool bVertLayout, const bool bVertLayoutLRBT) c
}
}
-const o3tl::optional<editeng::SvxBorderLine>&
+const std::optional<editeng::SvxBorderLine>&
SwFont::GetAbsLeftBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
{
switch (GetOrientation(bVertLayout, bVertLayoutLRBT))
@@ -193,7 +193,7 @@ SwFont::GetAbsLeftBorder(const bool bVertLayout, const bool bVertLayoutLRBT) con
}
}
-const o3tl::optional<editeng::SvxBorderLine>&
+const std::optional<editeng::SvxBorderLine>&
SwFont::GetAbsRightBorder(const bool bVertLayout, const bool bVertLayoutLRBT) const
{
switch (GetOrientation(bVertLayout, bVertLayoutLRBT))
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index be497b5b8889..4609bd8412e7 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <o3tl/optional.hxx>
+#include <optional>
#include <libxml/xmlwriter.h>
#include <svl/itempool.hxx>
#include <txatbase.hxx>
@@ -95,7 +95,7 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("end"), BAD_CAST(OString::number(*End()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
const char* pWhich = nullptr;
- o3tl::optional<OString> oValue;
+ std::optional<OString> oValue;
switch (Which())
{
case RES_TXTATR_AUTOFMT:
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index f299aed85456..51d859b5b5d5 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -773,7 +773,7 @@ SwRewriter SwUndoDelete::GetRewriter() const
}
else
{
- o3tl::optional<OUString> aTmpStr;
+ std::optional<OUString> aTmpStr;
if (m_aSttStr)
aTmpStr = m_aSttStr;
else if (m_aEndStr)
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 46e0f55a4725..10ca3470938d 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -56,9 +56,9 @@ using namespace ::com::sun::star;
// INSERT
-o3tl::optional<OUString> SwUndoInsert::GetTextFromDoc() const
+std::optional<OUString> SwUndoInsert::GetTextFromDoc() const
{
- o3tl::optional<OUString> aResult;
+ std::optional<OUString> aResult;
SwNodeIndex aNd( m_pDoc->GetNodes(), m_nNode);
SwContentNode* pCNd = aNd.GetNode().GetContentNode();
@@ -448,7 +448,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
SwRewriter SwUndoInsert::GetRewriter() const
{
SwRewriter aResult;
- o3tl::optional<OUString> aStr;
+ std::optional<OUString> aStr;
bool bDone = false;
if (maText)
@@ -794,7 +794,7 @@ void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext)
// cache the old values
std::unique_ptr<Graphic> pOldGrf( mpGraphic ? new Graphic(*mpGraphic) : nullptr);
- o3tl::optional<OUString> aOldNm = maNm;
+ std::optional<OUString> aOldNm = maNm;
MirrorGraph nOldMirr = mnMirror;
// since all of them are cleared/modified by SaveGraphicData:
SaveGraphicData( *pGrfNd );
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 3b4b9bac0ac5..3250307078b4 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1085,7 +1085,7 @@ class HTMLEndPosLst
SwDoc *pDoc; // the current document
SwDoc* const pTemplate; // the HTML template (or 0)
- o3tl::optional<Color> xDfltColor;// the default foreground colors
+ std::optional<Color> xDfltColor;// the default foreground colors
std::set<OUString>& rScriptTextStyles;
sal_uLong const nHTMLMode;
@@ -1129,7 +1129,7 @@ class HTMLEndPosLst
public:
- HTMLEndPosLst( SwDoc *pDoc, SwDoc* pTemplate, o3tl::optional<Color> xDfltColor,
+ HTMLEndPosLst( SwDoc *pDoc, SwDoc* pTemplate, std::optional<Color> xDfltColor,
bool bOutStyles, sal_uLong nHTMLMode,
const OUString& rText, std::set<OUString>& rStyles );
~HTMLEndPosLst();
@@ -1577,7 +1577,7 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat,
return pFormatInfo;
}
-HTMLEndPosLst::HTMLEndPosLst(SwDoc* pD, SwDoc* pTempl, o3tl::optional<Color> xDfltCol,
+HTMLEndPosLst::HTMLEndPosLst(SwDoc* pD, SwDoc* pTempl, std::optional<Color> xDfltCol,
bool bStyles, sal_uLong nMode, const OUString& rText,
std::set<OUString>& rStyles)
: pDoc(pD)
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 5d17081fdfd4..f23a5d67acd4 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -296,7 +296,7 @@ public:
css::uno::Reference<css::container::XIndexContainer> mxFormComps; // current form
rtl::Reference<SwDoc> m_xTemplate; // HTML template
- o3tl::optional<Color> m_xDfltColor; // default colour
+ std::optional<Color> m_xDfltColor; // default colour
SwNodeIndex *m_pStartNdIdx; // index of first paragraph
const SwPageDesc *m_pCurrPageDesc;// current page style
const SwFormatFootnote *m_pFormatFootnote;
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index b05c6804c7da..3a0b157e7b1b 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -27,7 +27,7 @@
#include <rtl/textenc.h>
#include <editeng/svxenum.hxx>
#include <tools/solar.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <swtypes.hxx>
@@ -339,7 +339,7 @@ public:
/// The style of the page numbers.
///
- virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber ) = 0;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::std::optional<sal_uInt16>& oPageRestartNumber ) = 0;
/// The type of breaking.
virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index dc56f3664e66..4b46844e0e6e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2455,7 +2455,7 @@ const NameToId constNameToIdMapping[] =
{ OUString("styleSet"), FSNS( XML_w14, XML_styleSet ) },
};
-o3tl::optional<sal_Int32> lclGetElementIdForName(const OUString& rName)
+std::optional<sal_Int32> lclGetElementIdForName(const OUString& rName)
{
for (auto const & i : constNameToIdMapping)
{
@@ -2464,7 +2464,7 @@ o3tl::optional<sal_Int32> lclGetElementIdForName(const OUString& rName)
return i.maId;
}
}
- return o3tl::optional<sal_Int32>();
+ return std::optional<sal_Int32>();
}
void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<css::beans::PropertyValue>& rElements, sax_fastparser::FSHelperPtr const & pSerializer)
@@ -2494,7 +2494,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
aValue = OUStringToOString(aAny.get<OUString>(), RTL_TEXTENCODING_ASCII_US);
}
- o3tl::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rAttribute.Name);
+ std::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rAttribute.Name);
if(aSubElementId)
pAttributes->add(*aSubElementId, aValue.getStr());
}
@@ -2507,7 +2507,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
{
css::uno::Sequence<css::beans::PropertyValue> aSumElements;
- o3tl::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rElement.Name);
+ std::optional<sal_Int32> aSubElementId = lclGetElementIdForName(rElement.Name);
if(aSubElementId)
{
rElement.Value >>= aSumElements;
@@ -2571,7 +2571,7 @@ void DocxAttributeOutput::WriteCollectedRunProperties()
m_pColorAttrList.clear();
for (const beans::PropertyValue & i : m_aTextEffectsGrabBag)
{
- o3tl::optional<sal_Int32> aElementId = lclGetElementIdForName(i.Name);
+ std::optional<sal_Int32> aElementId = lclGetElementIdForName(i.Name);
if(aElementId)
{
uno::Sequence<beans::PropertyValue> aGrabBagSeq;
@@ -6317,13 +6317,13 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType , const SfxItemSet *pOut
}
-void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber )
+void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, const ::std::optional<sal_uInt16>& oPageRestartNumber )
{
// FIXME Not called properly with page styles like "First Page"
FastAttributeList* pAttr = FastSerializerHelper::createAttrList();
- // o3tl::nullopt means no restart: then don't output that attribute if it is negative
+ // std::nullopt means no restart: then don't output that attribute if it is negative
if ( oPageRestartNumber )
pAttr->add( FSNS( XML_w, XML_start ), OString::number( *oPageRestartNumber ) );
@@ -8312,9 +8312,9 @@ void DocxAttributeOutput::FormatAnchor( const SwFormatAnchor& )
// Fly frames: anchors here aren't matching the anchors in docx
}
-static o3tl::optional<sal_Int32> lcl_getDmlAlpha(const SvxBrushItem& rBrush)
+static std::optional<sal_Int32> lcl_getDmlAlpha(const SvxBrushItem& rBrush)
{
- o3tl::optional<sal_Int32> oRet;
+ std::optional<sal_Int32> oRet;
sal_Int32 nTransparency = rBrush.GetColor().GetTransparency();
if (nTransparency)
{
@@ -8333,7 +8333,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
{
const Color aColor = rBrush.GetColor();
OString sColor = msfilter::util::ConvertColor( aColor.GetRGBColor() );
- o3tl::optional<sal_Int32> oAlpha = lcl_getDmlAlpha(rBrush);
+ std::optional<sal_Int32> oAlpha = lcl_getDmlAlpha(rBrush);
if (m_rExport.SdrExporter().getTextFrameSyntax())
{
// Handle 'Opacity'
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 894b24ba1a36..ebcff8966b37 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -37,7 +37,7 @@
#include <fldbas.hxx>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/sorted_vector.hxx>
#include <oox/export/vmlexport.hxx>
#include <oox/export/drawingml.hxx>
@@ -300,7 +300,7 @@ public:
/// The style of the page numbers.
///
- virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber ) override;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::std::optional<sal_uInt16>& oPageRestartNumber ) override;
/// The type of breaking.
virtual void SectionType( sal_uInt8 nBreakCode ) override;
@@ -934,7 +934,7 @@ private:
std::vector<sal_Int32> lastOpenCell;
std::vector<sal_Int32> lastClosedCell;
- o3tl::optional<css::drawing::FillStyle> m_oFillStyle;
+ std::optional<css::drawing::FillStyle> m_oFillStyle;
/// If FormatBox() already handled fill style / gradient.
bool m_bIgnoreNextFill;
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 487ec6bb3052..cae179d416fa 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -15,7 +15,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <sax/fastattribs.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -525,8 +525,8 @@ void DocxTableStyleExport::Impl::tableStyleTablePr(
uno::Sequence<beans::PropertyValue> aTableInd;
uno::Sequence<beans::PropertyValue> aTableBorders;
uno::Sequence<beans::PropertyValue> aTableCellMar;
- o3tl::optional<sal_Int32> oTableStyleRowBandSize;
- o3tl::optional<sal_Int32> oTableStyleColBandSize;
+ std::optional<sal_Int32> oTableStyleRowBandSize;
+ std::optional<sal_Int32> oTableStyleColBandSize;
for (const auto& rProp : rTablePr)
{
if (rProp.Name == "tblStyleRowBandSize")
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 4e729a4adb26..36b03f6a0d94 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1291,8 +1291,8 @@ void RtfAttributeOutput::SectionBiDi(bool bBiDi)
: OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
-void RtfAttributeOutput::SectionPageNumbering(
- sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber)
+void RtfAttributeOutput::SectionPageNumbering(sal_uInt16 nNumType,
+ const ::std::optional<sal_uInt16>& oPageRestartNumber)
{
if (oPageRestartNumber)
{
@@ -3214,7 +3214,7 @@ void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround)
{
// See DocxSdrExport::startDMLAnchorInline() for SwFormatSurround -> WR / WRK mappings.
sal_Int32 nWr = -1;
- o3tl::optional<sal_Int32> oWrk;
+ std::optional<sal_Int32> oWrk;
switch (rSurround.GetValue())
{
case css::text::WrapTextMode_NONE:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index b96887479273..2bf4cd6450f6 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -30,7 +30,7 @@
#include <rtl/strbuf.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class SwGrfNode;
class SwOLENode;
@@ -193,7 +193,7 @@ public:
/// The style of the page numbers.
///
void SectionPageNumbering(sal_uInt16 nNumType,
- const ::o3tl::optional<sal_uInt16>& oPageRestartNumber) override;
+ const ::std::optional<sal_uInt16>& oPageRestartNumber) override;
/// The type of breaking.
void SectionType(sal_uInt8 nBreakCode) override;
@@ -610,7 +610,7 @@ private:
std::vector<std::pair<OString, OString>> m_aFlyProperties;
- o3tl::optional<css::drawing::FillStyle> m_oFillStyle;
+ std::optional<css::drawing::FillStyle> m_oFillStyle;
/// If we're in the process of exporting a hyperlink, then its URL.
OUString m_sURL;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 0e3625d708c7..4d297bfb475f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1378,7 +1378,7 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bCheckForFirst
// numbering type
AttrOutput().SectionPageNumbering(m_pCurrentPageDesc->GetNumType().GetNumberingType(),
- o3tl::nullopt);
+ std::nullopt);
m_pCurrentPageDesc = pSave;
SAL_INFO("sw.rtf", OSL_THIS_FUNC << " end");
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 49b1edc946af..9b1bcf33026b 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1098,7 +1098,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
if (HeaderFooterWritten()) {
return; // #i117955# prevent new sections in endnotes
}
- aSects.emplace_back( pPd, pSectionFormat, nLnNumRestartNo, o3tl::nullopt, nullptr, bIsFirstParagraph );
+ aSects.emplace_back( pPd, pSectionFormat, nLnNumRestartNo, std::nullopt, nullptr, bIsFirstParagraph );
NeedsDocumentProtected( aSects.back() );
}
@@ -1419,7 +1419,7 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
m_rWW8Export.pO->push_back( bBiDi? 1: 0 );
}
-void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber )
+void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, const ::std::optional<sal_uInt16>& oPageRestartNumber )
{
// sprmSNfcPgn
sal_uInt8 nb = WW8Export::GetNumId( nNumType );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 21df13a16f6c..ef34318a3ec3 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -38,7 +38,7 @@
#include <vcl/graph.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/typed_flags_set.hxx>
#include <cstddef>
@@ -179,11 +179,11 @@ struct WW8_SepInfo
const SwSectionFormat* pSectionFormat;
const SwNode* pPDNd;
sal_uLong const nLnNumRestartNo;
- ::o3tl::optional<sal_uInt16> const oPgRestartNo;
+ ::std::optional<sal_uInt16> const oPgRestartNo;
bool const bIsFirstParagraph;
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
- sal_uLong nLnRestart, ::o3tl::optional<sal_uInt16> oPgRestart = o3tl::nullopt,
+ sal_uLong nLnRestart, ::std::optional<sal_uInt16> oPgRestart = std::nullopt,
const SwNode* pNd = nullptr, bool bIsFirstPara = false )
: pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index ead32361bb2d..ac4e931ecf0d 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -180,7 +180,7 @@ public:
/// The style of the page numbers.
///
- virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber ) override;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::std::optional<sal_uInt16>& oPageRestartNumber ) override;
/// The type of breaking.
virtual void SectionType( sal_uInt8 nBreakCode ) override;
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 1f8319562bef..cddcb6650b51 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -984,7 +984,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId )
{
- ::o3tl::optional<sal_uInt16> oNumOffset = rPageDesc.GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = rPageDesc.GetNumOffset();
if (oNumOffset && *oNumOffset > 0)
{
// #i114163# positiveInteger only!
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index f97290a0d2e8..b73e844555b3 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -377,7 +377,7 @@ sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
return m_xDlg->GetKind();
}
-::o3tl::optional<sal_uInt16> AbstractSwBreakDlg_Impl:: GetPageNumber()
+::std::optional<sal_uInt16> AbstractSwBreakDlg_Impl:: GetPageNumber()
{
return m_xDlg->GetPageNumber();
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index c0e1aeeffde0..c34c16b80660 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -75,7 +75,7 @@ class SwTOXMark;
class SwSplitTableDlg;
#include <itabenum.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/deleter.hxx>
namespace sw
@@ -183,7 +183,7 @@ public:
virtual short Execute() override;
virtual OUString GetTemplateName() override;
virtual sal_uInt16 GetKind() override;
- virtual ::o3tl::optional<sal_uInt16> GetPageNumber() override;
+ virtual ::std::optional<sal_uInt16> GetPageNumber() override;
};
class AbstractSwTableWidthDlg_Impl : public VclAbstractDialog
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 3e264f5bb0a4..26fa4bdeb564 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -28,7 +28,7 @@ namespace
const SfxPoolItem* pItem(nullptr);
if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem)
{
- ::o3tl::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc *>(pItem)->GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc *>(pItem)->GetNumOffset();
if (oNumOffset)
rPageNo = *oNumOffset;
if (ppPageFormatDesc)
@@ -59,7 +59,7 @@ namespace
{
if (pPageFormatDesc)
{
- ::o3tl::optional<sal_uInt16> oNumOffset = pPageFormatDesc->GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = pPageFormatDesc->GetNumOffset();
if (oNumOffset)
{
nPgNo = *oNumOffset;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index fcf8f5490a2e..9844f96a2321 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1321,8 +1321,8 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
}
sal_uInt16 nPgNum = static_cast<sal_uInt16>(m_xPageNoNF->get_value());
bool const usePageNo(bState && m_xPageNoCB->get_active());
- o3tl::optional<sal_uInt16> const oPageNum(
- usePageNo ? nPgNum : o3tl::optional<sal_Int16>());
+ std::optional<sal_uInt16> const oPageNum(
+ usePageNo ? nPgNum : std::optional<sal_Int16>());
if (!pDesc || !pDesc->GetPageDesc()
|| (pDesc->GetPageDesc()->GetName() != sPage)
|| (pDesc->GetNumOffset() != oPageNum))
@@ -1449,7 +1449,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
OUString sPageDesc;
const SwPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc();
- ::o3tl::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset();
+ ::std::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset();
if (oNumOffset)
{
m_xPageNoCB->set_active(true);
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 7cff9685aa93..fc9b46af4a79 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -288,7 +288,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
else
{
OUString sFollowName(pFollow->GetName());
- pSh->InsertPageBreak(&sFollowName, o3tl::nullopt);
+ pSh->InsertPageBreak(&sFollowName, std::nullopt);
}
pSh->SttEndDoc(true);
}
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 9bae7b6f2b84..0630071bb16c 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -326,7 +326,7 @@ void SwPageBreakWin::Activate( )
MenuButton::Activate();
}
-void SwPageBreakWin::UpdatePosition(const o3tl::optional<Point>& xEvtPt)
+void SwPageBreakWin::UpdatePosition(const std::optional<Point>& xEvtPt)
{
if ( xEvtPt )
{
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index 395006103614..982c81e157a4 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -13,7 +13,7 @@
#include "FrameControl.hxx"
#include <vcl/builder.hxx>
#include <vcl/timer.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class Menu;
class SwPageFrame;
@@ -34,7 +34,7 @@ class SwPageBreakWin : public SwFrameMenuButtonBase
Timer m_aFadeTimer;
bool m_bDestroyed;
- o3tl::optional<Point> m_xMousePt;
+ std::optional<Point> m_xMousePt;
public:
SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame );
@@ -46,7 +46,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void Activate( ) override;
- void UpdatePosition(const o3tl::optional<Point>& xEvtPt = o3tl::optional<Point>());
+ void UpdatePosition(const std::optional<Point>& xEvtPt = std::optional<Point>());
virtual void ShowAll( bool bShow ) override;
virtual bool Contains( const Point &rDocPt ) const override;
diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx
index 18c5069f6fbb..1d6bc7ee5970 100644
--- a/sw/source/uibase/inc/break.hxx
+++ b/sw/source/uibase/inc/break.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_BREAK_HXX
#include <vcl/weld.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class SwWrtShell;
@@ -39,7 +39,7 @@ class SwBreakDlg : public weld::GenericDialogController
SwWrtShell &rSh;
OUString m_aTemplate;
sal_uInt16 nKind;
- ::o3tl::optional<sal_uInt16> oPgNum;
+ ::std::optional<sal_uInt16> oPgNum;
bool const bHtmlMode;
@@ -56,7 +56,7 @@ public:
virtual short run() override;
const OUString& GetTemplateName() const { return m_aTemplate; }
sal_uInt16 GetKind() const { return nKind; }
- const ::o3tl::optional<sal_uInt16>& GetPageNumber() const { return oPgNum; }
+ const ::std::optional<sal_uInt16>& GetPageNumber() const { return oPgNum; }
};
#endif
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index acd463ad74ed..3059ee609a1c 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -92,7 +92,7 @@ class SW_DLLPUBLIC SwEditWin final : public vcl::Window,
std::unique_ptr<SdrDropMarkerOverlay> m_pUserMarker;
SdrObject *m_pUserMarkerObj;
std::unique_ptr<SwShadowCursor, o3tl::default_delete<SwShadowCursor>> m_pShadCursor;
- o3tl::optional<Point> m_xRowColumnSelectionStart; // save position where table row/column selection has been started
+ std::optional<Point> m_xRowColumnSelectionStart; // save position where table row/column selection has been started
SwView &m_rView;
diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx
index e9a49e71f8f5..057181f6026b 100644
--- a/sw/source/uibase/inc/toxmgr.hxx
+++ b/sw/source/uibase/inc/toxmgr.hxx
@@ -24,7 +24,7 @@
#include <tox.hxx>
#include <authfld.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
class SwWrtShell;
class SwForm;
@@ -38,9 +38,9 @@ class SW_DLLPUBLIC SwTOXDescription
OUString m_sSequenceName;
OUString m_sMainEntryCharStyle;
OUString m_sAutoMarkURL;
- o3tl::optional<OUString>
+ std::optional<OUString>
m_aTitle;
- o3tl::optional<OUString>
+ std::optional<OUString>
m_aTOUName;
std::unique_ptr<SwForm>
m_pForm;
@@ -98,10 +98,10 @@ public:
void SetAutoMarkURL(const OUString& rSet) {m_sAutoMarkURL = rSet;}
void SetTitle(const OUString& rSet) { m_aTitle = rSet; }
- o3tl::optional<OUString> const & GetTitle() const {return m_aTitle; }
+ std::optional<OUString> const & GetTitle() const {return m_aTitle; }
void SetTOUName(const OUString& rSet) { m_aTOUName = rSet; }
- o3tl::optional<OUString> const & GetTOUName() const { return m_aTOUName; }
+ std::optional<OUString> const & GetTOUName() const { return m_aTOUName; }
void SetForm(const SwForm& rSet) { m_pForm.reset( new SwForm(rSet) );}
const SwForm* GetForm() const {return m_pForm.get();}
@@ -172,14 +172,14 @@ class SwTOXMarkDescription
int mnLevel;
bool mbMainEntry;
- o3tl::optional<OUString> maPrimKey;
- o3tl::optional<OUString> maSecKey;
- o3tl::optional<OUString> maAltStr;
- o3tl::optional<OUString> maTOUName;
+ std::optional<OUString> maPrimKey;
+ std::optional<OUString> maSecKey;
+ std::optional<OUString> maAltStr;
+ std::optional<OUString> maTOUName;
- o3tl::optional<OUString> maPhoneticReadingOfAltStr;
- o3tl::optional<OUString> maPhoneticReadingOfPrimKey;
- o3tl::optional<OUString> maPhoneticReadingOfSecKey;
+ std::optional<OUString> maPhoneticReadingOfAltStr;
+ std::optional<OUString> maPhoneticReadingOfPrimKey;
+ std::optional<OUString> maPhoneticReadingOfSecKey;
SwTOXMarkDescription(SwTOXMarkDescription const &) = delete;
SwTOXMarkDescription & operator= (SwTOXMarkDescription const &) = delete;
@@ -202,25 +202,25 @@ public:
bool IsMainEntry() const {return mbMainEntry;}
void SetPrimKey(const OUString& rSet) { maPrimKey = rSet; }
- o3tl::optional<OUString> const & GetPrimKey() const { return maPrimKey; }
+ std::optional<OUString> const & GetPrimKey() const { return maPrimKey; }
void SetSecKey(const OUString& rSet) { maSecKey = rSet; }
- o3tl::optional<OUString> const & GetSecKey() const { return maSecKey; }
+ std::optional<OUString> const & GetSecKey() const { return maSecKey; }
void SetAltStr(const OUString& rSet) { maAltStr = rSet; }
- o3tl::optional<OUString> const & GetAltStr() const { return maAltStr; }
+ std::optional<OUString> const & GetAltStr() const { return maAltStr; }
void SetTOUName(const OUString& rSet) { maTOUName = rSet; }
- o3tl::optional<OUString> const & GetTOUName() const { return maTOUName; }
+ std::optional<OUString> const & GetTOUName() const { return maTOUName; }
void SetPhoneticReadingOfAltStr(const OUString& rSet) { maPhoneticReadingOfAltStr = rSet; }
- o3tl::optional<OUString> const & GetPhoneticReadingOfAltStr() const { return maPhoneticReadingOfAltStr; }
+ std::optional<OUString> const & GetPhoneticReadingOfAltStr() const { return maPhoneticReadingOfAltStr; }
void SetPhoneticReadingOfPrimKey(const OUString& rSet) { maPhoneticReadingOfPrimKey = rSet; }
- o3tl::optional<OUString> const & GetPhoneticReadingOfPrimKey() const { return maPhoneticReadingOfPrimKey; }
+ std::optional<OUString> const & GetPhoneticReadingOfPrimKey() const { return maPhoneticReadingOfPrimKey; }
void SetPhoneticReadingOfSecKey(const OUString& rSet) { maPhoneticReadingOfSecKey = rSet; }
- o3tl::optional<OUString> const & GetPhoneticReadingOfSecKey() const { return maPhoneticReadingOfSecKey; }
+ std::optional<OUString> const & GetPhoneticReadingOfSecKey() const { return maPhoneticReadingOfSecKey; }
};
class SW_DLLPUBLIC SwTOXMgr
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 61c4389da489..c661225c604c 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -24,7 +24,7 @@
#include <swurl.hxx>
#include <IMark.hxx>
#include "navmgr.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
#include <o3tl/typed_flags_set.hxx>
#include <svx/swframetypes.hxx>
#include <vcl/weld.hxx>
@@ -308,7 +308,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA);
void InsertByWord( const OUString & );
- void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::o3tl::optional<sal_uInt16>& rPgNum = o3tl::nullopt);
+ void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::std::optional<sal_uInt16>& rPgNum = std::nullopt);
void InsertLineBreak();
void InsertColumnBreak();
void InsertFootnote(const OUString &, bool bEndNote = false, bool bEdit = true );
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 88d8fbcd2557..89df49393efa 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -598,7 +598,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_INSERT_BREAK_DLG:
{
sal_uInt16 nKind=0;
- ::o3tl::optional<sal_uInt16> oPageNumber;
+ ::std::optional<sal_uInt16> oPageNumber;
OUString aTemplateName;
if ( pItem )
{
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 152954534ea0..55ca1a9c5f06 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -297,7 +297,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
m_pWrtShell->Push();
OUString aReplace( s_pSrchItem->GetReplaceString() );
i18nutil::SearchOptions2 aTmp( s_pSrchItem->GetSearchOptions() );
- o3tl::optional<OUString> xBackRef = sw::ReplaceBackReferences(aTmp,
+ std::optional<OUString> xBackRef = sw::ReplaceBackReferences(aTmp,
m_pWrtShell->GetCursor(), m_pWrtShell->GetLayout());
if( xBackRef )
s_pSrchItem->SetReplaceString( *xBackRef );
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index cf82118f8ace..b8362420d276 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -648,7 +648,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem = nullptr;
OUString aName;
- ::o3tl::optional<sal_uInt16> oNumOffset;
+ ::std::optional<sal_uInt16> oNumOffset;
bool bPut = true;
switch( rCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 4225c59b68ec..89211d49f581 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -867,7 +867,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
// Insert hard page break;
// Selections will be overwritten
-void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::o3tl::optional<sal_uInt16>& oPgNum )
+void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::std::optional<sal_uInt16>& oPgNum )
{
ResetCursorStack();
if( CanInsert() )
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 268a619e4aed..87499c496118 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2245,7 +2245,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, c
ListItem& rItem( m_xData->insertItem( i_nPosition ) );
rItem.ItemText = i_rItemText;
- impl_handleInsert( i_nPosition, i_rItemText, ::o3tl::optional< OUString >(), aGuard );
+ impl_handleInsert( i_nPosition, i_rItemText, ::std::optional< OUString >(), aGuard );
// <----- SYNCHRONIZED
}
@@ -2257,7 +2257,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition,
ListItem& rItem( m_xData->insertItem( i_nPosition ) );
rItem.ItemImageURL = i_rItemImageURL;
- impl_handleInsert( i_nPosition, ::o3tl::optional< OUString >(), i_rItemImageURL, aGuard );
+ impl_handleInsert( i_nPosition, ::std::optional< OUString >(), i_rItemImageURL, aGuard );
// <----- SYNCHRONIZED
}
@@ -2291,7 +2291,7 @@ void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, cons
ListItem& rItem( m_xData->getItem( i_nPosition ) );
rItem.ItemText = i_rItemText;
- impl_handleModify( i_nPosition, i_rItemText, ::o3tl::optional< OUString >(), aGuard );
+ impl_handleModify( i_nPosition, i_rItemText, ::std::optional< OUString >(), aGuard );
// <----- SYNCHRONIZED
}
@@ -2303,7 +2303,7 @@ void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, con
ListItem& rItem( m_xData->getItem( i_nPosition ) );
rItem.ItemImageURL = i_rItemImageURL;
- impl_handleModify( i_nPosition, ::o3tl::optional< OUString >(), i_rItemImageURL, aGuard );
+ impl_handleModify( i_nPosition, ::std::optional< OUString >(), i_rItemImageURL, aGuard );
// <----- SYNCHRONIZED
}
@@ -2410,8 +2410,8 @@ void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector<
}
-void UnoControlListBoxModel::impl_handleInsert( const sal_Int32 i_nItemPosition, const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
+void UnoControlListBoxModel::impl_handleInsert( const sal_Int32 i_nItemPosition, const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
{
// SYNCHRONIZED ----->
// sync with legacy StringItemList property
@@ -2465,14 +2465,14 @@ void UnoControlListBoxModel::impl_handleRemove( const sal_Int32 i_nItemPosition,
}
else
{
- impl_notifyItemListEvent_nolck( i_nItemPosition, ::o3tl::optional< OUString >(), ::o3tl::optional< OUString >(),
+ impl_notifyItemListEvent_nolck( i_nItemPosition, ::std::optional< OUString >(), ::std::optional< OUString >(),
&XItemListListener::listItemRemoved );
}
}
-void UnoControlListBoxModel::impl_handleModify( const sal_Int32 i_nItemPosition, const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
+void UnoControlListBoxModel::impl_handleModify( const sal_Int32 i_nItemPosition, const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
{
// SYNCHRONIZED ----->
if ( !!i_rItemText )
@@ -2501,8 +2501,8 @@ void UnoControlListBoxModel::impl_handleModify( const sal_Int32 i_nItemPosition,
}
-void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_nItemPosition, const ::o3tl::optional< OUString >& i_rItemText,
- const ::o3tl::optional< OUString >& i_rItemImageURL,
+void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_nItemPosition, const ::std::optional< OUString >& i_rItemText,
+ const ::std::optional< OUString >& i_rItemImageURL,
void ( SAL_CALL XItemListListener::*NotificationMethod )( const ItemListEvent& ) )
{
ItemListEvent aEvent;
diff --git a/ucb/source/ucp/ext/ucpext_content.hxx b/ucb/source/ucp/ext/ucpext_content.hxx
index ebe17b355f8d..ed0b6e93a5fd 100644
--- a/ucb/source/ucp/ext/ucpext_content.hxx
+++ b/ucb/source/ucp/ext/ucpext_content.hxx
@@ -25,7 +25,7 @@
#include <ucbhelper/contenthelper.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace ucb { namespace ucp { namespace ext
@@ -122,8 +122,8 @@ namespace ucb { namespace ucp { namespace ext
private:
ExtensionContentType m_eExtContentType;
- ::o3tl::optional< bool > m_aIsFolder;
- ::o3tl::optional< OUString > m_aContentType;
+ ::std::optional< bool > m_aIsFolder;
+ ::std::optional< OUString > m_aContentType;
OUString m_sExtensionId;
OUString m_sPathIntoExtension;
};
diff --git a/unotools/inc/pch/precompiled_utl.hxx b/unotools/inc/pch/precompiled_utl.hxx
index 7a2b9b826f49..56d6decc7aa7 100644
--- a/unotools/inc/pch/precompiled_utl.hxx
+++ b/unotools/inc/pch/precompiled_utl.hxx
@@ -32,7 +32,7 @@
#include <vector>
#include <boost/locale.hpp>
#include <boost/locale/gnu_gettext.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/detail/file.h>
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index e65a2a98171b..986e39898d6c 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -34,7 +34,7 @@
#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/diagnose_ex.h>
-#include <o3tl/optional.hxx>
+#include <optional>
using namespace ::std;
using namespace ::utl;
@@ -78,7 +78,7 @@ public:
void AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
- const o3tl::optional<OUString>& sThumbnail);
+ const std::optional<OUString>& sThumbnail);
void DeleteItem(EHistoryType eHistory, const OUString& sURL);
@@ -317,7 +317,7 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
void SvtHistoryOptions_Impl::AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
- const o3tl::optional<OUString>& sThumbnail)
+ const std::optional<OUString>& sThumbnail)
{
uno::Reference<container::XNameAccess> xListAccess(GetListAccess(eHistory));
if (!xListAccess.is())
@@ -551,7 +551,7 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions::GetList( EHistoryType e
void SvtHistoryOptions::AppendItem(EHistoryType eHistory,
const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
- const o3tl::optional<OUString>& sThumbnail)
+ const std::optional<OUString>& sThumbnail)
{
MutexGuard aGuard(theHistoryOptionsMutex::get());
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index aca43c107e77..dc665a9d5172 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -28,7 +28,7 @@
#include <algorithm>
#include <atomic>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <libxslt/security.h>
@@ -199,9 +199,9 @@ public:
{
OString const value;
OString const language;
- ::o3tl::optional<OString> const type;
+ ::std::optional<OString> const type;
Literal(OString const& i_rValue, OString const& i_rLanguage,
- ::o3tl::optional<OString> const& i_rType)
+ ::std::optional<OString> const& i_rType)
: value(i_rValue)
, language(i_rLanguage)
, type(i_rType)
@@ -2215,7 +2215,7 @@ librdf_TypeConverter::extractNode_NoLock(
OUStringToOString(xLiteral->getLanguage(),
RTL_TEXTENCODING_UTF8) );
const uno::Reference< rdf::XURI > xType(xLiteral->getDatatype());
- o3tl::optional<OString> type;
+ std::optional<OString> type;
if (xType.is())
{
type =
diff --git a/vbahelper/inc/pch/precompiled_msforms.hxx b/vbahelper/inc/pch/precompiled_msforms.hxx
index 05b32e95ba2c..9c38534b0fa5 100644
--- a/vbahelper/inc/pch/precompiled_msforms.hxx
+++ b/vbahelper/inc/pch/precompiled_msforms.hxx
@@ -151,7 +151,7 @@
#include <cppuhelper/implbase.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/vcl/inc/bitmapwriteaccess.hxx b/vcl/inc/bitmapwriteaccess.hxx
index 0cb7fbf3a653..89a3dc22a73b 100644
--- a/vcl/inc/bitmapwriteaccess.hxx
+++ b/vcl/inc/bitmapwriteaccess.hxx
@@ -14,7 +14,7 @@
#include <vcl/alpha.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapaccess.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
typedef vcl::ScopedBitmapAccess<BitmapWriteAccess, Bitmap, &Bitmap::AcquireWriteAccess>
BitmapScopedWriteAccess;
@@ -83,8 +83,8 @@ public:
void DrawRect(const tools::Rectangle& rRect);
private:
- o3tl::optional<BitmapColor> mpLineColor;
- o3tl::optional<BitmapColor> mpFillColor;
+ std::optional<BitmapColor> mpLineColor;
+ std::optional<BitmapColor> mpFillColor;
BitmapWriteAccess() = delete;
BitmapWriteAccess(const BitmapWriteAccess&) = delete;
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 03663e025b6d..365ce74d1099 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -30,7 +30,7 @@
#include <tools/fontenum.hxx>
#include <vcl/glyphitem.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <unordered_map>
#include <memory>
@@ -103,7 +103,7 @@ private:
hb_font_t* m_pHbFont;
double m_nAveWidthFactor;
rtl::Reference<PhysicalFontFace> m_pFontFace;
- o3tl::optional<bool> m_xbIsGraphiteFont;
+ std::optional<bool> m_xbIsGraphiteFont;
};
inline hb_font_t* LogicalFontInstance::GetHbFont()
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index 9c68ef68ce76..61bf59d444d2 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -183,7 +183,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <i18nutil/i18nutildllapi.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/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 985ad5623e50..aca60a45641e 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -489,8 +489,8 @@ constexpr sal_uInt32 T_CFF = 0x43464620;
#endif
bool VCL_DLLPUBLIC getTTCoverage(
- o3tl::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> & rUnicodeCoverage,
- o3tl::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> & rCodePageCoverage,
+ std::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> & rUnicodeCoverage,
+ std::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> & rCodePageCoverage,
const unsigned char* pTable, size_t nLength);
/**
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index c91a6e4139ae..cefc8cb124fc 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -137,10 +137,10 @@ struct ImplSVAppData
SVAppKeyListeners maKeyListeners; // listeners for key events only (eg, extended toolkit)
std::vector<ImplPostEventPair> maPostedEventList;
ImplAccelManager* mpAccelMgr; // Accelerator Manager
- o3tl::optional<OUString> mxAppName; // Application name
- o3tl::optional<OUString> mxAppFileName; // Abs. Application FileName
- o3tl::optional<OUString> mxDisplayName; // Application Display Name
- o3tl::optional<OUString> mxToolkitName; // Toolkit Name
+ std::optional<OUString> mxAppName; // Application name
+ std::optional<OUString> mxAppFileName; // Abs. Application FileName
+ std::optional<OUString> mxDisplayName; // Application Display Name
+ std::optional<OUString> mxToolkitName; // Toolkit Name
Help* mpHelp = nullptr; // Application help
VclPtr<PopupMenu> mpActivePopupMenu; // Actives Popup-Menu (in Execute)
VclPtr<ImplWheelWindow> mpWheelWindow; // WheelWindow
diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx
index fcc6f4917fa1..58c00e7fa382 100644
--- a/vcl/inc/unx/screensaverinhibitor.hxx
+++ b/vcl/inc/unx/screensaverinhibitor.hxx
@@ -16,24 +16,24 @@
#include <rtl/ustring.hxx>
#include <vcl/dllapi.h>
-#include <o3tl/optional.hxx>
+#include <optional>
class VCL_PLUGIN_PUBLIC ScreenSaverInhibitor
{
public:
void inhibit( bool bInhibit, const OUString& sReason,
- bool bIsX11, const o3tl::optional<unsigned int>& xid, o3tl::optional<Display*> pDisplay );
+ bool bIsX11, const std::optional<unsigned int>& xid, std::optional<Display*> pDisplay );
private:
// These are all used as guint, however this header may be included
// in kde/tde/etc backends, where we would ideally avoid having
// any glib dependencies, hence the direct use of unsigned int.
- o3tl::optional<unsigned int> mnFDOCookie; // FDO ScreenSaver Inhibit
- o3tl::optional<unsigned int> mnFDOPMCookie; // FDO PowerManagement Inhibit
- o3tl::optional<unsigned int> mnGSMCookie;
- o3tl::optional<unsigned int> mnMSMCookie;
+ std::optional<unsigned int> mnFDOCookie; // FDO ScreenSaver Inhibit
+ std::optional<unsigned int> mnFDOPMCookie; // FDO PowerManagement Inhibit
+ std::optional<unsigned int> mnGSMCookie;
+ std::optional<unsigned int> mnMSMCookie;
- o3tl::optional<int> mnXScreenSaverTimeout;
+ std::optional<int> mnXScreenSaverTimeout;
#if !defined(__sun) && !defined(AIX)
BOOL mbDPMSWasEnabled;
diff --git a/vcl/inc/wall2.hxx b/vcl/inc/wall2.hxx
index ec96d905cc7c..401593b3ff8b 100644
--- a/vcl/inc/wall2.hxx
+++ b/vcl/inc/wall2.hxx
@@ -20,14 +20,14 @@
#ifndef INCLUDED_VCL_INC_WALL2_HXX
#define INCLUDED_VCL_INC_WALL2_HXX
-#include <o3tl/optional.hxx>
+#include <optional>
class ImplWallpaper
{
friend class Wallpaper;
private:
- o3tl::optional<tools::Rectangle> mpRect;
+ std::optional<tools::Rectangle> mpRect;
std::unique_ptr<BitmapEx> mpBitmap;
std::unique_ptr<Gradient> mpGradient;
std::unique_ptr<BitmapEx> mpCache;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 11271261f335..f4f4d6b29eb4 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -31,7 +31,7 @@
#include <o3tl/typed_flags_set.hxx>
#include <cppuhelper/weakref.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <list>
#include <memory>
#include <vector>
@@ -97,20 +97,20 @@ bool ImplWindowFrameProc( vcl::Window* pInst, SalEvent nEvent, const void* pEven
struct ImplWinData
{
- o3tl::optional<OUString>
+ std::optional<OUString>
mpExtOldText;
std::unique_ptr<ExtTextInputAttr[]>
mpExtOldAttrAry;
- o3tl::optional<tools::Rectangle>
+ std::optional<tools::Rectangle>
mpCursorRect;
long mnCursorExtWidth;
bool mbVertical;
std::unique_ptr<tools::Rectangle[]>
mpCompositionCharRects;
long mnCompositionCharRects;
- o3tl::optional<tools::Rectangle>
+ std::optional<tools::Rectangle>
mpFocusRect;
- o3tl::optional<tools::Rectangle>
+ std::optional<tools::Rectangle>
mpTrackRect;
ShowTrackFlags mnTrackFlags;
sal_uInt16 mnIsTopWindow;
@@ -183,9 +183,9 @@ struct ImplFrameData
struct ImplAccessibleInfos
{
sal_uInt16 nAccessibleRole;
- o3tl::optional<OUString>
+ std::optional<OUString>
pAccessibleName;
- o3tl::optional<OUString>
+ std::optional<OUString>
pAccessibleDescription;
VclPtr<vcl::Window> pLabeledByWindow;
VclPtr<vcl::Window> pLabelForWindow;
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 905e542a65b0..4a6075999096 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -735,8 +735,8 @@ void Qt5Frame::StartPresentation(bool bStart)
// meh - so there's no Qt platform independent solution
// https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver
#if QT5_USING_X11
- o3tl::optional<unsigned int> aRootWindow;
- o3tl::optional<Display*> aDisplay;
+ std::optional<unsigned int> aRootWindow;
+ std::optional<Display*> aDisplay;
if (QX11Info::isPlatformX11())
{
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index ee17e42f3a1d..4adc9328a161 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -199,7 +199,7 @@ struct ImplStyleData
BitmapEx maPersonaHeaderBitmap; ///< Cache the header bitmap.
BitmapEx maPersonaFooterBitmap; ///< Cache the footer bitmap.
- o3tl::optional<Color> maPersonaMenuBarTextColor; ///< Cache the menubar color.
+ std::optional<Color> maPersonaMenuBarTextColor; ///< Cache the menubar color.
};
struct ImplMiscData
@@ -2105,7 +2105,7 @@ enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
}
/** Update the setting of the Persona header / footer in ImplStyleData */
-static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, o3tl::optional<Color>& rMenuBarTextColor )
+static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFooter, BitmapEx& rHeaderFooterBitmap, std::optional<Color>& rMenuBarTextColor )
{
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
if ( !xContext.is() )
@@ -2198,7 +2198,7 @@ BitmapEx const & StyleSettings::GetPersonaFooter() const
return mxData->maPersonaFooterBitmap;
}
-const o3tl::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
+const std::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const
{
GetPersonaHeader();
return mxData->maPersonaMenuBarTextColor;
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 9719f0e94734..d5434108582a 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -25,7 +25,7 @@
#include <vcl/settings.hxx>
#include <sal/log.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace vcl
{
@@ -34,7 +34,7 @@ namespace vcl
{
ISearchableStringList& rEntryList;
OUString sCurrentSearchString;
- ::o3tl::optional< sal_Unicode > aSingleSearchChar;
+ ::std::optional< sal_Unicode > aSingleSearchChar;
Timer aSearchTimeout;
explicit QuickSelectionEngine_Data( ISearchableStringList& _entryList )
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index a0737320d257..249c8b7c8ce4 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2599,8 +2599,8 @@ append(std::bitset<N> & rSet, size_t const nOffset, sal_uInt32 const nValue)
}
bool getTTCoverage(
- o3tl::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> &rUnicodeRange,
- o3tl::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> &rCodePageRange,
+ std::optional<std::bitset<UnicodeCoverage::MAX_UC_ENUM>> &rUnicodeRange,
+ std::optional<std::bitset<CodePageCoverage::MAX_CP_ENUM>> &rCodePageRange,
const unsigned char* pTable, size_t nLength)
{
bool bRet = false;
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index b2e52e5d8375..91cc10784bb4 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -48,7 +48,7 @@
#include <textlayout.hxx>
#include <textlineinfo.hxx>
#include <impglyphitem.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#define TEXT_DRAW_ELLIPSIS (DrawTextFlags::EndEllipsis | DrawTextFlags::PathEllipsis | DrawTextFlags::NewsEllipsis)
@@ -1191,7 +1191,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
const sal_Unicode* pBase = rStr.getStr();
const sal_Unicode* pStr = pBase + nMinIndex;
const sal_Unicode* pEnd = pBase + nEndIndex;
- o3tl::optional<OUStringBuffer> xTmpStr;
+ std::optional<OUStringBuffer> xTmpStr;
for( ; pStr < pEnd; ++pStr )
{
// TODO: are there non-digit localizations?
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index b618ab8c8a7a..3ad836c082b9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -57,7 +57,7 @@
#include <svdata.hxx>
#include <bitmaps.hlst>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <algorithm>
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 8c84a3ae5345..4cb4e273794b 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -47,7 +47,7 @@
#include <sal/log.hxx>
void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason,
- bool bIsX11, const o3tl::optional<unsigned int>& xid, o3tl::optional<Display*> pDisplay )
+ bool bIsX11, const std::optional<unsigned int>& xid, std::optional<Display*> pDisplay )
{
const char* appname = SalGenericSystem::getFrameClassName();
const OString aReason = OUStringToOString( sReason, RTL_TEXTENCODING_UTF8 );
@@ -77,7 +77,7 @@ static void dbusInhibit( bool bInhibit,
const gchar* service, const gchar* path, const gchar* interface,
const std::function<GVariant*( GDBusProxy*, GError*& )>& fInhibit,
const std::function<GVariant*( GDBusProxy*, const guint, GError*& )>& fUnInhibit,
- o3tl::optional<guint>& rCookie )
+ std::optional<guint>& rCookie )
{
if ( ( !bInhibit && !rCookie ) ||
( bInhibit && rCookie ) )
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 3165067028d5..12df8c289fae 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1887,8 +1887,8 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
void GtkSalFrame::StartPresentation( bool bStart )
{
- o3tl::optional<guint> aWindow;
- o3tl::optional<Display*> aDisplay;
+ std::optional<guint> aWindow;
+ std::optional<Display*> aDisplay;
if( getDisplay()->IsX11Display() )
{
aWindow = widget_get_xid(m_pWindow);
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 7661ee3ca046..95750805ac4f 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -23,7 +23,7 @@
#include <unx/fontmanager.hxx>
#include "cairo_gtk3_cairo.hxx"
-#include <o3tl/optional.hxx>
+#include <optional>
GtkStyleContext* GtkSalGraphics::mpWindowStyle = nullptr;
GtkStyleContext* GtkSalGraphics::mpButtonStyle = nullptr;
diff --git a/vcl/unx/kf5/KF5SalFrame.cxx b/vcl/unx/kf5/KF5SalFrame.cxx
index ba34839a1291..27503444a0a1 100644
--- a/vcl/unx/kf5/KF5SalFrame.cxx
+++ b/vcl/unx/kf5/KF5SalFrame.cxx
@@ -40,7 +40,7 @@
#include <svdata.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
KF5SalFrame::KF5SalFrame(KF5SalFrame* pParent, SalFrameStyleFlags nState, bool bUseCairo)
: Qt5Frame(pParent, nState, bUseCairo)
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 4b4cd9cf3cd6..f5ac28e2a309 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -51,7 +51,7 @@
#include <map>
#include <string>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <ControlCacheKey.hxx>
using namespace std;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 12d37a792def..0321dd731a35 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2648,7 +2648,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetUseFlatBorders( false );
aStyleSettings.SetUseFlatMenus( false );
aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
- if ( o3tl::optional<Color> aColor = aStyleSettings.GetPersonaMenuBarTextColor() )
+ if ( std::optional<Color> aColor = aStyleSettings.GetPersonaMenuBarTextColor() )
{
aStyleSettings.SetMenuBarTextColor( *aColor );
aStyleSettings.SetMenuBarRolloverTextColor( *aColor );
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index c92e70a10f2a..b4490712ccdd 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -447,7 +447,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
{
style::LineSpacing aSpacing;
PropertyMapPtr pTopContext = m_pImpl->GetTopContext();
- o3tl::optional<PropertyMap::Property> aLineSpacingVal;
+ std::optional<PropertyMap::Property> aLineSpacingVal;
if (pTopContext && (aLineSpacingVal = pTopContext->getProperty(PROP_PARA_LINE_SPACING)) )
{
aLineSpacingVal->second >>= aSpacing;
@@ -2650,7 +2650,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
case NS_ooxml::LN_cntxtAlts_cntxtAlts:
{
tools::SvRef<TextEffectsHandler> pTextEffectsHandlerPtr( new TextEffectsHandler(nSprmId) );
- o3tl::optional<PropertyIds> aPropertyId = pTextEffectsHandlerPtr->getGrabBagPropertyId();
+ std::optional<PropertyIds> aPropertyId = pTextEffectsHandlerPtr->getGrabBagPropertyId();
if(aPropertyId)
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index bf5b638fafb5..d10f1e8776c4 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -92,7 +92,7 @@ void DomainMapperTableHandler::startTable(const TablePropertyMapPtr& pProps)
static void lcl_mergeBorder( PropertyIds nId, const PropertyMapPtr& pOrig, const PropertyMapPtr& pDest )
{
- o3tl::optional<PropertyMap::Property> pOrigVal = pOrig->getProperty(nId);
+ std::optional<PropertyMap::Property> pOrigVal = pOrig->getProperty(nId);
if ( pOrigVal )
{
@@ -103,8 +103,8 @@ static void lcl_mergeBorder( PropertyIds nId, const PropertyMapPtr& pOrig, const
static void lcl_computeCellBorders( const PropertyMapPtr& pTableBorders, const PropertyMapPtr& pCellProps,
sal_Int32 nCell, sal_Int32 nRow, bool bIsEndCol, bool bIsEndRow, bool bMergedVertically )
{
- o3tl::optional<PropertyMap::Property> pVerticalVal = pCellProps->getProperty(META_PROP_VERTICAL_BORDER);
- o3tl::optional<PropertyMap::Property> pHorizontalVal = pCellProps->getProperty(META_PROP_HORIZONTAL_BORDER);
+ std::optional<PropertyMap::Property> pVerticalVal = pCellProps->getProperty(META_PROP_VERTICAL_BORDER);
+ std::optional<PropertyMap::Property> pHorizontalVal = pCellProps->getProperty(META_PROP_HORIZONTAL_BORDER);
// Handle the vertical and horizontal borders
uno::Any aVertProp;
@@ -254,7 +254,7 @@ bool lcl_extractTableBorderProperty(const PropertyMapPtr& pTableProperties, cons
if (!pTableProperties)
return false;
- const o3tl::optional<PropertyMap::Property> aTblBorder = pTableProperties->getProperty(nId);
+ const std::optional<PropertyMap::Property> aTblBorder = pTableProperties->getProperty(nId);
if( aTblBorder )
{
OSL_VERIFY(aTblBorder->second >>= rLine);
@@ -388,7 +388,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
aGrabBag["TablePosition"] <<= aGrabBagTS;
}
- o3tl::optional<PropertyMap::Property> aTableStyleVal = m_aTableProperties->getProperty(META_PROP_TABLE_STYLE_NAME);
+ std::optional<PropertyMap::Property> aTableStyleVal = m_aTableProperties->getProperty(META_PROP_TABLE_STYLE_NAME);
if(aTableStyleVal)
{
// Apply table style properties recursively
@@ -456,7 +456,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
}
// This is the one preserving just all the table look attributes.
- o3tl::optional<PropertyMap::Property> oTableLook = m_aTableProperties->getProperty(META_PROP_TABLE_LOOK);
+ std::optional<PropertyMap::Property> oTableLook = m_aTableProperties->getProperty(META_PROP_TABLE_LOOK);
if (oTableLook)
{
aGrabBag["TableStyleLook"] = oTableLook->second;
@@ -464,7 +464,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
}
// This is just the "val" attribute's numeric value.
- const o3tl::optional<PropertyMap::Property> aTblLook = m_aTableProperties->getProperty(PROP_TBL_LOOK);
+ const std::optional<PropertyMap::Property> aTblLook = m_aTableProperties->getProperty(PROP_TBL_LOOK);
if(aTblLook)
{
aTblLook->second >>= rInfo.nTblLook;
@@ -472,25 +472,25 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
}
// apply cell margin settings of the table style
- const o3tl::optional<PropertyMap::Property> oLeftMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_LEFT);
+ const std::optional<PropertyMap::Property> oLeftMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_LEFT);
if (oLeftMargin)
{
oLeftMargin->second >>= rInfo.nLeftBorderDistance;
m_aTableProperties->Erase(oLeftMargin->first);
}
- const o3tl::optional<PropertyMap::Property> oRightMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_RIGHT);
+ const std::optional<PropertyMap::Property> oRightMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_RIGHT);
if (oRightMargin)
{
oRightMargin->second >>= rInfo.nRightBorderDistance;
m_aTableProperties->Erase(oRightMargin->first);
}
- const o3tl::optional<PropertyMap::Property> oTopMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_TOP);
+ const std::optional<PropertyMap::Property> oTopMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_TOP);
if (oTopMargin)
{
oTopMargin->second >>= rInfo.nTopBorderDistance;
m_aTableProperties->Erase(oTopMargin->first);
}
- const o3tl::optional<PropertyMap::Property> oBottomMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_BOTTOM);
+ const std::optional<PropertyMap::Property> oBottomMargin = m_aTableProperties->getProperty(META_PROP_CELL_MAR_BOTTOM);
if (oBottomMargin)
{
oBottomMargin->second >>= rInfo.nBottomBorderDistance;
@@ -598,7 +598,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
if ( !m_aCellProperties.empty() && !m_aCellProperties[0].empty() )
{
// aLeftBorder already contains tblBorder; overwrite if cell is different.
- o3tl::optional<PropertyMap::Property> aCellBorder
+ std::optional<PropertyMap::Property> aCellBorder
= m_aCellProperties[0][0]->getProperty(PROP_LEFT_BORDER);
if ( aCellBorder )
aCellBorder->second >>= aLeftBorder;
@@ -658,7 +658,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
// if table is only a single row, and row is set as don't split, set the same value for the whole table.
if( m_aRowProperties.size() == 1 && m_aRowProperties[0].get() )
{
- o3tl::optional<PropertyMap::Property> oSplitAllowed = m_aRowProperties[0]->getProperty(PROP_IS_SPLIT_ALLOWED);
+ std::optional<PropertyMap::Property> oSplitAllowed = m_aRowProperties[0]->getProperty(PROP_IS_SPLIT_ALLOWED);
if( oSplitAllowed )
{
bool bRowCanSplit = true;
@@ -808,18 +808,18 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
// Apply also possible tblPrEx borders on cells
for (const PropertyIds& rBorder : pBorders)
{
- o3tl::optional<PropertyMap::Property> oStyleCellBorder = pStyleProps->getProperty(rBorder);
- o3tl::optional<PropertyMap::Property> oRowCellBorder;
+ std::optional<PropertyMap::Property> oStyleCellBorder = pStyleProps->getProperty(rBorder);
+ std::optional<PropertyMap::Property> oRowCellBorder;
// we can have table border exception in row properties
if (*aRowIter && (*aRowIter)->isSet(rBorder))
oRowCellBorder = (*aRowIter)->getProperty(rBorder);
- o3tl::optional<PropertyMap::Property> oDirectCellBorder = (*aCellIterator)->getProperty(rBorder);
+ std::optional<PropertyMap::Property> oDirectCellBorder = (*aCellIterator)->getProperty(rBorder);
if (oRowCellBorder && oDirectCellBorder)
{
table::BorderLine2 aRowCellBorder = oRowCellBorder->second.get<table::BorderLine2>();
table::BorderLine2 aDirectCellBorder = oDirectCellBorder->second.get<table::BorderLine2>();
if (aRowCellBorder.LineStyle != table::BorderLineStyle::NONE && aDirectCellBorder.LineStyle == table::BorderLineStyle::NONE)
- oDirectCellBorder = o3tl::optional<PropertyMap::Property>();
+ oDirectCellBorder = std::optional<PropertyMap::Property>();
}
if (oRowCellBorder && !oDirectCellBorder)
{
@@ -846,7 +846,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
}
else
{
- o3tl::optional<PropertyMap::Property> oTableBorder = rInfo.pTableBorders->getProperty(rBorder);
+ std::optional<PropertyMap::Property> oTableBorder = rInfo.pTableBorders->getProperty(rBorder);
if (oTableBorder)
{
table::BorderLine2 aTableBorder = oTableBorder->second.get<table::BorderLine2>();
@@ -928,7 +928,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
uno::makeAny(rInfo.nBottomBorderDistance ), false);
// Horizontal merge is not a UNO property, extract that info here to rMerges, and then remove it from the map.
- const o3tl::optional<PropertyMap::Property> aHorizontalMergeVal = (*aCellIterator)->getProperty(PROP_HORIZONTAL_MERGE);
+ const std::optional<PropertyMap::Property> aHorizontalMergeVal = (*aCellIterator)->getProperty(PROP_HORIZONTAL_MERGE);
if (aHorizontalMergeVal)
{
if (aHorizontalMergeVal->second.get<bool>())
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 552d30daf8ce..0701dc1610e1 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <o3tl/optional.hxx>
+#include <optional>
#include "DomainMapperTableManager.hxx"
#include "ConversionHelper.hxx"
#include "MeasureHandler.hxx"
@@ -429,7 +429,7 @@ void DomainMapperTableManager::startLevel( )
TableManager::startLevel( );
// If requested, pop the value that was pushed too early.
- o3tl::optional<sal_Int32> oCurrentWidth;
+ std::optional<sal_Int32> oCurrentWidth;
if (m_bPushCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
{
oCurrentWidth = m_aCellWidths.back()->back();
@@ -471,7 +471,7 @@ void DomainMapperTableManager::endLevel( )
m_aGridSpans.pop_back( );
// Do the same trick as in startLevel(): pop the value that was pushed too early.
- o3tl::optional<sal_Int32> oCurrentWidth;
+ std::optional<sal_Int32> oCurrentWidth;
if (m_bPushCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
oCurrentWidth = m_aCellWidths.back()->back();
m_aCellWidths.pop_back( );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 22cf36388b48..4c7b50c72cf8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -809,7 +809,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId, StyleShee
{
if(pEntry->pProperties)
{
- o3tl::optional<PropertyMap::Property> aProperty =
+ std::optional<PropertyMap::Property> aProperty =
pEntry->pProperties->getProperty(eId);
if( aProperty )
{
@@ -837,7 +837,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId, StyleShee
const PropertyMapPtr& pDefaultParaProps = GetStyleSheetTable()->GetDefaultParaProps();
if ( pDefaultParaProps )
{
- o3tl::optional<PropertyMap::Property> aProperty = pDefaultParaProps->getProperty(eId);
+ std::optional<PropertyMap::Property> aProperty = pDefaultParaProps->getProperty(eId);
if ( aProperty )
{
if (pIsDocDefault)
@@ -852,7 +852,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId, StyleShee
const PropertyMapPtr& pDefaultCharProps = GetStyleSheetTable()->GetDefaultCharProps();
if ( pDefaultCharProps )
{
- o3tl::optional<PropertyMap::Property> aProperty = pDefaultCharProps->getProperty(eId);
+ std::optional<PropertyMap::Property> aProperty = pDefaultCharProps->getProperty(eId);
if ( aProperty )
{
if (pIsDocDefault)
@@ -896,7 +896,7 @@ uno::Any DomainMapper_Impl::GetAnyProperty(PropertyIds eId, const PropertyMapPtr
// first look in directly applied attributes
if ( rContext )
{
- o3tl::optional<PropertyMap::Property> aProperty = rContext->getProperty(eId);
+ std::optional<PropertyMap::Property> aProperty = rContext->getProperty(eId);
if ( aProperty )
return aProperty->second;
}
@@ -1054,7 +1054,7 @@ static void lcl_AddRangeAndStyle(
pToBeSavedProperties->SetStartingRange(xParaCursor->getStart());
if(pPropertyMap)
{
- o3tl::optional<PropertyMap::Property> aParaStyle = pPropertyMap->getProperty(PROP_PARA_STYLE_NAME);
+ std::optional<PropertyMap::Property> aParaStyle = pPropertyMap->getProperty(PROP_PARA_STYLE_NAME);
if( aParaStyle )
{
OUString sName;
@@ -1384,7 +1384,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
// over the ones from the numbering styles in Word
// but in Writer numbering styles have priority,
// so insert directly into the paragraph properties to compensate.
- o3tl::optional<PropertyMap::Property> oProperty;
+ std::optional<PropertyMap::Property> oProperty;
const StyleSheetEntryPtr pParent = (!pEntry->sBaseStyleIdentifier.isEmpty()) ? GetStyleSheetTable()->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier) : nullptr;
const StyleSheetPropertyMap* pParentProperties = dynamic_cast<const StyleSheetPropertyMap*>(pParent ? pParent->pProperties.get() : nullptr);
if (!pEntry->sBaseStyleIdentifier.isEmpty())
@@ -2367,7 +2367,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
// This adds a hack on top of the following hack to save the style name in the context.
PropertyMapPtr pTopContext = GetTopContext();
OUString sFootnoteCharStyleName;
- o3tl::optional< PropertyMap::Property > aProp = pTopContext->getProperty(PROP_CHAR_STYLE_NAME);
+ std::optional< PropertyMap::Property > aProp = pTopContext->getProperty(PROP_CHAR_STYLE_NAME);
if (aProp)
aProp->second >>= sFootnoteCharStyleName;
@@ -2834,7 +2834,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
// Fix spacing for as-character objects. If the paragraph has CT_Spacing_after set,
// it needs to be set on the object too, as that's what object placement code uses.
PropertyMapPtr paragraphContext = GetTopContextOfType( CONTEXT_PARAGRAPH );
- o3tl::optional<PropertyMap::Property> aPropMargin = paragraphContext->getProperty(PROP_PARA_BOTTOM_MARGIN);
+ std::optional<PropertyMap::Property> aPropMargin = paragraphContext->getProperty(PROP_PARA_BOTTOM_MARGIN);
if(aPropMargin)
xProps->setPropertyValue( getPropertyName( PROP_BOTTOM_MARGIN ), aPropMargin->second );
}
@@ -3338,7 +3338,7 @@ static bool lcl_FindInCommand(
void DomainMapper_Impl::GetCurrentLocale(lang::Locale& rLocale)
{
PropertyMapPtr pTopContext = GetTopContext();
- o3tl::optional<PropertyMap::Property> pLocale = pTopContext->getProperty(PROP_CHAR_LOCALE);
+ std::optional<PropertyMap::Property> pLocale = pTopContext->getProperty(PROP_CHAR_LOCALE);
if( pLocale )
pLocale->second >>= rLocale;
else
@@ -4644,7 +4644,7 @@ void DomainMapper_Impl::handleIndex
static auto InsertFieldmark(std::stack<TextAppendContext> & rTextAppendStack,
uno::Reference<text::XFormField> const& xFormField,
uno::Reference<text::XTextRange> const& xStartRange,
- o3tl::optional<FieldId> const oFieldId) -> void
+ std::optional<FieldId> const oFieldId) -> void
{
uno::Reference<text::XTextContent> const xTextContent(xFormField, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextAppend> const& xTextAppend(rTextAppendStack.top().xTextAppend);
@@ -4686,7 +4686,7 @@ static auto InsertFieldmark(std::stack<TextAppendContext> & rTextAppendStack,
static auto PopFieldmark(std::stack<TextAppendContext> & rTextAppendStack,
uno::Reference<text::XTextCursor> const& xCursor,
- o3tl::optional<FieldId> const oFieldId) -> void
+ std::optional<FieldId> const oFieldId) -> void
{
if (oFieldId
&& (oFieldId == FIELD_FORMCHECKBOX || oFieldId == FIELD_FORMDROPDOWN))
@@ -6672,7 +6672,7 @@ uno::Reference<beans::XPropertySet> DomainMapper_Impl::GetCurrentNumberingCharSt
}
// In case numbering rules is not found via a style, try the direct formatting instead.
- o3tl::optional<PropertyMap::Property> oProp = pContext->getProperty(PROP_NUMBERING_RULES);
+ std::optional<PropertyMap::Property> oProp = pContext->getProperty(PROP_NUMBERING_RULES);
if (oProp)
{
xLevels.set(oProp->second, uno::UNO_QUERY);
@@ -6778,7 +6778,7 @@ sal_Int32 DomainMapper_Impl::getCurrentNumberingProperty(const OUString& aProp)
{
sal_Int32 nRet = 0;
- o3tl::optional<PropertyMap::Property> pProp = m_pTopContext->getProperty(PROP_NUMBERING_RULES);
+ std::optional<PropertyMap::Property> pProp = m_pTopContext->getProperty(PROP_NUMBERING_RULES);
uno::Reference<container::XIndexAccess> xNumberingRules;
if (pProp)
xNumberingRules.set(pProp->second, uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index c7b50dcdc730..154bd0bbc840 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -29,7 +29,7 @@
#include <stack>
#include <unordered_map>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include "DomainMapper.hxx"
#include "DomainMapperTableManager.hxx"
@@ -156,7 +156,7 @@ class FieldContext : public virtual SvRefBase
OUString m_sCommand;
OUString m_sResult;
- o3tl::optional<FieldId> m_eFieldId;
+ std::optional<FieldId> m_eFieldId;
bool m_bFieldLocked;
css::uno::Reference<css::text::XTextField> m_xTextField;
@@ -186,7 +186,7 @@ public:
const OUString& GetCommand() const {return m_sCommand; }
void SetFieldId(FieldId eFieldId ) { m_eFieldId = eFieldId; }
- o3tl::optional<FieldId> const & GetFieldId() const { return m_eFieldId; }
+ std::optional<FieldId> const & GetFieldId() const { return m_eFieldId; }
void AppendResult(OUString const& rResult) { m_sResult += rResult; }
const OUString& GetResult() const { return m_sResult; }
@@ -440,7 +440,7 @@ private:
css::uno::Reference<css::uno::XComponentContext> m_xComponentContext;
css::uno::Reference<css::container::XNameContainer> m_xPageStyles1;
// cache next available number, expensive to repeatedly compute
- o3tl::optional<int> m_xNextUnusedPageStyleNo;
+ std::optional<int> m_xNextUnusedPageStyleNo;
css::uno::Reference<css::text::XText> m_xBodyText;
css::uno::Reference<css::text::XTextContent> m_xEmbedded;
@@ -977,7 +977,7 @@ public:
tools::SvRef<SdtHelper> m_pSdtHelper;
/// Document background color, applied to every page style.
- o3tl::optional<sal_Int32> m_oBackgroundColor;
+ std::optional<sal_Int32> m_oBackgroundColor;
/**
* This contains the raw table depth. m_nTableDepth > 0 is the same as
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 96d784f7cad1..c4a5f045b794 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -247,10 +247,10 @@ public:
std::queue<OUString>& m_rPositivePercentages;
OUString sAnchorId;
comphelper::SequenceAsHashMap m_aInteropGrabBag;
- o3tl::optional<sal_Int32> m_oEffectExtentLeft;
- o3tl::optional<sal_Int32> m_oEffectExtentTop;
- o3tl::optional<sal_Int32> m_oEffectExtentRight;
- o3tl::optional<sal_Int32> m_oEffectExtentBottom;
+ std::optional<sal_Int32> m_oEffectExtentLeft;
+ std::optional<sal_Int32> m_oEffectExtentTop;
+ std::optional<sal_Int32> m_oEffectExtentRight;
+ std::optional<sal_Int32> m_oEffectExtentBottom;
GraphicImport_Impl(GraphicImportType eImportType, DomainMapper& rDMapper, std::pair<OUString, OUString>& rPositionOffsets, std::pair<OUString, OUString>& rAligns, std::queue<OUString>& rPositivePercentages) :
nXSize(0)
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 5574039cca5b..7084547c4d1a 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -293,7 +293,7 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults
PROP_FIRST_LINE_OFFSET, PROP_LEFT_MARGIN
};
for(PropertyIds const & rReadId : aReadIds) {
- o3tl::optional<PropertyMap::Property> aProp = getProperty(rReadId);
+ std::optional<PropertyMap::Property> aProp = getProperty(rReadId);
if (aProp)
aNumberingProperties.emplace_back( getPropertyName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE );
else if (rReadId == PROP_FIRST_LINE_INDENT && bDefaults)
@@ -306,7 +306,7 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults
beans::PropertyState_DIRECT_VALUE);
}
- o3tl::optional<PropertyMap::Property> aPropFont = getProperty(PROP_CHAR_FONT_NAME);
+ std::optional<PropertyMap::Property> aPropFont = getProperty(PROP_CHAR_FONT_NAME);
if(aPropFont && !isOutlineNumbering())
aNumberingProperties.emplace_back( getPropertyName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE );
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 31bb400a36d8..8dec42778d28 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -132,7 +132,7 @@ private:
OUString m_sNumStyleLink;
/// list id to use for all derived numbering definitions
- o3tl::optional<OUString> m_oListId;
+ std::optional<OUString> m_oListId;
public:
typedef tools::SvRef< AbstractListDef > Pointer;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index d851c000c99b..962e11a50efc 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -257,11 +257,11 @@ void PropertyMap::Erase( PropertyIds eId )
Invalidate();
}
-o3tl::optional< PropertyMap::Property > PropertyMap::getProperty( PropertyIds eId ) const
+std::optional< PropertyMap::Property > PropertyMap::getProperty( PropertyIds eId ) const
{
std::map< PropertyIds, PropValue >::const_iterator aIter = m_vMap.find( eId );
if ( aIter == m_vMap.end() )
- return o3tl::optional<Property>();
+ return std::optional<Property>();
else
return std::make_pair( eId, aIter->second.getValue() );
}
@@ -682,7 +682,7 @@ void SectionPropertyMap::ApplySectionProperties( const uno::Reference< beans::XP
{
if ( xSection.is() )
{
- o3tl::optional< PropertyMap::Property > pProp = getProperty( PROP_WRITING_MODE );
+ std::optional< PropertyMap::Property > pProp = getProperty( PROP_WRITING_MODE );
if ( pProp )
xSection->setPropertyValue( "WritingMode", pProp->second );
}
@@ -1320,7 +1320,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
if ( pLastContext )
{
bool bIsLandscape = false;
- o3tl::optional< PropertyMap::Property > pProp = getProperty( PROP_IS_LANDSCAPE );
+ std::optional< PropertyMap::Property > pProp = getProperty( PROP_IS_LANDSCAPE );
if ( pProp )
pProp->second >>= bIsLandscape;
@@ -1554,7 +1554,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
//prepare text grid properties
sal_Int32 nHeight = 1;
- o3tl::optional< PropertyMap::Property > pProp = getProperty( PROP_HEIGHT );
+ std::optional< PropertyMap::Property > pProp = getProperty( PROP_HEIGHT );
if ( pProp )
pProp->second >>= nHeight;
@@ -1595,7 +1595,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
const StyleSheetEntryPtr pEntry = rDM_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( "Standard" );
if ( pEntry.get() )
{
- o3tl::optional< PropertyMap::Property > pPropHeight = pEntry->pProperties->getProperty( PROP_CHAR_HEIGHT_ASIAN );
+ std::optional< PropertyMap::Property > pPropHeight = pEntry->pProperties->getProperty( PROP_CHAR_HEIGHT_ASIAN );
if ( pPropHeight )
{
double fHeight = 0;
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 9f5d54536abe..43a5beaa9ca5 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -30,7 +30,7 @@
#include <com/sun/star/drawing/XShape.hpp>
#include "PropertyIds.hxx"
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <map>
#include <vector>
@@ -164,7 +164,7 @@ public:
void InsertProps( const PropertyMapPtr& rMap, const bool bOverwrite = true );
// Returns a copy of the property if it exists, .first is its PropertyIds and .second is its Value (type css::uno::Any)
- o3tl::optional< Property > getProperty( PropertyIds eId ) const;
+ std::optional< Property > getProperty( PropertyIds eId ) const;
// Has the property named been set (via Insert)?
bool isSet( PropertyIds eId ) const;
@@ -231,7 +231,7 @@ private:
css::uno::Reference< css::beans::XPropertySet > m_aFirstPageStyle;
css::uno::Reference< css::beans::XPropertySet > m_aFollowPageStyle;
- o3tl::optional< css::table::BorderLine2 > m_oBorderLines[4];
+ std::optional< css::table::BorderLine2 > m_oBorderLines[4];
sal_Int32 m_nBorderDistances[4];
BorderApply m_eBorderApply;
BorderOffsetFrom m_eBorderOffsetFrom;
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 65fa272cea55..d31bfe4db00c 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -40,12 +40,11 @@ static awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet,
PropertyMapPtr pDefaultCharProps = pStyleSheet->GetDefaultCharProps();
vcl::Font aFont(pOut->GetFont());
- o3tl::optional<PropertyMap::Property> aFontName
+ std::optional<PropertyMap::Property> aFontName
= pDefaultCharProps->getProperty(PROP_CHAR_FONT_NAME);
if (aFontName)
aFont.SetFamilyName(aFontName->second.get<OUString>());
- o3tl::optional<PropertyMap::Property> aHeight
- = pDefaultCharProps->getProperty(PROP_CHAR_HEIGHT);
+ std::optional<PropertyMap::Property> aHeight = pDefaultCharProps->getProperty(PROP_CHAR_HEIGHT);
if (aHeight)
{
nHeight = aHeight->second.get<double>() * 35; // points -> mm100
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 2f0eda1f7565..633e74cac3f8 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -113,10 +113,10 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, const PropertyMapP
if ( nType == pTypesToFix[i] )
{
PropertyIds nChecked = pPropsToCheck[i];
- o3tl::optional<PropertyMap::Property> pChecked = pProps->getProperty(nChecked);
+ std::optional<PropertyMap::Property> pChecked = pProps->getProperty(nChecked);
PropertyIds nInsideProp = ( i < 2 ) ? META_PROP_HORIZONTAL_BORDER : META_PROP_VERTICAL_BORDER;
- o3tl::optional<PropertyMap::Property> pInside = pProps->getProperty(nInsideProp);
+ std::optional<PropertyMap::Property> pInside = pProps->getProperty(nInsideProp);
if ( pChecked && pProps )
{
@@ -201,7 +201,7 @@ static void lcl_mergeProps( const PropertyMapPtr& pToFill, const PropertyMapPtr&
for ( unsigned i = 0 ; i != SAL_N_ELEMENTS(pPropsToCheck); i++ )
{
PropertyIds nId = pPropsToCheck[i];
- o3tl::optional<PropertyMap::Property> pProp = pToAdd->getProperty(nId);
+ std::optional<PropertyMap::Property> pProp = pToAdd->getProperty(nId);
if ( pProp )
{
diff --git a/writerfilter/source/dmapper/TextEffectsHandler.hxx b/writerfilter/source/dmapper/TextEffectsHandler.hxx
index 54cf86392b7c..60e98d64b970 100644
--- a/writerfilter/source/dmapper/TextEffectsHandler.hxx
+++ b/writerfilter/source/dmapper/TextEffectsHandler.hxx
@@ -20,7 +20,7 @@
#include <oox/helper/grabbagstack.hxx>
#include <memory>
-#include <o3tl/optional.hxx>
+#include <optional>
namespace writerfilter {
namespace dmapper
@@ -30,7 +30,7 @@ namespace dmapper
class TextEffectsHandler : public LoggedProperties
{
private:
- o3tl::optional<PropertyIds> maPropertyId;
+ std::optional<PropertyIds> maPropertyId;
OUString maElementName;
std::unique_ptr<oox::GrabBagStack> mpGrabBagStack;
@@ -44,7 +44,7 @@ public:
explicit TextEffectsHandler(sal_uInt32 aElementId);
virtual ~TextEffectsHandler() override;
- const o3tl::optional<PropertyIds>& getGrabBagPropertyId() const { return maPropertyId;}
+ const std::optional<PropertyIds>& getGrabBagPropertyId() const { return maPropertyId;}
css::beans::PropertyValue getInteropGrabBag();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index d55217c708b5..31b83a855dea 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -14,7 +14,7 @@
#include <queue>
#include <tuple>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <oox/mathml/importutils.hxx>
@@ -275,7 +275,7 @@ private:
sal_Int32 m_nTop = 0;
sal_Int32 m_nRight = 0;
sal_Int32 m_nBottom = 0;
- o3tl::optional<sal_Int32> m_oZ; ///< Z-Order of the shape.
+ std::optional<sal_Int32> m_oZ; ///< Z-Order of the shape.
sal_Int16 m_nHoriOrientRelation
= 0; ///< Horizontal text::RelOrientation for drawinglayer shapes.
sal_Int16 m_nVertOrientRelation = 0; ///< Vertical text::RelOrientation for drawinglayer shapes.
@@ -381,7 +381,7 @@ private:
sal_Int32 m_nHoriPadding, m_nVertPadding;
sal_Int32 m_nHoriAlign, m_nHoriAnchor, m_nVertAlign, m_nVertAnchor;
Id m_nHRule;
- o3tl::optional<Id> m_oWrap;
+ std::optional<Id> m_oWrap;
public:
explicit RTFFrame(RTFParserState* pParserState);
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index b0bd39d79830..d32e29fcd167 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -371,14 +371,14 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
uno::Any aLineWidth = uno::makeAny(sal_Int32(26));
sal_Int16 eWritingMode = text::WritingMode2::LR_TB;
// Groupshape support
- o3tl::optional<sal_Int32> oGroupLeft;
- o3tl::optional<sal_Int32> oGroupTop;
- o3tl::optional<sal_Int32> oGroupRight;
- o3tl::optional<sal_Int32> oGroupBottom;
- o3tl::optional<sal_Int32> oRelLeft;
- o3tl::optional<sal_Int32> oRelTop;
- o3tl::optional<sal_Int32> oRelRight;
- o3tl::optional<sal_Int32> oRelBottom;
+ std::optional<sal_Int32> oGroupLeft;
+ std::optional<sal_Int32> oGroupTop;
+ std::optional<sal_Int32> oGroupRight;
+ std::optional<sal_Int32> oGroupBottom;
+ std::optional<sal_Int32> oRelLeft;
+ std::optional<sal_Int32> oRelTop;
+ std::optional<sal_Int32> oRelRight;
+ std::optional<sal_Int32> oRelBottom;
// Importing these are not trivial, let the VML import do the hard work.
oox::vml::FillModel aFillModel; // Gradient.
@@ -386,8 +386,8 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
bool bOpaque = true;
- o3tl::optional<sal_Int16> oRelativeWidth;
- o3tl::optional<sal_Int16> oRelativeHeight;
+ std::optional<sal_Int16> oRelativeWidth;
+ std::optional<sal_Int16> oRelativeHeight;
sal_Int16 nRelativeWidthRelation = text::RelOrientation::PAGE_FRAME;
sal_Int16 nRelativeHeightRelation = text::RelOrientation::PAGE_FRAME;
boost::logic::tribool obRelFlipV(boost::logic::indeterminate);
@@ -725,7 +725,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
sal_Int16 nPercentage = rtl::math::round(rProperty.second.toDouble() / 10);
if (nPercentage)
{
- o3tl::optional<sal_Int16>& rPercentage
+ std::optional<sal_Int16>& rPercentage
= rProperty.first == "pctHoriz" ? oRelativeWidth : oRelativeHeight;
rPercentage = nPercentage;
}