https://bugs.documentfoundation.org/show_bug.cgi?id=172367
Bug ID: 172367
Summary: NEW functionality: automatically tidying up the
"source code" -- document "source code" tidiness, or
health
Product: LibreOffice
Version: 26.8.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
* this is not a bug but a suggestion for a new functionality (or rather, a
suggestion for a new usage of an already existing functionality)
_______________________
hi,
Not everybody looks under the hood of their documents, and it should remain
like this, cause what we could see there is mess.
NO, this is not Libreoffice's fault. Nor is it the users'.
It is natural messiness. The more you edit a text, including cutting up words,
duplicating them, deleting one or the other, adding formatting, by styles or
inline ("direct formatting").
Etc, etc...
The result is: mess.
Libreoffice, however, can take care of this! It already does that!
Try:
Get some old text that you had extensively edited.
Select a paragraph, and press: "clean direct formatting".
You'll see that the text on your monitor blinks. It is but a subtle blink, but
you can notice it.
Now do this again. Press clear direct formatting, again. NO blink will happen.
Save the document as a new version, and compare the two.
Unzip them and look at the code.
The latter, which you have applied clearing the direct formatting, will look
pretty clean. IN fact, it can be absolutely clean, meaning:
No style tags embracing half words or letters.
If you don't have italics or bold, then style tags will be pure paragraph tags,
with text embraced by them, totally clean. Just text.
::::::::::::::
THE POINT:
An experimental functionality could be added:
after you press enter, meaning a new paragraph, the paragraph above it would be
automatically cleaned up (as if you had selected it and pressed clean direct
formatting).
This function could be switched on or off.
Plus, it would NOT produce surprising effects, cause if it happens, you'll see
it right away, cause it is the paragraph you have just left :) You would see if
it changes. (If it changes, it means it wasn't clean, anyway.)
::::::::::
Why source code cleanness matters?
Cause transparency is a major and basic principle.
It was established by Debian, and Linux, and Open Source (in contrast with
Microsoft's code hiding practices and concept).
Transparency also means that what you make can be used (integrated) by others,
easily, and beautifully.
A practical example:
Libreoffice Writer doesn't work with Scribus right now.
It works, of course. But it may easily happen that some spaces will be missing,
which is a really bad thing. This is because of the lack of the document's
tidiness.
Libreoffice now can export to MarkDown. It is beautiful! The resulting text is
clean and healthy. This level of healthiness could be easily achieved with .ODT
documents too. Cause Libreoffice can already do that , and what more, it's
already doing it. Only not all the time, and we have to do it manually.
::::::::::::
Going by paragraph
One more thing: if you clean up your document going paragraph by paragraph, it
will be much cleaner (the cleaning will be much more likely to produce 100%
good results) than just selecting all and pressing clear direct formatting, not
to mention that deploying it for an entire document is not a good idea, as
changes may happen that you don't see.
So, an automatic cleaning, whenever you leave (close) a paragraph, could be a
NATURAL and perfect way of maintaining high level document tidiness :)
Peter
* * * * * thank you for developing Libreoffice and Writer * * * * * * *
--
You are receiving this mail because:
You are the assignee for the bug.