https://bugs.documentfoundation.org/show_bug.cgi?id=148543

            Bug ID: 148543
           Summary: Excess character format code embedded in Writer
                    documents
           Product: LibreOffice
           Version: 7.0.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: ern...@bywater.net.au

Description:
When editing a document several days after first writing and saving the
document the new text entered is assigned its own format code which is embedded
in the document instead of being left to have the paragraph style code applied
to it. This results in the document being larger and causes issues when
converting the finished document from .ODT to other formats.

The way it SHOULD work is when I type a paragraph with an applied style all of
the format code is stored within the document at the start of the paragraph and
any later text entered into the paragraph should inherit the format of the
paragraph. What IS happening is the initial text is saved as it should be, but
a later edit has the new text entered with the characters of the new text being
assigned their won format code which is embedded into the document as well.
Thus instead of having the - < font type> < font size > < font color >
<alignment > then the general text <end of paragraph > - which is how the
original text is saved the revised text is saved as - < font type> < font size
> < font color > <alignment > then the general < font type> < font size > <
font color > revised text <end of paragraph > - another later revision would
see - < font type> < font size > < font color > <alignment > then the general 
< font type> < font size > < font color > revised text < font type> < font size
> < font color > and more revised text <end of paragraph >.

The brackets < > are used to show the type of format code that is saved with
the document but not readily visible to the user in the .ODT format but does
show up in other formats.

Thus there are two or more sets of format code where only one is needed, but it
all get transferred over when the document is changed from .ODT to other format
like .HTML where such code is more easily visible. This problem ONLY appears
where there has been edits made after the document had been saved and returned
to later. Unedited paragraphs do not have the problem of the extra format code.

I am now using a AMD with Linux, but have noticed the same problem with Intel
systems using Windows. Not sure when it started but hae noticed with every
version of LO 7

Steps to Reproduce:
1.Create an ODT document.
2.Save the document and close the file.
3.Reopene the document hours later and enter edits within the paragraphs
previously typed.
4. Save the document as another format to make the hidden format code visible -
most visible in html.

Actual Results:
<p class="western" style="line-height: 100%; margin-bottom: 0cm">Both James and
John are fit and while their bags are big they aren't heavy. However, they're
easy to carry on their backs by the leather straps they're using over their
shoulders to hold the bags in place.
Their long confident strides eat up the miles along the road. In the late
afternoon or early evening they intend to find local inns to stay in for the
night. There is <font color="#000000"><span style="font-weight:
normal">a</span></font><font color="#000000"><span style="font-weight: normal">
lot</span></font> of day left when they dock so John and James start walking
home.</p>

Expected Results:
<p class="western" style="line-height: 100%; margin-bottom: 0cm">Both
James and John are fit and while their bags are big they aren't
heavy. However, they're easy to carry on their backs by the leather
straps they're using over their shoulders to hold the bags in place. Their long
confident strides eat up the miles along the road. In the late afternoon or
early evening they intend to find local inns to stay in for the night. There is
a lot of day left when they dock so John and James start walking home.</p>


Reproducible: Always


User Profile Reset: Yes



Additional Info:
In the example above the original text last sentence was: 

There is half of the day left when they dock so John and James start walking
home.

This was edited to:

There is a lot of the day left when they dock so John and James start walking
home.

The extra format code information was inserted and applied to the changed words
instead of leaving them to inherit the format of the rest of the paragraph from
its class style of 'western' - - - this is extremely troublesome to fix when
converting to html and epub documents.

This was NOT a problem in LO 3 or 4 or 5and I'm not sure about LO 6.

Version: 7.3.1.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-AU (en_AU.UTF-8); UI: en-US
7.3.1-1
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to