Kaydet (Commit) 70a11143 authored tarafından osnola's avatar osnola Kaydeden (comit) David Tardon

enable new file formats supported by libmwaw-0.3.7

Change-Id: I03d0f112f74dce6c307258d9765281d91cdd3a03
üst 13c8fe55
...@@ -343,6 +343,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu ...@@ -343,6 +343,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu
writer_MacWritePro \ writer_MacWritePro \
writer_Mariner_Write \ writer_Mariner_Write \
writer_MindWrite \ writer_MindWrite \
writer_MWStyle \
writer_Nisus_Writer \ writer_Nisus_Writer \
writer_TeachText \ writer_TeachText \
writer_TexEdit \ writer_TexEdit \
...@@ -405,6 +406,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters ...@@ -405,6 +406,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters
MacWrite \ MacWrite \
MacWritePro \ MacWritePro \
Mariner_Write \ Mariner_Write \
MWStyle \
MindWrite \ MindWrite \
Nisus_Writer \ Nisus_Writer \
TeachText \ TeachText \
...@@ -592,6 +594,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,f ...@@ -592,6 +594,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,f
draw_MacDrawPro \ draw_MacDrawPro \
draw_Mac_Works \ draw_Mac_Works \
draw_MacPaint \ draw_MacPaint \
draw_PixelPaint \
draw_SuperPaint \ draw_SuperPaint \
draw_PageMaker_Document \ draw_PageMaker_Document \
)) ))
...@@ -618,6 +621,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.x ...@@ -618,6 +621,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.x
MacDrawPro_Draw \ MacDrawPro_Draw \
Mac_Works_Draw \ Mac_Works_Draw \
MacPaint_Draw \ MacPaint_Draw \
PixelPaint_Draw \
SuperPaint_Draw \ SuperPaint_Draw \
PageMakerDocument \ PageMakerDocument \
)) ))
......
<!--
* 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>
<!--
* 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>
<!--
* 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>
<!--
* 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>
...@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da ...@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{ {
OdsGenerator exporter; OdsGenerator exporter;
exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType); exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter); return MWAWDocument::decodeSpreadsheet(data, &exporter);
} }
...@@ -82,10 +83,13 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O ...@@ -82,10 +83,13 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O
case MWAWDocument::MWAW_T_MICROSOFTWORKS: case MWAWDocument::MWAW_T_MICROSOFTWORKS:
rTypeName = "draw_Mac_Works"; rTypeName = "draw_Mac_Works";
break; break;
case MWAWDocument::MWAW_T_PIXELPAINT:
rTypeName = "draw_PixelPaint";
break;
case MWAWDocument::MWAW_T_SUPERPAINT: case MWAWDocument::MWAW_T_SUPERPAINT:
rTypeName = "draw_SuperPaint"; rTypeName = "draw_SuperPaint";
break; break;
case MWAWDocument::MWAW_T_RESERVED1: case MWAWDocument::MWAW_T_RESERVED1: // also MWAWDocument::MWAW_T_CLARISDRAW
rTypeName = "draw_ClarisDraw"; rTypeName = "draw_ClarisDraw";
break; break;
...@@ -119,7 +123,6 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O ...@@ -119,7 +123,6 @@ bool MWAWDrawImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, O
case MWAWDocument::MWAW_T_NISUSWRITER: case MWAWDocument::MWAW_T_NISUSWRITER:
case MWAWDocument::MWAW_T_OVERVUE: case MWAWDocument::MWAW_T_OVERVUE:
case MWAWDocument::MWAW_T_PAGEMAKER: case MWAWDocument::MWAW_T_PAGEMAKER:
case MWAWDocument::MWAW_T_PIXELPAINT:
case MWAWDocument::MWAW_T_RAGTIME: case MWAWDocument::MWAW_T_RAGTIME:
case MWAWDocument::MWAW_T_READYSETGO: case MWAWDocument::MWAW_T_READYSETGO:
case MWAWDocument::MWAW_T_SYMPOSIUM: case MWAWDocument::MWAW_T_SYMPOSIUM:
......
...@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da ...@@ -35,6 +35,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{ {
OdsGenerator exporter; OdsGenerator exporter;
exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType); exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter); return MWAWDocument::decodeSpreadsheet(data, &exporter);
} }
......
...@@ -34,6 +34,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da ...@@ -34,6 +34,7 @@ static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &da
static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
{ {
OdsGenerator exporter; OdsGenerator exporter;
exporter.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
exporter.addDocumentHandler(pHandler, streamType); exporter.addDocumentHandler(pHandler, streamType);
return MWAWDocument::decodeSpreadsheet(data, &exporter); return MWAWDocument::decodeSpreadsheet(data, &exporter);
} }
...@@ -132,6 +133,9 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr ...@@ -132,6 +133,9 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr
case MWAWDocument::MWAW_T_ZWRITE: case MWAWDocument::MWAW_T_ZWRITE:
rTypeName = "writer_ZWrite"; rTypeName = "writer_ZWrite";
break; break;
case MWAWDocument::MWAW_T_RESERVED3: // also MWAWDocument::MWAW_T_STYLE
rTypeName = "writer_MWStyle";
break;
case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR: case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
case MWAWDocument::MWAW_T_CLARISRESOLVE: case MWAWDocument::MWAW_T_CLARISRESOLVE:
...@@ -163,7 +167,6 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr ...@@ -163,7 +167,6 @@ bool MWAWImportFilter::doDetectFormat(librevenge::RVNGInputStream &rInput, OUStr
case MWAWDocument::MWAW_T_RESERVED1: case MWAWDocument::MWAW_T_RESERVED1:
case MWAWDocument::MWAW_T_RESERVED2: case MWAWDocument::MWAW_T_RESERVED2:
case MWAWDocument::MWAW_T_RESERVED3:
case MWAWDocument::MWAW_T_RESERVED4: case MWAWDocument::MWAW_T_RESERVED4:
case MWAWDocument::MWAW_T_RESERVED5: case MWAWDocument::MWAW_T_RESERVED5:
case MWAWDocument::MWAW_T_RESERVED6: case MWAWDocument::MWAW_T_RESERVED6:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment