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

Rishabh Kumar kris.kr296 at gmail.com
Wed Jul 27 14:01:06 UTC 2016


 cui/source/tabpages/tpbitmap.cxx |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 5e0b0de0af07d3d8415370f1dea4dd61e811eed0
Author: Rishabh Kumar <kris.kr296 at gmail.com>
Date:   Wed Jul 27 16:53:30 2016 +0530

    Bug fix: Fill bitmap item set only when bitmap tab is selected
    
    Change-Id: I9bb7bdeecfcd51e8191f82c649585af8458f1001
    Reviewed-on: https://gerrit.libreoffice.org/27578
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 51668d12..09012bb 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -137,20 +137,22 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
     bool bModified = false;
     if( m_nDlgType == 0 && !*m_pbAreaTP )
     {
-        rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
-        size_t nPos = m_pBitmapLB->GetSelectItemPos();
-        if(VALUESET_ITEM_NOTFOUND != nPos)
+        if(PT_BITMAP == *m_nPageType)
         {
-            const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( static_cast<sal_uInt16>(nPos) );
-            const OUString aString(m_pBitmapLB->GetItemText( m_pBitmapLB->GetSelectItemId() ));
-            rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
-            bModified = true;
-        }
+            rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
+            size_t nPos = m_pBitmapLB->GetSelectItemPos();
+            if(VALUESET_ITEM_NOTFOUND != nPos)
+            {
+                const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( static_cast<sal_uInt16>(nPos) );
+                const OUString aString(m_pBitmapLB->GetItemText( m_pBitmapLB->GetSelectItemId() ));
+                rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
+                bModified = true;
+            }
 
-        rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
-        rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+            rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
+            rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+        }
     }
-
     return bModified;
 }
 


More information about the Libreoffice-commits mailing list