diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-23 14:04:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-23 19:49:43 +0200 |
commit | d4248915d7db69aa7bf31d9d6189b7375aca70ed (patch) | |
tree | 03e53496dd63b2a9725ede707c78cc02079d1018 /cui/source/tabpages | |
parent | 3cbcaa8d36ef889a28d790e18d68b838cfc46bb2 (diff) |
pass SvxBrushItem around by unique_ptr
we never create an object that is actually shared, so this is wasted
Note1: in
IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, void)
there was a comparison
if( aBrush != pRepr->GetBackground() || ...
which I removed
Note2: In
bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::shared_ptr<SfxPoolItem>& rToFill )
which had a condition
else if( rToFill != xBack )
I changed to compare contents
Change-Id: Idd769f44917c5ccc7e9f4bfbaddf12f9cd4151cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 123481198e17..38190271d778 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -181,7 +181,7 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet ) } case drawing::FillStyle_BITMAP: { - std::shared_ptr<SvxBrushItem> aBrushItem( getSvxBrushItemFromSourceSet( maSet, nWhich ) ); + std::unique_ptr<SvxBrushItem> aBrushItem( getSvxBrushItemFromSourceSet( maSet, nWhich ) ); if ( GraphicType::NONE != aBrushItem->GetGraphicObject()->GetType() ) rCoreSet->Put( *aBrushItem ); break; |