summaryrefslogtreecommitdiff
path: root/comphelper/source/misc/compareversionstrings.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/compareversionstrings.cxx')
-rw-r--r--comphelper/source/misc/compareversionstrings.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/comphelper/source/misc/compareversionstrings.cxx b/comphelper/source/misc/compareversionstrings.cxx
index cc8cb440733e..a5ca92847634 100644
--- a/comphelper/source/misc/compareversionstrings.cxx
+++ b/comphelper/source/misc/compareversionstrings.cxx
@@ -8,7 +8,6 @@
*/
#include <ctype.h>
-#include <ctype.h>
#include <string.h>
#include <comphelper/string.hxx>
html/htmlnumwriter.cxx?id=df98b6015cd2ae4f1573e12cee1b1bc947adabf0'>tdf#155871: don't forget to close li before starting nextMike Kaganski When closing a nested list, the previous condition failed to close the last li in case when the next item is numbered (i.e., will need another li). Indeed, if the next item is unnumbered, current last li should stay open. Change-Id: Iad7d83d50d2f02d6bd1d046804b7e23b59f9ce8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-05-29ReqIF: 'ol' elements must have no 'type' attributeMike Kaganski Change-Id: I62098bac9dc3751f7b939cbf94f1561b4539a294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152368 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-05-26tdf#155496: Export list header to (X)HTML using 'display: block' styleMike Kaganski This re-implements commit 013a4f1f5c9ea5fb511568c53a7e76d1b365a65d (sw XHTML export: fix handling of list labels, 2021-05-13), and instead of not putting headers (ODF 'text:list-header' elements) into lists, this adds 'style="display: block"' attribute to the respective list items. This makes sure that the items use proper list indentation, and produces correct markup. Change-Id: I900e4aebbe562830dc2ce5400e3e33b38c2f2faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152280 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2023-05-18tdf#155387: fix list restart and opening/closing conditionsMike Kaganski 1. List restart flag in the node does not yet mean that the restart would actually happen: it will be ignored, if the next node is more nested than the previous one. 2. When writing nested list items, we should not write additional <li><ul> pairs for current level (previously, only level 0 was skipped); same for closing. Change-Id: I5f67e8fa9236e7e2e6dba2e0ec5dffbf0d7b7f8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151958 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-05-17Simplify a bitMike Kaganski Change-Id: I3d10e85a6141aae6c7741aebb1c0b1ac68ac4364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151785 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-05-17Drop redundant conditionMike Kaganski Whenever (i != 0), this whole subcondition will be true; and (i != 0) can only be false when (nPrevDepth != 0) is also false. Change-Id: Icfd6dae3ecbbcd7307c42762d245d58725256c56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151783 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2023-03-03reduce casting in writer html export filterNoel Grandin Change-Id: I8e690eea423a60a5009376a222d18ac214c77bc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2023-02-08htmlexport: close li mark not only in xhtmlSzymon Kłos As commented in sw/source/filter/html/htmlatr.cxx:766 "// OutHTML_NumberBulletListEnd() will end a list item" We have to do it also in HTML not only XHTML so node will be closed and we get correct structure. This is followup for: commit 2466b9fcf20ee61f6fc621298011c0efaa55e7c6 Author: Miklos Vajna <vmiklos@collabora.com> Date: Mon Feb 21 16:38:51 2022 +0100 sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered Change-Id: I99baa59b437572b157df8057445cf6c741f936b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143508 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146651 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> 2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2022-08-14rename SwPaM::GetNode to GetPointNode/GetContentNodeNoel Grandin Using a parameter to select point/mark makes the code much harder to read Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-08-02introduce SwPosition::GetNodeIndexNoel Grandin as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetIndex' | xargs perl -pi -e 's/\bnNode\.GetIndex/GetNodeIndex/g' Change-Id: I3616cea4c47595afe74f1aa8e3be553279f25d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-06-16sw HTML export, XHTML mode: fix lost <li> with a list header + itemMiklos Vajna There is a general mismatch between XHTML and Writer lists: XHTML can only contain list items (for ordered or unordered lists), while Writer can contain list headers and list items. List headers have no bullet or number at the start, list items are the normal text nodes. Commit 8c2607ae3ce143586e623532b8ae5288277ec3ac (sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered, 2022-02-21) fixed the list item end side of this problem: if all text nodes in a list are headers, then don't write ul/ol at all, otherwise end list headers with </li> as well to make sure the output XML is valid. However, this created a mis-match, the starting <li> for list headers in a list which have non-header text nodes at as was not adapted. Fix the problem by extending OutHTML_SwFormat() so list headers in a list with non-header text nodes always have a <li> and </li>, and this condition is the same on the start/end side. Calculating if at least one text node is non-header in a list may not be cheap, so reuse the already calculated info from OutHTML_NumberBulletListStart() in OutHTML_SwFormat(). Change-Id: I3817a489f16166fc5b4c33ee64e2283c41a4402c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135999 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins 2022-02-21sw HTML export, XHTML mode: fix lost </li> when last list item is not numberedMiklos Vajna This went wrong in 013a4f1f5c9ea5fb511568c53a7e76d1b365a65d (sw XHTML export: fix handling of list labels, 2021-05-13), where we started to assume that in case the last paragraph of a list is not numbered, then the entire list is not numbered. This lead to loosing the </li> for an <li> in case the list starts with a numbered paragraph, but ends with a non-numbered one. Fix the problem by (if necessary) looking back till the start of the list to see if any paragraph is numbered: that ensures that the <li> and </li> is always in sync. This fixes the new problem and keeps the old problem fixed at the same time. Change-Id: I7d347b37a40dcc727c2080bf8279e33c3ad147e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130287 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins 2021-10-21introduce SwNodeOffset strong typedefNoel Grandin for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-10-11sw XHTML export: fix missing <li> around nested <ul>/<ol>Miklos Vajna This was fine in practice in the HTML case, so make it conditional on the XHTML flag for now. Change-Id: Ie96357ba78f4a7fae125165c1c4e47c3f5686ddf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123421 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins 2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann ...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2021-06-15sw XHTML / reqif export: handle multiple lists when detecting header-only listsMiklos Vajna The case when the list was at the end of the text node section (body text, table cell, etc) was already handled, this handles when the list is followed by a different list. Change-Id: I131402cb577bd16814f56a5bd6bcad7c99947dbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117246 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins 2021-05-14Improve loplugin:stringviewStephan Bergmann Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2021-05-13sw XHTML export: fix handling of list labelsMiklos Vajna This is building on top of commit 119b6876c92e4cdae44583c4b1b1419d3533e3ee (sw XHTML export: properly write <li>...</li> around multiple paragraphs, 2020-05-21), but the use-case here is a numbering with list labels only. The first problem was that the list label had its <li> suppressed, but not its </li>. The other problem is that <ul> can only have <li> child elements, so at least fix the case where the list only has list labels, in which case even <ul> and </ul> should be omitted. Change-Id: Id38978a40d8618f483e3e9d499f75838d5b2adb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115543 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins 2021-04-27use more string_view in tools/streamNoel Grandin Change-Id: I2a957cd72d71fea717734488cdb3670e0bcdd6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-05-21sw XHTML export: properly write <li>...</li> around multiple paragraphsMiklos Vajna Writer just has a list of text nodes, but ODF and HTML can have multiple paragraphs inside <li>, in case the non-first text nodes have their RES_PARATR_LIST_ISCOUNTED set to false. Improve b6f7a4908d1c3fc610440a1cbbbc1673a53da8b6 (sw XHTML export: properly write <li>...</li> around paragraphs, 2018-04-11) to make the decision around when to write </li> based on not only the current but also the next text node. This way we omit </li> for non-first paragraphs inside <li>, but keep writing it in other cases. Change-Id: I994855961aeea92050268dba5f19f125c7ad2b7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94622 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins