summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-21 07:26:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-21 14:50:28 +0100
commit9ad252b2e79576119c2d733a1a45fdd9e9f83140 (patch)
tree87fee16145d457b6799a05c389d85270476f7f35 /include/vcl
parent3aca35f1505fa552eaa316a2d47a60ef52646525 (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 "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/vcl')
-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
6 files changed, 24 insertions, 24 deletions
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; }