summaryrefslogtreecommitdiff
path: root/sw/inc/ToxLinkProcessor.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-01-25 17:12:42 +0100
committerMichael Stahl <mstahl@redhat.com>2017-01-25 17:58:55 +0100
commit68f7be01a78a5bad56ddd94c04764131676d6cc0 (patch)
treeb90820c41cf7d31d8cf465e4debc2c2fa010e83a /sw/inc/ToxLinkProcessor.hxx
parent4a43ffcef946067c5b3992a00c765a36804a194f (diff)
sw: revert ToX hyperlinks to LO 4.3 behaviour
Commit 94b296d5416dd71d721ad16216b50bce79e3dc04 changed this to potentially insert multiple overlapping hyperlink items. Unfortunately Writer can only have one RES_TXTATR_INETFMT on any given position in the paragraph, so the hyperlink hints inevitably overwrite each other. Revert this to do it the same way as the old code in LO 4.3 did: match the last unmatched link-start with the first link-end, and ignore all the link-start before the matching one, as well as the link-end after the matching one. This should prevent surprising formatting changes on index update, including entries spontaneously turning green, and there is no reason why the result of the new way is objectively better than the old one. Change-Id: I55be9c212c473908428fa8bd6487d136343fe852
Diffstat (limited to 'sw/inc/ToxLinkProcessor.hxx')
-rw-r--r--sw/inc/ToxLinkProcessor.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx
index 7fceef1050d5..78bb7fb30d49 100644
--- a/sw/inc/ToxLinkProcessor.hxx
+++ b/sw/inc/ToxLinkProcessor.hxx
@@ -82,7 +82,7 @@ private:
std::vector<std::unique_ptr<ClosedLink>> m_ClosedLinks;
- std::vector<std::unique_ptr<StartedLink>> m_StartedLinks;
+ std::unique_ptr<StartedLink> m_pStartedLink;
friend class ::ToxLinkProcessorTest;
};