summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility/AccessibleDocument.cxx
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 /sc/source/ui/Accessibility/AccessibleDocument.cxx
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 'sc/source/ui/Accessibility/AccessibleDocument.cxx')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx16
1 files changed, 8 insertions, 8 deletions
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))
{