summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-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
12 files changed, 19 insertions, 19 deletions
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;