Index: /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js
===================================================================
--- /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js	(revision 4715)
+++ /CKEditor/branches/features/paste/_source/plugins/pastefromword/filter/default.js	(revision 4716)
@@ -4,5 +4,5 @@
 */
 
-( function()
+(function()
 {
 	var fragmentPrototype = CKEDITOR.htmlParser.fragment.prototype,
@@ -29,5 +29,5 @@
 				continue;
 
-			if( child.name == tagName )
+			if ( child.name == tagName )
 			{
 				childs.push( child );
@@ -42,5 +42,5 @@
 	{
 		var parent = this.parent;
-		while( parent && !( parent.name && parent.name.match( tagNameRegex ) ) )
+		while ( parent && !( parent.name && parent.name.match( tagNameRegex ) ) )
 			parent = parent.parent;
 		return parent;
@@ -50,10 +50,10 @@
 	{
 		var child;
-		for( var i = 0 ; i < this.children.length ; i++ )
+		for ( var i = 0 ; i < this.children.length ; i++ )
 		{
 			child = this.children[ i ];
-			if( child.value )
+			if ( child.value )
 				return child;
-			else if( child.name )
+			else if ( child.name )
 			{
 				child = child.firstTextChild();
@@ -76,5 +76,5 @@
 		{
 			// style literal.
-			if( typeof name == 'object' )
+			if ( typeof name == 'object' )
 			{
 				for( var style in name )
@@ -90,4 +90,5 @@
 			else
 				addingStyleText += name;
+
 			isPrepend = value;
 		}
@@ -112,7 +113,7 @@
 	{
 		var result = {};
-		for( var tag in this )
+		for ( var tag in this )
 		{
-			if( tag.indexOf( '$' ) == -1 && this[ tag ][ tagName ] )
+			if ( tag.indexOf( '$' ) == -1 && this[ tag ][ tagName ] )
 				result[ tag ] = 1;
 		}
@@ -133,5 +134,5 @@
 
 				// TODO: Support more list style type from MS-Word.
-				if( !bulletStyle )
+				if ( !bulletStyle )
 				{
 					bulletStyle = 'decimal';
@@ -199,5 +200,6 @@
 					attrs = element.attributes,
 					listMarker;
-				if( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) )
+
+				if ( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) )
 					  && listMarker.length
 					  && ( listMarker = listMarker[ 0 ] ) )
@@ -205,22 +207,22 @@
 					element.name = 'cke:li';
 
-					if( attrs.style )
+					if ( attrs.style )
 					{
 						attrs.style = CKEDITOR.plugins.pastefromword.filters.stylesFilter(
-						[
-							// Text-indent is not representing list item level any more.
-							[ 'text-indent' ],
-							[ 'line-height' ],
-							// Resolve indent level from 'margin-left' value.
-							[ /^margin(:?-left)?$/, null, function( value )
-							{
-								// Be able to deal with component/short-hand form style.
-								var values = value.split( ' ' );
-								value = values[ 3 ] || values[ 1 ] || values [ 0 ];
-								attrs[ 'cke:indent' ] =
-									// Indent margin unit by 36pt.
-									Math.floor( parseInt( value ) / 36 );
-							} ]
-						] )( attrs.style, element ) || '' ;
+							[
+								// Text-indent is not representing list item level any more.
+								[ 'text-indent' ],
+								[ 'line-height' ],
+								// Resolve indent level from 'margin-left' value.
+								[ /^margin(:?-left)?$/, null, function( value )
+								{
+									// Be able to deal with component/short-hand form style.
+									var values = value.split( ' ' );
+									value = values[ 3 ] || values[ 1 ] || values [ 0 ];
+									attrs[ 'cke:indent' ] =
+										// Indent margin unit by 36pt.
+										Math.floor( parseInt( value ) / 36 );
+								} ]
+							] )( attrs.style, element ) || '' ;
 					}
 
@@ -272,5 +274,5 @@
 
 					// Resolve how many level nested.
-					while( parent )
+					while ( parent )
 					{
 						parent.attributes && parent.attributes[ 'cke:list'] && indentLevel++;
@@ -279,5 +281,5 @@
 
 					// All list items are of the same type.
-					switch( attrs.type )
+					switch ( attrs.type )
 					{
 						case 'a' :
@@ -319,6 +321,6 @@
 					}
 
-
 					delete element.name;
+
 					// We're loosing tag name here, signalize this element as a list.
 					attrs[ 'cke:list' ] = 1;
@@ -328,5 +330,5 @@
 				 * A simple filter which always rejecting.
 				 */
-				falsyFilter  : function( value )
+				falsyFilter : function( value )
 				{
 					return false;
@@ -347,39 +349,40 @@
 						// from MS-Word which confused the following regexp. e.g.
 						//'font-family: &quot;Lucida, Console&quot;'
-						 styleText.replace( /&quot;/g, '"' )
-								  .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
-							 function( match, name, value )
-							 {
-								 name = name.toLowerCase();
-								 name == 'font-family' && ( value = value.replace( /["']/g, '' ) );
-
-								 var namePattern,
-									 valuePattern,
-									 newValue,
-									 newName;
-								 for( var i = 0 ; i < styles.length; i++ )
+						 styleText
+							.replace( /&quot;/g, '"' )
+							.replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
+								 function( match, name, value )
 								 {
-									if( styles[ i ] )
-									{
-										namePattern = styles[ i ][ 0 ];
-										valuePattern = styles[ i ][ 1 ];
-										newValue = styles[ i ][ 2 ];
-										newName = styles[ i ][ 3 ];
-
-										if ( name.match( namePattern )
-											 && ( !valuePattern || value.match( valuePattern ) ) )
+									 name = name.toLowerCase();
+									 name == 'font-family' && ( value = value.replace( /["']/g, '' ) );
+
+									 var namePattern,
+										 valuePattern,
+										 newValue,
+										 newName;
+									 for( var i = 0 ; i < styles.length; i++ )
+									 {
+										if( styles[ i ] )
 										{
-											name = newName || name;
-											if( typeof newValue == 'function' )
-												newValue = newValue( value, element );
-											if( typeof newValue == 'string' )
-												rules.push( [ name, newValue ] );
-											return;
+											namePattern = styles[ i ][ 0 ];
+											valuePattern = styles[ i ][ 1 ];
+											newValue = styles[ i ][ 2 ];
+											newName = styles[ i ][ 3 ];
+
+											if ( name.match( namePattern )
+												 && ( !valuePattern || value.match( valuePattern ) ) )
+											{
+												name = newName || name;
+												if( typeof newValue == 'function' )
+													newValue = newValue( value, element );
+												if( typeof newValue == 'string' )
+													rules.push( [ name, newValue ] );
+												return;
+											}
 										}
-									}
-								 }
-								 rules.push( [ name, value ] );
-
-							 } );
+									 }
+									 rules.push( [ name, value ] );
+
+								 });
 
 						for ( var i = 0 ; i < rules.length ; i++ )
@@ -496,8 +499,10 @@
 						// Convert length unit of width/height on blocks to
 						// a more editor-friendly way (px).
-						if( tagName in blockLike
+						if ( tagName in blockLike
 							&& attrs.style )
+						{
 							attrs.style = stylesFilter(
 										[ [ /^width|height$/, null, convertToPx ] ] )( attrs.style ) || '';
+						}
 
 						// Processing headings.
@@ -513,5 +518,5 @@
 						}
 						// Remove inline elements which contain only empty spaces.
-						else if( tagName in dtd.$nonEmptyInline )
+						else if ( tagName in dtd.$nonEmptyInline )
 						{
 							element.filterChildren();
@@ -520,5 +525,5 @@
 						}
 						// Remove ms-office namespaced element, with it's content preserved.
-						else if( tagName.indexOf( ':' ) != -1
+						else if ( tagName.indexOf( ':' ) != -1
 								 && tagName.indexOf( 'cke' ) == -1 )
 						{
@@ -526,5 +531,5 @@
 
 							// Restore image real link from vml.
-							if( tagName == 'v:imagedata' )
+							if ( tagName == 'v:imagedata' )
 							{
 								var href = element.attributes[ 'o:href' ];
@@ -538,5 +543,5 @@
 
 						// Assembling list items into a whole list.
-						if( !tagName || tagName in listDtdParents )
+						if ( !tagName || tagName in listDtdParents )
 						{
 							element.filterChildren();
@@ -551,5 +556,5 @@
 								indent;
 
-							for( var i = 0 ; i < children.length; i++ )
+							for ( var i = 0 ; i < children.length; i++ )
 							{
 								child = children[ i ];
@@ -578,5 +583,5 @@
 									else
 									{
-										if( listItemIndent > indent )
+										if ( listItemIndent > indent )
 										{
 											parentList = list;
@@ -585,5 +590,5 @@
 											lastListItem.add( list );
 										}
-										else if( listItemIndent < indent )
+										else if ( listItemIndent < indent )
 										{
 											list = parentList;
@@ -610,5 +615,5 @@
 					'style' : function( element )
 					{
-						if( CKEDITOR.env.gecko )
+						if ( CKEDITOR.env.gecko )
 						{
 							// Grab only the style definition section.
@@ -617,37 +622,39 @@
 								rules = {}; // Storing the parsed result.
 
-							if( styleDefText )
+							if ( styleDefText )
 							{
-								styleDefText.replace(/[\n\r]/g,'') // remove line-breaks.
-											// Extract selectors and style properties.
-											.replace( /(.+?)\{(.+?)\}/g,
-								function( rule, selectors, styleBlock )
-								{
-									selectors = selectors.split( ',' );
-									var length = selectors.length, selector;
-									for ( var i = 0; i < length; i++ )
-									{
-										// Assume MS-Word mostly generate only simple
-										// selector( [Type selector][Class selector]).
-										CKEDITOR.tools.trim( selectors[ i ] )
-													  .replace( /^(\w+)(\.[\w-]+)?$/g,
-										function( match, tagName, className )
+								styleDefText
+									// Remove line-breaks.
+									.replace(/[\n\r]/g,'')
+									// Extract selectors and style properties.
+									.replace( /(.+?)\{(.+?)\}/g,
+										function( rule, selectors, styleBlock )
 										{
-											tagName = tagName || '*';
-											className = className.substring( 1, className.length );
-
-											// Reject MS-Word Normal styles.
-											if( className.match( /MsoNormal/ ) )
-												return;
-
-											if( !rules[ tagName ] )
-												rules[ tagName ] = {};
-											if( className )
-												rules[ tagName ][ className ] = styleBlock;
-											else
-												rules[ tagName ] = styleBlock;
-										} );
-									}
-								} );
+											selectors = selectors.split( ',' );
+											var length = selectors.length, selector;
+											for ( var i = 0; i < length; i++ )
+											{
+												// Assume MS-Word mostly generate only simple
+												// selector( [Type selector][Class selector]).
+												CKEDITOR.tools.trim( selectors[ i ] )
+															  .replace( /^(\w+)(\.[\w-]+)?$/g,
+												function( match, tagName, className )
+												{
+													tagName = tagName || '*';
+													className = className.substring( 1, className.length );
+
+													// Reject MS-Word Normal styles.
+													if( className.match( /MsoNormal/ ) )
+														return;
+
+													if( !rules[ tagName ] )
+														rules[ tagName ] = {};
+													if( className )
+														rules[ tagName ][ className ] = styleBlock;
+													else
+														rules[ tagName ] = styleBlock;
+												} );
+											}
+										});
 
 								filters.applyStyleFilter = function( element )
@@ -678,10 +685,10 @@
 
 						// Is the paragraph actually a list item?
-						if( resolveListItem( element ) )
+						if ( resolveListItem( element ) )
 							return;
 
 						// Adapt paragraph formatting to editor's convention
 						// according to enter-mode.
-						if( config.enterMode == CKEDITOR.ENTER_BR )
+						if ( config.enterMode == CKEDITOR.ENTER_BR )
 						{
 							// We suffer from attribute/style lost in this situation.
@@ -721,5 +728,5 @@
 							parent = element.parent;
 
-						if( 'font' == parent.name )     // Merge nested <font> tags.
+						if ( 'font' == parent.name )     // Merge nested <font> tags.
 						{
 							CKEDITOR.tools.extend( parent.attributes,
@@ -765,5 +772,5 @@
 
 						element.filterChildren();
-						if( containsNothingButSpaces( element ) )
+						if ( containsNothingButSpaces( element ) )
 						{
 							delete element.name;
@@ -786,5 +793,5 @@
 							firstChild = children && children[ 0 ];
 
-						if( firstChild && firstChild.name == 'cke:imagesource' )
+						if ( firstChild && firstChild.name == 'cke:imagesource' )
 						{
 							var secondChild = children[ 1 ];
@@ -797,5 +804,6 @@
 						// Assume MS-Word mostly carry font related styles on <span>,
 						// adapting them to editor's convention.
-						if( styleText )
+						if ( styleText )
+						{
 							attrs.style = stylesFilter(
 									[
@@ -807,4 +815,5 @@
 										[ /^background-color$/, null, styleMigrateFilter( config[ 'colorButton_backStyle' ], 'color' ) ]
 									] )( styleText, element ) || '';
+						}
 					},
 
@@ -897,25 +906,28 @@
 				// comments where RegExp were the right approach to dig them out where usual approach
 				// is transform it into a fake element node which hold the desired data.
-				comment : !CKEDITOR.env.ie ? function( value, node )
-				{
-					var imageInfo = value.match( /<img.*?>/ ),
-						imageSource = value.match( /<v:imagedata[^>]*o:href=['"](.*?)['"]/ ),
-						listInfo = value.match( /^\[if !supportLists\]([\s\S]*?)\[endif\]$/ );
-
-					// Reveal the <img> element in conditional comments for Firefox.
-					if( CKEDITOR.env.gecko && imageInfo )
-						return CKEDITOR.htmlParser.fragment.fromHtml( imageInfo[ 0 ] ).children[ 0 ];
-					// Try to dig the real image link from vml markup.
-					if( imageSource )
-						return new CKEDITOR.htmlParser.element( 'cke:imagesource', { src : imageSource[ 1 ] } );
-					// Seek for list bullet style indicator.
-					if ( listInfo )
-					{
-						var listSymbol = listInfo[ 1 ],
-							listType = listSymbol.match( />([^\s]+?)([.)]?)</ );
-						return createListBulletMarker( listType, listSymbol );
-					}
-					return false;
-				} : falsyFilter
+				comment : 
+					!CKEDITOR.env.ie ? 
+						function( value, node )
+						{
+							var imageInfo = value.match( /<img.*?>/ ),
+								imageSource = value.match( /<v:imagedata[^>]*o:href=['"](.*?)['"]/ ),
+								listInfo = value.match( /^\[if !supportLists\]([\s\S]*?)\[endif\]$/ );
+
+							// Reveal the <img> element in conditional comments for Firefox.
+							if( CKEDITOR.env.gecko && imageInfo )
+								return CKEDITOR.htmlParser.fragment.fromHtml( imageInfo[ 0 ] ).children[ 0 ];
+							// Try to dig the real image link from vml markup.
+							if( imageSource )
+								return new CKEDITOR.htmlParser.element( 'cke:imagesource', { src : imageSource[ 1 ] } );
+							// Seek for list bullet style indicator.
+							if ( listInfo )
+							{
+								var listSymbol = listInfo[ 1 ],
+									listType = listSymbol.match( />([^\s]+?)([.)]?)</ );
+								return createListBulletMarker( listType, listSymbol );
+							}
+							return false;
+						} 
+					: falsyFilter
 			};
 		}
@@ -927,4 +939,5 @@
 		this.dataFilter = new CKEDITOR.htmlParser.filter();
 	};
+
 	CKEDITOR.pasteProcessor.prototype =
 	{
@@ -949,4 +962,5 @@
 		var pasteProcessor = new CKEDITOR.pasteProcessor(),
 			dataFilter = pasteProcessor.dataFilter;
+
 		// These rules will have higher priorities than default ones.
 		dataFilter.addRules( CKEDITOR.plugins.pastefromword.getRules( editor ) );
@@ -954,6 +968,5 @@
 		return pasteProcessor.toHtml( data, false );
 	};
-
-} )( );
+})();
 
 /**
Index: /CKEditor/branches/features/paste/_source/plugins/pastefromword/plugin.js
===================================================================
--- /CKEditor/branches/features/paste/_source/plugins/pastefromword/plugin.js	(revision 4715)
+++ /CKEditor/branches/features/paste/_source/plugins/pastefromword/plugin.js	(revision 4716)
@@ -3,5 +3,5 @@
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
-( function()
+(function()
 {
 	CKEDITOR.plugins.add( 'pastefromword',
@@ -12,11 +12,8 @@
 			// Flag indicate this command is actually been asked instead of a generic
 			// pasting.
-			var forceFromWord = 0,
-				resetFromWord = function()
+			var forceFromWord = 0;
+			var resetFromWord = function()
 				{
-					setTimeout( function()
-					{
-						forceFromWord = 0;
-					}, 0 );
+					setTimeout( function() { forceFromWord = 0; }, 0 );
 				};
 
@@ -28,5 +25,5 @@
 			{
 				canUndo : false,
-				exec : function ()
+				exec : function()
 				{
 					forceFromWord = 1;
@@ -34,11 +31,11 @@
 					{
 						editor.on( 'dialogHide', function ( evt )
-						{
-							evt.removeListener();
-							resetFromWord();
-						} );
+							{
+								evt.removeListener();
+								resetFromWord();
+							});
 					}
 				}
-			} );
+			});
 
 			// Register the toolbar button.
@@ -47,5 +44,5 @@
 					label : editor.lang.pastefromword.toolbar,
 					command : 'pastefromword'
-				} );
+				});
 
 			editor.on( 'paste', function( evt )
@@ -59,12 +56,14 @@
 				{
 					var isLazyLoad = this.loadFilterRules( function()
-					{
-						// Event continuation with the original data.
-						if ( isLazyLoad )
-							editor.fire( 'paste', data );
-						else if( !editor.config.pasteFromWordPromptCleanup
-						  || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) )
-							data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor );
-					} );
+						{
+							// Event continuation with the original data.
+							if ( isLazyLoad )
+								editor.fire( 'paste', data );
+							else if( !editor.config.pasteFromWordPromptCleanup
+							  || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) )
+							 {
+								data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor );
+							}
+						});
 
 					// The cleanup rules are to be loaded, we should just cancel
@@ -77,6 +76,6 @@
 		loadFilterRules : function( callback )
 		{
-			var isLoaded = CKEDITOR.cleanWord,
-				filterFilePath = CKEDITOR.getUrl( this.path
+			var isLoaded = CKEDITOR.cleanWord;
+			var filterFilePath = CKEDITOR.getUrl( this.path
 						+ 'filter/'
 						+ ( CKEDITOR.config.pasteFromWordCleanUpFile || 'default' )
@@ -90,6 +89,6 @@
 			return !isLoaded;
 		}
-	} );
-} )();
+	});
+})();
 
 /**
Index: /CKEditor/branches/features/paste/_source/plugins/pastetext/plugin.js
===================================================================
--- /CKEditor/branches/features/paste/_source/plugins/pastetext/plugin.js	(revision 4715)
+++ /CKEditor/branches/features/paste/_source/plugins/pastetext/plugin.js	(revision 4716)
@@ -79,5 +79,5 @@
 					label : editor.lang.pasteText.button,
 					command : commandName
-				} );
+				});
 
 			CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/pastetext.js' ) );
@@ -96,4 +96,5 @@
 			}
 		},
+
 		requires : [ 'clipboard' ]
 	});
@@ -134,5 +135,5 @@
 		var startIndex = 0;
 		text.replace( /\n+/g, function( match, lastIndex )
-		{
+		 {
 			line = text.substring( startIndex, lastIndex );
 			startIndex = lastIndex + match.length;
@@ -148,5 +149,5 @@
 			doEnter( self, mode, enterBlockTimes );
 			doEnter( self, CKEDITOR.ENTER_BR, enterBrTimes, isEnterBrMode ? false : true );
-		} );
+		 });
 
 		// Insert the last text line of text.
@@ -154,5 +155,4 @@
 		line.length && doInsertText( doc, line );
 	};
-
 })();
 
