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>
This commit is contained in:
@@ -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 );
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user