[Libreoffice-commits] core.git: cui/source

Katarina Behrens Katarina.Behrens at cib.de
Thu Jun 8 21:14:34 UTC 2017


 cui/source/tabpages/tparea.cxx   |    1 -
 cui/source/tabpages/tpbitmap.cxx |   13 +++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit b96174fac58eff71f0a8d2ad1e99b7776e34c33b
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Thu Jun 8 00:45:32 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

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;
 }
 
 


More information about the Libreoffice-commits mailing list