core.git: oox/source
oox/source/export/drawingml.cxx | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit aca4a0c073c5e5f93c642b68f9afd07e65dbf302
Author: Piotr Osada
AuthorDate: Wed Apr 1 19:47:49 2026 +0200
Commit: Bartosz Kosiorek
CommitDate: Thu Apr 2 00:51:53 2026 +0200
tdf#168886 tdf#168237 oox: Detect EMF in NativeWmf GfxLink
GfxLinkType::NativeWmf stores both WMF and EMF formats. Without
checking IsEMF(), EMF files are exported to DOCX ZIP with .wmf
extension and image/x-wmf mime type, even though the binary content
is EMF.
Fix: check IsEMF() in the NativeWmf case and set the correct
image/x-emf mime type and .emf extension.
Change-Id: Icab34e29d06186fb78a4d7a4ac233fbc7c992ac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203138
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 78842f2f0e6f..dad687ffe2aa 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1495,8 +1495,16 @@ OUString GraphicExport::writeNewEntryToStorage(const
Graphic& rGraphic, bool bRe
aExtension = u"tif"_ustr;
break;
case GfxLinkType::NativeWmf:
-sMediaType = u"image/x-wmf"_ustr;
-aExtension = u"wmf"_ustr;
+if (aLink.IsEMF())
+{
+sMediaType = u"image/x-emf"_ustr;
+aExtension = u"emf"_ustr;
+}
+else
+{
+sMediaType = u"image/x-wmf"_ustr;
+aExtension = u"wmf"_ustr;
+}
break;
case GfxLinkType::NativeMet:
sMediaType = u"image/x-met"_ustr;
core.git: oox/source
oox/source/core/filterdetect.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 513b033c24e996ac376f160f43cb4a04d1d110ba Author: Aron Budea AuthorDate: Mon Mar 30 05:24:55 2026 +1030 Commit: Justin Luth CommitDate: Mon Mar 30 19:51:16 2026 +0200 oox: Fix typo in DOCM filter name during detection Otherwise affected files eg. fdo83844-1.doc fail to open. Regression from 0f7cf56ca10e8b6cf34767d25281d783b416fbeb. Change-Id: I55ba367b43e1ecdf586522ac1e47bb322bf12702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202943 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea (cherry picked from commit 026bd8e1f3be8c2d7c9fd64f7ff03833313d2d30) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202982 Reviewed-by: Justin Luth Tested-by: Jenkins diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 45c4cb06fe88..40adfe47619b 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -243,7 +243,7 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( std::u16string_vi case OOXMLVariant::ISO_Strict: // Not supported, map to ISO transitional return u"writer_OOXML_VBA"_ustr; case OOXMLVariant::ECMA_Transitional: -return u"wwriter_MS_Word_2007_VBA"_ustr; +return u"writer_MS_Word_2007_VBA"_ustr; } }
core.git: oox/source sw/qa
oox/source/core/xmlfilterbase.cxx|7 +-
sw/qa/extras/ooxmlexport/data/tdf171360_unique_props.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx| 17 +++
3 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit 835d45e0054228c0296de87c40ba464d6bf02467
Author: Aron Budea
AuthorDate: Tue Mar 17 23:45:34 2026 +1030
Commit: Aron Budea
CommitDate: Fri Mar 20 06:32:32 2026 +0100
tdf#171360 OOXML custom properties must be unique case insensitive
Otherwise Word fails to open the exported file.
Export of custom properties was implemented
in 47c5454ea67632278d69a1ddfe97d74f5cc4449f.
Change-Id: If35077d8cd3b2c3f52b6cd8b4d381769c0040f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201909
Reviewed-by: Aron Budea
Tested-by: Jenkins
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index b25930e29e0e..4db78e8472b1 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -21,6 +21,7 @@
#include
#include
+#include
#include
#include
@@ -931,9 +932,13 @@ writeCustomProperties( XmlFilterBase& rSelf, const
Reference< XDocumentPropertie
FSNS(XML_xmlns, XML_vt),
rSelf.getNamespaceURL(OOX_NS(officeDocPropsVT)));
size_t nIndex = 0;
+std::unordered_set aUniqueProps;
for (const auto& rProp : aprop)
{
-if ( !rProp.Name.isEmpty() )
+// Property names must be unique, and are case insensitive unlike in
some formats (eg. ODF, DOC)
+// When coming from those formats, this can cause data loss, but
having props only differ in case is unlikely
+if ( !rProp.Name.isEmpty()
+ && aUniqueProps.insert(rProp.Name.toAsciiUpperCase()).second ==
true )
{
// Skip storing these values in Custom Properties as it will be
stored in Core/Extended Properties
if (( rProp.Name == "OOXMLCorePropertyCategory" ) || // stored in
cp:category
diff --git a/sw/qa/extras/ooxmlexport/data/tdf171360_unique_props.odt
b/sw/qa/extras/ooxmlexport/data/tdf171360_unique_props.odt
new file mode 100644
index ..dcef157172b1
Binary files /dev/null and
b/sw/qa/extras/ooxmlexport/data/tdf171360_unique_props.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index f1e6eb9a24e2..158c77f3d133 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -125,6 +125,23 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomProperties)
assertXPathContent(pXmlDoc, "/cp:coreProperties/dc:identifier",
u"identifier");
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf171360_unique_props)
+{
+createSwDoc("tdf171360_unique_props.odt");
+save(TestFilter::DOCX);
+
+xmlDocUniquePtr pCustomXml = parseExport(u"docProps/custom.xml"_ustr);
+CPPUNIT_ASSERT(pCustomXml);
+
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+"Only a single custom property must be exported to OOXML if they only
differ in case",
+1, countXPathNodes(pCustomXml,
+
"/custom-properties:Properties/custom-properties:property[@name='ABC']")
+ + countXPathNodes(
+ pCustomXml,
+
"/custom-properties:Properties/custom-properties:property[@name='abc']"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testUTF8CustomProperties, "tdf127864.docx")
{
uno::Reference
xDocumentPropertiesSupplier(
core.git: oox/source
oox/source/crypto/AgileEngine.cxx | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 1ec3db717fa144ddff3e9b0a2338a82355cf365b
Author: Caolán McNamara
AuthorDate: Mon Mar 16 17:22:23 2026 +
Commit: Caolán McNamara
CommitDate: Tue Mar 17 20:27:44 2026 +0100
Conform AlignEngine parsing to what section 2.3.4.10 of the spec has
Change-Id: Ibb9162b1ce7993ef74665ec0329c95b423fa8174
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201874
Tested-by: Jenkins
Reviewed-by: Caolán McNamara
diff --git a/oox/source/crypto/AgileEngine.cxx
b/oox/source/crypto/AgileEngine.cxx
index fb9720872e3e..9599b492e5b9 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -9,6 +9,8 @@
*/
#include
+#include
+#include
#include
#include
@@ -551,8 +553,21 @@ bool
AgileEngine::readEncryptionInfo(uno::Reference & rxInputS
if (0 > mInfo.spinCount || mInfo.spinCount > 1000)
return false;
-if (1 > mInfo.saltSize|| mInfo.saltSize > 65536) // Check
+// [MS-OFFCRYPTO] 2.3.4.10: saltSize "MUST be at least 1 and no greater
than 65,536"
+if (1 > mInfo.saltSize || mInfo.saltSize > 65536)
+{
+SAL_WARN("oox", "AgileEngine::readEncryptionInfo(): saltSize out of
range: " << mInfo.saltSize);
+return false;
+}
+
+// [MS-OFFCRYPTO] 2.3.4.10: "The number of bytes required to decode the
saltValue
+// attribute MUST be equal to the value of the saltSize attribute"
+if (mInfo.keyDataSalt.size() != o3tl::make_unsigned(mInfo.saltSize))
+{
+SAL_WARN("oox", "AgileEngine::readEncryptionInfo(): keyDataSalt size "
<< mInfo.keyDataSalt.size()
+ << " does not match saltSize " << mInfo.saltSize);
return false;
+}
// AES 128 CBC with SHA1
if (mInfo.keyBits == 128 &&
core.git: oox/source
oox/source/ppt/pptgraphicshapecontext.cxx |8 +---
oox/source/ppt/pptshapecontext.cxx| 22 ++
2 files changed, 19 insertions(+), 11 deletions(-)
New commits:
commit 771eca5fc2ca88d931f4935f4a5ac74136096df9
Author: Mohit Marathe
AuthorDate: Fri Feb 27 17:15:42 2026 +0530
Commit: Mohit Marathe
CommitDate: Fri Mar 13 08:22:51 2026 +0100
tdf#163741 pptx import: skip placeholder matching for idx=UINT32_MAX
Placeholders with idx="4294967295" (SAL_MAX_UINT32) are sentinel values
meaning "no specific placeholder link." Previously, getInteger() silently
overflowed this to 0, causing the shape to wrongly match a layout
placeholder and inherit incorrect text properties (e.g. 10pt instead of
the expected 18pt from the master's bodyStyle).
Parse idx as unsigned via getUnsigned() to detect the sentinel, then skip
setSubTypeIndex(), findPlaceholderByIndex(), and findPlaceholder() entirely
so the shape falls through to the master text style cascade.
Signed-off-by: Mohit Marathe
Change-Id: Ib8b0c068720440695bffe25bc23d3f28406fea60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200622
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201435
Tested-by: Jenkins
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx
b/oox/source/ppt/pptgraphicshapecontext.cxx
index 7d9fc0a2289d..b918c6b0e8b2 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -60,11 +60,13 @@ ContextHandlerRef PPTGraphicShapeContext::onCreateContext(
sal_Int32 aElementTok
mpShapePtr->setSubType( nSubType );
OUString sIdx( rAttribs.getStringDefaulted( XML_idx ) );
bool bHasIdx = !sIdx.isEmpty();
-sal_Int32 nIdx = sIdx.toInt32();
-if( rAttribs.hasAttribute( XML_idx ) )
+sal_uInt32 nUnsignedIdx = rAttribs.getUnsigned( XML_idx, 0 );
+bool bSkipPlaceholderLookup = (bHasIdx && nUnsignedIdx ==
SAL_MAX_UINT32);
+sal_Int32 nIdx = static_cast(nUnsignedIdx);
+if( rAttribs.hasAttribute( XML_idx ) && !bSkipPlaceholderLookup )
mpShapePtr->setSubTypeIndex( nIdx );
-if ( nSubType || bHasIdx )
+if ( (nSubType || bHasIdx) && !bSkipPlaceholderLookup )
{
PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >(
mpShapePtr.get() );
if ( pPPTShapePtr )
diff --git a/oox/source/ppt/pptshapecontext.cxx
b/oox/source/ppt/pptshapecontext.cxx
index 6caed1728d01..40ade6a2ca05 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -72,17 +72,23 @@ ContextHandlerRef PPTShapeContext::onCreateContext(
sal_Int32 aElementToken, con
mpShapePtr->setSubType( nSubType );
+bool bSkipPlaceholderLookup = false;
if( rAttribs.hasAttribute( XML_idx ) )
{
-sal_Int32 nSubTypeIndex = rAttribs.getInteger( XML_idx, 0 );
-mpShapePtr->setSubTypeIndex( nSubTypeIndex );
-
-if(!oSubType.has_value() && pMasterPersist)
+sal_uInt32 nUnsignedIdx = rAttribs.getUnsigned( XML_idx, 0 );
+bSkipPlaceholderLookup = (nUnsignedIdx == SAL_MAX_UINT32);
+sal_Int32 nSubTypeIndex = static_cast(nUnsignedIdx);
+if (!bSkipPlaceholderLookup)
{
-pTmpPlaceholder = PPTShape::findPlaceholderByIndex(
nSubTypeIndex, pMasterPersist->getShapes()->getChildren() );
+mpShapePtr->setSubTypeIndex( nSubTypeIndex );
+
+if(!oSubType.has_value() && pMasterPersist)
+{
+pTmpPlaceholder = PPTShape::findPlaceholderByIndex(
nSubTypeIndex, pMasterPersist->getShapes()->getChildren() );
-if(pTmpPlaceholder)
-nSubType = pTmpPlaceholder->getSubType(); // When we
don't have type attribute on slide but have on slidelayout we have to use it
instead of default type
+if(pTmpPlaceholder)
+nSubType = pTmpPlaceholder->getSubType(); // When
we don't have type attribute on slide but have on slidelayout we have to use it
instead of default type
+}
}
}
@@ -132,7 +138,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext(
sal_Int32 aElementToken, con
default:
break;
}
-if ( nFirstPlaceholder )
+if ( nFirstPlaceholder && !bSkipPlaceholderLookup )
{
oox::drawingml::ShapePtr pPlaceholder;
if ( eShapeLocation == Layout ) // for
layout objects the referenced object can be found within
core.git: oox/source sd/qa svx/qa svx/source
oox/source/drawingml/customshapeproperties.cxx |2
sd/qa/unit/layout-tests.cxx| 24 +--
svx/qa/unit/data/3d_rotated_text.pptx |binary
svx/qa/unit/sdr.cxx| 52 +
svx/source/svdraw/svdotextdecomposition.cxx| 32 +++
5 files changed, 88 insertions(+), 22 deletions(-)
New commits:
commit 04bc53cd7e566a3a781e4d77524d6fcc36590204
Author: Mike Kaganski
AuthorDate: Mon Mar 9 19:54:19 2026 +0500
Commit: Mike Kaganski
CommitDate: Tue Mar 10 07:01:48 2026 +0100
tdf#171225: don't lose camera rotation angle for mnShapePresetType < 0
For the case when mnShapePresetType >= 0, the code setting it was added
in commit c50e44b270bc3048ff9c1a000c3afed1dab9e0bf (tdf#126060 Handle
text camera z rotation while pptx import., 2019-10-16). But it omitted
the other case.
This change also improves positioning of the rotated text, initially
implemented in that commit. The rotation is now added to the block text
decomposition as a separate transform primitive. The text center is now
obtained directly from the decomposition. After the change, I see about
1-pixel difference compared to PowerPoint render at 100% zoom (before
that, the offset was tens of millimeters).
testTdf128212 had to be corrected, because the metafile now has a new
element in the parsed XML, and the final positioning has changed (it is
better now). Unfortunately, I don't know what would it now produce if
the fix is broken, so I had to remove respective comment.
This change does not fix tdf#128206.
Change-Id: I86cbd0710744b14e8b9b68a436affc5b08703a12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201286
Tested-by: Jenkins
Reviewed-by: Mike Kaganski
diff --git a/oox/source/drawingml/customshapeproperties.cxx
b/oox/source/drawingml/customshapeproperties.cxx
index 1b069f8939d7..7afbead80c99 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -227,6 +227,8 @@ void CustomShapeProperties::pushToPropSet(
aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY );
if( mnTextPreRotateAngle )
aPropertyMap.setProperty( PROP_TextPreRotateAngle,
mnTextPreRotateAngle );
+if (mnTextCameraZRotateAngle)
+aPropertyMap.setProperty(PROP_TextCameraZRotateAngle,
mnTextCameraZRotateAngle);
if (moTextAreaRotateAngle.has_value())
aPropertyMap.setProperty(PROP_TextRotateAngle,
moTextAreaRotateAngle.value());
// Note 1: If Equations are defined - they are processed using
internal div by 360 coordinates
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 76f8305af512..befec96e91e4 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -105,11 +105,25 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf128212)
createSdImpressDoc("pptx/tdf128212.pptx");
xmlDocUniquePtr pXmlDoc = parseLayout();
-// Without the fix in place, this test would have failed with
-// - Expected: 7795
-// - Actual : 12068
-assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "x", u"4523");
-assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "y", u"7795");
+// The position of the rotated text depends on the calculated text size.
This depends on
+// rendering, so it differs a bit on different platforms. Hence rather big
delta here.
+
+// translation
+assertXPath(pXmlDoc, "//push[@flags='PushMapMode']", 1);
+assertXPath(pXmlDoc, "//push[@flags='PushMapMode']/mapmode", "mapunit",
u"MapRelative");
+CPPUNIT_ASSERT_DOUBLES_EQUAL(
+331.0, getXPath(pXmlDoc, "//push[@flags='PushMapMode']/mapmode",
"x").toDouble(), 3.0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(
+9420.0, getXPath(pXmlDoc, "//push[@flags='PushMapMode']/mapmode",
"y").toDouble(), 10.0);
+// no scaling
+assertXPath(pXmlDoc, "//push[@flags='PushMapMode']/mapmode", "scalex",
u"(1/1)");
+assertXPath(pXmlDoc, "//push[@flags='PushMapMode']/mapmode", "scaley",
u"(1/1)");
+
+// text position
+CPPUNIT_ASSERT_DOUBLES_EQUAL(
+4760.0, getXPath(pXmlDoc, "//push[@flags='PushMapMode']/textarray",
"x").toDouble(), 3.0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(
+-2250.0, getXPath(pXmlDoc, "//push[@flags='PushMapMode']/textarray",
"y").toDouble(), 3.0);
}
CPPUNIT_TEST_FIXTURE(SdLayoutTest, testColumnsLayout)
diff --git a/svx/qa/unit/data/3d_rotated_text.pptx
b/svx/qa/unit/data/3d_rotated_text.pptx
new file mode 100644
index ..f745b3073d39
Binary files /dev/null and b/svx/qa/unit/data/3d_rotated_text.pptx differ
diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx
index b85ccd64eb65..fa7f69c5cd75 100644
--- a/svx/qa/unit/sdr.cxx
+++ b/svx/qa/unit/sdr.cxx
@@ -17,6 +17,7 @@
#include
#include
#include
+#include
#include
core.git: oox/source
oox/source/export/chartexport.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 4bfd6d80a7869a36f8ddec6f2527f40740c08d23 Author: Justin Luth AuthorDate: Fri Mar 6 11:04:35 2026 -0500 Commit: Justin Luth CommitDate: Mon Mar 9 13:42:28 2026 +0100 tdf#143269 oox export: skip charts without a c:plotArea This is a necessary follow-up, because I missed this path of access to ExportContent so the assert I added might get hit if I don't do this... MS Excel/Powerpoint also consider documents as corrupt if the chart don't have at least a c:plotArea. Well, actually I don't know WHAT the minimum is, but certainly a c:plotArea does not seem to be optional, and everything less that I tried also reported as corrupt. No unit test: I tried to create an ODS with an empty chart, but I couldn't - not even when copy/pasting an empty chart from an example ODT. Change-Id: Ibada44dc96c0aa0ead90d31ce5a045db3fc22081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201145 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 7e2a3e114b6c..58c280846cd7 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1038,6 +1038,12 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI if( !xChartDoc.is() ) return; +// At minimum, a PlotArea is needed or else MS Word complains about an invalid file +uno::Reference +xBCooSysCnt(xChartDoc->getFirstDiagram(), uno::UNO_QUERY); +if (!xBCooSysCnt.is()) +return; + // We need to get the new diagram here so we can know if this is a chartex // chart. mxNewDiagram.set( xChartDoc->getFirstDiagram());
core.git: oox/source
oox/source/export/chartexport.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 6e77760cdefd7574d218e6c2a4deb30373f4a531 Author: Justin Luth AuthorDate: Fri Mar 6 10:40:57 2026 -0500 Commit: Justin Luth CommitDate: Fri Mar 6 18:48:16 2026 +0100 tdf#143269 fix build (partial revert) xBCooSysCnt is only used in the assert, so non-debug builds would have an unused variable error. So just keep the early return that was there previously. Change-Id: Id716568c5748f43615c98882be8d0b8179889273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201138 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index ebee424e452a..07256b213437 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2533,6 +2533,8 @@ void ChartExport::exportPlotArea(const Reference< css::chart::XChartDocument >& Reference< chart2::XCoordinateSystemContainer > xBCooSysCnt( mxNewDiagram, uno::UNO_QUERY ); // MS Word considers a chart corrupt if it doesn't have a c:plotArea assert(xBCooSysCnt.is()); +if (!xBCooSysCnt.is()) +return; // plot-area element
core.git: oox/source sw/qa sw/source
oox/source/export/chartexport.cxx |4 ++--
sw/qa/extras/ooxmlexport/data/tdf143269_emptyChart.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 12
sw/source/filter/ww8/docxattributeoutput.cxx |7 +++
4 files changed, 21 insertions(+), 2 deletions(-)
New commits:
commit aa2453b7573798943d055449d57a1e37b22fc8e9
Author: Justin Luth
AuthorDate: Thu Mar 5 16:08:19 2026 -0500
Commit: Justin Luth
CommitDate: Fri Mar 6 13:49:53 2026 +0100
tdf#143269 docx export: skip charts without a c:plotArea
MS Word considers documents as corrupt
if they don't have at least a c:plotArea.
An empty c:chart or an empty c:chartSpace is not enough.
Well, actually I don't know WHAT the minimum is,
but certainly a c:plotArea does not seem to be optional,
and everything less that I tried also reported as corrupt.
make CppunitTest_sw_ooxmlexport10 \
CPPUNIT_TEST_NAME=testTdf143269_emptyChart
Change-Id: I7b6a10160fdf99ca984185a59c1c2ecc1aa6e3fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201086
Reviewed-by: Justin Luth
Tested-by: Jenkins
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 584860981c3a..ebee424e452a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2531,8 +2531,8 @@ void ChartExport::exportPlotArea(const Reference<
css::chart::XChartDocument >&
bool bIsChartex)
{
Reference< chart2::XCoordinateSystemContainer > xBCooSysCnt( mxNewDiagram,
uno::UNO_QUERY );
-if( ! xBCooSysCnt.is())
-return;
+// MS Word considers a chart corrupt if it doesn't have a c:plotArea
+assert(xBCooSysCnt.is());
// plot-area element
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143269_emptyChart.odt
b/sw/qa/extras/ooxmlexport/data/tdf143269_emptyChart.odt
new file mode 100755
index ..f9d757308858
Binary files /dev/null and
b/sw/qa/extras/ooxmlexport/data/tdf143269_emptyChart.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 773e5948e39f..e9dabdc6e27a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -774,6 +774,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143269_missingEmbeddings)
assertXPath(pXmlChart1, "//c:externalData", 0);
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf143269_emptyChart)
+{
+// Given a LO-authored chart that is completely empty
+
+createSwDoc("tdf143269_emptyChart.odt");
+save(TestFilter::DOCX);
+
+// MS Word reports corrupt if a chart is empty - it needs to be skipped
+xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
+assertXPath(pXmlDoc, "//c:chart", 0);
+}
+
DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
{
// When chart was in a TextFrame, its size was too large.
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3b52e0dbeabd..dc5292d71cec 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -152,6 +152,7 @@
#include
#include
+#include
#include
#include
#include
@@ -5834,6 +5835,12 @@ void DocxAttributeOutput::WritePostponedChart()
if( xChartDoc.is() )
{
+// At minimum, a PlotArea is needed or else MS Word complains
about an invalid file
+uno::Reference
+xBCooSysCnt(xChartDoc->getFirstDiagram(), uno::UNO_QUERY);
+if (!xBCooSysCnt.is())
+continue;
+
SAL_INFO("sw.ww8", "DocxAttributeOutput::WriteOLE2Obj: export
chart ");
m_rExport.SdrExporter().startDMLAnchorInline(rChart.frame,
rChart.size);
core.git: oox/source
oox/source/drawingml/diagram/diagramlayoutatoms.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 119315cd33827818bfbf81efef8754852aa03aa1 Author: Andrea Gelmini AuthorDate: Tue Mar 3 18:09:12 2026 +0100 Commit: Julien Nabet CommitDate: Wed Mar 4 09:25:19 2026 +0100 Fix typo Change-Id: I6b3f1e5b51062f12796bfd85bd2bfab8a8895b47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200900 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx index d4586586a828..5053a8174bae 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx @@ -306,7 +306,7 @@ public: // just to make sure that those members of SmartArtDiagram& will // reference the correct - newly created - SmartArtDiagram. // That again would have been hard to keep under control due to -// LayoutNodes hosting a full hierarchy of LayoutNodes in it's base +// LayoutNodes hosting a full hierarchy of LayoutNodes in its base // class LayoutAtom, so complicated deep-copy and need of virtual Clone // method at LayoutAtom to do the right thing for all eight derivations // of it. @@ -316,7 +316,7 @@ public: // used (in some ForEach manner) to create the shapes, so does not // need to be changed itself. // It gets now just additionally referenced by the SmartArtDiagram copy -// costructor. That is for non-deep copy/paste where this copy operator +// constructor. That is for non-deep copy/paste where this copy operator // is used. // For deep copy the SmartArtDiagram constructor with import from // boost::property_tree has to be used which will have to re-import
core.git: oox/source
oox/source/drawingml/diagram/diagram.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 2400aef4f2a007cab21b163c65abca1580efc94d Author: Andrea Gelmini AuthorDate: Fri Feb 27 14:58:04 2026 +0100 Commit: David Gilbert CommitDate: Sun Mar 1 18:25:12 2026 +0100 Remove duplicated includes Change-Id: I0798bce1234d917da78ee973055d8e7556d95e78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200627 Tested-by: Jenkins Reviewed-by: David Gilbert diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 3301d1695c32..b196c61bbd53 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -55,8 +55,6 @@ #ifdef DBG_UTIL #include #include -#include -#include #include #include #endif
core.git: oox/source
oox/source/drawingml/diagram/diagram.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 384519540873571e1d1175a0897394b7795b01b9 Author: Andrea Gelmini AuthorDate: Thu Feb 19 08:24:37 2026 +0100 Commit: Julien Nabet CommitDate: Thu Feb 26 18:27:58 2026 +0100 Fix typo Change-Id: I951dce78715df6ece1004fda5735c4fc235b8da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199686 Reviewed-by: Julien Nabet Tested-by: Jenkins Reviewed-by: Simon Chenery diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 3656e8705c44..3301d1695c32 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -154,7 +154,7 @@ void SmartArtDiagram::createShapeHierarchyFromModel( const ShapePtr & pParentSha pBackground->setSize(pParentShape->getSize()); if (mpData->getBackgroundShapeFillProperties()) pBackground->getFillProperties() = *mpData->getBackgroundShapeFillProperties(); -// MoveProtect/SizeProtect..? Keep for now, but mnay be removed +// MoveProtect/SizeProtect..? Keep for now, but may be removed // when IA needs change - the Diagram will be a closed GroupObject. // If it gets 'broken' (un-grouped) the BGShape will keep that attributes, // despite main reason to break that Diagram is probably to edit it.
core.git: oox/source
oox/source/drawingml/shape.cxx |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 4e4ef13452f3aa5494ff9babc6784155caee9e11
Author: Jaume Pujantell
AuthorDate: Tue Feb 24 11:01:12 2026 +0100
Commit: Jaume Pujantell
CommitDate: Wed Feb 25 09:10:47 2026 +0100
tdf#170968 avoid unnecessary soft edge reset
This fixes a regression from 85dbb4dc81bed0b55a1bfbc5dce221b98eaf70d1
(tdf#170095 override soft edge if there are 3D effects) where a shape
might stop showing if the soft edge value is set to zero when it wasn't
set to begin with.
Change-Id: I0a886711cef199e4eb3a89a034732e6ef0b1e4c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200155
Reviewed-by: Jaume Pujantell
Tested-by: Jenkins
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 26d3a903aa1c..e34237c24eda 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1632,10 +1632,10 @@ Reference< XShape > const & Shape::createAndInsert(
= get3DProperties().getShape3DAttributes(rGraphicHelper,
nFillPhClr);
bool bHas3DProps = aCamera3DEffects.hasElements() ||
aLightRig3DEffects.hasElements()
|| aShape3DEffects.hasElements();
-if (bHas3DProps)
+if (bHas3DProps && getEffectProperties().maSoftEdge.moRad.has_value())
{
// 3D properties override softeEdge
-getEffectProperties().maSoftEdge.moRad = 0;
+getEffectProperties().maSoftEdge.moRad.reset();
}
// applying properties
core.git: oox/source
oox/source/export/drawingml.cxx | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 55507043004d55816cdc238733a9f5c7a2240f2d
Author: Justin Luth
AuthorDate: Tue Feb 17 13:50:57 2026 -0500
Commit: Justin Luth
CommitDate: Tue Feb 17 22:31:45 2026 +0100
tdf#169487 tdf#169705: docx export: invalid values in a:chExt / a:off
MS Office is not accepting values greater than 2147483647
for 'x' and 'y' attributes inside a:off,
or 'cx' and 'cy' attributes inside 'a:chExt'
MSO was reporting those documents as corrupt.
Specifically, attachment 72701 from bug 59153
'WAD-Lab Manual.docx' aka fdo59153-1.docx
Change-Id: I67dd47781098b0dfe9d12f75f591138d0e80c2f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199569
Reviewed-by: Justin Luth
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 837043b948d8..473e1f7b6c45 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2294,12 +2294,12 @@ void DrawingML::WriteTransformation(const Reference<
XShape >& xShape, const too
if (bIsGroupShape && (GetDocumentType() != DOCUMENT_DOCX ||
IsTopGroupObj(xShape)))
{
-mpFS->singleElementNS(XML_a, XML_chOff,
-XML_x,
OString::number(oox::drawingml::convertHmmToEmu(nChildLeft)),
-XML_y,
OString::number(oox::drawingml::convertHmmToEmu(nChildTop)));
-mpFS->singleElementNS(XML_a, XML_chExt,
-XML_cx,
OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
-XML_cy,
OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight(;
+nX = std::min(oox::drawingml::convertHmmToEmu(nChildLeft), MAX_SIZE);
+nY = std::min(oox::drawingml::convertHmmToEmu(nChildTop), MAX_SIZE);
+mpFS->singleElementNS(
+XML_a, XML_chOff, XML_x, OString::number(nX), XML_y,
OString::number(nY));
+mpFS->singleElementNS(
+XML_a, XML_chExt, XML_cx, OString::number(nCx), XML_cy,
OString::number(nCy));
}
mpFS->endElementNS( nXmlNamespace, XML_xfrm );
core.git: oox/source sw/source
oox/source/core/filterbase.cxx |7 +--
sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx | 14 ++
sw/source/writerfilter/ooxml/OOXMLDocumentImpl.hxx |5 -
3 files changed, 19 insertions(+), 7 deletions(-)
New commits:
commit be2e9bf77e14fbfb4fdab32f6af61778b9e64843
Author: Noel Grandin
AuthorDate: Thu Feb 12 13:10:13 2026 +0200
Commit: Noel Grandin
CommitDate: Fri Feb 13 19:49:56 2026 +0100
tdf#170595 reduce the number of times we open and parse the zip..
file container from 851 to 8.
This shaves 30% off the opening time.
This requires that we
(a) share the same instance of ShapeFilterBase in the child OODocumentImpl
objects we create
(b) and re-use the mxPackage in the FilterBase class,
instead of re-opening the stream with a new OStorage object.
Change-Id: I058bddd04e93e7200bf446f00b5a1c24201b9041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199269
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Miklos Vajna
(cherry picked from commit eb318cfcc1c9c5bbad22c53af41fff615c984cca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199266
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index d5e77333ba30..5542b7de26fa 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -464,7 +464,8 @@ sal_Bool SAL_CALL FilterBase::filter( const Sequence<
PropertyValue >& rMediaDes
throw RuntimeException();
bool bRet = false;
-setMediaDescriptor( rMediaDescSeq );
+if (!mxImpl->mxStorage)
+setMediaDescriptor( rMediaDescSeq );
DocumentOpenedGuard aOpenedGuard( mxImpl->maFileUrl );
if( aOpenedGuard.isValid() || mxImpl->maFileUrl.isEmpty() )
{
@@ -479,7 +480,9 @@ sal_Bool SAL_CALL FilterBase::filter( const Sequence<
PropertyValue >& rMediaDes
case FilterDirection::Unknown:
break;
case FilterDirection::Import:
-if( mxImpl->mxInStream.is() )
+if (mxImpl->mxStorage)
+bRet = true;
+else if( mxImpl->mxInStream.is() )
{
mxImpl->mxStorage = implCreateStorage( mxImpl->mxInStream
);
bRet = mxImpl->mxStorage && importDocument();
diff --git a/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx
b/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx
index eb1d4eff5ac5..58e729f1a4eb 100644
--- a/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx
+++ b/sw/source/writerfilter/ooxml/OOXMLDocumentImpl.cxx
@@ -53,7 +53,11 @@ using namespace ::com::sun::star;
namespace writerfilter::ooxml
{
-OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream,
uno::Reference xStatusIndicator, bool bSkipImages,
const uno::Sequence& rDescriptor)
+OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream,
+ uno::Reference
xStatusIndicator,
+ bool bSkipImages,
+ const
uno::Sequence& rDescriptor,
+ const
rtl::Reference& rxShapeFilterBase)
: mpStream(std::move(pStream))
, mxStatusIndicator(std::move(xStatusIndicator))
, mnXNoteId(0)
@@ -66,6 +70,7 @@ OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t
pStream, uno::Refere
,
m_rBaseURL(comphelper::SequenceAsHashMap(rDescriptor).getUnpackedValueOrDefault(u"DocumentBaseURL"_ustr,
OUString()))
, maMediaDescriptor(rDescriptor)
, mxGraphicMapper(graphic::GraphicMapper::create(mpStream->getContext()))
+, mxShapeFilterBase(rxShapeFilterBase)
{
pushShapeContext();
}
@@ -247,7 +252,8 @@ OOXMLDocumentImpl::getSubStream(const OUString & rId)
OOXMLDocumentImpl * pTemp;
// Do not pass status indicator to sub-streams: they are typically
marginal in size, so we just track the main document for now.
writerfilter::Reference::Pointer_t pRet( pTemp =
-new OOXMLDocumentImpl(std::move(pStream),
uno::Reference(), mbSkipImages, maMediaDescriptor));
+new OOXMLDocumentImpl(std::move(pStream),
uno::Reference(),
+ mbSkipImages, maMediaDescriptor,
getShapeFilterBase()));
pTemp->setModel(mxModel);
pTemp->setDrawPage(mxDrawPage);
pTemp->mbIsSubstream = true;
@@ -259,7 +265,7 @@ OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t
nType, const sal_Int
{
// See above, no status indicator for the note stream, either.
OOXMLDocumentImpl * pDocument = new
OOXMLDocumentImpl(OOXMLDocumentFactory::createStream(mpStream, nType),
-uno::Reference(), mbSkipImages,
maMediaDescriptor);
+uno::Reference(), mbSkipImages,
maMediaDescriptor, nullptr);
pDocument->setXNoteId(nId);
pDocument->setModel(getModel());
pDocum
core.git: oox/source
oox/source/export/drawingml.cxx | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 5c1a27bb66aa21f68cd358169a91606824a3921a
Author: Simon Chenery
AuthorDate: Sat Feb 7 10:14:46 2026 +0100
Commit: Mike Kaganski
CommitDate: Fri Feb 13 06:23:40 2026 +0100
tdf#158068 Use UTF-16 literals and std::u16string_view in drawingml.cxx
Change-Id: Id889c339da761a7296b9b0a77b4b01c1f34907e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198881
Reviewed-by: Mike Kaganski
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 99f1893aa172..8b0c8989f766 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4949,9 +4949,21 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula)
// "?: n1 n2 n3" // ifelse
// Below vector contains validTokens for the 1st token based on the number
of tokens in the formula. The order is: 2, 3, 4
-const std::vector> validTokens
-= { { "val", "abs", "sqrt" }, { "min", "max" }, { "*/", "+-", "+/",
"?:" } };
-const std::set builtInVariables = { "w", "h", "t", "b", "l", "r"
};
+const std::vector> validTokens =
+{
+{ u"val", u"abs", u"sqrt" },
+{ u"min", u"max" },
+{ u"*/", u"+-", u"+/", u"?:" }
+};
+const std::set builtInVariables =
+{
+u"w",
+u"h",
+u"t",
+u"b",
+u"l",
+u"r"
+};
const std::vector strTokens =
comphelper::string::split(sFormula, ' ');
sal_uInt16 nSize = strTokens.size();
core.git: oox/source
oox/source/shape/ShapeContextHandler.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit e4963099d338da56c7f325b6ed9b8ae71f54968f Author: Noel Grandin AuthorDate: Thu Feb 12 10:06:43 2026 +0200 Commit: Noel Grandin CommitDate: Thu Feb 12 10:05:21 2026 +0100 simply theme parsing in ShapeContextHandler no need to go via a XFastSAXSerializable when we are just going to handle the data to a FragmentHandler. Change-Id: If25b1def6f1377ae0511a757baef3073b846547b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199236 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index aff8ccbd9861..68dad0f0df51 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -313,8 +313,7 @@ void SAL_CALL ShapeContextHandler::startFastElement mpThemePtr = std::make_shared(); auto pTheme = std::make_shared(); mpThemePtr->setTheme(pTheme); -uno::Reference xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW); -mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr, *pTheme), xDoc); +mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr, *pTheme)); mxShapeFilterBase->setCurrentTheme(mpThemePtr); } }
core.git: oox/source sd/qa
oox/source/ppt/pptshape.cxx | 10 +++---
sd/qa/unit/data/pptx/tdf169524.pptx |binary
sd/qa/unit/export-tests-ooxml4.cxx | 12
3 files changed, 19 insertions(+), 3 deletions(-)
New commits:
commit 6897edfc215babab8c39ec29df364debfd93c131
Author: Karthik Godha
AuthorDate: Mon Dec 8 18:54:06 2025 +0530
Commit: Michael Stahl
CommitDate: Tue Feb 10 13:56:04 2026 +0100
tdf#169559: PPTX import master placeholder styles
Master Slide placeholder styles are skipped during import of PPTX
Change-Id: I33fdf4e66cd5c2ab461e125c302bcbd2ca2cf14b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195229
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 2201c215642fc93b4c78a7e98c11272938880a05)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199040
Tested-by: Jenkins
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index c71bdf7a3714..1b763a83c144 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -238,9 +238,6 @@ void PPTShape::addShape(
::oox::drawingml::ShapeIdMap* pShapeMap )
{
SAL_INFO("oox.ppt","add shape id: " << msId << " location: " <<
((meShapeLocation == Master) ? "master" : ((meShapeLocation == Slide) ? "slide"
: ((meShapeLocation == Layout) ? "layout" : "other"))) << " subtype: " <<
mnSubType << " service: " << msServiceName);
-// only placeholder from layout are being inserted
-if ( mnSubType && ( meShapeLocation == Master ) )
-return;
OUString sServiceName( msServiceName );
if (sServiceName.isEmpty())
@@ -522,6 +519,13 @@ void PPTShape::addShape(
} else
setMasterTextListStyle( aMasterTextListStyle );
+if (mnSubType && meShapeLocation == Master)
+{
+if (getTextBody() && !getTextBody()->isEmpty())
+setTextMasterStyles(rSlidePersist, rFilterBase,
sServiceName);
+return;
+}
+
Reference< XShape > xShape( createAndInsert( rFilterBase,
sServiceName, pTheme, rxShapes, bClearText, mpPlaceholder, aTransformation,
getFillProperties() ) );
// Apply text properties on placeholder text inside this
placeholder shape
diff --git a/sd/qa/unit/data/pptx/tdf169524.pptx
b/sd/qa/unit/data/pptx/tdf169524.pptx
index f1e93c55ca3a..96361fffbef8 100644
Binary files a/sd/qa/unit/data/pptx/tdf169524.pptx and
b/sd/qa/unit/data/pptx/tdf169524.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx
b/sd/qa/unit/export-tests-ooxml4.cxx
index 8f734e8db8c6..bb4ff075e941 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -2011,6 +2011,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4,
testParaAlignStartEnd)
assertXPath(pDoc,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[4]/a:pPr[@algn='l']", 1);
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf169559)
+{
+createSdImpressDoc("pptx/tdf169524.pptx");
+save(TestFilter::PPTX);
+
+xmlDocUniquePtr pXmlDoc =
parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
+assertXPath(
+pXmlDoc,
+
"/p:sldMaster/p:cSld/p:spTree/p:sp[2]/p:txBody/a:lstStyle/a:lvl1pPr/a:spcAft/a:spcPts",
+"val", u"1701");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: oox/source
oox/source/drawingml/diagram/datamodel_oox.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3f5afadebad398f6d42202e97750d82cc251a04d
Author: Andrea Gelmini
AuthorDate: Fri Feb 6 14:34:55 2026 +0100
Commit: Julien Nabet
CommitDate: Sat Feb 7 21:24:54 2026 +0100
Fix typo
Change-Id: I24bd9a242f1a3dbb1b4844f84e6c416978d0fd67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198839
Reviewed-by: Julien Nabet
Tested-by: Jenkins
Reviewed-by: Simon Chenery
diff --git a/oox/source/drawingml/diagram/datamodel_oox.cxx
b/oox/source/drawingml/diagram/datamodel_oox.cxx
index ec7ce7e4cf17..349656c71c34 100644
--- a/oox/source/drawingml/diagram/datamodel_oox.cxx
+++ b/oox/source/drawingml/diagram/datamodel_oox.cxx
@@ -161,7 +161,7 @@ void DiagramData_oox::writeDiagramData(DrawingML&
rOriginalDrawingML, sax_fastpa
else
{
// for TextShapes it's more complex: this Node (rPoint) may be the
-// Node holdig the text, but the XShape referencing it is
associated
+// Node holding the text, but the XShape referencing it is
associated
// with a Node that references this by using presAssocID. Use
// getMasterXShapeForPoint that uses that association and try
// to access the XShape containing the Text ModelData
core.git: oox/source
oox/source/export/drawingml.cxx | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit d78b115d48156b2fd91216877f3525722683f1bb
Author: Justin Luth
AuthorDate: Fri Jan 30 18:31:08 2026 -0500
Commit: Justin Luth
CommitDate: Sat Jan 31 02:51:04 2026 +0100
tdf#166335 followup: remove assert - gluePoint indexes are ~random
I spent 6.5 hours trying to 'find something wrong'.
Well, apart from 'everything', I didn't find anything
that was comprehensible and clearly wrong.
So I'll just document that yet another piece of this puzzle
is completely unreliable.
Change-Id: I53891f73d446264287600f03199b5262b7428d11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198441
Tested-by: Jenkins
Reviewed-by: Justin Luth
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index aa1ea00bb173..ffa00ec9fef7 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -5049,8 +5049,14 @@ void prepareGluePoints(std::vector& rGuideList,
if (rGluePoint.First.Value >>= nIdx1)
{
bValidIdx1 = rGluePoint.First.Type ==
EnhancedCustomShapeParameterType::EQUATION;
-// I would assume that any EQUATION must define a valid index
value.
-assert(!bValidIdx1 || (nIdx1 >= 0 && nIdx1 <
aEquations.getLength()));
+assert(!bValidIdx1 || nIdx1 >= 0); // It is always an index at
least
+// tdf#166335
+// Sadly, these equation indexes point to a
(changed/enlarged) parsed collection,
+// but aEquations is the un-parsed collection.
+// For larger values, there is a good chance that the wrong
equation is used.
+// However, this is so complicated that we ignore that,
+// and simply make sure we don't export corruption. Inaccuracy
is fine...
+bValidIdx1 = bValidIdx1 && nIdx1 < aEquations.getLength();
}
else
continue;
@@ -5058,7 +5064,8 @@ void prepareGluePoints(std::vector& rGuideList,
if (rGluePoint.Second.Value >>= nIdx2)
{
bValidIdx2 = rGluePoint.Second.Type ==
EnhancedCustomShapeParameterType::EQUATION;
-assert(!bValidIdx2 || (nIdx2 >= 0 && nIdx2 <
aEquations.getLength()));
+assert(!bValidIdx2 || nIdx2 >= 0);
+bValidIdx2 = bValidIdx2 && nIdx2 < aEquations.getLength();
}
else
continue;
core.git: oox/source solenv/clang-format
oox/source/drawingml/effectproperties.hxx | 93 --
solenv/clang-format/excludelist |1
2 files changed, 94 deletions(-)
New commits:
commit 09418010d57c500470fae63b5b6a18a498d5fd70
Author: Simon Chenery
AuthorDate: Tue Jan 27 22:28:56 2026 +0100
Commit: Julien Nabet
CommitDate: Wed Jan 28 18:36:46 2026 +0100
Remove unused duplicate file oox/source/drawingml/effectproperties.hxx
File include/oox/drawingml/effectproperties.hxx is now used in LO
compilation since commit 3eac847927a0cdfa40c3fea38c473ed2ad7faecc
and is identical to
oox/source/drawingml/effectproperties.hxx, except for formatting and
whitespace differences.
Change-Id: Iba6c7233f07ff40f3d05ef8d6516d03dabc330b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198232
Tested-by: Jenkins
Reviewed-by: Julien Nabet
diff --git a/oox/source/drawingml/effectproperties.hxx
b/oox/source/drawingml/effectproperties.hxx
deleted file mode 100644
index 992e2bddf3ef..
--- a/oox/source/drawingml/effectproperties.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
-#define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
-
-#include
-#include
-
-#include
-#include
-#include
-
-namespace model {
-enum class RectangleAlignment;
-}
-
-namespace oox::drawingml {
-
-struct EffectGlowProperties
-{
-std::optional< sal_Int64 > moGlowRad; // size of glow effect
-Color moGlowColor;
-// TODO saturation and luminance missing
-
-void assignUsed( const EffectGlowProperties& rSourceProps );
-};
-
-struct EffectSoftEdgeProperties
-{
-std::optional moRad; // size of effect
-
-void assignUsed(const EffectSoftEdgeProperties& rSourceProps);
-};
-
-struct EffectShadowProperties
-{
-std::optional< sal_Int64 > moShadowDist;
-std::optional< sal_Int64 > moShadowDir;
-std::optional< sal_Int64 > moShadowSx;
-std::optional< sal_Int64 > moShadowSy;
-Color moShadowColor;
-std::optional< sal_Int64 > moShadowBlur; // size of blur effect
-std::optional< model::RectangleAlignment > moShadowAlignment;
-
-/** Overwrites all members that are explicitly set in rSourceProps. */
-voidassignUsed( const EffectShadowProperties& rSourceProps
);
-};
-
-struct Effect
-{
-OUString msName;
-std::map< OUString, css::uno::Any > maAttribs;
-Color moColor;
-
-css::beans::PropertyValue getEffect();
-};
-
-struct EffectProperties
-{
-EffectShadowProperties maShadow;
-EffectGlowProperties maGlow;
-EffectSoftEdgeProperties maSoftEdge;
-
-/** Stores all effect properties, including those not supported by core
yet */
-std::vector> m_Effects;
-
-EffectProperties() {}
-EffectProperties(EffectProperties const& rOther)
-{
-assignUsed(rOther);
-}
-
-/** Overwrites all members that are explicitly set in rSourceProps. */
-voidassignUsed( const EffectProperties& rSourceProps );
-
-/** Writes the properties to the passed property map. */
-voidpushToPropMap(
-PropertyMap& rPropMap,
-const GraphicHelper& rGraphicHelper ) const;
-};
-
-} // namespace oox::drawingml
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 29e4a3137818..1e1693126cd0 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -6843,7 +6843,6 @@ oox/source/drawingml/diagram/layoutnodecontext.cxx
oox/source/drawingml/diagram/layoutnodecontext.hxx
oox/source/drawingml/drawingmltypes.cxx
oox/source/drawingml/effectproperties.cxx
-oox/source/drawingml/effectproperties.hxx
oox/source/drawingml/effectpropertiescontext.cxx
oox/source/drawingml/fillproperties.cxx
oox/source/drawingml/graphicshapecontext.cxx
core.git: oox/source
oox/source/drawingml/diagram/diagramhelper_oox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c81598ec472570669cc579a400479c5df41e2846 Author: Andrea Gelmini AuthorDate: Wed Jan 28 16:41:18 2026 +0100 Commit: Julien Nabet CommitDate: Wed Jan 28 18:14:02 2026 +0100 Fix typo Change-Id: I1e8c273902401a73fd7056b4c35e1cb42b0e3f78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198322 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/oox/source/drawingml/diagram/diagramhelper_oox.cxx b/oox/source/drawingml/diagram/diagramhelper_oox.cxx index 4957434c7fb8..2520f5a4a309 100644 --- a/oox/source/drawingml/diagram/diagramhelper_oox.cxx +++ b/oox/source/drawingml/diagram/diagramhelper_oox.cxx @@ -93,7 +93,7 @@ void DiagramHelper_oox::reLayout() pShapePtr->setDiagramType(); pShapePtr->setSize(maImportSize); -// remember exsiting DrawingLayerModelData. Do this before createShapeHierarchyFromModel +// remember existing DrawingLayerModelData. Do this before createShapeHierarchyFromModel // below, that will create a new BackgroundShapeModelID and the BGShape would // be missing. // Also important is to do this as XShapes, the content of the Group will delete the
core.git: oox/source
oox/source/core/filterbase.cxx | 32
1 file changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 20839e4cd07f5dbd2666ed106f02848929f20723
Author: Simon Chenery
AuthorDate: Sun Jan 18 22:16:01 2026 +0100
Commit: Hossein
CommitDate: Fri Jan 23 23:41:11 2026 +0100
tdf#168771 Convert enum to enum class in filterbase.cxx
Change-Id: I7436bf80bcd970e43af63550935560cf3a9de90e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197533
Reviewed-by: Hossein
Tested-by: Jenkins
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 2a40fadd3dc1..d5e77333ba30 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -113,11 +113,11 @@ DocumentOpenedGuard::~DocumentOpenedGuard()
}
/** Specifies whether this filter is an import or export filter. */
-enum FilterDirection
+enum class FilterDirection
{
-FILTERDIRECTION_UNKNOWN,
-FILTERDIRECTION_IMPORT,
-FILTERDIRECTION_EXPORT
+Unknown,
+Import,
+Export
};
} // namespace
@@ -165,7 +165,7 @@ struct FilterBaseImpl
};
FilterBaseImpl::FilterBaseImpl( const Reference< XComponentContext >&
rxContext ) :
-meDirection( FILTERDIRECTION_UNKNOWN ),
+meDirection( FilterDirection::Unknown ),
meVersion(ECMA_376_1ST_EDITION),
mxComponentContext( rxContext, UNO_SET_THROW ),
mbExportVBA(false),
@@ -197,12 +197,12 @@ FilterBase::~FilterBase()
bool FilterBase::isImportFilter() const
{
-return mxImpl->meDirection == FILTERDIRECTION_IMPORT;
+return mxImpl->meDirection == FilterDirection::Import;
}
bool FilterBase::isExportFilter() const
{
-return mxImpl->meDirection == FILTERDIRECTION_EXPORT;
+return mxImpl->meDirection == FilterDirection::Export;
}
OoxmlVersion FilterBase::getVersion() const
@@ -445,7 +445,7 @@ void SAL_CALL FilterBase::initialize( const Sequence< Any
>& rArgs )
void SAL_CALL FilterBase::setTargetDocument( const Reference< XComponent >&
rxDocument )
{
mxImpl->setDocumentModel( rxDocument );
-mxImpl->meDirection = FILTERDIRECTION_IMPORT;
+mxImpl->meDirection = FilterDirection::Import;
}
// com.sun.star.document.XExporter interface
@@ -453,14 +453,14 @@ void SAL_CALL FilterBase::setTargetDocument( const
Reference< XComponent >& rxDo
void SAL_CALL FilterBase::setSourceDocument( const Reference< XComponent >&
rxDocument )
{
mxImpl->setDocumentModel( rxDocument );
-mxImpl->meDirection = FILTERDIRECTION_EXPORT;
+mxImpl->meDirection = FilterDirection::Export;
}
// com.sun.star.document.XFilter interface
sal_Bool SAL_CALL FilterBase::filter( const Sequence< PropertyValue >&
rMediaDescSeq )
{
-if( !mxImpl->mxModel.is() || !mxImpl->mxModelFactory.is() ||
(mxImpl->meDirection == FILTERDIRECTION_UNKNOWN) )
+if( !mxImpl->mxModel.is() || !mxImpl->mxModelFactory.is() ||
(mxImpl->meDirection == FilterDirection::Unknown) )
throw RuntimeException();
bool bRet = false;
@@ -476,16 +476,16 @@ sal_Bool SAL_CALL FilterBase::filter( const Sequence<
PropertyValue >& rMediaDes
switch( mxImpl->meDirection )
{
-case FILTERDIRECTION_UNKNOWN:
+case FilterDirection::Unknown:
break;
-case FILTERDIRECTION_IMPORT:
+case FilterDirection::Import:
if( mxImpl->mxInStream.is() )
{
mxImpl->mxStorage = implCreateStorage( mxImpl->mxInStream
);
bRet = mxImpl->mxStorage && importDocument();
}
break;
-case FILTERDIRECTION_EXPORT:
+case FilterDirection::Export:
if( mxImpl->mxOutStream.is() )
{
mxImpl->mxStorage = implCreateStorage( mxImpl->mxOutStream
);
@@ -531,15 +531,15 @@ void FilterBase::setMediaDescriptor( const Sequence<
PropertyValue >& rMediaDesc
switch( mxImpl->meDirection )
{
-case FILTERDIRECTION_UNKNOWN:
+case FilterDirection::Unknown:
OSL_FAIL( "FilterBase::setMediaDescriptor - invalid filter
direction" );
break;
-case FILTERDIRECTION_IMPORT:
+case FilterDirection::Import:
utl::MediaDescriptor::addInputStream(mxImpl->maMediaDesc);
mxImpl->mxInStream = implGetInputStream( mxImpl->maMediaDesc );
OSL_ENSURE( mxImpl->mxInStream.is(),
"FilterBase::setMediaDescriptor - missing input stream" );
break;
-case FILTERDIRECTION_EXPORT:
+case FilterDirection::Export:
mxImpl->mxOutStream = implGetOutputStream( mxImpl->maMediaDesc );
OSL_ENSURE( mxImpl->mxOutStream.is(),
"FilterBase::setMediaDescriptor - missing output stream" );
break;
core.git: oox/source
oox/source/drawingml/table/tablecell.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit fd85ae8f154d261c3bc3dfc15b549df0ce4666ae Author: Noel Grandin AuthorDate: Thu Jan 22 14:51:16 2026 +0200 Commit: Noel Grandin CommitDate: Fri Jan 23 08:21:00 2026 +0100 reduce log noise otherwise some unit tests will generate a ton of warn: oox:5789:86569751:oox/source/helper/propertyset.cxx:136: PropertySet::implSetPropertyValue - cannot set property "DiagonalBLTR" com.sun.star.beans.UnknownPropertyException message: "DiagonalBLTR at /Volumes/Jenkins/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/svx/source/table/cell.cxx:1132" context: N3sdr5table4CellE Change-Id: I49d4475149fba82595f99be68d4d5f6b913b6009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197809 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 0da7c2092eec..34467a1e1bce 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -142,7 +142,8 @@ static void applyLineAttributes(const ::oox::core::XmlFilterBase& rFilterBase, } PropertySet aPropSet( rxPropSet ); -aPropSet.setProperty( nPropId, aBorderLine ); +if (aPropSet.hasProperty(nPropId)) +aPropSet.setProperty( nPropId, aBorderLine ); } static void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart& rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties& rLineProperties )
core.git: oox/source
oox/source/drawingml/diagram/datamodel_oox.cxx |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit b7850f4342ebbaa350931a9259cc384318ad1728
Author: Andrea Gelmini
AuthorDate: Thu Jan 22 16:06:30 2026 +0100
Commit: Julien Nabet
CommitDate: Thu Jan 22 17:16:18 2026 +0100
Fix typo
Change-Id: Ia1a213e147dba46fc77741588e039a07cb2a5984
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197846
Tested-by: Julien Nabet
Reviewed-by: Julien Nabet
diff --git a/oox/source/drawingml/diagram/datamodel_oox.cxx
b/oox/source/drawingml/diagram/datamodel_oox.cxx
index b6aa85e7f01d..37d89661bf69 100644
--- a/oox/source/drawingml/diagram/datamodel_oox.cxx
+++ b/oox/source/drawingml/diagram/datamodel_oox.cxx
@@ -136,7 +136,7 @@ void
DiagramData_oox::writeDiagramData(oox::core::XmlFilterBase& rFB, sax_fastpa
if (xCandidate.is())
{
// check comparing the DiagramDataModelID created at
BackgroundSHape creation for the oox::Shape
-// that got transferend to the XShape when it was created
+// that got transferred to the XShape when it was created
SdrObject*
pCandidate(SdrObject::getSdrObjectFromXShape(xCandidate));
if (nullptr != pCandidate && pCandidate->getDiagramDataModelID()
== getBackgroundShapeModelID())
xBgShape = xCandidate;
@@ -158,7 +158,7 @@ void
DiagramData_oox::writeDiagramData(oox::core::XmlFilterBase& rFB, sax_fastpa
// write ExtList & it's contents
// Note: I *tried* to use XML_dsp and xmlns:dsp, but these are not
defined, thus
-// for this case where the only relevant data is the 'relId' entzry I will
allow
+// for this case where the only relevant data is the 'relId' entry I will
allow
// to construct the XML statement by own string concatenation
rTarget->startElementNS(XML_dgm, XML_extLst);
const OUString rNsDsp(rFB.getNamespaceURL(OOX_NS(dsp)));
core.git: oox/source
oox/source/drawingml/diagram/datamodel_oox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit abc62042a48ff8e1c4930f3942e7e4be11926fb0 Author: Andrea Gelmini AuthorDate: Thu Jan 22 16:53:49 2026 +0100 Commit: Julien Nabet CommitDate: Thu Jan 22 17:11:02 2026 +0100 Fix typo Change-Id: I16695b158c00e3cf89ce628243256c3772cdc2cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197854 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/oox/source/drawingml/diagram/datamodel_oox.cxx b/oox/source/drawingml/diagram/datamodel_oox.cxx index 9182de5057e4..b6aa85e7f01d 100644 --- a/oox/source/drawingml/diagram/datamodel_oox.cxx +++ b/oox/source/drawingml/diagram/datamodel_oox.cxx @@ -122,7 +122,7 @@ void DiagramData_oox::writeDiagramData(oox::core::XmlFilterBase& rFB, sax_fastpa // maybe that could be adapted for general use. // But there is DrawingML::WriteFill, that needs the XShape, sax_fastparser::FSHelper and a XmlFilterBase. We // can organize all that and then export from XShape model data. -// For The BGShape is is okay since in MSO Diagram data no shape for that exists anyways, it's just +// For The BGShape it is okay since in MSO Diagram data no shape for that exists anyways, it's just // FillAttributes and a XShape for BG needs to exist in DrawObject model anytime anyways, see // Diagram::createShapeHierarchyFromModel. This will also allow to use existing stuff like standard dialogs // and more for later offering changing the Background of a Diagram.
core.git: oox/source
oox/source/export/drawingml.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 8ad8d27a61fad5af785eb15c58a31c9d82cd23ee Author: [email protected] AuthorDate: Mon Jan 19 20:20:43 2026 -0500 Commit: Justin Luth CommitDate: Tue Jan 20 20:30:01 2026 +0100 tdf#170394 oox export: arcTo wH and wR must be integer, not decimal MS Office reports files as corrupt if these values contain a floating point number. This started in LO 7.2 with commit 7337e7e74d8bde77a56552bcb7b40bf1668c87b7. Since then, 3 more instances of export XML_arcTo have appeared, but all of them used std:lround. The nice thing about std:lround is that it will not return 0, but rather 1 for a small floating point value. That was also recommended by what I found on the Internet, so I gratefully copied that usage. Change-Id: I4712cb516ed6220a079d2b8dfee0013e8f0c9c59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197665 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 1973f6c5f2eb..327724d81c1a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -5724,8 +5724,8 @@ bool DrawingML::WriteCustomGeometrySegment( double fSwingAng = 0.0; rCustomShape2d.GetParameter(fSwingAng, rPairs[rnPairIndex + 1].Second, false, false); sal_Int32 nSwingAng(std::lround(fSwingAng * 6)); -mpFS->singleElement(FSNS(XML_a, XML_arcTo), XML_wR, OString::number(fWR), XML_hR, -OString::number(fHR), XML_stAng, OString::number(nStartAng), +mpFS->singleElement(FSNS(XML_a, XML_arcTo), XML_wR, OString::number(std::lround(fWR)), +XML_hR, OString::number(std::lround(fHR)), XML_stAng, OString::number(nStartAng), XML_swAng, OString::number(nSwingAng)); double fPx = 0.0; double fPy = 0.0;
core.git: oox/source sw/qa
oox/source/export/shapes.cxx |3 +++
sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 2a7ee38519d9b1c3db6efe83ccff50a4af0593d2
Author: Noel Grandin
AuthorDate: Tue Jan 20 07:39:59 2026 +0100
Commit: Noel Grandin
CommitDate: Tue Jan 20 10:26:37 2026 +0100
Revert "mso-test: invalid xdr:twoCellAnchor"
This reverts commit 6b9794ea1c6c24d7c48a1b43a9302c51ea607215,
because
With this change, now these files are corrupt after a RT
-forum-mso-en3-23097.docx
-forum-mso-en4-364124.docx
-forum-mso-en4-428907.docx
-tdf104181-3.docx
-tdf104181-6.docx
Change-Id: Ib3010fbf0868897fbe8d1f325f3ccdd33475cf3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197616
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 30e08d2a9720..9f5a4d6273ce 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1423,7 +1423,10 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
&& (xShapeProps->getPropertyValue(u"MediaURL"_ustr)
>>= sMediaURL);
if (!xGraphic.is() && !bHasMediaURL)
+{
SAL_INFO("oox.shape", "no graphic or media URL found");
+return;
+}
FSHelperPtr pFS = GetFS();
XmlFilterBase* pFB = GetFB();
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 4de1842e917c..9210da630603 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -592,7 +592,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141173_missingFrames)
saveAndReload(TestFilter::DOCX);
// Without the fix in place, almost all of the text and textboxes were
missing.
// Without the fix, there were only 2 shapes (mostly unseen).
-CPPUNIT_ASSERT_EQUAL(14, getShapes());
+CPPUNIT_ASSERT_EQUAL(13, getShapes());
}
DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabSpacing, "tdf142404_tabSpacing.docx")
core.git: oox/source
oox/source/export/chartexport.cxx | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
New commits:
commit f10eb0f12eab9cdf1772ea2a1169e5dfce5212f9
Author: Aron Budea
AuthorDate: Mon Jan 19 02:32:00 2026 +1030
Commit: Aron Budea
CommitDate: Tue Jan 20 09:39:24 2026 +0100
oox: Limit export of dLblPos attr in pie charts to valid values
Based on [MS-OI29500].
This also fixes PPTX export of fdo56877-2.odp, which seems
to have bogus content in Object 1/content.xml:
It used to export as this invalid
attribute:
Change-Id: I710db739b36c469d300273ae016e3d5686b8c578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197525
Reviewed-by: Aron Budea
Tested-by: Jenkins
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 4c3c1349fa13..bda05a4b68c9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -5229,7 +5229,11 @@ void ChartExport::writeLabelProperties(
if (xPropSet->getPropertyValue(u"LabelPlacement"_ustr) >>=
nLabelPlacement)
{
if (!rLabelParam.maAllowedValues.count(nLabelPlacement))
+{
+SAL_WARN("oox", "this label placement not allowed in OOXML
for current chart type: "
++ OString::number(nLabelPlacement));
nLabelPlacement = rLabelParam.meDefault;
+}
pFS->singleElement(FSNS(XML_c, XML_dLblPos), XML_val,
toOOXMLPlacement(nLabelPlacement));
}
}
@@ -5293,6 +5297,8 @@ void ChartExport::exportDataLabels(
// We must not export label placement property when the chart type doesn't
// support this option in MS Office, else MS Office would think the file
// is corrupt & refuse to open it.
+// For allowed values see 2.1.1456 Part 1 Section 21.2.2.48,
+// dLblPos (Data Label Position) in [MS-OI29500].
const chart::TypeGroupInfo& rInfo =
chart::GetTypeGroupInfo(static_cast(eChartType));
LabelPlacementParam aParam(!mbIs3DChart, rInfo.mnDefLabelPos);
@@ -5302,8 +5308,16 @@ void ChartExport::exportDataLabels(
if(getChartType() == chart::TYPEID_DOUGHNUT)
aParam.mbExport = false;
else
-// All pie charts support label placement.
-aParam.mbExport = true;
+{
+// All pie charts support label placement.
+aParam.mbExport = true;
+aParam.maAllowedValues.clear();
+
aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::OUTSIDE);
+
aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::INSIDE);
+
aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::CENTER);
+
aParam.maAllowedValues.insert(css::chart::DataLabelPlacement::AVOID_OVERLAP);
+aParam.meDefault =
css::chart::DataLabelPlacement::AVOID_OVERLAP;
+}
break;
case chart::TYPEID_AREA:
case chart::TYPEID_RADARLINE:
core.git: oox/source sw/qa
oox/source/export/vmlexport.cxx|2 +-
oox/source/vml/vmlshapecontext.cxx |7 ++-
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |3 ---
3 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit bf5cc0ae565fb3a11c4cb6b081f99f6daea26dfb
Author: Noel Grandin
AuthorDate: Thu Jan 15 16:03:07 2026 +0200
Commit: Noel Grandin
CommitDate: Mon Jan 19 10:48:42 2026 +0100
officeotron: attribute signinginstructions should not have a namespace
prefix
we end up with
https://gerrit.libreoffice.org/c/core/+/197427
Tested-by: Jenkins
Reviewed-by: Michael Stahl
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 0613426e6fe5..40fb4624fa5c 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -711,7 +711,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps,
const tools::Rectangle&
{
pAttrListSignatureLine->add(XML_signinginstructionsset, "t");
pAttrListSignatureLine->add(
-FSNS(XML_o, XML_signinginstructions),
+XML_signinginstructions,
pSdrGrafObj->getSignatureLineSigningInstructions());
}
pAttrListSignatureLine->add(
diff --git a/oox/source/vml/vmlshapecontext.cxx
b/oox/source/vml/vmlshapecontext.cxx
index 5839fa56..01e2054bb078 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -649,7 +649,12 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32
nElement, const Attri
mrShapeModel.maSignatureLineSuggestedSignerEmail
= rAttribs.getStringDefaulted(O_TOKEN(suggestedsigneremail));
mrShapeModel.maSignatureLineSigningInstructions
-= rAttribs.getStringDefaulted(O_TOKEN(signinginstructions));
+= rAttribs.getStringDefaulted(XML_signinginstructions);
+// we used to save this with an "o:" prefix, which is incorrect,
so to support older
+// data, try the older way if the correct way is empty.
+if (mrShapeModel.maSignatureLineSigningInstructions.isEmpty())
+mrShapeModel.maSignatureLineSigningInstructions
+=
rAttribs.getStringDefaulted(O_TOKEN(signinginstructions));
mrShapeModel.mbSignatureLineShowSignDate =
ConversionHelper::decodeBool(
rAttribs.getString(XML_showsigndate, u"t"_ustr)); // default
is true
mrShapeModel.mbSignatureLineCanAddComment =
ConversionHelper::decodeBool(
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 428aebd888bd..291a953ae839 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -391,9 +391,6 @@ CPPUNIT_TEST_FIXTURE(Test,
testTdf44832_testSectionWithDifferentHeader)
DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape,
"signature-line-all-props-set.docx")
{
-// FIXME: validation error in OOXML export: Errors: 1
-skipValidation();
-
uno::Reference xSignatureLineShape = getShape(1);
uno::Reference xPropSet(xSignatureLineShape,
uno::UNO_QUERY);
core.git: oox/source
oox/source/drawingml/customshapegeometry.cxx | 63 ++-
1 file changed, 25 insertions(+), 38 deletions(-)
New commits:
commit 4bfb38588765661b092e8a988e3b50d12c2e9045
Author: Noel Grandin
AuthorDate: Thu Jan 15 20:34:08 2026 +0200
Commit: Noel Grandin
CommitDate: Sun Jan 18 20:00:23 2026 +0100
use more frozen::unordered_map
Change-Id: I04a89864e38e7b16c164f62da27074b9518caf83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197395
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/drawingml/customshapegeometry.cxx
b/oox/source/drawingml/customshapegeometry.cxx
index 40bdd6f5cba6..dea80bcfef81 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -31,6 +31,9 @@
#include
#include
#include
+#include
+#include
+#include
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -63,39 +66,31 @@ enum FormulaCommand
FC_VAL
};
-struct FormulaCommandNameTable
-{
-const char* pS;
-FormulaCommand pE;
-};
-
}
-const FormulaCommandNameTable pFormulaCommandNameTable[] =
+constexpr auto aCommandHashMap =
frozen::make_unordered_map(
{
-{ "*/", FC_MULDIV },
-{ "+-", FC_PLUSMINUS },
-{ "+/", FC_PLUSDIV },
-{ "ifelse", FC_IFELSE },
-{ "?:", FC_IFELSE1 },
-{ "abs",FC_ABS },
-{ "at2",FC_AT2 },
-{ "cat2", FC_CAT2 },
-{ "cos",FC_COS },
-{ "max",FC_MAX },
-{ "min",FC_MIN },
-{ "mod",FC_MOD },
-{ "pin",FC_PIN },
-{ "sat2", FC_SAT2 },
-{ "sin",FC_SIN },
-{ "sqrt", FC_SQRT },
-{ "tan",FC_TAN },
-{ "val",FC_VAL }
+{ u"*/", FC_MULDIV },
+{ u"+-", FC_PLUSMINUS },
+{ u"+/", FC_PLUSDIV },
+{ u"ifelse", FC_IFELSE },
+{ u"?:", FC_IFELSE1 },
+{ u"abs",FC_ABS },
+{ u"at2",FC_AT2 },
+{ u"cat2", FC_CAT2 },
+{ u"cos",FC_COS },
+{ u"max",FC_MAX },
+{ u"min",FC_MIN },
+{ u"mod",FC_MOD },
+{ u"pin",FC_PIN },
+{ u"sat2", FC_SAT2 },
+{ u"sin",FC_SIN },
+{ u"sqrt", FC_SQRT },
+{ u"tan",FC_TAN },
+{ u"val",FC_VAL }
+});
-};
-typedef std::unordered_map< OUString, FormulaCommand > FormulaCommandHMap;
-static const FormulaCommandHMap* pCommandHashMap;
static OUString GetFormulaParameter( const EnhancedCustomShapeParameter&
rParameter )
{
@@ -459,14 +454,6 @@ GeomGuideListContext::GeomGuideListContext(
ContextHandler2Helper const & rParen
static OUString convertToOOEquation( CustomShapeProperties&
rCustomShapeProperties, std::u16string_view rSource )
{
-if ( !pCommandHashMap )
-{
-FormulaCommandHMap* pHM = new FormulaCommandHMap;
-for(const FormulaCommandNameTable& i : pFormulaCommandNameTable)
-(*pHM)[ OUString::createFromAscii( i.pS ) ] = i.pE;
-pCommandHashMap = pHM;
-}
-
std::vector< OUString > aTokens;
sal_Int32 nIndex = 0;
do
@@ -489,8 +476,8 @@ static OUString convertToOOEquation( CustomShapeProperties&
rCustomShapeProperti
for ( sal_Int32 i = 0; i < nParameters; i++ )
sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate(
rCustomShapeProperties, aTokens[ i + 1 ], false ) );
-const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find(
aTokens[ 0 ] ) );
-if ( aIter == pCommandHashMap->end() )
+const auto aIter( aCommandHashMap.find( aTokens[ 0 ] ) );
+if ( aIter == aCommandHashMap.end() )
return OUString();
OUString aEquation;
core.git: oox/source sw/qa sw/source vcl/qa
oox/source/shape/WpsContext.cxx |2
sw/qa/extras/layout/layout2.cxx | 26 +++---
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 14 +--
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 30 +++
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |4
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |8 -
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |5 -
sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |8 -
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |4
sw/qa/extras/ooxmlimport/ooxmlimport.cxx| 10 +-
sw/qa/extras/uiwriter/uiwriter5.cxx | 24 ++---
sw/qa/extras/ww8export/ww8export2.cxx | 49 +++-
sw/source/core/text/porrst.cxx |7 -
sw/source/filter/ww8/docxattributeoutput.cxx|8 +
sw/source/filter/ww8/ww8atr.cxx |8 +
sw/source/filter/ww8/ww8par6.cxx| 19 ++--
sw/source/writerfilter/dmapper/DomainMapper.cxx | 42 --
sw/source/writerfilter/dmapper/DomainMapper.hxx |4
sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx |3
sw/source/writerfilter/dmapper/StyleSheetTable.cxx |2
vcl/qa/cppunit/pdfexport/pdfexport.cxx |2
21 files changed, 172 insertions(+), 107 deletions(-)
New commits:
commit f883204cdb122de784b02e047ab3f57a95611bc4
Author: Jonathan Clark
AuthorDate: Fri Jan 9 15:47:36 2026 -0700
Commit: Jonathan Clark
CommitDate: Sat Jan 17 00:48:26 2026 +0100
sw: Add para align start/end support to DOC/DOCX filters
In many cases, what DOC/DOCX represents as left/right paragraph
alignment is actually a start/end alignment, relative to the text
direction. Previously, we emulated support for this by automatically
flipping the alignments of RTL paragraphs during parsing, with somewhat
mixed success.
This change updates the DOC/DOCX filters to instead take advantage of
LO's native start/end paragraph alignment support, when possible.
Change-Id: If837e10deb5273c15c6d5e521b48a419723cf13b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197306
Tested-by: Jenkins
Reviewed-by: Jonathan Clark
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index f8d249c07af2..3059a63ed749 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -471,9 +471,11 @@ void lcl_setTextAnchorFromTextProps(const
uno::Reference& x
aTextPropMap.getValue(u"ParaAdjust"_ustr) >>= nParaAlign;
switch (nParaAlign)
{
+case sal_Int16(style::ParagraphAdjust_START):
case sal_Int16(style::ParagraphAdjust_LEFT):
eHorzAdjust = drawing::TextHorizontalAdjust_LEFT;
break;
+case sal_Int16(style::ParagraphAdjust_END):
case sal_Int16(style::ParagraphAdjust_RIGHT):
eHorzAdjust = drawing::TextHorizontalAdjust_RIGHT;
break;
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 1c7eecdffb36..e4cdec863d79 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -1011,7 +1011,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testHiddenParaProps)
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"def"_ustr, pTextFrame->GetText());
CPPUNIT_ASSERT_EQUAL(
-SvxAdjust::Left,
+SvxAdjust::ParaStart,
pTextFrame->GetTextNodeForParaProps()->GetSwAttrSet().Get(RES_PARATR_ADJUST).GetAdjust());
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"6 hidden-merge, visible"_ustr,
pTextFrame->GetText());
@@ -1023,7 +1023,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testHiddenParaProps)
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"def"_ustr, pTextFrame->GetText());
CPPUNIT_ASSERT_EQUAL(
-SvxAdjust::Left,
+SvxAdjust::ParaStart,
pTextFrame->GetTextNodeForParaProps()->GetSwAttrSet().Get(RES_PARATR_ADJUST).GetAdjust());
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"7 visible, hidden-merge"_ustr,
pTextFrame->GetText());
@@ -1035,7 +1035,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testHiddenParaProps)
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"ghi"_ustr, pTextFrame->GetText());
CPPUNIT_ASSERT_EQUAL(
-SvxAdjust::Left,
+SvxAdjust::ParaStart,
pTextFrame->GetTextNodeForParaProps()->GetSwAttrSet().Get(RES_PARATR_ADJUST).GetAdjust());
pTextFrame = dynamic_cast(pTextFrame->GetNext());
CPPUNIT_ASSERT_EQUAL(u"8 visible, delete-merge, visible, hidden-merge,
visible"_ustr,
@@ -
core.git: oox/source
oox/source/ole/vbaexport.cxx |8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 0e439c7289a3a0679929a9baf7ee41c8f31e6d96
Author: Caolán McNamara
AuthorDate: Fri Jan 16 11:39:28 2026 +
Commit: Caolán McNamara
CommitDate: Fri Jan 16 18:30:14 2026 +0100
reuse comphelper::rng::uniform_uint_distribution
see also:
commit 6d9228d6b14d968fa92df3ca018a555f8652e579
Date: Fri May 3 14:17:27 2024 +0100
lok: reseed comphelper's random number generator on fork.
Also avoid std::random_device it doesn't work in a COOL
kit process.
Change-Id: I0ea3607a689632bf75861d367db70ac6c7f40a90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197443
Tested-by: Jenkins
Reviewed-by: Caolán McNamara
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 049c8fc1e9a9..7131c8755d13 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -10,7 +10,6 @@
#include
#include
-#include
#include
#include
@@ -30,6 +29,7 @@
#include
+#include
#include
#include
#include
@@ -376,14 +376,10 @@ VBAEncryption::VBAEncryption(const sal_uInt8* pData,
const sal_uInt16 length,
,mnEncryptedByte2(0)
,mnProjKey(nProjKey)
,mnIgnoredLength(0)
-,mnSeed(0x00)
+,mnSeed(comphelper::rng::uniform_uint_distribution(0, 255))
,mnVersionEnc(0)
,meTextEncoding(eTextEncoding)
{
-std::random_device rd;
-std::mt19937 gen(rd());
-std::uniform_int_distribution<> dis(0, 255);
-mnSeed = dis(gen);
}
void VBAEncryption::writeSeed()
core.git: oox/source
oox/source/drawingml/customshapegeometry.cxx | 274 +--
1 file changed, 137 insertions(+), 137 deletions(-)
New commits:
commit d50a0ffd0117480a0b3b0e0369011746fa52727e
Author: Noel Grandin
AuthorDate: Thu Jan 15 20:28:56 2026 +0200
Commit: Noel Grandin
CommitDate: Fri Jan 16 09:00:56 2026 +0100
flatten convertToOOEquation a little
Change-Id: I9b5a7c881ffe315178d48af09bf20331508a49a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197394
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/drawingml/customshapegeometry.cxx
b/oox/source/drawingml/customshapegeometry.cxx
index 3b754e0b5dd6..40bdd6f5cba6 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -477,148 +477,148 @@ static OUString convertToOOEquation(
CustomShapeProperties& rCustomShapeProperti
}
while ( nIndex >= 0 );
-OUString aEquation;
-if ( !aTokens.empty() )
-{
-sal_Int32 i, nParameters = aTokens.size() - 1;
-if ( nParameters > 3 )
-nParameters = 3;
+if ( aTokens.empty() )
+return OUString();
+
+sal_Int32 nParameters = aTokens.size() - 1;
+if ( nParameters > 3 )
+nParameters = 3;
-OUString sParameters[ 3 ];
+OUString sParameters[ 3 ];
-for ( i = 0; i < nParameters; i++ )
-sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate(
rCustomShapeProperties, aTokens[ i + 1 ], false ) );
+for ( sal_Int32 i = 0; i < nParameters; i++ )
+sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate(
rCustomShapeProperties, aTokens[ i + 1 ], false ) );
-const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find(
aTokens[ 0 ] ) );
-if ( aIter != pCommandHashMap->end() )
+const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find(
aTokens[ 0 ] ) );
+if ( aIter == pCommandHashMap->end() )
+return OUString();
+
+OUString aEquation;
+switch( aIter->second )
+{
+case FC_MULDIV :
{
-switch( aIter->second )
-{
-case FC_MULDIV :
-{
-if ( nParameters == 3 )
-aEquation = sParameters[ 0 ] + "*" + sParameters[ 1 ]
-+ "/" + sParameters[ 2 ];
-}
-break;
-case FC_PLUSMINUS :
-{
-if ( nParameters == 3 )
-aEquation = sParameters[ 0 ] + "+" + sParameters[ 1 ]
-+ "-" + sParameters[ 2 ];
-}
-break;
-case FC_PLUSDIV :
-{
-if ( nParameters == 3 )
-aEquation = "(" + sParameters[ 0 ] + "+"
-+ sParameters[ 1 ] + ")/" + sParameters[ 2 ];
-}
-break;
-case FC_IFELSE :
-case FC_IFELSE1 :
-{
-if ( nParameters == 3 )
-aEquation = "if(" + sParameters[ 0 ] + ","
-+ sParameters[ 1 ] + "," + sParameters[ 2 ] + ")";
-}
-break;
-case FC_ABS :
-{
-if ( nParameters == 1 )
-aEquation = "abs(" + sParameters[ 0 ] + ")";
-}
-break;
-case FC_AT2 :
-{
-if ( nParameters == 2 )
-aEquation = "(1080*atan2(" + sParameters[ 1 ] + ","
-+ sParameters[ 0 ] + "))/pi";
-}
-break;
-case FC_CAT2 :
-{
-if ( nParameters == 3 )
-aEquation = sParameters[ 0 ] + "*(cos(atan2(" +
-sParameters[ 2 ] + "," + sParameters[ 1 ] + ")))";
-}
-break;
-case FC_COS :
-{
-if ( nParameters == 2 )
-aEquation = sParameters[ 0 ] + "*cos(pi*(" +
-sParameters[ 1 ] + ")/1080)";
-}
-break;
-case FC_MAX :
-{
-if ( nParameters == 2 )
-aEquation = "max(" + sParameters[ 0 ] + "," +
-sParameters[ 1 ] + ")";
-}
-break;
-case FC_MIN :
-{
-if ( nParameters == 2 )
-aEquation = "min(" + sParameters[ 0 ] + "," +
-sParameters[ 1 ] + ")";
-}
-break;
-case FC_MOD :
-{
-if ( nParameters == 3 )
-
core.git: oox/source
oox/source/export/drawingml.cxx | 65 1 file changed, 34 insertions(+), 31 deletions(-) New commits: commit eb0f75e3140952179edf3be53000e67a8a20a11e Author: [email protected] AuthorDate: Thu Jan 15 09:42:48 2026 -0500 Commit: Justin Luth CommitDate: Fri Jan 16 01:38:47 2026 +0100 follow-up tdf#166335: concern about 'correctness' and cleanup This function has been full of coverity bugs and MS Office reporting the output as corrupt, so it seems appropriate to warn the code-reader that absolutely nothing about the function might actually be correct. bIsOOXML could have been more easily gotten by just extending aCustomShape2d to return m_bOOXMLShape, if it actually would eventually be needed. Change-Id: I4d74291c51ad46127a3121cb63607bf683ab4f9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197392 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 9253dead3c15..78622750c84c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4938,6 +4938,9 @@ void prepareTextArea(const EnhancedCustomShape2d& rEnhancedCustomShape2d, bool IsValidOOXMLFormula(std::u16string_view sFormula) { +// NOTE: this list is not complete - just a first effort at a reasonable list, +// and most of these are not yet even generated by GetFormula()... + // Accepted Formulas // "val n1" // "abs n1" @@ -4946,35 +4949,38 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula) // "max n1 n2" // "*/ n1 n2 n3" // "+- n1 n2 n3" -// "?: n1 n2 n3" +// "+/ n1 n2 n3" +// "?: n1 n2 n3" // ifelse // Below vector contains validTokens for the 1st token based on the number of tokens in the formula. The order is: 2, 3, 4 const std::vector> validTokens -= { { "val", "abs", "sqrt" }, { "min", "max" }, { "*/", "+-", "?:" } }; += { { "val", "abs", "sqrt" }, { "min", "max" }, { "*/", "+-", "+/", "?:" } }; const std::set builtInVariables = { "w", "h", "t", "b", "l", "r" }; const std::vector strTokens = comphelper::string::split(sFormula, ' '); sal_uInt16 nSize = strTokens.size(); -if (nSize > 1 && nSize < 5) +if (nSize < 2 || nSize > 4) +return false; + +auto aTokens = validTokens[nSize - 2]; + +// Check whether the 1st token is valid +if (aTokens.find(strTokens[0]) == aTokens.end()) +return false; + +// Check that the remaining tokens are either numbers or built-in variables +for (sal_Int16 i = 1; i < nSize; i++) { -auto aTokens = validTokens[nSize - 2]; +OUString sVal = strTokens[i]; +if (builtInVariables.find(sVal) != builtInVariables.end()) +continue; // valid built-in variable -// Check whether the 1st token is valid -if (aTokens.find(strTokens[0]) == aTokens.end()) -return false; +// TODO: recognize valid 'guide name' pointing to other equations or adjustments -// Check that the remaining tokens are either numbers or built-in variables -for (sal_Int16 i = 1; i < nSize; i++) -{ -OUString sVal = strTokens[i]; -sal_Int64 nVal = sVal.toInt64(); -if (builtInVariables.find(sVal) == builtInVariables.end() -&& OUString::number(nVal) != sVal) -return false; -} -return true; +if (OUString::number(sVal.toInt64()) != sVal) +return false; // not a simple number } -return false; +return true; } OUString GetFormula(const OUString& sEquation) @@ -4983,6 +4989,9 @@ OUString GetFormula(const OUString& sEquation) // TODO: This needs to be completely re-written. It is extremely simplistic/minimal. // What is needed here is the reverse of convertToOOEquation. +// WARNING: Almost all of the current logic here was created simply to avoid 'corrupt document' +// notices from MS Office. The 'correct position' of the actual glue-points might be very wrong. + // If the equation is numerical sal_Int64 nValue = sEquation.toInt64(); if (!sEquation.isEmpty() && OUString::number(nValue) == sEquation) @@ -5027,7 +5036,7 @@ OUString GetFormula(const OUString& sEquation) void prepareGluePoints(std::vector& rGuideList, const css::uno::Sequence& aEquations, const uno::Sequence& rGluePoints, - const bool /*bIsOOXML*/, const sal_Int32 nWidth, const sal_Int32 nHeight) + const sal_Int32 nWidth, const sal_Int32 nHeight) { if (rGluePoints.hasElements()) { @@ -5065,7 +5074,12 @@ void prepareGluePoints(std::vector& rGuideList, continue; } else +{ +// nice TODO: avoid divide
core.git: oox/source
oox/source/export/drawingml.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit f956174c8d50cb6cc528c37ec42b2b63ffadb418 Author: Karthik Godha AuthorDate: Thu Dec 25 15:16:40 2025 +0530 Commit: Michael Stahl CommitDate: Thu Jan 15 17:17:34 2026 +0100 tdf#170035:Prefix numericals with "val" in guidelist The `fmla` value in `a:gd` XML attribute should be perfixed by "val " for numerical values. Change-Id: I4678a53679d8f2d9e21d6cbe255c922a4cf023c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196210 Reviewed-by: Michael Stahl Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197359 Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 1d7d647b9c2f..9253dead3c15 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4983,6 +4983,11 @@ OUString GetFormula(const OUString& sEquation) // TODO: This needs to be completely re-written. It is extremely simplistic/minimal. // What is needed here is the reverse of convertToOOEquation. +// If the equation is numerical +sal_Int64 nValue = sEquation.toInt64(); +if (!sEquation.isEmpty() && OUString::number(nValue) == sEquation) +return "val " + sEquation; + OUString sFormula = sEquation; /* replace LO native placeholders with OOXML placeholders
core.git: oox/source sd/qa sw/qa
oox/source/export/drawingml.cxx| 101 + sd/qa/unit/export-tests-ooxml3.cxx |7 ++ sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |6 + 3 files changed, 88 insertions(+), 26 deletions(-) New commits: commit efeee389064ae7d56020fdbfe38a5e9cb48bc016 Author: [email protected] AuthorDate: Sat Jan 10 18:14:30 2026 -0500 Commit: Justin Luth CommitDate: Thu Jan 15 15:08:40 2026 +0100 tdf#166335 oox export: don't export invalid gluepoint fmla We started exporting gluepoints with 25.2.2 commit/86d36ee56521438069504fbacff8dc2aff3a1afc "tdf165262 PPTX export: fix shape export regression" and some of them were not in valid OOXML format. In this case, we were exporting an empty fmla="" which is seen as a corrupt document by MS Office. make CppunitTest_sd_export_tests-ooxml3 \ CPPUNIT_TEST_NAME=testTdf135843 make CppunitTest_sw_ooxmlexport13 CPPUNIT_TEST_NAME=testTdf123435 Change-Id: I4297d24b8e884199b8da0253ab855417b828aa75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197003 Reviewed-by: Justin Luth Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index e517f1ede526..1d7d647b9c2f 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4977,18 +4977,44 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula) return false; } -OUString GetFormula(const OUString& sEquation, const OUString& sReplace, const OUString& sNewStr) +OUString GetFormula(const OUString& sEquation) { +assert(!sEquation.isEmpty() && "surely an equation would never be empty..."); +// TODO: This needs to be completely re-written. It is extremely simplistic/minimal. +// What is needed here is the reverse of convertToOOEquation. + OUString sFormula = sEquation; -size_t nPos = sFormula.indexOf(sReplace); -if (nPos != std::string::npos) + +/* replace LO native placeholders with OOXML placeholders + * #1: e.g. 'logwidth' + * #2: e.g. 'logwidth/2' + * #3: e.g. '1234*logwidth/5678' + */ + +if (sEquation == "logwidth") // #1 +return "val w"; +if (sEquation == "logheight") +return "val h"; +if (sEquation.startsWith("logwidth/")) // #2 +sFormula = u"*/ 1 w "_ustr + sEquation.subView(9); +else if (sEquation.startsWith("logheight/")) +sFormula = u"*/ 1 h "_ustr + sEquation.subView(10); +else { -OUString sModifiedEquation = sFormula.replaceAt(nPos, sReplace.getLength(), sNewStr); -sFormula = "*/ " + sModifiedEquation; +size_t nPos = sFormula.indexOf("*logwidth/"); //#3 +if (nPos != std::string::npos) +sFormula = "*/ " + sFormula.replaceAt(nPos, 10, " w "); +else +{ +nPos = sFormula.indexOf("*logheight/"); +if (nPos != std::string::npos) +sFormula = "*/ " + sFormula.replaceAt(nPos, 11, " h "); +} } if (IsValidOOXMLFormula(sFormula)) return sFormula; +else SAL_WARN("oox.shape","invalid OOXML formula["<& rGuideList, const css::uno::Sequence& aEquations, const uno::Sequence& rGluePoints, - const bool bIsOOXML, const sal_Int32 nWidth, const sal_Int32 nHeight) + const bool /*bIsOOXML*/, const sal_Int32 nWidth, const sal_Int32 nHeight) { if (rGluePoints.hasElements()) { -sal_Int32 nIndex = 1; +sal_Int32 nIndex = 0; for (auto const& rGluePoint : rGluePoints) { +++nIndex; sal_Int32 nIdx1 = -1; sal_Int32 nIdx2 = -1; -rGluePoint.First.Value >>= nIdx1; -rGluePoint.Second.Value >>= nIdx2; +bool bValidIdx1 = false; +bool bValidIdx2 = false; +if (rGluePoint.First.Value >>= nIdx1) +{ +bValidIdx1 = rGluePoint.First.Type == EnhancedCustomShapeParameterType::EQUATION; +// I would assume that any EQUATION must define a valid index value. +assert(!bValidIdx1 || (nIdx1 >= 0 && nIdx1 < aEquations.getLength())); +} +else +continue; -if (nIdx1 != -1 && nIdx2 != -1) +if (rGluePoint.Second.Value >>= nIdx2) { -Guide aGuideX; -aGuideX.sName = "GluePoint"_ostr + OString::number(nIndex) + "X"; -aGuideX.sFormula -= (bIsOOXML && nIdx1 >= 0 && nIdx1 < aEquations.getLength()) - ? GetFormula(aEquations[nIdx1], "*logwidth/", " w ").toUtf8() - : "*/ " + OString::number(nIdx1) + " w " + OString::number(nWidth); -rGuideList.push_back(aGuideX); - -Guide aGuideY; -aGuideY
core.git: oox/source sw/qa
oox/source/export/vmlexport.cxx| 13 +--
sw/qa/extras/ooxmlexport/ooxmlexport.cxx |3 --
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 21 --
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 21 --
sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 18 ---
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 18 ---
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 18 ---
sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 24 -
sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 33 -
sw/qa/extras/ooxmlexport/ooxmlexport17.cxx |8 ---
sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 12 --
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |3 --
sw/qa/extras/ooxmlexport/ooxmlexport20.cxx | 33 -
sw/qa/extras/ooxmlexport/ooxmlexport21.cxx | 15 -
sw/qa/extras/ooxmlexport/ooxmlexport23.cxx |9 ---
sw/qa/extras/ooxmlexport/ooxmlexport24.cxx |9 ---
sw/qa/extras/ooxmlexport/ooxmlexport25.cxx |5
sw/qa/extras/ooxmlexport/ooxmlexport26.cxx | 12 --
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 15 -
sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |6 -
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |4 ---
sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |3 --
22 files changed, 11 insertions(+), 292 deletions(-)
New commits:
commit ad70c58224084f8f390cd01713f8fd03962680d0
Author: Noel Grandin
AuthorDate: Mon Jan 12 21:02:56 2026 +0200
Commit: Michael Stahl
CommitDate: Tue Jan 13 20:10:20 2026 +0100
officeotron says that o:spt needs to be numeric
Change-Id: I9d2f995d7cdc2feae547b61e60f75ed608277386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197137
Reviewed-by: Michael Stahl
Tested-by: Jenkins
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 5800219fa47a..0613426e6fe5 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1260,12 +1260,21 @@ sal_uInt32 VMLExport::GenerateShapeId()
OString VMLExport::GetVMLShapeTypeDefinition(
std::string_view sShapeID, const bool bIsPictureFrame )
{
+// officeotron says that o:spt needs to be numeric
+sal_Int32 nSptId = 0;
+std::string_view sRest;
+if (o3tl::starts_with(sShapeID, "ole_rId", &sRest))
+nSptId = o3tl::toInt32(sRest);
+else
+nSptId = o3tl::toInt32(sShapeID);
+SAL_WARN_IF(nSptId == 0, "oox", "o:spt needs to be numeric, but we have "
<< sShapeID);
+assert(nSptId != 0);
OString sShapeType;
if ( !bIsPictureFrame )
// We don't have a shape definition for host control in
presetShapeDefinitions.xml
// So use a definition copied from DOCX file created with MSO
sShapeType = OString::Concat("
"
"
"
"
"
@@ -1275,7 +1284,7 @@ OString VMLExport::GetVMLShapeTypeDefinition(
// We don't have a shape definition for picture frame in
presetShapeDefinitions.xml
// So use a definition copied from DOCX file created with MSO
sShapeType = OString::Concat("
"
"
"
"
"
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 22cd56f53268..e62cdb7ad591 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -44,9 +44,6 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo81381)
{
createSwDoc("fdo81381.docx");
-// FIXME: validation error in OOXML export: Errors: 2
-skipValidation();
-
save(TestFilter::DOCX);
xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
assertXPath(pXmlDoc,
"/w:document/w:body/w:p[1]/w:r[1]/w:object[1]/o:OLEObject[1]", "DrawAspect",
u"Icon");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 51532b3cb6d8..6238bfd89e69 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -45,9 +45,6 @@ public:
DECLARE_OOXMLEXPORT_TEST(testWPGtextboxes, "testWPGtextboxes.docx")
{
-// FIXME: validation error in OOXML export: Errors: 1
-skipValidation();
-
CPPUNIT_ASSERT_EQUAL(2, getShapes());
auto MyShape = getShape(1);
@@ -169,9 +166,6 @@ CPPUNIT_TEST_FIXTURE(Test,
testFloattableNestedCellStartDOCXExport)
DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
{
-// FIXME: validation error in OOXML export: Errors: 1
-skipValidation();
-
uno::Reference xShape = getShape(1);
// Check position, it was nearly 0. This is a shape, so use getPosition(),
not a property.
CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(548005),
xShape->getPosition().X);
@@ -679,9 +673,6 @@ DECLARE_OOXMLEXPORT_TEST(testLargeTwips, "large-twips.docx"
)
DECLARE_OOXMLEXPORT_T
core.git: oox/source
oox/source/export/chartexport.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 67428087bfe09ea0d4754628729b83069a950ba7
Author: Andrea Gelmini
AuthorDate: Sat Jan 10 08:23:16 2026 +0100
Commit: Julien Nabet
CommitDate: Sat Jan 10 11:53:00 2026 +0100
Fix typo
Change-Id: I7c1776a2388e316b981366a629f58b724a0f692f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196950
Reviewed-by: Julien Nabet
Tested-by: Julien Nabet
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index f477e62664b2..4c3c1349fa13 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3248,7 +3248,7 @@ void ChartExport::exportBubbleChart( const Reference<
chart2::XChartType >& xCha
}
// Output a chartex chart. *sTypeName should be the string used in the layoutId
-// attribue of
+// attribute of
void ChartExport::exportChartex( const Reference< chart2::XChartType >&
xChartType,
const char* sTypeName)
{
core.git: oox/source
oox/source/drawingml/chart/datasourcecontext.cxx |1
oox/source/drawingml/chart/seriescontext.cxx |1
oox/source/export/chartexport.cxx| 41 +--
3 files changed, 40 insertions(+), 3 deletions(-)
New commits:
commit 2cf51173f3e2915065a355058ef0c5fe15cc89cb
Author: Kurt Nordback
AuthorDate: Mon Dec 29 13:36:25 2025 -0700
Commit: Tomaž Vajngerl
CommitDate: Fri Jan 9 07:21:55 2026 +0100
tdf#165742 Step 5.2: Fix some round-trip failures
Fix formula references in chartex data elements, and put in
special handling for sunburst and treemap formula references
(these two types, at least, require category references as well
as value references).
Change-Id: Id9a2b1c54559f0f19a39d3635ff314e5894a9f0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196316
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl
diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx
b/oox/source/drawingml/chart/datasourcecontext.cxx
index d27b715dbbc7..2532b6ad866d 100644
--- a/oox/source/drawingml/chart/datasourcecontext.cxx
+++ b/oox/source/drawingml/chart/datasourcecontext.cxx
@@ -298,6 +298,7 @@ void StringSequenceContext::onCharacters( const OUString&
rChars )
switch( getCurrentElement() )
{
case C_TOKEN( f ):
+case CX_TOKEN( f ):
mrModel.maFormula = rChars;
break;
case C15_TOKEN( f ):
diff --git a/oox/source/drawingml/chart/seriescontext.cxx
b/oox/source/drawingml/chart/seriescontext.cxx
index c913aa31928e..ba0876eb 100644
--- a/oox/source/drawingml/chart/seriescontext.cxx
+++ b/oox/source/drawingml/chart/seriescontext.cxx
@@ -790,6 +790,7 @@ ContextHandlerRef ChartexSeriesContext::onCreateContext(
sal_Int32 nElement, con
return new DataLabelsContext( *this,
mrModel.mxLabels.create(false) );
case CX_TOKEN( dataId ):
mrModel.mnDataId = rAttribs.getInteger(XML_val, -1);
+mrModel.mnIndex = rAttribs.getInteger( XML_val, -1 );
return nullptr;
case CX_TOKEN( layoutPr ):
// This looks complicated. TODO
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 5609ecc3c52b..2c695a94d7ca 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1583,14 +1583,49 @@ void ChartExport::exportData_chartex( [[maybe_unused]]
const Reference< css::cha
// The data id needs to agree with the id in
exportSeries(). See DATA_ID_COMMENT
pFS->startElement(FSNS(XML_cx, XML_data), XML_id,
OUString::number(nSeriesIndex));
-// .xlsx chartex files seem to have this magical
"_xlchart.v2.0" string,
+// .xlsx chartex files seem to have this magical
"_xlchart..." string,
// and no explicit data, while .docx and .pptx contain the
literal data,
// as well as a ../embeddings file (which LO doesn't seem
to produce).
// But there's probably a smarter way to determine which
pathway to take
// than based on document type.
if (GetDocumentType() == DOCUMENT_XLSX) {
// Just hard-coding this for now
-pFS->startElement(FSNS(XML_cx, XML_numDim), XML_type,
"val");
+
+sal_Int32 nSuffixVal = nSeriesIndex;
+
+// Output category data formula for some chart types.
+// (This is completely hacky)
+if (eChartType == chart::TYPEID_SUNBURST ||
+eChartType == chart::TYPEID_TREEMAP) {
+pFS->startElement(FSNS(XML_cx, XML_strDim),
XML_type, "cat");
+pFS->startElement(FSNS(XML_cx, XML_f));
+
+std::string sFormulaId = "_xlchart.v1.";
+sFormulaId.append(std::to_string(nSuffixVal));
+
+pFS->writeEscaped(sFormulaId);
+
+pFS->endElement(FSNS(XML_cx, XML_f));
+pFS->endElement(FSNS(XML_cx, XML_strDim));
+
+++nSuffixVal;
+}
+
+// Set the ST_NumericDimensionType. For some (stupid?)
+// reason, MSO requires the value data for sunburst and
+// treemap to be type "size", while for most other
chart
+// types it's of type "val".
+std::string sNumDimType;
+if (eChartType == chart::TYPEID_SUNBURST ||
+eChartType == chart::TYPEID_TREEMAP) {
+sNumDimType = "size";
+} else {
+
core.git: oox/source
oox/source/export/drawingml.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3f0da602afad01497b132bd417cee9c8c320e427
Author: Andrea Gelmini
AuthorDate: Wed Jan 7 02:15:23 2026 +0100
Commit: Julien Nabet
CommitDate: Wed Jan 7 12:07:59 2026 +0100
Fix typo
Change-Id: I747b46e8d753551fb713478ab0d26ccad78d1fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196646
Reviewed-by: Julien Nabet
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 6d93e4a3101c..34bd8a2d710e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4961,7 +4961,7 @@ bool IsValidOOXMLFormula(std::u16string_view sFormula)
if (aTokens.find(strTokens[0]) == aTokens.end())
return false;
-// Check that the remaining tokens are either numbers or buit-in
variables
+// Check that the remaining tokens are either numbers or built-in
variables
for (sal_Int16 i = 1; i < nSize; i++)
{
OUString sVal = strTokens[i];
core.git: oox/source
oox/source/export/drawingml.cxx | 48 +++-
1 file changed, 47 insertions(+), 1 deletion(-)
New commits:
commit 5f80331513b13ba5ebb0b7362d34d5039698db99
Author: Karthik Godha
AuthorDate: Thu Dec 25 15:11:01 2025 +0530
Commit: Michael Stahl
CommitDate: Tue Jan 6 19:04:36 2026 +0100
tdf#170035:Add OOXML formula check for guidelist
Add condition check to skip exported of internal names/equations to
OOXML.
Change-Id: I0c03bbaa7ea61dd4f526fc0476482571df7e7cf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196209
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 0f0bb6ba234c371e1c5a6420ba1e441322c9c354)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196545
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index aa650c0d541e..6d93e4a3101c 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -46,6 +47,7 @@
#include
#include
+#include
#include
#include
@@ -4932,6 +4934,47 @@ void prepareTextArea(const EnhancedCustomShape2d&
rEnhancedCustomShape2d,
return;
}
+bool IsValidOOXMLFormula(std::u16string_view sFormula)
+{
+// Accepted Formulas
+// "val n1"
+// "abs n1"
+// "sqrt n1"
+// "min n1 n2"
+// "max n1 n2"
+// "*/ n1 n2 n3"
+// "+- n1 n2 n3"
+// "?: n1 n2 n3"
+
+// Below vector contains validTokens for the 1st token based on the number
of tokens in the formula. The order is: 2, 3, 4
+const std::vector> validTokens
+= { { "val", "abs", "sqrt" }, { "min", "max" }, { "*/", "+-", "?:" } };
+const std::set builtInVariables = { "w", "h", "t", "b", "l", "r"
};
+const std::vector strTokens =
comphelper::string::split(sFormula, ' ');
+sal_uInt16 nSize = strTokens.size();
+
+if (nSize > 1 && nSize < 5)
+{
+auto aTokens = validTokens[nSize - 2];
+
+// Check whether the 1st token is valid
+if (aTokens.find(strTokens[0]) == aTokens.end())
+return false;
+
+// Check that the remaining tokens are either numbers or buit-in
variables
+for (sal_Int16 i = 1; i < nSize; i++)
+{
+OUString sVal = strTokens[i];
+sal_Int64 nVal = sVal.toInt64();
+if (builtInVariables.find(sVal) == builtInVariables.end()
+&& OUString::number(nVal) != sVal)
+return false;
+}
+return true;
+}
+return false;
+}
+
OUString GetFormula(const OUString& sEquation, const OUString& sReplace, const
OUString& sNewStr)
{
OUString sFormula = sEquation;
@@ -4942,7 +4985,10 @@ OUString GetFormula(const OUString& sEquation, const
OUString& sReplace, const O
sFormula = "*/ " + sModifiedEquation;
}
-return sFormula;
+if (IsValidOOXMLFormula(sFormula))
+return sFormula;
+
+return OUString();
}
void prepareGluePoints(std::vector& rGuideList,
core.git: oox/source
oox/source/export/shapes.cxx | 21 +
1 file changed, 21 insertions(+)
New commits:
commit 20fb6d3406a393073fd013ea20d1dec498476c87
Author: Karthik Godha
AuthorDate: Mon Dec 15 09:35:58 2025 +0530
Commit: Michael Stahl
CommitDate: Tue Jan 6 19:03:35 2026 +0100
tdf#169979: ODP->PPTX export missing p:pic element
OLE objects when exported to PPTX should contain p:pic element in the
XML. OLEs without graphic content don't export p:pic element, though
this is a valid schema, PowerPoint doesn't accept this.
Now empty p:pic element is exported for empty graphics
Change-Id: Iac6fb988aa20e1bc9ae938d2a02dfc7b8dfae0c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195623
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit 33a228978b109a05f05078bc430e9d61698798c9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196542
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index af5dd85c19c2..30e08d2a9720 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -2796,6 +2796,25 @@ void ShapeExport::WriteMathShape(Reference
const& xShape)
mpFS->endElementNS(XML_mc, XML_AlternateContent);
}
+static void WriteEmptyGraphic(FSHelperPtr const& pFS, sal_Int32 nGraphicId)
+{
+pFS->startElementNS(XML_p, XML_pic);
+pFS->startElementNS(XML_p, XML_nvPicPr);
+pFS->startElementNS(XML_p, XML_cNvPr, XML_id,
OUString::number(nGraphicId), XML_name, "",
+XML_descr, "");
+pFS->endElementNS(XML_p, XML_cNvPr);
+pFS->startElementNS(XML_p, XML_cNvPicPr);
+pFS->endElementNS(XML_p, XML_cNvPicPr);
+pFS->startElementNS(XML_p, XML_nvPr);
+pFS->endElementNS(XML_p, XML_nvPr);
+pFS->endElementNS(XML_p, XML_nvPicPr);
+pFS->startElementNS(XML_p, XML_blipFill);
+pFS->endElementNS(XML_p, XML_blipFill);
+pFS->startElementNS(XML_p, XML_spPr);
+pFS->endElementNS(XML_p, XML_spPr);
+pFS->endElementNS(XML_p, XML_pic);
+}
+
ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
{
Reference< XPropertySet > xPropSet( xShape, UNO_QUERY );
@@ -3020,6 +3039,8 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const
Reference< XShape >& xShape )
const Graphic* pGraphic = pOle2Obj->GetGraphic();
if (pGraphic)
WriteGraphicObjectShapePart(xShape, pGraphic);
+else // Required for MSO
+WriteEmptyGraphic(mpFS, GetNewShapeID(xShape));
}
mpFS->endElementNS( mnXmlNamespace, XML_oleObj );
core.git: oox/source
oox/source/export/drawingml.cxx | 39 +++
oox/source/export/shapes.cxx| 19 +++
2 files changed, 50 insertions(+), 8 deletions(-)
New commits:
commit 4ad00d0a6a15a56b8d72ac05f636a266067aea59
Author: Karthik Godha
AuthorDate: Thu Dec 11 18:27:12 2025 +0530
Commit: Michael Stahl
CommitDate: Tue Jan 6 19:01:37 2026 +0100
tdf#169941: ODP->PPTX exporting shape hyperlinks
LO supports hyperlinks to shapes within the document. PowerPoint doesn't
have this feature. Export of these shape hyperlinks is not handled.
Now hyperlinks to shapes are converted to slides in which thy are
present.
Change-Id: I53f971c35a4f0f58532048b4041b0f35814b2715
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195465
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit ef58ed0184cfd362175d880f4efb3d297a3d2641)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196540
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index c28c42d1eb57..aa650c0d541e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2483,6 +2483,25 @@ static OUString lcl_GetTarget(const
css::uno::Reference& xMo
sTarget = "slide" + OUString::number(i + 1) + ".xml";
break;
}
+else // If URL is linked to a shape, assign it's slide as target
+{
+Reference xShapes = xDrawPage;
+sal_uInt32 nShapes = xShapes->getCount();
+for (sal_uInt32 j = 0; j < nShapes; j++)
+{
+Reference xShape;
+xShapes->getByIndex(j) >>= xShape;
+Reference xName(xShape, UNO_QUERY);
+if (!xName)
+continue;
+OUString sShapeName = "#" + xName->getName();
+if (rURL == sShapeName)
+{
+sTarget = "slide" + OUString::number(i + 1) + ".xml";
+break;
+}
+}
+}
}
if (sTarget.isEmpty())
{
@@ -2895,17 +2914,21 @@ void DrawingML::WriteRunProperties(const
Reference& rRun, sal_Int3
bool bExtURL = URLTransformer().isExternalURL(sURL);
sURL = bExtURL ? sURL : lcl_GetTarget(GetFB()->getModel(),
sURL);
-OUString sRelId
-= mpFB->addRelation(mpFS->getOutputStream(),
-bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
-:
oox::getRelationship(Relationship::SLIDE),
-sURL, bExtURL);
-
+OUString sRelId;
+if (!sURL.isEmpty())
+{
+sRelId
+= mpFB->addRelation(mpFS->getOutputStream(),
+bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
+:
oox::getRelationship(Relationship::SLIDE),
+sURL, bExtURL);
+}
if (bExtURL)
mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r,
XML_id), sRelId);
else
-mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r,
XML_id), sRelId,
- XML_action,
"ppaction://hlinksldjump");
+mpFS->singleElementNS(
+XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId,
XML_action,
+sURL.isEmpty() ? "ppaction://noaction" :
"ppaction://hlinksldjump");
}
else
{
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index a7a35440871b..af5dd85c19c2 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -751,6 +751,25 @@ static OUString lcl_GetTarget(const
css::uno::Reference& xMo
sTarget = "slide" + OUString::number(i + 1) + ".xml";
break;
}
+else // If URL is linked to a shape, assign it's slide as target
+{
+Reference xShapes = xDrawPage;
+sal_uInt32 nShapes = xShapes->getCount();
+for (sal_uInt32 j = 0; j < nShapes; j++)
+{
+Reference xShape;
+xShapes->getByIndex(j) >>= xShape;
+Reference xName(xShape, UNO_QUERY);
+if (!xName)
+continue;
+OUString sShapeName = "#" + xName->getName();
+if (rURL == sShapeName)
+{
+sTarget = "slide" + OUString::number(i + 1) + ".xml";
+break;
+}
+}
+}
}
return sTarget;
core.git: oox/source sd/qa sd/source
oox/source/export/shapes.cxx |2 +-
sd/qa/unit/data/odp/tdf170166.odp|binary
sd/qa/unit/export-tests-ooxml4.cxx | 21 +
sd/source/filter/eppt/pptx-epptooxml.cxx | 22 +-
4 files changed, 31 insertions(+), 14 deletions(-)
New commits:
commit 415c7e04dc6a4a1638a63bf7195c8319b1cb8f85
Author: Balazs Varga
AuthorDate: Mon Dec 29 16:02:04 2025 +0100
Commit: Aron Budea
CommitDate: Wed Dec 31 03:37:25 2025 +0100
tdf#170166: sd ooxml export: fix bullets in subtitle presobj
Properly export of Subtitles as presObj was missed with
this commit: 238cfa9efa21f08514703ea6cc181ce02d8feb12
Such as missing '' attributes in slides/slide1.xml
But still keep not to export subtitle presboj into masterslide.xml
which still would cause corrupt xml when opening in mso.
regression after: ef32ba978d7be80ee0d9c78ad37128b35512
Change-Id: I4f3e069ad1ade5bbcfa50f9096539c882c66e0b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196308
Tested-by: Jenkins
Reviewed-by: Aron Budea
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 3b20157f2988..a7a35440871b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -2189,7 +2189,7 @@ constexpr auto constMap =
frozen::make_unordered_mapGetObj(0));
+CPPUNIT_ASSERT_MESSAGE("no text object", pTxtObj != nullptr);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong object type!", SdrObjKind::Text,
+ pTxtObj->GetObjIdentifier());
+const EditTextObject& aEdit =
pTxtObj->GetOutlinerParaObject()->GetTextObject();
+const SvxNumBulletItem* pNumFmt =
aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET);
+// Without a fix, it will fail with numbering type:
SVX_NUM_CHAR_SPECIAL
+CPPUNIT_ASSERT(pNumFmt);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Bullet's numbering type is wrong!",
SVX_NUM_NUMBER_NONE,
+
pNumFmt->GetNumRule().GetLevel(0).GetNumberingType());
+}
+}
+
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOLEObjectAnimationTarget)
{
createSdImpressDoc("pptx/tdf169088.pptx");
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 9fdf97b0a79e..05161ab133a3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -355,12 +355,16 @@ ShapeExport& PowerPointShapeExport::WriteTextShape(const
Reference< XShape >& xS
if (!WritePlaceholder(xShape, Title, mbMaster))
ShapeExport::WriteTextShape(xShape);
}
-/*else if (sShapeType == "com.sun.star.presentation.SubtitleShape")
+else if (sShapeType == "com.sun.star.presentation.SubtitleShape")
{
-TODO: handle subtitle shape: see tdf#112557 workaround
-if (!WritePlaceholder(xShape, Subtitle, mbMaster))
-ShapeExport::WriteTextShape(xShape);
-}*/
+// TODO: handle subtitle shape: see tdf#112557 workaround
+// MSO does not like subtitles on master slides
+if (mePageType != MASTER)
+{
+if (!WritePlaceholder(xShape, Subtitle, mbMaster))
+ShapeExport::WriteTextShape(xShape);
+}
+}
else
SAL_WARN("sd.eppt", "PowerPointShapeExport::WriteTextShape: shape of
type '" << sShapeType << "' is ignored");
@@ -377,14 +381,6 @@ ShapeExport&
PowerPointShapeExport::WriteUnknownShape(const Reference< XShape >&
{
WritePageShape(xShape, mePageType, mrExport.GetPresObj());
}
-else if (sShapeType == "com.sun.star.presentation.SubtitleShape")
-{
-if(mePageType != MASTER)
-{
-if (!WritePlaceholder(xShape, Subtitle, mbMaster))
-ShapeExport::WriteTextShape(xShape);
-}
-}
else
SAL_WARN("sd.eppt", "unknown shape not handled: " <<
sShapeType.toUtf8());
core.git: oox/source
oox/source/export/shapes.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f12ead65e2719ac71d222e535c15e15c1115971b
Author: karthik
AuthorDate: Fri Dec 19 14:31:14 2025 +0530
Commit: Xisco Fauli
CommitDate: Wed Dec 24 13:31:18 2025 +0100
Use correct progId for Draw OLE Objects
This is related to commit 258face1158299af6c54c01f8f7a3c94006a7fdd
Change-Id: Ib09fe15349113c389dcb867af11a06cad2108c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195882
Reviewed-by: Xisco Fauli
Tested-by: Jenkins
Reviewed-by: Michael Stahl
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e528bdf1c240..3b20157f2988 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -228,7 +228,7 @@ static uno::Reference lcl_StoreOwnAsOOXML(
{ {SO3_SW_CLASSID_60}, "MS Word 2007 XML",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"Word.Document.12", "docx" },
{ {SO3_SC_CLASSID_60}, "Calc MS Excel 2007 XML",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"Excel.Sheet.12", "xlsx" },
{ {SO3_SIMPRESS_CLASSID_60}, "Impress MS PowerPoint 2007 XML",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"PowerPoint.Show.12", "pptx" },
-{ {SO3_SDRAW_CLASSID}, "draw8",
"application/vnd.oasis.opendocument.graphics",
"CollaboraOffice.DrawDocument.1", "odg" },
+{ {SO3_SDRAW_CLASSID}, "draw8",
"application/vnd.oasis.opendocument.graphics", "LibreOffice.DrawDocument.1",
"odg" },
{ {SO3_SCH_CLASSID_60}, "unused", "", "", "" },
{ {SO3_SM_CLASSID_60}, "unused", "", "", "" },
};
core.git: oox/source
oox/source/export/drawingml.cxx |2 --
1 file changed, 2 deletions(-)
New commits:
commit 1896d58849261cfc44be436821e29807149a2e1a
Author: Stephan Bergmann
AuthorDate: Thu Dec 18 12:09:28 2025 +0100
Commit: Stephan Bergmann
CommitDate: Thu Dec 18 15:45:04 2025 +0100
-Werror,-Wunused-variable
...after c60be14f9c3b1d908ef1f5bf4bae2fb136002a82 "SmartArt: Move
Information
from GrabBag to DiagramHelper"
Change-Id: I1b437c0c85d9736fd1c17ebd08366fea5bcbffb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195835
Reviewed-by: Stephan Bergmann
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f3208353342e..c28c42d1eb57 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -6671,8 +6671,6 @@ OString DrawingML::WriteWdpPicture( const OUString&
rFileId, const Sequence< sal
void DrawingML::WriteDiagram(const css::uno::Reference&
rXShape, sal_Int32 nDiagramId, sal_Int32 nShapeId)
{
-uno::Reference xPropSet(rXShape, uno::UNO_QUERY);
-
uno::Reference dataDom;
uno::Reference layoutDom;
uno::Reference styleDom;
core.git: oox/source
oox/source/drawingml/shape.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 7ab8ed87dca177f22b162df5dfbba3052b82596d Author: Gülşah Köse AuthorDate: Fri Dec 12 16:32:33 2025 +0300 Commit: Gabor Kelemen CommitDate: Wed Dec 17 10:19:40 2025 +0100 tdf#169456 Fix the placeholder of master slide style issue In some cases we see the object in the slide has no fill syle directly but parent object in master slide can has fill style. We should apply the style to object in this case. Signed-off-by: Gülşah Köse Change-Id: I0b061cfde4ac2067c84383764770f155564531a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195368 Reviewed-by: Caolán McNamara Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara (cherry picked from commit 92b0bcb3136a77de97415b900a0e9b4a271715ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195672 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 0d28032ab50e..d313d731075b 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1663,7 +1663,8 @@ Reference< XShape > const & Shape::createAndInsert( } FillProperties aFillProperties = getActualFillProperties(pTheme, &rShapeOrParentShapeFillProps); -if (getFillProperties().moFillType.has_value() && getFillProperties().moFillType.value() == XML_grpFill) +if ((getFillProperties().moFillType.has_value() && getFillProperties().moFillType.value() == XML_grpFill) || +aFillProperties.maFillColor.isPlaceHolder() ) getFillProperties().assignUsed(aFillProperties); if(!bIsCroppedGraphic && !bIs3DGraphic) aFillProperties.pushToPropMap(aShapeProps, rGraphicHelper, mnRotation, nFillPhClr,
core.git: oox/source sc/inc
oox/source/core/filterdetect.cxx |2 +- sc/inc/scextopt.hxx |5 - 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit df2831966778a47fdcbc21a391a01ee38fca3b91 Author: Justin Luth AuthorDate: Sat Dec 13 08:53:24 2025 -0500 Commit: Justin Luth CommitDate: Sat Dec 13 17:02:44 2025 +0100 tdf#165180: improve documentation of lowestEdited Office 2013 with SP1 is 6, with a rupBuild of 14420 Office 2016 is also 6, with a rupBuild of 14420 also (surprisingly). Change-Id: Ib9b5906e97d8e39838ecda04bdc23fdf47d197a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195601 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index eb7d2182566a..cad537f7d490 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -179,7 +179,7 @@ void FilterDetectDocHandler::parseWorkbook(const AttributeList& rAttribs) // tdf#165180 Remember filter when opening file as 'Office Open XML Spreadsheet' // (fileVersion can only exist once, and lowestEdited can only be defined once - else corrupt) -// lowestEdited: 4 is 2007, 5 is 2010, 6 is 201?, 7 is 201?-2024 +// lowestEdited: 4 is 2007, 5 is 2010, 6 is 2013 and 2016, 7 is 2019-2024 const sal_Int32 nDefaultValue = rAttribs.getInteger(XML_lastEdited, 99); if (rAttribs.getInteger(XML_lowestEdited, nDefaultValue) > 4) maOOXMLVariant = OOXMLVariant::ISO_Transitional; // Excel 2010+ diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx index 1cc8b3f3bcd7..aa32557554bb 100644 --- a/sc/inc/scextopt.hxx +++ b/sc/inc/scextopt.hxx @@ -30,7 +30,10 @@ struct ScExtDocSettings double mfTabBarWidth; ///< Width of the tabbar, relative to frame window width (0.0 ... 1.0). sal_uInt32 mnLinkCnt; ///< Recursive counter for loading external documents. SCTAB mnDisplTab; ///< Index of displayed sheet. -std::optional moLowestEdited; ///< Oldest Excel version that edited this document. +/** moLowestEdited: oldest Excel version that edited this .XLSX - limit feature set to that. + * 4 is 2007, 5 is 2010, 6 is 2013 and 2016, 7 is 2019-2024+ + */ +std::optional moLowestEdited; explicitScExtDocSettings(); };
core.git: oox/source sd/qa
oox/source/drawingml/textparagraphproperties.cxx |3 +++
oox/source/export/drawingml.cxx |4 +++-
sd/qa/unit/data/odp/tdf169524.odp|binary
sd/qa/unit/data/pptx/tdf169524.pptx |binary
sd/qa/unit/export-tests-ooxml3.cxx | 12
sd/qa/unit/import-tests2.cxx | 11 +++
6 files changed, 29 insertions(+), 1 deletion(-)
New commits:
commit abe023e3222150f86cf56b1cb63109837511eb2c
Author: Karthik Godha
AuthorDate: Thu Dec 4 19:59:01 2025 +0530
Commit: Michael Stahl
CommitDate: Fri Dec 12 12:03:30 2025 +0100
tdf#169524: Fix left margin import/export in PPTX
Change-Id: I167d2bbe1d4238eb7bd264b74898c232fddb7b1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195006
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 8c98be05acf61af19d4ff891ab74bce0db3f7476)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195369
Tested-by: Jenkins
diff --git a/oox/source/drawingml/textparagraphproperties.cxx
b/oox/source/drawingml/textparagraphproperties.cxx
index 8394e431e747..1ad2b5b71869 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -497,6 +497,9 @@ void TextParagraphProperties::pushToPropSet( const
::oox::core::XmlFilterBase* p
}
if ( noParaLeftMargin )
aPropSet.setProperty( PROP_ParaLeftMargin, *noParaLeftMargin);
+else // Use 0 as default left margin
+aPropSet.setProperty(PROP_ParaLeftMargin, 0);
+
if ( noFirstLineIndentation )
{
aPropSet.setProperty( PROP_ParaFirstLineIndent,
*noFirstLineIndentation );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 198d8a3145c5..226c2bc1e866 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3632,7 +3632,9 @@ bool DrawingML::WriteParagraphProperties(const
Reference& rParagra
if (nLeftMargin > nMaxMarginVal)
nLeftMargin = 0;
-if (nParaLeftMargin) // For Paragraph
+bool bIsListStyle = (nElement >= XML_lvl1pPr && nElement <= XML_lvl9pPr);
+
+if (nParaLeftMargin || bIsListStyle) // For Paragraph or List-Style
elements
mpFS->startElementNS( XML_a, nElement,
XML_marL,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)),
nParaLeftMargin > 0),
XML_lvl,
sax_fastparser::UseIf(OString::number(nOutLevel), nOutLevel > 0),
diff --git a/sd/qa/unit/data/odp/tdf169524.odp
b/sd/qa/unit/data/odp/tdf169524.odp
new file mode 100644
index ..06b0a2dc346a
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf169524.odp differ
diff --git a/sd/qa/unit/data/pptx/tdf169524.pptx
b/sd/qa/unit/data/pptx/tdf169524.pptx
new file mode 100644
index ..f1e93c55ca3a
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf169524.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx
b/sd/qa/unit/export-tests-ooxml3.cxx
index 4de5ee355365..ea66d313e482 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -1130,6 +1130,18 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf169781)
1);
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf169524)
+{
+createSdImpressDoc("odp/tdf169524.odp");
+save(TestFilter::PPTX);
+
+xmlDocUniquePtr pXmlDoc =
parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr);
+
+// Verify that no left margin is exported
+assertXPathNoAttribute(
+pXmlDoc,
"/p:sldMaster/p:cSld/p:spTree/p:sp[2]/p:txBody/a:lstStyle/a:lvl1pPr", "marL");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 75fe572123e2..cdae01a52184 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -2287,6 +2287,17 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, tdf158512)
pPage->GetObj(0)->GetMergedItem(XATTR_FILLUSESLIDEBACKGROUND).GetValue());
}
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf169524)
+{
+createSdImpressDoc("pptx/tdf169524.pptx");
+uno::Reference xShape(getShapeFromPage(0, 0));
+uno::Reference const
xParagraph(getParagraphFromShape(8, xShape),
+ uno::UNO_QUERY_THROW);
+sal_Int32 nLeftMargin;
+xParagraph->getPropertyValue(u"ParaLeftMargin"_ustr) >>= nLeftMargin;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nLeftMargin);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: oox/source sd/qa sd/source
oox/source/ppt/slidepersist.cxx | 12 +-
sd/qa/unit/data/odp/tdf169825_layout_type.odp|binary
sd/qa/unit/data/pptx/tdf169825_vertical_layouts.pptx |binary
sd/qa/unit/export-tests-ooxml4.cxx | 89 +++
sd/source/filter/eppt/epptbase.hxx |1
sd/source/filter/eppt/epptooxml.hxx |3
sd/source/filter/eppt/pptx-epptooxml.cxx | 43 +
7 files changed, 123 insertions(+), 25 deletions(-)
New commits:
commit eb338daa90afd569e1b86c058bb88a89fab6a557
Author: Aron Budea
AuthorDate: Fri Dec 5 15:28:56 2025 +1030
Commit: Aron Budea
CommitDate: Tue Dec 9 09:56:29 2025 +0100
tdf#169825 AutoLayout can be incorrectly exported to PPTX
...as vertTitleAndTxOverChart, if ODP layout was
AUTOLAYOUT_NOTES, causing corruption.
PPTX export code directly matched LO's AutoLayout IDs to
PPTX layout types (OOXML spec: 19.7.15 ST_SlideLayoutType
(Slide Layout Type)) without conversion, as some don't have
direct match, and need to be matched to blank layouts. This
could result in PPTXes that can't be opened in PowerPoint.
It could also result in PPTXes with wrong layout types when
using LO's own vertical layouts. The files could still be
opened in PP in this case.
In addition, import code imported vertical PPTX layouts
with wrong IDs, matching them to notes and handout autolayouts.
Part of the mentioned behavior happened since
bff76421e234df7246a7f49c71a11432f86e09d1.
Change-Id: Iba7a50795979c22bc566aa2cd6ea4d82f7f9477e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195049
Tested-by: Jenkins
Reviewed-by: Mike Kaganski
Reviewed-by: Aron Budea
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 847ab5f2ab97..5ec9913e80a8 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -88,6 +88,8 @@ SlidePersist::~SlidePersist()
{
}
+// the list 'const PPTXLayoutInfo aLayoutInfo[...]' used in PowerPointExport
+// likely needs to be updated after any changes here
sal_Int16 SlidePersist::getLayoutFromValueToken() const
{
sal_Int16 nLayout = 20; // 20 == blank (so many magic numbers :-( the
description at com.sun.star.presentation.DrawPage.Layout does not help)
@@ -97,7 +99,7 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
case XML_chart: nLayout = 2; break;
case XML_chartAndTx:nLayout = 7; break;
case XML_clipArtAndTx: nLayout = 9; break;
-case XML_clipArtAndVertTx: nLayout = 24; break;
+case XML_clipArtAndVertTx: nLayout = 30; break;
case XML_fourObj: nLayout = 18; break;
case XML_obj: nLayout = 11; break;
case XML_objAndTx: nLayout = 13; break;
@@ -112,15 +114,15 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() const
case XML_twoObjOverTx: nLayout = 16; break;
case XML_tx:nLayout = 1; break;
case XML_txAndChart:nLayout = 4; break;
-case XML_txAndClipArt: nLayout = 6; break;
+case XML_txAndClipArt:
case XML_txAndMedia:nLayout = 6; break;
case XML_txAndObj: nLayout = 10; break;
case XML_objAndTwoObj:
case XML_txAndTwoObj: nLayout = 12; break;
case XML_txOverObj: nLayout = 17; break;
-case XML_vertTitleAndTx:nLayout = 22; break;
-case XML_vertTitleAndTxOverChart: nLayout = 21; break;
-case XML_vertTx:nLayout = 23; break;
+case XML_vertTitleAndTx:nLayout = 28; break;
+case XML_vertTitleAndTxOverChart: nLayout = 27; break;
+case XML_vertTx:nLayout = 29; break;
case XML_objOnly: nLayout = 32; break;
case XML_twoTxTwoObj:
diff --git a/sd/qa/unit/data/odp/tdf169825_layout_type.odp
b/sd/qa/unit/data/odp/tdf169825_layout_type.odp
new file mode 100644
index ..aa9dda374262
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf169825_layout_type.odp
differ
diff --git a/sd/qa/unit/data/pptx/tdf169825_vertical_layouts.pptx
b/sd/qa/unit/data/pptx/tdf169825_vertical_layouts.pptx
new file mode 100644
index ..5401a39c9826
Binary files /dev/null and
b/sd/qa/unit/data/pptx/tdf169825_vertical_layouts.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx
b/sd/qa/unit/export-tests-ooxml4.cxx
index cb79b15a30b3..2593861453ca 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -20,6 +20,7 @@
#include
#include
#include
+#include
#include
#include
@@ -1712,6 +1713,94 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4,
testtdf169496_hidden_graphic)
CPPUNIT_FAIL("Names of graphics is incorrect");
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testt
core.git: oox/source sc/qa
oox/source/core/xmlfilterbase.cxx| 18 +-
sc/qa/unit/data/xlsx/tdf169072_illegalDates.xlsx |binary
sc/qa/unit/subsequent_export_test2.cxx | 14 ++
3 files changed, 19 insertions(+), 13 deletions(-)
New commits:
commit ef5846a1ea802f580508984baa6dc76d3d9d617f
Author: Justin Luth
AuthorDate: Fri Dec 5 18:17:23 2025 -0500
Commit: Justin Luth
CommitDate: Sat Dec 6 12:22:28 2025 +0100
tdf#169072 ms export: valid date years are 1601 - #2
The dates in core.xml must fall in the range of 1601 - .
This applies to all MS files, not just DOCX.
Plus, the entire concept of ISOIEC_29500_2008
was wrongly implemented...
make CppunitTest_sc_subsequent_export_test2 \
CPPUNIT_TEST_NAME=testTdf169072_illegalDates
Change-Id: I06ddc69ff79f1c8d744d97782617f8be257021a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195139
Reviewed-by: Justin Luth
Tested-by: Jenkins
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index e96ae4fc7d27..c6328ab5e358 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -571,21 +571,13 @@ OUString XmlFilterBase::addRelation( const Reference<
XOutputStream >& rOutputSt
return OUString();
}
-static bool lcl_isValidDate(const util::DateTime& rTime, XmlFilterBase& rSelf)
+static bool lcl_isValidDate(const util::DateTime& rTime)
{
if (rTime.Year == 0)
return false;
// MS Office reports document as corrupt if core.xml contains any Year <=
1600 or >
-// for the "package" URI (ECMA_376_1ST_EDITION or docx).
-if (rTime.Year > 1600 && rTime.Year < 1)
-return true;
-
-const bool bDocx =
dynamic_cast(rSelf.getModel().get());
-if (bDocx || rSelf.getVersion() == oox::core::ECMA_376_1ST_EDITION)
-return false;
-
-return true;
+return rTime.Year > 1600 && rTime.Year < 1;
}
static void
@@ -729,7 +721,7 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference<
XDocumentProperties
if (!bRemoveUserInfo)
{
const util::DateTime aCreateDate = xProperties->getCreationDate();
-if (lcl_isValidDate(aCreateDate, rSelf))
+if (lcl_isValidDate(aCreateDate))
writeElement(pCoreProps, FSNS(XML_dcterms, XML_created),
aCreateDate);
writeElement(pCoreProps, FSNS(XML_dc, XML_creator),
xProperties->getAuthor());
}
@@ -749,11 +741,11 @@ writeCoreProperties( XmlFilterBase& rSelf, const
Reference< XDocumentProperties
{
writeElement(pCoreProps, FSNS(XML_cp, XML_lastModifiedBy),
xProperties->getModifiedBy());
const util::DateTime aPrintDate = xProperties->getPrintDate();
-if (lcl_isValidDate(aPrintDate, rSelf))
+if (lcl_isValidDate(aPrintDate))
writeElement(pCoreProps, FSNS(XML_cp, XML_lastPrinted),
aPrintDate);
const util::DateTime aModifyDate = xProperties->getModificationDate();
-if (lcl_isValidDate(aModifyDate, rSelf))
+if (lcl_isValidDate(aModifyDate))
writeElement(pCoreProps, FSNS(XML_dcterms, XML_modified),
aModifyDate);
}
if (!bRemovePersonalInfo)
diff --git a/sc/qa/unit/data/xlsx/tdf169072_illegalDates.xlsx
b/sc/qa/unit/data/xlsx/tdf169072_illegalDates.xlsx
new file mode 100644
index ..80802593c131
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf169072_illegalDates.xlsx
differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx
b/sc/qa/unit/subsequent_export_test2.cxx
index 235138a544ae..6dae813457f9 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -1018,6 +1018,20 @@ CPPUNIT_TEST_FIXTURE(ScExportTest2, testXltxExport)
u"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml");
}
+CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf169072_illegalDates)
+{
+// Given a document that MS Word reports as corrupt
+createScDoc("xlsx/tdf169072_illegalDates.xlsx");
+save(TestFilter::XLSX);
+
+// Date Years MUST be greater than 1600 and less than 10,000
+// so by dropping invalid entries, we have a document that MS Excel can
now cleanly open
+xmlDocUniquePtr pXmlCore = parseExport(u"docProps/core.xml"_ustr);
+assertXPathContent(pXmlCore, "/cp:coreProperties/dcterms:created",
u"-10-10T13:07:54Z");
+assertXPathContent(pXmlCore, "/cp:coreProperties/dcterms:modified",
u"1601-01-01T13:09:08Z");
+assertXPath(pXmlCore, "/cp:coreProperties/cp:lastPrinted", 0); // was
1600-12-31T00:00:52Z
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest2, testTdf165180_date1904)
{
// given a hand-modified document (which added dateCompatibility="0")
core.git: oox/source test/source
oox/source/core/filterdetect.cxx | 11 +--
oox/source/core/xmlfilterbase.cxx | 21 ++---
test/source/bootstrapfixture.cxx |7 +++
3 files changed, 14 insertions(+), 25 deletions(-)
New commits:
commit de25c6c546afdb9be71bd3326af6a5e3f962edbf
Author: Justin Luth
AuthorDate: Wed Dec 3 13:29:42 2025 -0500
Commit: Justin Luth
CommitDate: Fri Dec 5 23:30:13 2025 +0100
tdf#165207 xlsx/pptx: always use errata uri in docProps/core.xml
This fixes a longstanding bug that has gone unnoticed
since nobody saves to the "Office Open XML" filters
and the problem is only seen in MS Office.
So what does this patch fix?
Basically, all of the meta-data was not being read by MS Office,
which primarily means no create/modify dates, subject, title etc.
Every time we saved to OOXML formats (except OOXML 2007),
we caused MS Office to be incapable
of understanding anything in docProps/core.xml.
Telltale sign: when MS Office round-trips
with an added docProps/core0.xml.
The spec says that ISO 29500 formats should be using
officedocuments/2006/relationships/metadata/core-properties
and thus our untouched 2010-era coding
specified all of that for export (and more recently for import).
> 2.1.33 Part 1 Section 15.2.11.1, Core File Properties Part
> The standard specifies a source relationship
> for the Core File Properties part as follows:
> .../officedocument/.../core-properties.
> HOWEVER: Office uses the following source relationship
> for the Core File Properties part:
> .../package/.../core-properties.
Thus reality is much different than the spec,
so throw the spec out the window and always write
package/2006/relationships/metadata/core-properties
Bug 165207 doesn't affect LO in any way - it only affect MSOffice.
If there was already a unit test writing out to _rels/.rels
I would have added a test for this, but since there isn't
I won't bother since I don't see any value in doing so.
Change-Id: I582448adb568ecb630f2fd64712ce372875f71df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195014
Tested-by: Jenkins
Reviewed-by: Justin Luth
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index 3088170c241a..b48df147673b 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -168,12 +168,11 @@ void FilterDetectDocHandler::parseRelationship( const
AttributeList& rAttribs )
{
OUString aType = rAttribs.getStringDefaulted( XML_Type);
-// tdf#131936 Remember filter when opening file as 'Office Open XML Text'
-if
(aType.startsWithIgnoreAsciiCase("http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties";))
-maOOXMLVariant = OOXMLVariant::ISO_Transitional;
-else if
(aType.startsWithIgnoreAsciiCase("http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";))
-maOOXMLVariant = OOXMLVariant::ECMA_Transitional;
-else if
(aType.startsWithIgnoreAsciiCase("http://purl.oclc.org/ooxml/officeDocument";))
+// Although the spec says that ISO_Transitional uses the "officedocument"
URI for core.xml,
+// MS errata admits that MS Office just uses the old "package" URI from
ECMA_376_1ST_EDITION.
+// So core-properties can't be used to identify a non-ECMA_376_1ST_EDITION
document...
+
+if
(aType.startsWithIgnoreAsciiCase("http://purl.oclc.org/ooxml/officeDocument";))
maOOXMLVariant = OOXMLVariant::ISO_Strict;
if ( aType !=
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
// OOXML Transitional
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index 173b60d8ac7b..e96ae4fc7d27 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -683,21 +683,12 @@ writeCoreProperties( XmlFilterBase& rSelf, const
Reference< XDocumentProperties
= bRemovePersonalInfo
&&
!SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo);
-// Although the spec says that ISOIEC_29500_2008 must use the
"officedocument" URI,
-// in MS errata they admit that DOCX just uses the old "package" URI from
ECMA_376_1ST_EDITION.
-
-OUString sValue;
-const bool bDocx =
dynamic_cast(rSelf.getModel().get());
-if (!bDocx && rSelf.getVersion() == oox::core::ISOIEC_29500_2008)
-{
-// The lowercase "officedocument" is intentional and according to the
spec
-// (although most other places are written "officeDocument")
-sValue =
"http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties";;
-}
-else
-sValue =
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";;
-
-rSelf.addRelat
core.git: oox/source sd/qa
oox/source/core/relations.cxx| 10 ++
oox/source/drawingml/graphicshapecontext.cxx | 14 +++---
oox/source/ppt/slidefragmenthandler.cxx | 11 +++
sd/qa/unit/data/pptx/tdf169781.pptx |binary
sd/qa/unit/export-tests-ooxml3.cxx | 19 +++
5 files changed, 47 insertions(+), 7 deletions(-)
New commits:
commit a547efb681d2da4de357a5d313ee82f925934dce
Author: Karthik Godha
AuthorDate: Mon Dec 1 16:28:46 2025 +0530
Commit: Michael Stahl
CommitDate: Fri Dec 5 14:15:18 2025 +0100
tdf#169781: PPTX legacy VML files are not imported
Change-Id: Id6eeeab193ac0ed6ff60991508466ffd58005ea7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194875
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit 76e2b197bd7b01c2af7f7ed780e8624c7c40e1fd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195048
Tested-by: Jenkins
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index cda3f451094a..2fd3f4e5d103 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -54,6 +54,11 @@ OUString
createOfficeDocRelationTypeStrict(std::u16string_view rType)
return
OUString::Concat("http://purl.oclc.org/ooxml/officeDocument/relationships/";) +
rType;
}
+OUString createMSOfficeRelationType(std::u16string_view rType)
+{
+return
OUString::Concat("http://schemas.microsoft.com/office/2006/relationships/";) +
rType;
+}
+
}
Relations::Relations( OUString aFragmentPath )
@@ -150,6 +155,11 @@ OUString
Relations::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_vi
{
OUString aStrictType = createOfficeDocRelationTypeStrict(rType);
pRelation = getRelationFromFirstType( aStrictType );
+if (!pRelation)
+{
+OUString aMicrosoftType = createMSOfficeRelationType(rType);
+pRelation = getRelationFromFirstType(aMicrosoftType);
+}
}
return pRelation ? getFragmentPathFromRelation( *pRelation ) : OUString();
}
diff --git a/oox/source/drawingml/graphicshapecontext.cxx
b/oox/source/drawingml/graphicshapecontext.cxx
index 4753eb9e3b19..45dbc656e6bb 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -35,6 +35,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -257,9 +258,16 @@ void OleObjectGraphicDataContext::onEndElement()
{
if( getCurrentElement() == PPT_TOKEN( oleObj ) && !isMCEStateEmpty() )
{
-if (getMCEState() == MCE_STATE::FoundChoice &&
!mrOleObjectInfo.mbHasPicture
-&& mrOleObjectInfo.maShapeId.isEmpty())
-setMCEState( MCE_STATE::Started );
+if (getMCEState() == MCE_STATE::FoundChoice &&
!mrOleObjectInfo.mbHasPicture)
+{
+// Use mcFallback if Shape ID is invalid
+if (!mrOleObjectInfo.maShapeId.isEmpty())
+if (::oox::vml::Drawing* pVmlDrawing =
getFilter().getVmlDrawing())
+if
(pVmlDrawing->getShapes().getShapeById(mrOleObjectInfo.maShapeId))
+return;
+
+setMCEState(MCE_STATE::Started);
+}
}
}
diff --git a/oox/source/ppt/slidefragmenthandler.cxx
b/oox/source/ppt/slidefragmenthandler.cxx
index 7d8485f1f8ef..4403d4597810 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -58,10 +58,13 @@ SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase&
rFilter, const OUStri
, mpSlidePersistPtr( pPersistPtr )
, meShapeLocation( eShapeLocation )
{
-OUString aVMLDrawingFragmentPath =
getFragmentPathFromFirstTypeFromOfficeDoc( u"vmlDrawing" );
-if( !aVMLDrawingFragmentPath.isEmpty() )
-getFilter().importFragment( new oox::vml::DrawingFragment(
-getFilter(), aVMLDrawingFragmentPath, *pPersistPtr->getDrawing() )
);
+OUString aVMLPath =
getFragmentPathFromFirstTypeFromOfficeDoc(u"vmlDrawing");
+if (aVMLPath.isEmpty())
+aVMLPath = getFragmentPathFromFirstTypeFromOfficeDoc(u"legacyDrawing");
+
+if (!aVMLPath.isEmpty())
+getFilter().importFragment(
+new oox::vml::DrawingFragment(getFilter(), aVMLPath,
*pPersistPtr->getDrawing()));
}
SlideFragmentHandler::~SlideFragmentHandler()
diff --git a/sd/qa/unit/data/pptx/tdf169781.pptx
b/sd/qa/unit/data/pptx/tdf169781.pptx
new file mode 100644
index ..96d0032aa894
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf169781.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx
b/sd/qa/unit/export-tests-ooxml3.cxx
index 36f3348979ec..4de5ee355365 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -,6 +,25 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf168736)
assertXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship[1]",
"Target
core.git: oox/source
oox/source/export/chartexport.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 35ff36267326229b42226cd32b436ea4b655a7c8
Author: Caolán McNamara
AuthorDate: Fri Dec 5 08:46:56 2025 +
Commit: Caolán McNamara
CommitDate: Fri Dec 5 12:20:15 2025 +0100
cid#1666317 Logically dead code
Change-Id: Iac61feca68a46dfbcfa7851e627e297368b6ee92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195056
Tested-by: Jenkins
Reviewed-by: Caolán McNamara
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 083b304f5ec4..cdf758ce928d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2275,7 +2275,7 @@ void ChartExport::exportTitle( const Reference< XShape >&
xShape, bool bIsCharte
// shape properties
if( xPropSet.is() )
{
-exportShapeProps( xPropSet, bIsChartex ? XML_cx : XML_c );
+exportShapeProps(xPropSet, XML_cx);
}
pFS->startElement(FSNS(XML_cx, XML_txPr));
core.git: oox/source
oox/source/export/drawingml.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8a27d5874b61eead4f0b896ca5f1be9544e26e12 Author: karthik AuthorDate: Thu Dec 4 12:44:48 2025 +0530 Commit: Michael Stahl CommitDate: Thu Dec 4 14:59:12 2025 +0100 tdf#169553: Fix export of 'algn' in PPTX "algn" element is not properly exported in PPTX. 5d1b2baaa96fce2cc283e4d383bcfca70651b2da commit introduces "Start" and "End" pararaph alignments, but these are not handled in PPTX export. Change-Id: I9ed13a5a08c81676810d099d90dfeec0e2727689 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194972 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 3d398a9c8ef5..198d8a3145c5 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3489,12 +3489,14 @@ const char* DrawingML::GetAlignment( style::ParagraphAdjust nAlignment, bool bPl sAlignment = "ctr"; break; case style::ParagraphAdjust_RIGHT: +case style::ParagraphAdjust_END: sAlignment = "r"; break; case style::ParagraphAdjust_BLOCK: sAlignment = "just"; break; case style::ParagraphAdjust_LEFT: +case style::ParagraphAdjust_START: if (bPlaceHolder) // in case of PPTX placeholder objects, "l" is necessary for MSO sAlignment = "l"; break;
core.git: oox/source xmloff/source
oox/source/export/ThemeExport.cxx |1 +
oox/source/export/drawingml.cxx |3 +++
xmloff/source/style/xmlbahdl.cxx | 10 --
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 38b239c8bcf9031cec68678460e94de3dc23a6e4
Author: Noel Grandin
AuthorDate: Wed Dec 3 10:29:50 2025 +0200
Commit: Noel Grandin
CommitDate: Wed Dec 3 12:50:56 2025 +0100
mso-test: import data has bad percentage value
found by converting tdf34406-1.odp to pptx and running officeotron on the
output
INFO - Validating part "/ppt/slides/slide4.xml" using schema
"29500T/pml.xsd" ...
ERROR - (slides/slide4.xml:2 col:24,296) cvc-datatype-valid.1.2.3:
'-490' is not a valid value of union type 'ST_PositiveFixedPercentage'.
The import data in content.xml looks like:
https://gerrit.libreoffice.org/c/core/+/194950
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 80c58f15baf79f19b954b1199cbca9c2f3dcf8bf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194952
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/export/ThemeExport.cxx
b/oox/source/export/ThemeExport.cxx
index bdd79016aac7..986f804df6e1 100644
--- a/oox/source/export/ThemeExport.cxx
+++ b/oox/source/export/ThemeExport.cxx
@@ -903,6 +903,7 @@ bool ThemeExport::writeColorSet(model::Theme const& rTheme)
// drawingML alpha is a percentage on a 0..10 scale.
sal_Int32 nAlpha = aColor.GetAlpha() *
oox::drawingml::MAX_PERCENT / 255;
+assert(nAlpha >= 0);
mpFS->singleElementNS(XML_a, XML_alpha, XML_val,
OUString::number(nAlpha));
mpFS->endElementNS(XML_a, XML_srgbClr);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 256e7ecdf600..e6608a4fb4dc 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -363,6 +363,7 @@ void DrawingML::WriteColor( ::Color nColor, sal_Int32
nAlpha )
if( nAlpha < MAX_PERCENT )
{
mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+assert(nAlpha >= 0);
mpFS->singleElementNS(XML_a, XML_alpha, XML_val,
OString::number(nAlpha));
mpFS->endElementNS( XML_a, XML_srgbClr );
@@ -409,6 +410,7 @@ void DrawingML::WriteColor( const ::Color nColor, const
Sequence< PropertyValue
else if(nAlpha < MAX_PERCENT)
{
mpFS->startElementNS(XML_a, XML_srgbClr, XML_val, sColor);
+assert(nAlpha >= 0);
mpFS->singleElementNS(XML_a, XML_alpha, XML_val,
OString::number(nAlpha));
mpFS->endElementNS(XML_a, XML_srgbClr);
}
@@ -427,6 +429,7 @@ void DrawingML::WriteColorTransformations( const Sequence<
PropertyValue >& aTra
{
if(nToken == XML_alpha && nAlpha < MAX_PERCENT)
{
+assert(nAlpha >= 0);
mpFS->singleElementNS(XML_a, nToken, XML_val,
OString::number(nAlpha));
}
else
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index a59abbdeed04..2749cff5356b 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -455,8 +455,14 @@ bool XMLNegPercentPropHdl::importXML( const OUString&
rStrImpValue, Any& rValue,
{
sal_Int32 nValue = 0;
bool bRet = ::sax::Converter::convertPercent( nValue, rStrImpValue );
-if (bRet)
-bRet = !o3tl::checked_sub(100, nValue, nValue);
+if (!bRet)
+return false;
+if (nValue < 0 || nValue > 100)
+{
+SAL_WARN("xmloff", "Percentage property out of range, ignoring");
+return false;
+}
+bRet = !o3tl::checked_sub(100, nValue, nValue);
if (bRet)
lcl_xmloff_setAny( rValue, nValue, nBytes );
return bRet;
core.git: oox/source
oox/source/export/shapes.cxx | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 1a404361a2d888968068d1db2641d81966e54f42
Author: Noel Grandin
AuthorDate: Tue Dec 2 13:35:34 2025 +0200
Commit: Noel Grandin
CommitDate: Tue Dec 2 18:38:32 2025 +0100
need to catch WrongStateException here
I removed this catch block in
commit 0e8c798a7f250f01146b21f371385cef19fde73f
Author: Noel Grandin
Date: Thu Nov 27 10:06:53 2025 +0200
avoid some unnecessary exception throw/catch as control flow
which is wrong, it was introduced as
commit a951d70609fa125def231c3d7579e72c381334f5
Author: Michael Stahl
Date: Mon Jan 11 17:16:24 2016 +0100
oox: getEntryName() could throw a WrongStateException
let's guard against that.
Change-Id: I32c46e62f3ec1f8e742aba765ef190701d36b52b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194922
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 695e06272b60..58707153ba8e 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -51,6 +51,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -2849,7 +2850,17 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const
Reference< XShape >& xShape )
xParent->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag;
uno::Reference xEmbedPersist(xObj,
uno::UNO_QUERY);
if (xEmbedPersist)
-entryName = xEmbedPersist->getEntryName();
+{
+// getEntryName() could throw a WrongStateException
+try
+{
+entryName = xEmbedPersist->getEntryName();
+}
+catch (embed::WrongStateException const &)
+{
+TOOLS_WARN_EXCEPTION("oox.shape",
"ShapeExport::WriteOLE2Shape");
+}
+}
}
}
core.git: oox/source
oox/source/export/shapes.cxx | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
New commits:
commit 0e8c798a7f250f01146b21f371385cef19fde73f
Author: Noel Grandin
AuthorDate: Thu Nov 27 10:06:53 2025 +0200
Commit: Noel Grandin
CommitDate: Thu Nov 27 12:15:57 2025 +0100
avoid some unnecessary exception throw/catch as control flow
Change-Id: I8aedd3ba5234805d0d93b5a34cc87eb83edd5f9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194677
Tested-by: Jenkins
Tested-by: Noel Grandin
Reviewed-by: Noel Grandin
Code-Style: Noel Grandin
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 7af4392377b7..695e06272b60 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -2840,20 +2840,17 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const
Reference< XShape >& xShape )
uno::Sequence grabBag;
OUString entryName;
-try
+uno::Reference xChild(xObj, uno::UNO_QUERY);
+if (xChild)
{
-uno::Reference const xParent(
-uno::Reference(xObj,
uno::UNO_QUERY_THROW)->getParent(),
-uno::UNO_QUERY_THROW);
-
-xParent->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag;
-
-entryName = uno::Reference(xObj,
uno::UNO_QUERY_THROW)->getEntryName();
-}
-catch (uno::Exception const&)
-{
-TOOLS_WARN_EXCEPTION("oox.shape", "ShapeExport::WriteOLE2Shape");
-return *this;
+uno::Reference const xParent(xChild->getParent(),
uno::UNO_QUERY);
+if (xParent)
+{
+xParent->getPropertyValue(u"InteropGrabBag"_ustr) >>= grabBag;
+uno::Reference xEmbedPersist(xObj,
uno::UNO_QUERY);
+if (xEmbedPersist)
+entryName = xEmbedPersist->getEntryName();
+}
}
OUString progID;
core.git: oox/source sd/qa
oox/source/export/shapes.cxx| 19 ---
sd/qa/unit/data/ppt/tdf168736-1.ppt |binary
sd/qa/unit/data/ppt/tdf168736-2.ppt |binary
sd/qa/unit/export-tests-ooxml3.cxx | 20
4 files changed, 32 insertions(+), 7 deletions(-)
New commits:
commit c6c939dcaed04bc14bdf4ed73fe8771ab2b59c0c
Author: Karthik
AuthorDate: Mon Oct 27 14:09:35 2025 +0530
Commit: Michael Stahl
CommitDate: Mon Nov 24 12:04:47 2025 +0100
tdf#168736: Fix interop: PPT->PPTX images with internal-links
When PPT files with pictures containing links to internal slides are
saved as PPTX, it results in corrupted XML output.
Change-Id: Ie5ec67d342d64e2412eb6979e6c2cb58d4a8f97a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193017
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit b19957e1bbd596462a6601847833c5435c57afd0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194234
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 7e0f0bb6318b..7af4392377b7 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -745,7 +745,8 @@ static OUString lcl_GetTarget(const
css::uno::Reference& xMo
if (!xNamed)
continue;
OUString sSlideName = "#" + xNamed->getName();
-if (rURL == sSlideName)
+OUString sApiName = "#page" + OUString::number(i + 1);
+if (rURL == sSlideName || rURL == sApiName)
{
sTarget = "slide" + OUString::number(i + 1) + ".xml";
break;
@@ -1483,16 +1484,20 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
bool bExtURL = URLTransformer().isExternalURL(sBookmark);
sBookmark = bExtURL ? sBookmark : lcl_GetTarget(GetFB()->getModel(),
sBookmark);
-OUString sRelId = mpFB->addRelation(mpFS->getOutputStream(),
-bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
-:
oox::getRelationship(Relationship::SLIDE),
-sBookmark, bExtURL);
-
+OUString sRelId;
+if (!sBookmark.isEmpty())
+{
+sRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
+ :
oox::getRelationship(Relationship::SLIDE),
+ sBookmark, bExtURL);
+}
if (bExtURL)
mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id),
sRelId);
else
mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id),
sRelId, XML_action,
- "ppaction://hlinksldjump");
+ sBookmark.isEmpty() ? "ppaction://noaction"
+ :
"ppaction://hlinksldjump");
}
AddExtLst(pFS, xShapeProps);
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
diff --git a/sd/qa/unit/data/ppt/tdf168736-1.ppt
b/sd/qa/unit/data/ppt/tdf168736-1.ppt
new file mode 100644
index ..dc4bf7071ecc
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf168736-1.ppt differ
diff --git a/sd/qa/unit/data/ppt/tdf168736-2.ppt
b/sd/qa/unit/data/ppt/tdf168736-2.ppt
new file mode 100644
index ..1d08f151ad0c
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf168736-2.ppt differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx
b/sd/qa/unit/export-tests-ooxml3.cxx
index a41639382fb3..2bbfe5656358 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -1076,6 +1076,26 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3,
testNegativeTimeAnimateValue)
assertXPath(pXmlDoc, sPath + "[@tm]", 0);
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf168736)
+{
+createSdImpressDoc("ppt/tdf168736-1.ppt");
+save(TestFilter::PPTX);
+
+xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+
+// Verify hyperlink to nextslide is properly exported the Relationship has
Target attribute
+assertXPath(pXmlDoc,
"/p:sld/p:cSld/p:spTree/p:sp[3]/p:txBody/a:p/a:r/a:rPr/a:hlinkClick",
+"action", u"ppaction://hlinkshowjump?jump=nextslide");
+
+createSdImpressDoc("ppt/tdf168736-2.ppt");
+save(TestFilter::PPTX);
+
+xmlDocUniquePtr pXmlDocRels =
parseExport(u"ppt/slides/_rels/slide2.xml.rels"_ustr);
+
+// Verify that the Relationship has Target attribute
+assertXPath(pXmlDocRels, "/rels:Relationships/rels:Relationship[1]",
"Target", u"slide1.xml");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: oox/source
oox/source/export/shapes.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 04ff6fe90911d7ab2d20ac282a0a698eba35f19d Author: Noel Grandin AuthorDate: Thu Nov 20 15:04:43 2025 +0200 Commit: Noel Grandin CommitDate: Sat Nov 22 08:11:45 2025 +0100 mso-test: invalid prstDash enum value found by converting tdf116793-7.odp to pptx and running officeotron on the output pptx does not support this border-line-style, and empty is not valid, so just pick something close. Change-Id: I72c299ad79c8d6f5d40ab7d21cda438b5c58134b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194271 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Stahl (cherry picked from commit d281d44f6a308b643fc18ad3efa6103589ada17d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194345 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 6f9c7ea2c7b4..7e0f0bb6318b 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -2565,7 +2565,13 @@ void ShapeExport::WriteBorderLine(const sal_Int32 xml_line_element, const Border case ::table::BorderLineStyle::DASH_DOT_DOT: sBorderStyle = "sysDashDotDot"; break; +default: +// There is no equivalent so pick something else, since we cannot have empty. +// There are very few default styles for pptx. +sBorderStyle = "solid"; +break; } +assert(!sBorderStyle.isEmpty() && "empty is not a valid value for PPTX"); mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, sBorderStyle); mpFS->endElementNS(XML_a, xml_line_element); }
core.git: oox/source
oox/source/export/drawingml.cxx | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 8adad56b37c5dcf0fc598cc9e6d3c190ca4311b2
Author: Noel Grandin
AuthorDate: Thu Nov 20 11:27:55 2025 +0200
Commit: Noel Grandin
CommitDate: Fri Nov 21 11:40:04 2025 +0100
mso-test: invalid buAutoNum enum value
found by converting tdf135078-1.odp to pptx and running officeotron on the
output
pptx does not support some of the combinations here, so choose the closest
appropriate one.
Change-Id: I6157c83d1a741f3590eb7db28ec9ac16f6ce80f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194252
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 74e53fa6f70ddb05e30766832868600798d20e65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194302
Reviewed-by: Noel Grandin
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f7ded04d18c7..7f503d3a6396 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3163,21 +3163,34 @@ static OUString GetAutoNumType(SvxNumType
nNumberingType, bool bSDot, bool bPBeh
else if (bSDot)
sPrefixSuffix = "Period";
+// For some of these, there is no corresponding valid value, so we use
val+"Period"
switch( nNumberingType )
{
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_UPPER_LETTER :
-return "alphaUc" + sPrefixSuffix;
+if (sPrefixSuffix.isEmpty())
+return u"alphaUcPeriod"_ustr;
+else
+return "alphaUc" + sPrefixSuffix;
case SVX_NUM_CHARS_LOWER_LETTER_N :
case SVX_NUM_CHARS_LOWER_LETTER :
-return "alphaLc" + sPrefixSuffix;
+if (sPrefixSuffix.isEmpty())
+return u"alphaLcPeriod"_ustr;
+else
+return "alphaLc" + sPrefixSuffix;
case SVX_NUM_ROMAN_UPPER :
-return "romanUc" + sPrefixSuffix;
+if (sPrefixSuffix.isEmpty())
+return u"romanUcPeriod"_ustr;
+else
+return "romanUc" + sPrefixSuffix;
case SVX_NUM_ROMAN_LOWER :
-return "romanLc" + sPrefixSuffix;
+if (sPrefixSuffix.isEmpty())
+return u"romanLcPeriod"_ustr;
+else
+return "romanLc" + sPrefixSuffix;
case SVX_NUM_ARABIC :
{
core.git: oox/source
oox/source/export/drawingml.cxx |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 9dea9ed0a1d12474b120471f709d20035a8266d5
Author: Karthik Godha
AuthorDate: Tue Nov 18 14:16:08 2025 +0530
Commit: Michael Stahl
CommitDate: Thu Nov 20 16:01:38 2025 +0100
tdf#169487: PPT->PPTX Fix export of a:ext
In PPTX export `cx` and `cy` in a:ext can't be greater than
2147483647
Change-Id: I23ce1c79cda01c7ecd775eecb1d453f3e707bf9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194150
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit cc2de7418d6fce04e52e6bb70a3240e969946c5c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194230
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0649ddeb0232..f7ded04d18c7 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2303,12 +2303,15 @@ void DrawingML::WriteTransformation(const Reference<
XShape >& xShape, const too
sal_Int32 nChildLeft = nLeft;
sal_Int32 nChildTop = nTop;
+const sal_Int64 MAX_SIZE = std::numeric_limits::max();
+sal_Int32 nCx =
std::min(oox::drawingml::convertHmmToEmu(rRect.GetWidth()), MAX_SIZE);
+sal_Int32 nCy =
std::min(oox::drawingml::convertHmmToEmu(rRect.GetHeight()), MAX_SIZE);
+
mpFS->singleElementNS(XML_a, XML_off,
XML_x, OString::number(oox::drawingml::convertHmmToEmu(nLeft)),
XML_y, OString::number(oox::drawingml::convertHmmToEmu(nTop)));
-mpFS->singleElementNS(XML_a, XML_ext,
-XML_cx,
OString::number(oox::drawingml::convertHmmToEmu(rRect.GetWidth())),
-XML_cy,
OString::number(oox::drawingml::convertHmmToEmu(rRect.GetHeight(;
+mpFS->singleElementNS(XML_a, XML_ext, XML_cx, OString::number(nCx), XML_cy,
+ OString::number(nCy));
if (bIsGroupShape && (GetDocumentType() != DOCUMENT_DOCX ||
IsTopGroupObj(xShape)))
{
core.git: oox/source sc/qa sd/qa
oox/source/export/shapes.cxx |6 ++-
sc/qa/unit/data/xlsx/tdf169496_hidden_graphic.xlsx |binary
sc/qa/unit/subsequent_export_test4.cxx | 39 +
sd/qa/unit/data/pptx/tdf169496_hidden_graphic.pptx |binary
sd/qa/unit/export-tests-ooxml4.cxx | 37 +++
5 files changed, 81 insertions(+), 1 deletion(-)
New commits:
commit a913faf181afb8b8718711eba0ad0cceec961f01
Author: Aron Budea
AuthorDate: Tue Nov 18 12:31:21 2025 +1030
Commit: Aron Budea
CommitDate: Thu Nov 20 09:44:05 2025 +0100
tdf#169496 oox: hidden images in PPTX/XLSX shown after roundtrip
Because 'hidden' attribute of 'cNvPr' wasn't exported.
Change-Id: I5f8a79232e3b76f04269caae0631ba5b9710443a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194142
Tested-by: Jenkins
Reviewed-by: Mike Kaganski
Reviewed-by: Aron Budea
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 8382d9789d83..6f9c7ea2c7b4 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1418,11 +1418,14 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
OUString sDescr, sURL, sBookmark, sPPAction;
+bool bVisible = true;
if ( GetProperty( xShapeProps, u"Description"_ustr ) )
mAny >>= sDescr;
if ( GetProperty( xShapeProps, u"URL"_ustr ) )
mAny >>= sURL;
+if ( GetProperty( xShapeProps, u"Visible"_ustr ) )
+mAny >>= bVisible;
if (GetProperty(xShapeProps, u"Bookmark"_ustr))
mAny >>= sBookmark;
if (GetProperty(xShapeProps, u"OnClick"_ustr))
@@ -1431,7 +1434,8 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, OString::number(GetNewShapeID(xShape)),
XML_name, GetShapeName(xShape),
- XML_descr, sax_fastparser::UseIf(sDescr,
!sDescr.isEmpty()));
+ XML_descr, sax_fastparser::UseIf(sDescr,
!sDescr.isEmpty()),
+ XML_hidden, sax_fastparser::UseIf("1", !bVisible));
if (eClickAction != presentation::ClickAction_NONE)
{
diff --git a/sc/qa/unit/data/xlsx/tdf169496_hidden_graphic.xlsx
b/sc/qa/unit/data/xlsx/tdf169496_hidden_graphic.xlsx
new file mode 100644
index ..ce1a9a75c14a
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf169496_hidden_graphic.xlsx
differ
diff --git a/sc/qa/unit/subsequent_export_test4.cxx
b/sc/qa/unit/subsequent_export_test4.cxx
index 745ed2c1f4b4..1bb4c3d3bba9 100644
--- a/sc/qa/unit/subsequent_export_test4.cxx
+++ b/sc/qa/unit/subsequent_export_test4.cxx
@@ -935,6 +935,45 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4,
testTdf139258_rotated_image)
assertXPathContent(pDrawing, "/xdr:wsDr/xdr:twoCellAnchor/xdr:to/xdr:row",
u"25");
}
+CPPUNIT_TEST_FIXTURE(ScExportTest4, testtdf169496_hidden_graphic)
+{
+createScDoc("xlsx/tdf169496_hidden_graphic.xlsx");
+
+save(u"Calc Office Open XML"_ustr);
+
+xmlDocUniquePtr pDrawing = parseExport(u"xl/drawings/drawing1.xml"_ustr);
+CPPUNIT_ASSERT(pDrawing);
+
+// Graphic 4 is hidden and Graphic 3 is visible, but their order might
change in the XML
+// Without the fix the hidden attribute wasn't exported
+OUString sName1 = getXPath(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[1]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "name");
+OUString sName2 = getXPath(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[2]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "name");
+if (sName1 == "Graphic 4" && sName2 == "Graphic 3")
+{
+OUString aHidden = getXPath(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[1]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "hidden");
+bool bHidden = aHidden == u"true"_ustr || aHidden == u"1";
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 3 is supposed to be hidden",
true, bHidden);
+
+assertXPathNoAttribute(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[2]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "hidden");
+}
+else if (sName1 == "Graphic 3" && sName2 == "Graphic 4")
+{
+assertXPathNoAttribute(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[1]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "hidden");
+
+OUString aHidden = getXPath(
+pDrawing,
"/xdr:wsDr/xdr:twoCellAnchor[2]/xdr:pic/xdr:nvPicPr/xdr:cNvPr", "hidden");
+bool bHidden = aHidden == u"true"_ustr || aHidden == u"1";
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Graphic 4 is supposed to be hidden",
true, bHidden);
+}
+else
+CPPUNIT_FAIL("Names of graphics is incorrect");
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf144642_RowHeightRounding)
{
// MS Excel round down row heights to 0.75pt
diff --git a/sd/qa/unit/data/pptx/tdf169496_hidden_graphi
core.git: oox/source
oox/source/export/drawingml.cxx | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
New commits:
commit 0fa14f38a6538b57e18ee44873cdcc31a78cea5c
Author: Noel Grandin
AuthorDate: Tue Nov 18 10:49:50 2025 +0200
Commit: Michael Stahl
CommitDate: Wed Nov 19 17:44:51 2025 +0100
mso-test: invalid attribute values in srcRect
found by converting tdf97212-1.odp to pptx and running officeotron on the
output
we end up with markup like:
Change-Id: I1780cd7b668351b6ced3cd52d557b4a57f959b60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194153
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit bf8db30c20f4c599a53879c0564042b6c4dcb4b6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194200
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7c15777a5999..0649ddeb0232 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2014,14 +2014,15 @@ void
DrawingML::WriteGraphicCropProperties(uno::Reference c
if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
aOriginalSize =
Application::GetDefaultDevice()->PixelToLogic(aOriginalSize,
MapMode(MapUnit::Map100thMM));
-if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top)
|| (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
-{
-mpFS->singleElementNS( XML_a, XML_srcRect,
-XML_l,
OString::number(rtl::math::round(aGraphicCropStruct.Left * 10.0 /
aOriginalSize.Width())),
-XML_t, OString::number(rtl::math::round(aGraphicCropStruct.Top
* 10.0 / aOriginalSize.Height())),
-XML_r,
OString::number(rtl::math::round(aGraphicCropStruct.Right * 10.0 /
aOriginalSize.Width())),
-XML_b,
OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 10.0 /
aOriginalSize.Height())) );
-}
+if (aOriginalSize.Width() != 0 && aOriginalSize.Height() != 0)
+if ( (0 != aGraphicCropStruct.Left) || (0 !=
aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 !=
aGraphicCropStruct.Bottom) )
+{
+mpFS->singleElementNS( XML_a, XML_srcRect,
+XML_l,
OString::number(rtl::math::round(aGraphicCropStruct.Left * 10.0 /
aOriginalSize.Width())),
+XML_t,
OString::number(rtl::math::round(aGraphicCropStruct.Top * 10.0 /
aOriginalSize.Height())),
+XML_r,
OString::number(rtl::math::round(aGraphicCropStruct.Right * 10.0 /
aOriginalSize.Width())),
+XML_b,
OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 10.0 /
aOriginalSize.Height())) );
+}
}
}
core.git: oox/source
oox/source/export/drawingml.cxx |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 31f7e5adee4dc599987d169493bd260f84554203
Author: Karthik Godha
AuthorDate: Wed Nov 12 18:21:24 2025 +0530
Commit: Michael Stahl
CommitDate: Mon Nov 17 14:47:59 2025 +0100
tdf#169401: PPT->PPTX exporting too many tabstops
When exporting as PPTX we are exporting too many tabstops. According
to CT_TextTabStopList, can't have more than 32 tabstops.
Change-Id: Ia96afc566a8e94b7a938cd645d05f4318cc2f970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193860
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit 07f6354e66772a4ddbcdff06e3a6c842c687b9dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194086
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index cfeaf8f5fdba..7c15777a5999 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3373,8 +3373,10 @@ void DrawingML::WriteParagraphTabStops(const
Reference& rXPropSet)
if (aTabStops.getLength() > 0)
mpFS->startElementNS(XML_a, XML_tabLst);
-for (const css::style::TabStop& rTabStop : aTabStops)
+const sal_uInt8 MAX_TAB_STOPS = 32;
+for (sal_uInt8 i = 0; i < aTabStops.getLength() && i < MAX_TAB_STOPS; i++)
{
+const css::style::TabStop& rTabStop = aTabStops[i];
OString sPosition =
OString::number(GetPointFromCoordinate(rTabStop.Position));
OString sAlignment;
switch (rTabStop.Alignment)
core.git: oox/source sd/qa
oox/source/export/shapes.cxx|4 +++-
sd/qa/unit/data/pptx/tdf169088.pptx |binary
sd/qa/unit/export-tests-ooxml4.cxx | 24
3 files changed, 27 insertions(+), 1 deletion(-)
New commits:
commit 2feb36d92e270240019ff5681466fc4ac97a5405
Author: Karthik
AuthorDate: Tue Oct 28 22:14:58 2025 +0530
Commit: Noel Grandin
CommitDate: Tue Nov 11 06:50:51 2025 +0100
tdf#169088 Fix PPTX export of OLE animations
Presentations with OLE animations when saved as PPTX can't be opened
in PowerPoint.
When exporting OLE animations, the target of the animation is set to
the `pic` inside the OLE instead of OLE.
Change-Id: Ic3e870fff2e896404960f475c67f44df0aef1860
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193110
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit be36f4c40bb7b0c1b8ceb974c932a687f5c488be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193736
Reviewed-by: Noel Grandin
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index d2413cfcae20..08addb42cedc 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -3009,7 +3009,9 @@ sal_Int32 ShapeExport::GetNewShapeID( const Reference<
XShape >& rXShape, XmlFil
sal_Int32 nID = pFB->GetUniqueId();
-(*mpShapeMap)[ rXShape ] = nID;
+auto it = mpShapeMap->find(rXShape);
+if (it == mpShapeMap->end())
+(*mpShapeMap)[rXShape] = nID;
return nID;
}
diff --git a/sd/qa/unit/data/pptx/tdf169088.pptx
b/sd/qa/unit/data/pptx/tdf169088.pptx
new file mode 100644
index ..6b290d6f43bb
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf169088.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx
b/sd/qa/unit/export-tests-ooxml4.cxx
index 833653d0c7de..25b42f4c206f 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -1560,6 +1560,30 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4,
testTextAlignLeft)
assertXPath(pXmlDocRels,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr", "algn", u"l");
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOLEObjectAnimationTarget)
+{
+createSdImpressDoc("pptx/tdf169088.pptx");
+save(u"Impress Office Open XML"_ustr);
+
+xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+
+const OUString sOleId = getXPath(
+pXmlDoc,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id");
+
+// Check animation target spid matches OLE object id
+assertXPath(pXmlDoc,
+
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
+
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:set/"
+"p:cBhvr/p:tgtEl/p:spTgt",
+"spid", sOleId);
+
+assertXPath(pXmlDoc,
+
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
+
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect/"
+"p:cBhvr/p:tgtEl/p:spTgt",
+"spid", sOleId);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: oox/source sw/qa
oox/source/core/xmlfilterbase.cxx | 31 --
sw/qa/extras/ooxmlexport/data/tdf169072_illegalDates.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport21.cxx| 13 +
3 files changed, 40 insertions(+), 4 deletions(-)
New commits:
commit 63bac9055e2e81e238af885c289e99b733d86d7a
Author: Justin Luth
AuthorDate: Thu Nov 6 21:17:18 2025 -0500
Commit: Justin Luth
CommitDate: Sat Nov 8 00:27:06 2025 +0100
tdf#169072 ms export: valid date years are 1601 -
The dates in core.xml must fall in the range of 1601 - .
This applies to all docx files,
and ECMA_376_1ST_EDITION (2007) versions of the other formats.
No existing unit tests had ANY dates outside of that range.
make CppunitTest_sw_ooxmlexport21 \
CPPUNIT_TEST_NAME=testTdf169072_illegalDates
Change-Id: Ic2c81d13a1a8ed9d2ce29f7fea761900aa2f2d20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193552
Reviewed-by: Justin Luth
Tested-by: Jenkins
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index 0a842c6f3860..6fe4ec4c226d 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -570,6 +570,23 @@ OUString XmlFilterBase::addRelation( const Reference<
XOutputStream >& rOutputSt
return OUString();
}
+static bool lcl_isValidDate(const util::DateTime& rTime, XmlFilterBase& rSelf)
+{
+if (rTime.Year == 0)
+return false;
+
+// MS Office reports document as corrupt if core.xml contains any Year <=
1600 or >
+// for the "package" URI (ECMA_376_1ST_EDITION or docx).
+if (rTime.Year > 1600 && rTime.Year < 1)
+return true;
+
+const bool bDocx =
dynamic_cast(rSelf.getModel().get());
+if (bDocx || rSelf.getVersion() == oox::core::ECMA_376_1ST_EDITION)
+return false;
+
+return true;
+}
+
static void
writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement,
std::u16string_view sValue )
{
@@ -694,7 +711,9 @@ writeCoreProperties( XmlFilterBase& rSelf, const Reference<
XDocumentProperties
}
if (!bRemoveUserInfo)
{
-writeElement(pCoreProps, FSNS(XML_dcterms, XML_created),
xProperties->getCreationDate());
+const util::DateTime aCreateDate = xProperties->getCreationDate();
+if (lcl_isValidDate(aCreateDate, rSelf))
+writeElement(pCoreProps, FSNS(XML_dcterms, XML_created),
aCreateDate);
writeElement(pCoreProps, FSNS(XML_dc, XML_creator),
xProperties->getAuthor());
}
writeElement( pCoreProps, FSNS( XML_dc, XML_description ),
xProperties->getDescription() );
@@ -712,9 +731,13 @@ writeCoreProperties( XmlFilterBase& rSelf, const
Reference< XDocumentProperties
if (!bRemoveUserInfo)
{
writeElement(pCoreProps, FSNS(XML_cp, XML_lastModifiedBy),
xProperties->getModifiedBy());
-writeElement(pCoreProps, FSNS(XML_cp, XML_lastPrinted),
xProperties->getPrintDate());
-writeElement(pCoreProps, FSNS(XML_dcterms, XML_modified),
- xProperties->getModificationDate());
+const util::DateTime aPrintDate = xProperties->getPrintDate();
+if (lcl_isValidDate(aPrintDate, rSelf))
+writeElement(pCoreProps, FSNS(XML_cp, XML_lastPrinted),
aPrintDate);
+
+const util::DateTime aModifyDate = xProperties->getModificationDate();
+if (lcl_isValidDate(aModifyDate, rSelf))
+writeElement(pCoreProps, FSNS(XML_dcterms, XML_modified),
aModifyDate);
}
if (!bRemovePersonalInfo)
{
diff --git a/sw/qa/extras/ooxmlexport/data/tdf169072_illegalDates.docx
b/sw/qa/extras/ooxmlexport/data/tdf169072_illegalDates.docx
new file mode 100644
index ..f3e7970c5621
Binary files /dev/null and
b/sw/qa/extras/ooxmlexport/data/tdf169072_illegalDates.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
index 4ce0bdc00361..5ee973c1ebb6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
@@ -820,6 +820,19 @@ CPPUNIT_TEST_FIXTURE(Test, testPersonalMetaData)
pBatch->commit();
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf169072_illegalDates)
+{
+// Given a document that MS Word reports as corrupt
+loadAndSave("tdf169072_illegalDates.docx");
+
+// Date Years MUST be greater than 1600 and less than 10,000
+// so by dropping invalid entries, we have a document that MS Word can now
cleanly open
+xmlDocUniquePtr pXmlCore = parseExport(u"docProps/core.xml"_ustr);
+assertXPathContent(pXmlCore, "/cp:coreProperties/dcterms:created",
u"-10-10T13:07:54Z");
+assertXPathContent(pXmlCore, "/cp:coreProperties/dcterms:modified",
u"1601-01-01T13:09:08Z");
+assertXPath(pXmlCore, "/cp:coreProperties/cp:lastPrinted", 0); // was
1600-12-31T00:00:52Z
+}
+
CPPUNIT_TEST_FIXTURE(Test, testRemoveOnlyEditTimeMetaDa
core.git: oox/source sw/qa
oox/source/export/shapes.cxx |3 ---
sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
New commits:
commit 6b9794ea1c6c24d7c48a1b43a9302c51ea607215
Author: Noel Grandin
AuthorDate: Thu Nov 6 15:04:48 2025 +0200
Commit: Noel Grandin
CommitDate: Fri Nov 7 18:44:03 2025 +0100
mso-test: invalid xdr:twoCellAnchor
This is using the test document from fdo73254-1.xls.
Importing and exporting to XLSX and then running officeotron generates an
error.
The xdr:twoCellAnchor has mandatory subelements, so we cannot skip writing
them,
even if we have no graphic or media URL.
The code I am removing seems to be from
commit cbcffbaee204e9dfbdc2125dda73e36d77e9b844
Author: Jan Holesovsky
Date: Tue Sep 5 16:53:14 2017 +0200
tdf#106867: Export videos in PPTX.
Change-Id: Ie095bad8ea9bf92b553448205f00c9cacf42d513
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193538
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Noel Grandin
(cherry picked from commit 4158108427515dce8452dd1026a4f0412ce3ca9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193570
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index dee09e2af62f..d2413cfcae20 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1403,10 +1403,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
&& (xShapeProps->getPropertyValue(u"MediaURL"_ustr)
>>= sMediaURL);
if (!xGraphic.is() && !bHasMediaURL)
-{
SAL_INFO("oox.shape", "no graphic or media URL found");
-return;
-}
FSHelperPtr pFS = GetFS();
XmlFilterBase* pFB = GetFB();
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index f14474c01cb2..26232b800d15 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -572,7 +572,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf141173_missingFrames)
loadAndReload("tdf141173_missingFrames.rtf");
// Without the fix in place, almost all of the text and textboxes were
missing.
// Without the fix, there were only 2 shapes (mostly unseen).
-CPPUNIT_ASSERT_EQUAL(13, getShapes());
+CPPUNIT_ASSERT_EQUAL(14, getShapes());
}
DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabSpacing, "tdf142404_tabSpacing.docx")
core.git: oox/source
oox/source/export/chartexport.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1fa4d0e6c95bddecbcc63bc6622187a8be2ee48d Author: Noel Grandin AuthorDate: Thu Nov 6 13:37:13 2025 +0200 Commit: Noel Grandin CommitDate: Fri Nov 7 09:07:55 2025 +0100 mso-test: c:noMultiLvlLbl not valid for category axis This is using the test document from forum-mso-en4-58299.xls. Importing and exporting to XLSX and then running officeotron generates an error. The c:noMultiLvlLbl element is only valid for category axes, not date axes. Change-Id: If24941b9802a8e6e8f4e9243ad8f5cf07a85b1d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193527 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Stahl (cherry picked from commit cdf2a068a6c5f4d4d8051d845a08f9552b913079) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193545 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index dbc062fada61..c9622e02ed36 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -4518,7 +4518,8 @@ void ChartExport::exportOneAxis_chart( } // FIXME: seems not support? noMultiLvlLbl -pFS->singleElement(FSNS(XML_c, XML_noMultiLvlLbl), XML_val, OString::number(0)); +if( nAxisType == XML_catAx ) +pFS->singleElement(FSNS(XML_c, XML_noMultiLvlLbl), XML_val, OString::number(0)); } // crossBetween
core.git: oox/source
oox/source/export/chartexport.cxx | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
New commits:
commit 50ab8446cb17acc36922e794169574824f7b3387
Author: Noel Grandin
AuthorDate: Wed Nov 5 13:35:49 2025 +0200
Commit: Noel Grandin
CommitDate: Thu Nov 6 10:18:10 2025 +0100
mso-test: fix export of rotX
This is using the test document from ooo72994-7.xls.
Fix the export of the rotX value for 3D charts.
We cannot easily map the value here, all we can do is clamp it.
Change-Id: I1beba485c66babfbe03830c79b8b8c72a7560bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193456
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 8758fa5ab4b8c99ab15334653c58651c6edd2e35)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193511
Reviewed-by: Noel Grandin
Tested-by: Jenkins
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 60d79c954263..dbc062fada61 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -5816,17 +5816,24 @@ void ChartExport::exportView3D()
{
sal_Int32 nRotationX = 0;
mAny >>= nRotationX;
-if( nRotationX < 0 )
+if(eChartType == chart::TYPEID_PIE)
{
-if(eChartType == chart::TYPEID_PIE)
-{
/* In OOXML we get value in 0..90 range for pie chart X rotation ,
whereas we expect it to be in -90..90 range,
so we convert that during import. It is modified in
View3DConverter::convertFromModel()
here we convert it back to 0..90 as we received in import */
- nRotationX += 90; // X rotation (map Chart2 [-179,180] to
OOXML [0..90])
-}
-else
-nRotationX += 360; // X rotation (map Chart2 [-179,180] to
OOXML [-90..90])
+if( nRotationX < 0 )
+nRotationX += 90; // X rotation (map Chart2 [-179,180] to
OOXML [0..90])
+}
+else
+{
+assert(nRotationX >= -180 && nRotationX <= 180);
+// X rotation (map Chart2 [-179,180] to OOXML [-90..90])
+// This is not ideal, we are losing information, but that is
unavoidable since OOXML does not
+// allow upside down 3d charts.
+if( nRotationX < -90 )
+nRotationX = -90;
+else if( nRotationX > 90 )
+nRotationX = 90;
}
pFS->singleElement(FSNS(XML_c, XML_rotX), XML_val,
OString::number(nRotationX));
}
core.git: oox/source
oox/source/export/chartexport.cxx | 57 --
1 file changed, 30 insertions(+), 27 deletions(-)
New commits:
commit 320a5640dec289cc936b9de51a09760d33432acd
Author: Noel Grandin
AuthorDate: Mon Nov 3 13:32:42 2025 +0200
Commit: Noel Grandin
CommitDate: Tue Nov 4 09:44:36 2025 +0100
mso-test: c:dLbl element wrong order
This is using the test document from ttdf92129-5.odt.
When importing and exporting to DOCX, we were writing the dLbl before the
numFormat
element, instead of after it.
Change-Id: I541688f2df4f879294ad56182db8eb1df6edf182
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193344
Reviewed-by: Michael Stahl
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit 5f3fca8a18aa697904a0310db22db6dab27fba67)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193383
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 9b747901129b..c0795954aab0 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -5059,33 +5059,6 @@ void ChartExport::exportDataLabels(
pFS->startElement(FSNS(XML_c, XML_dLbls));
}
-bool bLinkedNumFmt = true;
-if (GetProperty(xPropSet, u"LinkNumberFormatToSource"_ustr))
-mAny >>= bLinkedNumFmt;
-
-chart2::DataPointLabel aLabel;
-bool bLabelIsNumberFormat = true;
-if( xPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel )
-bLabelIsNumberFormat = aLabel.ShowNumber;
-
-if (GetProperty(xPropSet, bLabelIsNumberFormat ? u"NumberFormat"_ustr :
u"PercentageNumberFormat"_ustr))
-{
-sal_Int32 nKey = 0;
-mAny >>= nKey;
-
-OUString aNumberFormatString = getNumberFormatCode(nKey);
-
-if (bIsChartex) {
-pFS->singleElement(FSNS(XML_cx, XML_numFmt),
-XML_formatCode, aNumberFormatString,
-XML_sourceLinked, ToPsz10(bLinkedNumFmt));
-} else {
-pFS->singleElement(FSNS(XML_c, XML_numFmt),
-XML_formatCode, aNumberFormatString,
-XML_sourceLinked, ToPsz10(bLinkedNumFmt));
-}
-}
-
uno::Sequence aAttrLabelIndices;
xPropSet->getPropertyValue(u"AttributedDataPoints"_ustr) >>=
aAttrLabelIndices;
@@ -5192,9 +5165,12 @@ void ChartExport::exportDataLabels(
}
}
+bool bLinkedNumFmt = false;
if( GetProperty(xLabelPropSet, u"LinkNumberFormatToSource"_ustr) )
mAny >>= bLinkedNumFmt;
+chart2::DataPointLabel aLabel;
+bool bLabelIsNumberFormat = true;
if( xLabelPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel )
bLabelIsNumberFormat = aLabel.ShowNumber;
else
@@ -5222,6 +5198,33 @@ void ChartExport::exportDataLabels(
pFS->endElement(FSNS(XML_c, XML_dLbl));
}
+bool bLinkedNumFmt = true;
+if (GetProperty(xPropSet, u"LinkNumberFormatToSource"_ustr))
+mAny >>= bLinkedNumFmt;
+
+chart2::DataPointLabel aLabel;
+bool bLabelIsNumberFormat = true;
+if( xPropSet->getPropertyValue(u"Label"_ustr) >>= aLabel )
+bLabelIsNumberFormat = aLabel.ShowNumber;
+
+if (GetProperty(xPropSet, bLabelIsNumberFormat ? u"NumberFormat"_ustr :
u"PercentageNumberFormat"_ustr))
+{
+sal_Int32 nKey = 0;
+mAny >>= nKey;
+
+OUString aNumberFormatString = getNumberFormatCode(nKey);
+
+if (bIsChartex) {
+pFS->singleElement(FSNS(XML_cx, XML_numFmt),
+XML_formatCode, aNumberFormatString,
+XML_sourceLinked, ToPsz10(bLinkedNumFmt));
+} else {
+pFS->singleElement(FSNS(XML_c, XML_numFmt),
+XML_formatCode, aNumberFormatString,
+XML_sourceLinked, ToPsz10(bLinkedNumFmt));
+}
+}
+
// Baseline label properties for all labels.
writeLabelProperties(pFS, this, xPropSet, aParam, -1, rDLblsRange,
bIsChartex);
core.git: oox/source
oox/source/drawingml/textbodycontext.cxx |1 +
1 file changed, 1 insertion(+)
New commits:
commit 9e1f0e934ae3fe24361a55b227683d319deea5b7
Author: Caolán McNamara
AuthorDate: Sun Nov 2 11:29:23 2025 +
Commit: Caolán McNamara
CommitDate: Sun Nov 2 15:43:53 2025 +0100
cid#1668302 Uninitialized scalar field
and
cid#1668301 Uninitialized scalar field
Change-Id: I7fcaf39b2a6183c8627be0a8a46015fd37956c5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193300
Reviewed-by: Caolán McNamara
Tested-by: Jenkins
diff --git a/oox/source/drawingml/textbodycontext.cxx
b/oox/source/drawingml/textbodycontext.cxx
index 17a02b8b2a61..927b8b756639 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -179,6 +179,7 @@ ContextHandlerRef RegularTextRunContext::onCreateContext(
sal_Int32 aElementToke
TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent,
TextBody& rTextBody )
: ContextHandler2( rParent )
, mrTextBody( rTextBody )
+, mListNumberingMask(0)
{
}
core.git: oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 8e2e7e1dfd65f018266fa11093c8ab1e0a48e420
Author: Dr. David Alan Gilbert
AuthorDate: Wed Oct 8 01:27:03 2025 +0100
Commit: David Gilbert
CommitDate: Thu Oct 30 15:57:43 2025 +0100
tdf#168406: oox: Restart numbering on 'startAt'
A pptx numbered list can have its numbering restarted at an arbitrary number
with a 'startAt' entry e.g.:
We already store this value, which ends up in the bullet properties,
but we also need to tell LO to restart numbering using the new value.
In tdf#168406 this saves 8 biking related deaths!
Change-Id: Idb635f6d89f8da35cf91cf0ea266a587f8f46bc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192161
Tested-by: Jenkins
Reviewed-by: David Gilbert
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 8ae21020441b..6004e730a9b1 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -291,7 +291,12 @@ ContextHandlerRef
TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
{
try {
sal_Int32 nType = rAttribs.getToken( XML_type, 0 );
-sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, 1 );
+sal_Int32 nStartAt = rAttribs.getInteger( XML_startAt, -1 );
+if( nStartAt >= 0 )
+{
+mrTextParagraphProperties.setRestartNumbering(true);
+}
+
if( nStartAt > 32767 )
{
nStartAt = 32767;
core.git: oox/source
oox/source/export/shapes.cxx | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
New commits:
commit af9ec68c2acfa927ce6f5b4a8cb123fc8822dd0c
Author: Karthik Godha
AuthorDate: Tue Oct 21 09:41:13 2025 +0530
Commit: Michael Stahl
CommitDate: Wed Oct 29 15:37:37 2025 +0100
tdf#168786: Fix PPT->PPTX internal link leading nowhere
When saving PPT files with invalid link targets to PPTX, it results in
corrupted XML output.
Remove links with empty targets during PPTX export.
Change-Id: I4c0a413c5a9c479094b3f48eead6d3676e6cf804
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192762
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Stahl
(cherry picked from commit 0318671fb187941726316442651911a96a80f2f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193075
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 4251c69a0f4e..dee09e2af62f 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1000,16 +1000,20 @@ ShapeExport& ShapeExport::WriteCustomShape( const
Reference< XShape >& xShape )
bool bExtURL = URLTransformer().isExternalURL(sBookmark);
sBookmark = bExtURL ? sBookmark :
lcl_GetTarget(GetFB()->getModel(), sBookmark);
-OUString sRelId
-= mpFB->addRelation(mpFS->getOutputStream(),
-bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
-:
oox::getRelationship(Relationship::SLIDE),
-sBookmark, bExtURL);
+OUString sRelId;
+if (!sBookmark.isEmpty())
+{
+sRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ bExtURL ?
oox::getRelationship(Relationship::HYPERLINK)
+ :
oox::getRelationship(Relationship::SLIDE),
+ sBookmark, bExtURL);
+}
if (bExtURL)
mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r,
XML_id), sRelId);
else
-mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r,
XML_id), sRelId,
- XML_action, "ppaction://hlinksldjump");
+mpFS->singleElementNS(
+XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId,
XML_action,
+sBookmark.isEmpty() ? "ppaction://noaction" :
"ppaction://hlinksldjump");
}
AddExtLst(pFS, rXPropSet);
pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
core.git: oox/source
oox/source/export/shapes.cxx |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit daba89f6b6d53c10fbd380b3608fc80f25de1bc0
Author: Michael Meeks
AuthorDate: Mon Oct 6 20:50:39 2025 +0100
Commit: Mike Kaganski
CommitDate: Tue Oct 7 07:41:52 2025 +0200
oox: don't write empty cNvPr descriptions to reduce diff noise.
Change-Id: I360dc8eb9dbfb618fff03c96d9447db21b5ddafe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191997
Reviewed-by: Mike Kaganski
Tested-by: Jenkins
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 0e3a2d94e6a6..c150641a2fe5 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1417,9 +1417,8 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
OUString sDescr, sURL, sBookmark, sPPAction;
-bool bHaveDesc;
-if ( ( bHaveDesc = GetProperty( xShapeProps, u"Description"_ustr ) ) )
+if ( GetProperty( xShapeProps, u"Description"_ustr ) )
mAny >>= sDescr;
if ( GetProperty( xShapeProps, u"URL"_ustr ) )
mAny >>= sURL;
@@ -1429,9 +1428,9 @@ void ShapeExport::WriteGraphicObjectShapePart( const
Reference< XShape >& xShape
mAny >>= eClickAction;
pFS->startElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, OString::number(GetNewShapeID(xShape)),
- XML_name, GetShapeName(xShape),
- XML_descr, sax_fastparser::UseIf(sDescr,
bHaveDesc));
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, GetShapeName(xShape),
+ XML_descr, sax_fastparser::UseIf(sDescr,
!sDescr.isEmpty()));
if (eClickAction != presentation::ClickAction_NONE)
{
core.git: oox/source
oox/source/export/drawingml.cxx |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 0a8c2c1fccbc527ae4d992501f407085968a20bb
Author: Michael Meeks
AuthorDate: Tue Oct 7 09:55:58 2025 +0100
Commit: Michael Meeks
CommitDate: Tue Oct 7 15:23:32 2025 +0200
oox: match bodyPr attribute ordering.
Change-Id: I26a5f73f2612b76a5fdb3af9aaebc61bb938b6ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192014
Tested-by: Jenkins
Reviewed-by: Michael Meeks
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 24fce570b203..37483dd8e536 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4256,10 +4256,10 @@ void DrawingML::WriteBodyProps(const
css::uno::Reference< css::uno::XInterface >
XML_fromWordArt, sax_fastparser::UseIf("1",
bFromWordArt),
XML_lIns,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeft)),
bRequireInset ||
nLeft != mconstDefaultLeftRightInset),
- XML_rIns,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRight)),
- bRequireInset ||
nRight != mconstDefaultLeftRightInset),
XML_tIns,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nTop)),
bRequireInset ||
nTop != mconstDefaultTopBottomInset),
+ XML_rIns,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRight)),
+ bRequireInset ||
nRight != mconstDefaultLeftRightInset),
XML_bIns,
sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nBottom)),
bRequireInset ||
nBottom != mconstDefaultTopBottomInset),
XML_anchor, sAnchor,
core.git: oox/source sd/source
oox/source/export/drawingml.cxx |8
sd/source/filter/eppt/pptx-animations.cxx | 14 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 1950a7fd912dd08f2555472871b944d551a5ad9a
Author: Michael Meeks
AuthorDate: Fri Oct 3 17:58:59 2025 +0100
Commit: Michael Meeks
CommitDate: Mon Oct 6 13:13:56 2025 +0200
pptx export: re-order attributes to better match MSO.
This helps to minimize the diff.
Change-Id: I8a16932725094ca047350503f65c673fa85f8398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191943
Reviewed-by: Michael Meeks
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0eef9173abbb..ecfd3d3977b7 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2696,14 +2696,14 @@ void DrawingML::WriteRunProperties( const Reference<
XPropertySet >& rRun, bool
}
mpFS->startElementNS( XML_a, nElement,
- XML_b, bold,
- XML_i, italic,
XML_lang, sax_fastparser::UseIf(usLanguage,
!usLanguage.isEmpty()),
XML_sz, OString::number(nSize),
-// For Condensed character spacing spc value is negative.
+ XML_b, bold,
+ XML_i, italic,
+ XML_u, underline,
+ // For Condensed character spacing spc value is
negative.
XML_spc,
sax_fastparser::UseIf(OString::number(nCharKerning), nCharKerning != 0),
XML_strike, strikeout,
- XML_u, underline,
XML_baseline,
sax_fastparser::UseIf(OString::number(nCharEscapement*1000), nCharEscapement !=
0),
XML_cap, cap );
diff --git a/sd/source/filter/eppt/pptx-animations.cxx
b/sd/source/filter/eppt/pptx-animations.cxx
index dbe264019c75..0abbbd8f8ffa 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -917,13 +917,13 @@ void
PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()
if (fRepeatCount != 0)
sRepeatCount = OString::number(static_cast(fRepeatCount *
1000.0));
-mpFS->startElementNS(
-XML_p, XML_cTn, XML_id,
OString::number(GetNextAnimationNodeId(rXNode)), XML_dur, sDuration,
-XML_autoRev, sax_fastparser::UseIf("1", bAutoReverse), XML_restart,
pRestart, XML_nodeType,
-pNodeType, XML_fill, pFill, XML_presetClass, pPresetClass,
XML_presetID,
-sax_fastparser::UseIf(OString::number(nPresetId), bPresetId),
XML_presetSubtype,
-sax_fastparser::UseIf(OString::number(nPresetSubType),
bPresetSubType), XML_repeatCount,
-sRepeatCount);
+mpFS->startElementNS(XML_p, XML_cTn, XML_id,
OString::number(GetNextAnimationNodeId(rXNode)),
+ XML_dur, sDuration, XML_restart, pRestart,
XML_presetID,
+ sax_fastparser::UseIf(OString::number(nPresetId),
bPresetId),
+ XML_presetClass, pPresetClass, XML_fill, pFill,
XML_nodeType, pNodeType,
+ XML_autoRev, sax_fastparser::UseIf("1",
bAutoReverse), XML_presetSubtype,
+
sax_fastparser::UseIf(OString::number(nPresetSubType), bPresetSubType),
+ XML_repeatCount, sRepeatCount);
WriteAnimationCondList(mpContext->getBeginCondList(), XML_stCondLst);
WriteAnimationCondList(mpContext->getEndCondList(), XML_endCondLst);
core.git: oox/source sd/qa
oox/source/drawingml/textparagraph.cxx |1 -
sd/qa/unit/data/pptx/tdf168835.pptx|binary
sd/qa/unit/uiimpress.cxx | 26 ++
3 files changed, 26 insertions(+), 1 deletion(-)
New commits:
commit 1cc50e3b8a838b487ce4359c3bdebabbdc298be2
Author: Balazs Varga
AuthorDate: Tue Oct 14 10:29:03 2025 +0200
Commit: Balazs Varga
CommitDate: Tue Oct 14 21:57:53 2025 +0200
tdf#168835 sd ooxml import fix wrong placeholder char style
Should not apply maEndProperties for char styles. Original issue
(tdf#111927) works without it as well.
regression after: 629105991ee77335f856d746ef44408414cc150a
(Related: tdf#111927 - PPTX: fix placeholder title text becomes small)
Change-Id: If83b267c7643ec5cc17955ff29e171efc39800b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192372
Reviewed-by: Balazs Varga
Tested-by: Jenkins
Tested-by: Gabor Kelemen
diff --git a/oox/source/drawingml/textparagraph.cxx
b/oox/source/drawingml/textparagraph.cxx
index d256f9d8af64..65d31195002e 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -63,7 +63,6 @@ TextCharacterProperties TextParagraph::getCharacterStyle (
if (pTextParagraphStyle)
aTextCharacterStyle.assignUsed(pTextParagraphStyle->getTextCharacterProperties());
aTextCharacterStyle.assignUsed(maProperties.getTextCharacterProperties());
-aTextCharacterStyle.assignUsed(maEndProperties);
return aTextCharacterStyle;
}
diff --git a/sd/qa/unit/data/pptx/tdf168835.pptx
b/sd/qa/unit/data/pptx/tdf168835.pptx
new file mode 100644
index ..ffc817f847df
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf168835.pptx differ
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index cfe019cd7e80..ec3daa013fa0 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -2056,6 +2057,31 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest,
testTdf166647_userpaint)
CPPUNIT_ASSERT_EQUAL(size_t(2),
pViewShell->GetActualPage()->GetObjCount());
}
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf168835)
+{
+createSdImpressDoc("pptx/tdf168835.pptx");
+checkCurrentPageNumber(1);
+
+dispatchCommand(mxComponent, u".uno:InsertPage"_ustr, {});
+checkCurrentPageNumber(2);
+
+insertStringToObject(0, u"Title of the second slide", /*bUseEscape*/ true);
+
+uno::Reference
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+
+uno::Reference xShape(xDrawPage->getByIndex(0),
uno::UNO_QUERY);
+uno::Reference xParagraph(getParagraphFromShape(0,
xShape));
+
+CPPUNIT_ASSERT_EQUAL(u"Title of the second slide"_ustr,
xParagraph->getString());
+CPPUNIT_ASSERT_EQUAL(44.0f,
xShape->getPropertyValue(u"CharHeight"_ustr).get());
+CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_LEFT),
+
xShape->getPropertyValue(u"ParaAdjust"_ustr).get());
+CPPUNIT_ASSERT_EQUAL(u"Arial"_ustr,
+
xShape->getPropertyValue(u"CharFontName"_ustr).get());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: oox/source sd/source
oox/source/export/drawingml.cxx |2 +- sd/source/filter/eppt/pptx-animations.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 8c582ee34d22a181a949b76bd2b23e3377eda9ed Author: Michael Meeks AuthorDate: Fri Oct 3 18:29:54 2025 +0100 Commit: Michael Meeks CommitDate: Mon Oct 6 13:14:18 2025 +0200 pptx: re-order animEffect and tabLst items for smaller diffs. Change-Id: Iacc6daf63161cade51bac24d376f889915c6f1eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191945 Reviewed-by: Michael Meeks Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index ecfd3d3977b7..9e5592a4b335 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3414,7 +3414,7 @@ void DrawingML::WriteParagraphTabStops(const Reference& rXPropSet) default: sAlignment = "l"_ostr; } -mpFS->singleElementNS(XML_a, XML_tab, XML_algn, sAlignment, XML_pos, sPosition); +mpFS->singleElementNS(XML_a, XML_tab, XML_pos, sPosition, XML_algn, sAlignment); } if (aTabStops.getLength() > 0) mpFS->endElementNS(XML_a, XML_tabLst); diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx index 0abbbd8f8ffa..8f5389871dc7 100644 --- a/sd/source/filter/eppt/pptx-animations.cxx +++ b/sd/source/filter/eppt/pptx-animations.cxx @@ -996,7 +996,7 @@ void PPTXAnimationExport::WriteAnimationNodeEffect() const char* pFilter = ::ppt::AnimationExporter::FindTransitionName( xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection()); const char* pMode = xFilter->getMode() ? "in" : "out"; -mpFS->startElementNS(XML_p, XML_animEffect, XML_filter, pFilter, XML_transition, pMode); +mpFS->startElementNS(XML_p, XML_animEffect, XML_transition, pMode, XML_filter, pFilter); WriteAnimationNodeAnimateInside(false);
core.git: oox/source
oox/source/export/drawingml.cxx | 12
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit 4272cdfc24660a59bea171bd14a13996f8b17127
Author: Mike Kaganski
AuthorDate: Thu Oct 9 12:25:09 2025 +0500
Commit: Mike Kaganski
CommitDate: Fri Oct 10 09:34:30 2025 +0200
Related: tdf#80224 A blind attempt to fix conditions
... introduced in commit 43679f94b45f4d9e120c64a3fb5cc3ee77f12b11
(Fix tdf#80224 Custom text color changed to black on .PPTX export,
2015-08-25).
Those conditions, presumably, intended to use GetProperty in the
non-bCheckDirect case. But the implementation effectively made the
bCheckDirect case also call GetProperty, when state check fails,
which, in the end, has the same effect, as calling GetProperty in
all cases.
I attempted to fix it like this:
bCheckDirect ? GetDirectProperty(rXPropSet, rXPropState, u"Foo"_ustr)
: GetProperty(rXPropSet, u"Foo"_ustr)
but it failed CppunitTest_chart2_export3 then:
Test name: testFormattedChartTitles::TestBody
equality assertion failed
- Expected: 1
- Actual : 0
- In <>, XPath
'/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:p[1]/a:r[5]/a:rPr/a:uFillTx'
number of nodes is incorrect
So this just simplifies the calls to what they effectively did all
this time.
There is no failing document; I found this accidentally, reading
the code.
Change-Id: I6581c23e395a74140daa30a06cdca27b57f4e6a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192111
Tested-by: Jenkins
Reviewed-by: Mike Kaganski
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 45e237a2df68..2ae2c3e2d5fd 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2552,8 +2552,7 @@ void DrawingML::WriteRunProperties( const Reference<
XPropertySet >& rRun, bool
break;
}
-if ((bCheckDirect && GetDirectProperty(rXPropSet, rXPropState,
u"CharUnderline"_ustr))
-|| GetProperty(rXPropSet, u"CharUnderline"_ustr))
+if (GetProperty(rXPropSet, u"CharUnderline"_ustr))
{
switch ( *o3tl::doAccess(mAny) )
{
@@ -2611,8 +2610,7 @@ void DrawingML::WriteRunProperties( const Reference<
XPropertySet >& rRun, bool
}
}
-if ((bCheckDirect && GetDirectProperty(rXPropSet, rXPropState,
u"CharStrikeout"_ustr))
-|| GetProperty(rXPropSet, u"CharStrikeout"_ustr))
+if (GetProperty(rXPropSet, u"CharStrikeout"_ustr))
{
switch ( *o3tl::doAccess(mAny) )
{
@@ -2722,8 +2720,7 @@ void DrawingML::WriteRunProperties( const Reference<
XPropertySet >& rRun, bool
else
{
// mso doesn't like text color to be placed after typeface
-if ((bCheckDirect && GetDirectProperty(rXPropSet, rXPropState,
u"CharColor"_ustr))
-|| GetProperty(rXPropSet, u"CharColor"_ustr))
+if (GetProperty(rXPropSet, u"CharColor"_ustr))
{
::Color color( ColorTransparency,
*o3tl::doAccess(mAny) );
SAL_INFO("oox.shape", "run color: " << sal_uInt32(color) << "
auto: " << sal_uInt32(COL_AUTO));
@@ -2815,8 +2812,7 @@ void DrawingML::WriteRunProperties( const Reference<
XPropertySet >& rRun, bool
}
if (underline
-&& ((bCheckDirect && GetDirectProperty(rXPropSet, rXPropState,
u"CharUnderlineColor"_ustr))
-|| GetProperty(rXPropSet, u"CharUnderlineColor"_ustr)))
+&& (GetProperty(rXPropSet, u"CharUnderlineColor"_ustr)))
{
::Color color(ColorTransparency, *o3tl::doAccess(mAny));
// if color is automatic, then we shouldn't write information about
color but to take color from character
core.git: oox/source
oox/source/export/drawingml.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit f6e493a828031a71ffab2cb7b5168d9ab5a35baa Author: Michael Meeks AuthorDate: Mon Oct 6 14:57:02 2025 +0100 Commit: Michael Meeks CommitDate: Wed Oct 8 14:11:42 2025 +0200 oox: crop ST_TextIndentLevelType to maximum value of 8. Signed-off-by: Michael Meeks Change-Id: I5994b4414a4ef79564a44a8a661498765fd4b125 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191980 Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 37483dd8e536..61fd5caf3ebe 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3597,18 +3597,21 @@ bool DrawingML::WriteParagraphProperties(const Reference& rParagra if (GetProperty(rXPropSet, u"ParaTabStopDefaultDistance"_ustr)) mAny >>= nParaDefaultTabSize; +// ST_TextIndentLevelType +const sal_Int16 nOutLevel = std::min(nLevel, sal_Int16(8)); + if (nParaLeftMargin) // For Paragraph mpFS->startElementNS( XML_a, nElement, - XML_lvl, sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0), XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)), nParaLeftMargin > 0), + XML_lvl, sax_fastparser::UseIf(OString::number(nOutLevel), nOutLevel > 0), XML_indent, sax_fastparser::UseIf(OString::number((bForceZeroIndent && nParaFirstLineIndent == 0) ? 0 : oox::drawingml::convertHmmToEmu(nParaFirstLineIndent)), (bForceZeroIndent || nParaFirstLineIndent != 0)), XML_algn, GetAlignment( nAlignment ), XML_defTabSz, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)), nParaDefaultTabSize > 0), XML_rtl, sax_fastparser::UseIf(ToPsz10(bRtl), bRtl)); else mpFS->startElementNS( XML_a, nElement, - XML_lvl, sax_fastparser::UseIf(OString::number(nLevel), nLevel > 0), XML_marL, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)), nLeftMargin > 0), + XML_lvl, sax_fastparser::UseIf(OString::number(nOutLevel), nOutLevel > 0), XML_indent, sax_fastparser::UseIf(OString::number(!bForceZeroIndent ? oox::drawingml::convertHmmToEmu(nLineIndentation) : 0), (bForceZeroIndent || ( nLineIndentation != 0))), XML_algn, GetAlignment( nAlignment ), XML_defTabSz, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nParaDefaultTabSize)), nParaDefaultTabSize > 0),
core.git: oox/source sc/source
oox/source/export/ThemeExport.cxx |4 ++--
sc/source/ui/view/cellsh2.cxx |5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 80b5fff947ed3b835a15bc9d835e29cad1ff2802
Author: Caolán McNamara
AuthorDate: Sun Sep 21 10:29:31 2025 +0100
Commit: Caolán McNamara
CommitDate: Sun Sep 21 13:11:19 2025 +0200
cid#1666320 Variable copied when it could be moved
and
cid#1666318 Variable copied when it could be moved
Change-Id: Ib06132040d9c201c53464953975fa08ee0a2dc10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191283
Tested-by: Caolán McNamara
Reviewed-by: Caolán McNamara
diff --git a/oox/source/export/ThemeExport.cxx
b/oox/source/export/ThemeExport.cxx
index 4398b5cde90c..0a31ee3446fc 100644
--- a/oox/source/export/ThemeExport.cxx
+++ b/oox/source/export/ThemeExport.cxx
@@ -39,10 +39,10 @@ void writeRelativeRectangle(sax_fastparser::FSHelperPtr
pFS, sal_Int32 nToken,
ThemeExport::ThemeExport(oox::core::XmlFilterBase* pFilterBase,
oox::drawingml::DocumentType eDocumentType,
- sax_fastparser::FSHelperPtr pFS)
+ sax_fastparser::FSHelperPtr xFS)
: mpFilterBase(pFilterBase)
, meDocumentType(eDocumentType)
-, mpFS(pFS)
+, mpFS(std::move(xFS))
{
}
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 75ec68e4f1ee..c11ebf00ad08 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -928,7 +928,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
vcl::Window* pWin = GetViewData().GetActiveWin();
weld::Window* pParentWin = pWin ? pWin->GetFrameWeld() :
nullptr;
auto xDlg = std::make_shared(pParentWin,
&aArgSet, pTabViewShell);
-std::shared_ptr
pRegisterThatDlgExists
+std::shared_ptr
xRegisterThatDlgExists
=
std::make_shared(pParentWin, xDlg);
struct lcl_auxData
@@ -954,7 +954,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
std::shared_ptr xAuxData =
std::make_shared(
lcl_auxData{ aCursorPos, eMode, eOper, aExpr1, aExpr2,
bBlank, nListType,
bShowHelp, aHelpTitle, aHelpText,
bShowError, eErrStyle,
- aErrTitle, aErrText, bCaseSensitive,
pRegisterThatDlgExists });
+ aErrTitle, aErrText, bCaseSensitive,
+ std::move(xRegisterThatDlgExists) });
auto xRequest = std::make_shared(rReq);
rReq.Ignore(); // the 'old' request is not relevant any
more
core.git: oox/source
oox/source/export/chartexport.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4b23066f6eb588ba1a7f129513e323fc17143c0c
Author: Caolán McNamara
AuthorDate: Sun Sep 21 10:38:44 2025 +0100
Commit: Caolán McNamara
CommitDate: Sun Sep 21 13:10:26 2025 +0200
cid#1666317 Logically dead code
Change-Id: Ia039d52bf45c80df81fc1cb3c0242940a800f1bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191284
Tested-by: Jenkins
Reviewed-by: Caolán McNamara
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index 4bc27f939a1d..390f83412626 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2361,7 +2361,7 @@ void ChartExport::exportTitle( const Reference< XShape >&
xShape, bool bIsCharte
// shape properties
if( xPropSet.is() )
{
-exportShapeProps( xPropSet, bIsChartex ? XML_cx : XML_c );
+exportShapeProps( xPropSet, XML_c );
}
}
core.git: oox/source
oox/source/drawingml/chart/typegroupconverter.cxx |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d35e46f4c8a93703de5155e6f75d8c265d5a0510
Author: ihtgoot
AuthorDate: Thu Sep 18 14:42:50 2025 +0530
Commit: Ilmari Lauhakangas
CommitDate: Thu Sep 18 13:42:57 2025 +0200
tdf#158237 use contains() instead of find() and end()
Change-Id: I86438a63e431ea4485231fbc798f50ef68a97273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191115
Tested-by: Ilmari Lauhakangas
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx
b/oox/source/drawingml/chart/typegroupconverter.cxx
index 68cb7753fd62..5092dc4c6651 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -625,7 +625,7 @@ void
TypeGroupConverter::moveDataToSeries(DataSourceCxModel::DataMap& raDataMap)
// should only happen for chartex
for (auto const& elem : mrModel.maSeries) {
// This ID must be present in the map
-assert(raDataMap.find(elem->mnDataId) != raDataMap.end());
+assert(raDataMap.contains(elem->mnDataId));
elem->maSources = *(raDataMap[elem->mnDataId]);
}
}
core.git: oox/source sc/qa sc/source test/source
oox/source/core/xmlfilterbase.cxx |2
oox/source/token/namespaces.hxx.tail |1
oox/source/token/tokens.txt |2
sc/qa/unit/data/xlsx/tdf167689_x15_namespace.xlsx |binary
sc/qa/unit/subsequent_export_test4.cxx| 22
sc/source/filter/excel/excdoc.cxx | 60 +-
sc/source/filter/inc/connectionsbuffer.hxx| 10 +++
sc/source/filter/oox/connectionsbuffer.cxx| 14 +
sc/source/filter/oox/connectionsfragment.cxx | 17 ++
test/source/xmltesttools.cxx |2
10 files changed, 117 insertions(+), 13 deletions(-)
New commits:
commit 2034abc1bb10a69d9bc4d098f4cb82d63e6f73bf
Author: Bayram Çiçek
AuthorDate: Sun Sep 14 01:16:07 2025 +0300
Commit: Caolán McNamara
CommitDate: Mon Sep 15 09:40:36 2025 +0200
tdf#167689: sc: export x15 namespace for xl/connections.xml
- add support for x15 namespace.
- add a unittest.
- add support for and elements.
- support model and sourceName attributes.
Signed-off-by: Bayram Çiçek
Change-Id: I3b3e380ddd07f251b2fe9d3959961dd5c19c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190924
Tested-by: Jenkins
Reviewed-by: Caolán McNamara
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index 644b7b8cdc56..0a842c6f3860 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -147,6 +147,8 @@ const Sequence< beans::Pair< OUString, sal_Int32 > >&
NamespaceIds()
NMSP_p15},
{u"http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac"_ustr,
NMSP_x12ac},
+
{u"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"_ustr,
+ NMSP_x15},
{u"http://schemas.microsoft.com/office/drawing/2012/chart"_ustr,
NMSP_c15},
{u"http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"_ustr,
diff --git a/oox/source/token/namespaces.hxx.tail
b/oox/source/token/namespaces.hxx.tail
index a812725976f0..a95dd9db7b16 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -62,6 +62,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return
nToken & NMSP_MASK; }
#define W_TOKEN( token )OOX_TOKEN( doc, token )
#define LOEXT_TOKEN( token )OOX_TOKEN( loext, token )
#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
+#define X15_TOKEN(token)OOX_TOKEN(x15, token)
#define XR2_TOKEN(token)OOX_TOKEN(xr2, token)
#define XR16_TOKEN(token) OOX_TOKEN(xr16, token)
#define WPC_TOKEN(token)OOX_TOKEN(wpc, token)
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index ac4c29bb5a6b..900cc8c74ecc 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -3503,6 +3503,7 @@ miterlimit
moccasin
mod
modId
+model
modelId
modern
modified
@@ -4918,6 +4919,7 @@ sourceData
sourceFile
sourceFileName
sourceLinked
+sourceName
sourceObject
sourceRef
sourceSheetId
diff --git a/sc/qa/unit/data/xlsx/tdf167689_x15_namespace.xlsx
b/sc/qa/unit/data/xlsx/tdf167689_x15_namespace.xlsx
new file mode 100644
index ..afd81dd2edb8
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf167689_x15_namespace.xlsx
differ
diff --git a/sc/qa/unit/subsequent_export_test4.cxx
b/sc/qa/unit/subsequent_export_test4.cxx
index e7588ad5a41c..c403a68d3a05 100644
--- a/sc/qa/unit/subsequent_export_test4.cxx
+++ b/sc/qa/unit/subsequent_export_test4.cxx
@@ -2226,6 +2226,28 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166712)
assertXPath(pConn, "/x:connections/x:connection/x:olapPr", 0);
}
+CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_x15_namespace)
+{
+createScDoc("xlsx/tdf167689_x15_namespace.xlsx");
+
+save(u"Calc Office Open XML"_ustr);
+
+xmlDocUniquePtr pConn = parseExport(u"xl/connections.xml"_ustr);
+CPPUNIT_ASSERT(pConn);
+
+// test if has xmlns:x15 namespace.
+assertXPathNSDef(pConn, "/x:connections/x:connection[3]/x:extLst/x:ext",
"x15",
+
"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main";);
+
+// test id attribute of
+assertXPath(pConn,
"/x:connections/x:connection[3]/x:extLst/x:ext/x15:connection", "id",
+u"Tabelle1");
+
+// test sourceName attribute of
+assertXPath(pConn,
"/x:connections/x:connection[3]/x:extLst/x:ext/x15:connection/x15:rangePr",
+"sourceName", u"_xlcn.LinkedTable_Tabelle1");
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166939)
{
// Given a document with a column autostyle name equal to "a" (it could be
any single-character
diff --git a/sc/source/filter/excel/excdoc.cxx
b/sc/source/filter/excel/excdoc.cxx
index 38ab0d78b831..0d0c6655aaab 100644
--- a/sc/
core.git: oox/source
oox/source/core/filterbase.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 5a130d91b2b0f95eab8f76ca7225f33e5b2124f8 Author: Mike Kaganski AuthorDate: Sat Aug 2 10:19:39 2025 +0200 Commit: Mike Kaganski CommitDate: Sat Aug 2 12:46:50 2025 +0200 Drop unused FilterBaseImpl::mxInteractionHandler Change-Id: I01695c01d88dedcf38fe2d0788563fc845c67e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188816 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index 9c8cc11596e4..849665bbd4cf 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -151,7 +151,6 @@ struct FilterBaseImpl Reference< XInputStream > mxInStream; Reference< XStream >mxOutStream; Reference< XStatusIndicator > mxStatusIndicator; -Reference< XInteractionHandler >mxInteractionHandler; Reference< XShape > mxParentShape; bool mbExportVBA; @@ -549,7 +548,6 @@ void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDesc mxImpl->maFileUrl = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL, OUString() ); mxImpl->mxTargetFrame = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_FRAME, Reference< XFrame >() ); mxImpl->mxStatusIndicator = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STATUSINDICATOR, Reference< XStatusIndicator >() ); -mxImpl->mxInteractionHandler = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER, Reference< XInteractionHandler >() ); mxImpl->mxParentShape = mxImpl->maMediaDesc.getUnpackedValueOrDefault( u"ParentShape"_ustr, mxImpl->mxParentShape ); mxImpl->maFilterData = mxImpl->maMediaDesc.getUnpackedValueOrDefault( u"FilterData"_ustr, Sequence< PropertyValue >() );
core.git: oox/source
oox/source/ppt/slidefragmenthandler.cxx | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit adc6db837691d791c53ef1c4b05fcaaad79c158f
Author: Miklos Vajna
AuthorDate: Fri Jul 18 09:06:56 2025 +0200
Commit: Miklos Vajna
CommitDate: Fri Jul 18 13:56:51 2025 +0200
oox: fix crash in the SlideFragmentHandler dtor
Crashreport signature:
> terminate called after throwing an instance of
'com::sun::star::uno::RuntimeException'
> program/libmergedlo.so
> oox::ppt::SlideFragmentHandler::~SlideFragmentHandler() [clone
.cold]
> oox/source/ppt/slidefragmenthandler.cxx:70
> program/libmergedlo.so
> oox::ppt::SlideFragmentHandler::~SlideFragmentHandler()
> include/cppuhelper/weak.hxx:91
> program/libmergedlo.so
> oox::ppt::PresentationFragmentHandler::importSlide(unsigned int,
bool, bool)
>
/opt/rh/devtoolset-12/root/usr/include/c++/12/bits/shared_ptr_base.h:1070
> program/libmergedlo.so
> oox::ppt::PresentationFragmentHandler::finalizeImport()
> oox/source/ppt/presentationfragmenthandler.cxx:645
Aborting the entire PPTX import just because inserting some VML shapes
failed sounds like going too far.
Change-Id: Idfa1718185ac4716da5d5cbdb2bfe68f11badb9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188036
Reviewed-by: Miklos Vajna
Tested-by: Jenkins
diff --git a/oox/source/ppt/slidefragmenthandler.cxx
b/oox/source/ppt/slidefragmenthandler.cxx
index 64577409c0b1..ee87d752a65f 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -65,8 +65,15 @@ SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase&
rFilter, const OUStri
SlideFragmentHandler::~SlideFragmentHandler()
{
-// convert and insert all VML shapes (mostly form controls)
-mpSlidePersistPtr->getDrawing()->convertAndInsert();
+try
+{
+// convert and insert all VML shapes (mostly form controls)
+mpSlidePersistPtr->getDrawing()->convertAndInsert();
+}
+catch (const uno::Exception&)
+{
+TOOLS_WARN_EXCEPTION("oox", "SlideFragmentHandler dtor: VML shape
insertion failed");
+}
}
::oox::core::ContextHandlerRef SlideFragmentHandler::onCreateContext(
sal_Int32 aElementToken, const AttributeList& rAttribs )
core.git: oox/source
oox/source/export/chartexport.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 0b3f54e2e3f366841a8b5d83bb970535dd2150c3 Author: Stephan Bergmann AuthorDate: Mon Jul 14 10:21:37 2025 +0200 Commit: Stephan Bergmann CommitDate: Mon Jul 14 15:47:14 2025 +0200 -Werror,-Wunused-variable ...in code newly introduced in c84c7b3c81308fbafa273c76a75f4a7159b8 "tdf#165742 Step 4.7: Add support for internal data" Change-Id: I2c011af7e662a455cd43fb8b6d229c3e7a38fff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187848 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 6628ee02227b..3218141713e9 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1402,7 +1402,6 @@ void ChartExport::exportData_chartex( [[maybe_unused]] const Reference< css::cha Reference< chart2::data::XDataSource > xSource( rSeries, uno::UNO_QUERY ); if( !xSource.is()) continue; -Reference< chart2::XDataSeries > xDataSeries( xSource, uno::UNO_QUERY ); Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( xSource->getDataSequences()); @@ -3551,7 +3550,6 @@ void ChartExport::exportSeries_chartex( const Reference& xCh FSHelperPtr pFS = GetFS(); pFS->startElement(FSNS(XML_cx, XML_series), XML_layoutId, sTypeName); -Reference< chart2::XDataSeries > xDataSeries( xSource, uno::UNO_QUERY ); Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( xSource->getDataSequences());
core.git: oox/source
oox/source/drawingml/chart/typegroupcontext.cxx | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 5427624c78f879ae83b5db1f5a0f67d3b4d04e2d
Author: Kurt Nordback
AuthorDate: Mon Jun 30 11:14:18 2025 -0600
Commit: Caolán McNamara
CommitDate: Tue Jul 1 09:41:11 2025 +0200
tdf#165742 Step 4.4 follow-on: Fix a faulty assert
In the earlier changes I introduced an assert that didn't properly consider
a chart with multiple series. This is intended to fix that.
Change-Id: I60f097ffae2e7f29aadc5bfaabc739c120be5fcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187216
Reviewed-by: Caolán McNamara
Tested-by: Jenkins
diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx
b/oox/source/drawingml/chart/typegroupcontext.cxx
index 779409983374..f29b42ab42bf 100644
--- a/oox/source/drawingml/chart/typegroupcontext.cxx
+++ b/oox/source/drawingml/chart/typegroupcontext.cxx
@@ -419,9 +419,21 @@ ContextHandlerRef
ChartexTypeGroupContext::onCreateContext( [[maybe_unused]] sal
return nullptr;
case CX_TOKEN(series) :
if (rAttribs.hasAttribute(XML_layoutId)) {
-// The type ID is currently set to . Set it
+// If this is the first series, then the type ID is currently
+// set to . If this is not the first series
+// in a multi-series chart, it should be set to the previous
+// chart type in the series (which *should* only be another
+// chartex type, not a type). In either case, set it
// to the specific chart type based on the layoutId attribute
-assert(mrModel.mnTypeId == CX_TOKEN(plotAreaRegion));
+assert(mrModel.mnTypeId == CX_TOKEN(plotAreaRegion) ||
+mrModel.mnTypeId == CX_TOKEN(boxWhisker) ||
+mrModel.mnTypeId == CX_TOKEN(clusteredColumn) ||
+mrModel.mnTypeId == CX_TOKEN(funnel) ||
+mrModel.mnTypeId == CX_TOKEN(paretoLine) ||
+mrModel.mnTypeId == CX_TOKEN(regionMap) ||
+mrModel.mnTypeId == CX_TOKEN(sunburst) ||
+mrModel.mnTypeId == CX_TOKEN(treemap) ||
+mrModel.mnTypeId == CX_TOKEN(waterfall));
OUString sChartId = rAttribs.getStringDefaulted(XML_layoutId);
assert(!sChartId.isEmpty());
core.git: oox/source sfx2/source
oox/source/export/chartexport.cxx |2 +-
sfx2/source/doc/docfile.cxx |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 4db31bcdc98a9e885ac1e0153e7650167678d17f
Author: Caolán McNamara
AuthorDate: Sun Jun 22 20:04:44 2025 +0100
Commit: Caolán McNamara
CommitDate: Sun Jun 22 22:42:20 2025 +0200
cid#1655084 COPY_INSTEAD_OF_MOVE
and
cid#1655079 COPY_INSTEAD_OF_MOVE
Change-Id: I6fa6b1cde1370376965c97a867423b0a6ad0fd86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186801
Reviewed-by: Caolán McNamara
Tested-by: Caolán McNamara
diff --git a/oox/source/export/chartexport.cxx
b/oox/source/export/chartexport.cxx
index d99e6e3180e1..71bcf02707f0 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -451,7 +451,7 @@ static OUString lcl_flattenStringSequence( const Sequence<
OUString > & rSequenc
return aResult.makeStringAndClear();
}
-static void lcl_writeChartexString(FSHelperPtr pFS, std::u16string_view sOut)
+static void lcl_writeChartexString(const FSHelperPtr& pFS, std::u16string_view
sOut)
{
pFS->startElement(FSNS(XML_cx, XML_tx));
// cell range doesn't seem to be supported in chartex?
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index a0ef7b2bc210..4a1c6cc07256 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1788,7 +1788,7 @@
SfxMedium::TryEncryptedInnerPackage(uno::Reference const & xSto
}
// success:
pImpl->m_bODFWholesomeEncryption = true;
-pImpl->m_xODFDecryptedInnerPackageStream =
xDecryptedInnerPackageStream;
+pImpl->m_xODFDecryptedInnerPackageStream =
std::move(xDecryptedInnerPackageStream);
pImpl->m_xODFEncryptedOuterStorage = xStorage;
pImpl->xStorage = xRet;
}
core.git: oox/source
oox/source/vml/vmlshapecontainer.cxx |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 3226e5d4084dab74db3514e541af080ed10da784
Author: Mike Kaganski
AuthorDate: Sun Jun 8 12:53:08 2025 +0500
Commit: Mike Kaganski
CommitDate: Sun Jun 8 14:10:43 2025 +0200
Reduce noise for "duplicating" type ids
Type ids may legitimately repeat, so no need to warn when the types
are actually the same. I assume, that for actual error (e.g., shape
ids duplicating), the objects will be different.
Change-Id: I96bffeda584e80e81b9ef856cd438f2213d0e824
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186260
Tested-by: Jenkins
Reviewed-by: Mike Kaganski
diff --git a/oox/source/vml/vmlshapecontainer.cxx
b/oox/source/vml/vmlshapecontainer.cxx
index d9aa7d9aab6b..c099c7211502 100644
--- a/oox/source/vml/vmlshapecontainer.cxx
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -41,7 +41,8 @@ void lclMapShapesById( RefMap< OUString, ShapeType >& orMap,
const RefVector< Sh
OSL_ENSURE( !rShapeId.isEmpty(), "lclMapShapesById - missing shape
identifier" );
if( !rShapeId.isEmpty() )
{
-OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(),
"lclMapShapesById - shape identifier already used " );
+OSL_ENSURE(orMap.find(rShapeId) == orMap.end() || orMap[rShapeId]
== elem,
+ "lclMapShapesById - shape identifier already used");
orMap[ rShapeId ] = elem;
}
}
core.git: oox/source sd/qa
oox/source/ppt/EmbeddedFontListContext.cxx |1 +
sd/qa/unit/FontEmbeddingTest.cxx |2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit cdbd04b1da56b00e75ad04f65619793c0c354822
Author: Tomaž Vajngerl
AuthorDate: Mon May 26 14:22:54 2025 +0900
Commit: Tomaž Vajngerl
CommitDate: Fri Jun 6 13:36:02 2025 +0200
sd: enable "EmbedOnlyUsedFonts" at PPTX import
If fonts are embedded in the imported PPTX document, also enable
"EmbedOnlyUsedFonts" as MSO usually only embeds the fonts that are
used.
Change-Id: I6edc47ef793675017e8b127340535fd3d641fa55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185762
Reviewed-by: Miklos Vajna
Tested-by: Jenkins CollaboraOffice
(cherry picked from commit 3fb2c50e6639e1c6af2fac2b1ae3901c55885d80)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186167
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl
diff --git a/oox/source/ppt/EmbeddedFontListContext.cxx
b/oox/source/ppt/EmbeddedFontListContext.cxx
index 792387e34556..de480363a3e3 100644
--- a/oox/source/ppt/EmbeddedFontListContext.cxx
+++ b/oox/source/ppt/EmbeddedFontListContext.cxx
@@ -87,6 +87,7 @@ void EmbeddedFontListContext::onEndElement()
if (mxDocSettings.is())
{
mxDocSettings->setPropertyValue(u"EmbedFonts"_ustr, uno::Any(true));
+mxDocSettings->setPropertyValue(u"EmbedOnlyUsedFonts"_ustr,
uno::Any(true));
}
if (!moCurrentFont->aRegularID.isEmpty())
diff --git a/sd/qa/unit/FontEmbeddingTest.cxx b/sd/qa/unit/FontEmbeddingTest.cxx
index 44cc47d838df..4cc8270d705d 100644
--- a/sd/qa/unit/FontEmbeddingTest.cxx
+++ b/sd/qa/unit/FontEmbeddingTest.cxx
@@ -81,7 +81,7 @@ CPPUNIT_TEST_FIXTURE(FontEmbeddingTest,
testRoundtripEmbeddedFontsPPTX)
xSettings->getPropertyValue(u"EmbedComplexScriptFonts"_ustr) >>=
bEmbedComplexScript;
CPPUNIT_ASSERT_EQUAL(true, bEmbedFonts);
-CPPUNIT_ASSERT_EQUAL(false, bEmbedUsedOnly);
+CPPUNIT_ASSERT_EQUAL(true, bEmbedUsedOnly);
CPPUNIT_ASSERT_EQUAL(true, bEmbedLatinScript);
CPPUNIT_ASSERT_EQUAL(true, bEmbedAsianScript);
CPPUNIT_ASSERT_EQUAL(true, bEmbedComplexScript);
core.git: oox/source
oox/source/export/drawingml.cxx |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 6ace08f5117c40d4c0bbec68437af49aa3ec4dd1
Author: Mike Kaganski
AuthorDate: Sat May 31 16:08:48 2025 +0200
Commit: Mike Kaganski
CommitDate: Sat May 31 17:15:26 2025 +0200
Simplify a bit
Change-Id: Iecfba0e4280da073dadbe2a34032c18bf624f3c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186074
Reviewed-by: Mike Kaganski
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index fdb2d84629ec..a711c9079b98 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4498,8 +4498,7 @@ static std::map< OString, std::vector >
lcl_getAdjNames()
if (aStream.GetError() != ERRCODE_NONE)
SAL_WARN("oox.shape", "failed to open oox-drawingml-adj-names");
OStringBuffer aLine;
-bool bNotDone = aStream.ReadLine(aLine);
-while (bNotDone)
+while (aStream.ReadLine(aLine))
{
sal_Int32 nIndex = 0;
// Each line is in a "key value" format: read the key, the rest
is the value.
@@ -4513,7 +4512,6 @@ static std::map< OString, std::vector >
lcl_getAdjNames()
{
SAL_WARN("oox.shape", "skipping invalid line: " <<
std::string_view(aLine));
}
-bNotDone = aStream.ReadLine(aLine);
}
return aRet;
}
core.git: oox/source
oox/source/export/drawingml.cxx | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 0151a5a2e9114375cd3256e3cca495b2347ebefb
Author: Simon Chenery
AuthorDate: Sat Apr 5 09:28:34 2025 +0200
Commit: Ilmari Lauhakangas
CommitDate: Sat May 31 07:52:07 2025 +0200
Check oox-drawingml-adj-names has delimiter to avoid std::out_of_range
exception
Skip line with warning if no tab delimiter found. This avoids a
std::string_view.substr(-1) call, that throws an std::out_of_range
exception.
Change-Id: Ie35ea692ce3c2cbc8c21c01b0c488a6bb5eb5e32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183741
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 43a96c6af45f..fdb2d84629ec 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4504,8 +4504,15 @@ static std::map< OString, std::vector >
lcl_getAdjNames()
sal_Int32 nIndex = 0;
// Each line is in a "key value" format: read the key, the rest
is the value.
OString aKey( o3tl::getToken(aLine, 0, ' ', nIndex) );
-OString aValue( std::string_view(aLine).substr(nIndex) );
-aRet[aKey].push_back(aValue);
+if (nIndex >= 0)
+{
+OString aValue( std::string_view(aLine).substr(nIndex) );
+aRet[aKey].push_back(aValue);
+}
+else
+{
+SAL_WARN("oox.shape", "skipping invalid line: " <<
std::string_view(aLine));
+}
bNotDone = aStream.ReadLine(aLine);
}
return aRet;
core.git: oox/source
oox/source/drawingml/customshapes/oox-drawingml-cs-presets |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6f88c6e132897e75a7a17b4daaf86e843253bbc0
Author: Xisco Fauli
AuthorDate: Tue May 20 19:22:11 2025 +0200
Commit: Xisco Fauli
CommitDate: Tue May 20 22:28:29 2025 +0200
tdf#159774: PPTX: add "glue points" to can shape
Similar to
commit e6b974fd699dcef28a7c26a96c74f3b9a8df9cab
Author: Tibor Nagy
Date: Mon Apr 22 16:09:04 2024 +0200
tdf#157216 PPTX: add "glue points" to flowchart shapes
Generated running oox/source/drawingml/customshapes/generate.sh
Change-Id: I4eac759e970554f14ee4c1b64328de85448b8d0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185573
Reviewed-by: Xisco Fauli
Tested-by: Jenkins
diff --git a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
index 6166f8d0c747..b62499b86d7b 100644
--- a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
+++ b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
@@ -605,7 +605,7 @@ false
MirroredY
false
Path
-([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long)
0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) {
{ First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) {
(long) 0 }, Type = (short) 0 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 11
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9
}, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShap
eParameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0
}, Type = (short) 0 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First = (com.sun.star.drawi
ng.EnhancedCustomShapeParameter) { Value = (any) { (long) 15 }, Type = (short)
1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value =
(any) { (long) 16 }, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 17
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 18
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long)
3 }, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 19
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 20
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 10
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 3
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 21
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 22
core.git: oox/source
oox/source/drawingml/customshapes/oox-drawingml-cs-presets |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 6771eb320ca0f550caecdbe6fe6b263e89cf6ac1
Author: Xisco Fauli
AuthorDate: Tue May 20 18:51:00 2025 +0200
Commit: Xisco Fauli
CommitDate: Tue May 20 22:01:48 2025 +0200
tdf#166587: PPTX: add "glue points" to upArrow shape
Similar to
commit e6b974fd699dcef28a7c26a96c74f3b9a8df9cab
Author: Tibor Nagy
Date: Mon Apr 22 16:09:04 2024 +0200
tdf#157216 PPTX: add "glue points" to flowchart shapes
Generated running oox/source/drawingml/customshapes/generate.sh
Change-Id: I6a8f3d6ff16120d34219756890fe3b6912f1b11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185572
Tested-by: Jenkins
Reviewed-by: Xisco Fauli
diff --git a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
index 4ef1ccf5d9dd..6166f8d0c747 100644
--- a/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
+++ b/oox/source/drawingml/customshapes/oox-drawingml-cs-presets
@@ -3019,7 +3019,7 @@ false
MirroredY
false
Path
-([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long)
0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) {
{ First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) {
(long) 0 }, Type = (short) 0 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0
}, Type = (short) 0 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9
}, Type = (short) 1 }, Second = (com.sun.star.drawing.EnhancedCustomShapeP
arameter) { Value = (any) { (long) 5 }, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5
}, Type = (short) 1 } } } }, State = (com.sun.star.beans.PropertyState)
DIRECT_VALUE }, { Name = "Segments", Handle = (long) 0, Value = (any) {
([]com.sun.star.drawing.EnhancedCustomShapeSegment) { { Command = (short) 1,
Count = (short) 1 }, { Command = (short) 2, Count = (short) 6
}, { Command = (short) 4, Count = (short) 0 }, { Command = (short) 5, Count =
(short) 0 } } }, State = (com.sun.star.beans.PropertyState) DIRECT_VALUE }, {
Name = "TextFrames", Handle = (long) 0, Value = (any) {
([]com.sun.star.drawing.EnhancedCustomShapeTextFrame) { { TopLeft =
(com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 8
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 12
}, Type = (short) 1 } }, BottomRight =
(com.sun.star.drawing.EnhancedCustomShapeParameterPair) { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 9
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 13
}, Type = (short) 1 } } } } }, State = (com.sun.star.beans.PropertyState)
DIRECT_VALUE } }
+([]com.sun.star.beans.PropertyValue) { { Name = "Coordinates", Handle = (long)
0, Value = (any) { ([]com.sun.star.drawing.EnhancedCustomShapeParameterPair) {
{ First = (com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) {
(long) 0 }, Type = (short) 0 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5
}, Type = (short) 1 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 7
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 0
}, Type = (short) 0 } }, { First =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 14
}, Type = (short) 1 }, Second =
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) 5
}, Type = (short) 1
core.git: oox/source sw/qa sw/source
oox/source/core/xmlfilterbase.cxx|3 -
sw/qa/extras/ooxmlexport/data/tdf166511.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 11 -
sw/qa/extras/ooxmlexport/ooxmlexport22.cxx | 58 +++
sw/source/filter/ww8/docxattributeoutput.cxx | 38 ++---
sw/source/filter/ww8/docxattributeoutput.hxx |1
sw/source/filter/ww8/docxsdrexport.cxx | 20 -
sw/source/filter/ww8/docxsdrexport.hxx |8 +--
8 files changed, 98 insertions(+), 41 deletions(-)
New commits:
commit 37e4623bfaad6bd9e74205f0040b68d92d976f1b
Author: Aron Budea
AuthorDate: Mon May 12 14:54:11 2025 +0930
Commit: Aron Budea
CommitDate: Wed May 14 16:44:05 2025 +0200
tdf#166511 sw: unify export of DrawingML object IDs
Both docPr and cNvPr have IDs referring to DrawingML objects,
and are supposed to be unique within the document.
These IDs were handled in different parts of the code during export.
7460e4f4a7b15cc7984adf65bc17e3d580413224 added a workaround,
likely to keep them unique, but together with
4b0fa253a4540f5461397815d290586f9ddabe61 this caused a clash
sometimes, and the result couldn't be opened in Word afterwards.
Use the same counter for both IDs. It needs to start from 1, as 0
ID makes at least grouped shapes invalid.
Change-Id: I5e7b9855bc88a61841dfcd3d41599a4ce444eb40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185190
Tested-by: Jenkins
Reviewed-by: Aron Budea
diff --git a/oox/source/core/xmlfilterbase.cxx
b/oox/source/core/xmlfilterbase.cxx
index 4f127361b8b0..f2d51de6c0e4 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -202,7 +202,8 @@ XmlFilterBase::XmlFilterBase( const Reference<
XComponentContext >& rxContext )
FilterBase( rxContext ),
mxImpl( new XmlFilterBaseImpl ),
mnRelId( 1 ),
-mnMaxDocId( 0 ),
+// mnMaxDocId has to start from 1, Word doesn't accept id 0 for eg.
grouped shapes
+mnMaxDocId( 1 ),
mbMSO2007(false),
mbMSO(false),
mbMissingExtDrawing(false)
diff --git a/sw/qa/extras/ooxmlexport/data/tdf166511.docx
b/sw/qa/extras/ooxmlexport/data/tdf166511.docx
new file mode 100644
index ..f718e75b4903
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf166511.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index f3e3676f2c07..e2f9e8efaa20 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -852,8 +852,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149996,
"lorem_hyperlink.fodt")
// because the exported file was corrupted.
}
-DECLARE_OOXMLEXPORT_TEST(testGroupedShapeLink, "grouped_link.docx")
+CPPUNIT_TEST_FIXTURE(Test, testGroupedShapeLink)
{
+loadAndSave("grouped_link.docx");
// tdf#145147 Hyperlink in grouped shape not imported
// tdf#154469 Hyperlink in grouped shape not exported
uno::Reference xGroupShape(getShape(1), uno::UNO_QUERY);
@@ -861,6 +862,14 @@ DECLARE_OOXMLEXPORT_TEST(testGroupedShapeLink,
"grouped_link.docx")
getProperty(xGroupShape->getByIndex(0),
u"Hyperlink"_ustr));
CPPUNIT_ASSERT_EQUAL(u"https://www.documentfoundation.org"_ustr,
getProperty(xGroupShape->getByIndex(1),
u"Hyperlink"_ustr));
+
+xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// The id of the grouped shape's docPr must be > 0, otherwise Word fails
to open the exported docx
+sal_Int32 aId = getXPath(pXmlDoc,
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr",
+ "id").toInt32();
+CPPUNIT_ASSERT(aId > 0);
}
DECLARE_OOXMLEXPORT_TEST(testTdf147810, "tdf147810.odt")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx
b/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx
index 5f49dabd5e60..3f944c8d0f8e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport22.cxx
@@ -21,6 +21,8 @@
#include
#include
+#include
+
namespace
{
class Test : public SwModelTestBase
@@ -311,6 +313,62 @@ CPPUNIT_TEST_FIXTURE(Test, testBadFormulaResult)
assertXPathContent(pXmlDoc,
"/w:document/w:body/w:tbl/w:tr[4]/w:tc/w:p/w:r[4]/w:t", u"6");
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf166511)
+{
+loadAndSave("tdf166511.docx");
+
+// The reproducer for tdf#166511 depends on result having footer2 and
footer3.xml
+// Original bugdoc only has footer1.xml, and the result only started
having multiples
+// after tdf#136472's fix
+// This test uses a "good" roundtripped version of the bugdoc after the
fix already
+// having the extra footer XMLs, so it doesn't depend on the change
coming from tdf#136472
+
+// Count total docPr ids and collect unique docPr ids to be counted later
from
core.git: oox/source
oox/source/drawingml/fillproperties.cxx | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
New commits:
commit 4f529003185fcf40bf23a8f2bcfd8596724c
Author: Regina Henschel
AuthorDate: Sun Apr 13 14:04:33 2025 +0200
Commit: Regina Henschel
CommitDate: Mon Apr 14 01:13:17 2025 +0200
tdf#154858 radial gradient import remove obsolete part
LO has imported radial gradients as rotated linear gradient in case
of gradient center in shape corner. That was changed in commit
65439ab2c4fc87e7cc115710a605e9f35dfb39d8 to always using radial gradient.
So the comment about linear gradient is no longer valid and the gradient
rotation is useless.
Change-Id: I679f8afc347845eb012e3377e03877c3a7c7d6c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184117
Reviewed-by: Balazs Varga
Reviewed-by: Regina Henschel
Tested-by: Jenkins
diff --git a/oox/source/drawingml/fillproperties.cxx
b/oox/source/drawingml/fillproperties.cxx
index a3a1957ca187..fc734b743a46 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -512,24 +512,14 @@ void FillProperties::pushToPropMap(ShapePropertyMap&
rPropMap, const GraphicHelp
aGradient.SetYOffset(getLimitedValue(
nCenterY / PER_PERCENT, 0, 100));
+// FIXME tdf#166140: Size of gradient is smaller than in
MSO
if( maGradientProps.moGradientPath.value() == XML_circle )
{
-// Style should be radial at least when the horizontal
center is at 50%.
-// Otherwise import as a linear gradient, because it
is the most similar to the MSO radial style.
-//
aGradient.SetGradientStyle(awt::GradientStyle_LINEAR);
-if( 100 == aGradient.GetXOffset() && 100 ==
aGradient.GetYOffset() )
-aGradient.SetAngle( Degree10(450) );
-else if( 0 == aGradient.GetXOffset() && 100 ==
aGradient.GetYOffset() )
-aGradient.SetAngle( Degree10(3150) );
-else if( 100 == aGradient.GetXOffset() && 0 ==
aGradient.GetYOffset() )
-aGradient.SetAngle( Degree10(1350) );
-else if( 0 == aGradient.GetXOffset() && 0 ==
aGradient.GetYOffset() )
-aGradient.SetAngle( Degree10(2250) );
-
aGradient.SetGradientStyle(awt::GradientStyle_RADIAL);
}
else
{
+// XML_rect or XML_shape, but the latter is not
implemented.
aGradient.SetGradientStyle(awt::GradientStyle_RECT);
}
core.git: oox/source
oox/source/export/drawingml.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 11ff20073b63443fe31d470fc7e6fef0e8019bf7 Author: Caolán McNamara AuthorDate: Fri Apr 11 08:51:09 2025 +0100 Commit: Caolán McNamara CommitDate: Fri Apr 11 11:15:47 2025 +0200 crashtesting: out of bounds in export of forum-mso-en4-596154.xlsx to xlsx and others, e.g. forum-mso-en4-596019.xlsx forum-mso-en4-596112.xlsx probably a problem since: commit 612891865a74777950ab7355a4d794fa5577c5fc CommitDate: Thu Mar 20 16:49:11 2025 +0100 tdf#165670 PPTX export: fix glue points export regression Change-Id: I12af1095115eeca8a8483d5895b716e1a8cc64fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184013 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c9dcbc243014..52acf955fd76 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4724,7 +4724,7 @@ void prepareGluePoints(std::vector& rGuideList, Guide aGuideX; aGuideX.sName = "GluePoint"_ostr + OString::number(nIndex) + "X"; aGuideX.sFormula -= (bIsOOXML && nIdx1 < aEquations.getLength()) += (bIsOOXML && nIdx1 >= 0 && nIdx1 < aEquations.getLength()) ? GetFormula(aEquations[nIdx1], "*logwidth/", " w ").toUtf8() : "*/ " + OString::number(nIdx1) + " w " + OString::number(nWidth); rGuideList.push_back(aGuideX); @@ -4732,7 +4732,7 @@ void prepareGluePoints(std::vector& rGuideList, Guide aGuideY; aGuideY.sName = "GluePoint"_ostr + OString::number(nIndex) + "Y"; aGuideY.sFormula -= (bIsOOXML && nIdx2 < aEquations.getLength()) += (bIsOOXML && nIdx2 >= 0 && nIdx2 < aEquations.getLength()) ? GetFormula(aEquations[nIdx2], "*logheight/", " h ").toUtf8() : "*/ " + OString::number(nIdx2) + " h " + OString::number(nHeight); rGuideList.push_back(aGuideY);
