diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-02-21 07:26:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-02-21 14:50:28 +0100 |
commit | 9ad252b2e79576119c2d733a1a45fdd9e9f83140 (patch) | |
tree | 87fee16145d457b6799a05c389d85270476f7f35 /sw/source/uibase/inc | |
parent | 3aca35f1505fa552eaa316a2d47a60ef52646525 (diff) |
Drop o3tl::optional wrapper
...now that macOS builds are guaranteed to have std::optional since
358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to
Xcode 11.3 and macOS 10.14.4".
The change is done mostly mechanically with
> for i in $(git grep -Fl optional); do
> sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \
> -e 's/\<o3tl::optional\>/std::optional/g' \
> -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i"
> done
> for i in $(git grep -Flw o3tl::nullopt); do
> sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i"
> done
(though that causes some of the resulting
#include <optional>
to appear at different places relative to other includes than if they had been
added manually), plus a few manual modifications:
* adapt bin/find-unneeded-includes
* adapt desktop/IwyuFilter_desktop.yaml
* remove include/o3tl/optional.hxx
* quote resulting "<"/">" as "<"/">" in officecfg/registry/cppheader.xsl
* and then solenv/clang-format/reformat-formatted-files
Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r-- | sw/source/uibase/inc/PageBreakWin.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/break.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/edtwin.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/toxmgr.hxx | 38 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 4 |
5 files changed, 28 insertions, 28 deletions
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 ); |