xmloff/source/style/styleexp.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 09e3aaa2d22b8fe2887ae973b55f3ad274a960ee
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Mon Jan 23 15:50:57 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Jan 23 18:49:06 2023 +0000

    xmloff: ODF export: missing extension check in XMLStyleExport
    
    (regression from commit 05f863844d9a5613250e8d787e32752b270ec4d3)
    
    Change-Id: Iae891ecec26599c9016be17e4db8eaf99783baa6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146012
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 10ae6a22dcfa..b311dbdf6c34 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -244,7 +244,8 @@ bool XMLStyleExport::exportStyle(
         aAny = xPropSet->getPropertyValue("LinkStyle");
         OUString sLinkName;
         aAny >>= sLinkName;
-        if (!sLinkName.isEmpty())
+        if (!sLinkName.isEmpty()
+            && (GetExport().getSaneDefaultVersion() & 
SvtSaveOptions::ODFSVER_EXTENDED))
         {
             GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, 
XML_LINKED_STYLE_NAME,
                                      GetExport().EncodeStyleName(sLinkName));

Reply via email to