Bug 153183 - FILESAVE DOCX writing attribute "ID" in v:shape produces invalid document
Summary: FILESAVE DOCX writing attribute "ID" in v:shape produces invalid document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, implementationError
Depends on:
Blocks: Shapes
  Show dependency treegraph
 
Reported: 2023-01-24 13:25 UTC by Regina Henschel
Modified: 2023-04-12 16:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Fontwork of type "text plain" which is named by user (15.48 KB, application/vnd.oasis.opendocument.text)
2023-01-24 13:25 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-01-24 13:25:04 UTC
Created attachment 184872 [details]
Fontwork of type "text plain" which is named by user

Take attached document and put it to
oox/qa/unit/data/namedShape.odt"

Add the test

CPPUNIT_TEST_FIXTURE(Test, testShapeID)
{
    loadFromURL(u"namedShape.odt");
    save("Office Open XML Text");
}

to oox/qa/unit/export.cxx

Run the test, e.g. by
 make CppunitTest_oox_export CPPUNIT_TEST_NAME="testShapeID"

The test fails with
 validation error in OOXML export: Errors: 1

If you step into the "save" method you will see in the output window:
INFO - Validating part "/word/document.xml" using schema "29500T/wml.xsd" ...
ERROR      - (word/document.xml:2 col:1,724) cvc-complex-type.3.2.2: Attribute 'ID' is not allowed to appear in element 'v:shape'.
Comment 1 Xisco Faulí 2023-01-24 13:39:51 UTC
Hi Regina,
If you need to bypass it, you can use skipValidation() for now
Comment 2 Buovjaga 2023-03-21 13:32:15 UTC
Reproduced

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 660f73385562314e01abb4cef9d443b0c0f42b06
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 21 March 2023