diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-10 08:52:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-10 09:18:53 +0100 |
commit | dcb1022362acb2e794bae79d8827557702dcffd7 (patch) | |
tree | 937b76408a4c0909c763283b8e40b26d6b406acf /svx/source/tbxctrls | |
parent | 4e222d9acf6f2373d505ea8d29056c3aea6b2e0c (diff) |
loplugin:refcounting also check OWeakObject subclasses
Change-Id: I2d89085a22d7424c6f8f7662307433ce50fc61d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110666
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/fillctrl.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 7a6cf136d99d..94555daae594 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -384,10 +384,10 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - XGradientList aGradientList( "", ""/*TODO?*/ ); - aGradientList.Insert(std::make_unique<XGradientEntry>(mpFillGradientItem->GetGradientValue(), aTmpStr)); - aGradientList.SetDirty( false ); - const BitmapEx aBmp = aGradientList.GetUiBitmap( 0 ); + rtl::Reference<XGradientList> xGradientList = new XGradientList( "", ""/*TODO?*/ ); + xGradientList->Insert(std::make_unique<XGradientEntry>(mpFillGradientItem->GetGradientValue(), aTmpStr)); + xGradientList->SetDirty( false ); + const BitmapEx aBmp = xGradientList->GetUiBitmap( 0 ); if (!aBmp.IsEmpty()) { @@ -395,7 +395,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", aGradientList.Get(0)->GetName(), *pVD); + mpLbFillAttr->append("", xGradientList->Get(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } @@ -447,10 +447,10 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - XHatchList aHatchList( "", ""/*TODO?*/ ); - aHatchList.Insert(std::make_unique<XHatchEntry>(mpHatchItem->GetHatchValue(), aTmpStr)); - aHatchList.SetDirty( false ); - const BitmapEx & aBmp = aHatchList.GetUiBitmap( 0 ); + rtl::Reference<XHatchList> xHatchList = new XHatchList( "", ""/*TODO?*/ ); + xHatchList->Insert(std::make_unique<XHatchEntry>(mpHatchItem->GetHatchValue(), aTmpStr)); + xHatchList->SetDirty( false ); + const BitmapEx & aBmp = xHatchList->GetUiBitmap( 0 ); if( !aBmp.IsEmpty() ) { @@ -458,7 +458,7 @@ void SvxFillToolBoxControl::Update() const Size aBmpSize(aBmp.GetSizePixel()); pVD->SetOutputSizePixel(aBmpSize, false); pVD->DrawBitmapEx(Point(), aBmp); - mpLbFillAttr->append("", aHatchList.GetHatch(0)->GetName(), *pVD); + mpLbFillAttr->append("", xHatchList->GetHatch(0)->GetName(), *pVD); mpLbFillAttr->set_active(mpLbFillAttr->get_count() - 1); } } |