Age | Commit message (Collapse) | Author |
|
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie923fc8baaa26938378407f6e5f3c50b2cea7cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110815
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Make sure to use gtk3 rendering
- Open https://bugs.documentfoundation.org/attachment.cgi?id=149492
- Click F5 to open the navigator
- Go to Images
- Try double click the third and last image at least 15 times
-> crash, here's part of bt:
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
SwFrame::IsInTab (this=0x0) at sw/source/core/inc/frame.hxx:938
938 if ( mbInfInvalid )
(gdb) bt
0 SwFrame::IsInTab() const (this=0x0) at sw/source/core/inc/frame.hxx:938
1 0x00007fd7e78caf9c in SwAccessibleDocument::getExtendedAttributes() (this=0x7e4e090) at sw/source/core/access/accdoc.cxx:596
2 0x00007fd7e78cbf9d in non-virtual thunk to SwAccessibleDocument::getExtendedAttributes() () at sw/source/core/access/accdoc.cxx:708
3 0x00007fd7f18f90ad in attribute_set_new_from_extended_attributes(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleExtendedAttributes> const&)
(rExtendedAttributes=uno::Reference to (SwAccessibleDocument *) 0x7e4e180) at vcl/unx/gtk3/a11y/gtk3atktextattributes.cxx:1229
4 0x00007fd7f19113f3 in wrapper_get_attributes(_AtkObject*) (atk_obj=0x7df37d0) at vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx:394
I put "Related" because I don't know if it corresponds to the initial bug
but I used the attached file of the bugtracker
Change-Id: Ief9fda9f7bcf277d18490169eee2e43fb046a1bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109051
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
no point in passing an OutputDevice there
Change-Id: I6da9b29a0e6f57ad6a8ebcb6113987ee25419483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108988
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8e2c89f2c897535013d64720b6c2c5bbac602b14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108551
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
|
|
Change-Id: I37bbab5f22f91faad65be8ef79734ce1ee6355d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108249
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
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: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Idb778188a0a2f0c26e007dc919adbffe3af6e435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106331
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
#1 0x00007ffff5d3fafe in accessibility::AccessibleContextBase::ThrowIfDisposed() (this=0x85de440) at editeng/source/accessibility/AccessibleContextBase.cxx:513
#2 0x00007ffff5d3fbee in accessibility::AccessibleContextBase::getAccessibleParent() (this=0x85de440) at editeng/source/accessibility/AccessibleContextBase.cxx:203
#3 0x00007fff999cad24 in SwAccessibleMap::DoInvalidateShapeSelection(bool) (this=0x687e610, bInvalidateFocusMode=false) at sw/source/core/access/accmap.cxx:1647
#4 0x00007fff999cc5a5 in SwAccessibleMap::InvalidateShapeSelection() (this=0x687e610) at sw/source/core/access/accmap.cxx:1152
#5 0x00007fff999d78b0 in SwAccessibleMap::InvalidateCursorPosition(SwFrame const*) (this=0x687e610, pFrame=0x5a3faa0) at sw/source/core/access/accmap.cxx:2744
#6 0x00007fff9aae5c32 in SwViewShellImp::InvalidateAccessibleCursorPosition(SwFrame const*) (this=0x6594330, pFrame=0x5a3faa0) at sw/source/core/view/viewimp.cxx:345
#7 0x00007fff99b01fcd in SwCursorShell::UpdateCursor(unsigned short, bool) (this=0x6594840, eFlags=7, bIdleEnd=false) at sw/source/core/crsr/crsrsh.cxx:2020
#8 0x00007fff99b02db4 in SwCursorShell::EndAction(bool, bool) (this=0x6594840, bIdleEnd=false, DoSetPosX=false) at sw/source/core/crsr/crsrsh.cxx:279
#9 0x00007fff9a2249b2 in SwFEShell::SelectObj(Point const&, unsigned char, SdrObject*) (this=0x6594840, rPt=Point = {...}, nFlag=0 '\000', pObj=0x0)
at sw/source/core/frmedt/feshview.cxx:323
#10 0x00007fff9b30eacb in SwWrtShell::UnSelectFrame() (this=0x6594840) at sw/source/uibase/wrtsh/select.cxx:326
Change-Id: I122d087b67c3615afb0c34aa714bc1066946c8c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106190
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I6243bc95129bf81a124d006ce0fc1aa1b5f618bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105718
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
|
|
...to "Find functions that take rtl::O[U]String parameters that can be
generalized to take std::[u16]string_view instead." (Which in turn can avoid
costly O[U]String constructions, see e.g. loplugin:stringview and subView.)
Some of those functions' call sites, passing plain char string literals, needed
to be adapted when converting them.
Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Fontworks should be warned about coz they reprezent a stylized text,
which is hard to recognize for digital readers.
Check is added to checkObject() function as fontwork is an object.
Change-Id: I2ed5a5784dfe96bbf05ec7cf4c09dc97e1fb29d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Headings' levels order is important for readers and converters.
Check firstly finds out if the node is a TextNode, then gets it's OutlineLevel.
If it is greater than 0, i.e. the node is a heading, then it checks if
node's heading level is greater then previous one's by more than 1.
If so, warning is thrown.
So the first heading level is always 1 and no heading levels are greater then previous
by more than 1.
Change-Id: I39d230d747699eddd36610193bde9b23f348e257
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105274
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
in places where it is obvious we only need a sal_Int32, because
we are dealing with rows and columns, and not even calc needs
more than 32 bits for that.
Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I48195e5bd61f9b662481da0efc6165ced794600c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104801
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... SwXLinkNameAccessWrapper and TableHeadingCheck
See tdf#94879 for motivation.
Change-Id: I1108abc0d4ee6179c0b4d4dbe18af0730edbd2ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104200
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I3c8ca72b2b41a4f82ee20cbe025b41425f32e715
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104028
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie6146de848b7c5bb7a8edc76a0652c9c623b7024
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103723
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: I88d11b8252723ee5b493d0effc9ed24757aed3b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103691
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
and remove discovered redundant null checks
Change-Id: I90e2a84b260bfaf283b787db055cd1ed54dab4ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103676
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
and remove discovered redundant null checks
Change-Id: Iac8ad7821d9acfcc9550a96402c02ac248f16f2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103672
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ifed7220c6acf7049b2985f1911a806b37a54d794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
New check checks if a node is a heading and if it is in a table.
Change-Id: I53938ddb57573f80c7823b05bff2d1dd2cee1b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103014
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
and remove discovered redundant null checks
Change-Id: I6b8bc9593434f38947e399a48888a8fa0d4f7e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103640
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie3aa3f8a2c34c510a391d729f3dc2286f735111a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103066
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
|
|
Currently if the View->Field Names is toggled,
SwViewShell::ImplApplyViewOptions() will call Reformat() and throw away
all existing portions.
So we can just create a different kind of portion altogether depending
on the value of the setting, and avoid complex multi-inheritance portion
or copying lots of code around.
This requires correcting a few assumptions that a SwFieldPortion has a
length of 0 or 1; for the input field, its length is the length of the
entire input field including CH_TXT_ATR_INPUTFIELDSTART/END (unless it's
a follow/rest portion, those are length 0 as always).
For the cursor travelling, LeftRight() works similar to
f6a60ce214117946eef222701023dca612bf0a2b, while UpDown() and mouse click
positioning need tweaks in SwTextCursor::GetModelPositionForViewPoint()
to take the field length into account.
Due to the previous point, mouse click related functions in edtwin.cxx
require checking the position at the start now.
When enabling Field Names, move any shell cursors out of input fields.
Change-Id: I1304f419bd6fa20f0c55fd1b13165c4866d64000
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103155
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
...from which an OUString can cheaply be instantiated. This is the OUString
equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into
a consteval'ed, static-refcound rtl_String". Most remarks about that commit
apply here too (this commit is just substantially bigger and a bit more
complicated because there were so much more uses of OUStringLiteral than of
OStringLiteral):
The one downside is that OUStringLiteral now needs to be a template abstracting
over the string length. But any uses for which that is a problem (e.g., as the
element type of a container that would no longer be homogeneous, or in the
signature of a function that shall not be turned into a template for one reason
or another) can be replaced with std::u16string_view, without loss of efficiency
compared to the original OUStringLiteral, and without loss of expressivity.
The new OUStringLiteral ctor code would probably not be very efficient if it
were ever executed at runtime, but it is intended to be only executed at compile
time. Where available, C++20 "consteval" is used to statically ensure that.
The intended use of the new OUStringLiteral is in all cases where an
object that shall itself not be an OUString (e.g., because it shall be a
global static variable for which the OUString ctor/dtor would be detrimental at
library load/unload) must be converted to an OUString instance in at least one
place. Other string literal abstractions could use std::u16string_view (or just
plain char16_t const[N]), but interestingly OUStringLiteral might be more
efficient than constexpr std::u16string_view even for such cases, as it should
not need any relocations at library load time. For now, no existing uses of
OUStringLiteral have been changed to some other abstraction (unless technically
necessary as discussed above), and no additional places that would benefit from
OUStringLiteral have been changed to use it.
Global constexpr OUStringLiteral variables defined in an included file would be
somewhat suboptimal, as each translation unit that uses them would create its
own, unshared instance. The envisioned solution is to turn them into static
data members of some class (and there may be a loplugin coming to find and fix
affected places). Another approach that has been taken here in a few cases
where such variables were only used in one .cxx anyway is to move their
definitions from the .hxx into that one .cxx (in turn causing some files to
become empty and get removed completely)---which also silenced some GCC
-Werror=unused-variable if a variable from a .hxx was not used in some .cxx
including it.
To keep individual commits reasonably manageable, some consumers of
OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat
odd state for now, where they don't take advantage of OUStringLiteral's
equivalence to rtl_uString, but just keep extracting its contents and copy it
elsewhere. In follow-up commits, those consumers should be changed
appropriately, making them treat OUStringLiteral like an rtl_uString or
dropping the OUStringLiteral overload in favor of an existing (and cheap to use
now) OUString overload, etc.
In a similar vein, comparison operators between OUString and std::u16string_view
have been added to the existing plethora of comparison operator overloads. It
would be nice to eventually consolidate them, esp. with the overloads taking
OUStringLiteral and/or char16_t const[N] string literals, but that appears
tricky to get right without introducing new ambiguities. Also, a handful of
places across the code base use comparisons between OUString and OUStringNumber,
which are now ambiguous (converting the OUStringNumber to either OUString or
std::u16string_view). For simplicity, those few places have manually been fixed
for now by adding explicit conversion to std::u16string_view.
Also some compilerplugins code needed to be adapted, and some of the
compilerplugins/test cases have become irrelevant (and have been removed), as
the tested code would no longer compile in the first place.
sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template
argument deduction in unevaluated, parenthesized context". That place, as well
as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and
i18npool/source/localedata/localedata.cxx, which have been replaced with
OUString::Concat (and which is arguably a better choice, anyway), also caused
failures with at least Clang 5.0.2 (but would not have caused failures with at
least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile
been fixed).
Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Floating objects with text create problems with reading order
A new check for floating text field inserted into checkObject function and into node-checking mechanism.
Change-Id: Ice97d8a3e24de21ee6c6d2b0a6f89c348f665c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101994
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
A new check responsible for checking if the input forms are not formed by manual typing consecutive "_", "..." or "…".
Made a new check class and inserted it into the main checking mechanism, also added a related string.
Change-Id: I6ecc3878114dc432d43ce1ad27ea45d512366320
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101921
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
It passed "make check" on Linux
Change-Id: Ide85943961b6f5102294356ff623c6be8d7bc790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101813
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Default ctor initializes the colors to black. This is incorrect, since
in case of absent explicit setting, the actual background color is
white. Using COL_AUTO activated the proper fallback mechanism
to the default WHITE.
Change-Id: Iddc39032f041adc4d419a54b3142b87d4447fb31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101418
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I028a75b1ce4cceb601ac2e50693cde94df57f684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101208
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I4f05b6a35010e661ea77f3e4b83302d2ec74d227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100405
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
with expressions like !(a && b)
Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I32ce9fcca86de4608939d385f42c43afc46bfb7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I0116fe288b97d22c3f170f139fe95cfd06d89d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which is both more compact code, and more efficient, since the insert
method can do smarter resizing
Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3805d7a0f8f0e93463a2285a1ce52f6a5daba27d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95578
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
in the document, looks like only the calc one actually works, and when
it works on large quantities of results calc grinds to a complete halt
This was introduced with:
commit b41332475783c31136673fb44cf4c411bb0148f8
Date: Mon Dec 2 15:54:29 2013 +0000
Integrate branch of IAccessible2
and has been a problem on and off with calc's potentially ~infinite grid
There is the on-by-default search results dialog in calc (which has a limit on
how many it shows) which provides an alternative route to iterate through the
results
Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I305086e26538110481918f8250a482e4738ac41f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94729
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie2c3e3f95a687b12b89bcfc5cad44fb7a1d4568f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
The main reason for the "home-grown" UpCast introduced with
904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for
css::uno::Reference" in 2013 was probably that we could not yet rely on C++11
std::is_base_of back then. A (welcome) side effect was that the derived class
could be incomplete.
However, specializations of UpCast relying on whether or not T2 is incomplete
are obviously an ODR violation if the type is incomplete in some TUs and
complete (and derived from T1) in others. And even if UpCast had internal
linkage, it would still be brittle that its behavior depends on the completeness
of T2 at the point of the template's instantiation, and not necessarily at the
point of use.
That means we should better base that ctor on std::is_base_of (which we can do
now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference
upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on
Clang and GCC if the completeness requirements are not met. This change fixes
all the cases where types need to be complete now, plus any resulting
loplugin:referencecasting warnings ("the source reference is already a subtype
of the destination reference").
Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|