https://bugs.freedesktop.org/show_bug.cgi?id=70423

--- Comment #4 from John B <john876...@gmail.com> ---
Urmas, it took me a while to figure out how to respond to this.  What we are
really looking at is an edge case that has poor documentation, is not intuitive
to the end user, and an unfortunate programmer probably had to make a judgment
call.  I still consider this a bug (because Writer is silently adding paragraph
marks approximately every 9900 characters without any prompts at all).  You or
others on the LibreOffice team may see this differently and I accept that
judgment.  In other words, I leave this up to you as to whether to close this
“bug” or look into it more deeply.  If you don’t consider this a bug, then be
aware there is an unintuitive limitation in Writer that you are purposely
leaving in the program that changes the content of the document without letting
the user know.

*For everyone else*:  I’m going to explain what happened in as close to plain
English as possible hoping that it may help someone else.  Disclaimers: 1) I’m
not an expert in the inner workings of LibreOffice, but I am a programmer by
profession.  2) Although I am dealing with Linux files, I’m writing this
explanation from a Windows perspective since I usually do my work in the
Windows world.

There are two things which triggered my “bug”.

*First*: From Windows Explorer, I double clicked the file I wanted to open. 
Another way to do this is to open up LibreOffice, then click on File --> Open
in the menus and leave the file type set to “All Files (*.*)”.

LibreOffice Writer guesses which file type I wanted to use.  Although it
guessed the file type correctly, it chose the wrong filter.  I’ll elaborate on
file types and filters.

The file you work on within Writer may be saved as an open document file (this
is the native format of Writer with the “ODT File” Type) or as a Word document
file (with the “DOCX File” Type) or as another type of file.  To achieve this,
it appears that Writer “filters” every file it saves.  It also “filters” when
it opens a file as well.  This filter is an internal mechanism that you usually
don’t have to concern yourself with.  It is there merely to help LibreOffice
understand a file it is opening and saving.  In some form or fashion, all
programs must do this.  Almost always, it can be transparently done without
ever asking you questions or prompting you for input.  With word processors
(like LibreOffice Writer or Microsoft Word), the filters have to be given to
you sometimes, but the programmers try to make it as transparent as possible so
you don’t have to answer a hundred questions every time you open a file.  On
occasion and under an unfortunate set of circumstances, Writer makes the wrong
choice.  Sometimes, it can’t be helped.  This is what happened in my case.

My file type was a “Text Document” and text documents can be written many
different ways.  That means text documents have many different filters.  Linux
computers and Windows computers save text files differently so a different
filter must be used when opening each of these kinds of text files. 
Differently languages (English, German, etc) write out different characters
within those text files and this affects the filter used as well.

If you let LibreOffice choose the file type, it chooses the usual “Windows”
filter for text files.  Generally, it picks the correct choice, but in my case,
this is incorrect since my file came from a Linux computer.  I need to choose
the “Text Encoded (*.txt)” file type.  Only then will Writer ask me what what
kind of filter should be used.  In this case, it is called the ASCII Filter.  I
can only choose the file type when opening a file though the menus:  File -->
Open.

You’ll have to figure out what kind of encoding you need.  Unfortunately,
LibreOffice help is a bit sparse at this time:
https://help.libreoffice.org/Common/ASCII_Filter_Options .  If the correct
encoding is not used, LibreOffice will not know where to place the paragraph
marks properly.

In my case, it did not properly interpret the Linux paragraph marks (or enter
key characters) and the filter thought it the entire file was one giant
paragraph.  This is the first part as to why the “bug” takes place.

*Second*: When paragraphs are too long (specifically) sometime after 9900
characters, LibreOffice Writer silently adds paragraph marks for a reason
unknown to me.  I suspect there is some kind of internal limit within Writer
that forces this kind of behavior.  I suspect (although I have not tried it
out) that LibreOffice cannot handle paragraphs greater than 10000 characters. 
9900 characters is about 3 - 5 pages worth of material and the programmer
probably didn’t think anyone would ever write such a long paragraph in a word
processor.

Every program has trade offs.  A sophisticated program like LibreOffice Writer
has a lot of trade offs, but the programmers have done a fantastic job to hide
them from you (and me).  Unfortunately, personal experience in my programming
world has shown me there are some things that are very difficult to code
around.  If there is a 10000 character limit in Writer, that is probably due to
some trade off the programmer made so he / she could give you better
performance or so Writer could be given to you in a reasonable amount of time. 
Can this one part be fixed?  Probably.  Should it be fixed?  Eventually, I
think it needs to be addressed.  Is it easy to change?  Probably not.

The 9900 character limit probably seemed like a good trade off at the time it
was written.  If this was a deliberate choice, then this is not truly a bug. 
This is the reason why I’m willing to let this be decided by someone (like
Urmas) who is better informed than I am without more of a fight.  My wish then
becomes that it is better documented.

I wrote all of this here because something like this is easy enough to work
around for an expert (like me), but pretty frustrating for the casual user.  My
suggestion to you is to play around with those filter settings like Urmas
mentioned and I explained.  Read up on what those filter settings mean by doing
Internet searches.

I hope this helps someone.

-- John

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to