summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorosnola <alonso@loria.fr>2015-11-26 09:59:54 +0100
committerDavid Tardon <dtardon@redhat.com>2015-11-29 14:08:38 +0100
commit70a11143ada618a37c2bd5c0c27947a834bc13bb (patch)
treee3f8983705de1195febefcb431fc3435358f3ac5 /writerperfect
parent13c8fe55de98560e136b741addbf8f78fd934bd5 (diff)
enable new file formats supported by libmwaw-0.3.7
Change-Id: I03d0f112f74dce6c307258d9765281d91cdd3a03
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/draw/MWAWDrawImportFilter.cxx7
-rw-r--r--writerperfect/source/impress/MWAWPresentationImportFilter.cxx1
-rw-r--r--writerperfect/source/writer/MWAWImportFilter.cxx5
3 files changed, 10 insertions, 3 deletions
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
index 8b5b21acb6be..3e90a026859c 100644
--- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{
OdsGenerator exporter;
+ exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
@@ -82,10 +83,13 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O
case MWAWDocument::MWAW_T_MICROSOFTWORKS:
rTypeName = "draw_Mac_Works";
break;
+ case MWAWDocument::MWAW_T_PIXELPAINT:
+ rTypeName = "draw_PixelPaint";
+ break;
case MWAWDocument::MWAW_T_SUPERPAINT:
rTypeName = "draw_SuperPaint";
break;
- case MWAWDocument::MWAW_T_RESERVED1:
+ case MWAWDocument::MWAW_T_RESERVED1: // also MWAWDocument::MWAW_T_CLARISDRAW
rTypeName = "draw_ClarisDraw";
break;
@@ -119,7 +123,6 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O
case MWAWDocument::MWAW_T_NISUSWRITER:
case MWAWDocument::MWAW_T_OVERVUE:
case MWAWDocument::MWAW_T_PAGEMAKER:
- case MWAWDocument::MWAW_T_PIXELPAINT:
case MWAWDocument::MWAW_T_RAGTIME:
case MWAWDocument::MWAW_T_READYSETGO:
case MWAWDocument::MWAW_T_SYMPOSIUM:
diff --git a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
index 1abcaf6548a0..2a7afd257c43 100644
--- a/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
+++ b/writerperfect/source/impress/MWAWPresentationImportFilter.cxx
@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{
OdsGenerator exporter;
+ exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index 0f624118fab1..214efcc38d5d 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -34,6 +34,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{
OdsGenerator exporter;
+ exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter);
}
@@ -132,6 +133,9 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr
case MWAWDocument::MWAW_T_ZWRITE:
rTypeName = "writer_ZWrite";
break;
+ case MWAWDocument::MWAW_T_RESERVED3: // also MWAWDocument::MWAW_T_STYLE
+ rTypeName = "writer_MWStyle";
+ break;
case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
case MWAWDocument::MWAW_T_CLARISRESOLVE:
@@ -163,7 +167,6 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr
case MWAWDocument::MWAW_T_RESERVED1:
case MWAWDocument::MWAW_T_RESERVED2:
- case MWAWDocument::MWAW_T_RESERVED3:
case MWAWDocument::MWAW_T_RESERVED4:
case MWAWDocument::MWAW_T_RESERVED5:
case MWAWDocument::MWAW_T_RESERVED6: