<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>What is Miklos hacking</title><link>https://vmiklos.hu/blog/</link><description/><atom:link href="https://vmiklos.hu/blog/feeds/all.rss.xml" rel="self"/><lastBuildDate>Tue, 08 Sep 2026 16:42:37 +0200</lastBuildDate><item><title>Markdown copy&amp;paste on the Collabora Online UI</title><link>https://vmiklos.hu/blog/cool-markdown-copy.html</link><description>&lt;p&gt;Markdown import and export in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; was an existing
filter already, see &lt;a href="https://vmiklos.hu/blog/sw-markdown-filter.html"&gt;the post from last year&lt;/a&gt; for more
details.&lt;/p&gt;
&lt;p&gt;This post is meant to show how this is now available on the end-user UI, while previously this was
mostly available for batch conversion and SDK clients only.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A computer's clipboard can contain data in multiple formats, so it would be logical to read and
write Markdown with the &lt;code&gt;text/markdown&lt;/code&gt; MIME type. Unfortunately most applications just read from
the &lt;code&gt;text/plain&lt;/code&gt; MIME type when non-formatted text is expected. This means writing the dedicated
markdown slot is not read by anyone and in turn reading from that slot usually returns with no data.&lt;/p&gt;
&lt;p&gt;The idea is to make "copy as markdown" an explicit action on the UI: when the user opts in, then we
put markdown to the plain text slot on the clipboard, where other software can read it easily. And
similarly, when you paste special, then you can opt in to interpret the plain text data as markdown.
This means that data like &lt;code&gt;aaa _bbb_ ccc&lt;/code&gt; won't be interpreted as markdown by accident, but if you
ask for it, you can get your markdown data into Writer easily.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/CollaboraOnline/online/issues/16060"&gt;the issue&lt;/a&gt; shows that first the copy as
markdown UI was added:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-copy.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-copy.png"&gt;&lt;figcaption&gt;Collabora Online: copy as markdown UI&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then the paste spcial dialog needed work in each component. First in Writer:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-writer.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-writer.png"&gt;&lt;figcaption&gt;Collabora Online Writer: paste as markdown UI&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then the same in Impress, where we need to work with editengine's model, instead of Writer text:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-impress.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-impress.png"&gt;&lt;figcaption&gt;Collabora Online Impress: paste as markdown UI&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally also in Calc, sill working with editengine's model:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-calc.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-markdown-copy/markdown-paste-calc.png"&gt;&lt;figcaption&gt;Collabora Online Calc: paste as markdown UI&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/865a5bf3604a9a96c753efd0117ccc66c8447dcc"&gt;cool#16060 browser, wsd: add a copy-as-markdown UI to Writer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/82c2e2f37eaba64d71ca30862279ecd30b889b80"&gt;cool#16060 engine kit: add a paste-as-markdown UI to Writer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/07ca16bd0032777d8837c6ba577132e060858489"&gt;cool#16060 engine kit: add a paste-as-markdown UI to Impress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/db032d245409506992105a46be2a11fcecfbcbab"&gt;cool#16060 engine kit: add a paste-as-markdown UI to Calc (cell text edit)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/b9adeeeeb51f42fb283c48617b508df3ac8160bd"&gt;cool#16060 engine sd: keep plain text as default, paste special can opt in for markdown&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 26.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Tue, 08 Sep 2026 16:42:37 +0200</pubDate><guid>tag:vmiklos.hu,2026-09-08:/blog/cool-markdown-copy.html</guid><category>collabora-online</category><category>en</category></item><item><title>Better slide paste progress indicator in Collabora Online Impress</title><link>https://vmiklos.hu/blog/sd-paste-indicator.html</link><description>&lt;p&gt;Copying slides between Impress documents in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; was
reasonably fast already, see &lt;a href="https://vmiklos.hu/blog/sd-faster-slide-copy.html"&gt;the previous post&lt;/a&gt; for more
details.&lt;/p&gt;
&lt;p&gt;This post is meant to show how the progress indicator you see while pasting is improved, better
showing and hiding when the paste is actually in progress.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Impress copies slides using 3 steps. Our testcase was a 85 slides long slidedeck, pasting that to an
other presentation took 3 steps: downloading the remote slides data, uploading the slides data to
the current document and finally executing the paste UI action, which interprets the ODP slide data.
With enough slides, each step took a bit of visible time:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-paste-indicator/steps.svg"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-paste-indicator/steps.svg"&gt;&lt;figcaption&gt;Collabora Online Impress: bad progress indicator&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the progress indicator stopped after task 2, which was confusing.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/CollaboraOnline/online/issues/16013"&gt;the issue&lt;/a&gt; shows that the problem was
we had no idea when the paste UI command finished its work. This looked like this visually:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/HNOVbHw4Pt0"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-paste-indicator/bad.png"&gt;&lt;figcaption&gt;Collabora Online Impress: bad progress indicator in action&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note how the progress indicator finishes and only a little later the pasted slides show up.&lt;/p&gt;
&lt;p&gt;In contrast to that, after the fix, the slides show up as soon as the progress indicator hides:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/N1I1JXDzwWM"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-paste-indicator/good.png"&gt;&lt;figcaption&gt;Collabora Online Impress: good progress indicator&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="one-more-thing"&gt;One more thing&lt;a class="headerlink" href="#one-more-thing" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This post is about pasting, but we had the opposite problem around Markdown in Writer: you could
paste (using the SDK) into Writer, you could also convert to and from Markdown (again, using the
SDK), but you could not actually open Markdown files. This now also works:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-paste-indicator/markdown.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-paste-indicator/markdown.png"&gt;&lt;figcaption&gt;Collabora Online Writer: editing a Markdown file&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To not break compatibility, a single click in Nextcloud still opens the Markdown file in their JS
editor, but similar to PDF files, you can use the "..." menu to access additional actions and there
you can now open the file for editing in Collabora Online as well.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/9a671594ce19a19dd358b0e27cfc6373d770f799"&gt;cool#16013 slide copy: don't terminate paste progress indicator too early&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/0f56d692d1fa68f4d7d43c6bd275ad9d5356c617"&gt;Related: cool#16013 engine sc: make ScInsertContentsDlg async&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/b0ba3eadd40b73cb4054802db8da468b315e94a6"&gt;cool#16018 discovery: add entries for markdown&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nextcloud richdocuments commits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nextcloud/richdocuments/commit/7ec1f6c6c0479fcb8c7639e4cdce6418327847cc"&gt;feat: Add text/markdown as an optionally supported mime type&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 26.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Thu, 06 Aug 2026 14:29:42 +0200</pubDate><guid>tag:vmiklos.hu,2026-08-06:/blog/sd-paste-indicator.html</guid><category>collabora-online</category><category>en</category></item><item><title>Faster slide copy in Collabora Online Writer</title><link>https://vmiklos.hu/blog/sd-faster-slide-copy.html</link><description>&lt;p&gt;Copying slides between Impress documents in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; was
working already, see e.g. &lt;a href="https://www.youtube.com/watch?v=b2sgsvvEnuM"&gt;a feature Friday video&lt;/a&gt; from
last year for details.&lt;/p&gt;
&lt;p&gt;This post is meant to detail how we managed to make it about 5 times faster for large presentations
with lots of high-resolution screenshots.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Impress supports lazy-loading images. This means that once you open a presentation with lots of
slides (our testcase was 85 slides), then only the first few slides are rendered, and the images on
other slides aren't even parsed / decompressed.&lt;/p&gt;
&lt;p&gt;This is good, the first slide is rendered faster this way. Also the preview of the first few slides
are shown, but the rest of the slides are not rendered, so you can even edit the first slides
without "swapping in" images on later slides.&lt;/p&gt;
&lt;p&gt;But we noticed that copying slides between documents means saving the copied slides to ODP, and we
swap in images during ODP save, which makes this operation slower than it needs to be. In practice
75% of the cost was uncompressing PNG files to calculate a checksum on the raw pixel data:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame1-bad.svg"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame1-bad.svg"&gt;&lt;figcaption&gt;Collabora Online Impress: bad checksum calc on unompressed image data&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/CollaboraOnline/online/issues/15962"&gt;the issue&lt;/a&gt; shows that our goal is to
not call &lt;code&gt;ImpGraphic::ensureAvailable()&lt;/code&gt; while saving to ODP. The first step was to calculate the
checksum on the compressed image data. After that, we get a new flamegraph:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame2-bad.svg"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame2-bad.svg"&gt;&lt;figcaption&gt;Collabora Online Impress: swap in to have access to the graphic link&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here we swapped in to always have access to a "graphic link". This gives access to the underlying
compressed image data. But a just created image may not have that compressed form, so if you
unconditionally want a "graphic link", you hit a complex code path, which includes swapping the
image in. The solution is to ask for the "shared graphic link", which may not be available. It is
typically available and is the fast path; and we have fallback code in place if the graphic has no
"graphic link". After fixing that, we get a third bad flamegraph:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame3-bad.svg"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame3-bad.svg"&gt;&lt;figcaption&gt;Collabora Online Impress: swap in to have a graphic ID&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This last problem is around producing something called a GraphicID. This is used to identify an
image in a unique way, and ODP save uses it to name the graphic in the ZIP file as something like &lt;code&gt;Pictures/10000201000000130000001391B82C7409B72726.png&lt;/code&gt;. After fixing that to only use image metadata we get a much more reasonable performance profile:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame4-good.svg"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-faster-slide-copy/flame4-good.svg"&gt;&lt;figcaption&gt;Collabora Online Impress: no PNG swap-in during ODP save&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For a sample document, copying 85 slides used to take 5100 ms, and now takes 978 ms (19% of
baseline) with these improvements.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/5ed08a860ceb6a2b4e45369c34b8b09bae38dfc8"&gt;cool#15962 engine vcl: move the CRC to being on the compressed stream if we have one&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/1b3e142d8206e141fc32448a7f25a1aa5e94418d"&gt;Related: cool#15962 engine vcl: add a checksum to the BinaryDataContainer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/f9bce20ed00fdab1fbef3207626e0a95a7b4bcbc"&gt;cool#15962 engine xmloff: save graphic using the shared gfx link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/f59b1faf7597ae2eb538f6cd7b4861ced663503f"&gt;cool#15962 engine vcl: construct GraphicID for PNG files without swapping in&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 26.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Fri, 10 Jul 2026 08:36:13 +0200</pubDate><guid>tag:vmiklos.hu,2026-07-10:/blog/sd-faster-slide-copy.html</guid><category>collabora-online</category><category>en</category></item><item><title>Format-on-format change tracking in Collabora Online Writer</title><link>https://vmiklos.hu/blog/sw-redline-format-on-format.html</link><description>&lt;p&gt;Inter-dependent change tracking in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; was mostly a
topic last year, see &lt;a href="https://vmiklos.hu/blog/sw-interdependent-redline-improvements4.html"&gt;the post from
November&lt;/a&gt; for more info about the
feature in general: this is the case when you create a change on top of another change.&lt;/p&gt;
&lt;p&gt;This post is meant to deal with the situation where you already have a recorded formatting and
somebody else creates a new formatting on top of that.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Writer supports insert-then-delete, insert-then-format and delete-then-format as combinations of
changes with different types. So format-on-format is not supported at a file format level, DOCX
can't represent it, either.&lt;/p&gt;
&lt;p&gt;But instead of just losing the old format when we create a new format, we can do better: update the
format redline to now track the formatting of the union of the old and new format change.&lt;/p&gt;
&lt;p&gt;This still means that the metadata (e.g. author) will be only stored for the new change, but accept
or reject on the format will result in the expected formatting.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The document from &lt;a href="https://github.com/CollaboraOnline/online/issues/15749"&gt;the issue&lt;/a&gt; had BBB as
bold by Alice:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-redline-format-on-format/before.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-redline-format-on-format/before.png"&gt;&lt;figcaption&gt;Collabora Online Writer: a format redline&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And now once a different editor marks the middle B as italic, additionally, then the formatting on
this middle character is now attributed to the new editor:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-redline-format-on-format/after.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-redline-format-on-format/after.png"&gt;&lt;figcaption&gt;Collabora Online Writer: format on top of format, different editors&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Without the fix, rejection only removed the italics. With the fix, now reject correctly removes both
the bold and the italic formatting. Accept is a little bit easier, since we don't need to touch the
formatting in the model, just delete the change from the table of changes.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/bd7f20bdf7d1e66ab13c46074c0482ccab6d6867"&gt;cool#15451 sw interdependent redlines: fix creating a format on top of format-on-delete&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/0449be1640408a3fad529ed5dec82ae7bd7af240"&gt;cool#15749 sw interdependent redlines: fix creating a format on top of format&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Wed, 03 Jun 2026 15:41:57 +0200</pubDate><guid>tag:vmiklos.hu,2026-06-03:/blog/sw-redline-format-on-format.html</guid><category>collabora-online</category><category>en</category></item><item><title>Better pasting of markdown into Collabora Online Writer</title><link>https://vmiklos.hu/blog/sw-markdown-paste.html</link><description>&lt;p&gt;Writer has a markdown import/export filter in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt;,
see &lt;a href="https://vmiklos.hu/blog/sw-markdown-templating.html"&gt;the post from December&lt;/a&gt; for more info about the
filter in general.&lt;/p&gt;
&lt;p&gt;This post is meant to detail a recent improvement when a markdown snippet is on the clipboard and
it's pasted into an existing Writer document.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Writer import filters operate in two modes: normally an empty model gets populated by reading user
input from a file, in a certain format. You can also paste similar data from the clipboard, in which
case the target model is not empty and this introduces some complexity.&lt;/p&gt;
&lt;p&gt;The markdown import was missing some tweaks which were there already in the ODT and RTF paste code.
Additionally, given that markdown only allows limited formatting, it makes sense to inherit more
formatting from the paste position, so the pasted content's formatting is consistent with the
formatting of the surrounding content.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The document from &lt;a href="https://github.com/CollaboraOnline/online/issues/15535"&gt;the issue&lt;/a&gt; had bullets
with text "A" and "B", the first problem was that pasting before "A" resulted in a mix of existing
vs pasted content:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-paste/bad1.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-paste/bad1.png"&gt;&lt;figcaption&gt;Collabora Online Writer markdown paste: before fixing paragraph splits&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After fixing that, the problem was that the bullet format from markdown and in the existing document
was different:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-paste/bad2.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-paste/bad2.png"&gt;&lt;figcaption&gt;Collabora Online Writer markdown paste: paragraph splits are fixed, bullet formats are not&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once that got fixed, the paragraph style was still bad:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-paste/bad3.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-paste/bad3.png"&gt;&lt;figcaption&gt;Collabora Online Writer markdown paste: bullet formats are fixed, paragraph style is not&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Which lead to the correct paste result:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-paste/good.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-paste/good.png"&gt;&lt;figcaption&gt;Collabora Online Writer markdown paste: paragraph style is fixed&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As a bonus point, undo for the paste now works correctly, too.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/f97a7bf0efbe1abb9fbecb58449b2845632839fd"&gt;cool#15535 sw markdown import: handle pasting into an existing paragraph&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/f16394d42af604fcaf4a28938a317f15d1732fc9"&gt;Related: cool#15535 sw markdown import: use matching num rule if possible&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gerrit.collaboraoffice.com/plugins/gitiles/online/+/840bd79a47fad50a80b9720176ad53dd50649091"&gt;Related: cool#15535 sw markdown import: use matching paragraph formatting&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Mon, 04 May 2026 15:29:42 +0200</pubDate><guid>tag:vmiklos.hu,2026-05-04:/blog/sw-markdown-paste.html</guid><category>collabora-online</category><category>en</category></item><item><title>Comparing text documents in Collabora Online: improved UI</title><link>https://vmiklos.hu/blog/cool-doc-compare2.html</link><description>&lt;p&gt;The document compare view in &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; Writer allows
comparing documents side by side, see &lt;a href="https://vmiklos.hu/blog/cool-doc-compare.html"&gt;the first post&lt;/a&gt; for more
info about the feature in general.&lt;/p&gt;
&lt;p&gt;This second post is meant to give you an update on what happened in this area in the last month.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Collabora Online core supports showing or hiding tracked changes in document content, we have a UI
button for that, see the notebookbar's Review tab, the Tracking section's Show button.&lt;/p&gt;
&lt;p&gt;Entering doc compare mode or leaving it works by clicking on the View Changes button, in the same
section.&lt;/p&gt;
&lt;p&gt;But this means that you can show/hide changes (modifies the document layout, affects everyone) and
also view them (only affects your view), and they do quite different things. :-)&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The new UI has a button with a drop-down: the button is toggle that reflects if you compare change
side-by-side or not.  And if you click the drop-down next to the button, it's clear that show/hide
is for inline rendering in the document layout while the other option is to render changes
side-by-side:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare2/new.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare2/new.png"&gt;&lt;figcaption&gt;Collabora Online: view changes inline or side-by-side&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While this used to look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare2/old.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare2/old.png"&gt;&lt;figcaption&gt;Old UI: show or view changes?&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There were also a number of other smaller improvements: now side-by-side rendering works nicely if
you use IME to type characters, a missing invalidation is sorted out and side-by-side rendering is
better with comments.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes. Core side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/ba91aae53989dcbc447a53b6350a6bb1208c808b"&gt;tdf#171191 sw redline render mode: fix crash on IME input&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;COOL side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/207880a8965e169966cdc206c54e0183e85ad65a"&gt;browser, document compare: annotate overriding functions with 'override'&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/d8972a97ae438600046f1f11e71308643e97eefe"&gt;cool#14940 document compare: merge Show and View Changes buttons into a single menu button&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/ad2cd0e13aca91ebc02031f27ff9567c297e511c"&gt;cool#14990 document compare: fix lost mode=2 full invalidations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/5c2c98a28858454e1e306bc25499cd3286bb71eb"&gt;cool#15195 document compare: fix bad vertical position of comments on scrolling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/ce52a2c0c1d2022be42f4a21cebab07a5fb86887"&gt;cool#15195 document compare: fix bad horizontal position of comments&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Wed, 01 Apr 2026 08:55:11 +0200</pubDate><guid>tag:vmiklos.hu,2026-04-01:/blog/cool-doc-compare2.html</guid><category>collabora-online</category><category>en</category></item><item><title>Comparing text documents in Collabora Online</title><link>https://vmiklos.hu/blog/cool-doc-compare.html</link><description>&lt;p&gt;If you have two documents or two versions of a document to compare, then traditional tracked changes
is too late, the untracked changes are already in the document.&lt;/p&gt;
&lt;p&gt;This work for &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt; adds interactive a
non-interactive document compare to create tracked changes after the fact, finally introduces a
document compare view, to better understand these changes.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Collabora Online's core already contained a document compare feature, but this was never integrated
with the SDK (REST API) or with the browser UI.&lt;/p&gt;
&lt;p&gt;Additionally, while some users took a training in understanding track changes (or: redlines), the
usage of underlines for inserts and strike-throughs for deletions may not be obvious. An
alternative of this is a side-by-side view, which is now available in Collabora Online for text
documents.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="non-interactive-document-compare"&gt;Non-interactive document compare&lt;a class="headerlink" href="#non-interactive-document-compare" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;See the &lt;a href="https://sdk.collaboraonline.com/docs/conversion_api.html#compare-compare-option"&gt;SDK&lt;/a&gt;, now
you can convert e.g. an editable (new) docx file to PDF in a way that your request references your
old docx file as a parameter, and the resulting PDF shows the differences:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-k&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;data=@new.docx&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;compare=@old.docx&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;format=pdf&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;out.pdf&lt;span class="w"&gt; &lt;/span&gt;https://localhost:9980/cool/convert-to
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="interactive-document-compare"&gt;Interactive document compare&lt;a class="headerlink" href="#interactive-document-compare" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Technically this is a bit similar to image insertion: once you open your new document, you can
compare its content with an old local or remote document:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare/interactive.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare/interactive.png"&gt;&lt;figcaption&gt;Collabora Online: interactive document compare for text documents&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just use the Compare button on the Review tab on the notebookbar.&lt;/p&gt;
&lt;h3 id="document-compare-view"&gt;Document compare view&lt;a class="headerlink" href="#document-compare-view" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We worked with Gokay to build this. The LOK API now provides "tile modes" for text documents,
similar to how presentations already have tile modes for slide content, master pages and notes. The
default tile mode is unchanged for text documents, but the Review tab of the notebookbar has a View
Changes button and then the new left hand side, right hand side tile modes allow you to show the
changes side by side:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare/doc-compare-view.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare/doc-compare-view.png"&gt;&lt;figcaption&gt;Collabora Online: the new document compare view&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Removed content is colored with a red-like color, added content is colored with a green-like color.
The matching content on the other side is gray. This is not only for text, e.g. images have a frame
with a similar color.&lt;/p&gt;
&lt;p&gt;Now that the LOK API could provide tiles either left or right hand side mode, Gokay built a whole
new tile layout on the browser side, so these are shown nicely side by side.&lt;/p&gt;
&lt;p&gt;To better understand what you see on your screen, now there are also labels at the top of the first
pages:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare/doc-compare-labels.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare/doc-compare-labels.png"&gt;&lt;figcaption&gt;Collabora Online: the new document compare labels&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This describes the purposes of the two sides, and in case you're right after a document compare
action, also shows you the file names, modification dates and author names.&lt;/p&gt;
&lt;p&gt;For integrators, it's possible to start in this mode by default, if you append &lt;code&gt;&amp;amp;comparechanges=1&lt;/code&gt;
to COOL's iframe URL.&lt;/p&gt;
&lt;p&gt;Finally if you hover over a tracked change with your mouse, now you get a highlight for that piece
of text on both sides, to match the same parts of the old and new version better. A deletion looks
like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare/highlight-delete.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare/highlight-delete.png"&gt;&lt;figcaption&gt;Collabora Online: document compare view, highlight of a delete&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This also works for inserts:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/cool-doc-compare/highlight-insert.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/cool-doc-compare/highlight-insert.png"&gt;&lt;figcaption&gt;Collabora Online: document compare view, highlight of an insert&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes. Core side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/bb8086aea02d867c6de4ef298808c47ba2bfe356"&gt;cool#13574 sw lok: introduce a redline render mode view option&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/b3656a81b40bd5012d6e9a52527e241cd6586571"&gt;cool#13574 sw lok: improve non-standard redline render mode colors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/4b3eb51d4e2fb19c3c05a83b6890de070aa58ab7"&gt;cool#13574 sw lok: increase saturation of non-standard redline render mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/3c4da8d9fc1245b2b48d3b73ee88c29d2c1198ad"&gt;cool#13574 sw redline render mode: add uno command to switch from standard&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/5ba4c652fab709d5d8182b4ad99bf1e676e7e6ca"&gt;cool#13574 sw redline render mode: send LOK status&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/3b2ab404e21b648ddc9761c175dadb32b6459364"&gt;cool#13574 sw redline render mode: invalidate both omit modes together&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/a24dd7b1d742ccd59768db8b6b6a522588952108"&gt;cool#13574 sw redline render mode: avoid coloring, set lightness&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/95c924760a9923b507a9d44a64edda851ff7567c"&gt;cool#13574 sw redline render mode: extract SwTextPaintOmitter from text painter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/58d677055d9f6da976bf4fe34c1d89dd6871050d"&gt;cool#13988 sw redline render mode: handle anchored images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/c2527991e86edb9f27efc93f6a5e66c078ecc0cf"&gt;cool#13574 sw redline render mode: somewhat color ins/del as green/red&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/8314046a4fdb706cf9bb4d65c97792ed7410fb0f"&gt;cool#13988 sw redline render mode: handle inline images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/9b47b7914242811fe69815485840f20bc7bd7887"&gt;cool#13988 sw redline render mode: add colored border for anchored images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/36a6ca3e6de7106bdd0497386d29a05337c5a90c"&gt;cool#13988 sw redline render mode: add colored border for inline images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/ef623651aa63097810461c10e0f8d41ff48d1f21"&gt;cool#13988 sw redline render mode: handle moves&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/cef7b1ac8c26fd33c56d4a0aebdd81e2050c814d"&gt;cool#13988 sw redline render mode: table row redlines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/e609c44293ca7ba5658459aec15b6b084cb1bfd1"&gt;cool#13988 sw redline render mode: handle number portions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/edef9fffa00bddb8f03ef00e6b693c967a15b28f"&gt;cool#13988 sw redline render mode: handle tab portions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/c71d2bdb298639573fa5a93cdd5f211dabcf61c7"&gt;cool#13988 sw redline render mode: expose old/new author/date when comparing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/8dcecf717b5cd231adbc49e27ccf1b7aa0230a3a"&gt;cool#13988 sw redline tooltip LOK API: expose anchor range&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;COOL side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/ac74dffe035f2a05131ff787267d9a69db5590d1"&gt;cool#4535 convert-to compare option: introduce 'additional files'&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/9f45bb834e14d5cc02d4bad29a32208becb911e8"&gt;cool#4535 convert-to compare option: insert old reference doc before save&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/17e450a4de0cd6291e1e05763f16e54db13ada6f"&gt;cool#4535 convert-to compare option: add testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/7bf48566de9324f653fc2e2ca17358c8d24d3563"&gt;cool#13574 redline render mode: send statusupdate with mode=2 when entering doc compare mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/464c494bb824af210e9e11399395e3cd768ef04b"&gt;cool#13574 redline render mode: fix missing invalidate after the 2nd enter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/829a32986b7d813a0fb13766353152006d6c1414"&gt;cool#13574 redline render mode: extract sendTileCombineMessage() from sendTileCombineRequest()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/4d422ea7aaf29a5f8256925e9f1937b866e5ea7d"&gt;cool#13574 redline render mode: request mode=1 tiles on requesting mode=2 tiles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/6094763d13ecca51d8f69edab48598766b12383e"&gt;cool#13988 browser: fire comparedocuments event on selecting a file for doc compare purposes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/a8bcdbd8e373b617136e53bd76a472fbe17c4a41"&gt;cool#13988 browser, on comparedocuments: send insertfile websocket message&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/6faaa5387b23388bf162a8767aca3ae6b16f6e3e"&gt;cool#13988 kit, insert file: handle the comparedocuments type&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/9d18df799850256c9995b4a7f275504eae44b50b"&gt;cool#13988 doc compare: add testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/8a068c12f2e0b565431012a7a1653770cdf99e18"&gt;cool#13988 doc compare, browser: add a new Action_CompareDocuments PostMessage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/5dea1513c5701fd178b129ff653295e4690b8f11"&gt;cool#13988 doc compare, kit: handle comparedocumentsurl file insertion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/1e58b2211c120bc3ba4864cc7dda5696fb957aad"&gt;cool#14093 browser: show the user name of other text cursors on mouse hover&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/addd98ec5e4ba3cf7c54149ac82708a2a944c369"&gt;cool#14093 add testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/7fd64cdc17c0185f0b06146b8c967e32e1af506a"&gt;cypress, cursor header section: improve testability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/97b43daf258d497222b8fa0ae7db3ffcf9fd26c6"&gt;cool#14299 redline render mode: change notebookbar button type to bigcustomtoolitem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/289bc381b468fa08ce5129e36f45ef41a6d76d68"&gt;cool#13988 redline render mode: add a HTTP parameter to activate this mode on load&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/4e2fe9d2b4c0f907e4ec259c5b841aa60d892a73"&gt;cool#13988 redline render mode: fix TilesMiddleware.getMissingTiles()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/55572c07b963f46b3184d7f7245c4a720348d31b"&gt;cool#13988 redline render mode: improve TilesMiddleware.updateTileDistance()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/9d3d2654bf20c29e7c4b5d7cb55be0a3279406e6"&gt;cool#13988 redline render mode: fix the HTTP GET parameter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/1f450e4bab850750d140d8edc37a64d70665301b"&gt;cool#13988 redline render mode: add missing tiles testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/4cbbefe0de61e988cf91156b1345b666e38dbcdc"&gt;cool#13988 redline render mode: add a new CompareChangesLabelSection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/3c975ab0164d9779f3c713ca86d5a4e155f4b5e7"&gt;cool#13988 redline render mode: scroll CompareChangesLabelSection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/75faeb062b19f2c725f6759c078f60b411fb0505"&gt;cool#13988 redline render mode: labels can be now multiline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/0ef4c6695a3062e5d201cf8ab1e455a46198fe8e"&gt;cool#13988 redline render mode: display author / modification date for both sides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/fc1aa2f72341fb471147b84e45bd47978f25e3e5"&gt;cool#13988 redline render mode: deduplicate the label setup code for the two sides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/e5e9253df85f44ecb4e83b8ddd3a334075d5dffc"&gt;cool#13988 redline render mode: center the title vertically when we have no subtitle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/4e7b90f138a911c2a8390ccc71bcd0e8332666cf"&gt;cool#13988 redline render mode: avoid doc name when just viewing tracked changes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/d445f6b207ec5da627d369e45d2612b9b40ddd42"&gt;cool#13988 redline render mode: switch to gray/blue backgrounds for the labels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/6681c51c768c5d0fdda7185a5933a4ec73eff807"&gt;cool#13988 redline render mode: show the old file name in the old label after local compare&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/75e80afa5244fcec77bb0712132988b1825fe6e6"&gt;cool#13988 redline render mode: try to avoid DOM node touch while drawing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/9552891901060d9e8190a196db503c583ed7affc"&gt;cool#13988 redline render mode: show the old file name also with a remote compare&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/ee73a3fffff956ef8b220278c0d8db81aa134aea"&gt;cool#13988 redline render mode: fix insert/delete tooltip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/9377a6aafe17e3390fdd23a273881227b5ff727a"&gt;cool#13988 redline render mode: extract common code from ContentControlSection to CanvasSectionObject&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/fd82271030e1b43044dc2ff80c0a064e63c81388"&gt;cool#13988 redline render mode: add a new TooltipAnchorSection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/5c0d4fa0717f42616edc9e8dc4eb9b46d243173b"&gt;cool#13988 redline render mode: add dynamic color for the tooltip anchor section&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/c3d8efdecac38f7cfce04013517e9906dccfdb5c"&gt;cool#13988 redline render mode: don't highlight redline ranges by default&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/e75a456b37d5a082354f68b71ec34e0bcdbd8318"&gt;cool#13770 windows: use LOK's new registerFileSaveDialogCallback()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/23e5b49f1f46a3160ee8d56549d56a06b8179814"&gt;cool#13988 redline render mode: highlight both sides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/63d8119d329b3e09f1b97d0aa8a9b66b43fbcd60"&gt;cool#13988 redline render mode: adjust highlight color to text color&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/dc519e8018e63b842eafd84b3b14612f44611a10"&gt;cool#13988 redline render mode: work with last used tile mode when showing tooltip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/1f1dca27cc74ae81fc7c0eab0438bffe55583b69"&gt;cool#13988 redline render mode: add tooltip anchor section cypress test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/ba76222c1002d9f4f9ddc6612364ffe09563aa5c"&gt;Related: cool#14716 document compare: fix position of the context toolbar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/d1610fe671c09345cd7a78845f9f6281c089b027"&gt;Related: cool#14716 document compare: add context toolbar position test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/38c139612967cec17d6ccc95057264bc670833be"&gt;cool#14716 document compare: fix bad tile position after zoom change&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Tue, 03 Mar 2026 14:21:25 +0100</pubDate><guid>tag:vmiklos.hu,2026-03-03:/blog/cool-doc-compare.html</guid><category>collabora-online</category><category>en</category></item><item><title>Improving deleted commented text ranges in Writer's DOCX filter</title><link>https://vmiklos.hu/blog/sw-ranged-comment-delete-docx.html</link><description>&lt;p&gt;If you have a commented text range, which gets deleted while track changes is on and you later save
and load this with Writer's DOCX filter, that works now correctly.&lt;/p&gt;
&lt;p&gt;This work is primarily for &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt;, but the feature is
available in desktop Writer as well.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It was already possible to comment on text ranges. Comments were also supported inside deletes when
track changes is enabled. These could be already exported to and imported from DOCX in Writer. But
you could not combine these.&lt;/p&gt;
&lt;p&gt;With the increasing popularity of commenting text ranges (rather than just inserting a comment with
an anchor), not being able to combine these was annoying.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here is how a commented text range inside a delete from DOCX now looks like, note the
semi-transparent comment hinting it's deleted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/cool-good.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/cool-good.png"&gt;&lt;figcaption&gt;Commented text range, inside a tracked delete, in DOCX, Collabora Online&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As a side effect, this also fixes the behavior in desktop Writer, which crosses out deleted
comments:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/desktop-good.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/desktop-good.png"&gt;&lt;figcaption&gt;Commented text range, inside a tracked delete, in DOCX, desktop&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the past, the "is this deleted" property was not visible in the render result:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/cool-bad.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/cool-bad.png"&gt;&lt;figcaption&gt;Commented text range, inside a tracked delete, in DOCX, Collabora Online, old bad state&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And it was also bad in desktop Writer:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/desktop-bad.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-ranged-comment-delete-docx/desktop-bad.png"&gt;&lt;figcaption&gt;Commented text range, inside a tracked delete, in DOCX, desktop, old bad state&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This required changes to both DOCX import and export: a comment could be deleted or could have an
anchor which is a text range, but you couldn't have both.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes. Core side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/5d101c9919c7c0798df092bd31b828d0a144abba"&gt;cool#13988 DOCX import: fix missing delete flag on deleted comments with ranges&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/a72506da82d2e0334e23a8c3c1cd07282fdd7ca3"&gt;cool#13988 DOCX export: fix missing delete flag on deleted comments with ranges&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.  Collabora intends to continue
supporting and contributing to LibreOffice, the code is merged so we expect all of this work will be
available in TDF's next release too (26.8).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Wed, 04 Feb 2026 08:42:44 +0100</pubDate><guid>tag:vmiklos.hu,2026-02-04:/blog/sw-ranged-comment-delete-docx.html</guid><category>libreoffice</category><category>en</category></item><item><title>Bullet improvements in Impress</title><link>https://vmiklos.hu/blog/sd-bullet-improvements.html</link><description>&lt;p&gt;The bullet support in Impress got a couple of improvements recently, some of this is PPTX support
and others are general UI improvements.&lt;/p&gt;
&lt;p&gt;This work is primarily for &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt;, but the feature is
available in desktop Impress as well.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Probably the most simple presentations are just a couple of slides, each slide having a title shape
and an outliner shape, containing some bullets, perhaps with some additional images. Images are just
bitmaps, so let's focus on outliner shapes and their outliner / bullet styles.&lt;/p&gt;
&lt;p&gt;What happens if you save these to PPTX and load it back? Can you toggle between a numbering and a
bullet? Can you return to an outliner style after you had direct formatting for your bullet?&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first case was about bullet editing of this document:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-1.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-1.png"&gt;&lt;figcaption&gt;Outliner shape with 3 outliner styles&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you pressed enter at the end of 'First level', then pressed &lt;code&gt;&amp;lt;tab&amp;gt;&lt;/code&gt; to promote the current
paragraph to the second level, nothing happened. The reason for this was that our PPTX export was
missing the list styles of shapes, except for the very first list style. And the same was missing on
the import side, too. With this, not only the rendering of the bullets are OK, but also adding new
paragraphs and using promoting / demoting to change levels work as expected.&lt;/p&gt;
&lt;p&gt;The second case was about this document, where the second level had a numbering, not a bullet:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-2.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-2.png"&gt;&lt;figcaption&gt;Outliner shape with a numbering on the second level&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We only had UI to first toggle off a numbering to no numbering, then you could toggle on bullets.
Now it's possible to do this change in one step.&lt;/p&gt;
&lt;p&gt;The last case was about styles. Imagine that you had a master page with an outline shape and some
reasonably looking configuration for the first and second levels as outline styles:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-3.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sd-bullet-improvements/sd-bullet-improvements-3.png"&gt;&lt;figcaption&gt;Outliner shape with two outline styles&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice how the last paragraph has a slightly inconsistent formatting, due to direct formatting.
Let's fix this.&lt;/p&gt;
&lt;p&gt;Go to the end of the last bullet, which is currently not connected to an outline style, toggle
bullets off and then toggle it on again. Now we clear direct formatting when we turn off the bullet,
so next time you turn bullets on, it'll be again connected to the outline style's bullet
configuration and the content will look better.&lt;/p&gt;
&lt;p&gt;Note how this even improves consistency: Writer was behaving the same way already, when toggling
bullets off and then toggle on again resulted in getting rid of previously applied unwanted direct
formatting.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes. Core side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/6a8b96ddd47af2be3f06e299ee7058438083ba5b"&gt;PPTX export: fix missing non-first level list style for outline shapes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/ccb9e9ef70c4fae3f69b63083cab838794a3d46d"&gt;sd doc model dump: allow invoking this from outside sd/ in a debugger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/e96f2ef1a299c95d83c6a7945fcc92f8f1833112"&gt;sd doc model xml dump: show styles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/cb108a10479e72b63d32cae020a4ac178e763d14"&gt;tdf#168559 PPTX imp: fix missing custom level list style for outline shapes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/b2c5d52f733cca2656daa0a2cfdd85a1108635f4"&gt;tdf#168559 PPTX imp: fix missing list style for outline shapes on master pages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/f60ee00edcc5b0fdee5227bb695448119cddb013"&gt;tdf#89365 sd UI: fix transitioning from a numbered list to a bulleted list&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/0856eee636f512ae2cffc141b7ab3b5065d8beda"&gt;tdf#169275 sd UI: clear direct format when turning off bullet/num&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/122ff49f6ee6b88386cd30a542a92b04c508e47a"&gt;sd: extract &lt;code&gt;FN_TRANSFORM_DOCUMENT_STRUCTURE&lt;/code&gt; handling to a new function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/1dc25f541784b5e50210af1d5ffb619ec55220f1"&gt;sd, FuBulletAndPosition: avoid magic number for bullet toggle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/a26e176abcd40438d19e2a9012db1342bdcaba12"&gt;Related: tdf#89365 sd UI, from numbering to bullet: fix defaults&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.  Collabora intends to continue
supporting and contributing to LibreOffice, the code is merged so we expect the core of this work
will be available in TDF's next release too (26.2).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Mon, 05 Jan 2026 08:37:39 +0100</pubDate><guid>tag:vmiklos.hu,2026-01-05:/blog/sd-bullet-improvements.html</guid><category>libreoffice</category><category>en</category></item><item><title>Markdown import in Writer: the new template option</title><link>https://vmiklos.hu/blog/sw-markdown-templating.html</link><description>&lt;p&gt;Writer recently got a new markdown import option to take styles from a template, leading to much
prettier output when converting markdown to PDF, DOCX or ODT.&lt;/p&gt;
&lt;p&gt;This work is primarily for &lt;a href="https://www.collaboraonline.com/"&gt;Collabora Online&lt;/a&gt;, but the templating
feature is available in desktop Writer as well.&lt;/p&gt;
&lt;h2 id="motivation"&gt;Motivation&lt;a class="headerlink" href="#motivation" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;a href="https://vmiklos.hu/blog/sw-markdown-filter.html"&gt;previous post&lt;/a&gt; mentioned recent improvements to the
markdown import/export in Writer.&lt;/p&gt;
&lt;p&gt;But if you convert some markdown to e.g. PDF, all the headings just have the default look, wouldn't
it be nice to take your organization template and add colors and other formatting there,
automatically?&lt;/p&gt;
&lt;p&gt;Also, wouldn't it be nice if you could paste as markdown in COOL or copy the current selection as
markdown? Which would enable all sorts of interesting use-cases, like using an external API to turn
the selection into a summary or translating it to a different language.&lt;/p&gt;
&lt;h2 id="results-so-far"&gt;Results so far&lt;a class="headerlink" href="#results-so-far" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here is a sample input markdown:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;# heading 1&lt;/span&gt;

body text
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here is how it looks like if you template it using the core.git &lt;code&gt;sw/qa/filter/md/data/template.docx&lt;/code&gt;
sample:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-templating/templated.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-templating/templated.png"&gt;&lt;figcaption&gt;PDF result: templated&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;curl invocation for this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-k&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;data=@/path/to/test.md&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;template=@/path/to/template.docx&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-F&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;format=pdf&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;out.pdf&lt;span class="w"&gt; &lt;/span&gt;https://localhost:9980/cool/convert-to
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Or example desktop command-line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;soffice&lt;span class="w"&gt; &lt;/span&gt;--infilter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Markdown:{&amp;quot;TemplateURL&amp;quot;:{&amp;quot;type&amp;quot;:&amp;quot;string&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;./template.ott&amp;quot;}}&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;test.md
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;While it would look like this by default:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://share.vmiklos.hu/blog/sw-markdown-templating/default.png"&gt;&lt;figure&gt;&lt;img src="https://share.vmiklos.hu/blog/sw-markdown-templating/default.png"&gt;&lt;figcaption&gt;PDF result: default&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The other part is the PostMessage API of COOL, if you want to copy and paste as markdown. What's
newly possible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copy the current selection: set MessageId to &lt;code&gt;Action_Copy&lt;/code&gt; and the value to &lt;code&gt;{"Mimetype": "text/markdown;charset=utf-8"}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Paste at the current cursor position: set MessageId to &lt;code&gt;Action_Paste&lt;/code&gt; and the value to
  something like &lt;code&gt;{"Mimetype": "text/markdown;charset=utf-8", "Data": "foo _bar_ baz"}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can read more about the PostMessage API in the &lt;a href="https://sdk.collaboraonline.com/docs/postmessage_api.html"&gt;COOL
SDK&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="how-is-this-implemented"&gt;How is this implemented?&lt;a class="headerlink" href="#how-is-this-implemented" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you would like to know a bit more about how this works, continue reading... :-)&lt;/p&gt;
&lt;p&gt;As usual, the high-level problem was addressed by a series of small changes. Core side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/7462639341c043bf72560e0ddfff06e1e8879859"&gt;tdf#169316 sw markdown import: add a TemplateURL parameter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/6d1312e160ee8c2c0f65b6e0a86333bf3c9c60ce"&gt;tdf#169316 sw markdown import, template: handle non-ODF formats as well&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/64cf69926b7cb6fc94efd792b173ac12aa93cb8f"&gt;cool#13468 sw markdown paste: add UNO command parameter to skip the detection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.libreoffice.org/core/commit/5ae32bee8dfe5b3264debc02276a3eeac7f51021"&gt;Related: tdf#169251 sw markdown export: fix crash on OLE with no graphic&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Online side:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/5741a8fe91f9fe2969926cf70c8c51f1dd144ad5"&gt;cool#13419 convert-to template option: handle multiple streams in ConvertToPartHandler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/31109066f2ea2b935cd9d2bc06b5debc6206b41a"&gt;cool#13419 convert-to template option: pass it to doc broker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/3916a7f82fd6454409b86b9915d33f9f2491a348"&gt;cool#13419 convert-to template option: pass it to the kit process&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/b993c314e1b50aea382a1dac7391a3949e65045b"&gt;cool#13419 convert-to template option: more strict param name, generalize filenames&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/852479accd67880934393f14c4101ad72e9ba806"&gt;cool#13419 convert-to template option: add testcase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/collaboraonline/online/commit/81881d58fd537924091a5e2e41d033e91c98c8be"&gt;cool#13468 PostMessage API: allow copying the current text selection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="want-to-start-using-this"&gt;Want to start using this?&lt;a class="headerlink" href="#want-to-start-using-this" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can get a development edition of Collabora Online 25.04 and try it out yourself right now: &lt;a href="https://www.collaboraonline.com/code/"&gt;try
the development edition&lt;/a&gt;.  Collabora intends to continue
supporting and contributing to LibreOffice, the code is merged so we expect the core of this work
will be available in TDF's next release too (26.2).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Miklos Vajna</dc:creator><pubDate>Wed, 03 Dec 2025 09:35:36 +0100</pubDate><guid>tag:vmiklos.hu,2025-12-03:/blog/sw-markdown-templating.html</guid><category>libreoffice</category><category>en</category></item></channel></rss>