Bug 159974 - Libre Office is unable to display custom date property properly
Summary: Libre Office is unable to display custom date property properly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2024-02-29 22:10 UTC by fmanchen
Modified: 2024-03-24 09:02 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
original Document, use for further testing (26.39 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-02-29 22:12 UTC, fmanchen
Details
updated document in Libre Office (15.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-02-29 22:13 UTC, fmanchen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fmanchen 2024-02-29 22:10:25 UTC
Description:
When exporting an MS Word document from SharePoint and afterwards embedding a custom date property inside said document, Libre Office is unable to display this property correctly. In the attachments, I have provided two documents, one of which was initially saved in MS Word. This document will be displayed correctly in MS Word but when opening it in Libre Office the date property is set to “ 30.12.1899 00:00:00” instead of “01.02.2024 15:00:00”.

The suspected problem is that Libre Office is unable to parse the underlying xpath which links to the value of the date property. This is likely the case because when opening the document in LibreOffice, setting the property to a new value and afterwards saving it, the xpath is different from the original one. 

As shown below the original xpaht is different from the updated one. The only difference between them is that saving the initial document decodes the underscore into x005F which represents said character. So the bug results from not being able to decode the xpath correctly and updating it to a parsable format. 

As additional information, I have provided the two documents as attachments. The first one named “initialWord.docx” is the initial document exported from SharePoint and the second one is the updated one saved in Libre Office named “updatedLibreOffice.docx”.


Steps to Reproduce:
1. Open the document from attachments in MS Word
2. Insert document property
2. Save document
4. Open document in Libre Office

Actual Results:
30.12.1899 00:00:00 probably caused by:

w:xpath="/ns0:properties[1]/documentManagement[1]/ns3:q_Freigabe_x005F_x002d_Datum[1]"

Expected Results:
01.02.2024 15:00:00 caused by the correct xpath:

w:xpath="/ns0:properties[1]/documentManagement[1]/ns3:q_Freigabe_x002d_Datum[1]"


Reproducible: Always


User Profile Reset: No

Additional Info:
-
Comment 1 fmanchen 2024-02-29 22:12:13 UTC
Created attachment 192875 [details]
original Document, use for further testing
Comment 2 fmanchen 2024-02-29 22:13:57 UTC
Created attachment 192876 [details]
updated document in Libre Office
Comment 3 m_a_riosv 2024-03-01 01:44:01 UTC
Reproducible
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6a064b1967e06e40be40817deff99d00c1a8554f
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

The field it's converted to a 'Content Control'