Index: /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2920)
+++ /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2921)
@@ -223,5 +223,5 @@
 			// Show loader
 			var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' );
-			this.forceResetSize = forceResetSize;
+			dialog.forceResetSize = forceResetSize;
 			if ( loader && showPreview )
 				loader.setStyle( 'display', '' );
@@ -419,5 +419,5 @@
 			readAttribute.apply( this, [ 'advanced', 'dir', 'cmbLangDir', imgObject ] );
 			readAttribute.apply( this, [ 'advanced', 'lang', 'txtLangCode', imgObject ] );
-			readAttribute.apply( this, [ 'advanced', 'longdesc', 'txtGenLongDescr', imgObject ] );
+			readAttribute.apply( this, [ 'advanced', 'longDesc', 'txtGenLongDescr', imgObject ] );
 			
 			if ( !readAttribute.apply( this, [ 'advanced', 'style', 'txtdlgGenStyle', imgObject ] ) )
@@ -425,10 +425,5 @@
 					this.setValueOf( 'advanced', 'txtdlgGenStyle', imgObject.$.style.cssText );
 
-			if ( !readAttribute.apply( this, [ 'advanced', 'class', 'txtGenClass', imgObject ] ) )
-				if( imgObject.$.style.className )
-					this.setValueOf( 'advanced', 'txtdlgGenStyle', imgObject.$.style.cssText );
-				else 
-					this.setValueOf( 'advanced', 'txtdlgGenStyle', '' );
-
+			readAttribute.apply( this, [ 'advanced', 'class', 'txtGenClass', imgObject ] );
 			readAttribute.apply( this, [ 'advanced', 'title', 'txtGenTitle', imgObject ] );
 		}
@@ -441,5 +436,5 @@
 	{
 		var attributeValue = object.getAttribute( attribute, 2 );
-		if ( attributeValue == null )
+		if ( attributeValue == null || ( attribute == 'hspace' && attributeValue == -1 ) )
 			this.setValueOf( page, input, "" );
 		else
@@ -1108,5 +1103,5 @@
 						validate : function()
 						{
-							addChange( 'longdesc', this, 'image' );
+							addChange( 'longDesc', this, 'image' );
 							return true;
 						}
