[Libreoffice-commits] core.git: Changes to 'refs/changes/77/9377/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/77/9377/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/89/8589/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/89/8589/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/8561/3'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/8561/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/9145/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/46/9746/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/9145/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/33/9433/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/33/9433/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/59/9559/3'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/59/9559/4'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/59/9559/5'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/59/9559/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/59/9559/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/9414/1'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/9414/2'

2014-09-29 Thread Dinesh Patil

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sw/qa sw/source

2014-06-20 Thread Dinesh Patil
 oox/source/export/vmlexport.cxx |2 +-
 sw/qa/extras/ooxmlexport/data/fdo79591.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx |   15 +++
 sw/source/filter/ww8/docxsdrexport.cxx  |2 +-
 4 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 7ea1bbe712cef48a97faffdf03b45f2812a93e62
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Thu Jun 12 11:34:32 2014 +0530

fdo#79591 Values for docPr name and shape ID attributes were set invalid

Values set for docPr name and shape ID attributes in RT file were not valid
as per UTF-8 encoding format and hence was showing RT document as corrupt 
with
error message invalid character.

Calling add() function with current parameters is causing issue and
setting invalid values so modified the second parameter which will
set valid values to the specified parameters.

Reviewed on:
https://gerrit.libreoffice.org/9746

Change-Id: I3b48e53adbe5ed844235e596bb98eb396133845a

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 490bc7b..69242d6 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -821,7 +821,7 @@ void VMLExport::Commit( EscherPropertyContainer rProps, 
const Rectangle rRect
 OUString idStr = 
SvxMSDffManager::MSDFFReadZString(aStream, it-nPropSize, true);
 aStream.Seek(0);
 if (!IsWaterMarkShape(m_pSdrObject-GetName()))
- m_pShapeAttrList-add(XML_ID, 
OUStringToOString(idStr, RTL_TEXTENCODING_UTF8));
+ m_pShapeAttrList-add(XML_ID, 
OUStringToOString(idStr, RTL_TEXTENCODING_UTF8).getStr());
 
 bAlreadyWritten[ESCHER_Prop_wzName] = true;
 }
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79591.docx 
b/sw/qa/extras/ooxmlexport/data/fdo79591.docx
new file mode 100644
index 000..32a61de
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79591.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 25a6cf7..20ee7c3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1811,6 +1811,21 @@ DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, 
textbox-rounded-corners.doc
 CPPUNIT_ASSERT_EQUAL(OUString(a), xCell-getString());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo79591, fdo79591.docx)
+{
+/* Values set for docPr name and shape ID attributes
+ * in RT file were not valid as per UTF-8 encoding format
+ * and hence was showing RT document as corrupt with error
+ * message invalid character
+ */
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+  return;
+
+assertXPath(pXmlDoc, 
/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr,
 name, );
+assertXPath(pXmlDoc, 
/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape, 
ID, );
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 42e9f9c..d3efe2a 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -724,7 +724,7 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* 
pSdrObject, const SwFrmFmt*
 
 sax_fastparser::FastAttributeList* pDocPrAttrList = pFS-createAttrList();
 pDocPrAttrList-add(XML_id, OString::number(nAnchorId).getStr());
-pDocPrAttrList-add(XML_name, OUStringToOString(pSdrObject-GetName(), 
RTL_TEXTENCODING_UTF8));
+pDocPrAttrList-add(XML_name, OUStringToOString(pSdrObject-GetName(), 
RTL_TEXTENCODING_UTF8).getStr());
 if (!pSdrObject-GetTitle().isEmpty())
 pDocPrAttrList-add(XML_title, 
OUStringToOString(pSdrObject-GetTitle(), RTL_TEXTENCODING_UTF8));
 if (!pSdrObject-GetDescription().isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sw/qa

2014-06-06 Thread Dinesh Patil
 oox/source/export/drawingml.cxx |5 +
 sw/qa/extras/ooxmlexport/data/fdo79256.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx |   14 ++
 3 files changed, 19 insertions(+)

New commits:
commit 80ef7a645a8118976a4366135faa41bceda423be
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Thu May 29 15:26:46 2014 +0530

fdo#79256 Line Style with Long Dashes and dots is getting corrupt after RT

Description:
In RT file the dash length (d) is going out of range,
as after RT the dashing scheme changes to custom dash
which was causing the corruption. Changed code at export,
which will divide the DashLen, DotLen and Distance by
base line width.

Reviewed on:
https://gerrit.libreoffice.org/9559

Change-Id: I0e644b5a2b692a9e717026a14d1f0058199f53b1

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 6703669..42d007a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -628,6 +628,11 @@ void DrawingML::WriteOutline( Reference XPropertySet  
rXPropSet )
 // line style is a dash and it was not set by the shape style
 // TODO: the XML_d and XML_sp values seem insane
 mpFS-startElementNS( XML_a, XML_custDash, FSEND );
+
+aLineDash.DotLen = aLineDash.DotLen / nLineWidth;
+aLineDash.DashLen = aLineDash.DashLen / nLineWidth;
+aLineDash.Distance = aLineDash.Distance / nLineWidth;
+
 int i;
 for( i = 0; i  aLineDash.Dots; i ++ )
 mpFS-singleElementNS( XML_a, XML_ds,
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79256.docx 
b/sw/qa/extras/ooxmlexport/data/fdo79256.docx
new file mode 100644
index 000..2358abb
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79256.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index ad5b49b..0eccae3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1628,6 +1628,20 @@ DECLARE_OOXMLEXPORT_TEST(testFdo78957, fdo78957.docx)
 CPPUNIT_ASSERT(cy = 0 );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo79256, fdo79256.docx)
+{
+/* Corruption issue containing Line Style with Long Dashes and Dots
+ * After RT checking the Dash Length value. Dash Length value should not 
be greater than 2147483.
+ */
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+
+const sal_Int32 maxLimit = 2147483;
+sal_Int32 d = 
getXPath(pXmlDoc,/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1],d).toInt32();
+CPPUNIT_ASSERT(d = maxLimit );
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/qa sw/source

2014-05-26 Thread Dinesh Patil
 sw/qa/extras/ooxmlexport/data/fdo79008.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx|   11 ++-
 sw/source/filter/ww8/wrtw8esh.cxx   |2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit ae95cdd2a1708a8e9e114dd9bcf577f57f1f5af3
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Wed May 21 19:32:54 2014 +0530

fdo#79008 Crash: File getting crash while saving in LO

File is getting crashed while saving in LO, as it tries
to access the value of vector after erasing that value.
Code changed to access the vector value first and
then erase that value from vector.

Change-Id: I29369b7582fdbd7363d0e6fdae091a30c79a747d
Reviewed-on: https://gerrit.libreoffice.org/9433
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com
(cherry picked from commit ed3fd76b65b2a281effea55b8a55101a8b740aec)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx

diff --git a/sw/qa/extras/ooxmlexport/data/fdo79008.docx 
b/sw/qa/extras/ooxmlexport/data/fdo79008.docx
new file mode 100644
index 000..2b17587
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79008.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index ee5f974..f6c3591 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2057,7 +2057,16 @@ DECLARE_OOXMLEXPORT_TEST(testFDO78384,fdo78384.docx)
 }
 #endif
 
-CPPUNIT_PLUGIN_IMPLEMENT();
+DECLARE_OOXMLEXPORT_TEST(testfdo79008, fdo79008.docx)
+{
+/* File getting crash while saving in LO.
+ * Checking if document.xml file is getting created after fix
+ */
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+}
 
+CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 9729d23..b3b6c11 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1145,8 +1145,8 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib 
rAttr, bool bStart)
std::find( aChrTxtAtrArr.begin(), aChrTxtAtrArr.end(), rAttr );
 if ( it != aChrTxtAtrArr.end() )
 {
-aChrTxtAtrArr.erase( it );
 aChrSetArr.erase( aChrSetArr.begin() + (it - 
aChrTxtAtrArr.begin()) );
+aChrTxtAtrArr.erase( it );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2014-05-22 Thread Dinesh Patil
 sw/qa/extras/ooxmlexport/data/fdo78886.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |9 +
 sw/source/filter/ww8/docxattributeoutput.cxx |1 +
 3 files changed, 10 insertions(+)

New commits:
commit c5547beb47e6eb94cf917a319fcc426a36fed7af
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Tue May 20 15:29:27 2014 +0530

fdo#78886 File getting corrupted after Roundtrip due to fieldChar

In a hyperlink, extra field with fldCharType=end is getting added
even though there is no begin and separate fldCharType. When hyperlink is
closing pageref was not set to false. Due to which LO was adding extra
end fldCharType.

Change-Id: I0f54ab03c38cec2888cf9a1638ec5435da90099c
Reviewed-on: https://gerrit.libreoffice.org/9414
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/sw/qa/extras/ooxmlexport/data/fdo78886.docx 
b/sw/qa/extras/ooxmlexport/data/fdo78886.docx
new file mode 100644
index 000..e364948
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78886.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 16d13a2..a039e0b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3437,6 +3437,15 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78300,fdo78300.docx)
 0);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo78886, fdo78886.docx)
+{
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+
+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(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 fb5933d..aafb31c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -802,6 +802,7 @@ void DocxAttributeOutput::EndRun()
 }
 m_pSerializer-endElementNS( XML_w, XML_hyperlink );
 m_startedHyperlink = false;
+m_endPageRef = false;
 m_nHyperLinkCount--;
 }
 m_closeHyperlinkInPreviousRun = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2014-05-22 Thread Dinesh Patil
 sw/qa/extras/ooxmlexport/data/fdo79008.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx|   10 ++
 sw/source/filter/ww8/wrtw8esh.cxx   |2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ed3fd76b65b2a281effea55b8a55101a8b740aec
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Wed May 21 19:32:54 2014 +0530

fdo#79008 Crash: File getting crash while saving in LO

File is getting crashed while saving in LO, as it tries
to access the value of vector after erasing that value.
Code changed to access the vector value first and
then erase that value from vector.

Change-Id: I29369b7582fdbd7363d0e6fdae091a30c79a747d
Reviewed-on: https://gerrit.libreoffice.org/9433
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/sw/qa/extras/ooxmlexport/data/fdo79008.docx 
b/sw/qa/extras/ooxmlexport/data/fdo79008.docx
new file mode 100644
index 000..2b17587
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79008.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index b4a002c..562541d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3124,6 +3124,16 @@ DECLARE_OOXMLEXPORT_TEST(testfdo76589 , fdo76589.docx)
 assertXPath ( pXmlDoc, 
/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText,val,%1 );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo79008, fdo79008.docx)
+{
+/* File getting crash while saving in LO.
+ * Checking if document.xml file is getting created after fix
+ */
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+}
+
 DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, author-property.docx)
 {
 xmlDocPtr pXmlDoc = parseExport(word/document.xml);
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 0e0b141..858a721 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1134,8 +1134,8 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib 
rAttr, bool bStart)
std::find( aChrTxtAtrArr.begin(), aChrTxtAtrArr.end(), rAttr );
 if ( it != aChrTxtAtrArr.end() )
 {
-aChrTxtAtrArr.erase( it );
 aChrSetArr.erase( aChrSetArr.begin() + (it - 
aChrTxtAtrArr.begin()) );
+aChrTxtAtrArr.erase( it );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sw/qa

2014-05-20 Thread Dinesh Patil
 oox/source/drawingml/shape.cxx  |6 ++
 sw/qa/extras/ooxmlexport/data/fdo78658.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx|9 +
 3 files changed, 15 insertions(+)

New commits:
commit df973e6e950591c0c36f2761e43ec23b9964
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Fri May 16 16:05:47 2014 +0530

fdo#78658 Corruption: lockedCanvas tag is missing from RT file

While export, locked Canvas is missing and drawing is
exported inside textbox. However a locked Canvas has to be exported
inside a text-box and drawing should fall under locked Canvas
for the RT file to work in MS Office 2010.

Reviewed on:
https://gerrit.libreoffice.org/9377

Change-Id: Iea2c411302b552db18527001cc4c6d0290085afe

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 33c846c..ca42d4a 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -962,6 +962,12 @@ Reference XShape  Shape::createAndInsert(
 }
 }
 
+else if( mbLockedCanvas )
+{
+//If we have aServiceName as com.sun.star.drawing.GroupShape and 
lockedCanvas
+putPropertyToGrabBag( LockedCanvas, Any( true ) );
+}
+
 // These can have a custom geometry, so position should be set here,
 // after creation but before custom shape handling, using the position
 // we got from the caller.
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78658.docx 
b/sw/qa/extras/ooxmlexport/data/fdo78658.docx
new file mode 100644
index 000..1c0782e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78658.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 90021c5..f69396f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2984,6 +2984,15 @@ DECLARE_OOXMLEXPORT_TEST(testFdo76016, fdo76016.docx)
 assertXPath(pXmlDoc, 
//a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2], 
name, adj2);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testLockedCanvas, fdo78658.docx)
+{
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+// Checking for lockedCanvas tag
+assertXPath(pXmlDoc, 
/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1],
 1);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testFileWithInvalidImageLink, 
FileWithInvalidImageLink.docx)
 {
 /* In case if the original file has an image whose link is
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2014-04-28 Thread Dinesh Patil
 sw/qa/extras/ooxmlexport/data/FDO77715.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx|9 +
 sw/source/filter/ww8/ww8atr.cxx |   12 
 3 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit c865de60a769cc99c25050652aaad751771b2249
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Wed Apr 23 13:29:29 2014 +0530

fdo#77715: Fix for TOC flag field \c

Description:
If SEQIdentifier for TOC field \c is not there then blank  are getting 
added
due to which opening of RT file in LO was causing system hang.

Implementation:
1) Check added for SEQIdentifier, if found then add SEQIdentifier with 
e.g. {TOC \c SEQ}
2) If SEQIdentifier not found then don't add 
e.g. {TOC \c}

Change-Id: I9dbfa1db51358908b246456201428de8b4104e10
Reviewed-on: https://gerrit.libreoffice.org/9145
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/sw/qa/extras/ooxmlexport/data/FDO77715.docx 
b/sw/qa/extras/ooxmlexport/data/FDO77715.docx
new file mode 100644
index 000..f93a46e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/FDO77715.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 18f91a8..f33771f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2248,6 +2248,15 @@ DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, 
PreserveXfieldTOC.docx)
 assertXPathContent(pXmlDoc, /w:document/w:body/w:p/w:r[2]/w:instrText,  
TOC \\x \\f \\o \1-3\ \\h);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testFDO77715,FDO77715.docx)
+{
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+
+assertXPathContent(pXmlDoc, 
/w:document/w:body/w:p[3]/w:r[2]/w:instrText[1],  TOC \\c );
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTrackChangesParagraphProperties, 
testTrackChangesParagraphProperties.docx)
 {
 xmlDocPtr pXmlDoc = parseExport(word/document.xml);
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 839d70c..b82ea5c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2172,10 +2172,14 @@ void AttributeOutputBase::StartTOX( const SwSection 
rSect )
 {
 sStr = FieldString(eCode);
 
-sStr += \\c \;
-sStr += pTOX-GetSequenceName();
-sStr += sEntryEnd;
-
+sStr += \\c ;
+OUString seqName = pTOX-GetSequenceName();
+if(!seqName.isEmpty())
+{
+sStr += \;
+sStr += seqName;
+sStr += sEntryEnd;
+}
 OUString aTxt;
 int nRet = ::lcl_CheckForm( pTOX-GetTOXForm(), 1, aTxt );
 if (1 == nRet)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa writerfilter/source

2014-03-17 Thread Dinesh Patil
 sw/qa/extras/ooxmlexport/data/99_Fields.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |   11 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |1 +
 3 files changed, 12 insertions(+)

New commits:
commit 4c1cdd43de6e45726054fffb4b8c80ef9269f24a
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Fri Mar 14 16:56:17 2014 +0530

fdo#76109: LO Crashes while opening the docx file containing three fields

- DOCX file containing fields BIBLIOGRAPHY on first line, BIDIOUTLINE on
  second line and CITATION on third line is getting crashed while opening 
in LO
- Fixed this issue and added unit test case for the same.

Change-Id: Ia8394a3a26157f88693edcf60b0161947d8a9ac0
Reviewed-on: https://gerrit.libreoffice.org/8589
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/sw/qa/extras/ooxmlexport/data/99_Fields.docx 
b/sw/qa/extras/ooxmlexport/data/99_Fields.docx
new file mode 100644
index 000..e0ee431
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/99_Fields.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0bc7d60..f312494 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2719,6 +2719,17 @@ DECLARE_OOXMLEXPORT_TEST(test_OpeningBrace, 
2120112713_OpenBrace.docx)
 assertXPath(pXmlDoc, 
/w:document/w:body/w:p[1]/m:oMath[1]/m:d[1]/m:dPr[1]/m:begChr[1],val,);
 }
 
+DECLARE_OOXMLEXPORT_TEST(test_FieldType, 99_Fields.docx)
+{
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+// Checking for three field types (BIBLIOGRAPHY, BIDIOUTLINE, CITATION) in 
sequence
+assertXPath(pXmlDoc, 
/w:document[1]/w:body[1]/w:p[2]/w:r[2]/w:instrText[1],1);
+assertXPath(pXmlDoc, 
/w:document[1]/w:body[1]/w:p[5]/w:r[2]/w:instrText[1],1);
+assertXPath(pXmlDoc, 
/w:document[1]/w:body[1]/w:p[6]/w:r[2]/w:instrText[1],1);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testComboBoxControl, combobox-control.docx)
 {
 // check XML
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2d647fc..a5c954b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3869,6 +3869,7 @@ void DomainMapper_Impl::PopFieldContext()
 {
 m_bStartedTOC = false;
 m_aTextAppendStack.pop();
+m_bTextInserted = false;
 }
 m_bStartTOC = false;
 m_bStartIndex = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: starmath/source sw/qa

2014-03-13 Thread Dinesh Patil
 starmath/source/ooxmlexport.cxx |   21 
 sw/qa/extras/inc/swmodeltestbase.hxx|1 
 sw/qa/extras/ooxmlexport/data/2120112713.docx   |binary
 sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx|   18 +
 5 files changed, 36 insertions(+), 4 deletions(-)

New commits:
commit ade1641ab632565820ede720b6151435aca4dd78
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Wed Mar 12 20:04:16 2014 +0530

fdo#76078: LO Crashes while saving the docx file containing only opening 
brace

- System handles an equation having opening brace and closing brace.
- Whereas it fails to handle equations having only opening brace and no 
closing
  brace, due to which LO crashes with assertion while exporting.
- Fixed this issue and added unit test case for the same.
- Also fixed the same for closing brace alone.

Change-Id: I34a8a635b42bfdfac265fb70b977c0001cd2b4ff
Reviewed-on: https://gerrit.libreoffice.org/8561
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index 8d1c808..0a98d98 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -453,8 +453,15 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, 
int nLevel )
 {
 m_pSerializer-startElementNS( XML_m, XML_d, FSEND );
 m_pSerializer-startElementNS( XML_m, XML_dPr, FSEND );
-m_pSerializer-singleElementNS( XML_m, XML_begChr,
-FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-OpeningBrace()).getStr(), FSEND );
+
+//check if the node has an opening brace
+if( TNONE == pNode-GetSubNode(0)-GetToken().eType )
+m_pSerializer-singleElementNS( XML_m, XML_begChr,
+FSNS( XML_m, XML_val ), , FSEND );
+else
+m_pSerializer-singleElementNS( XML_m, XML_begChr,
+FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-OpeningBrace()).getStr(), FSEND );
+
 std::vector const SmNode*  subnodes;
 if( pNode-Body()-GetType() == NBRACEBODY )
 {
@@ -479,8 +486,14 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, 
int nLevel )
 }
 else
 subnodes.push_back( pNode-Body());
-m_pSerializer-singleElementNS( XML_m, XML_endChr,
-FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-ClosingBrace()).getStr(), FSEND );
+
+if( TNONE == pNode-GetSubNode(2)-GetToken().eType )
+m_pSerializer-singleElementNS( XML_m, XML_endChr,
+FSNS( XML_m, XML_val ), , FSEND );
+else
+m_pSerializer-singleElementNS( XML_m, XML_endChr,
+FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-ClosingBrace()).getStr(), FSEND );
+
 m_pSerializer-endElementNS( XML_m, XML_dPr );
 for( unsigned int i = 0; i  subnodes.size(); ++i )
 {
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx 
b/sw/qa/extras/inc/swmodeltestbase.hxx
index a3c3dec..d2f3b29 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -551,6 +551,7 @@ protected:
 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST(pic), 
BAD_CAST(http://schemas.openxmlformats.org/drawingml/2006/picture;));
 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST(rels), 
BAD_CAST(http://schemas.openxmlformats.org/package/2006/relationships;));
 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST(w14), 
BAD_CAST(http://schemas.microsoft.com/office/word/2010/wordml;));
+xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST(m), 
BAD_CAST(http://schemas.openxmlformats.org/officeDocument/2006/math;));
 xmlXPathObjectPtr pXmlXpathObj = 
xmlXPathEvalExpression(BAD_CAST(rXPath.getStr()), pXmlXpathCtx);
 return pXmlXpathObj-nodesetval;
 }
diff --git a/sw/qa/extras/ooxmlexport/data/2120112713.docx 
b/sw/qa/extras/ooxmlexport/data/2120112713.docx
new file mode 100644
index 000..5de6378
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/2120112713.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx 
b/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx
new file mode 100644
index 000..10dfd31
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/2120112713_OpenBrace.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 045d41e..a0ea664 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2710,6 +2710,15 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, 
date-control.docx)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(2014), sal_Int32(aDate.Year));
 }
 
+DECLARE_OOXMLEXPORT_TEST(test_OpeningBrace, 2120112713_OpenBrace.docx)
+{
+xmlDocPtr pXmlDoc = parseExport(word/document.xml);
+if (!pXmlDoc)
+return;
+// Checking for OpeningBrace tag
+assertXPath(pXmlDoc

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - starmath/source

2014-03-13 Thread Dinesh Patil
 starmath/source/ooxmlexport.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit cde6d800698522a804dc8f82c158ce7e0c3e05f5
Author: Dinesh Patil dinesh.pa...@synerzip.com
Date:   Wed Mar 12 20:04:16 2014 +0530

fdo#76078: LO Crashes while saving the docx file containing only opening 
brace

- System handles an equation having opening brace and closing brace.
- Whereas it fails to handle equations having only opening brace and no 
closing
  brace, due to which LO crashes with assertion while exporting.
- Fixed this issue and added unit test case for the same.
- Also fixed the same for closing brace alone.

Reviewed-on: https://gerrit.libreoffice.org/8561
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

(cherry picked from commit ade1641ab632565820ede720b6151435aca4dd78)
Signed-off-by: Michael Stahl mst...@redhat.com

Conflicts:
sw/qa/extras/inc/swmodeltestbase.hxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I34a8a635b42bfdfac265fb70b977c0001cd2b4ff

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index 8d1c808..0a98d98 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -453,8 +453,15 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, 
int nLevel )
 {
 m_pSerializer-startElementNS( XML_m, XML_d, FSEND );
 m_pSerializer-startElementNS( XML_m, XML_dPr, FSEND );
-m_pSerializer-singleElementNS( XML_m, XML_begChr,
-FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-OpeningBrace()).getStr(), FSEND );
+
+//check if the node has an opening brace
+if( TNONE == pNode-GetSubNode(0)-GetToken().eType )
+m_pSerializer-singleElementNS( XML_m, XML_begChr,
+FSNS( XML_m, XML_val ), , FSEND );
+else
+m_pSerializer-singleElementNS( XML_m, XML_begChr,
+FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-OpeningBrace()).getStr(), FSEND );
+
 std::vector const SmNode*  subnodes;
 if( pNode-Body()-GetType() == NBRACEBODY )
 {
@@ -479,8 +486,14 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, 
int nLevel )
 }
 else
 subnodes.push_back( pNode-Body());
-m_pSerializer-singleElementNS( XML_m, XML_endChr,
-FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-ClosingBrace()).getStr(), FSEND );
+
+if( TNONE == pNode-GetSubNode(2)-GetToken().eType )
+m_pSerializer-singleElementNS( XML_m, XML_endChr,
+FSNS( XML_m, XML_val ), , FSEND );
+else
+m_pSerializer-singleElementNS( XML_m, XML_endChr,
+FSNS( XML_m, XML_val ), mathSymbolToString( 
pNode-ClosingBrace()).getStr(), FSEND );
+
 m_pSerializer-endElementNS( XML_m, XML_dPr );
 for( unsigned int i = 0; i  subnodes.size(); ++i )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits