summaryrefslogtreecommitdiff
path: root/sc/source
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
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')
-rw-r--r--sc/source/core/data/colorscale.cxx8
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/data/dpsave.cxx14
-rw-r--r--sc/source/core/data/dptabres.cxx8
-rw-r--r--sc/source/core/data/dptabsrc.cxx10
-rw-r--r--sc/source/core/data/sheetevents.cxx8
-rw-r--r--sc/source/core/tool/editutil.cxx6
-rw-r--r--sc/source/filter/excel/xepivot.cxx8
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx2
-rw-r--r--sc/source/filter/excel/xlpivot.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/inc/eeparser.hxx8
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx4
-rw-r--r--sc/source/filter/inc/xlpivot.hxx4
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.hxx4
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx6
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.hxx16
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx10
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx14
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx16
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx4
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx2
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx4
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/output.cxx14
31 files changed, 102 insertions, 102 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 2da00e1f03d6..2fc667a17b74 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -585,17 +585,17 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, const ScColorScal
return (*itr)->GetValue();
}
-o3tl::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
+std::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
{
ScRefCellValue rCell(*mpDoc, rAddr);
if(!rCell.hasNumeric())
- return o3tl::optional<Color>();
+ return std::optional<Color>();
// now we have for sure a value
double nVal = rCell.getValue();
if (maColorScales.size() < 2)
- return o3tl::optional<Color>();
+ return std::optional<Color>();
double nMin = std::numeric_limits<double>::max();
double nMax = std::numeric_limits<double>::min();
@@ -603,7 +603,7 @@ o3tl::optional<Color> ScColorScaleFormat::GetColor( const ScAddress& rAddr ) con
// this check is for safety
if(nMin >= nMax)
- return o3tl::optional<Color>();
+ return std::optional<Color>();
ScColorScaleEntries::const_iterator itr = begin();
double nValMin = CalcValue(nMin, nMax, itr);
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 2cd0e6f0ef56..b85365146816 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1315,7 +1315,7 @@ public:
bool operator() (const ScDPSaveDimension* pDim) const
{
// Layout name takes precedence.
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName && ScGlobal::pCharClass->uppercase(*pLayoutName) == maName)
return true;
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 109e9da01767..0f0d687bd762 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -120,7 +120,7 @@ void ScDPSaveMember::SetLayoutName( const OUString& rName )
mpLayoutName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveMember::GetLayoutName() const
+const std::optional<OUString> & ScDPSaveMember::GetLayoutName() const
{
return mpLayoutName;
}
@@ -355,7 +355,7 @@ void ScDPSaveDimension::SetSubtotalName(const OUString& rName)
mpSubtotalName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveDimension::GetSubtotalName() const
+const std::optional<OUString> & ScDPSaveDimension::GetSubtotalName() const
{
return mpSubtotalName;
}
@@ -371,7 +371,7 @@ bool ScDPSaveDimension::IsMemberNameInUse(const OUString& rName) const
if (rName.equalsIgnoreAsciiCase(pMem->GetName()))
return true;
- const o3tl::optional<OUString> & pLayoutName = pMem->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMem->GetLayoutName();
return pLayoutName && rName.equalsIgnoreAsciiCase(*pLayoutName);
});
}
@@ -381,7 +381,7 @@ void ScDPSaveDimension::SetLayoutName(const OUString& rName)
mpLayoutName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveDimension::GetLayoutName() const
+const std::optional<OUString> & ScDPSaveDimension::GetLayoutName() const
{
return mpLayoutName;
}
@@ -502,7 +502,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
if (mpLayoutName)
ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_LAYOUTNAME, *mpLayoutName);
- const o3tl::optional<OUString> & pSubTotalName = GetSubtotalName();
+ const std::optional<OUString> & pSubTotalName = GetSubtotalName();
if (pSubTotalName)
// Custom subtotal name, with '?' being replaced by the visible field name later.
ScUnoHelpFunctions::SetOptionalPropertyValue(xDimProp, SC_UNO_DP_FIELD_SUBTOTALNAME, *pSubTotalName);
@@ -768,7 +768,7 @@ void ScDPSaveData::SetGrandTotalName(const OUString& rName)
mpGrandTotalName = rName;
}
-const o3tl::optional<OUString> & ScDPSaveData::GetGrandTotalName() const
+const std::optional<OUString> & ScDPSaveData::GetGrandTotalName() const
{
return mpGrandTotalName;
}
@@ -1054,7 +1054,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
// no error
}
- const o3tl::optional<OUString> & pGrandTotalName = GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = GetGrandTotalName();
if (pGrandTotalName)
ScUnoHelpFunctions::SetOptionalPropertyValue(xSourceProp, SC_UNO_DP_GRANDTOTAL_NAME, *pGrandTotalName);
}
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index db117a13f638..6e14356ea7b1 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -858,7 +858,7 @@ OUString ScDPResultData::GetMeasureString(long nMeasure, bool bForce, ScSubTotal
const ScDPDimension* pDataDim = mrSource.GetDataDimension(nMeasure);
if (pDataDim)
{
- const o3tl::optional<OUString> & pLayoutName = pDataDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDataDim->GetLayoutName();
if (pLayoutName)
return *pLayoutName;
}
@@ -1380,7 +1380,7 @@ void ScDPResultMember::FillMemberResults(
const ScDPMember* pMemberDesc = GetDPMember();
if (pMemberDesc)
{
- const o3tl::optional<OUString> & pLayoutName = pMemberDesc->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMemberDesc->GetLayoutName();
if (pLayoutName)
{
aCaption = *pLayoutName;
@@ -1482,7 +1482,7 @@ void ScDPResultMember::FillMemberResults(
if (pMemberDesc)
{
// single data field layout.
- const o3tl::optional<OUString> & pSubtotalName = pParentDim->GetSubtotalName();
+ const std::optional<OUString> & pSubtotalName = pParentDim->GetSubtotalName();
if (pSubtotalName)
aSubStr = lcl_parseSubtotalName(*pSubtotalName, aCaption);
pArray[rPos].Flags &= ~sheet::MemberResultFlags::GRANDTOTAL;
@@ -1490,7 +1490,7 @@ void ScDPResultMember::FillMemberResults(
else
{
// root member - subtotal (grand total?) for multi-data field layout.
- const o3tl::optional<OUString> & pGrandTotalName = pResultData->GetSource().GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = pResultData->GetSource().GetGrandTotalName();
if (pGrandTotalName)
aSubStr = *pGrandTotalName;
pArray[rPos].Flags |= sheet::MemberResultFlags::GRANDTOTAL;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index bfc89049a708..1e674cc6e972 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -111,7 +111,7 @@ ScDPSource::~ScDPSource()
pResData.reset();
}
-const o3tl::optional<OUString> & ScDPSource::GetGrandTotalName() const
+const std::optional<OUString> & ScDPSource::GetGrandTotalName() const
{
return mpGrandTotalName;
}
@@ -1289,12 +1289,12 @@ ScDPHierarchies* ScDPDimension::GetHierarchiesObject()
return mxHierarchies.get();
}
-const o3tl::optional<OUString> & ScDPDimension::GetLayoutName() const
+const std::optional<OUString> & ScDPDimension::GetLayoutName() const
{
return mpLayoutName;
}
-const o3tl::optional<OUString> & ScDPDimension::GetSubtotalName() const
+const std::optional<OUString> & ScDPDimension::GetSubtotalName() const
{
return mpSubtotalName;
}
@@ -2152,7 +2152,7 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const OUString& aPropertyName )
if (!pDim)
return aRet;
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (!pLayoutName)
return aRet;
@@ -2512,7 +2512,7 @@ ScDPItemData ScDPMember::FillItemData() const
return (pData ? *pData : ScDPItemData());
}
-const o3tl::optional<OUString> & ScDPMember::GetLayoutName() const
+const std::optional<OUString> & ScDPMember::GetLayoutName() const
{
return mpLayoutName;
}
diff --git a/sc/source/core/data/sheetevents.cxx b/sc/source/core/data/sheetevents.cxx
index d3ebc7a48719..2ffeff608143 100644
--- a/sc/source/core/data/sheetevents.cxx
+++ b/sc/source/core/data/sheetevents.cxx
@@ -19,7 +19,7 @@
#include <sheetevents.hxx>
#include <com/sun/star/script/vba/VBAEventId.hpp>
-#include <o3tl/optional.hxx>
+#include <optional>
OUString ScSheetEvents::GetEventName(ScSheetEventId nEvent)
{
@@ -88,7 +88,7 @@ ScSheetEvents& ScSheetEvents::operator=(const ScSheetEvents& rOther)
Clear();
if (rOther.mpScriptNames)
{
- mpScriptNames.reset( new o3tl::optional<OUString>[COUNT] );
+ mpScriptNames.reset( new std::optional<OUString>[COUNT] );
for (sal_Int32 nEvent=0; nEvent<COUNT; ++nEvent)
mpScriptNames[nEvent] = rOther.mpScriptNames[nEvent];
}
@@ -100,7 +100,7 @@ const OUString* ScSheetEvents::GetScript(ScSheetEventId nEvent) const
{
if (mpScriptNames)
{
- o3tl::optional<OUString> const & r = mpScriptNames[static_cast<int>(nEvent)];
+ std::optional<OUString> const & r = mpScriptNames[static_cast<int>(nEvent)];
if (r)
return &*r;
}
@@ -112,7 +112,7 @@ void ScSheetEvents::SetScript(ScSheetEventId eEvent, const OUString* pNew)
int nEvent = static_cast<int>(eEvent);
if (!mpScriptNames)
{
- mpScriptNames.reset( new o3tl::optional<OUString>[COUNT] );
+ mpScriptNames.reset( new std::optional<OUString>[COUNT] );
}
if (pNew)
mpScriptNames[nEvent] = *pNew;
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 3e0689410adc..4e64fd8cc08a 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -195,7 +195,7 @@ std::unique_ptr<EditTextObject> ScEditUtil::Clone( const EditTextObject& rObj, S
}
OUString ScEditUtil::GetCellFieldValue(
- const SvxFieldData& rFieldData, const ScDocument* pDoc, o3tl::optional<Color>* ppTextColor )
+ const SvxFieldData& rFieldData, const ScDocument* pDoc, std::optional<Color>* ppTextColor )
{
OUString aRet;
switch (rFieldData.GetClassId())
@@ -796,7 +796,7 @@ ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP )
OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- o3tl::optional<Color>& /* rTxtColor */, o3tl::optional<Color>& /* rFldColor */ )
+ std::optional<Color>& /* rTxtColor */, std::optional<Color>& /* rFldColor */ )
{
const SvxFieldData* pFieldData = rField.GetField();
if (!pFieldData)
@@ -860,7 +860,7 @@ ScFieldEditEngine::ScFieldEditEngine(
OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& /* rFldColor */ )
+ std::optional<Color>& rTxtColor, std::optional<Color>& /* rFldColor */ )
{
const SvxFieldData* pFieldData = rField.GetField();
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 33d0a8aa2200..30c973abda8e 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -922,7 +922,7 @@ void XclExpPTItem::SetPropertiesFromMember( const ScDPSaveMember& rSaveMem )
::set_flag( maItemInfo.mnFlags, EXC_SXVI_HIDEDETAIL, rSaveMem.HasShowDetails() && !rSaveMem.GetShowDetails() );
// visible name
- const o3tl::optional<OUString> & pVisName = rSaveMem.GetLayoutName();
+ const std::optional<OUString> & pVisName = rSaveMem.GetLayoutName();
if (pVisName && *pVisName != GetItemName())
maItemInfo.SetVisName(*pVisName);
}
@@ -1005,11 +1005,11 @@ void XclExpPTField::SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
::set_flag( maFieldExtInfo.mnFlags, EXC_SXVDEX_SHOWALL, rSaveDim.HasShowEmpty() && rSaveDim.GetShowEmpty() );
// visible name
- const o3tl::optional<OUString> & pLayoutName = rSaveDim.GetLayoutName();
+ const std::optional<OUString> & pLayoutName = rSaveDim.GetLayoutName();
if (pLayoutName && *pLayoutName != GetFieldName())
maFieldInfo.SetVisName(*pLayoutName);
- const o3tl::optional<OUString> & pSubtotalName = rSaveDim.GetSubtotalName();
+ const std::optional<OUString> & pSubtotalName = rSaveDim.GetSubtotalName();
if (pSubtotalName)
{
OUString aSubName = lcl_convertCalcSubtotalName(*pSubtotalName);
@@ -1076,7 +1076,7 @@ void XclExpPTField::SetDataPropertiesFromDim( const ScDPSaveDimension& rSaveDim
rDataInfo.SetApiAggFunc( eFunc );
// visible name
- const o3tl::optional<OUString> & pVisName = rSaveDim.GetLayoutName();
+ const std::optional<OUString> & pVisName = rSaveDim.GetLayoutName();
if (pVisName)
rDataInfo.SetVisName(*pVisName);
else
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 8bb77f5eb1a0..91958bbf82a4 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -1121,7 +1121,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
long nDimIdx = rDataField.mnPos;
assert(aCachedDims[nDimIdx]); // the loop above should have screened for NULL's.
const ScDPSaveDimension& rDim = *rDataField.mpDim;
- o3tl::optional<OUString> pName = rDim.GetLayoutName();
+ std::optional<OUString> pName = rDim.GetLayoutName();
// tdf#124651: despite being optional in CT_DataField according to ECMA-376 Part 1,
// Excel (at least 2016) seems to insist on the presence of "name" attribute in
// dataField element.
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index c2d07ffa3dd7..d0f9df3d4fe1 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -994,7 +994,7 @@ void XclPTViewEx9Info::Init( const ScDPObject& rDPObj )
const ScDPSaveData* pData = rDPObj.GetSaveData();
if (pData)
{
- const o3tl::optional<OUString> & pGrandTotal = pData->GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotal = pData->GetGrandTotalName();
if (pGrandTotal)
maGrandTotalName = *pGrandTotal;
}
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index a1ccfb6e4ded..8e4a1dd6d63d 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2058,7 +2058,7 @@ void ScHTMLTable::DataOn( const HtmlImportInfo& rInfo )
{
// read needed options from the <td> tag
ScHTMLSize aSpanSize( 1, 1 );
- o3tl::optional<OUString> pValStr, pNumStr;
+ std::optional<OUString> pValStr, pNumStr;
const HTMLOptions& rOptions = static_cast<HTMLParser*>(rInfo.pParser)->GetOptions();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
for (const auto& rOption : rOptions)
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index 90fe0960a810..dbd0cbd56137 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -24,7 +24,7 @@
#include <vcl/graph.hxx>
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <address.hxx>
#include <memory>
#include <vector>
@@ -52,11 +52,11 @@ struct ScEEParseEntry
{
SfxItemSet aItemSet;
ESelection aSel; // Selection in EditEngine
- o3tl::optional<OUString>
+ std::optional<OUString>
pValStr; // HTML possibly SDVAL string
- o3tl::optional<OUString>
+ std::optional<OUString>
pNumStr; // HTML possibly SDNUM string
- o3tl::optional<OUString>
+ std::optional<OUString>
pName; // HTML possibly anchor/RangeName
OUString aAltText; // HTML IMG ALT Text
std::vector< std::unique_ptr<ScHTMLImage> > maImageList; // graphics in this cell
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 8fa9a5c56522..4483b645a643 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -22,7 +22,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
// Code in fontbuff.cxx (excel)
@@ -31,7 +31,7 @@ class LotusFontBuffer
private:
struct ENTRY
{
- o3tl::optional<OUString> xTmpName;
+ std::optional<OUString> xTmpName;
std::unique_ptr<SvxFontItem> pFont;
std::unique_ptr<SvxFontHeightItem> pHeight;
sal_Int32 nType = -1; // < 0 -> undefined
diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx
index c0df275cab24..2e784cef8d42 100644
--- a/sc/source/filter/inc/xlpivot.hxx
+++ b/sc/source/filter/inc/xlpivot.hxx
@@ -26,7 +26,7 @@
#include "xladdress.hxx"
#include <dpobject.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
class XclImpStream;
class XclExpStream;
@@ -624,7 +624,7 @@ struct XclPTFieldExtInfo
sal_uInt16 mnSortField; /// Index to data field sorting bases on.
sal_uInt16 mnShowField; /// Index to data field AutoShow bases on.
sal_uInt16 mnNumFmt;
- o3tl::optional<OUString> mpFieldTotalName;
+ std::optional<OUString> mpFieldTotalName;
explicit XclPTFieldExtInfo();
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index fdf042f7ad4b..67d365cb2126 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -431,7 +431,7 @@ void ScXMLExportDataPilot::WriteLayoutInfo(const ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteSubTotals(const ScDPSaveDimension* pDim)
{
sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount();
- o3tl::optional<OUString> pLayoutName;
+ std::optional<OUString> pLayoutName;
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
// Export display names only for 1.2 extended or later.
pLayoutName = pDim->GetSubtotalName();
@@ -467,7 +467,7 @@ void ScXMLExportDataPilot::WriteMembers(const ScDPSaveDimension* pDim)
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Export display names only for ODF 1.2 extended or later.
- const o3tl::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
if (pLayoutName)
rExport.AddAttribute(XML_NAMESPACE_TABLE_EXT, XML_DISPLAY_NAME, *pLayoutName);
}
@@ -678,7 +678,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Export display names only for ODF 1.2 extended or later.
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName)
rExport.AddAttribute(XML_NAMESPACE_TABLE_EXT, XML_DISPLAY_NAME, *pLayoutName);
}
@@ -724,7 +724,7 @@ void ScXMLExportDataPilot::WriteDimensions(const ScDPSaveData* pDPSave)
}
}
-void ScXMLExportDataPilot::WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const o3tl::optional<OUString> & pGrandTotal)
+void ScXMLExportDataPilot::WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const std::optional<OUString> & pGrandTotal)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DISPLAY, bVisible ? XML_TRUE : XML_FALSE);
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ORIENTATION, eOrient);
@@ -812,7 +812,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
// grand total elements.
- const o3tl::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
if (pGrandTotalName && rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
// Use the new data-pilot-grand-total element.
diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx
index 806e270028ec..8e0d0affcd76 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.hxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.hxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <rtl/ustring.hxx>
#include <global.hxx>
@@ -65,7 +65,7 @@ class ScXMLExportDataPilot
void WriteDimension(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData);
void WriteDimensions(const ScDPSaveData* pDPSave);
- void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const o3tl::optional<OUString> & pGrandTotal);
+ void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const std::optional<OUString> & pGrandTotal);
public:
explicit ScXMLExportDataPilot(ScXMLExport& rExport);
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 21fb889e8e43..e7dffa697e36 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -109,7 +109,7 @@ void ScMyStyleRanges::AddRange(const ScRange& rRange, const sal_Int16 nType)
}
}
-void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange, const o3tl::optional<OUString> & pCurrency)
+void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange, const std::optional<OUString> & pCurrency)
{
if (!pCurrencyList)
pCurrencyList.reset( new ScMyCurrencyStylesSet );
@@ -327,8 +327,8 @@ void ScMyStylesImportHelper::SetRowStyle(const OUString& sStyleName)
aRowDefaultStyle = GetIterator(sStyleName);
}
-void ScMyStylesImportHelper::SetAttributes(o3tl::optional<OUString> pStyleNameP,
- o3tl::optional<OUString> pCurrencyP, const sal_Int16 nCellTypeP)
+void ScMyStylesImportHelper::SetAttributes(std::optional<OUString> pStyleNameP,
+ std::optional<OUString> pCurrencyP, const sal_Int16 nCellTypeP)
{
pStyleName = std::move(pStyleNameP);
pCurrency = std::move(pCurrencyP);
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index 4a8748ad12ff..45ac02b9a8fd 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -29,7 +29,7 @@
#include <set>
#include <map>
#include <vector>
-#include <o3tl/optional.hxx>
+#include <optional>
class ScXMLImport;
@@ -101,7 +101,7 @@ public:
ScMyStyleRanges();
~ScMyStyleRanges();
void AddRange(const ScRange& rRange, const sal_Int16 nType);
- void AddCurrencyRange(const ScRange& rRange, const o3tl::optional<OUString> & pCurrency);
+ void AddCurrencyRange(const ScRange& rRange, const std::optional<OUString> & pCurrency);
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab);
void SetStylesToRanges(const OUString* pStyleName, ScXMLImport& rImport);
};
@@ -115,13 +115,13 @@ class ScMyStylesImportHelper
std::vector<ScMyStylesMap::iterator> aColDefaultStyles;
ScMyStylesMap::iterator aRowDefaultStyle;
ScXMLImport& rImport;
- o3tl::optional<OUString>
+ std::optional<OUString>
pStyleName;
- o3tl::optional<OUString>
+ std::optional<OUString>
pPrevStyleName;
- o3tl::optional<OUString>
+ std::optional<OUString>
pCurrency;
- o3tl::optional<OUString>
+ std::optional<OUString>
pPrevCurrency;
ScRange aPrevRange;
sal_Int16 nCellType;
@@ -138,8 +138,8 @@ public:
~ScMyStylesImportHelper();
void AddColumnStyle(const OUString& rStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat);
void SetRowStyle(const OUString& rStyleName);
- void SetAttributes(o3tl::optional<OUString> pStyleName,
- o3tl::optional<OUString> pCurrency, const sal_Int16 nCellType);
+ void SetAttributes(std::optional<OUString> pStyleName,
+ std::optional<OUString> pCurrency, const sal_Int16 nCellType);
void AddRange(const ScRange& rRange);
void AddCell(const ScAddress& rAddress);
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab); // a col is inserted before nCol
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 64260d2c3e58..7c5d1d8c2c0b 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -94,7 +94,7 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int32 nEndX(-1);
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- o3tl::optional<OUString> xRangeList;
+ std::optional<OUString> xRangeList;
SdrLayerID nLayerID = SDRLAYER_NOTFOUND;
for( sal_Int16 i=0; i < nAttrCount; ++i )
{
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 7baff729c77b..353bdb429f18 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -144,8 +144,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
rXMLImport.GetTables().AddColumn(bTempIsCovered);
- o3tl::optional<OUString> xStyleName;
- o3tl::optional<OUString> xCurrencySymbol;
+ std::optional<OUString> xStyleName;
+ std::optional<OUString> xCurrencySymbol;
if ( rAttrList.is() )
{
for (auto &it : *rAttrList)
@@ -1028,7 +1028,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
}
void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
- const SCCOL nCurrentCol, const ::o3tl::optional< OUString >& pOUText )
+ const SCCOL nCurrentCol, const ::std::optional< OUString >& pOUText )
{
ScDocument* pDoc = rXMLImport.GetDocument();
bool bDoIncrement = true;
@@ -1167,7 +1167,7 @@ bool isEmptyOrNote( const ScDocument* pDoc, const ScAddress& rCurrentPos )
}
void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos,
- const ::o3tl::optional< OUString >& pOUText, ScAddress& rCurrentPos )
+ const ::std::optional< OUString >& pOUText, ScAddress& rCurrentPos )
{
ScDocument* pDoc = rXMLImport.GetDocument();
ScMyTables& rTables = rXMLImport.GetTables();
@@ -1303,7 +1303,7 @@ OUString getOutputString( ScDocument* pDoc, const ScAddress& aCellPos )
void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos )
{
- ::o3tl::optional< OUString > pOUText;
+ ::std::optional< OUString > pOUText;
ScDocument* pDoc = rXMLImport.GetDocument();
if( nCellType == util::NumberFormat::TEXT )
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index eefeb8ead221..f1ce2e1b6bd6 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -25,7 +25,7 @@
#include <svl/itemset.hxx>
#include <editeng/editdata.hxx>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <memory>
#include <vector>
@@ -62,10 +62,10 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
typedef std::vector<std::unique_ptr<Field> > FieldsType;
typedef std::pair<OUString, OUString> FormulaWithNamespace;
- o3tl::optional<FormulaWithNamespace> maFormula; /// table:formula attribute
- o3tl::optional<OUString> maStringValue; /// office:string-value attribute
- o3tl::optional<OUString> maContentValidationName;
- o3tl::optional<OUString> maFirstParagraph; /// unformatted first paragraph, for better performance.
+ std::optional<FormulaWithNamespace> maFormula; /// table:formula attribute
+ std::optional<OUString> maStringValue; /// office:string-value attribute
+ std::optional<OUString> maContentValidationName;
+ std::optional<OUString> maFirstParagraph; /// unformatted first paragraph, for better performance.
ScEditEngineDefaulter* mpEditEngine;
OUStringBuffer maParagraph{32};
@@ -109,10 +109,10 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
void SetFormulaCell ( ScFormulaCell* pFCell ) const;
void PutTextCell ( const ScAddress& rScCurrentPos, const SCCOL nCurrentCol,
- const ::o3tl::optional< OUString >& pOUText );
+ const ::std::optional< OUString >& pOUText );
void PutValueCell ( const ScAddress& rScCurrentPos );
void AddTextAndValueCell ( const ScAddress& rScCellPos,
- const ::o3tl::optional< OUString >& pOUText, ScAddress& rScCurrentPos );
+ const ::std::optional< OUString >& pOUText, ScAddress& rScCurrentPos );
void AddNonFormulaCell ( const ScAddress& rScCellPos );
void PutFormulaCell ( const ScAddress& rScCurrentPos );
void AddFormulaCell ( const ScAddress& rScCellPos );
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))
{
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 4bb3f1fee9dd..9127f879d17a 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -175,7 +175,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
double parameter1 = parameterInteger1 / static_cast<double>(PRECISION);
double parameter2 = parameterInteger2 / static_cast<double>(PRECISION);
- o3tl::optional<sal_Int8> aDecimalPlaces;
+ std::optional<sal_Int8> aDecimalPlaces;
if (mxEnableRounding->get_active())
{
aDecimalPlaces = static_cast<sal_Int8>(mxDecimalPlaces->get_value());
@@ -250,7 +250,7 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers()
}
template<class RNG>
-void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, o3tl::optional<sal_Int8> aDecimalPlaces)
+void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, std::optional<sal_Int8> aDecimalPlaces)
{
OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE);
OUString aDistributionName = ScResId(pDistributionStringId);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 3d03cf867b4e..e73bcc4c8085 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -868,7 +868,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg(weld::Window* pParent, ScDPObject& rDPObj,
{
if (pDimension)
{
- const o3tl::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDimension->GetLayoutName();
if (pLayoutName)
aName = *pLayoutName;
}
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index ff2fbd1f6351..32b26505db12 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -13,7 +13,7 @@
#include <sal/config.h>
-#include <o3tl/optional.hxx>
+#include <optional>
#include <address.hxx>
#include "anyrefdg.hxx"
@@ -63,7 +63,7 @@ private:
template<class RNG>
- void GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, const o3tl::optional<sal_Int8> aDecimalPlaces);
+ void GenerateNumbers(RNG& randomGenerator, const char* pDistributionStringId, const std::optional<sal_Int8> aDecimalPlaces);
void SelectGeneratorAndGenerateNumbers();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index f66e419ebc9c..c46c01dda25c 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -104,7 +104,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOHeader;
std::unique_ptr<sdr::overlay::OverlayObjectList> mpOOShrink;
- o3tl::optional<tools::Rectangle> mpAutoFillRect;
+ std::optional<tools::Rectangle> mpAutoFillRect;
/// LibreOfficeKit needs a persistent FmFormView for tiled rendering,
/// otherwise the invalidations from drawinglayer do not work.
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index af74df3d718e..638ed247be6c 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -183,8 +183,8 @@ void ScHFEditPage::InitPreDefinedList()
{
SvtUserOptions aUserOpt;
- o3tl::optional<Color> pTxtColour;
- o3tl::optional<Color> pFldColour;
+ std::optional<Color> pTxtColour;
+ std::optional<Color> pFldColour;
// Get the all field values at the outset.
OUString aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c17908803c50..ad174f970127 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -873,7 +873,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope
}
else if ( aPropertyName == SC_UNO_DP_GRANDTOTAL_NAME )
{
- const o3tl::optional<OUString> & pGrandTotalName = aNewData.GetGrandTotalName();
+ const std::optional<OUString> & pGrandTotalName = aNewData.GetGrandTotalName();
if (pGrandTotalName)
aRet <<= *pGrandTotalName; // same behavior as in ScDPSource
}
@@ -1672,7 +1672,7 @@ OUString SAL_CALL ScDataPilotFieldObj::getName()
aName = SC_DATALAYOUT_NAME;
else
{
- const o3tl::optional<OUString> & pLayoutName = pDim->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pDim->GetLayoutName();
if (pLayoutName)
aName = *pLayoutName;
else
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index fcb986514ef8..5cf63e574936 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -177,7 +177,7 @@ public:
explicit ScUnoEditEngine(ScEditEngineDefaulter* pSource);
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor ) override;
+ std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor ) override;
sal_uInt16 CountFields();
SvxFieldData* FindByIndex(sal_uInt16 nIndex);
@@ -203,7 +203,7 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* pSource)
}
OUString ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- sal_Int32 nPara, sal_Int32 nPos, o3tl::optional<Color>& rTxtColor, o3tl::optional<Color>& rFldColor )
+ sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rTxtColor, std::optional<Color>& rFldColor )
{
OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor ));
if (eMode != SC_UNO_COLLECT_NONE)
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 0a76a774fa8e..2ca08843fd42 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1541,7 +1541,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
if (pDim->GetSubTotalFunc(0) != ScGeneralFunction::AUTO)
break;
- const o3tl::optional<OUString> & pLayoutName = pMem->GetLayoutName();
+ const std::optional<OUString> & pLayoutName = pMem->GetLayoutName();
OUString aMemberName;
if (pLayoutName)
aMemberName = *pLayoutName;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 35cd545b2a6e..8683ecdadf77 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -774,8 +774,8 @@ static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
for ( nX=nX1; nX<=nX2; nX++ )
{
- o3tl::optional<Color> const & pCol1 = rFirst.pCellInfo[nX+1].mxColorScale;
- o3tl::optional<Color> const & pCol2 = rOther.pCellInfo[nX+1].mxColorScale;
+ std::optional<Color> const & pCol1 = rFirst.pCellInfo[nX+1].mxColorScale;
+ std::optional<Color> const & pCol2 = rOther.pCellInfo[nX+1].mxColorScale;
if( (pCol1 && !pCol2) || (!pCol1 && pCol2) )
return false;
@@ -909,7 +909,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() + 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon );
}
-void drawCells(vcl::RenderContext& rRenderContext, o3tl::optional<Color> const & pColor, const SvxBrushItem* pBackground, o3tl::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
+void drawCells(vcl::RenderContext& rRenderContext, std::optional<Color> const & pColor, const SvxBrushItem* pBackground, std::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
tools::Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo,
const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo,
sc::IconSetBitmapMap & rIconSetBitmapMap)
@@ -1059,7 +1059,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
const SvxBrushItem* pOldBackground = nullptr;
const SvxBrushItem* pBackground = nullptr;
- o3tl::optional<Color> pOldColor;
+ std::optional<Color> pOldColor;
const ScDataBarInfo* pOldDataBarInfo = nullptr;
const ScIconSetInfo* pOldIconSetInfo = nullptr;
SCCOL nMergedCols = 1;
@@ -1104,7 +1104,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
pBackground = lcl_FindBackground( mpDoc, nX, nY, nTab );
}
- o3tl::optional<Color> const & pColor = pInfo->mxColorScale;
+ std::optional<Color> const & pColor = pInfo->mxColorScale;
const ScDataBarInfo* pDataBarInfo = pInfo->pDataBar.get();
const ScIconSetInfo* pIconSetInfo = pInfo->pIconSet.get();
@@ -1136,7 +1136,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, o3tl::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
+ drawCells(rRenderContext, std::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
nArrY += nSkip;
}
@@ -1650,7 +1650,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
else
{
tools::Polygon aPoly(4, aPoints);
- o3tl::optional<Color> const & pColor = pInfo->mxColorScale;
+ std::optional<Color> const & pColor = pInfo->mxColorScale;
// for DrawPolygon, without Pen one pixel is left out
// to the right and below...