diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-04-23 20:23:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-27 07:21:45 +0000 |
commit | 9eb2e683ab051edd0bce18841f0ac05df5038854 (patch) | |
tree | 71e7a4d4b8389c09ff17024fceaed94668751082 /cui | |
parent | fd964e3b9f60bf2043fdc39ab8161a586049b481 (diff) |
tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)
and put an assert in SfxPoolItem::SetWhich() so nothing new
creeps in.
Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df
Reviewed-on: https://gerrit.libreoffice.org/24324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/connpooloptions.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/dbregister.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 6 |
7 files changed, 19 insertions, 16 deletions
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index f0039c9428d5..262cde9cc42d 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -117,8 +117,8 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings) mpItemSet = new SfxItemSet( SfxGetpApp()->GetPool(), SID_HYPERLINK_GETLINK, SID_HYPERLINK_SETLINK ); - SvxHyperlinkItem aItem; - mpItemSet->Put (aItem, SID_HYPERLINK_GETLINK); + SvxHyperlinkItem aItem(SID_HYPERLINK_GETLINK); + mpItemSet->Put(aItem); SetInputSet (mpItemSet); diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index cef6aecf9f58..84f0c50c9d6d 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -348,7 +348,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, Button*, voi { // get macros from itemset const SvxMacroTableDtor* pMacroTbl = pHyperlinkItem->GetMacroTable(); - SvxMacroItem aItem ( GetWhich(SID_ATTR_MACROITEM) ); + SvxMacroItem aItem ( SID_ATTR_MACROITEM ); if( pMacroTbl ) aItem.SetMacroTable( *pMacroTbl ); @@ -356,7 +356,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, Button*, voi SfxItemSet* pItemSet = new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM ); - pItemSet->Put ( aItem, SID_ATTR_MACROITEM ); + pItemSet->Put ( aItem ); /* disable HyperLinkDlg for input while the MacroAssignDlg is working because if no JAVA is installed an error box occurs and then it is possible diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 9af9aec71dec..0cd9fb241577 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -381,14 +381,14 @@ namespace offapp // the enabled flag if (m_pEnablePooling->IsValueChangedFromSaved()) { - _rSet->Put(SfxBoolItem(SID_SB_POOLING_ENABLED, m_pEnablePooling->IsChecked()), SID_SB_POOLING_ENABLED); + _rSet->Put(SfxBoolItem(SID_SB_POOLING_ENABLED, m_pEnablePooling->IsChecked())); bModified = true; } // the settings for the single drivers if (m_pDriverList->isModified()) { - _rSet->Put(DriverPoolingSettingsItem(SID_SB_DRIVER_TIMEOUTS, m_pDriverList->getSettings()), SID_SB_DRIVER_TIMEOUTS); + _rSet->Put(DriverPoolingSettingsItem(SID_SB_DRIVER_TIMEOUTS, m_pDriverList->getSettings())); bModified = true; } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index f0d16513d245..c3a422c0d6fe 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -204,7 +204,7 @@ bool DbRegistrationOptionsPage::FillItemSet( SfxItemSet* rCoreSet ) } if ( m_nOldCount != aRegistrations.size() || m_bModified ) { - rCoreSet->Put(DatabaseMapItem( SID_SB_DB_REGISTER, aRegistrations ), SID_SB_DB_REGISTER); + rCoreSet->Put(DatabaseMapItem( SID_SB_DB_REGISTER, aRegistrations )); bModified = true; } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 22d23e0bb7e3..d4a7ad418ec0 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -250,7 +250,7 @@ bool SvxSingleNumPickTabPage::FillItemSet( SfxItemSet* rSet ) if( (bPreset || bModified) && pSaveNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId )); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset)); } @@ -416,7 +416,7 @@ bool SvxBulletPickTabPage::FillItemSet( SfxItemSet* rSet ) if( (bPreset || bModified) && pActNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId )); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset)); } return bModified; @@ -618,7 +618,7 @@ bool SvxNumPickTabPage::FillItemSet( SfxItemSet* rSet ) if( (bPreset || bModified) && pActNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId )); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset)); } return bModified; @@ -916,7 +916,7 @@ bool SvxBitmapPickTabPage::FillItemSet( SfxItemSet* rSet ) if( (bPreset || bModified) && pActNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId ) ); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset)); } @@ -1375,7 +1375,7 @@ bool SvxNumOptionsTabPage::FillItemSet( SfxItemSet* rSet ) if(bModified && pActNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId )); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, false)); } return bModified; @@ -3153,7 +3153,7 @@ bool SvxNumPositionTabPage::FillItemSet( SfxItemSet* rSet ) if(bModified && pActNum) { *pSaveNum = *pActNum; - rSet->Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); + rSet->Put(SvxNumBulletItem( *pSaveNum, nNumItemId )); rSet->Put(SfxBoolItem(SID_PARAM_NUM_PRESET, false)); } return bModified; diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 29b34702068c..431e10614e54 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -1348,7 +1348,8 @@ IMPL_LINK_NOARG_TYPED(SvxAreaTabPage, ModifyHatchingHdl_Impl, ListBox&, void) // fill Hatch background ItemSet XFillBackgroundItem aItem(static_cast<const XFillBackgroundItem&>(m_rOutAttrs.Get( XATTR_FILLBACKGROUND ))); - m_rXFSet.Put( aItem, XATTR_FILLBACKGROUND ); + aItem.SetWhich( XATTR_FILLBACKGROUND ); + m_rXFSet.Put ( aItem ); if(aItem.GetValue()) { if( SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index ac5af61e9b08..78e5fa84da03 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -338,7 +338,8 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet ) sal_uInt32 nPosBckColor = m_pLbBackgroundColor->GetSelectEntryPos(); XFillBackgroundItem aItem( m_pLbBackgroundColor->GetSelectEntryColor() != COL_WHITE ); - rSet->Put( aItem , XATTR_FILLBACKGROUND ); + aItem.SetWhich( XATTR_FILLBACKGROUND ); + rSet->Put( aItem ); if(aItem.GetValue()) { OUString aBckColorString; @@ -418,7 +419,8 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void* p ) m_rXFSet.Put( XFillHatchItem( OUString(), aXHatch ) ); XFillBackgroundItem aItem( m_pLbBackgroundColor->GetSelectEntryColor() != COL_WHITE ); - m_rXFSet.Put( aItem, XATTR_FILLBACKGROUND ); + aItem.SetWhich( XATTR_FILLBACKGROUND ); + m_rXFSet.Put( aItem ); if(aItem.GetValue()) m_rXFSet.Put( XFillColorItem( OUString(), m_pLbBackgroundColor->GetSelectEntryColor() ) ); m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() ); |