[Libreoffice-commits] core.git: filter/Configuration_filter.mk filter/source writerperfect/source

osnola alonso at loria.fr
Sun Nov 29 05:09:07 PST 2015


 filter/Configuration_filter.mk                                |    4 +
 filter/source/config/fragments/filters/MWStyle.xcu            |   30 ++++++++++
 filter/source/config/fragments/filters/PixelPaint_Draw.xcu    |   30 ++++++++++
 filter/source/config/fragments/types/draw_PixelPaint.xcu      |   29 +++++++++
 filter/source/config/fragments/types/writer_MWStyle.xcu       |   29 +++++++++
 writerperfect/source/draw/MWAWDrawImportFilter.cxx            |    7 +-
 writerperfect/source/impress/MWAWPresentationImportFilter.cxx |    1 
 writerperfect/source/writer/MWAWImportFilter.cxx              |    5 +
 8 files changed, 132 insertions(+), 3 deletions(-)

New commits:
commit 70a11143ada618a37c2bd5c0c27947a834bc13bb
Author: osnola <alonso at loria.fr>
Date:   Thu Nov 26 09:59:54 2015 +0100

    enable new file formats supported by libmwaw-0.3.7
    
    Change-Id: I03d0f112f74dce6c307258d9765281d91cdd3a03

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 5e093ca..bf6dc92 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -343,6 +343,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu
 	writer_MacWritePro \
 	writer_Mariner_Write \
 	writer_MindWrite \
+	writer_MWStyle \
 	writer_Nisus_Writer \
 	writer_TeachText \
 	writer_TexEdit \
@@ -405,6 +406,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters
 	MacWrite \
 	MacWritePro \
 	Mariner_Write \
+	MWStyle \
 	MindWrite \
 	Nisus_Writer \
 	TeachText \
@@ -592,6 +594,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,f
 	draw_MacDrawPro \
 	draw_Mac_Works \
 	draw_MacPaint \
+	draw_PixelPaint \
 	draw_SuperPaint \
 	draw_PageMaker_Document \
 ))
@@ -618,6 +621,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.x
 	MacDrawPro_Draw \
 	Mac_Works_Draw \
 	MacPaint_Draw \
+	PixelPaint_Draw \
 	SuperPaint_Draw \
 	PageMakerDocument \
 ))
diff --git a/filter/source/config/fragments/filters/MWStyle.xcu b/filter/source/config/fragments/filters/MWStyle.xcu
new file mode 100644
index 0000000..0a6e210
--- /dev/null
+++ b/filter/source/config/fragments/filters/MWStyle.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="MWStyle" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">Style</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>writer_MWStyle</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/filters/PixelPaint_Draw.xcu b/filter/source/config/fragments/filters/PixelPaint_Draw.xcu
new file mode 100644
index 0000000..ce6c938
--- /dev/null
+++ b/filter/source/config/fragments/filters/PixelPaint_Draw.xcu
@@ -0,0 +1,30 @@
+<!--
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="PixelPaint_Draw" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">PixelPaint (v1)</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_PixelPaint</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/types/draw_PixelPaint.xcu b/filter/source/config/fragments/types/draw_PixelPaint.xcu
new file mode 100644
index 0000000..2a03ad6
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_PixelPaint.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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="draw_PixelPaint" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>dummy</value></prop>
+        <prop oor:name="MediaType"></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>PixelPaint_Draw</value></prop>
+        <prop oor:name="UIName">
+            <value>PixelPaint (v1)</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/filter/source/config/fragments/types/writer_MWStyle.xcu b/filter/source/config/fragments/types/writer_MWStyle.xcu
new file mode 100644
index 0000000..548076e
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_MWStyle.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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="writer_MWStyle" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>dummy</value></prop>
+        <prop oor:name="MediaType"></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>Style (v1)</value></prop>
+        <prop oor:name="UIName">
+            <value>Style v1 Document</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
index 8b5b21a..3e90a02 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 1abcaf6..2a7afd2 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 0f62411..214efcc 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:


More information about the Libreoffice-commits mailing list