diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 17:27:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 21:08:40 +0100 |
commit | 13194412aaed3b88655c3e4ce6ae34d742e8273e (patch) | |
tree | c388a7a109064284c22bf4a428c261990d1b2203 /cui | |
parent | fb46ba9dfa37ed3b56c9374230f1dd557d162388 (diff) |
coverity#1371441 Uninitialized scalar field
since
commit 7438bc1f0c4fd42420460a144cc074bfb8091705
Author: Rishabh Kumar <kris.kr296@gmail.com>
Date: Fri Jul 8 02:48:42 2016 +0530
[GSoC] Remove bitmap controls from area tab
Change-Id: I7290fda782bf7bb5c8a47168f5f74798bc353769
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 11 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 56 |
2 files changed, 22 insertions, 45 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 415055b113ac..590cd6eeb2c6 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -250,14 +250,6 @@ private: SfxItemSet& m_rXFSet; SfxMapUnit m_ePoolUnit; - FieldUnit m_eFUnit; - - //UUUU - bool mbOfferImportButton; - bool mbDirectGraphicSet; - Graphic maDirectGraphic; - OUString maDirectName; - VclPtr<PushButton> m_pBtnImport; DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void); DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void ); @@ -265,9 +257,6 @@ private: DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void ); DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void ); - //UUUU - DECL_LINK_TYPED( ClickImportHdl_Impl, Button*, void ); - DECL_LINK_TYPED( ModifyTileHdl_Impl, Edit&, void ); DECL_LINK_TYPED( ModifyTileClickHdl_Impl, Button*, void ); DECL_LINK_TYPED( ClickScaleHdl_Impl, Button*, void ); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 3dd275b7edc8..3f54e2263d74 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -174,11 +174,9 @@ void SvxAreaTabPage::dispose() m_pLbBitmap.clear(); m_pCtlBitmapPreview.clear(); m_pCtlXRectPreview.clear(); - m_pBtnImport.clear(); SvxTabPage::dispose(); } - void SvxAreaTabPage::Construct() { // fill colortables / lists @@ -493,45 +491,35 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) case drawing::FillStyle_BITMAP: { //UUUU - if(mbDirectGraphicSet && GraphicType::NONE != maDirectGraphic.GetType()) + m_nPos = m_pLbBitmap->GetSelectEntryPos(); + if( m_nPos != LISTBOX_ENTRY_NOTFOUND && + m_pLbBitmap->IsValueChangedFromSaved() ) { - const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); - rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP)); - rAttrs->Put(aXBmpItem); - bModified = true; + const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(m_nPos); + const OUString aString(m_pLbBitmap->GetSelectEntry()); + const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); + pOld = GetOldItem( *rAttrs, XATTR_FILLBITMAP ); + if ( !pOld || !( *static_cast<const XFillBitmapItem*>(pOld) == aFillBitmapItem ) ) + { + rAttrs->Put( aFillBitmapItem ); + bModified = true; + } } - else + // NEW + if( (eSavedStyle != eStyle) && + ( bModified || + SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ) ) ) ) { - m_nPos = m_pLbBitmap->GetSelectEntryPos(); - if( m_nPos != LISTBOX_ENTRY_NOTFOUND && - m_pLbBitmap->IsValueChangedFromSaved() ) - { - const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(m_nPos); - const OUString aString(m_pLbBitmap->GetSelectEntry()); - const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); - pOld = GetOldItem( *rAttrs, XATTR_FILLBITMAP ); - if ( !pOld || !( *static_cast<const XFillBitmapItem*>(pOld) == aFillBitmapItem ) ) + XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); + pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); + if ( !pOld || !( *static_cast<const XFillStyleItem*>(pOld) == aStyleItem ) ) { - rAttrs->Put( aFillBitmapItem ); + rAttrs->Put( aStyleItem ); bModified = true; } - } - // NEW - if( (eSavedStyle != eStyle) && - ( bModified || - SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ) ) ) ) - { - XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); - pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); - if ( !pOld || !( *static_cast<const XFillStyleItem*>(pOld) == aStyleItem ) ) - { - rAttrs->Put( aStyleItem ); - bModified = true; - } - } } - } - break; + } + break; } rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType)); rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,m_nPos)); |