diff options
author | Bisal Singh Nayal <bisal.nayal@synerzip.com> | 2014-05-07 20:03:11 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-20 05:12:08 -0500 |
commit | ee0bb265c90a135afa53c0fa6a586996e67640fa (patch) | |
tree | 9e12282272f051d88d8376f8dcd46d9a58950f00 /oox | |
parent | 23e9f36a21f7daa6175f53fd244677b9c2e2a660 (diff) |
fdo#78290 : The File gets corrupted when saved in LO
Problem Description: Docx file containing a chart (line chart / scatter chart)which has used a builtin
marker'x' gets corrupted when we save it in LO.The reason was that while exporting LO was writing the
marker information 'x' as 'X' which MS Word doesn't recognize.‒<c:marker><c:symbol val="X" />. Also
the size of the marker was coming 1 less than the actual value. Ex: if size is 7 then it was being
written as 6.
Solution: During export I have made changes so that now LO writes 'x' in the tag information
‒<c:marker> <c:symbol val="x" />. Now the size of the marker is also being correctly exported.
Change-Id: I26b747f9576625bf3acb941322ae418a0bbc6b64
Reviewed-on: https://gerrit.libreoffice.org/9273
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 68bb9f0c2e7c..48c8fc5a5617 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -3000,7 +3000,7 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries) pSymbolType = "star"; break; case 10: - pSymbolType = "X"; + pSymbolType = "x"; // in MS office 2010 built in symbol marker 'X' is represented as 'x' break; case 11: pSymbolType = "plus"; @@ -3023,7 +3023,8 @@ void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries) awt::Size aSymbolSize = aSymbol.Size; sal_Int32 nSize = std::max( aSymbolSize.Width, aSymbolSize.Height ); - nSize = nSize/250.0*7.0; // just guessed based on some test cases + nSize = nSize/250.0*7.0 + 1; // just guessed based on some test cases, + //the value is always 1 less than the actual value. nSize = std::min<sal_Int32>( 72, std::max<sal_Int32>( 2, nSize ) ); pFS->singleElement( FSNS( XML_c, XML_size), XML_val, I32S(nSize), |