diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 9 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 9 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unoipset.cxx | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index c7b202733b74..78fa1f03b063 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -949,14 +949,15 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map if ( eSourceUnit != eDestUnit ) { SfxPoolItem* pItem = rSource.Get( nSourceWhich ).Clone(); -// pItem->SetWhich( nWhich ); ConvertItem( *pItem, eSourceUnit, eDestUnit ); - rDest.Put( *pItem, nWhich ); + pItem->SetWhich(nWhich); + rDest.Put( *pItem ); delete pItem; } else { - rDest.Put( rSource.Get( nSourceWhich ), nWhich ); + std::unique_ptr<SfxPoolItem> pNewItem(rSource.Get( nSourceWhich ).CloneSetWhich(nWhich)); + rDest.Put( *pNewItem ); } } } @@ -2322,7 +2323,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, bool bKeepEndingAttribs ) ContentAttribs aContentAttribs( aPaM.GetNode()->GetContentAttribs() ); // for a new paragraph we like to have the bullet/numbering visible by default - aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, true), EE_PARA_BULLETSTATE ); + aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, true) ); // ContentNode constructor copies also the paragraph attributes ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 3c0852ea8168..e9a36bf7144a 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1121,9 +1121,9 @@ static void ChangeFontSizeImpl( EditView* pEditView, bool bGrow, const ESelectio if( EditView::ChangeFontSize( bGrow, aSet, pFontList ) ) { SfxItemSet aNewSet( pEditView->GetEmptyItemSet() ); - aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT ), EE_CHAR_FONTHEIGHT ); - aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CJK ), EE_CHAR_FONTHEIGHT_CJK ); - aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CTL ), EE_CHAR_FONTHEIGHT_CTL ); + aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT ) ); + aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CJK ) ); + aNewSet.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CTL ) ); pEditView->SetAttribs( aNewSet ); } } @@ -1258,7 +1258,8 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo if( nHeight != (long)aFontHeightItem.GetHeight() ) { aFontHeightItem.SetHeight( nHeight ); - rSet.Put( aFontHeightItem, *pWhich ); + std::unique_ptr<SfxPoolItem> pNewItem(aFontHeightItem.CloneSetWhich(*pWhich)); + rSet.Put( *pNewItem ); bRet = true; } } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 5f5a8d1b3df3..a64d85bc74e2 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -881,7 +881,7 @@ void OutlinerView::ToggleBullets() { SfxItemSet aAttrs( pOwner->GetParaAttribs( nPara ) ); SvxNumRule aNewNumRule( *pDefaultBulletNumRule ); - aAttrs.Put( SvxNumBulletItem( aNewNumRule ), EE_PARA_NUMBULLET ); + aAttrs.Put( SvxNumBulletItem( aNewNumRule, EE_PARA_NUMBULLET ) ); pOwner->SetParaAttribs( nPara, aAttrs ); } } @@ -1089,7 +1089,7 @@ void OutlinerView::ApplyBulletsNumbering( } } - aAttrs.Put(SvxNumBulletItem(aNewRule), EE_PARA_NUMBULLET); + aAttrs.Put(SvxNumBulletItem(aNewRule, EE_PARA_NUMBULLET)); } } pOwner->SetParaAttribs(nPara, aAttrs); diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index dc3f77477a42..40677da3d197 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -181,7 +181,8 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa if( pNewItem->PutValue( aValue, nMemberId ) ) { // Set new item in item set - rSet.Put( *pNewItem, pMap->nWID ); + pNewItem->SetWhich( pMap->nWID ); + rSet.Put( *pNewItem ); } delete pNewItem; } |