Some of the usages of GetPos were just misusing it to find out
whether a vector contains given element -- use Contains() in those
cases
This patch is partially based on work of Christoph Lutz
Conflicts:
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/wrtw8num.cxx
Change-Id: I40bedba905e7577ba23f69acee178e0ea7cc1521
Moves the common code of Fmt based lists and simple vector lists
into two intermediate template classes, of which one provides
the SwFmtsBase interface.
Change-Id: If963c19293584654a3d17438221e3fca8bdfd4f9
Reviewed-on: https://gerrit.libreoffice.org/13448
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call). Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).
(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added. The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like
'x' == s
is an abomination that shall not be abetted.)
Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
Looks like the old code would create a link starting at the beginning in
this case, so let's do the same.
(regression from 94b296d541)
Change-Id: Idcd17ae51c478aa5c2a000c7b33a8244f06bd166
surely this should be IsLess not IsEqual, i.e.
see
commit 86a3fe47a6
Date: Sat Oct 4 21:36:27 2014 -0500
coverity#704049 Unchecked return value
and
commit 3edb1dcdc8
Date: Wed Jun 26 08:32:38 2002 +0000
#99877# Phonetic sorting for Asian languages
Change-Id: I6c78e388e986577c34b37643a877ab7f5c17b173
Caller uses indexes from 1 to GetFormMax(), that is AUTH_TYPE_END+1
for TOX_AUTHORITIES and is smaller (23) that the number of entries
in the lookup table (30). The index is compensated for this offset,
so that the following check for special case AUTH_TYPE_WWW is
correct, but no checks on maximum value are performed since it
should have never reached the last special item of the table anyway.
Change-Id: Idd85e509da1e8ab4cdda0070f513c4e07008d410
Added non const SwDoc::GetDfltTxtFmtColl and SwDoc::GetTxtFmtColls
and SwDoc::GetCharFmts.
Had to make the manager friend of SwTxtFmtColl and SwConditionTxtFmtColl
Had to make SwDoc::_MakeCharFmt and SwDoc::_MakeFrmFmt public.
Change-Id: I19a36d91f92b3781a6c4313ec12eb8f7d4dfacc3
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.
Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
This allows us to pass through less parameters which are only used for
this functionality.
Conflicts:
sw/inc/ToxTextGenerator.hxx
sw/source/core/tox/ToxTextGenerator.cxx
Change-Id: I5a03cf8ec6d86d05f2a7f7771668585669c1e595
Reviewed-on: https://gerrit.libreoffice.org/9613
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
The text and selected attributes are copied from the source text node
and added to the target node at the corresponding positions.
Conflicts:
sw/inc/ToxTextGenerator.hxx
sw/source/core/tox/ToxTextGenerator.cxx
Change-Id: Ifa329bfcb2b9691120513236909bcadaf1127b5e
Reviewed-on: https://gerrit.libreoffice.org/9610
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
The logic was moved to a separate class and unittested.
Conflicts:
sw/inc/ToxTextGenerator.hxx
Change-Id: I0e4475f5e2950cdfdfb07b89128c4ce1d6af3f22
Reviewed-on: https://gerrit.libreoffice.org/9609
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>