diff options
Diffstat (limited to 'sd/source/ui/view/drviews2.cxx')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bef73c1726d3..1cd427e8b6f8 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -543,12 +543,12 @@ public: } }; - void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs) + void lcl_convertStringArguments(sal_uInt16 nSlot, SfxItemSet& rArgs) { Color aColor; const SfxPoolItem* pItem = nullptr; - if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) + if (SfxItemState::SET == rArgs.GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) { double fValue = static_cast<const SvxDoubleItem*>(pItem)->GetValue(); // FIXME: different units... @@ -556,9 +556,9 @@ public: int nValue = fValue * nPow; XLineWidthItem aItem(nValue); - pArgs->Put(aItem); + rArgs.Put(aItem); } - if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) + if (SfxItemState::SET == rArgs.GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) { OUString sColor = static_cast<const SfxStringItem*>(pItem)->GetValue(); @@ -572,26 +572,26 @@ public: case SID_ATTR_LINE_COLOR: { XLineColorItem aLineColorItem(OUString(), aColor); - pArgs->Put(aLineColorItem); + rArgs.Put(aLineColorItem); break; } case SID_ATTR_FILL_COLOR: { XFillColorItem aFillColorItem(OUString(), aColor); - pArgs->Put(aFillColorItem); + rArgs.Put(aFillColorItem); break; } } } - if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem)) + if (SfxItemState::SET == rArgs.GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem)) { const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem); if (pJSON) { XGradient aGradient = XGradient::fromJSON(pJSON->GetValue()); XFillGradientItem aItem(aGradient); - pArgs->Put(aItem); + rArgs.Put(aItem); } } } @@ -683,9 +683,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if( rReq.GetArgs() ) { - std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone(); - lcl_convertStringArguments(rReq.GetSlot(), pNewArgs); - mpDrawView->SetAttributes(*pNewArgs); + SfxItemSet aNewArgs = rReq.GetArgs()->CloneAsValue(); + lcl_convertStringArguments(rReq.GetSlot(), aNewArgs); + mpDrawView->SetAttributes(aNewArgs); rReq.Done(); } else |