summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docfunc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 3e80b6ce5a6e..9c4d8848ffc7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1248,9 +1248,9 @@ bool ScDocFunc::SetCellText(
{
ScDocument& rDoc = rDocShell.GetDocument();
- ::std::unique_ptr<ScExternalRefManager::ApiGuard> pExtRefGuard;
+ ::std::optional<ScExternalRefManager::ApiGuard> pExtRefGuard;
if (bApi)
- pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(rDoc));
+ pExtRefGuard.emplace(rDoc);
ScInputStringType aRes =
ScStringUtil::parseInputString(*rDoc.GetFormatTable(), rText, LANGUAGE_ENGLISH_US);