https://bugs.documentfoundation.org/show_bug.cgi?id=173770
Bug ID: 173770
Summary: Libre-Writer has changed to improperly format plain
text
Product: LibreOffice
Version: 26.2.5.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
Prior to version 26.2.5.2, if a plain text file was opened in Libre-Writer or
part of it was copied to the clipboard in a plain text editor (e.g. Emacs) and
pasted into a standard document, the text was automatically properly formatted.
In both cases if any line in the file begins with # (e.g. Python comment) the
new version applies a weird style, deleting all existing linefeeds and
indentations, arbitrarily adding multiple blank lines breaking continuous text,
and turning some text into bold large font headings. This can be partly
corrected by selecting the text and changing its style to "Preformatted" and
its font face and size. However, all linefeeds and indentations must be
corrected manually. Most users are probably unaware of this problem because
they don't associate text files with documents. I write programming documents
that include source code snippets and this correction procedure is arduous and
time-consuming. If a plain text file is opened in Writer by following a
hyperlink to it in a document, the formatting is correct. However, if the text
file is recognized by the operating system as a script or a file type with a
non-Libre default program, it is not opened in Writer. My LinkXall Libre-Basic
library follows a link to any text file by invoking
StarDesktop.loadComponentFromURL with a FilterName = Text argument. This is
inconvenient for me because I configure LinkXall to normally open plain text
files in Emacs rather than Libre-Writer. For all of us it would be more
convenient for Libre to return to its old method of opening a plain text file
in Writer or pasting some of it into a document. That Writer correctly formats
a text file that is opened by directly invoking
StarDesktop.loadComponentFromURL indicates that the new problem has been
introduced at a relatively high level of the Writer program.
Steps to Reproduce:
1.Copy a Python script to a file without extension or use a plain text editor
to create a file with at least one line that begins with #.
2. Open this file in Libre-Writer or open it in a plain text editor and copy
its contents and paste them into a document in Writer.
3.
Actual Results:
In both cases, Writer weirdly formats the text.
Expected Results:
In prior versions of Libre-Writer the text was properly formatted.
Reproducible: Always
User Profile Reset: No
Additional Info:
Open the text file in Writer with a Basic macro that just invokes
StarDesktop.loadComponentFromURL with a FilterName = Text argument. This
correctly formats the text, indicating that the problem occurs at a relatively
high level in the Writer program. If you don't want to write this you can use
my library, which is free and open-source available for anyone at
github.com/DavidHMcCracken/LinkXall.
--
You are receiving this mail because:
You are the assignee for the bug.