Commit Graph

171 Commits

Author SHA1 Message Date
Mike Kaganski
5823c27d7f Prepare for removal of non-const operator[] from Sequence in editeng
Change-Id: Ibdf2db715cb85481342db2a72f27bea6a5b73b7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124360
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 00:30:45 +02:00
Mike Kaganski
2484de6728 Remove non-const Sequence::begin()/end() in internal code
... to avoid hidden cost of multiple COW checks, because they
call getArray() internally.
This obsoletes [loplugin:sequenceloop].

Also rename toNonConstRange to asNonConstRange, to reflect that
the result is a view of the sequence, not an independent object.

TODO: also drop non-const operator[], but introduce operator[]
in SequenceRange.

Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15 10:36:36 +02:00
Julien Nabet
f0fd4574ff Typo *ropertie -> *roperty
Change-Id: Id5ae03140ac4fd67bf4940569ac5cd2f15716749
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123306
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-09 11:10:27 +02:00
Julien Nabet
7e7dd7f152 drop 'using namespace std' in desktop, e*, f*
Change-Id: I277dc957798093001f9a3935f97db8ac0314e6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123022
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-03 19:27:50 +02:00
Luboš Luňák
b22d478531 clean up ambiguous confusing rectangle APIs like IsInside()
Reading 'rectA.IsInside( rectB )' kind of suggests that the code
checks whether 'rectA is inside rectB', but it's actually the other
way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(),
which should make it clear which way the logic goes.

Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
2021-09-20 12:10:44 +02:00
Caolán McNamara
2e894d5053 drop some unneeded includes
Change-Id: I200d2936e97475dedc67801631222da12c777729
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119649
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-29 13:53:53 +02:00
Noel Grandin
bfc1600c6a loplugin:indentation improve checks for brace alignment
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28 10:47:34 +02:00
Noel Grandin
5b8729a741 no need to allocate SvxNumRule separately in SvxNumBulletItem
Change-Id: I7903565a468fc0fbec603c88b92cca6560a86728
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116424
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-31 15:50:04 +02:00
Noel
dc37866f32 loplugin:refcounting in editeng
Change-Id: I7d00bede5dbf216e5d3d179a03b101322ae23e11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111287
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22 17:30:15 +01:00
Noel
7767ff7b52 loplugin:referencecasting in editeng..framework
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-16 07:52:37 +01:00
Noel
63a68064bb make the Color constructors explicitly specify transparency
to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.

i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)

Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16 10:07:07 +01:00
Noel
d765ec2295 transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal
representation of Color is not changed.

Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12 17:38:53 +01:00
Noel
d6d80c4e17 OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTION
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-01 09:28:52 +01:00
Stephan Bergmann
33ecd0d5c4 Change OUStringLiteral from char[] to char16_t[]
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).

For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.

In most places just a u"..." string literal prefix had to be added.  In some
places

  char const a[] = "...";

variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).

For all uses of macros expanding to string literals, the relevant uses have been
rewritten as

  u"" MACRO

instead of changing the macro definitions.  It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.

Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-28 08:07:09 +02:00
Noel Grandin
3101fa6862 use OUStringLiteral in SfxItemPropertyMapEntry
Change-Id: I4f05b6a35010e661ea77f3e4b83302d2ec74d227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100405
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13 08:18:40 +02:00
Colomban Wendling
b46a0a7f9f tdf#118418 implement scrollSubstringTo() for gtk
Define & use new accessibility scroll type compatible with IAccessible2
and extend the XAccessibleText interface to require scrollSubstringTo().

Co-authored-by: Martin Pieuchot <mpi@grenadille.net>
Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-07 12:11:33 +02:00
Noel Grandin
d72f963c0d loplugin:flatten in editeng
Change-Id: I5c83183d1f9d2d8f5a25b976ead1a7598a75c641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92197
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14 20:45:59 +02:00
Noel Grandin
b55bf0cbdf move some headers inside their module
Change-Id: I026f920d475c4ce56a12d6b29a702673e8bd7a1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-03 12:27:18 +01:00
Noel Grandin
f147b160ae clang-analyzer-deadcode.DeadStores
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-12 10:31:25 +01:00
Caolán McNamara
3d826d780a make some headers private
as shown with ./bin/find-headers-to-move-inside-modules.py

Change-Id: I7662417e76fe00c0fc352957560e104b6c2a3d61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-03 20:24:00 +01:00
Gabor Kelemen
0c595cff64 tdf#42949 Fix IWYU warnings in editeng/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I8d56ef332c18b03d44489762bd6bf540b893b599
Reviewed-on: https://gerrit.libreoffice.org/85429
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-20 10:40:04 +01:00
Stephan Bergmann
f853ec317f Extend loplugin:external to warn about classes
...following up on 314f15bff0 "Extend
loplugin:external to warn about enums".

Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:

  filter/source/svg/svgexport.cxx
  sc/source/filter/excel/xelink.cxx
  sc/source/filter/excel/xilink.cxx
  svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx

All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage.  (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)

For friend declarations using elaborate type specifiers, like

  class C1 {};
  class C2 { friend class C1; };

* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")

* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".

Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace.  But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".

Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.

And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.

And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is.  GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>)  The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.

Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22 12:57:32 +01:00
Noel Grandin
fbb93bc159 loplugin:unusedfields
Change-Id: I1f69ec45e7d44e45a6ece1fe9d9eef8a2be2d6ff
Reviewed-on: https://gerrit.libreoffice.org/81361
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23 10:28:55 +02:00
Caolán McNamara
90e2f53ec5 assert on selecting text from end to start in shape with a11y enabled
Change-Id: I0a135236cf5e5f291b6289cc76228290a6f77e98
Reviewed-on: https://gerrit.libreoffice.org/78406
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-02 21:30:15 +02:00
Noel Grandin
7d7a7862a7 new loplugin:sequenceloop
look for places we should be using std::as_const on for-range
loops over uno::Sequence, to avoid triggering a copy

Change-Id: I7efb641bf09d37c87946f03428ee4eec90298c8a
Reviewed-on: https://gerrit.libreoffice.org/77441
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16 09:04:51 +02:00
Stephan Bergmann
4f2f0e6450 Improved loplugin:stringconstant (now that GCC 7 supports it): editeng
Change-Id: Id1ed8953803dde7ed0709d999ef8efe4eb055176
Reviewed-on: https://gerrit.libreoffice.org/76682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 12:59:19 +02:00
Arkadiy Illarionov
966f40eecf Use hasElements to check Sequence emptiness in [e-i]*
Similar to clang-tidy readability-container-size-empty

Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b
Reviewed-on: https://gerrit.libreoffice.org/71795
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-31 16:10:17 +02:00
Gabor Kelemen
3667031eb2 tdf#42949 Fix IWYU warnings in include/editeng/[f-x]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ic14d2e66434817bcb7bd1e2b707f81d720d596b6
Reviewed-on: https://gerrit.libreoffice.org/71007
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-23 12:12:46 +02:00
Gabor Kelemen
0eaa080408 tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f
Reviewed-on: https://gerrit.libreoffice.org/70710
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15 11:48:54 +02:00
Gabor Kelemen
00b49f9ff9 tdf#42949 Fix IWYU warnings in include/vcl/s*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 14:19:50 +01:00
Mike Kaganski
6b67f867cc tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I1027242192dfd2be4918094d59f2a8f8c8fec041
Reviewed-on: https://gerrit.libreoffice.org/63266
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-11 19:38:25 +01:00
Caolán McNamara
4219853f73 clarify this code a bit
Change-Id: I44066ad4f2e2374e87771de89bdefdbccc816302
Reviewed-on: https://gerrit.libreoffice.org/62095
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21 16:48:51 +02:00
Gabor Kelemen
8df9935dcb tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a
Reviewed-on: https://gerrit.libreoffice.org/60837
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-24 23:23:20 +02:00
Stephan Bergmann
206b5b2661 New loplugin:external
...warning about (for now only) functions and variables with external linkage
that likely don't need it.

The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

returns 1, both moving just the struct S2 into an nunnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    namespace { struct S2: S1 { int f() { return 1; } }; }
    int f(S2 s) { return s.f(); }
  }
  int main() { return f(N::S2()); }

as well as moving just the function f overload into an unnamed namespace,

  struct S1 { int f() { return 0; } };
  int f(S1 s) { return s.f(); }
  namespace N {
    struct S2: S1 { int f() { return 1; } };
    namespace { int f(S2 s) { return s.f(); } }
  }
  int main() { return f(N::S2()); }

would each change the program to return 0 instead.

Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17 09:05:38 +02:00
Gabor Kelemen
3fb5f7181d Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from dbaccess to extensions

Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59
Reviewed-on: https://gerrit.libreoffice.org/58165
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-01 09:49:07 +02:00
Arnaud Versini
84958e1a1b accessibility: more simplifiation in OCommonAccessibleText.
Change-Id: If1284f2e50be08372dda08a8250263c9ec435923
Reviewed-on: https://gerrit.libreoffice.org/51825
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 10:39:12 +02:00
Noel Grandin
4450b2a166 pass area param to DBG_UNHANDLED_EXCEPTION
and update sallogareas plugin to enforce this

Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a
Reviewed-on: https://gerrit.libreoffice.org/52249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 08:38:50 +02:00
Arnaud Versini
dd5df4ccb3 accessibility: simplify OCommonAccessibleText
Change-Id: Ied5520179d15f0a854c16b14f5a5e6b84cef1300
Reviewed-on: https://gerrit.libreoffice.org/51514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2018-03-25 12:57:21 +02:00
Noel Grandin
a498b12dc1 use more Color in editeng..forms
Change-Id: If6c862e7bb61cd78c3379afde11b528a74162900
Reviewed-on: https://gerrit.libreoffice.org/50860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07 08:35:04 +01:00
Noel Grandin
e2cb154195 convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 07:34:27 +01:00
Noel Grandin
72593849bb ColorData->Color in sd..svx
Change-Id: I70de56b6bfb1ea4655ec03510fad92bf6645f64e
Reviewed-on: https://gerrit.libreoffice.org/50046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21 06:05:41 +01:00
Stephan Bergmann
0728732e45 AccessibleEditableTextPara::GetParagraphCount no longer restricted
...to sal_uInt16, after 2af1f5691e "resolved
fdo#35756 import more than 64k HTML table cells".  Some checks against USHRT_MAX
had not been removed at all, while others had been changed to useless checks
against SAL_MAX_INT32.

Change-Id: If21d10426ee392ba3f0586dde766e3f7da99d214
Reviewed-on: https://gerrit.libreoffice.org/48769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-28 21:48:42 +01:00
Stephan Bergmann
2851dc3f5d Remove useless check against SAL_MAX_INT32
...changed from a check against USHRT_MAX in
3cbfcee36d "xub_StrLen and tools/string.hxx final
straw"

Change-Id: I8311803f9b5d1a78d8039d4810b0ae3cfdd27c53
Reviewed-on: https://gerrit.libreoffice.org/48770
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-28 21:48:16 +01:00
Stephan Bergmann
e120409015 nStart/EndEEIndex nned not be bounded by sal_uInt16
...it appears, since ESelection's nStart/EndPos have been changed to sal_Int32
with 3cbfcee36d "xub_StrLen and tools/string.hxx
final straw".

Change-Id: I3f3d77d6efeabef9f05b3a5233e0e5590b1ed365
Reviewed-on: https://gerrit.libreoffice.org/48767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-28 21:47:50 +01:00
Stephan Bergmann
54a8e708b4 More loplugin:cstylecast: editeng
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I09a4d688e6f3c1ecbe05a7d27ebd955e8ba1eb65
2018-01-12 20:25:09 +01:00
Mike Kaganski
4e144751f1 loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146
Reviewed-on: https://gerrit.libreoffice.org/46652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18 07:36:32 +01:00
Noel Grandin
3588a48a82 TypedWhichId
use a strong-typedef template to give which IDs a type, which we can
carry around to do a
(a) little bit more convenience when Get()'ing them
and
(b) a little bit of enforcement of which PoolItem subclass each ID uses

Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass
in AccessibleEditableTextPara::_correctValues

Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b
Reviewed-on: https://gerrit.libreoffice.org/44587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15 08:24:29 +01:00
Andrea Gelmini
d71bcc4dc5 Fix typos
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13 08:43:17 +01:00
Arnaud Versini
99872adcfb Remove OAccessibleTextHelper::getCharacter and getTextRange
Change-Id: Ib32e3ca6ba55ab99820a54023041247cea96ab0c
Reviewed-on: https://gerrit.libreoffice.org/44652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13 07:12:38 +01:00
Arnaud Versini
8d4a44d176 Remove OCommonAccessibleText::getText and getCharacterCount.
No need to create helper for those methods.

Change-Id: I0505fe8141b1bad852b7f30aeb69628fb6a90071
Reviewed-on: https://gerrit.libreoffice.org/44649
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13 07:09:02 +01:00