summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwtxtex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/shells/drwtxtex.cxx')
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index fae34754fe5a..60bdf16380be 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -152,7 +152,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
const sal_uInt16 nSlot = rReq.GetSlot();
const sal_uInt16 nWhich = GetPool().GetWhich(nSlot);
- const SfxItemSet *pNewAttrs = rReq.GetArgs();
+ std::unique_ptr<SfxItemSet> pNewAttrs(rReq.GetArgs() ? rReq.GetArgs()->Clone() : nullptr);
bool bRestoreSelection = false;
ESelection aOldSelection;
@@ -650,21 +650,15 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
assert(false && "wrong dispatcher");
return;
}
-
- std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs ? pNewAttrs->Clone() : nullptr;
- if (pNewArgs)
+ if (nEEWhich && pNewAttrs)
{
- lcl_convertStringArguments(nSlot, pNewArgs);
+ lcl_convertStringArguments(nSlot, pNewAttrs);
- if (nEEWhich)
- {
- std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
- pNewArgs->Put(*pNewItem);
- }
-
- SetAttrToMarked(*pNewArgs);
+ aNewAttr.Put(pNewAttrs->Get(nWhich).CloneSetWhich(nEEWhich));
}
+ SetAttrToMarked(aNewAttr);
+
GetView().GetViewFrame()->GetBindings().InvalidateAll(false);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())