https://bugs.freedesktop.org/show_bug.cgi?id=49889
Bug #: 49889
Summary: Preserve paragraph/line spacing when converting rich
text to plain text
Classification: Unclassified
Product: LibreOffice
Version: LibO 3.5.3 release
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Writer
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 61591
--> https://bugs.freedesktop.org/attachment.cgi?id=61591
Illustration of problem with converting richtext to plaintext. Possible
Solution
http://ask.libreoffice.org/question/2615/preserve-paragraphline-spacing-when-converting
Is there a way to convert a document with rich text (.doc, .odx, .rtf) to plain
text (.txt) AND keep the original paragraph alignment?
[document attached explaining this next paragraph:
It doesn't have to be perfect. Keeping only the alignment of the paragraphs
first line by means of spaces or tabs would be ok. Preferably, however, there
would be a way to tell the script the anticipated dimensions of where the
softline breaks fall in the text (ie 1" margins for a 8.5x11 paper, the program
would calculate where to throw the hard line breaks, which would be at 7.5
inches.) The bad thing, though, is if the user changes the font size or font,
this will throw off the formatting. So, it might be best to stick with only
inserting spaces for the first line relative to the indentation in the rich
text document.]
If using spaces/tabs to preserve some part of the rich text layout, would there
be a method to distinguish between the tabs/spaces which are part of the
original document and those which are merely used to preserve the original
alignment?
For example, assume a rich text document has indentations created NOT using
spaces or tabs, but only the indentation settings on the ruler. It would
convert to this:
Line one with no indent. And some text that wraps: "sed ut perspiciatis unde
omnis iste natus error sit..."
Line 2 with .5" indent. And some text that wraps: "sed ut perspiciatis
unde
omnis iste natus error sit..."
Line 3 with 1" indent. And some text that wraps: "sed ut perspiciatis
unde omnis iste natus error sit..."
As alluded to above, one possible solution would be to write a script that
identifies the indentation of each line (ie .5", 1", 1.5"...) and places the
correct number of spaces to fill that length.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs