From 78e2af8d7141015372995a3583242998c977e829 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 18 Nov 2013 11:29:47 +0100 Subject: [PATCH] enable more formats supported by libmwaw Change-Id: I60d5ff673843236436af12f86f40916b7d266cd3 --- filter/Configuration_filter.mk | 6 ++++ .../config/fragments/filters/Beagle_Works.xcu | 4 +-- .../config/fragments/filters/Great_Works.xcu | 4 +-- filter/source/config/fragments/filters/MacDoc.xcu | 2 +- .../source/config/fragments/filters/Mac_Acta.xcu | 29 +++++++++++++++++ .../source/config/fragments/filters/Mac_More.xcu | 29 +++++++++++++++++ .../config/fragments/types/writer_Beagle_Works.xcu | 6 ++-- .../config/fragments/types/writer_Great_Works.xcu | 6 ++-- .../config/fragments/types/writer_Mac_Acta.xcu | 29 +++++++++++++++++ .../config/fragments/types/writer_Mac_More.xcu | 29 +++++++++++++++++ writerperfect/source/writer/MWAWImportFilter.cxx | 37 ++++++++++++++++++++-- 11 files changed, 167 insertions(+), 14 deletions(-) create mode 100644 filter/source/config/fragments/filters/Mac_Acta.xcu create mode 100644 filter/source/config/fragments/filters/Mac_More.xcu create mode 100644 filter/source/config/fragments/types/writer_Mac_Acta.xcu create mode 100644 filter/source/config/fragments/types/writer_Mac_More.xcu diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index bace597..347d00c 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -328,8 +328,11 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter writer_eDoc_Document \ writer_FullWrite_Professional \ writer_Great_Works \ + writer_HanMac_Word_J \ writer_HanMac_Word_K \ writer_LightWayText \ + writer_Mac_Acta \ + writer_Mac_More \ writer_Mac_Word \ writer_Mac_Works \ writer_MacDoc \ @@ -384,8 +387,11 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi eDoc_Document \ FullWrite_Professional \ Great_Works \ + HanMac_Word_J \ HanMac_Word_K \ LightWayText \ + Mac_Acta \ + Mac_More \ Mac_Word \ Mac_Works \ MacDoc \ diff --git a/filter/source/config/fragments/filters/Beagle_Works.xcu b/filter/source/config/fragments/filters/Beagle_Works.xcu index f1cab85..e2f9d4c 100644 --- a/filter/source/config/fragments/filters/Beagle_Works.xcu +++ b/filter/source/config/fragments/filters/Beagle_Works.xcu @@ -7,7 +7,7 @@ * --> - + IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED @@ -15,7 +15,7 @@ com.sun.star.comp.Writer.MWAWImportFilter - Beagle Works Document + BeagleWorks/WordPerfect Works v1 Document 0 diff --git a/filter/source/config/fragments/filters/Great_Works.xcu b/filter/source/config/fragments/filters/Great_Works.xcu index 6090504..0e5aeb3 100644 --- a/filter/source/config/fragments/filters/Great_Works.xcu +++ b/filter/source/config/fragments/filters/Great_Works.xcu @@ -7,7 +7,7 @@ * --> - + IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED @@ -15,7 +15,7 @@ com.sun.star.comp.Writer.MWAWImportFilter - Great Works Document + GreatWorks Document 0 diff --git a/filter/source/config/fragments/filters/MacDoc.xcu b/filter/source/config/fragments/filters/MacDoc.xcu index 70ce7d2..2692709 100644 --- a/filter/source/config/fragments/filters/MacDoc.xcu +++ b/filter/source/config/fragments/filters/MacDoc.xcu @@ -15,7 +15,7 @@ com.sun.star.comp.Writer.MWAWImportFilter - MacDoc Document + MacDoc v1 Document 0 diff --git a/filter/source/config/fragments/filters/Mac_Acta.xcu b/filter/source/config/fragments/filters/Mac_Acta.xcu new file mode 100644 index 0000000..c60349a --- /dev/null +++ b/filter/source/config/fragments/filters/Mac_Acta.xcu @@ -0,0 +1,29 @@ + + + + + IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED + + + com.sun.star.comp.Writer.MWAWImportFilter + + + Acta Mac Classic Document + + + 0 + + + writer_Mac_Acta + + + com.sun.star.text.TextDocument + + diff --git a/filter/source/config/fragments/filters/Mac_More.xcu b/filter/source/config/fragments/filters/Mac_More.xcu new file mode 100644 index 0000000..c2485f6 --- /dev/null +++ b/filter/source/config/fragments/filters/Mac_More.xcu @@ -0,0 +1,29 @@ + + + + + IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED + + + com.sun.star.comp.Writer.MWAWImportFilter + + + More Mac v2-3 Document + + + 0 + + + writer_Mac_More + + + com.sun.star.text.TextDocument + + diff --git a/filter/source/config/fragments/types/writer_Beagle_Works.xcu b/filter/source/config/fragments/types/writer_Beagle_Works.xcu index efe015d..5eb45c1 100644 --- a/filter/source/config/fragments/types/writer_Beagle_Works.xcu +++ b/filter/source/config/fragments/types/writer_Beagle_Works.xcu @@ -12,7 +12,7 @@ com.sun.star.comp.Writer.MWAWImportFilter - hqx zip + dummy @@ -21,9 +21,9 @@ true - Beagle Works + Beagle_Works - Beagle Works + BeagleWorks/WordPerfect Works Document diff --git a/filter/source/config/fragments/types/writer_Great_Works.xcu b/filter/source/config/fragments/types/writer_Great_Works.xcu index ff3fda0..6c448f3 100644 --- a/filter/source/config/fragments/types/writer_Great_Works.xcu +++ b/filter/source/config/fragments/types/writer_Great_Works.xcu @@ -12,7 +12,7 @@ com.sun.star.comp.Writer.MWAWImportFilter - hqx zip + dummy @@ -21,9 +21,9 @@ true - Great Works + Great_Works - Great Works + GreatWorks Document diff --git a/filter/source/config/fragments/types/writer_Mac_Acta.xcu b/filter/source/config/fragments/types/writer_Mac_Acta.xcu new file mode 100644 index 0000000..478add2 --- /dev/null +++ b/filter/source/config/fragments/types/writer_Mac_Acta.xcu @@ -0,0 +1,29 @@ + + + + + com.sun.star.comp.Writer.MWAWImportFilter + + + dummy + + + + + + true + + + Mac_Acta + + + Acta Mac v1-2 Document + + diff --git a/filter/source/config/fragments/types/writer_Mac_More.xcu b/filter/source/config/fragments/types/writer_Mac_More.xcu new file mode 100644 index 0000000..66047d5 --- /dev/null +++ b/filter/source/config/fragments/types/writer_Mac_More.xcu @@ -0,0 +1,29 @@ + + + + + com.sun.star.comp.Writer.MWAWImportFilter + + + dummy + + + + + + true + + + Mac_More + + + More Mac v2-3 Document + + diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx index 7cfe4ab..452f3a6 100644 --- a/writerperfect/source/writer/MWAWImportFilter.cxx +++ b/writerperfect/source/writer/MWAWImportFilter.cxx @@ -152,6 +152,10 @@ throw( com::sun::star::uno::RuntimeException ) switch (docType) { case MWAWDocument::MWAW_T_ACTA: + sTypeName = "writer_Mac_Acta"; + break; + case MWAWDocument::MWAW_T_BEAGLEWORKS: + sTypeName = "writer_Beagle_Works"; break; case MWAWDocument::MWAW_T_CLARISWORKS: sTypeName = "writer_ClarisWorks"; @@ -162,18 +166,24 @@ throw( com::sun::star::uno::RuntimeException ) case MWAWDocument::MWAW_T_EDOC: sTypeName = "writer_eDoc_Document"; break; + case MWAWDocument::MWAW_T_GREATWORKS: + sTypeName = "writer_Great_Works"; + break; case MWAWDocument::MWAW_T_FULLWRITE: sTypeName = "writer_FullWrite_Professional"; break; - case MWAWDocument::MWAW_T_HANMACWORDK: - sTypeName = "writer_HanMac_Word_K"; - break; case MWAWDocument::MWAW_T_HANMACWORDJ: sTypeName = "writer_HanMac_Word_J"; break; + case MWAWDocument::MWAW_T_HANMACWORDK: + sTypeName = "writer_HanMac_Word_K"; + break; case MWAWDocument::MWAW_T_LIGHTWAYTEXT: sTypeName = "writer_LightWayText"; break; + case MWAWDocument::MWAW_T_MACDOC: + sTypeName = "writer_MacDoc"; + break; case MWAWDocument::MWAW_T_MARINERWRITE: sTypeName = "writer_Mariner_Write"; break; @@ -192,6 +202,9 @@ throw( com::sun::star::uno::RuntimeException ) case MWAWDocument::MWAW_T_MICROSOFTWORKS: sTypeName = "writer_Mac_Works"; break; + case MWAWDocument::MWAW_T_MORE: + sTypeName = "writer_Mac_More"; + break; case MWAWDocument::MWAW_T_NISUSWRITER: sTypeName = "writer_Nisus_Writer"; break; @@ -210,6 +223,24 @@ throw( com::sun::star::uno::RuntimeException ) case MWAWDocument::MWAW_T_ZWRITE: sTypeName = "writer_ZWrite"; break; + + case MWAWDocument::MWAW_T_FRAMEMAKER: + case MWAWDocument::MWAW_T_MACDRAW: + case MWAWDocument::MWAW_T_MACPAINT: + case MWAWDocument::MWAW_T_PAGEMAKER: + case MWAWDocument::MWAW_T_READYSETGO: + case MWAWDocument::MWAW_T_RAGTIME: + case MWAWDocument::MWAW_T_XPRESS: + 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: + case MWAWDocument::MWAW_T_RESERVED7: + case MWAWDocument::MWAW_T_RESERVED8: + case MWAWDocument::MWAW_T_RESERVED9: + case MWAWDocument::MWAW_T_UNKNOWN: default: break; } -- 1.8.4.2