Age | Commit message (Collapse) | Author |
|
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>
|
|
... when converting from double, i.e. to 300 nanoseconds.
Empirically determined..
Change-Id: I92c43b5f244923363af5d44bece9c155126ca343
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155324
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
...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>
|
|
and move the hot fields to the front, since we hit this data
fairly hard
Change-Id: I852bd64557d586bc73ea64cdce9f5004e64dea93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154972
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(Second attempt at landing this)
Image formats and graphics APIs use alpha, not transparency,
so change our internal formats and data structures to work directly
with alpha, so we don't need to modify data before we push it to
graphics APIs.
Add a couple of new Color constants to make the intention
of the vcl code clearer.
Notes
(*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask
to more accurately reflect the requirements of the
CGImageCreateWithMask function seems to fix some
tests.
(*) The vcl code does not properly support gradients
with transparency. So the previous code was wrong, and this
change is going to result in slightly different wrongness.
Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ief1101c55a0635dac43a7c4d66dd4ed0d5be70bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154764
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>
|
|
Change-Id: Ia5e405fc05613726b5011174c8d00ca204eb31b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154352
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
|
|
Change-Id: If5bf1897f1aef8db1672789cbee14b90cb96dc08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151959
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154378
Tested-by: Jenkins
|
|
which will help avoid ambiguity in method calls in an upcoming patch
Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I516d3727cbcf6667b32dc963febbf4b753ef6a91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153497
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: Ibff595640fa219b3076d4f44ef18385f63af3e35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153456
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: If002e04536149b49b2249103ac914d17dec3fae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153409
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: Ica69b1a8916c73443d9ec91dd35ed126fcf97151
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153392
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: Idb93b3e9b4dcbd09ad7f4253a523fe5be24d0776
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153354
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: I73ea6e162c73382ba470a306ce2852dbff3d1314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153202
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
if we have intercepting 'image' when generating the json, then we
don't need to really insert the image into the server side TreeView
at all, we just need to provide it in the client json payload.
so we generate each bitmap once, and its base64 png representation
once.
Change-Id: I1b6916b036a0b84ef4346ebf2141240c4ae5b706
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152675
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
before:
|--13.95%--JSDialogNotifyIdle::Invoke
| |
| |--13.01%--JSDialogNotifyIdle::generateWidgetUpdate
| | |
| | |--11.03%--IconView::DumpAsPropertyTree
| | | lcl_DumpEntryAndSiblings (inlined)
| | | |
| | | |--10.94%--extractPngString (inlined)
after:
|--4.86%--JSDialogNotifyIdle::Invoke
...
| |--2.90%--JSDialogNotifyIdle::generateWidgetUpdate
| | |
| | |--0.76%--IconView::DumpAsPropertyTree
| | | IconView::DumpEntryAndSiblings
| | | Link<std::tuple<tools::JsonWriter&, rtl::OUString const&, std::basic_string_view<char, std::char_traits<char> > > const&, bool>::Call (inlined)
| | | StylesPreviewWindow_Base::DoJsonProperty
| | | |
| | | |--0.55%--StylesPreviewWindow_Base::GetCachedPreviewJson
Change-Id: Id234a84e36710794822945584be3adf028808625
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152630
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ie520b10baaeb4c94973c44435c3241e5d2254968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152345
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
... and use SvStream::WriteNumberAsString, replacing Write[U]Int32AsString
Change-Id: I10e56c532494239ed40ec01b6184dd06db463a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150193
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
WriteOString is a better replacement
Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Specifically in sd/source/core/annotations/Annotation.cxx
We seem to end up fixing leaks here often.
The current tools::JsonWriter API is just very hard to use correctly.
So rather return an OString, which is cheap to copy,
and push that down into the LOK code.
AFAIK that seems to end up requiring less code and less adhoc copying
of data (specifically the queueing code in init.cxx was creating
copies when converting to std::string).
Ideally, we could have some special API to avoid the new strdup()
calls in init.cxx, but not sure how to prevent other people
from accidentally using that.
Change-Id: Ia33437c1bfd9cc2d54dfb99914d1b72db20335f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0ca4a0fcf4f19bc26ae931bae0b2ee53db47f12c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149951
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic46012d64456a85255bfd91a98b642c59df210e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147890
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ib2bfaa903b5c57b7d802afe7928720e6007d54ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which is very hot here. Push it down into Fraction, where we can skip
the construction of boost::rational intermediate values
Change-Id: I7e5f18456a252a159d3a50e9297168e5ba9e1588
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141894
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use DELETE_ON_CLOSE attribute, so we can avoid calling osl_removeFile.
Shaves 5% off the export time.
Change-Id: I4fef8f181ef7a92c4805cc5996c3a17800a22602
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141718
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Its comment in include/tools/stream.hxx tells:
Switch to no endian swapping and write 0xfeff
It was introduced in commit 3c2105e07d29b2069349e1a54e08463d359f988f
Author Eike Rathke <er@openoffice.org>
Date Fri Dec 22 00:19:05 2000 +0000
new: read/write Unicode or Bytecode
and included a call to SetEndianSwap( FALSE ). That call was dropped
in commit 8130714148d58dd2bf1ef12dcc6dd6d5838be0d1
Author Noel Grandin <noel@peralex.com>
Date Mon Jan 05 08:47:31 2015 +0200
fdo#84938: replace NUMBERFORMAT_INT_ constants with 'enum class'
(likely by accident).
To simplify the fix, drop redundant m_nEndian: m_isSwap is enough.
Change-Id: Ia9a0fe2d55563e7ba21bd4cf17c4ca999c6feaf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141521
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I97292df52c50e73b3f0d4ee9b5f8134959f3b7e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
need to move it, because modules "below" vcl want
to use the debug output method
Change-Id: Ibcaf4089a1e0b3fcc0b5189c7ebf1aae90f50b48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139791
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>
|
|
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now. Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)
Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.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>
|
|
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
EmbeddedObjectRef::GetGraphicStream() creates a writable
SvMemoryStream, read the graphics data into it and then returns
the stream, which will be afterwards used to decode the graphics.
But if the data is broken, incorrect seeking may cause a seek
way past the buffer, and since the stream is writable, it would
be done and cause problems such as running out of memory.
The VersionCompatRead class is one such place that reads size
from the stream and then seeks based on the read data.
Add SvMemoryStream::MakeReadOnly() that will change the stream
to be read-only after the initial read of the data into it.
Change-Id: I1d44aabaf73071a691adafa489e65e4f5e3f021d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137002
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.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>
|
|
ZCodec uses zlib to deflate. That file has code
to allow for compressing to GZ but it's wrapped in defines.
There's places in code where there's need for zlib headers
(ie. svx/source/gallery2/codec.cxx:71) and there will be need
for gz header compression when EMZ/WMZ/SVGZ export support
is added.
Made compression functions care about mbGzLib bool. Also added
a SetCompressionMetadata function to set metadata which are otherwise
impossible to know (such as filename, which is needed in the header)
Change-Id: Ic01050262b0b15e0632564b139c66656afac4611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135213
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ib89ab59f7ad7e90b2a44ddd122176cde904fba4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135520
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... 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>
|
|
(In MultiSelection::LastSelected, there is no need to set nCurSubSel (to a
potentially negative value) before setting bCurValid to false, as nCurSubSel is
only ever used after checking that bCurValid is true.)
Change-Id: I3c23c89fbb7b4ef962436476f6576af9fe623fd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135354
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ib6ff202f5556f3342fb4e60de7e16b5107669319
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135037
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which requires a version of replaceAt for OUStringBuffer, which I'll put
in comphelper::string:: for now
Change-Id: I70b319b018e29a7dac26965dd92f6c4f9ea470ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and use it where possible
Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
- Added .emz and .wmz file opening support
- Added a function to check for Z compression that
all z comp. formats can use
- Added 3 unit tests for emf/emz/wmz files
and the example files have been checked with
a different tool (File Viewer 4)
- emf/emz file detection changed from magic byte checking
to extension checking, like wmf/wmz does
Change-Id: I3e433fd23d18482648a51cd04b8f467368e97b62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132456
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
There is just no good reason not to use a css::uno::Any constructor instead, so
simplify the code base. For URE backwards compatibility, keep it around as
deprecated for !LIBO_INTERNAL_ONLY.
Change-Id: I9409d8853cac270d47377a31ba35a1fc23fa9800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133879
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|