desktop/source/lib/init.cxx | 4 +++- dev/null |binary filter/source/config/fragments/types/calc_OOXML.xcu | 2 +- filter/source/config/fragments/types/calc_OOXML_Template.xcu | 2 +- filter/source/config/fragments/types/impress_OOXML_Presentation.xcu | 2 +- filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu | 2 +- filter/source/config/fragments/types/writer_OOXML.xcu | 2 +- filter/source/config/fragments/types/writer_OOXML_Template.xcu | 2 +- oox/qa/unit/data/tdf165180_standardConnectorsECMA.potx |binary oox/qa/unit/shape.cxx | 6 ++++-- sd/source/ui/docshell/docshel4.cxx | 2 +- 11 files changed, 14 insertions(+), 10 deletions(-)
New commits: commit c6a4aff3de0f70907fdea86369988d74ca545827 Author: Justin Luth <[email protected]> AuthorDate: Mon Dec 1 17:22:27 2025 -0500 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Dec 10 14:19:24 2025 +0100 tdf#165180 tdf#149756 tdf#152545 pptx: treat all 2007 filters the same I can't see any reason why all MS PowerPoint 2007 filters would not fall under the same rules as the main PowerPoint 2007 one. This patch effectively adds "Impress MS PowerPoint 2007 XML AutoPlay" "Impress MS PowerPoint 2007 XML Template" "Impress MS PowerPoint 2007 XML VBA" Unfortunately, there is nothing visually different in the unit test... make CppunitTest_oox_shape \ CPPUNIT_TEST_NAME=testTdf165180_standardConnectorsECMA Change-Id: I538975ce90b3ce3c5bc68a7779a8617a4e630700 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195017 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195252 diff --git a/oox/qa/unit/data/standardConnectors.pptx b/oox/qa/unit/data/standardConnectors.pptx deleted file mode 100644 index 46bb0735f40f..000000000000 Binary files a/oox/qa/unit/data/standardConnectors.pptx and /dev/null differ diff --git a/oox/qa/unit/data/tdf165180_standardConnectorsECMA.potx b/oox/qa/unit/data/tdf165180_standardConnectorsECMA.potx new file mode 100644 index 000000000000..95eb0e748b95 Binary files /dev/null and b/oox/qa/unit/data/tdf165180_standardConnectorsECMA.potx differ diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx index 1b51efe3c226..35c8e49bc28e 100644 --- a/oox/qa/unit/shape.cxx +++ b/oox/qa/unit/shape.cxx @@ -168,9 +168,11 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCurvedConnectors) CPPUNIT_ASSERT_EQUAL(sal_Int32(3019), nEdgeLineDelta); } -CPPUNIT_TEST_FIXTURE(OoxShapeTest, testStandardConnectors) +CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf165180_standardConnectorsECMA) { - loadFromFile(u"standardConnectors.pptx"); + // This test was created for tdf#149756 tdf#152545 + // and modified to simply use a template format for tdf#165180 + loadFromFile(u"tdf165180_standardConnectorsECMA.potx"); uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 40f6d6e934a8..fd4fb3457416 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -423,7 +423,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, mpDoc->SetSummationOfParagraphs(); } - if (aFilterName == "Impress MS PowerPoint 2007 XML") + if (bIsPowerPointECMA) { // This is a "MS Compact" mode for connectors. // The Libreoffice uses bounding rectangle of connected shapes but commit 30f4105008663efeddf8bb2fa845603912dcfc52 Author: Justin Luth <[email protected]> AuthorDate: Mon Dec 1 17:49:42 2025 -0500 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Dec 10 14:19:16 2025 +0100 tdf#165180 docm/xlsm/pptm: no macros in Office Open XML filters It isn't that Microsoft's 2010+ formats don't support macros. Rather, PPTX commit 5d0901a75e7ef96dc722b5277450cc18ad163f7b and DOCX commit 697173f6fdfae581022cfdb5ec5171c5a3be58f0 (for the 2007 ECMA 1st edition filters) split the filter into two parts in order to support macro export. The same would definitely have to be done in order for the 2010 Office Open filters to support macros. So it is just that WE don't support macro export yet. If done incorrectly, MS Office will refuse to open the file, so it is best to ensure the filter can never EXPORT incorrectly. AFAICS, the import filter is meaningless (has no impact), so only EXPORT could possibly be affected by this patch. Linux's UI already refuses to let us save a .docm file using any filter other than Word 2007 VBA. Even setting 2007 VBA oor:name="Preferred"><value>false</value> didn't prevent the file-picker from auto-switching to that filter. The only way I could enable it was to put docm first in oor:name="Extensions"><value>docm docx</value>. MS Word refused to open the resulting file. (Yet another reason for a separate 2010-365 VBA filter - simply to enable the file-picker to override the 2007 VBA filter since only the first Extension has effect in the file-picker's auto-filter-by-extension selection.) Using SAL_USE_VCLPLUGIN=gen, I could easily force LO to save a .docm using the Word 2010-365 filter, and MS Word refused to open the resulting file. oox/source/core/filterdetect.cxx import logic unconditionally says macro-enabled formats are 2007 filters anyway. Change-Id: Iea89936f24c712b0ac17b2e56c9acacd019cad5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195015 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195258 diff --git a/filter/source/config/fragments/types/calc_OOXML.xcu b/filter/source/config/fragments/types/calc_OOXML.xcu index 8868951571e9..8e2b073ccc3a 100644 --- a/filter/source/config/fragments/types/calc_OOXML.xcu +++ b/filter/source/config/fragments/types/calc_OOXML.xcu @@ -18,7 +18,7 @@ <node oor:name="Office Open XML Spreadsheet" 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>true</value></prop> <prop oor:name="PreferredFilter"><value>Calc Office Open XML</value></prop> diff --git a/filter/source/config/fragments/types/calc_OOXML_Template.xcu b/filter/source/config/fragments/types/calc_OOXML_Template.xcu index e7865779781a..1d002d08f143 100644 --- a/filter/source/config/fragments/types/calc_OOXML_Template.xcu +++ b/filter/source/config/fragments/types/calc_OOXML_Template.xcu @@ -18,7 +18,7 @@ <node oor:name="Office Open XML Spreadsheet Template" 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>xltx xltm</value></prop> + <prop oor:name="Extensions"><value>xltx</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.spreadsheetml.template</value></prop> <prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="PreferredFilter"><value>Calc Office Open XML Template</value></prop> diff --git a/filter/source/config/fragments/types/impress_OOXML_Presentation.xcu b/filter/source/config/fragments/types/impress_OOXML_Presentation.xcu index 6264ce716787..5f33ec77c72a 100644 --- a/filter/source/config/fragments/types/impress_OOXML_Presentation.xcu +++ b/filter/source/config/fragments/types/impress_OOXML_Presentation.xcu @@ -18,7 +18,7 @@ <node oor:name="Office Open XML Presentation" 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>pptx pptm</value></prop> + <prop oor:name="Extensions"><value>pptx</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.presentationml.presentation</value></prop> <prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="PreferredFilter"><value>Impress Office Open XML</value></prop> diff --git a/filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu b/filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu index c34d39541b8c..3b0dbaecd837 100644 --- a/filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu +++ b/filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu @@ -18,7 +18,7 @@ <node oor:name="Office Open XML Presentation Template" 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>potx potm</value></prop> + <prop oor:name="Extensions"><value>potx</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.presentationml.template</value></prop> <prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="PreferredFilter"><value>Impress Office Open XML Template</value></prop> diff --git a/filter/source/config/fragments/types/writer_OOXML.xcu b/filter/source/config/fragments/types/writer_OOXML.xcu index 079a6421f072..0f4602179321 100644 --- a/filter/source/config/fragments/types/writer_OOXML.xcu +++ b/filter/source/config/fragments/types/writer_OOXML.xcu @@ -18,7 +18,7 @@ <node oor:name="writer_OOXML" 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>docx docm</value></prop> + <prop oor:name="Extensions"><value>docx</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.wordprocessingml.document</value></prop> <prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="PreferredFilter"><value>Office Open XML Text</value></prop> diff --git a/filter/source/config/fragments/types/writer_OOXML_Template.xcu b/filter/source/config/fragments/types/writer_OOXML_Template.xcu index a9d424b967b4..f7a90397ef11 100644 --- a/filter/source/config/fragments/types/writer_OOXML_Template.xcu +++ b/filter/source/config/fragments/types/writer_OOXML_Template.xcu @@ -18,7 +18,7 @@ <node oor:name="writer_OOXML_Text_Template" 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>dotx dotm</value></prop> + <prop oor:name="Extensions"><value>dotx</value></prop> <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.wordprocessingml.template</value></prop> <prop oor:name="Preferred"><value>true</value></prop> <prop oor:name="PreferredFilter"><value>Office Open XML Text Template</value></prop> commit 30410d18e6f6f46526a2e9520e7f382e44014ad3 Author: Justin Luth <[email protected]> AuthorDate: Mon Dec 1 14:48:19 2025 -0500 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Dec 10 14:19:10 2025 +0100 LOKit: fix/add known PowerPoint extensions 97 Autoplay should have been capitalized as AutoPlay, so even if it should have shown up somewhere, (and I don't see it listed under save-as, export, or download) it (probably) wouldn't have worked anyway? But probably this is just used as icon/recognized-file-type info. Added recognition for XML AutoPlay too. potm is a macro-enabled template. That seems highly unlikely to be used in LOKit, so I added the non-macro template as well. Change-Id: Id95a4f04b0ff6ca07098105cbed1501c73f6a59d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195026 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195257 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c248e25517a1..d65872ae8cbb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -369,10 +369,12 @@ constexpr ExtensionMap aImpressExtensionMap[] = { "otp", u"impress8_template"_ustr }, { "pdf", u"impress_pdf_Export"_ustr }, { "potm", u"Impress MS PowerPoint 2007 XML Template"_ustr }, + { "potx", u"Impress MS PowerPoint 2007 XML Template"_ustr }, { "pot", u"MS PowerPoint 97 Vorlage"_ustr }, { "pptm", u"Impress MS PowerPoint 2007 XML VBA"_ustr }, + { "ppts", u"Impress MS PowerPoint 2007 XML AutoPlay"_ustr }, { "pptx", u"Impress MS PowerPoint 2007 XML"_ustr }, - { "pps", u"MS PowerPoint 97 Autoplay"_ustr }, + { "pps", u"MS PowerPoint 97 AutoPlay"_ustr }, { "ppt", u"MS PowerPoint 97"_ustr }, { "svg", u"impress_svg_Export"_ustr }, { "xhtml", u"XHTML Impress File"_ustr },
