From 942f1056b51e53358d42ff8da8a1bbdce9ba5303 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 2 Jul 2018 20:31:32 +1000 Subject: [PATCH] tdf#117923: handle direct formatting for numbering in .doc Since commit df07d6cb9f62c0a2c4b29bd850d4efb4fcd4790b, we do for DOCX. DOC also has this problem, so set the relevant compatibility flag on import for this format, too. Change-Id: I3aef593341edffa878a06566da815cb72aa38004 Reviewed-on: https://gerrit.libreoffice.org/56812 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/qa/extras/layout/data/tdf117923.doc | Bin 0 -> 29696 bytes sw/qa/extras/layout/layout.cxx | 15 +++++++++++++++ sw/source/filter/ww8/ww8par.cxx | 3 +++ test/source/xmltesttools.cxx | 7 ++++++- 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/layout/data/tdf117923.doc diff --git a/sw/qa/extras/layout/data/tdf117923.doc b/sw/qa/extras/layout/data/tdf117923.doc new file mode 100644 index 0000000000000000000000000000000000000000..c43cf40c9f52e2c75a5e167b23dc7607ba208fa3 GIT binary patch literal 29696 zcmeHQ2V7H0x1S`GP$Ho!O#=d=Lg+;Vr3eBRK(VcgQX-&%Ac+X8E*4n3VlV4+5yf7x zuA;7mwXo`1X;y5juBg}+v5c4}Lh`*XGdO%66z0(!r%r<1omA^c|u*9QAnu#t|A?`lqnBQ)#V^>kmdZR(4w zXm2$mgb94NgN>#&wiTos-ky*HK&Wd$NEh&50(wJapkQb{&~g=`2_4>&jeO+|&5yR} za?@$h9}IeV2y{jexVXODiZ;r_ctt*ne$H&G*9mI}Y!zV#i1sI@}xbp$Q@HAs=YdW;yV|_V)p7N3gN|p-}-pAMEbX z4$uSveP6KAkLhXo8267bv>cijU0*0C4gzUC(>7gSw4b(V`j%`uouW;*N7`As$8`o00(Nch z4}|Ej#$sBTZxEZ&&M?9Lo4w$#i~B^vLYX825CtF&F(HvjO=C=H8jNvcPYVb&qDZ2_ zZcoSc39!ew9$kohbYr|r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;Ef@y;jshObO(9`$h;^(i@GGA1+ZEL5IW?eZt$ci6Q@=vS zmy&*M`Q`bc8tCsoelr!n|5&dWj^BT@mF7Q71Ku%S14R>3V+CT~K!H#YD-pyElw=6u z!qy1CaKC|x>5_!NxI_tD@{*l%3`>R!O#*(pSZK+k684Wyg2a&4k~f&X4F(sXWS6^Q zT64KeL>-{)C5oMp1oyOLH@spJV}yyK_|)i>gp7J-{}5I^yd4?}442XV#yz%Vk?a~< zoY*TaS`samh*AY15E&ZNDaha5#nmam#ooiUmz%w7Pyk$qa|v{|_xEt} z_jCzxa&dQcn?froPW*R^7CQmNCk;&!TK4b;@v;ka0|aBlO}&`438{&HS4xw*Z~zS| zh(do8RrHYWV7}mHK(E4rdce0zaqP$g+QxIXc)*s|&BGpU0J`w#)? Wqnl61^F7I%ZhOXmArt?_(fdxaTab; diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 45347b0c111b..c3e314e49ed4 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -88,7 +88,12 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath) xmlXPathNodeSetGetLength(pXmlNodes) > 0); xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; - OUString s(convert((pXmlNode->children[0]).content)); + xmlNodePtr pXmlChild = pXmlNode->children; + OUString s; + while (pXmlChild && pXmlChild->type != XML_TEXT_NODE) + pXmlChild = pXmlChild->next; + if (pXmlChild && pXmlChild->type == XML_TEXT_NODE) + s = convert(pXmlChild->content); xmlXPathFreeObject(pXmlObj); return s; }