Commits

Anonymous committed 03615f0

new_itemsets: alway put item at the which-id of the item (editeng)

  • Participants
  • Parent commits a26158f

Comments (0)

Files changed (5)

editeng/source/editeng/editdoc.cxx

 	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));
 
 	// ContenNode-CTOR kopiert auch die Absatzattribute
 	ContentNode* pNode = new ContentNode( aStr, aContentAttribs );

editeng/source/editeng/editdoc2.cxx

 				SfxPoolItem* pItem = rSource.Get( nSourceWhich ).Clone();
 //				pItem->SetWhich( nWhich );
 				ConvertItem( *pItem, eSourceUnit, eDestUnit );
-				rDest.Put( *pItem, nWhich );
+				rDest.Put( *pItem );
 				delete pItem;
 			}
 			else
 			{
-				rDest.Put( rSource.Get( nSourceWhich ), nWhich );
+				rDest.Put( rSource.Get( nSourceWhich ));
 			}
 		}
 		else

editeng/source/editeng/editview.cxx

     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 );
     }
 }
             if( nHeight != (long)aFontHeightItem.GetHeight() )
             {
                 aFontHeightItem.SetHeight( nHeight );
-                rSet.Put( aFontHeightItem, *pWhich );
+                rSet.Put( aFontHeightItem );
                 bRet = true;
             }
         }

editeng/source/uno/unoipset.cxx

 		if( pNewItem->PutValue( aValue, nMemberId ) )
 		{
 			// neues item in itemset setzen
-			rSet.Put( *pNewItem, pMap->nWID );
+			rSet.Put( *pNewItem );
 		}
 		delete pNewItem;
 	}

svl/source/items/poolcach.cxx

 	pItemToPut( &pItemPool->Put(*pPutItem) )
 {
 	DBG_CTOR(SfxItemPoolCache, 0);
-	DBG_ASSERT(pItemPool, "kein Pool angegeben");
+	OSL_ENSURE(pItemPool, "kein Pool angegeben");
 }
 
 //------------------------------------------------------------------------
 	pItemToPut( 0 )
 {
 	DBG_CTOR(SfxItemPoolCache, 0);
-	DBG_ASSERT(pItemPool, "kein Pool angegeben");
+	OSL_ENSURE(pItemPool, "kein Pool angegeben");
 }
 
 //------------------------------------------------------------------------
 const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL bNew )
 {
 	DBG_CHKTHIS(SfxItemPoolCache, 0);
-	DBG_ASSERT( pPool == rOrigItem.GetItemSet().GetPool(), "invalid Pool" );
-	DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
+	OSL_ENSURE( pPool == rOrigItem.GetItemSet().GetPool(), "invalid Pool" );
+	OSL_ENSURE( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
 				"original not in pool" );
 
 	// Suchen, ob diese Transformations schon einmal vorkam
 	if ( pItemToPut )
 	{
 		pNewItem->GetItemSet().Put(*pItemToPut);
-		DBG_ASSERT( &pNewItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
+		OSL_ENSURE( &pNewItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
 					"wrong item in temporary set" );
 	}
 	else
 		pNewItem->GetItemSet().Put( *pSetToPut );
 	const SfxSetItem* pNewPoolItem = (const SfxSetItem*) &pPool->Put( *pNewItem );
-	DBG_ASSERT( pNewPoolItem != pNewItem, "Pool: rein == raus?" );
+	OSL_ENSURE( pNewPoolItem != pNewItem, "Pool: rein == raus?" );
 	delete pNewItem;
 
 	// Refernzzaehler anpassen, je einen davon fuer den Cache
 	aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
 	pCache->Insert( aModify, pCache->Count() );
 
-	DBG_ASSERT( !pItemToPut ||
+	OSL_ENSURE( !pItemToPut ||
 				&pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
 				"wrong item in resulting set" );