Age | Commit message (Collapse) | Author |
|
test drive the new bin/find-unneeded-includes --fwdecl mode
Change-Id: I507fa2b172ec9e348d1d91066ea241f02187b5ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179321
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I005257e458351285b1b35ffe49c8b42834a6db68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156990
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
Avoid reinterpret_cast; drop unneeded 'using'; deduplicate some code
Change-Id: I9c39552b0ccaa45344808e02ad89b21a42766784
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155761
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...to avoid
> In file included from tools/qa/cppunit/test_rectangle.cxx:10:
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:59:18: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'const tools::Rectangle' and 'const tools::Rectangle') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
> return x == y;
> ~ ^ ~
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:166:30: note: in instantiation of member function 'CppUnit::assertion_traits<tools::Rectangle>::equal' requested here
> if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
> ^
> tools/qa/cppunit/test_rectangle.cxx:70:9: note: in instantiation of function template specialization 'CppUnit::assertEquals<tools::Rectangle>' requested here
> CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
> ^
> workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:333:17: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL'
> ( CPPUNIT_NS::assertEquals( (expected), \
> ^
> include/tools/gen.hxx:817:18: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
> bool operator == ( const RectangleT& rRect ) const
> ^
when building with -std=c++20 (cf.
<https://gerrit.libreoffice.org/c/core/+/155121> "Bump baseline to C++20")
against at least Xcode 14.3.1.
It was presumably an accidental oversight that
b6b26421a1029b18b48b69dbdac4bb70fb622604 "split Point/Size/Rectangle into
AbsoluteScreenPixel* types" made these operators asymmetric in the first place.
Change-Id: Ic1f08b79fbd727d972ce95c3f21eab3a2a74f942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155221
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
to attempt to make it obvious in code what kind of coordinate
system we are dealing with.
The idea is that by doing this, the compile-time type checking
will flush out inconsistencies between different code.
I started with vcl::Window::OutputToAbsoluteScreenPixel
and worked outwards from there.
Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Remove our own Rotate function by calls to Tools::Point's
RotateAround method.
Add a comment on RotateAround to emphasise that the point rotated
is the parameter and the This object is used as the origin.
Using TOOLS_DLLPUBLIC to fix link error (as suggested by Arnaud)
Added tl to slideshow (from Neil)
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Change-Id: I296bbdf910d262401bfa18f0fc4f431b9e79b8f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Jusify() normalizes the rectangle so both the Width and Height are
positive, without changing the location of the rectangle. It ensures
that the x and y coordinates will be moved to the top left of the
rectangle.
The name is strange, so renaming Justify() to Normalize().
Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I01df93aa825ab7a023cd4beb385b5fb41c2847ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137389
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Also updated debug pretty-printers
Change-Id: I5204bb8f1c6a47677ad3c49d6579c090ea69aedc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137388
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Ie34bc66eb1dc475566b315db698976913c8aa37b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137390
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
By default Rectangle uses closed interval, if we really want to use half
open intervals then we should specifically say as such in the name.
Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
... and inline the functions.
Change-Id: I9285c72e8524f8f0a2d242bfd4cd29edf6d1ed73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135811
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
... and use it to remove a duplicate and simplify code.
Should mostly be a refactoring, which was mainly done by some
larger sed calls, except for the new API calls, which helped
shrinking some LOC. All data is also now private.
Originally two of the "replaced" "classes" had unsigned width
and height and one had signed. Noel pointed out, that during
calculations, the value might get negative temporarly, so this
now settles with signed values. Still the set size should never
be negative and this is enforced this way. Not sure that is what
Noel had in mind.
This also includes:
- rename WindowState => WindowData
- rename WindowStateMask => WindowDataMask
- rename WindowStateState => WindowState
- move WindowState and WindowDataMask to vcl/windowstate.hxx
- move WindowData(Mask) and WindowState into vcl namespace
- readability: replace or'ed WindowState enums with "meta" enums
+ add "meta" WindowState enums PosSize and PosSizeState
Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
... and add GetPos() as TopLeft() alias.
Change-Id: Ia2c169d40ed121e829802835011648281f48f585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135424
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
The mapmode also affects the layout of the glyphs.
Change-Id: I9492bc4d3d9e991ef8ab5dc30ce424e44cbc79f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132822
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I12c25838e8eec8d05e43b593790847c626edde31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124638
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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
|
|
581b2cf7960c48e cleaned up some usage of the class and removed
getX()/getY(). But that means that the (probably most) common case
of treating rectangles as x,y,w,h now doesn't work, and one has
to use either left,top,right,bottom (which doesn't always mentally
fit), or the IMO weird left,top,width,height.
Change-Id: Ie9516f69af48490635346c76821be9a9eedd686c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121079
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I225688ee50b87c5019f83060ec8bbf614df6174f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120744
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
|
|
... instead of using confusing/ambiguous size having two interpretations.
This reverts some of the unit test changes made in commit
fa339b3adb53300ae68913bed87e18caf9f2e262.
Change-Id: Ic56417703e32c1d92bcee76ad8ff494824bd4a1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120564
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
... to align with commit 4639ca2f878b04ffc50d9c20d92e90464d2d67a7
Change-Id: Ibec7a451a61ca7f2d141a9624369a6f9656ed468
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120562
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I535fb70fa532d98542ac30e0b2053bdaa6b94383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120494
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
(alinged to SetSize)
Change-Id: I123a584ead91faae0fec4d25938529b2d68e4a3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120559
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I856194f26fefad993f416d7b92b57a9417a3c0a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120546
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The change allowed to simplify many places where previously this API was
used, to avoid inefficient calculations (e.g., moving rectangle keeping
its size, and then immediately changing the size).
Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
1. Simplify/delegate ctors
2. Simplify getWidth/getHeight
3. Simplify expand
4. Simplify operators += / -= / + / -
Change-Id: I023aa1bb2905394fbbd29adc7c544d629f9ae2d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120476
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Make the methods use Left()/Top()/Right()/Bottom(), allowing to
avoid explicit checks for emptiness.
Also do not use std::min/max in *Center(), so that e.g. TopCenter
returns top value the same way as TopLeft and TopRight do.
Change-Id: Ie1edd7a0ab7e32b4f98d0c2fb3917ce2902bdf7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
When a rectangle is written to a string stream (usually used for
representation string in CPP unit tests) we used getWidth and
getHeight. It turns out that this methods don't return the correct
value for width / height (off by one) in many cases so instead we
need to use the upper-case variants GetWidth/GetHeight.
Change-Id: Id655236155f94e092d9e9c24f9bd6857e9b0a558
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119489
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Iabe16cee8fe0b32d262be7066a036a305878cf39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114595
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This makes it easier to convert between units when they are used
in Point, Size and Rectangle classes, which we use a lot in the
code where conversion of units is needed the most.
constexpr some function on Rectangle as this is needed for the
convert.
Change-Id: I5c7e7c8637e4c9327dd55025be19b8f3f391f395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114634
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
If they exist for tools::Point, I don't see why they couldn't
do the same also for Size.
Change-Id: I02ca1bb413b0bd2694a904372e9a18a7a50be17b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113725
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I4aebf90bba7944f2f8e33312120f8714a8a1c2e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113724
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
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>
|
|
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>
|
|
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>
|
|
This reverts
commit 0cabffc05f3b40f5ee897df73475e09a3c05fc7
tools::PolyPolygon -> basegfx in canvas
and
commit 2c5d5a6d55a1ebd153f05523972a2c625484bde2
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>
|
|
Change-Id: I7b5ac7b434932515895bf60acfa0109e6a2ebd18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and speed up the script using python's multiprocessing module
Change-Id: I01e1350937a0531e26603d6357982c91f3bcef0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90107
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iae489fc31b13b836e1df5327ba2fa07e0325907a
Reviewed-on: https://gerrit.libreoffice.org/79793
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
LayoutConverter::calcAbsRectangle needed to be tweaked because
we now end up with a zero width/height instead of a large
negative number.
Change-Id: I81f04759a1d5bf6f44753a1701596796fad40567
Reviewed-on: https://gerrit.libreoffice.org/75610
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5c7565309d380cdbe60a078d2c97f7dd1fae4274
Reviewed-on: https://gerrit.libreoffice.org/75517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia424b91149245907b045b43aa31a622e34e6e5bc
Reviewed-on: https://gerrit.libreoffice.org/75504
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
I tried making this assert, but there are just too many places where we
pass around empty rectangles, so rather just return the value of nLeft,
in a similar fashion to methods like Rectangle::TopLeft
Change-Id: I3377071ecae26f13e895ae411cd269f0bdbe0ef6
Reviewed-on: https://gerrit.libreoffice.org/75486
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and make non-inline so it is easy to disable this for debugging, if need
be
Change-Id: I6feb94ca2f24246b96757575288c86c0b0c54227
Reviewed-on: https://gerrit.libreoffice.org/75342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and make non-inline so it is easy to disable this for debugging, if need
be
Change-Id: I2beae23bbdea36e91e0e367f9a94cbc35be3cd24
Reviewed-on: https://gerrit.libreoffice.org/75337
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|