Bug Hunting Session
Bug 120629 - Hebrew numbering sequence choice reverted to 1,2,3... when saving .doc files, export filter issue
Summary: Hebrew numbering sequence choice reverted to 1,2,3... when saving .doc files,...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL Numbering-Formats
  Show dependency treegraph
 
Reported: 2018-10-15 18:00 UTC by Eyal Rozenberg
Modified: 2018-10-20 09:21 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2018-10-15 18:00:54 UTC
Description:
If you create a numbering style using the Hebrew letter sequence, and save it to a .doc file (Word 97-2003) - the style reverts to regular numbers (1,2,3,...) when you open it.

Steps to Reproduce:
1. Create a new LO Writer document
2. Set the paragraph direction to RTL (this may not be necessary)
3. Create a new numbering style using Hebrew letters (א,ב,ג,...י,יא,יב,...)
4. Set the paragraph to the new style
5. Save the document in Word 97-2003 format (.doc)
6. Close the document
7. Open the document you saved

Actual Results:
The single paragraph is numbered 1.

Expected Results:
The single paragraph should be numbered א.


Reproducible: Always


User Profile Reset: No



Additional Info:
It's likely a numbering style, whose name begins with WWNum, has been created. If you change that numeral sequence choice there, save close and reopen - you get the same effect.

Seen with:

Version: 6.2.0.0.alpha0+
Build ID: ad6adb1bfadf49af3187a0bb3ceffbf355e9eed1
CPU threads: 4; OS: Linux 4.9; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-09-29_02:45:20
Locale: en-US (en_IL); Calc: threaded

... but I believe this must be an old bug.
Comment 1 Eyal Rozenberg 2018-10-15 18:02:35 UTC
The bug also manifests when you use Arabic letters as the numeral sequence - but _not_ if you use Latin letters (A,B,C,...)
Comment 2 V Stuart Foote 2018-10-17 13:25:42 UTC
And, what happens if saving to OOXML .docx? 

Otherweise, believe for bug 66212 we provided Hebrew native numbering [1], but it must be selected not hand built as in 3. of STR. 

Or, is there an issue with that?

=-ref-=
https://cgit.freedesktop.org/libreoffice/core/commit/?id=08fb6d73f8c22d98ab806dd93f4afe3f78b4ff83
Comment 3 Eyal Rozenberg 2018-10-17 13:44:36 UTC
(In reply to V Stuart Foote from comment #2)
> And, what happens if saving to OOXML .docx? 

Oh, I guess I should have mentioned that. This issue does NOT manifest when saving to OOXML/.docx . At least - not in that I know of, and not in simple cases like the one described here.

I also don't quite understand what you mean by "selected" as opposed to "hand built as in 3 of STR".
Comment 4 V Stuart Foote 2018-10-17 15:18:55 UTC
OK, confirmed on Windows 10 Home 64-bit en-US with
Version: 6.2.0.0.alpha0+ (x64)
Build ID: b63d48a146c3615f56b6ec83361b3c02ebcbb215
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-14_01:02:47
Locale: en-US (en_US); Calc: threaded

With Tools -> Language Settings -> Languages: Complex Text layout set Hebrew

1. New custom numbering style
2. select the customize tab
3. number drop list select Hebrew numbering (added for bug 66212 [1])
4. apply the custom style to a series of paragraphs
5. save to .fodt
6. save copy as .docx and also as .doc
7. close

8. open the .docx version in MS Word, exports correctly with Hebrew numbering intact
9. open the  .doc version in MS Word, incorrect export--numbering shows 1.2.3.

10. open the .docx version in Writer, imports correctly as in .fodt
11. open the .doc version in Writer, incorrect 1.2.3. numbering (probably not exported).

So the export filter to .DOC is dropping the numbering. Guess there is additional work to be done. Also related, applying line numbering using the Hebrew numbering does not survive export to OOXML or .DOC so that didn't make it into the export filters.

@Yossi, back to you?

=-ref-=
[1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=08fb6d73f8c22d98ab806dd93f4afe3f78b4ff83
Comment 5 Xisco Faulí 2018-10-18 10:38:58 UTC
Reproduced back to

Version: 5.4.0.0.alpha0+
Build ID: 08fb6d73f8c22d98ab806dd93f4afe3f78b4ff83
CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; VCL: gtk3; 
Locale: en-US (ca_ES.UTF-8); Calc: group

when bug 66212 was implemented
Comment 6 yossi zahn 2018-10-19 11:53:46 UTC
(In reply to V Stuart Foote from comment #4)
> ...
> 3. number drop list select Hebrew numbering (added for bug 66212)
> ...
> So the export filter to .DOC is dropping the numbering. Guess there is
> additional work to be done. Also related, applying line numbering using the
> Hebrew numbering does not survive export to OOXML or .DOC so that didn't
> make it into the export filters.
> 
> @Yossi, back to you?


This doesn't only affect NumberingType::NUMBER_HEBREW (the one which bug 66212 was requesting). It affects NumberingType::CHARS_HEBREW which existed prior to my fix and a few other numbering types also, as pointed out in bug 103345 and in Eyal Roseberg's report above.

Anyone have pointers as to where the code to translate MS Word numbering types to Libreoffice's internal types and vice versa lives?