summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorRishabh Kumar <kris.kr296@gmail.com>2016-07-27 16:53:30 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-07-27 14:00:39 +0000
commit5e0b0de0af07d3d8415370f1dea4dd61e811eed0 (patch)
tree0a4a469c0ed3c1634f825875d291dbcb841546f7 /cui
parentf06a3503b69819e1d018ee4f587655173dff503e (diff)
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@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpbitmap.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 51668d125283..09012bb26914 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;
}