summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-03-27 18:08:40 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-06-17 22:16:02 +0200
commitaa9b7673e823384755284faada126ecff70de17c (patch)
treea0f0231a3c1373ef69b61344d7fed5ac96608230 /sd
parentd4f3360626ef41b769122a022c3791f22e4489c2 (diff)
Sync fuconbez.cxx with master
Change-Id: I2e898f5bfbbaa55c5e403185cd445af605300d1e Reviewed-on: https://gerrit.libreoffice.org/69837 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/74210 Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuconbez.cxx56
1 files changed, 26 insertions, 30 deletions
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index f36d89ba5e01..12c680cbaf57 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -105,39 +105,35 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
- if( pArgs )
+ if( !pArgs )
+ return;
+
+ const SfxPoolItem* pPoolItem = nullptr;
+ if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) )
+ maTargets = static_cast<const SfxUnoAnyItem*>( pPoolItem )->GetValue();
+
+ if (nSlotId == SID_DRAW_FREELINE_NOFILL)
{
- const SfxPoolItem* pPoolItem = nullptr;
- if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) )
- maTargets = static_cast<const SfxUnoAnyItem*>( pPoolItem )->GetValue();
+ const SfxUInt16Item* pTransparence = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
+ const SfxStringItem* pColor = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
+ const SfxUInt16Item* pWidth = rReq.GetArg<SfxUInt16Item>(FN_PARAM_3);
+ const SfxStringItem* pShapeName = rReq.GetArg<SfxStringItem>(SID_SHAPE_NAME);
- if (nSlotId == SID_DRAW_FREELINE_NOFILL)
+ if (pTransparence && pTransparence->GetValue() > 0)
{
- // This piece is only relevant for SID_DRAW_FREELINE_NOFILL
- // Adding this note for the future because the if-block gets auto-flattened
- // by loplugins
- const SfxUInt16Item* pTransparence = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
- const SfxStringItem* pColor = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
- const SfxUInt16Item* pWidth = rReq.GetArg<SfxUInt16Item>(FN_PARAM_3);
- const SfxStringItem* pShapeName = rReq.GetArg<SfxStringItem>(SID_SHAPE_NAME);
-
- if (pTransparence && pTransparence->GetValue() > 0)
- {
- mnTransparence = pTransparence->GetValue();
- }
- if (pColor && !pColor->GetValue().isEmpty())
- {
- msColor = pColor->GetValue();
- }
- if (pWidth && pWidth->GetValue() > 0)
- {
- mnWidth = pWidth->GetValue();
- }
- if (pShapeName && !pShapeName->GetValue().isEmpty())
- {
- msShapeName = pShapeName->GetValue();
- }
- // End of the SID_DRAW_FREELINE_NOFILL block
+ mnTransparence = pTransparence->GetValue();
+ }
+ if (pColor && !pColor->GetValue().isEmpty())
+ {
+ msColor = pColor->GetValue();
+ }
+ if (pWidth && pWidth->GetValue() > 0)
+ {
+ mnWidth = pWidth->GetValue();
+ }
+ if (pShapeName && !pShapeName->GetValue().isEmpty())
+ {
+ msShapeName = pShapeName->GetValue();
}
}
}