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 /oox/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 'oox/inc')
-rw-r--r-- | oox/inc/drawingml/table/tablestylepart.hxx | 10 | ||||
-rw-r--r-- | oox/inc/drawingml/textbodyproperties.hxx | 12 | ||||
-rw-r--r-- | oox/inc/drawingml/textparagraphproperties.hxx | 14 | ||||
-rw-r--r-- | oox/inc/pch/precompiled_oox.hxx | 2 |
4 files changed, 19 insertions, 19 deletions
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> |