diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-06-18 05:03:01 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-06-18 05:55:46 +0200 |
commit | 99971d009e9c96d1d47aec14ecfbfeaa06dc140d (patch) | |
tree | 3c3045a016b6ecaa992e99b8ac348264d1f105cc /cui/source/tabpages | |
parent | b59a691d2f6b0d1b94ec68fa01768325e4a34dc9 (diff) |
Avoid needless copy of item
Change-Id: Ifdf4f3559065dca5eeff61fffa9de223778691f4
Reviewed-on: https://gerrit.libreoffice.org/74238
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 1ec685daaafe..cb83563920b2 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -216,10 +216,11 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) } case drawing::FillStyle_BITMAP: { - XFillBitmapItem aItem(static_cast<const XFillBitmapItem&>( rSet.Get( GetWhich( XATTR_FILLBITMAP ) ) )); + const bool bPattern + = rSet.Get(TypedWhichId<XFillBitmapItem>(GetWhich(XATTR_FILLBITMAP))).isPattern(); // pass full item set here, bitmap fill has many attributes (tiling, size, offset etc.) m_rXFSet.Put( rSet ); - if(!aItem.isPattern()) + if (!bPattern) SelectFillType(*m_xBtnBitmap); else SelectFillType(*m_xBtnPattern); |