Age | Commit message (Collapse) | Author |
|
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Makes code simpler, and std::span can be constructed from std::vector
too.
Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so we get bounds checking in debug mode
Note that I cannot just pass around the std::vectors
involved because there is a place in editeng which
calls with a subset of a vector.
Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
I have moved the header file to include/vcl/rendercontext as this will
eventually be part of the RenderContext split from OutputDevice.
State and associated enums have also been moved to the vcl namespace. I
have also moved ComplexTextLayoutFlags into the vcl::text namespace.
Change-Id: I0abbf560e75b45a272854b267e948c240cd69091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I48e6fb31df732805423b89ed91b6e4363a69b668
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121150
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72
Author: Caolán McNamara <caolanm@redhat.com>
Date: Thu Jul 29 20:49:29 2021 +0100
convert TextAlign to scoped enum
lets leave this as it always was
Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9f8fe250813f4f376dc46c6f3d7e25e90fdbb50e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
mostly by doing
$ git grep -l '#define.*\"' -- *.cxx
| xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'
Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I651858d71e378341205d6a785bd97f294664a439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116737
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
as part of a longer-term goal of doing our
widget rendering only inside a top-level render-
context.
I moved all of the OutputDevice-related code that existed in vcl::Window
into a new subclass of OutputDevice called WindowOutputDevice.
Notes for further work
(*) not sure why we are getting an 1x1 surface in
SvpSalGraphics::releaseCairoContext, but to fix it I clamp
the size there
(*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice
(*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code?
Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
- Line width should be scaled by the scaled vector, not just its X
component (see VclMetafileProcessor2D::getTransformedLineWidth()).
- Lenths of dashes should not be scaled by the scaled line width,
but by the scaling.
Testcase document sd/qa/unit/data/pptx/tdf134053_dashdot.pptx .
Change-Id: I4116f82e91620f5612f5e4e187468508f683b93e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115147
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
An attempt that did not find anything convincing enough to finish it up
and make it permanently active.
So just leave it in /store for now.
Change-Id: I1750e177655a4a510da100f880ba81bf762be277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114742
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
So that we have fewer cases to deal with when we transition to
32-bit bitmaps.
(*) rename maMask to maAlphaMask, since now it is only being used
for alpha duties.
(*) drop mbAlpha and mbTransparent to simplify state management,
the only thing we need to check for alpha is if maAlphaMask is
non-empty.
Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Some presentation animations temporarily cause extensive zoom matrix
and Cairo doesn't take that well.
Change-Id: I1eb6d63fc2dcde6553bc8cc7ab967532d085a579
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114344
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
IRC chat:
<quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap
has the same problem as Graphic and the reason why you dropped that
commit 7334034ae93b49fc93b5859a3c047a319d138282
"drop Graphic::operator bool"
<noelgrandin> quikee[m], hmmm, good point
<noelgrandin> maybe I should just drop both operator bool and
operator! in favor of IsEmpty
<quikee[m]> noelgrandin: I don't remember what the problem is I just
remembered we dropped it Graphic :) sure, dropping everything for
IsEmpty is probably the best
Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I77e4d29b2911bb86c383afbf977d241eaa8cd341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111307
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic802d6593db053bb31c3463e67b63399b5f26d67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111001
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic3006e3f73c5b1233076706d5982fefe12b8d511
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: If7f47cf6dad860e4f8eab68931b72a38a7eda136
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107362
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
It is by now practically unmaintained, even bugreports in bugzilla
have been already closed for it. AFAICT this used to be really
used only on Windows, where it's no longer the default.
There's still some OpenGL code left, because there are still two
other places that use OpenGL. One is OpenGL slideshows, which
reuse some of the base OpenGL code (and I've checked they
still work even after this removal). Second one is OpenGL canvas,
which it seems has never been finished or enabled (or so it
most probably should be dumped too).
Change-Id: I7ea5aef77ec252eb8e712d167db591209be84a13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107290
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
The values returned from GetNativeSurfaceHandle are only used in
cairocanvas::CanvasBitmap::getFastPropertyValue
(canvas/source/cairo/cairo_canvasbitmap.cxx), whose consumers in turn are (at
least the ones I could identify):
* OGLTransitionerImpl::setSlides
(slideshow/source/engine/opengl/TransitionerImpl.cxx), passing the
values on to X11SalObject::SetLeaveEnterBackgrounds, which extracts the
Pixmap value to pass it on to XSetWindowBackgroundPixmap.
* X11SalBitmap::Create (vcl/unx/generic/gdi/salbmp.cxx), which extracts the
Pixmap value to pass it on to X11SalBitmap::ImplCreateFromDrawable (as a
Drawable) and to XFreePixmap.
While Pixmap XIDs are apparently 32-bit in the X11 protocol, see e.g.
<https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html>, Xlib and the
underlying /usr/include/X11/Xdefs.h appear to be somewhat confused whether the
typedef for XID should be unsigned long (presumably stemming from times when
long was universally 32-bit) or CARD32, see e.g. <https://gitlab.freedesktop.org
/xorg/proto/xorgproto/-/blob/master/include/X11/Xdefs.h>. So conservatively
stick to a 64-bit type here, even if it should only ever contain 32-bit values.
Change-Id: I26c3a2ff74cef092042a6e3648cd9a6f4a9e3aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105144
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ide9811c1a7582454b3fcf655b70ea106ed56509a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104914
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608
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>
|
|
Regression from commit 78036f74fa74ee2552e79064660634e1342692ff
(tdf#135094 cairo canvas: fix black slide containing a very small image,
2020-08-14), we try to predict when cairo would end up in an invalid
state due to an invalid transformation matrix, but in this case we were
too aggressive, so the image was missing while presenting.
Fix the problem by allowing negative sizes, just require that neither of
width/height is zero, because negative values are poor, but valid way of
vertical/horizontal flip.
[ No testcase, our tests are typically headless and currently
SvpSalGraphics::SupportsCairo() reports false, so this would be tricky
to test. ]
Change-Id: Iaf843c0d40c108d5221c9b94b39d617e4d50f65c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103127
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This commit was carried out by a Python script, source of which
is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97.
Change-Id: Icd712adf20fa2dbaaea2fc33a0fd870c8595b7e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100147
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
Don't paint when the area would be 0, that would not be visible anyway,
and the _cairo_matrix_to_pixman_matrix_offset() call would fail with
CAIRO_INT_STATUS_INVALID_MATRIX in _pixman_image_set_properties(),
failing the render of the whole slide.
Also, warn in case the painting fails, so the next time something
breaks, it's easier to find the problematic place.
[ No testcase, our tests are typically headless and currently
SvpSalGraphics::SupportsCairo() reports false, so this would be tricky
to test. ]
Change-Id: I7cdb9462ff8155232ea51abf321b365c2219575b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100743
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
look for expressions like
!(a && !b)
which can be expanded out
Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iecdbbec18a8d88872878a8fa9a17f7040677384c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99863
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
regression from
commit 1cd0e02cdf7fc5b5903320ffd24865d11465d14b
cairo/canvas: create instances with uno constructors
Change-Id: I4d09f8d68a24b0efa47d12df1c542f2953efed3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98530
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#74608 for motivation
Change-Id: I02411b23136051bfd0cd02d5378297f99127017f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...as discussed as an open TODO in the commit message of
fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for
libstdc++ std::shared_ptr". The necessary changes across the code base have
been done fully automatically with the rewriting plugin on Linux. (All those
changes apparently involve uses of macro arguments wrapped in parentheses in the
macro body, but always in conditionally-converted-to-bool contexts. In other
contexts, such automatic rewriting would add the "bool" to the macro body, which
would be wrong in general, but we apparently get away with that sloppy coding
for now.)
The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had
introduced to treat such (then-undetected, it had turned out) parenthesized
cases now turns out to not be needed after all.
Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95010
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I3234509406989661a2e5d3866bee057c17984437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94738
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I0dc88b1e7c6c1ac336bbfb772c8ebced5e1b432c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94737
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
this wasn't true at the time the canvas text rendering was written
but it is true now so its better now to just simplify this to using
the vcl text rendering to render the text through cairo
Change-Id: I1e63496e03e2cedc3e36e2bf10b0eab90a549629
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94736
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
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>
|
|
Change-Id: If14af63ab4f8fc7b9807319a2100f371ee103465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92481
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3077e6e3a043401e66cd527c5f69b8571e8b25d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90915
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
|
|
Change-Id: Iaa00cff88ad756b7e084cc68fe744d387328180b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iaf46b42a17bc00da0f86daeafea7b5346c4a6360
Reviewed-on: https://gerrit.libreoffice.org/85372
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Related to tdf#93870.
Change-Id: Ie0cb64c05c0fde6a774ce8558d06943870e775fe
Reviewed-on: https://gerrit.libreoffice.org/84758
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "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>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ie1f6fe98f4e8bc792f5eae1ccdd697c997707004
Reviewed-on: https://gerrit.libreoffice.org/81930
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Except directx/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I4504e087edfd837a3a91df49e296bbf40778b030
Reviewed-on: https://gerrit.libreoffice.org/81586
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|