Jelajahi Sumber

Working tests.

Kamil Piechaczek 5 tahun lalu
induk
melakukan
c91952493e
31 mengubah file dengan 340 tambahan dan 175 penghapusan
  1. 10 11
      packages/ckeditor5-paste-from-office/src/filters/list.js
  2. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/heading1/model.word2016.html
  3. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/model.word2016.html
  4. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.safari.word2016.html
  5. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.word2016.html
  6. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/heading7/model.word2016.html
  7. 12 12
      packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/model.word2016.html
  8. 8 8
      packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.safari.word2016.html
  9. 8 8
      packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.word2016.html
  10. 4 4
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/model.word2016.html
  11. 3 3
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple/model.word2016.html
  12. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.safari.word2016.html
  13. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.word2016.html
  14. 6 6
      packages/ckeditor5-paste-from-office/tests/_data/list/nested-mixed/model.word2016.html
  15. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/nested-mixed/normalized.word2016.html
  16. 9 9
      packages/ckeditor5-paste-from-office/tests/_data/list/nested-multiple/model.word2016.html
  17. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/nested-multiple/normalized.safari.word2016.html
  18. 7 7
      packages/ckeditor5-paste-from-office/tests/_data/list/nested/model.word2016.html
  19. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/nested/normalized.word2016.html
  20. 12 12
      packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/model.safari.word2016.html
  21. 12 12
      packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/model.word2016.html
  22. 8 8
      packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/normalized.safari.word2016.html
  23. 8 8
      packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/normalized.word2016.html
  24. 2 2
      packages/ckeditor5-paste-from-office/tests/_data/list/simple/model.word2016.html
  25. 3 3
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/model.safari.word2016.html
  26. 3 3
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/model.word2016.html
  27. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.safari.word2016.html
  28. 1 1
      packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.word2016.html
  29. 2 1
      packages/ckeditor5-paste-from-office/tests/data/integration.js
  30. 41 41
      packages/ckeditor5-paste-from-office/tests/data/normalization.js
  31. 165 0
      packages/ckeditor5-paste-from-office/tests/filters/list.js

+ 10 - 11
packages/ckeditor5-paste-from-office/src/filters/list.js

@@ -166,19 +166,19 @@ function detectListStyle( listLikeItem, stylesString ) {
 	const listStyleMatch = listStyleRegexp.exec( stylesString );
 
 	let listStyleType = 'decimal'; // Decimal is default one.
-	let type;
+	let type = 'ol'; // <ol> is default list.
 
 	if ( listStyleMatch && listStyleMatch[ 1 ] ) {
 		const listStyleTypeMatch = listStyleTypeRegex.exec( listStyleMatch[ 1 ] );
 
 		if ( listStyleTypeMatch && listStyleTypeMatch[ 1 ] ) {
 			listStyleType = listStyleTypeMatch[ 1 ].trim();
+			type = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';
 		}
 
-		type = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';
-
-		// Styles for the numbered lists are defined in Word CSS stylesheet.
-		// Bulleted lists are not described and we need to predict the list style value based on
+		// Styles for the numbered lists are always defined in Word CSS stylesheet.
+		// Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes
+		// the tag is missing. And because of that, we cannot depend on that. We need to predict the list style value based on
 		// the list style marker element.
 		if ( listStyleType === 'bullet' ) {
 			const bulletedStyle = findBulletedListStyle( listLikeItem.element );
@@ -225,19 +225,18 @@ function findBulletedListStyle( element ) {
 // @param {module:engine/view/element~Element} element
 // @returns {module:engine/view/text~Text|null}
 function findListMarkerNode( element ) {
-	let textNodeOrElement = element.getChild( 0 ).getChild( 0 );
-
-	if ( textNodeOrElement.is( '$text' ) ) {
-		return textNodeOrElement;
+	// If the first child is a text node, it is a value for the element.
+	if ( element.getChild( 0 ).is( '$text' ) ) {
+		return null;
 	}
 
-	textNodeOrElement = textNodeOrElement.getChild( 0 );
+	const textNodeOrElement = element.getChild( 0 ).getChild( 0 );
 
 	if ( textNodeOrElement.is( '$text' ) ) {
 		return textNodeOrElement;
 	}
 
-	return null;
+	return textNodeOrElement.getChild( 0 );
 }
 
 // Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/heading1/model.word2016.html

@@ -1,2 +1,2 @@
-<listItem listIndent="0" listType="numbered">H1 1</listItem>
-<listItem listIndent="0" listType="numbered">H1 2</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">H1 1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">H1 2</listItem>

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/model.word2016.html

@@ -1,5 +1,5 @@
-<listItem listIndent="0" listType="bulleted">H<$text bold="true">2 1</$text></listItem>
-<listItem listIndent="0" listType="bulleted">
+<listItem listIndent="0" listStyle="disc" listType="bulleted">H<$text bold="true">2 1</$text></listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">
 	<$text italic="true" underline="true">H</$text>
 	<$text underline="true">2</$text> 2
 </listItem>

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.safari.word2016.html

@@ -1,4 +1,4 @@
-<ul>
+<ul style="list-style-type:disc">
 	<li style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
 		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
 	Symbol;mso-ansi-language:PL"></span><!--[endif]-->

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/heading3-styled/normalized.word2016.html

@@ -1,4 +1,4 @@
-<ul>
+<ul style="list-style-type:disc">
 	<li style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:PL'></span>

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/heading7/model.word2016.html

@@ -1 +1 @@
-<listItem listIndent="0" listType="numbered">H 7</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">H 7</listItem>

+ 12 - 12
packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/model.word2016.html

@@ -1,21 +1,21 @@
-<listItem listIndent="0" listType="numbered">A</listItem>
-<listItem listIndent="0" listType="numbered">B</listItem>
-<listItem listIndent="0" listType="numbered">C</listItem>
-<listItem listIndent="0" listType="numbered">D</listItem>
-<listItem listIndent="0" listType="numbered">E</listItem>
-<listItem listIndent="0" listType="numbered">F</listItem>
-<listItem listIndent="0" listType="numbered">G</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">A</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">B</listItem>
+<listItem listIndent="0" listStyle="upper-roman" listType="numbered">C</listItem>
+<listItem listIndent="0" listStyle="upper-alpha" listType="numbered">D</listItem>
+<listItem listIndent="0" listStyle="lower-alpha" listType="numbered">E</listItem>
+<listItem listIndent="0" listStyle="lower-alpha" listType="numbered">F</listItem>
+<listItem listIndent="0" listStyle="lower-roman" listType="numbered">G</listItem>
 
 <paragraph></paragraph>
 
-<listItem listIndent="0" listType="bulleted">H</listItem>
-<listItem listIndent="0" listType="bulleted">I</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">H</listItem>
+<listItem listIndent="0" listStyle="circle" listType="bulleted">I</listItem>
 
 <paragraph></paragraph>
 
-<listItem listIndent="0" listType="bulleted">J</listItem>
-<listItem listIndent="0" listType="bulleted">k</listItem>
+<listItem listIndent="0" listStyle="square" listType="bulleted">J</listItem>
+<listItem listIndent="0" listStyle="default" listType="bulleted">k</listItem>
 
 <paragraph></paragraph>
 
-<listItem listIndent="0" listType="numbered">h1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">h1</listItem>

+ 8 - 8
packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.safari.word2016.html

@@ -17,7 +17,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:upper-roman">
 	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-36.0pt;mso-text-indent-alt:
 	-18.0pt;mso-list:l7 level1 lfo3">
 		<!--[if !supportLists]--><span style="mso-fareast-font-family:
@@ -27,7 +27,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:upper-alpha">
 	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l10 level1 lfo4">
 		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
 	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
@@ -36,7 +36,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-alpha">
 	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l9 level1 lfo5">
 		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
 	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
@@ -45,7 +45,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-alpha">
 	<li class="MsoListParagraphCxSpMiddle" style="text-indent:-18.0pt;mso-list:l4 level1 lfo6">
 		<!--[if !supportLists]--><span style="mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;
 	mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:
@@ -54,7 +54,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-roman">
 	<li class="MsoListParagraphCxSpLast" style="text-indent:-36.0pt;mso-text-indent-alt:
 	-18.0pt;mso-list:l6 level1 lfo7">
 		<!--[if !supportLists]--><span style="mso-fareast-font-family:
@@ -66,7 +66,7 @@
 
 <p class="MsoNormal" style="margin: 0cm 0cm 8pt; line-height: 15.693333625793457px; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span></span></p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l1 level1 lfo8">
 		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
 	Symbol;mso-ansi-language:PL"></span><!--[endif]-->
@@ -74,7 +74,7 @@
 	</li>
 </ul>
 
-<ul>
+<ul style="list-style-type:circle">
 	<li class="MsoListParagraphCxSpLast" style="text-indent:-18.0pt;mso-list:l3 level1 lfo9">
 		<!--[if !supportLists]--><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
 	mso-ansi-language:PL"></span><!--[endif]-->
@@ -84,7 +84,7 @@
 
 <p class="MsoNormal" style="margin: 0cm 0cm 8pt; line-height: 15.693333625793457px; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span></span></p>
 
-<ul>
+<ul style="list-style-type:square">
 	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l8 level1 lfo10">
 		<!--[if !supportLists]--><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
 	Wingdings;mso-ansi-language:PL"></span><!--[endif]-->

+ 8 - 8
packages/ckeditor5-paste-from-office/tests/_data/list/many-one-item/normalized.word2016.html

@@ -16,7 +16,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:upper-roman">
 	<li class=MsoListParagraphCxSpMiddle style='text-indent:-36.0pt;mso-text-indent-alt:-18.0pt;mso-list:l7 level1 lfo3'>
 		<![if !supportLists]>
 		<span lang=PL style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:PL'></span>
@@ -25,7 +25,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:upper-alpha">
 	<li class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l10 level1 lfo4'>
 		<![if !supportLists]>
 		<span lang=PL style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:PL'></span>
@@ -34,7 +34,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-alpha">
 	<li class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l9 level1 lfo5'>
 		<![if !supportLists]>
 		<span lang=PL style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:PL'></span>
@@ -43,7 +43,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-alpha">
 	<li class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l4 level1 lfo6'>
 		<![if !supportLists]>
 		<span lang=PL style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:PL'></span>
@@ -52,7 +52,7 @@
 	</li>
 </ol>
 
-<ol>
+<ol style="list-style-type:lower-roman">
 	<li class=MsoListParagraphCxSpLast style='text-indent:-36.0pt;mso-text-indent-alt:-18.0pt;mso-list:l6 level1 lfo7'>
 		<![if !supportLists]>
 		<span lang=PL style='mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-ansi-language:PL'></span>
@@ -63,7 +63,7 @@
 
 <p class=MsoNormal><span lang=PL style='mso-ansi-language:PL'></span></p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l1 level1 lfo8'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:PL'></span>
@@ -72,7 +72,7 @@
 	</li>
 </ul>
 
-<ul>
+<ul style="list-style-type:circle">
 	<li class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l3 level1 lfo9'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:"Courier New";mso-fareast-font-family:"Courier New";mso-ansi-language:PL'></span>
@@ -83,7 +83,7 @@
 
 <p class=MsoNormal><span lang=PL style='mso-ansi-language:PL'></span></p>
 
-<ul>
+<ul style="list-style-type:square">
 	<li class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l8 level1 lfo10'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-ansi-language:PL'></span>

+ 4 - 4
packages/ckeditor5-paste-from-office/tests/_data/list/multiple-combined/model.word2016.html

@@ -1,4 +1,4 @@
-<listItem listIndent="0" listType="numbered">Item1</listItem>
-<listItem listIndent="0" listType="numbered">Item 2</listItem>
-<listItem listIndent="0" listType="numbered">Item 1</listItem>
-<listItem listIndent="0" listType="numbered">Item2</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item 2</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item 1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item2</listItem>

+ 3 - 3
packages/ckeditor5-paste-from-office/tests/_data/list/multiple/model.word2016.html

@@ -1,6 +1,6 @@
-<listItem listIndent="0" listType="numbered">Item1</listItem>
-<listItem listIndent="0" listType="numbered">Item 2</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item 2</listItem>
 
 <paragraph>Some text</paragraph>
 
-<listItem listIndent="0" listType="bulleted">Bullet 1</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Bullet 1</listItem>

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.safari.word2016.html

@@ -16,7 +16,7 @@
 
 <p class="MsoNormal" style="margin: 0cm 0cm 8pt; line-height: 15.693333625793457px; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><span>Some text<o:p></o:p></span></p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo2">
 		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
 	Symbol;mso-ansi-language:PL"></span><!--[endif]-->

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/multiple/normalized.word2016.html

@@ -16,7 +16,7 @@
 
 <p class=MsoNormal><span lang=PL style='mso-ansi-language:PL'>Some text<o:p></o:p></span></p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:PL'></span>

+ 6 - 6
packages/ckeditor5-paste-from-office/tests/_data/list/nested-mixed/model.word2016.html

@@ -1,6 +1,6 @@
-<listItem listIndent="0" listType="bulleted">A1</listItem>
-<listItem listIndent="1" listType="numbered">B2</listItem>
-<listItem listIndent="2" listType="numbered">C4</listItem>
-<listItem listIndent="2" listType="numbered">D3</listItem>
-<listItem listIndent="0" listType="bulleted">E1</listItem>
-<listItem listIndent="1" listType="numbered">F2</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">A1</listItem>
+<listItem listIndent="1" listStyle="default" listType="numbered">B2</listItem>
+<listItem listIndent="2" listStyle="disc" listType="numbered">C4</listItem>
+<listItem listIndent="2" listStyle="disc" listType="numbered">D3</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">E1</listItem>
+<listItem listIndent="1" listStyle="default" listType="numbered">F2</listItem>

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/nested-mixed/normalized.word2016.html

@@ -1,10 +1,10 @@
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListParagraphCxSpFirst" style="mso-list:l0 level1 lfo1;text-indent:-18.0pt">
 		<span style="font-family:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol"></span>A1<o:p></o:p>
 		<ol>
 			<li class="MsoListParagraphCxSpMiddle" style="margin-left:72.0pt;mso-add-space:auto;mso-list:l0 level2 lfo1;text-indent:-18.0pt">
 				<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>B2<o:p></o:p>
-				<ol>
+				<ol style="list-style-type:disc">
 					
 					<li class="MsoListParagraphCxSpMiddle" style="margin-left:144.0pt;mso-add-space:auto;mso-list:l0 level4 lfo1;text-indent:-18.0pt">
 						<span style="font-family:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol"></span>C4<o:p></o:p>

+ 9 - 9
packages/ckeditor5-paste-from-office/tests/_data/list/nested-multiple/model.word2016.html

@@ -1,17 +1,17 @@
-<listItem listIndent="0" listType="bulleted">A1</listItem>
-<listItem listIndent="1" listType="numbered">B3</listItem>
-<listItem listIndent="1" listType="numbered">C2</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">A1</listItem>
+<listItem listIndent="1" listStyle="square" listType="numbered">B3</listItem>
+<listItem listIndent="1" listStyle="square" listType="numbered">C2</listItem>
 
 <paragraph></paragraph>
 <paragraph>Foo Bar...</paragraph>
 <paragraph></paragraph>
 
-<listItem listIndent="0" listType="numbered">A2</listItem>
-<listItem listIndent="0" listType="numbered">B1</listItem>
-<listItem listIndent="1" listType="numbered">C2</listItem>
+<listItem listIndent="0" listStyle="lower-alpha" listType="numbered">A2</listItem>
+<listItem listIndent="0" listStyle="lower-alpha" listType="numbered">B1</listItem>
+<listItem listIndent="1" listStyle="lower-alpha" listType="numbered">C2</listItem>
 
 <paragraph></paragraph>
 
-<listItem listIndent="0" listType="bulleted">A1</listItem>
-<listItem listIndent="1" listType="numbered">B2</listItem>
-<listItem listIndent="0" listType="bulleted">C1</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">A1</listItem>
+<listItem listIndent="1" listStyle="default" listType="numbered">B2</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">C1</listItem>

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/nested-multiple/normalized.safari.word2016.html

@@ -12,7 +12,7 @@
 			</li>
 		</ol>
 	</li>
-</ol>
+</ul>
 
 <p class="MsoNormal" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:Calibri, sans-serif;font-size:medium;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;margin:0cm 0cm 0.0001pt;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px"></p>
 <p class="MsoNormal" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:Calibri, sans-serif;font-size:medium;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;margin:0cm 0cm 0.0001pt;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px">Foo Bar...<o:p></o:p></p>
@@ -38,7 +38,7 @@
 <ul style="list-style-type:disc">
 	<li class="MsoListParagraphCxSpFirst" style="mso-list:l1 level1 lfo2;text-indent:-18.0pt">
 		<span style="font-family:Symbol;mso-bidi-font-family:Symbol;mso-fareast-font-family:Symbol"></span>A1<o:p></o:p>
-		<ol style="list-style-type:square">
+		<ol>
 			<li class="MsoListParagraphCxSpMiddle" style="margin-left:72.0pt;mso-add-space:auto;mso-list:l1 level2 lfo2;text-indent:-18.0pt">
 				<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>B2<o:p></o:p>
 			</li>

+ 7 - 7
packages/ckeditor5-paste-from-office/tests/_data/list/nested/model.word2016.html

@@ -1,7 +1,7 @@
-<listItem listIndent="0" listType="numbered">A1</listItem>
-<listItem listIndent="0" listType="numbered">B1</listItem>
-<listItem listIndent="1" listType="numbered">C2</listItem>
-<listItem listIndent="2" listType="numbered">D4</listItem>
-<listItem listIndent="1" listType="numbered">E2</listItem>
-<listItem listIndent="2" listType="numbered">F3</listItem>
-<listItem listIndent="0" listType="numbered">G1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">A1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">B1</listItem>
+<listItem listIndent="1" listStyle="lower-alpha" listType="numbered">C2</listItem>
+<listItem listIndent="2" listStyle="default" listType="numbered">D4</listItem>
+<listItem listIndent="1" listStyle="lower-alpha" listType="numbered">E2</listItem>
+<listItem listIndent="2" listStyle="lower-roman" listType="numbered">F3</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">G1</listItem>

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/nested/normalized.word2016.html

@@ -5,7 +5,7 @@
 
 	<li class="MsoListParagraphCxSpMiddle" style="mso-list:l0 level1 lfo1;text-indent:-18.0pt">
 		<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>B1<o:p></o:p>
-		<ol>
+		<ol style="list-style-type:lower-alpha">
 			<li class="MsoListParagraphCxSpMiddle" style="margin-left:72.0pt;mso-add-space:auto;mso-list:l0 level2 lfo1;text-indent:-18.0pt">
 				<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>C2<o:p></o:p>
 				<ol>
@@ -17,7 +17,7 @@
 
 			<li class="MsoListParagraphCxSpMiddle" style="margin-left:72.0pt;mso-add-space:auto;mso-list:l0 level2 lfo1;text-indent:-18.0pt">
 				<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>E2<o:p></o:p>
-				<ol>
+				<ol style="list-style-type:lower-roman">
 					<li class="MsoListParagraphCxSpMiddle" style="margin-left:108.0pt;mso-add-space:auto;mso-list:l0 level3 lfo1;mso-text-indent-alt:-9.0pt;text-indent:-108.0pt">
 						<span style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin"></span>F3<o:p></o:p>
 					</li>

+ 12 - 12
packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/model.safari.word2016.html

@@ -10,40 +10,40 @@
 
 <heading1>DEGREE | DATE EARNED | SCHOOL</heading1>
 
-<listItem listIndent="0" listType="bulleted">Major: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Minor: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Related coursework: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Major: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Minor: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Related coursework: Click here to enter text</listItem>
 
 <heading1>DEGREE | DATE EARNED | SCHOOL</heading1>
 
-<listItem listIndent="0" listType="bulleted">Major: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Minor: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Related coursework: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Major: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Minor: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Related coursework: Click here to enter text</listItem>
 
 <heading1>Skills & Abilities</heading1>
 
 <heading1>MANAGEMENT</heading1>
 
-<listItem listIndent="0" listType="bulleted">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.</listItem>
 
 <heading1>SALES</heading1>
 
-<listItem listIndent="0" listType="bulleted">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.</listItem>
 
 <heading1>COMMUNICATION</heading1>
 
-<listItem listIndent="0" listType="bulleted">You delivered that big presentation to rave reviews. Don’t be shy about it now! This is the place to show how well you work and play with others.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">You delivered that big presentation to rave reviews. Don’t be shy about it now! This is the place to show how well you work and play with others.</listItem>
 
 <heading1>LEADERSHIP</heading1>
 
-<listItem listIndent="0" listType="bulleted">Are you president of your fraternity, head of the condo board, or a team lead for your favorite charity? You’re a natural leader—tell it like it is!</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Are you president of your fraternity, head of the condo board, or a team lead for your favorite charity? You’re a natural leader—tell it like it is!</listItem>
 
 <heading1>Experience</heading1>
 
 <heading1>JOB TITLE | COMPANY | DATES FROM - TO</heading1>
 
-<listItem listIndent="0" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
 
 <heading1>JOB TITLE | COMPANY | DATES FROM - TO</heading1>
 
-<listItem listIndent="0" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>

+ 12 - 12
packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/model.word2016.html

@@ -10,40 +10,40 @@
 
 <heading1>Degree | Date Earned | School</heading1>
 
-<listItem listIndent="0" listType="bulleted">Major: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Minor: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Related coursework: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Major: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Minor: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Related coursework: Click here to enter text</listItem>
 
 <heading1>Degree | Date Earned | School</heading1>
 
-<listItem listIndent="0" listType="bulleted">Major: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Minor: Click here to enter text</listItem>
-<listItem listIndent="0" listType="bulleted">Related coursework: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Major: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Minor: Click here to enter text</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Related coursework: Click here to enter text</listItem>
 
 <heading1>Skills & Abilities</heading1>
 
 <heading1>Management</heading1>
 
-<listItem listIndent="0" listType="bulleted">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.</listItem>
 
 <heading1>Sales</heading1>
 
-<listItem listIndent="0" listType="bulleted">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.</listItem>
 
 <heading1>Communication</heading1>
 
-<listItem listIndent="0" listType="bulleted">You delivered that big presentation to rave reviews. Don’t be shy about it now! This is the place to show how well you work and play with others.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">You delivered that big presentation to rave reviews. Don’t be shy about it now! This is the place to show how well you work and play with others.</listItem>
 
 <heading1>Leadership</heading1>
 
-<listItem listIndent="0" listType="bulleted">Are you president of your fraternity, head of the condo board, or a team lead for your favorite charity? You’re a natural leader—tell it like it is!</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">Are you president of your fraternity, head of the condo board, or a team lead for your favorite charity? You’re a natural leader—tell it like it is!</listItem>
 
 <heading1>Experience</heading1>
 
 <heading1>Job Title | Company | Dates From - To</heading1>
 
-<listItem listIndent="0" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
 
 <heading1>Job Title | Company | Dates From - To</heading1>
 
-<listItem listIndent="0" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.</listItem>

+ 8 - 8
packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/normalized.safari.word2016.html

@@ -45,7 +45,7 @@
 	</span>
 </h2>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBulletCxSpFirst" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">Major: <w:sdt docpart="1EDC150D3B06E54E95D71F92040E448A" id="1821224400" sdttag="Major:" showingplchdr="t" temporary="t" text="t" title="Major:">Click here to enter text</w:sdt><o:p></o:p></span>
@@ -68,7 +68,7 @@
 	</span>
 </h2>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBulletCxSpFirst" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">Major: <w:sdt docpart="9EAA648D6489514EB79336B1A935D9AC" id="1046181329" sdttag="Major:" showingplchdr="t" temporary="t" text="t" title="Major:">Click here to enter text</w:sdt><o:p></o:p></span>
@@ -98,7 +98,7 @@
 </w:sdt>
 
 <w:sdt docpart="07C08B1CF5695F41BAB584E7E2D2D094" id="-1177730712" sdttag="Management Skills:" showingplchdr="t" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:-webkit-standard;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px" temporary="t" title="Management Skills:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -113,7 +113,7 @@
 </w:sdt>
 
 <w:sdt docpart="952E9B3BDFFE494DA37978C6F4D15566" id="1544489962" sdttag="Sales Skills:" showingplchdr="t" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:-webkit-standard;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px" temporary="t" title="Sales Skills:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -129,7 +129,7 @@
 
 <span style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);display:inline !important;float:none;font-family:-webkit-standard;font-size:medium;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px"></span>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">
@@ -146,7 +146,7 @@
 
 <span style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);display:inline !important;float:none;font-family:-webkit-standard;font-size:medium;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px"></span>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">
@@ -170,7 +170,7 @@
 </h2>
 
 <w:sdt docpart="723EDD3B9355AB408B93DC96E350C9C8" id="-513455036" sdttag="Key responsibilities for Job Title 1:" showingplchdr="t" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:-webkit-standard;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px" temporary="t" title="Key responsibilities for Job Title 1:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -187,7 +187,7 @@
 </h2>
 
 <w:sdt docpart="35452DC21B458F4990E9AD6B0D21FF93" id="2140524828" sdttag="Key responsibilities for Job Title 2:" showingplchdr="t" style="-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;caret-color:rgb(0, 0, 0);color:rgb(0, 0, 0);font-family:-webkit-standard;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;orphans:auto;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;widows:auto;word-spacing:0px" temporary="t" title="Key responsibilities for Job Title 2:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.<o:p></o:p><w:sdtpr></w:sdtpr></span>

+ 8 - 8
packages/ckeditor5-paste-from-office/tests/_data/list/resume-template/normalized.word2016.html

@@ -42,7 +42,7 @@
 	</span>
 </h2>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBulletCxSpFirst" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">Major: <w:sdt docpart="11254AB6F6AF3048B0FB77B19E14A276" id="1821224400" sdttag="Major:" showingplchdr="t" temporary="t" text="t" title="Major:">Click here to enter text</w:sdt><o:p></o:p></span>
@@ -65,7 +65,7 @@
 	</span>
 </h2>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBulletCxSpFirst" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US">Major: <w:sdt docpart="2D9029A2B401CC42944B7EB502F83824" id="1046181329" sdttag="Major:" showingplchdr="t" temporary="t" text="t" title="Major:">Click here to enter text</w:sdt><o:p></o:p></span>
@@ -95,7 +95,7 @@
 </w:sdt>
 
 <w:sdt docpart="C51B29163715CD4F99529A18C891B99B" id="-1177730712" sdttag="Management Skills:" showingplchdr="t" temporary="t" title="Management Skills:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">Think a document that looks this good has to be difficult to format? Think again! To easily apply any text formatting you see in this document with just a click, on the Home tab of the ribbon, check out Styles.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -110,7 +110,7 @@
 </w:sdt>
 
 <w:sdt docpart="92F72DE9A594584B9C488FED96B568B4" id="1544489962" sdttag="Sales Skills:" showingplchdr="t" temporary="t" title="Sales Skills:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">Some of the sample text in this document indicates the name of the style applied, so that you can easily apply the same formatting again. For example, this is the List Bullet style.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -124,7 +124,7 @@
 	</h2>
 </w:sdt>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US"><w:sdt docpart="1018054470CB4B4B93F5C30010DA2E3A" id="-1819335404" sdttag="Communication Skills:" showingplchdr="t" temporary="t" title="Communication Skills:">You delivered that big presentation to rave reviews. Don’t be shy about it now! This is the place to show how well you work and play with others.</w:sdt><o:p></o:p></span>
@@ -137,7 +137,7 @@
 	</h2>
 </w:sdt>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 		<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 		<span lang="EN-US"><w:sdt docpart="D969CD1F1B5AC04493396C70BC53F75B" id="-1072199855" sdttag="Leadership Skills:" showingplchdr="t" temporary="t" title="Leadership Skills:">Are you president of your fraternity, head of the condo board, or a team lead for your favorite charity? You’re a natural leader—tell it like it is!</w:sdt><o:p></o:p></span>
@@ -157,7 +157,7 @@
 </h2>
 
 <w:sdt docpart="6484D2D9F5586D4E94F9BC3CAEDFDE20" id="-513455036" sdttag="Key responsibilities for Job Title 1:" showingplchdr="t" temporary="t" title="Key responsibilities for Job Title 1:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.<o:p></o:p><w:sdtpr></w:sdtpr></span>
@@ -172,7 +172,7 @@
 </h2>
 
 <w:sdt docpart="290D27AE8D9A964ABE103E88C285CB84" id="2140524828" sdttag="Key responsibilities for Job Title 2:" showingplchdr="t" temporary="t" title="Key responsibilities for Job Title 2:">
-	<ul>
+	<ul style="list-style-type:disc">
 		<li class="MsoListBullet" style="mso-list:l0 level1 lfo1">
 			<span lang="EN-US" style="mso-ascii-font-family:Cambria;mso-bidi-font-family:Cambria;mso-fareast-font-family:Cambria;mso-hansi-font-family:Cambria"></span>
 			<span lang="EN-US">This is the place for a brief summary of your key responsibilities and most stellar accomplishments.<o:p></o:p><w:sdtpr></w:sdtpr></span>

+ 2 - 2
packages/ckeditor5-paste-from-office/tests/_data/list/simple/model.word2016.html

@@ -1,2 +1,2 @@
-<listItem listIndent="0" listType="numbered">Item1</listItem>
-<listItem listIndent="0" listType="numbered">Item 2</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item1</listItem>
+<listItem listIndent="0" listStyle="default" listType="numbered">Item 2</listItem>

+ 3 - 3
packages/ckeditor5-paste-from-office/tests/_data/list/styled/model.safari.word2016.html

@@ -1,8 +1,8 @@
 <paragraph>List:</paragraph>
 
-<listItem listIndent="0" listType="bulleted">B<$text bold="true">old</$text></listItem>
-<listItem listIndent="0" listType="bulleted"><$text linkHref="https://cksource.com/" underline="true">Lin</$text>k</listItem>
-<listItem listIndent="0" listType="bulleted">
+<listItem listIndent="0" listStyle="disc" listType="bulleted">B<$text bold="true">old</$text></listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted"><$text linkHref="https://cksource.com/" underline="true">Lin</$text>k</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">
 	<$text italic="true">M</$text><$text bold="true" italic="true">ul</$text>
 <$text bold="true" italic="true" underline="true">tip</$text>
 <$text italic="true" underline="true">le</$text>

+ 3 - 3
packages/ckeditor5-paste-from-office/tests/_data/list/styled/model.word2016.html

@@ -1,8 +1,8 @@
 <paragraph>List:</paragraph>
 
-<listItem listIndent="0" listType="bulleted">B<$text bold="true">old</$text></listItem>
-<listItem listIndent="0" listType="bulleted"><$text linkHref="https://cksource.com">Lin</$text>k</listItem>
-<listItem listIndent="0" listType="bulleted">
+<listItem listIndent="0" listStyle="disc" listType="bulleted">B<$text bold="true">old</$text></listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted"><$text linkHref="https://cksource.com">Lin</$text>k</listItem>
+<listItem listIndent="0" listStyle="disc" listType="bulleted">
 	<$text italic="true">M</$text><$text bold="true" italic="true">ul</$text>
 	<$text bold="true" italic="true" underline="true">tip</$text>
 	<$text italic="true" underline="true">le</$text>

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.safari.word2016.html

@@ -2,7 +2,7 @@
 	<span>List:<o:p></o:p></span>
 </p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class="MsoListParagraphCxSpFirst" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1">
 		<!--[if !supportLists]--><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
 	Symbol;mso-ansi-language:PL"></span><!--[endif]-->

+ 1 - 1
packages/ckeditor5-paste-from-office/tests/_data/list/styled/normalized.word2016.html

@@ -2,7 +2,7 @@
 	<span lang=PL style='mso-ansi-language:PL'>List:<o:p></o:p></span>
 </p>
 
-<ul>
+<ul style="list-style-type:disc">
 	<li class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'>
 		<![if !supportLists]>
 		<span lang=PL style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;mso-ansi-language:PL'></span>

+ 2 - 1
packages/ckeditor5-paste-from-office/tests/data/integration.js

@@ -13,6 +13,7 @@ import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
 import Link from '@ckeditor/ckeditor5-link/src/link';
 import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
 import List from '@ckeditor/ckeditor5-list/src/list';
+import ListStyle from '@ckeditor/ckeditor5-list/src/liststyle';
 import Image from '@ckeditor/ckeditor5-image/src/image';
 import Table from '@ckeditor/ckeditor5-table/src/table';
 import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
@@ -71,7 +72,7 @@ describe( 'PasteFromOffice - integration', () => {
 		type: 'integration',
 		browsers,
 		editorConfig: {
-			plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Link, List, PasteFromOffice ]
+			plugins: [ Clipboard, Paragraph, Heading, Bold, Italic, Underline, Link, List, ListStyle, PasteFromOffice ]
 		},
 		skip: {
 			safari: [ 'heading3Styled' ] // Skip due to spacing issue (#13).

+ 41 - 41
packages/ckeditor5-paste-from-office/tests/data/normalization.js

@@ -15,27 +15,27 @@ const editorConfig = {
 	plugins: [ Clipboard, PasteFromOffice, Paragraph ]
 };
 
-describe.only( 'PasteFromOffice - normalization', () => {
-	// generateTests( {
-	// 	input: 'basic-styles',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
-	//
-	// generateTests( {
-	// 	input: 'image',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
-	//
-	// generateTests( {
-	// 	input: 'link',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
+describe( 'PasteFromOffice - normalization', () => {
+	generateTests( {
+		input: 'basic-styles',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
+
+	generateTests( {
+		input: 'image',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
+
+	generateTests( {
+		input: 'link',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
 
 	generateTests( {
 		input: 'list',
@@ -44,24 +44,24 @@ describe.only( 'PasteFromOffice - normalization', () => {
 		editorConfig
 	} );
 
-	// generateTests( {
-	// 	input: 'spacing',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
-	//
-	// generateTests( {
-	// 	input: 'google-docs-bold-wrapper',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
-	//
-	// generateTests( {
-	// 	input: 'generic-list-in-table',
-	// 	type: 'normalization',
-	// 	browsers,
-	// 	editorConfig
-	// } );
+	generateTests( {
+		input: 'spacing',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
+
+	generateTests( {
+		input: 'google-docs-bold-wrapper',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
+
+	generateTests( {
+		input: 'generic-list-in-table',
+		type: 'normalization',
+		browsers,
+		editorConfig
+	} );
 } );

+ 165 - 0
packages/ckeditor5-paste-from-office/tests/filters/list.js

@@ -182,6 +182,171 @@ describe( 'PasteFromOffice - filters', () => {
 						'</ol>' );
 				} );
 			} );
+
+			describe( 'list styles', () => {
+				const level1 = 'style="mso-list:l0 level1 lfo0"';
+
+				describe( 'ordered list', () => {
+					it( 'converts "roman-lower" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:roman-lower;}';
+
+						const html = `<p ${ level1 }>Foo</p>`;
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							`<ol style="list-style-type:lower-roman"><li ${ level1 }>Foo</li></ol>`
+						);
+					} );
+
+					it( 'converts "alpha-upper" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:alpha-upper;}';
+
+						const html = `<p ${ level1 }>Foo</p>`;
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							`<ol style="list-style-type:upper-alpha"><li ${ level1 }>Foo</li></ol>`
+						);
+					} );
+
+					it( 'converts "alpha-lower" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:alpha-lower;}';
+
+						const html = `<p ${ level1 }>Foo</p>`;
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							`<ol style="list-style-type:lower-alpha"><li ${ level1 }>Foo</li></ol>`
+						);
+					} );
+					it( 'converts "roman-upper" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:roman-upper;}';
+
+						const html = `<p ${ level1 }>Foo</p>`;
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							`<ol style="list-style-type:upper-roman"><li ${ level1 }>Foo</li></ol>`
+						);
+					} );
+
+					it( 'converts "arabic-leading-zero" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:arabic-leading-zero;}';
+
+						const html = `<p ${ level1 }>Foo</p>`;
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							`<ol style="list-style-type:decimal-leading-zero"><li ${ level1 }>Foo</li></ol>`
+						);
+					} );
+				} );
+
+				describe( 'unordered list', () => {
+					it( 'converts "circle" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:bullet;}';
+
+						const html = `<p class=MsoListBulletCxSpFirst ${ level1 }>` +
+							'<span lang=\'EN-US\'><span style=\'mso-list:Ignore\'>o<span>&nbsp;&nbsp;</span></span></span></span>' +
+							'<span>Foo</span>' +
+							'</p>';
+
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							'<ul style="list-style-type:circle">' +
+								`<li class="MsoListBulletCxSpFirst" ${ level1 }>` +
+									'<span lang="EN-US"></span><span>Foo</span>' +
+								'</li>' +
+							'</ul>'
+						);
+					} );
+
+					it( 'converts "disc" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:bullet;}';
+
+						const html = `<p class=MsoListBulletCxSpFirst ${ level1 }>` +
+							'<span lang=\'EN-US\'><span style=\'mso-list:Ignore\'>·<span>&nbsp;&nbsp;</span></span></span></span>' +
+							'<span>Foo</span>' +
+							'</p>';
+
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							'<ul style="list-style-type:disc">' +
+							`<li class="MsoListBulletCxSpFirst" ${ level1 }>` +
+							'<span lang="EN-US"></span><span>Foo</span>' +
+							'</li>' +
+							'</ul>'
+						);
+					} );
+
+					it( 'converts "square" style to proper CSS attribute', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:bullet;}';
+
+						const html = `<p class=MsoListBulletCxSpFirst ${ level1 }>` +
+							'<span lang=\'EN-US\'><span style=\'mso-list:Ignore\'>§<span>&nbsp;&nbsp;</span></span></span></span>' +
+							'<span>Foo</span>' +
+							'</p>';
+
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							'<ul style="list-style-type:square">' +
+							`<li class="MsoListBulletCxSpFirst" ${ level1 }>` +
+							'<span lang="EN-US"></span><span>Foo</span>' +
+							'</li>' +
+							'</ul>'
+						);
+					} );
+
+					it( 'ignores the marker if cannot be translated to list style feature', () => {
+						const styles = '@list l0:level1\n' +
+							'{mso-level-number-format:bullet;}';
+
+						const html = `<p class=MsoListBulletCxSpFirst ${ level1 }>` +
+							'<span lang=\'EN-US\'><span style=\'mso-list:Ignore\'>+<span>&nbsp;&nbsp;</span></span></span></span>' +
+							'<span>Foo</span>' +
+							'</p>';
+
+						const view = htmlDataProcessor.toView( html );
+
+						transformListItemLikeElementsIntoLists( view, styles );
+
+						expect( stringify( view ) ).to.equal(
+							'<ul>' +
+							`<li class="MsoListBulletCxSpFirst" ${ level1 }>` +
+							'<span lang="EN-US"></span><span>Foo</span>' +
+							'</li>' +
+							'</ul>'
+						);
+					} );
+				} );
+			} );
 		} );
 	} );