From 8555c24e069dc00071eaad23c711f1d1375e5afc Mon Sep 17 00:00:00 2001 From: Ravindra Vidhate Date: Wed, 21 May 2014 14:54:35 +0530 Subject: [PATCH] fdo#78887 tag is not being preserved after export. When we have tag continuous like in the following cases... "Title: Superstition\v\vComposer: Stevie Wonder\v\v" or "\vLyrics: \v" where "\n" is internally replaced by "\v" LO. Before text "\v" or after text multiple "\v" is not preserved. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9420 Change-Id: I2a6d0a7d2382dfbc2f0ab04f150653c9b17bbfd1 --- sw/qa/extras/ooxmlexport/data/fdo78887.docx | Bin 0 -> 14813 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 +++++++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo78887.docx diff --git a/sw/qa/extras/ooxmlexport/data/fdo78887.docx b/sw/qa/extras/ooxmlexport/data/fdo78887.docx new file mode 100644 index 0000000000000000000000000000000000000000..db92fe4ede063b2782fb7ad15b7493bdee6d362e GIT binary patch literal 14813 zcmeHu1y^0mvhKp&-QC?GxRc-x!QI^n8YEb7cbDMq4#8c5yK8WVx3bSUZ||M6$9q5E z-nqt@vzOF2Yxb(@{;I25K^hDk9RLY{1^@sg01s(t_DB!_pa%i~Km$O7YKhv}I-A%! z>#2Cyn>gt(y4zS2=YoS$X9GZizyIIke{c`fsYuKB2qAZ*-4ms@r@D3rumtxAUlfxY z@>MR=Sf2>g)V960*Ye>K3n^Yt=V!bSvaLS6Yj3WIrEyo8-zm$e*8r7R5=l`UU;8p~ z$S=(dtsF9pJGclMebe$oJ!7*6gffsbxz+*t%-<>AXcCm|xJ#j+PB&br(x)#YTF(&t zxnZtldpZ?BnNQ+aWxEgafu%%bI%{S>0d0~(noxZ|S7kgt^4;Y|ch!CYjz)`|v*`6hMTB6SFIu+84^$(@Xe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vyaZzC*B|In0?`_9?5Moz0a7W zRl)K>ABE~~t-RJ#+%-ODvi+7p)r(Ji(uM-_pk+5O8ZS*y6%#Z}VL-b|!ekdhghDSK z5R=pu4BEh0%ufibQAY}$LM^0=*+q#=*v9oSOl;^R%AfQYT(YghKItgQV zB6}t>ZWg^KydmIg4zZRnyYT((hK*QNY|qB$;Qe}L6#p00D*Fs9*MXt^YSQ+orrU&1 zCo??wJQP%Hwl0?Hx`S&YLv?YGWz?uD#&6Vj(p_xrlFTm|@$oha1b5Fi*AF(qQ9~o8 zn!;8@3o&_AIKJ?I2IwH548R1(Kkq&J&;RnD>p$#7Q;_~Uz~6Vh{73NDbpSYO|78!% z?}C4?{r{`rBd}8Y|Fsj~cckAdy#K_~1*U!ftKR!}@!!jD{}czn|6Ba`V%*;$ey=wA z6G8=8o%DZ~J^ogE^gG7ysp>y5v~d2d#$OZHzl;B#zxq==2v}D9M<@K2&H5eT_uS5( z2&IJoQQ)64J-_4pebwhr6aZk6@-Ln7pEaQ0#ea{x{{%>+`I{QQ2GZY!f9C{$3Ujgi sTljAb;dlAJ58QuB0|3)(f6@Kl!?=Pp1kh9g00iJm7HI9BoWI`vAGmjQ_5c6? literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a039e0b359e2..a82f81075303 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3446,6 +3446,17 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78886, "fdo78886.docx") assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[2]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[2]/w:fldChar[1]", 0); } +DECLARE_OOXMLEXPORT_TEST(testFDO78887, "fdo78887.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:br[1]", 1); + assertXPathContent(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:t[1]", "Lyrics: "); + assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:br[2]", 1); +} + DECLARE_OOXMLEXPORT_TEST(testFdo78651, "fdo78651.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index aafb31cdb820..91562d743fa5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1726,6 +1726,8 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh if ( m_pRedlineData && m_pRedlineData->GetType() == nsRedlineType_t::REDLINE_DELETE ) nTextToken = XML_delText; + sal_Unicode prevUnicode = *pBegin; + for ( const sal_Unicode *pIt = pBegin; pIt < pEnd; ++pIt ) { switch ( *pIt ) @@ -1733,20 +1735,26 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh case 0x09: // tab impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); m_pSerializer->singleElementNS( XML_w, XML_tab, FSEND ); + prevUnicode = *pIt; break; case 0x0b: // line break { - if (impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt )) + if (impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ) || (prevUnicode == *pIt)) + { m_pSerializer->singleElementNS( XML_w, XML_br, FSEND ); + prevUnicode = *pIt; + } } break; case 0x1E: //non-breaking hyphen impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); m_pSerializer->singleElementNS( XML_w, XML_noBreakHyphen, FSEND ); + prevUnicode = *pIt; break; case 0x1F: //soft (on demand) hyphen impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); m_pSerializer->singleElementNS( XML_w, XML_softHyphen, FSEND ); + prevUnicode = *pIt; break; default: if ( *pIt < 0x0020 ) // filter out the control codes @@ -1754,6 +1762,7 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); OSL_TRACE( "Ignored control code %x in a text run.", *pIt ); } + prevUnicode = *pIt; break; } }