filter/source/config/fragments/types/calc_OOXML.xcu          |    2 +-
 filter/source/config/fragments/types/calc_OOXML_Template.xcu |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0b0f8871e89c71f68ee761975e46eca1305f5fb5
Author:     Justin Luth <[email protected]>
AuthorDate: Sat Nov 29 14:32:45 2025 -0500
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Dec 8 14:40:05 2025 +0100

    tdf#165180 xlsx convert-to: prefer Excel 2010–365 Spreadsheet, not 2007
    
    The context here is running a command-line
        soffice --convert-to xlsx myfile.ods
    which MIGHT (perhaps in Windows) create a 1st edition ECMA 2007 XLSX
    instead of a modern Excel 2010+ XLSX.
    
    Filtercache registers valid conversion types in a seemingly random order
    but if it's a "Preferred" one - set it to the front of the list.
    // Of course multiple "Preferred" registrations can occur
    // (they shouldn't - but they can!) ...
    
    For XLSX, neither MS_Excel_2007_XML nor calc_OOXML
    said that they were the preferred one,
    so it is somewhat ambiguous about which one will win.
        // first item is guaranteed as "preferred" one!
    
    [The difference between the PPTX case and this one
     is that BOTH pptx filters said they were preferred,
     so the last one processed (inserted at front) won.
     In this case, NEITHER xlsx filter says it is preferred
     so the first one processed (push_back) won.]
    
    Note that this does not make it the preferred UI choice...
    
    Note also that on Linux at least (where I am writing/testing this)
    it also does not make any difference since the order was
       {"Office Open XML Spreadsheet", "MS Excel 2007 XML"}
    Thus no unit test.
    
    Change-Id: I496568de9bdda1753010d5438e4858139937a49d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195025
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>
    (cherry picked from commit c2b73e70aeab081cb800a9767b406d0d3fbecbfa)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195121
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/filter/source/config/fragments/types/calc_OOXML.xcu 
b/filter/source/config/fragments/types/calc_OOXML.xcu
index 5b17c1c1db3a..8868951571e9 100644
--- a/filter/source/config/fragments/types/calc_OOXML.xcu
+++ b/filter/source/config/fragments/types/calc_OOXML.xcu
@@ -20,7 +20,7 @@
     <prop oor:name="URLPattern"/>
     <prop oor:name="Extensions"><value>xlsx xlsm</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>true</value></prop>
     <prop oor:name="PreferredFilter"><value>Calc Office Open XML</value></prop>
     <prop oor:name="UIName"><value xml:lang="en-US">Office Open XML 
Spreadsheet</value></prop>
     <prop oor:name="ClipboardFormat"/>
diff --git a/filter/source/config/fragments/types/calc_OOXML_Template.xcu 
b/filter/source/config/fragments/types/calc_OOXML_Template.xcu
index 677762fa78f7..e7865779781a 100644
--- a/filter/source/config/fragments/types/calc_OOXML_Template.xcu
+++ b/filter/source/config/fragments/types/calc_OOXML_Template.xcu
@@ -20,7 +20,7 @@
     <prop oor:name="URLPattern"/>
     <prop oor:name="Extensions"><value>xltx xltm</value></prop>
     <prop 
oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.spreadsheetml.template</value></prop>
-    <prop oor:name="Preferred"><value>false</value></prop>
+    <prop oor:name="Preferred"><value>true</value></prop>
     <prop oor:name="PreferredFilter"><value>Calc Office Open XML 
Template</value></prop>
     <prop oor:name="UIName"><value xml:lang="en-US">Office Open XML 
Spreadsheet Template</value></prop>
     <prop oor:name="ClipboardFormat"/>

Reply via email to