diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 8 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartAreaPanel.cxx | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index 494aee798ac9..fa7a0d319b04 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -297,7 +297,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( // translate model name to UI-name for predefined entries, so // that the correct entry is chosen in the list of UI-names - XLineDashItem* pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + std::unique_ptr<XLineDashItem> pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); if(pItemToPut) rOutItemSet.Put( *pItemToPut ); @@ -323,7 +323,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( // translate model name to UI-name for predefined entries, so // that the correct entry is chosen in the list of UI-names - XFillGradientItem* pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + std::unique_ptr<XFillGradientItem> pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); if(pItemToPut) rOutItemSet.Put( *pItemToPut ); @@ -349,7 +349,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( // translate model name to UI-name for predefined entries, so // that the correct entry is chosen in the list of UI-names - XFillHatchItem* pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + std::unique_ptr<XFillHatchItem> pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); if(pItemToPut) rOutItemSet.Put( *pItemToPut ); @@ -370,7 +370,7 @@ void GraphicPropertyItemConverter::FillSpecialItem( // translate model name to UI-name for predefined entries, so // that the correct entry is chosen in the list of UI-names - XFillBitmapItem* pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); + std::unique_ptr<XFillBitmapItem> pItemToPut = aItem.checkForUniqueItem( & m_rDrawModel ); if(pItemToPut) rOutItemSet.Put( *pItemToPut ); diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx index 023d14127922..0dd4d3e2de5c 100644 --- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx @@ -458,7 +458,7 @@ void ChartAreaPanel::updateData() xPropSet->getPropertyValue("FillBitmapName") >>= aBitmapName; GraphicObject aBitmap = getXBitmapFromName(mxModel, aBitmapName); XFillBitmapItem aBitmapItem(aBitmapName, aBitmap); - XFillBitmapItem* pBitmapItem = nullptr; + std::unique_ptr<XFillBitmapItem> pBitmapItem; DrawModelWrapper* pModelWrapper = nullptr; try { @@ -471,8 +471,7 @@ void ChartAreaPanel::updateData() catch (...) { } - updateFillBitmap(false, true, pBitmapItem ? pBitmapItem : &aBitmapItem); - delete pBitmapItem; + updateFillBitmap(false, true, pBitmapItem ? pBitmapItem.get() : &aBitmapItem); } if (xInfo->hasPropertyByName("FillTransparenceGradientName")) |