Commits

Anonymous committed f5da802

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

Comments (0)

Files changed (4)

sd/source/ui/view/drtxtob.cxx

 
                 const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
                 if( pI )
-                	aAttrSet.Put( *pI, nWhich );
+                	aAttrSet.Put( *pI );
                 else
                     aAttrSet.InvalidateItem( nWhich );
             }

sd/source/ui/view/drviews9.cxx

 					if (CHECK_RANGE (XFILL_NONE, (sal_Int32)pFillStyle->GetValue (), XFILL_BITMAP))
 					{
 						pAttr->ClearItem (XATTR_FILLSTYLE);
-						pAttr->Put (XFillStyleItem ((XFillStyle) pFillStyle->GetValue ()), XATTR_FILLSTYLE);
+						pAttr->Put (XFillStyleItem ((XFillStyle) pFillStyle->GetValue ()));
 						rBindings.Invalidate (SID_ATTR_FILL_STYLE);
 					}
 					else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
 					if (CHECK_RANGE (XLINE_NONE, (sal_Int32)pLineStyle->GetValue (), XLINE_DASH))
 					{
 						pAttr->ClearItem (XATTR_LINESTYLE);
-						pAttr->Put (XLineStyleItem ((XLineStyle) pLineStyle->GetValue ()), XATTR_LINESTYLE);
+						pAttr->Put (XLineStyleItem ((XLineStyle) pLineStyle->GetValue ()));
 						rBindings.Invalidate (SID_ATTR_LINE_STYLE);
 					}
 					else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
 				{
 					SFX_REQUEST_ARG (rReq, pLineWidth, SfxUInt32Item, ID_VAL_WIDTH, FALSE);
 					pAttr->ClearItem (XATTR_LINEWIDTH);
-					pAttr->Put (XLineWidthItem (pLineWidth->GetValue ()), XATTR_LINEWIDTH);
+					pAttr->Put (XLineWidthItem (pLineWidth->GetValue ()));
 					rBindings.Invalidate (SID_ATTR_LINE_WIDTH);
 					break;
 				}
 					pAttr->ClearItem (XATTR_FILLSTYLE);
 					pAttr->Put (XFillColorItem (-1, Color ((BYTE) pRed->GetValue (),
                                                            (BYTE) pGreen->GetValue (),
-														   (BYTE) pBlue->GetValue ())),
-								XATTR_FILLCOLOR);
-					pAttr->Put (XFillStyleItem (XFILL_SOLID), XATTR_FILLSTYLE);
+														   (BYTE) pBlue->GetValue ()))),
+					pAttr->Put (XFillStyleItem (XFILL_SOLID));
 					rBindings.Invalidate (SID_ATTR_FILL_COLOR);
 					rBindings.Invalidate (SID_ATTR_FILL_STYLE);
 					break;
 					pAttr->ClearItem (XATTR_LINECOLOR);
 					pAttr->Put (XLineColorItem (-1, Color ((BYTE) pRed->GetValue (),
                                                            (BYTE) pGreen->GetValue (),
-														   (BYTE) pBlue->GetValue ())),
-								XATTR_LINECOLOR);
+														   (BYTE) pBlue->GetValue ())));
 					rBindings.Invalidate (SID_ATTR_LINE_COLOR);
 					break;
 				}
 							if (rReq.GetSlot () == SID_SETGRADSTARTCOLOR) rGradient.SetStartColor (aColor);
 							else rGradient.SetEndColor (aColor);
 
-							pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
-							pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient), XATTR_FILLGRADIENT);
+							pAttr->Put (XFillStyleItem (XFILL_GRADIENT));
+							pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient));
 							break;
 						}
 					}
 
 						GetDoc()->GetGradientList ()->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
 
-						pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
-						pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
+						pAttr->Put (XFillStyleItem (XFILL_GRADIENT));
+						pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient));
 					}
 
 					rBindings.Invalidate (SID_ATTR_FILL_STYLE);
 
 							rHatch.SetColor (aColor);
 
-							pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
-							pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch), XATTR_FILLHATCH);
+							pAttr->Put (XFillStyleItem (XFILL_HATCH));
+							pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch));
 							break;
 						}
 					}
 
 						GetDoc()->GetHatchList ()->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
 
-						pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
-						pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
+						pAttr->Put (XFillStyleItem (XFILL_HATCH));
+						pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch));
 					}
 
 					rBindings.Invalidate (SID_ATTR_FILL_HATCH);
 						else
 							pDashList->Insert (pEntry);
 
-						pAttr->Put (XLineDashItem (pName->GetValue (), aNewDash), XATTR_LINEDASH);
-						pAttr->Put (XLineStyleItem (XLINE_DASH), XATTR_LINESTYLE);
+						pAttr->Put (XLineDashItem (pName->GetValue (), aNewDash));
+						pAttr->Put (XLineStyleItem (XLINE_DASH));
 						rBindings.Invalidate (SID_ATTR_LINE_DASH);
 						rBindings.Invalidate (SID_ATTR_FILL_STYLE);
 					}
 								rGradient.SetStartIntens ((short) pStart->GetValue ());
 								rGradient.SetEndIntens ((short) pEnd->GetValue ());
 
-								pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
-								pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient), XATTR_FILLGRADIENT);
+								pAttr->Put (XFillStyleItem (XFILL_GRADIENT));
+								pAttr->Put (XFillGradientItem (pName->GetValue (), rGradient));
 								break;
 							}
 						}
 												 (short) pStart->GetValue (), (short) pEnd->GetValue ());
 
 							pGradientList->Insert (new XGradientEntry (aGradient, pName->GetValue ()));
-							pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
-							pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT);
+							pAttr->Put (XFillStyleItem (XFILL_GRADIENT));
+							pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient));
 						}
 
 						rBindings.Invalidate (SID_ATTR_FILL_GRADIENT);
 								rHatch.SetDistance (pDistance->GetValue ());
 								rHatch.SetAngle (pAngle->GetValue () * 10);
 
-								pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
-								pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch), XATTR_FILLHATCH);
+								pAttr->Put (XFillStyleItem (XFILL_HATCH));
+								pAttr->Put (XFillHatchItem (pName->GetValue (), rHatch));
 								break;
 							}
 						}
 										   pAngle->GetValue () * 10);
 
 							pHatchList->Insert (new XHatchEntry (aHatch, pName->GetValue ()));
-							pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
-							pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH);
+							pAttr->Put (XFillStyleItem (XFILL_HATCH));
+							pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch));
 						}
 
 						rBindings.Invalidate (SID_ATTR_FILL_HATCH);
 						{
 							pAttr->ClearItem (XATTR_FILLGRADIENT);
 							pAttr->ClearItem (XATTR_FILLSTYLE);
-							pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE);
-							pAttr->Put (XFillGradientItem (pName->GetValue (), pEntry->GetGradient ()), XATTR_FILLGRADIENT);
+							pAttr->Put (XFillStyleItem (XFILL_GRADIENT));
+							pAttr->Put (XFillGradientItem (pName->GetValue (), pEntry->GetGradient ()));
 
 							rBindings.Invalidate (SID_ATTR_FILL_GRADIENT);
 							rBindings.Invalidate (SID_ATTR_FILL_STYLE);
 						{
 							pAttr->ClearItem (XATTR_FILLHATCH);
 							pAttr->ClearItem (XATTR_FILLSTYLE);
-							pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE);
-							pAttr->Put (XFillHatchItem (pName->GetValue (), pEntry->GetHatch ()), XATTR_FILLHATCH);
+							pAttr->Put (XFillStyleItem (XFILL_HATCH));
+							pAttr->Put (XFillHatchItem (pName->GetValue (), pEntry->GetHatch ()));
 
 							rBindings.Invalidate (SID_ATTR_FILL_HATCH);
 							rBindings.Invalidate (SID_ATTR_FILL_STYLE);

sd/source/ui/view/drviewsf.cxx

 					if( nSlotId != SID_STYLE_APPLY && !mpDrawView->AreObjectsMarked() )
 					{
 						SfxTemplateItem aTmpItem( nWhich, String() );
-						aAllSet.Put( aTmpItem, aTmpItem.Which()  );
+						aAllSet.Put( aTmpItem );
 					}
 					else
 					{
 								(eFamily == SD_STYLE_FAMILY_PSEUDO &&	nSlotId == SID_STYLE_FAMILY5))
 							{
 								SfxTemplateItem aTmpItem ( nWhich, pStyleSheet->GetName() );
-								aAllSet.Put( aTmpItem, aTmpItem.Which()  );
+								aAllSet.Put( aTmpItem );
 							}
 							else
 							{
 								SfxTemplateItem aTmpItem(nWhich, String());
-								aAllSet.Put(aTmpItem,aTmpItem.Which()  );
+								aAllSet.Put(aTmpItem);
 							}
 						}
 					}
 				}
 				else
 				{	SfxTemplateItem aItem( nWhich, String() );
-					aAllSet.Put( aItem, aItem.Which() );
+					aAllSet.Put( aItem );
 					// rSet.DisableItem( nWhich );
 				}
 			}
 				else
 				{
 					SfxBoolItem aItem(nWhich, SD_MOD()->GetWaterCan());
-					aAllSet.Put( aItem, aItem.Which());
+					aAllSet.Put(aItem);
 				}
 			}
 			break;

sd/source/ui/view/outlnvsh.cxx

 					if (pStyleSheet)
 					{
 						SfxTemplateItem aItem( nWhich, pStyleSheet->GetName() );
-						aAllSet.Put( aItem, aItem.Which()  );
+						aAllSet.Put( aItem );
 					}
 				}
 
 				if( !pStyleSheet )
 				{
 					SfxTemplateItem aItem( nWhich, String() );
-					aAllSet.Put( aItem, aItem.Which() );
+					aAllSet.Put( aItem );
 					// rSet.DisableItem( nWhich );
 				}
 			}