sw/qa/extras/ooxmlexport/data/fdo71785.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 5 +++++ sw/source/filter/ww8/docxtablestyleexport.cxx | 20 ++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-)
New commits: commit 0f6240fa92c443f66441545438821c02b3412486 Author: YogeshBharate <yogesh.bhar...@synerzip.com> Date: Fri Nov 29 18:02:54 2013 +0530 fdo#71785: File hangs LibreOffice on Save Problem Description: While saving the file LO shows the error "This file could not be save". The root cause was memory leak. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/6850 Change-Id: Iacc185780c14760056a7d690eb113d4dde1de034 diff --git a/sw/qa/extras/ooxmlexport/data/fdo71785.docx b/sw/qa/extras/ooxmlexport/data/fdo71785.docx new file mode 100644 index 0000000..e155e83 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo71785.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a7e28cf..d594627 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2123,6 +2123,11 @@ DECLARE_OOXMLEXPORT_TEST(testGlossary, "testGlossary.docx") assertXPath(pXmlDoc, "/w:glossaryDocument", "Ignorable", "w14 wp14"); } +DECLARE_OOXMLEXPORT_TEST(testFdo71785, "fdo71785.docx") +{ + // crashtest +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index fb1ddbd..255791c 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -345,7 +345,8 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu m_pSerializer->startElementNS(XML_w, XML_rPr, FSEND); - uno::Sequence<beans::PropertyValue> aRFonts, aLang, aColor; + uno::Sequence<beans::PropertyValue> aRFonts, aLang, aColor, aSpacingSequence; + bool bSequenceFlag = false ; OUString aB, aBCs, aI, aSz, aSzCs, aCaps, aSmallCaps, aSpacing; for (sal_Int32 i = 0; i < rRPr.getLength(); ++i) { @@ -370,7 +371,16 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu else if (rRPr[i].Name == "smallCaps") aSmallCaps = rRPr[i].Value.get<OUString>(); else if (rRPr[i].Name == "spacing") - aSpacing = rRPr[i].Value.get<OUString>(); + { + if (rRPr[i].Value.has<OUString>()) + { + aSpacing = rRPr[i].Value.get<OUString>(); + } + else { + aSpacingSequence = rRPr[i].Value.get< uno::Sequence<beans::PropertyValue> >() ; + bSequenceFlag = true ; // set the uno::Sequence flag. + } + } } tableStyleRRFonts(aRFonts); tableStyleRLang(aLang); @@ -380,6 +390,12 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu handleBoolean(aCaps, XML_caps); handleBoolean(aSmallCaps, XML_smallCaps); tableStyleRColor(aColor); + if(bSequenceFlag) + { + m_pSerializer->singleElementNS(XML_w, XML_spacing, + FSNS(XML_w, XML_val),OUStringToOString(aSpacingSequence[0].Value.get<OUString>(), RTL_TEXTENCODING_UTF8).getStr(), + FSEND); + } if (!aSpacing.isEmpty()) m_pSerializer->singleElementNS(XML_w, XML_spacing, FSNS(XML_w, XML_val), OUStringToOString(aSpacing, RTL_TEXTENCODING_UTF8).getStr(), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits