+ var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst');
+ for( var i = 0; i < listpara.length; i ++) {
+ listpara.item(i).className = "MsoListParagraph";
+ }
+ // this is a bit hacky - we had one word document where h2 had a miso-list attribute.
+ var htwo = doc.getElementsByTagName('h2');
+ for( var i = 0; i < htwo.length; i ++) {
+ if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) {
+ htwo.item(i).className = "MsoListParagraph";
+ }
+ }
+ listpara = doc.getElementsByClassName('MsoNormal');
+ while(listpara.length) {
+ if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) {
+ listpara.item(0).className = "MsoListParagraph";
+ } else {
+ listpara.item(0).className = "MsoNormalx";
+ }
+ }
+ listpara = doc.getElementsByClassName('ql-indent-1');