android/source/AndroidManifest.xml                                    |    1 +
 android/source/src/java/org/libreoffice/ui/FileUtilities.java         |    1 +
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |    1 +
 bin/attachment_mimetypes.py                                           |    1 +
 bin/generate-bash-completion.py                                       |    2 +-
 filter/source/config/fragments/types/draw_Visio_Document.xcu          |    2 +-
 scp2/source/draw/registryitem_draw.scp                                |    1 +
 writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013drawing.vsdx   |binary
 writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013template.vstx  |binary
 9 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 71c6897d9751f7255bf48536cd8302c0fcf35740
Author:     Bartosz Kosiorek <gan...@poczta.onet.pl>
AuthorDate: Thu Sep 26 20:37:17 2024 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Sep 30 03:26:54 2024 +0200

    tdf#163170 Add support for MS Visio Template format with .vstx extension
    
    libvisio is already supporting .vstx template format.
    With this patch the LibreOffice is recognizing such file types,
    and successfully opening it.
    
    More information about format:
    
https://learn.microsoft.com/en-us/office/client-developer/visio/introduction-to-the-visio-file-formatvsdx
    
    Change-Id: Ibee01288cdb2cd6a0ac3f371a22604d7bb5b471c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173997
    Tested-by: Jenkins
    Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl>
    (cherry picked from commit 529dfc741a4ad6735937adaf10acdd567da4f84c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174013
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index ba71fdddb197..899a117f429d 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -60,6 +60,7 @@
                 <data android:mimeType="application/vnd.ms-powerpoint" />
                 <data android:mimeType="application/vnd.ms-excel"/>
                 <data android:mimeType="application/vnd.visio" />
+                <data android:mimeType="application/vnd.visio2013" />
                 <data android:mimeType="application/vnd.visio.xml" />
                 <data android:mimeType="application/x-mspublisher" />
 
diff --git a/android/source/src/java/org/libreoffice/ui/FileUtilities.java 
b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
index 7fc8c3c84eb1..f7fa856217fc 100644
--- a/android/source/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/source/src/java/org/libreoffice/ui/FileUtilities.java
@@ -70,6 +70,7 @@ public class FileUtilities {
         mExtnMap.put(".dot",  DOC);
         mExtnMap.put(".pot",  IMPRESS);
         mExtnMap.put(".xlt",  CALC);
+        mExtnMap.put(".vstx", DRAWING);
 
         // OOXML
         mExtnMap.put(".docx", DOC);
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 63eed9d37069..3f93d815af27 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -95,6 +95,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity 
implements View.OnC
             "application/vnd.ms-powerpoint",
             "application/vnd.ms-excel",
             "application/vnd.visio",
+            "application/vnd.visio2013",
             "application/vnd.visio.xml",
             "application/x-mspublisher",
             
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
diff --git a/bin/attachment_mimetypes.py b/bin/attachment_mimetypes.py
index ede5fcb39fb9..40eebb8297d5 100644
--- a/bin/attachment_mimetypes.py
+++ b/bin/attachment_mimetypes.py
@@ -61,6 +61,7 @@ mimetypes = {
     'application/vnd.visio': 'vsd',
     'application/visio.drawing': 'vsd',
     'application/vnd.visio2013': 'vsdx',
+    'application/vnd.visio2013': 'vstx',
     'application/vnd.visio.xml': 'vdx',
     'application/x-mspublisher': 'pub',
 #WPS Office
diff --git a/bin/generate-bash-completion.py b/bin/generate-bash-completion.py
index 1c0377b97387..c7366df4674e 100755
--- a/bin/generate-bash-completion.py
+++ b/bin/generate-bash-completion.py
@@ -27,7 +27,7 @@ DRAWDOCS = ["sxd", "std", "dxf", "emf", "eps", "met", "pct", 
"sgf", "sgv", "sda"
             "sdd", "vor", "svm", "wmf", "bmp", "gif", "jpg", "jpeg", "jfif", 
"fif",
             "jpe", "pcd", "pcx", "pgm", "png", "ppm", "psd", "ras", "tga", 
"tif",
             "tiff", "xbm", "xpm", "odg", "otg", "fodg", "odc", "odi", "sds",
-            "wpg", "svg", "vdx", "vsd", "vsdm", "vsdx", "pdf"]
+            "wpg", "svg", "vdx", "vsd", "vsdm", "vsdx", "vstx", "pdf"]
 
 IMPRESSDOCS = ["sxi", "sti", "ppt", "pps", "pot", "sxd", "sda", "sdd", "sdp",
                "vor", "cgm", "odp", "otp", "fodp", "ppsm", "ppsx", "pptm", 
"pptx",
diff --git a/filter/source/config/fragments/types/draw_Visio_Document.xcu 
b/filter/source/config/fragments/types/draw_Visio_Document.xcu
index b6c6992a389c..d43dc8c81dc4 100644
--- a/filter/source/config/fragments/types/draw_Visio_Document.xcu
+++ b/filter/source/config/fragments/types/draw_Visio_Document.xcu
@@ -18,7 +18,7 @@
         <node oor:name="draw_Visio_Document" oor:op="replace" >
             <prop 
oor:name="DetectService"><value>com.sun.star.comp.Draw.VisioImportFilter</value></prop>
             <prop oor:name="URLPattern"/>
-            <prop oor:name="Extensions"><value>vdx vsd vsdm vsdx</value></prop>
+            <prop oor:name="Extensions"><value>vdx vsd vsdm vsdx 
vstx</value></prop>
             <prop 
oor:name="MediaType"><value>application/vnd.visio</value></prop>
             <prop oor:name="Preferred"><value>true</value></prop>
             <prop oor:name="PreferredFilter"><value>Visio 
Document</value></prop>
diff --git a/scp2/source/draw/registryitem_draw.scp 
b/scp2/source/draw/registryitem_draw.scp
index 515b55fb58f7..e1781c58cf24 100644
--- a/scp2/source/draw/registryitem_draw.scp
+++ b/scp2/source/draw/registryitem_draw.scp
@@ -1059,6 +1059,7 @@ CONDITIONAL_REGISTER_DOC_EXTENSION( Vsd,  
gid_Module_Prg_Draw_MSO_Reg, vsd,  VSD
 CONDITIONAL_REGISTER_DOC_EXTENSION( Vdx,  gid_Module_Prg_Draw_MSO_Reg, vdx,  
VDX,  MS_VISIO_DOCUMENT, 5, sdraw.exe, open, Draw )
 CONDITIONAL_REGISTER_DOC_EXTENSION( Vsdm,  gid_Module_Prg_Draw_MSO_Reg, vsdm,  
VSDM,  MS_VISIO_DOCUMENT, 5, sdraw.exe, open, Draw )
 CONDITIONAL_REGISTER_DOC_EXTENSION( Vsdx,  gid_Module_Prg_Draw_MSO_Reg, vsdx,  
VSDX,  MS_VISIO_DOCUMENT, 5, sdraw.exe, open, Draw )
+CONDITIONAL_REGISTER_DOC_EXTENSION( Vstx,  gid_Module_Prg_Draw_MSO_Reg, vstx,  
VSTX,  MS_VISIO_DOCUMENT, 5, sdraw.exe, open, Draw )
 CONDITIONAL_REGISTER_DOC_EXTENSION( Pub,  gid_Module_Prg_Draw_MSO_Reg, pub,  
PUB,  MS_PUBLISHER_DOCUMENT, 5, sdraw.exe, open, Draw )
 CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION( Vst,  gid_Module_Prg_Draw_MSO_Reg, 
vst,  VST,  MS_VISIO_TEMPLATE, 6, sdraw.exe, new, Draw )
 
diff --git 
a/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013drawing.vsdx 
b/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013drawing.vsdx
new file mode 100644
index 000000000000..bc6fa2cb7b0b
Binary files /dev/null and 
b/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013drawing.vsdx differ
diff --git 
a/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013template.vstx 
b/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013template.vstx
new file mode 100644
index 000000000000..ff0e121958d2
Binary files /dev/null and 
b/writerperfect/qa/unit/data/draw/libvisio/pass/Visio2013template.vstx differ

Reply via email to