summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-06-08 00:45:32 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-06-08 23:14:13 +0200
commitb96174fac58eff71f0a8d2ad1e99b7776e34c33b (patch)
treecc37802fa64644fe8690502e0528667cb7fbe5b2
parentc1567aa18a79b807b23da12423166dc217ff582a (diff)
tdf#107087: Select bitmap fill from preset list
Also remove member variable that is used just once Change-Id: I369299aed75a3b44048aa09ba86b79e552cf6d14 Reviewed-on: https://gerrit.libreoffice.org/38551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r--cui/source/tabpages/tparea.cxx1
-rw-r--r--cui/source/tabpages/tpbitmap.cxx13
2 files changed, 7 insertions, 7 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 10e50cfd932b..9a5e22c8a6bc 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -437,7 +437,6 @@ void SvxAreaTabPage::CreatePage( sal_Int32 nId, SfxTabPage* pTab )
else if(nId == BITMAP)
{
static_cast<SvxBitmapTabPage*>(pTab)->SetBitmapList( m_pBitmapList );
- static_cast<SvxBitmapTabPage*>(pTab)->SetPos( &m_nPos );
static_cast<SvxBitmapTabPage*>(pTab)->SetBmpChgd( m_pnBitmapListState );
static_cast<SvxBitmapTabPage*>(pTab)->Construct();
static_cast<SvxBitmapTabPage*>(pTab)->ActivatePage( m_rXFSet );
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index d4f2513d8b98..3fbf0d3357c6 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -84,7 +84,6 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA
m_aXBitmapItem( OUString(), Graphic() ),
m_fObjectWidth(0.0),
m_fObjectHeight(0.0),
- m_pPos(nullptr),
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() ),
@@ -179,14 +178,16 @@ void SvxBitmapTabPage::Construct()
}
-void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
+void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet )
{
- if( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
+ XFillBitmapItem aItem( static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)) );
+
+ sal_Int32 nPos = SearchBitmapList( aItem.GetName() );
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- sal_uInt16 nId = m_pBitmapLB->GetItemId( static_cast<size_t>( *m_pPos ) );
- m_pBitmapLB->SelectItem(nId);
+ sal_uInt16 nId = m_pBitmapLB->GetItemId( static_cast<size_t>( nPos ) );
+ m_pBitmapLB->SelectItem( nId );
}
- *m_pPos = LISTBOX_ENTRY_NOTFOUND;
}