| Summary: | FORMATTING: Date format is mangled when file is closed and reopened | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Shad Sterling <me> |
| Component: | Calc | Assignee: | Eike Rathke <erack> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | me, xiscofauli |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:7.3.0 target:7.2.1 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Shad Sterling
2021-08-20 17:19:11 UTC
Seems the empty string is eliminated while saving the format description and that ends up as
<number:month number:style="long"/>
<number:month number:textual="true"/>
i.e. two consecutive month elements for MM and MMM which when read in correctly form MMMMM.
Workaround: use U+200B ZERO WIDTH SPACE, ZWSP in your quotes.
This looks the same
YYYY-MM""MMM-DDNN
but if you copy-paste it and travel through with the cursor you'll notice one extra character where the cursor does not move.
that is saved and preserved when loaded:
<number:month number:style="long"/>
<number:text><200b></number:text>
<number:month number:textual="true"/>
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c6f15d228489ccfd0628ca80b45a5c2faaacc7d3 Resolves: tdf#143979 Write and read empty text element in number formats It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Pending review https://gerrit.libreoffice.org/c/core/+/120728 for 7-2 Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/39a11e3287febeb9dd56f43da6f6612afeb0f512 tdf#143979: sc_uicalc: Add unittest It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. The unittest commit in comment 4 is not for this issue but for bug 144022 Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/5d6a91b8ea40ec79c746e5c1d486be6e25a2856d Resolves: tdf#143979 Write and read empty text element in number formats It will be available in 7.2.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fba08b85183ee8a71f6b7044d6fa4492c0cc1be8 tdf#143979: sc_subsequent_export-test2: Add unittest It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. This does appear to be fixed in build 559850da1f48fd7ea521c78a1867255212f7aee9 In the current release, I can also get dates to render as intended with `YYYY-MM""MMM-DD""NN`, apparently the second `""` makes it work. The zero-width space is rendered as a grey shading which overlaps the neighboring characters, which is far enough from rendering as intended that I tried using the `""` |