Index: XWikiDocument.java
===================================================================
--- XWikiDocument.java	(revision 4119)
+++ XWikiDocument.java	(working copy)
@@ -975,7 +975,6 @@
         objects.add(object);
         int nb = objects.size() - 1;
         object.setNumber(nb);
-        setContentDirty(true);
         return nb;
     }
 
@@ -1092,7 +1091,6 @@
         } else {
             setObject(classname, vobj.size(), object);
         }
-        setContentDirty(true);
     }
 
     public void setObject(String classname, int nb, BaseObject object)
@@ -1107,7 +1105,6 @@
         }
         objects.set(nb, object);
         object.setNumber(nb);
-        setContentDirty(true);
     }
 
     /**
@@ -1134,7 +1131,6 @@
                 getxWikiClass().merge((BaseClass) tbclass.clone());
             }
         }
-        setContentDirty(true);
     }
 
     public void mergexWikiObjects(XWikiDocument templatedoc)
@@ -1166,7 +1162,6 @@
                 getxWikiObjects().put(name, objects);
             }
         }
-        setContentDirty(true);
     }
 
     public void clonexWikiObjects(XWikiDocument templatedoc)
@@ -1664,7 +1659,6 @@
             }
             getxWikiObjects().put(name, newobjects);
         }
-        setContentDirty(true);
     }
 
     public void readFromForm(EditForm eform, XWikiContext context) throws XWikiException
@@ -2541,13 +2535,11 @@
                 }
             }
         }
-        setContentDirty(true);
     }
 
     public void addObjectsToRemove(BaseObject object)
     {
         getObjectsToRemove().add(object);
-        setContentDirty(true);
     }
 
     public ArrayList getObjectsToRemove()
@@ -2558,7 +2550,6 @@
     public void setObjectsToRemove(ArrayList objectsToRemove)
     {
         this.objectsToRemove = objectsToRemove;
-        setContentDirty(true);
     }
 
     public List getIncludedPages(XWikiContext context)
@@ -2764,7 +2755,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.safeput(fieldName, value);              
-        setContentDirty(true);
     }
 
     public int getIntValue(String className, String fieldName)
@@ -2844,7 +2834,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setStringValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public List getListValue(String className, String fieldName)
@@ -2879,7 +2868,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setListValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public void setStringListValue(String className, String fieldName, List value)
@@ -2892,7 +2880,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setStringListValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public void setDBStringListValue(String className, String fieldName, List value)
@@ -2905,7 +2892,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setDBStringListValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public void setLargeStringValue(String className, String fieldName, String value)
@@ -2918,7 +2904,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setLargeStringValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public void setIntValue(String className, String fieldName, int value)
@@ -2931,7 +2916,6 @@
         bobject.setName(getFullName());
         bobject.setClassName(className);
         bobject.setIntValue(fieldName, value);
-        setContentDirty(true);
     }
 
     public String getDatabase()
Index: ../../../../../../test/java/com/xpn/xwiki/doc/XWikiDocumentTest.java
===================================================================
--- ../../../../../../test/java/com/xpn/xwiki/doc/XWikiDocumentTest.java	(revision 4119)
+++ ../../../../../../test/java/com/xpn/xwiki/doc/XWikiDocumentTest.java	(working copy)
@@ -27,6 +27,7 @@
 import com.xpn.xwiki.XWiki;
 import com.xpn.xwiki.XWikiConfig;
 import com.xpn.xwiki.XWikiException;
+import com.xpn.xwiki.objects.BaseObject;
 import com.xpn.xwiki.render.XWikiRenderingEngine;
 import com.xpn.xwiki.store.XWikiHibernateVersioningStore;
 
@@ -123,4 +124,17 @@
         
         assertTrue(copy.getCreationDate().equals(sourceCreationDate));
     }
+
+    public void testContentDirtyAfterObjectAdd()
+    {
+        Mock mockObject = mock(BaseObject.class);
+        mockObject.stubs().method("setNumber");
+
+        BaseObject object = (BaseObject) mockObject.proxy();
+
+        this.document.setContentDirty(false);
+        this.document.addObject("XWiki.SomeClass",object);
+        assertFalse(this.document.isContentDirty());
+    }
+
 }
