Kaydet (Commit) e72e8c59 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

OOXML with VBA needs to be a different filter type

The filter type also contains the file format, so we need to use a
different type to keep the xlsm extension during export.

Now the only missing part is the warning that saving as the non-VBA
version will loose the VBA stream.

Change-Id: I11f78d2c33cb2834086a4e9fad141b3e374b8991
üst c6726bdb
...@@ -506,6 +506,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,f ...@@ -506,6 +506,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,f
calc8 \ calc8 \
calc8_template \ calc8_template \
MS_Excel_2007_XML \ MS_Excel_2007_XML \
MS_Excel_2007_VBA_XML \
MS_Excel_2007_XML_Template \ MS_Excel_2007_XML_Template \
MS_Excel_2007_Binary \ MS_Excel_2007_Binary \
calc_OOXML \ calc_OOXML \
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.oox.xls.ExcelFilter</value></prop> <prop oor:name="FilterService"><value>com.sun.star.comp.oox.xls.ExcelFilter</value></prop>
<prop oor:name="UserData"><value>macro-enabled</value></prop> <prop oor:name="UserData"><value>macro-enabled</value></prop>
<prop oor:name="FileFormatVersion"/> <prop oor:name="FileFormatVersion"/>
<prop oor:name="Type"><value>MS Excel 2007 XML</value></prop> <prop oor:name="Type"><value>MS Excel 2007 VBA XML</value></prop>
<prop oor:name="TemplateName"/> <prop oor:name="TemplateName"/>
<prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop> <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
<prop oor:name="UIName"> <prop oor:name="UIName">
......
<!--
* 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="MS Excel 2007 VBA XML" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>xlsm</value></prop>
<prop oor:name="MediaType"><value>application/vnd.ms-excel.sheet.macroEnabled.12</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>Calc MS Excel 2007 VBA XML</value></prop>
<prop oor:name="UIName"><value xml:lang="en-US">Microsoft Excel 2007-2016 VBA XML</value></prop>
<prop oor:name="ClipboardFormat"/>
</node>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<node oor:name="MS Excel 2007 XML" oor:op="replace" > <node oor:name="MS Excel 2007 XML" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop> <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
<prop oor:name="URLPattern"/> <prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>xlsx xlsm</value></prop> <prop oor:name="Extensions"><value>xlsx</value></prop>
<prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</value></prop>
<prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>Calc MS Excel 2007 XML</value></prop> <prop oor:name="PreferredFilter"><value>Calc MS Excel 2007 XML</value></prop>
......
...@@ -178,10 +178,12 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r ...@@ -178,10 +178,12 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r
rContentType == "application/vnd.ms-word.template.macroEnabledTemplate.main+xml" ) rContentType == "application/vnd.ms-word.template.macroEnabledTemplate.main+xml" )
return OUString( "writer_MS_Word_2007_Template" ); return OUString( "writer_MS_Word_2007_Template" );
if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" || if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")
rContentType == "application/vnd.ms-excel.sheet.macroEnabled.main+xml" )
return OUString( "MS Excel 2007 XML" ); return OUString( "MS Excel 2007 XML" );
if (rContentType == "application/vnd.ms-excel.sheet.macroEnabled.main+xml")
return OUString( "MS Excel 2007 VBA XML" );
if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" || if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ||
rContentType == "application/vnd.ms-excel.template.macroEnabled.main+xml" ) rContentType == "application/vnd.ms-excel.template.macroEnabled.main+xml" )
return OUString( "MS Excel 2007 XML Template" ); return OUString( "MS Excel 2007 XML Template" );
......
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