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 <gang65@poczta.onet.pl>
This commit is contained in:
Bartosz Kosiorek 2024-09-26 20:37:17 +02:00
parent b0aa70c956
commit 529dfc741a
9 changed files with 7 additions and 2 deletions

View file

@ -60,6 +60,7 @@
<data android:mimeType="application/vnd.ms-powerpoint" /> <data android:mimeType="application/vnd.ms-powerpoint" />
<data android:mimeType="application/vnd.ms-excel"/> <data android:mimeType="application/vnd.ms-excel"/>
<data android:mimeType="application/vnd.visio" /> <data android:mimeType="application/vnd.visio" />
<data android:mimeType="application/vnd.visio2013" />
<data android:mimeType="application/vnd.visio.xml" /> <data android:mimeType="application/vnd.visio.xml" />
<data android:mimeType="application/x-mspublisher" /> <data android:mimeType="application/x-mspublisher" />

View file

@ -70,6 +70,7 @@ public class FileUtilities {
mExtnMap.put(".dot", DOC); mExtnMap.put(".dot", DOC);
mExtnMap.put(".pot", IMPRESS); mExtnMap.put(".pot", IMPRESS);
mExtnMap.put(".xlt", CALC); mExtnMap.put(".xlt", CALC);
mExtnMap.put(".vstx", DRAWING);
// OOXML // OOXML
mExtnMap.put(".docx", DOC); mExtnMap.put(".docx", DOC);

View file

@ -95,6 +95,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements View.OnC
"application/vnd.ms-powerpoint", "application/vnd.ms-powerpoint",
"application/vnd.ms-excel", "application/vnd.ms-excel",
"application/vnd.visio", "application/vnd.visio",
"application/vnd.visio2013",
"application/vnd.visio.xml", "application/vnd.visio.xml",
"application/x-mspublisher", "application/x-mspublisher",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",

View file

@ -61,6 +61,7 @@ mimetypes = {
'application/vnd.visio': 'vsd', 'application/vnd.visio': 'vsd',
'application/visio.drawing': 'vsd', 'application/visio.drawing': 'vsd',
'application/vnd.visio2013': 'vsdx', 'application/vnd.visio2013': 'vsdx',
'application/vnd.visio2013': 'vstx',
'application/vnd.visio.xml': 'vdx', 'application/vnd.visio.xml': 'vdx',
'application/x-mspublisher': 'pub', 'application/x-mspublisher': 'pub',
#WPS Office #WPS Office

View file

@ -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", "sdd", "vor", "svm", "wmf", "bmp", "gif", "jpg", "jpeg", "jfif", "fif",
"jpe", "pcd", "pcx", "pgm", "png", "ppm", "psd", "ras", "tga", "tif", "jpe", "pcd", "pcx", "pgm", "png", "ppm", "psd", "ras", "tga", "tif",
"tiff", "xbm", "xpm", "odg", "otg", "fodg", "odc", "odi", "sds", "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", IMPRESSDOCS = ["sxi", "sti", "ppt", "pps", "pot", "sxd", "sda", "sdd", "sdp",
"vor", "cgm", "odp", "otp", "fodp", "ppsm", "ppsx", "pptm", "pptx", "vor", "cgm", "odp", "otp", "fodp", "ppsm", "ppsx", "pptm", "pptx",

View file

@ -18,7 +18,7 @@
<node oor:name="draw_Visio_Document" oor:op="replace" > <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="DetectService"><value>com.sun.star.comp.Draw.VisioImportFilter</value></prop>
<prop oor:name="URLPattern"/> <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="MediaType"><value>application/vnd.visio</value></prop>
<prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Visio Document</value></prop> <prop oor:name="PreferredFilter"><value>Visio Document</value></prop>

View file

@ -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( 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( 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( 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_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 ) CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION( Vst, gid_Module_Prg_Draw_MSO_Reg, vst, VST, MS_VISIO_TEMPLATE, 6, sdraw.exe, new, Draw )