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

--- Comment #2 from regivanx <[email protected]> ---
I can reproduce it in:

LibreOffice 5.4.1.2.0 40m0(Build:2)

What do you have in content.xml?

It is necessary to start from a file that contains this:

<text:p text:style-name="P1">
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                localhost
        </text:a>
</text:p>

Then if you close and reopen with LibreOffice, editing the link and saving will
give this:

<text:p text:style-name="P1">
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                local
        </text:a>
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T1">
                        hello
                </text:span>
        </text:a>
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                host
        </text:a>
</text:p>

On the other hand, if you start with a file that contains this:

<text:p text:style-name="P2">
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T2">
                        localhost
                </text:span>
        </text:a>
</text:p>

You will not be able to reproduce the bug, because the problem comes from the
way LibreOffice adds automatic styles: if there is already an automatic style
(here: "T2"), you will get correctly:

<text:p text:style-name="P2">
        <text:a xlink:type="simple" xlink:href="http://localhost/";
text:style-name="Internet_20_link"
text:visited-style-name="Visited_20_Internet_20_Link">
                <text:span text:style-name="T2">
                        localhellohost
                </text:span>
        </text:a>
</text:p>

Thank you for your interest in this bug. :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to