Commit Graph
1005 Commits
Author SHA1 Message Date
Noel Grandin d55e0fbde4 Revert "remove BigInt::operator tools::Long()"
This reverts commit 1397a1c8e4.

Reason for revert: Some discussion required

Change-Id: Id39ee8260790e0722c5bf8338b0b76ca34da83d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105539
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-13 13:38:26 +01:00
Mike Kaganski 8927bea9fa Simplify comparison operators
Change-Id: I9f1b386ddb4d7d5377151c54baee207b2444c7d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105541
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-12 19:14:41 +01:00
Noel Grandin c45753847d Revert "remove Fraction::operator tools::Long()"
This reverts commit 48b667a7e7.

Reason for revert: some discussion required

Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12 16:53:22 +01:00
Noel 1397a1c8e4 remove BigInt::operator tools::Long()
which was introduced in
    commit adf0738d2d
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Wed Jan 3 14:25:15 2018 +0200
    long->sal_Int32 in BigInt
presumably to make the conversion easier.

Instead just fix the call-sites to select a better
conversion, BigInt only returns 32-bits of precision
anyway.

Change-Id: I2e4354bcfded01763fe3312a715ef37800297876
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105602
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12 07:37:38 +01:00
Noel 48b667a7e7 remove Fraction::operator tools::Long()
which was added in
      commit 331e2e5ed3
      Author: Noel Grandin <noel.grandin@collabora.co.uk>
      Date:   Thu Sep 14 08:49:52 2017 +0200
      long->sal_Int32 in Fraction
presumably to make the change impact less code.

Instead, update the call sites to reflect the actual bitwidth
of the data we will be receiving.

Change-Id: If2a678b1cf534f39cb8cb249757462be53658309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12 07:37:13 +01:00
Andrea Gelmini d08fad0f08 Fix typo
Change-Id: Ie75e42e278a32d3a4130ec65a1ed05265fbc6f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105599
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-11 15:55:29 +01:00
dante f3b52717e8 Improved starmath color
Color.hxx has now documentation ( even if it is quite obvious if you know RGB standar ).
Color.hxx has been reordered in more coherent order, but kept format.
Some changes on Color.hxx dynamics.
Color.hxx starmath colors list
Now colors are managed by starmathdatabse.
The path is open for simple addition of colors, there are no more infinite switches with color tokens here and there.
To add a color, just put it in Color.hxx and register it in starmathdatabse.cxx. Do not forget to change array size in starmathdatabase.hxx.
Now mathml supports RGB colors in #RRGGBB format ( import and export ).
New colors have been added. Only the HTML Css1 are available via UI.
New colors will be added. I intend to finish Css2 and dvipsnames ( latex colors ) on posterior patches.
RGBA command has been unlocked for compatibility reasons. However will be displayed as RGB.
Added color #RRGGBB.
Improved qa color test on mathml to test RGB on mathml.
TODO for someone on the UI team:
  - Add a color picker.
  - If it is a color with name:
    - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" "
  - If not:
    - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" "+ colorvalue.getRed() +" "+ colorvalue.getGreen() +" "+ colorvalue.getBlue() +" "
    - Note that those will habe eType with value TRGB or TRGBA.
Change-Id: I47af37bd191b3099e8e6e08e7a5fb1a8a227bbf2

Change-Id: If971473ddcc34739439818dba9a62ca3494a4473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11 06:51:22 +01:00
Noel Grandin 3d90997fb6 make tools::Long 64-bit on Windows platform
This is only for the 64-bit windows platform.
I don't see the point in messing with the 32-bit platforms, they are
(a) become more and more rare
(b) unlikely to even have enough available process memory to load extremely large calc spreadsheets

The primary problem we are addressing here is bringing
Windows-64bit up to same capability as Linux-64bit when it
comes to handling very large spreadsheets,
which is caused by things like tools::Rectangle using "long",
which means that all the work done to make Libreoffice on 64-bit
Linux capable of loading large spreadsheets is useless on Windows,
where long is 32-bit.

The operator<< for tools::Rectangle needs to be inside
the tools namespace because of an interaction with the cppunit
printing template stuff that I don't understand.

SalPoint changed to use sal_Int32, since it needs to be
the same definition as the Windows POINT structure.

Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11 06:34:17 +01:00
Mike Kaganski f37b87ea5c This converts to/from mm100s, not twips
Change-Id: Ie13e38c78b5e9a65b0dc572628f4fcc93b2c2a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105530
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-10 15:43:19 +01:00
Mike Kaganski 373c8b46e6 Don't use arbitrarily truncated pre-calculated constant
Change-Id: I384151afacb83790f707f9b05e0142234e6e1adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105467
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-10 11:13:38 +01:00
Miklos Vajna ada07f303e tdf#123476 filter: try to detect 0-byte files based on extension
A 0-byte ("empty") pptx file is obviously junk input, so it's not
surprising if the catch-all generic_Text filter is chosen to open it in
Writer at the end.

But we can do better: if we really get an empty file URL with an
extension we can recognize, that we can fake the filter type / filter
name, so the empty "presentation" opens in Impress, and also a re-save
works as expected.

This builds on top of commit 8a201be240
(fdo#68903 Import .tsv and .xls plain text files in Calc by default,
2013-10-27), just the new way works for all supported file extensions
and also with filters which would not handle empty input (e.g. pptx
refuses the import if the ZIP storage is broken).

Change-Id: Ie01650a5eb6ca42c35e090133965467b621bb526
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104939
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-10-28 19:34:45 +01:00
Noel Grandin 371b84dcb6 std::set->o3tl::sorted_vector in MultiSelection
Change-Id: I88a77f4b07e5aaccc42e6fb6e5bd0366f57381a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104899
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28 07:57:50 +01:00
Noel Grandin 0fb58a1ff1 new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase,
but also to make it obvious which units are being used
for angle values.

Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21 08:13:05 +02:00
Noel 2646023729 add tools::Long typedef and use it in tools
first step to switching long to a 64-bit type on 64-bit windows

Change-Id: I640d807426dfe713c7a8984ef560575f8288dbeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104516
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-19 12:56:30 +02:00
Caolán McNamara 2e412c5354 WindowType::CALCINPUTLINE newly unused
originally introduced by...

commit cba0dad456
Date:   Wed Jun 13 14:08:28 2012 +0200

    calc input line: Fix crash with accessibility enabled.

Change-Id: Iee0914b79d3b48f4479e62622fbdb5dbdf26d527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104356
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-16 12:54:34 +02:00
Noel Grandin 5cb62b13ca revert recent Polygon commits
This reverts
    commit 0cabffc05f
    tools::PolyPolygon -> basegfx in canvas
and
    commit 2c5d5a6d55
    tools::PolyPolygon -> basegfx in filter

Comment from quikee:
The interpretation of integer polygons and floating point polygons
(or any other float vs. int drawing primitives) are different,
so you have to be really careful when changing, that the result
after the change is still the same. A big problem is that we still
have the metafile in OutputDevice, which is completely integer based
- so there will be conversions that go from int representation to
float representation to int again and to float (because backend is
in floating point) and I really fear that because of this there will
be regressions and even if not, it could make changing later more
painful. This is the reason I wouldn't change these things without
having tests that would show when there is a difference in rendering.

Change-Id: I54addca4e5a72196b5f77f6c7689eb716451c1dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103483
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26 17:39:33 +02:00
Noel Grandin 0cabffc05f tools::PolyPolygon -> basegfx in canvas
Change-Id: I7b5ac7b434932515895bf60acfa0109e6a2ebd18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26 13:00:23 +02:00
Noel Grandin 2c5d5a6d55 tools::PolyPolygon -> basegfx in filter
which needed an extra method on OutputDevice.
Also add some utility methods to make future conversion work easier.

Change-Id: I57c5bc7505e656a014f2e723fea2aa79271e6515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103415
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26 08:45:44 +02: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
Stephan Bergmann e5356fb099 [API CHANGE] Drop OSL_THIS_FUNC, directly use C++11 __func__
It had been documented as "the macro OSL_THIS_FUNC is intended to be an office
internal macro for now", so take the liberty of removing it, even if technically
that can be considered an incompatible API change.

Change-Id: I7580a932e1da54845934378a650e894f3f3a9062
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101406
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-26 20:49:22 +02:00
Andrea Gelmini bcf8868e03 Fix typo in comment
Change-Id: Iacc4791157674fde0c2b76b024a7deceb2159e46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101011
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2020-08-20 09:39:03 +02:00
Noel Grandin 1aa46b95bf remove now unused DELETEZ macro
Change-Id: I67c51424db1302aaffc78389466f680952045326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100625
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14 08:29:17 +02:00
Gabor Kelemen 32090b018d tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxx
Recheck after 7-0 branchoff

Also drop the now unused file include/vcl/field.hxx

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-08-03 10:23:10 +02:00
Noel Grandin 7b14b4b377 remove some dead WindowType values
Change-Id: I7eb67e48a87e8cc2babbd46d482294877b08ab99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-03 13:24:18 +02:00
Noel Grandin b8f5094c3e loplugin:constantparam
Change-Id: Ie9d4761747f7e97f63f34394b5a8b9f0bb287a0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97528
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01 08:31:53 +02:00
Noel Grandin 01e37e3e56 use tools::JsonWriter for dumping property tree
Change-Id: I8f55af19ba10b71bd621e69b27000ab7cb565309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96677
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25 10:16:37 +02:00
Tomaž Vajngerl 7ee6fa6487 Add test as an example how to add CPU intrinsics support
Also makes sure that if the CPU dataction or compiler detection
doesn't work correctly, the test could potentially crash.

Change-Id: If0862c0a736c8e1f5ba1117b248918e4c1fb2f4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96779
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-24 08:47:30 +02:00
Noel Grandin cb95276e6e use JsonWriter for the rest of ITiledRenderable
and fix bug in buffer reallacotion where mPos pointing
at the beginning of the new buffer instead of at the
correct index inside it.

Change-Id: Ie1ffaa176f6165e2cec85c93adc945312eff38e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96650
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-20 21:25:11 +02:00
Noel Grandin 8df7447139 asan: need to use malloc instead of new for tools::JsonWriter
because the LOK API expects memory returned from those calls to be
malloc'ed

Change-Id: If6fbfb60c433bd6e58bc90a9a90a90663e2e1c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96676
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-19 15:38:52 +02:00
Andrea Gelmini 1c07dbe966 Fix typos
Change-Id: I887a86506b700a21b56bbc66d8b3b2e1bcec0da5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96651
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-19 09:06:38 +02:00
Mike Kaganski 392b0d1f04 Add missing header after c8bed6445b
Change-Id: I24d354d8d781da3944044a2895e7d9163c31076f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96601
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-18 16:44:49 +02:00
Noel Grandin c8bed6445b new json writer for LOK
we shave about 3 memory copies off in the process, and
make the class play nicely with our string types.

Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96393
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-18 10:54:10 +02:00
Tomaž Vajngerl 8ca89dc44a fix reseting WeakReference when moving a ref to another ref.
In ViewIteratorImpl::Reverse we std::move a reference, to a local
variable, however the reference was not reset correctly, which
caused a crash.

The issue is that a mpWeakConnection in WeakReference always
needs to be non-null as shown in reset(reference_type* pReference)
method. In the move constructor of WeakReference, we just std::move
the reference like:

mpWeakConnection = std::move(rWeakRef.mpWeakConnection);

This means rWeakRef.mpWeakConnection will be reset to null, which
is not what is expected, so what is missing is to instantiate
rWeakRef.mpWeakConnection by calling reset(nullptr) or using the
added reset() method.

This also adds a test for LOKit PDF search as this is the case
where the crash has been reproduced. It happens because of a
call to:

... std::move(maPosition.mxObject);

in the method ViewIteratorImpl::Reverse()

Change-Id: I43692554ba4f6231d00091269b7c902ab5cbc11f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95995
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-10 15:58:16 +02:00
Tomaž Vajngerl 5f8f8889a4 vcl: add conversion point to twip int64 & double values
Change-Id: Id54d28b57c055269259317521f59d37dcdf9a456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95274
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-01 18:46:13 +02:00
Tomaž Vajngerl 0e29e9ea7f vcl: add conversion point to 100th mm for double values
Integer conversion throws away percision, which is problematic
when we work with floating point values.

Change-Id: Ib34e46bd59aa67e933d49bc800e96cc6426414e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95260
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-01 12:21:37 +02:00
Caolán McNamara 9c36f071b1 ofz#22222 avoid calling DbgGetCaughtException if unnecessary
Change-Id: Ia48240d2c0218ac3b790c78f458896a90c586869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94304
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-27 17:18:52 +02:00
Caolán McNamara befaaa3165 WB_LISTBOX_POPUP is newly unused
Change-Id: I97a52499e1fda8a9426e6956e3e925e0572c41ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94886
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-27 10:08:00 +02:00
Samuel Mehrbrodt 9c4048b188 tdf#79082 Improve ppt tab import/export
Import/export the paragraph tabs without any text offset,
tabs are relative to the text box anyway.

Change-Id: Ife3b762e7581548e65500c16259a4481cc07a88f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94101
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-14 09:59:11 +02:00
Henry Castro 2a694f9e0e lok: fix the window type of the formatted field control
Change-Id: Iab87c94ca19314eacec18e71d7d09ba42f1756e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93586
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-11 02:30:41 +02:00
Noel Grandin 366d08f2f6 new loplugin:simplifypointertobool
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10 12:02:44 +02:00
Tomaž Vajngerl 09e2800837 move unit conversions to UnitConversion, add convertPointToMm100
Change-Id: I3e5a4632e9809562885c1e0ec5c5262acec145d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93332
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-03 11:10:04 +02:00
Noel Grandin 47cd34a60f use more compact namespace syntax in /include
excluding the UDK headers of course

Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-03 09:21:51 +02:00
Gabor Kelemen e12fa18c69 tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/
Turns out we can save about 500Mb of preprocessor input if we use
rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper
rtl::math::approxEqual from rtl/math.hxx

and manage the fallout accordingly.

Before:
bin/includebloat.awk | head
sum total bytes included (excluding system headers): 19017296671

After:
$ bin/includebloat.awk | head
sum total bytes included (excluding system headers): 18535432672

Change-Id: I1691171f3a309405a7099882ad9989d147f59118
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-22 15:36:50 +02:00
Noel Grandin df4c562ac6 add tools::Rectangle::Justify
so rectangles can be constructed already valid

Change-Id: I3ae5e24add3c81f79dcdf863f855dca439876f11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92521
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-20 10:47:44 +02:00
Noel Grandin d7855213ae add an IsEmpty method to tools::Size and use it
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15 16:08:51 +02:00
Noel Grandin 301133e0a8 loplugin:singlevalfields
Change-Id: I69c5b28636806e45d7ba5d8c4678caeda09caa50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 09:02:21 +02:00
Noel Grandin 0115964362 make more classes private in mergedlibs mode
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-23 12:05:36 +01:00
Noel Grandin 34ea5c21a7 add operator* to tools::WeakReference
which fixes warnings from
    commit ef37ab245b8095895f715217236e8e2fb90613c6
    Date:   Thu Mar 19 09:21:45 2020 +0200
    loplugin:redundantpointerops add some more smart pointer types
which I pushed earlier, where I added tools::WeakReference to the list
of smart pointer types, but of course the conversion it recommended is
not possible without an operator*

Change-Id: I9433b7aba46a3a15f9d833847ae3659367388109
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90735
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-19 11:03:42 +01:00
Stephan Bergmann 498a39e518 tools::WeakBase still needs to be TOOLS_DLLPUBLIC under --enable-mergelibs
...plus --enable-assert-always-abort:  ShapeManagerImpl::checkForImageMap in
slideshow/source/engine/slide/shapemanagerimpl.cxx in Library_slideshow calls
SvxShape::GetSdrObject, which calls tools::WeakBase::get
(include/tools/weakbase.hxx), which contains

> assert(dynamic_cast<reference_type *>(pWeakBase));

requiring RTTI for tools::WeakBase.  See e.g.
<https://ci.libreoffice.org//job/lo_tb_random_config_linux/2281/>.

Change-Id: I9598c14bf74eb5a28332d0beecfbe8201b39451e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-18 14:08:49 +01:00
Noel Grandin c42cf09f17 Revert "loplugin:constfields in tools"
This reverts commit 833c4965fc.

Change-Id: I130a91538627f9e83d94615e2ddd48da5a075d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-15 16:28:03 +01:00