Blob Blame History Raw
From 0cdd8a4f17a80b55c54c1f287c1f10bd7fa4307c Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 3 Nov 2013 10:02:58 +0100
Subject: [PATCH] add config. for formats newly supported by libmwaw

Change-Id: I19cc5b13adf1c0d8cf26abbc9f4254ae89a970fc
---
 filter/Configuration_filter.mk                     |  6 +++++
 .../config/fragments/filters/Beagle_Works.xcu      | 29 ++++++++++++++++++++++
 .../config/fragments/filters/Great_Works.xcu       | 29 ++++++++++++++++++++++
 filter/source/config/fragments/filters/MacDoc.xcu  | 29 ++++++++++++++++++++++
 .../config/fragments/types/writer_Beagle_Works.xcu | 29 ++++++++++++++++++++++
 .../config/fragments/types/writer_Great_Works.xcu  | 29 ++++++++++++++++++++++
 .../config/fragments/types/writer_MacDoc.xcu       | 29 ++++++++++++++++++++++
 writerperfect/source/writer/MWAWImportFilter.cxx   |  2 +-
 8 files changed, 181 insertions(+), 1 deletion(-)
 create mode 100644 filter/source/config/fragments/filters/Beagle_Works.xcu
 create mode 100644 filter/source/config/fragments/filters/Great_Works.xcu
 create mode 100644 filter/source/config/fragments/filters/MacDoc.xcu
 create mode 100644 filter/source/config/fragments/types/writer_Beagle_Works.xcu
 create mode 100644 filter/source/config/fragments/types/writer_Great_Works.xcu
 create mode 100644 filter/source/config/fragments/types/writer_MacDoc.xcu

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 269866b..7102e27 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -304,14 +304,17 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter
 	writer_StarOffice_XML_Writer \
 	writer_WordPerfect_Document \
 	writer_MS_Works_Document \
+	writer_Beagle_Works \
 	writer_ClarisWorks \
 	writer_DocMaker \
 	writer_eDoc_Document \
 	writer_FullWrite_Professional \
+	writer_Great_Works \
 	writer_HanMac_Word_K \
 	writer_LightWayText \
 	writer_Mac_Word \
 	writer_Mac_Works \
+	writer_MacDoc \
 	writer_MacWrite \
 	writer_MacWritePro \
 	writer_Mariner_Write \
@@ -350,14 +353,17 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi
 	StarOffice_XML__Writer_ \
 	WordPerfect \
 	MS_Works \
+	Beagle_Works \
 	ClarisWorks \
 	DocMaker \
 	eDoc_Document \
 	FullWrite_Professional \
+	Great_Works \
 	HanMac_Word_K \
 	LightWayText \
 	Mac_Word \
 	Mac_Works \
+	MacDoc \
 	MacWrite \
 	MacWritePro \
 	Mariner_Write \
diff --git a/filter/source/config/fragments/filters/Beagle_Works.xcu b/filter/source/config/fragments/filters/Beagle_Works.xcu
new file mode 100644
index 0000000..f1cab85
--- /dev/null
+++ b/filter/source/config/fragments/filters/Beagle_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="Beagle Works" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">Beagle Works Document</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_Beagle_Works</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/Great_Works.xcu b/filter/source/config/fragments/filters/Great_Works.xcu
new file mode 100644
index 0000000..6090504
--- /dev/null
+++ b/filter/source/config/fragments/filters/Great_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="Great Works" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">Great Works Document</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_Great_Works</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/MacDoc.xcu b/filter/source/config/fragments/filters/MacDoc.xcu
new file mode 100644
index 0000000..70ce7d2
--- /dev/null
+++ b/filter/source/config/fragments/filters/MacDoc.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="MacDoc" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">MacDoc Document</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_MacDoc</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_Beagle_Works.xcu b/filter/source/config/fragments/types/writer_Beagle_Works.xcu
new file mode 100644
index 0000000..efe015d
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_Beagle_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="writer_Beagle_Works" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>hqx zip</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value></value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>Beagle Works</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>Beagle Works</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_Great_Works.xcu b/filter/source/config/fragments/types/writer_Great_Works.xcu
new file mode 100644
index 0000000..ff3fda0
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_Great_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="writer_Great_Works" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>hqx zip</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value></value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>Great Works</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>Great Works</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_MacDoc.xcu b/filter/source/config/fragments/types/writer_MacDoc.xcu
new file mode 100644
index 0000000..172215b
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_MacDoc.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="writer_MacDoc" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>com.sun.star.comp.Writer.MWAWImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>hqx zip</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value></value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>MacDoc</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>MacDoc</value>
+    </prop>
+</node>
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index 11d6cd8..7cfe4ab 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -169,7 +169,7 @@ throw( com::sun::star::uno::RuntimeException )
                 sTypeName = "writer_HanMac_Word_K";
                 break;
             case MWAWDocument::MWAW_T_HANMACWORDJ:
-                // sTypeName = "writer_HanMac_Word_J";
+                sTypeName = "writer_HanMac_Word_J";
                 break;
             case MWAWDocument::MWAW_T_LIGHTWAYTEXT:
                 sTypeName = "writer_LightWayText";
-- 
1.8.4.2