diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-12-06 16:14:12 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-12-06 16:16:28 +0100 |
commit | fa22c33794245d64056ed0f7b6260ddd60f9dc70 (patch) | |
tree | d4641c8389b0da20da5ed504cd7069e78c497c74 /writerperfect/source/filter/OdtGenerator.cxx | |
parent | 83a28682f21f7b284aa57f9c336bae551621da03 (diff) |
Allow inserting of ole objects into draw documents
Diffstat (limited to 'writerperfect/source/filter/OdtGenerator.cxx')
-rw-r--r-- | writerperfect/source/filter/OdtGenerator.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx index b6096786115b..94e46c98447f 100644 --- a/writerperfect/source/filter/OdtGenerator.cxx +++ b/writerperfect/source/filter/OdtGenerator.cxx @@ -1264,10 +1264,10 @@ void OdtGenerator::insertBinaryObject(const WPXPropertyList &propList, const WPX else // assuming we have a binary image or a object_ole that we can just insert as it is { - std::string dataType = "draw:image"; - if (propList["libwpd:mimetype"]->getStr() == "object/ole") - dataType = "draw:object-ole"; - mpImpl->mpCurrentContentElements->push_back(new TagOpenElement(dataType.c_str())); + if (propList["libwpg:mime-type"]->getStr() == "object/ole") + mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("draw:object-ole")); + else + mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("draw:image")); mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("office:binary-data")); @@ -1277,7 +1277,10 @@ void OdtGenerator::insertBinaryObject(const WPXPropertyList &propList, const WPX mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("office:binary-data")); - mpImpl->mpCurrentContentElements->push_back(new TagCloseElement(dataType.c_str())); + if (propList["libwpg:mime-type"]->getStr() == "object/ole") + mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("draw:object-ole")); + else + mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("draw:image")); } } |