summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorumeshkadam <umesh.kadam@synerzip.com>2014-03-11 20:42:31 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-17 09:57:41 +0100
commit881ca9d48fc67665559484901ce6a670dc331ab8 (patch)
treea76d4ed3357d33959647c43ac8118e1c1ba2a925 /oox
parent030a9bfd42184c868bcc61b91af58f70b1c02677 (diff)
FDO#76013 : If original file has image whose link is broken RT gets corrupted.
- The original file contains an image which has invalid link. - since the link is invalid the import throws an exception while loading the image & the link is lost. - while exporting the system used to write an empty image for an unhandled graphic type, which is incorrect and the RT file would result in corrupt. - Fixed this issue and added UT. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/8549 Change-Id: If884f154d1fba921280d63930e7fccb979ea5608
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index aeeff2587362..7d8ea84f3c3c 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -779,7 +779,12 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
pExtension = ".emf";
} else {
OSL_TRACE( "unhandled graphic type" );
- break;
+ /*Earlier, even in case of unhandled graphic types we were
+ proceeding to write the image, which would eventually
+ write an empty image with a zero size, and return a valid
+ relationID, which is incorrect.
+ */
+ return sRelId;
}
aData = aStream.GetData();