The commit "tdf#163240 vcl,sw: keep one Link tag for a wrapped link" kept the tag across a line break. A ruby still split it, and a character style on a ruby base pulled the following text into the Ruby element. Tags were closed by a count, which callers decremented to leave one open for the next portion; a count does not record which tag. Keep two stacks instead: the tags this helper opened, and the tags left open for a following portion. Close a deferred tag only while it is the current element, so neither a ruby nor a fly closes a tag of another. Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com> Change-Id: Icdf793f149076db2b5dfac2b7668d0c414467427 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11542 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit 1936ac2268b9e603c64a03eff6eb8b7ecb8b56de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211090 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
33 lines
2.5 KiB
XML
33 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
|
|
<office:meta><dc:title>Link with a ruby</dc:title></office:meta>
|
|
<office:font-face-decls>
|
|
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
|
</office:font-face-decls>
|
|
<office:styles>
|
|
<style:default-style style:family="paragraph">
|
|
<style:text-properties style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="Liberation Serif" style:font-size-asian="12pt" style:font-name-complex="Liberation Serif" style:font-size-complex="12pt"/>
|
|
</style:default-style>
|
|
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
|
|
<style:style style:name="Internet_20_link" style:display-name="Internet link" style:family="text">
|
|
<style:text-properties fo:color="#000080" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
|
|
</style:style>
|
|
<style:style style:name="Rubies" style:family="ruby">
|
|
<style:ruby-properties style:ruby-position="above" style:ruby-align="center"/>
|
|
</style:style>
|
|
</office:styles>
|
|
<office:automatic-styles>
|
|
<style:page-layout style:name="pm1">
|
|
<style:page-layout-properties fo:page-width="21cm" fo:page-height="29.7cm" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb"/>
|
|
</style:page-layout>
|
|
</office:automatic-styles>
|
|
<office:master-styles>
|
|
<style:master-page style:name="Standard" style:page-layout-name="pm1"/>
|
|
</office:master-styles>
|
|
<office:body>
|
|
<office:text>
|
|
<text:p text:style-name="Standard"><text:a xlink:type="simple" xlink:href="https://www.example.com/" office:name="Ruby link" text:style-name="Internet_20_link">before <text:ruby text:style-name="Rubies"><text:ruby-base>base</text:ruby-base><text:ruby-text>ruby</text:ruby-text></text:ruby> after</text:a></text:p>
|
|
</office:text>
|
|
</office:body>
|
|
</office:document>
|