diff options
5 files changed, 34 insertions, 4 deletions
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index 1f7280789091..5fe58b0e3aca 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -506,6 +506,7 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,f calc8 \ calc8_template \ MS_Excel_2007_XML \ + MS_Excel_2007_VBA_XML \ MS_Excel_2007_XML_Template \ MS_Excel_2007_Binary \ calc_OOXML \ diff --git a/filter/source/config/fragments/filters/calc_MS_Excel_2007_VBA_XML.xcu b/filter/source/config/fragments/filters/calc_MS_Excel_2007_VBA_XML.xcu index afd66dbcad27..f8321358f826 100644 --- a/filter/source/config/fragments/filters/calc_MS_Excel_2007_VBA_XML.xcu +++ b/filter/source/config/fragments/filters/calc_MS_Excel_2007_VBA_XML.xcu @@ -21,7 +21,7 @@ <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="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="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop> <prop oor:name="UIName"> diff --git a/filter/source/config/fragments/types/MS_Excel_2007_VBA_XML.xcu b/filter/source/config/fragments/types/MS_Excel_2007_VBA_XML.xcu new file mode 100644 index 000000000000..17f6f0ad3e9b --- /dev/null +++ b/filter/source/config/fragments/types/MS_Excel_2007_VBA_XML.xcu @@ -0,0 +1,27 @@ +<!-- + * 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> diff --git a/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu b/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu index 42819b8d7003..b39c3c19b469 100644 --- a/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu +++ b/filter/source/config/fragments/types/MS_Excel_2007_XML.xcu @@ -18,7 +18,7 @@ <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="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="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>Calc MS Excel 2007 XML</value></prop> diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index d48d25c0f7aa..1742c919c1fc 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -178,10 +178,12 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r rContentType == "application/vnd.ms-word.template.macroEnabledTemplate.main+xml" ) return OUString( "writer_MS_Word_2007_Template" ); - if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" || - rContentType == "application/vnd.ms-excel.sheet.macroEnabled.main+xml" ) + if( rContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+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" || rContentType == "application/vnd.ms-excel.template.macroEnabled.main+xml" ) return OUString( "MS Excel 2007 XML Template" ); |