summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-14 11:16:04 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-14 21:36:10 +0100
commitf652d0f8250e03a9fca70b145fb2b0efc36aee85 (patch)
tree375c6710d3911a99333a1fa76aa6f9a869884fc1 /sw
parent0c75ccd84ea64f2c69afe104a4b4ebd55b3cc215 (diff)
jsdialogs: fix CID 1455691 & CID 1455690
Change-Id: Idbb3e70c1a09be7dd7c43747250f3a6368251cd9 Reviewed-on: https://gerrit.libreoffice.org/82661 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index e1073389879c..82a6e19beb1f 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -605,16 +605,19 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
return;
}
- std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs->Clone();
- lcl_convertStringArguments(nSlot, pNewArgs);
-
- if(nEEWhich && pNewAttrs)
+ std::unique_ptr<SfxItemSet> pNewArgs = pNewAttrs ? pNewAttrs->Clone() : nullptr;
+ if (pNewArgs)
{
- std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
- pNewArgs->Put(*pNewItem);
- }
+ lcl_convertStringArguments(nSlot, pNewArgs);
+
+ if (nEEWhich)
+ {
+ std::unique_ptr<SfxPoolItem> pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
+ pNewArgs->Put(*pNewItem);
+ }
- SetAttrToMarked(*pNewArgs);
+ SetAttrToMarked(*pNewArgs);
+ }
GetView().GetViewFrame()->GetBindings().InvalidateAll(false);