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 /sw/source/filter/html/htmltabw.cxx | |
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 'sw/source/filter/html/htmltabw.cxx')
-rw-r--r-- | sw/source/filter/html/htmltabw.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 1bb526a2111b..f7d5951ae585 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -138,7 +138,7 @@ bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox, bool bRet = false; if( rBox.GetSttNd() ) { - std::shared_ptr<SvxBrushItem> aBrushItem = + std::unique_ptr<SvxBrushItem> aBrushItem = rBox.GetFrameFormat()->makeBackgroundBrushItem(); /// The table box has a background, if its background color is not "no fill"/ @@ -169,7 +169,7 @@ bool SwHTMLWrtTable::HasTabBackground( const SwTableLine& rLine, OSL_ENSURE( bTop || bBottom || bLeft || bRight, "HasTabBackground: cannot be called" ); - std::shared_ptr<SvxBrushItem> aBrushItem = rLine.GetFrameFormat()->makeBackgroundBrushItem(); + std::unique_ptr<SvxBrushItem> aBrushItem = rLine.GetFrameFormat()->makeBackgroundBrushItem(); /// The table line has a background, if its background color is not "no fill"/ /// "auto fill" or it has a background graphic. bool bRet = aBrushItem && (aBrushItem->GetColor() != COL_TRANSPARENT || |