diff options
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 1a5f3a8665d4..9f23ed7e6b7d 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -128,9 +128,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) const sal_uInt16 nSlot = rReq.GetSlot(); const sal_uInt16 nWhich = GetPool().GetWhich(nSlot); - std::optional<SfxItemSet> pNewAttrs; - if (rReq.GetArgs()) - pNewAttrs.emplace(rReq.GetArgs()->CloneAsValue()); + std::unique_ptr<SfxItemSet> pNewAttrs(rReq.GetArgs() ? rReq.GetArgs()->Clone() : nullptr); bool bRestoreSelection = false; ESelection aOldSelection; |