summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavindra Vidhate <ravindra.vidhate@synerzip.com>2014-01-30 17:19:14 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-13 12:55:03 +0100
commitcc1c838942d4b2ae395ae7429271e48335fdee80 (patch)
treec43a66e622b20bb31fa50432c0e5056d8bfdd99b
parent3fc36ba1479b19cfe07984e87a2e25803c470d5c (diff)
fdo#74215:Fix for empty imagedata in Number Pic bullet
1. While exporting through LO, it writes numPicBullet with imagedata of size 0,0. 2. Because of this image file of 0KB is added in media folder 3. While opening the document in MS-Office, it shows the image missing at the top which is of 0 KB size. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7744 Change-Id: I5f8f187fc4fe678dceb3f2b594de74a6b52cbe74
-rw-r--r--sw/qa/extras/ooxmlexport/data/FDO74215.docxbin0 -> 24322 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx8
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/FDO74215.docx b/sw/qa/extras/ooxmlexport/data/FDO74215.docx
new file mode 100644
index 000000000000..fd2cc552efbb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/FDO74215.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 5ea7e8327bdc..5f55f19287f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3003,6 +3003,14 @@ DECLARE_OOXMLEXPORT_TEST(testFDO74106, "FDO74106.docx")
assertXPath(pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:numFmt", "val","hebrew1");
}
+DECLARE_OOXMLEXPORT_TEST(testFDO74215, "FDO74215.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/numbering.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape", "style", "width:6.4pt;height:6.4pt");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 9fd02e13f4b0..eb3c2fa91cef 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1460,7 +1460,9 @@ void MSWordExportBase::BulletDefinitions()
aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapMode);
else
aSize = OutputDevice::LogicToLogic(aSize,rGraphic.GetPrefMapMode(), aMapMode);
- AttrOutput().BulletDefinition(i, rGraphic, aSize);
+
+ if (0 != aSize.Height() && 0 != aSize.Width())
+ AttrOutput().BulletDefinition(i, rGraphic, aSize);
}
}