From 99971d009e9c96d1d47aec14ecfbfeaa06dc140d Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 18 Jun 2019 05:03:01 +0200 Subject: Avoid needless copy of item Change-Id: Ifdf4f3559065dca5eeff61fffa9de223778691f4 Reviewed-on: https://gerrit.libreoffice.org/74238 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- cui/source/tabpages/tparea.cxx | 5 +++-- 1 file 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( rSet.Get( GetWhich( XATTR_FILLBITMAP ) ) )); + const bool bPattern + = rSet.Get(TypedWhichId(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); -- cgit v1.2.3