/include/i18nlangtag/

ng std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The scenarios are:

1. Calling sequence's begin() and end() in pairs to pass to algorithms
   (both calls use getArray(), which does the COW checks)
2. In addition to #1, calling end() again when checking result of find
   algorithms, and/or begin() to calculate result's distance
3. Using non-const sequences in range-based for loops, which internally
   do #1
4. Assigning sequence to another sequence variable, and then modifying
   one of them

In many cases, the sequences could be made const, or treated as const
for the purposes of the algorithms (using std::as_const, std::cbegin,
and std::cend). Where algorithm modifies the sequence, it was changed
to only call getArray() once. For that, css::uno::toNonConstRange was
introduced, which returns a struct (sublclass of std::pair) with two
iterators [begin, end], that are calculated using one call to begin()
and one call to getLength().

To handle #4, css::uno::Sequence::swap was introduced, that swaps the
internal pointer to uno_Sequence. So when a local Sequence variable
should be assigned to another variable, and the latter will be modified
further, it's now possible to use swap instead, so the two sequences
are kept independent.

The modified places were found by temporarily removing non-const end().

Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
clang-tidy:readability-redundant-member-init 2021-09-03T10:44:22+00:00 Noel Grandin noel.grandin@collabora.co.uk 2021-09-03T07:11:06+00:00 6cc1ee903544ed813402303e93753dac8226984f Change-Id: Iede70151af052505b780c6ce708aa74d97da5c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Change-Id: Iede70151af052505b780c6ce708aa74d97da5c75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121545
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Make upcasting css::uno::Reference ctor require complete types 2020-04-27T05:19:30+00:00 Stephan Bergmann sbergman@redhat.com 2020-04-26T20:07:21+00:00 b512ce255f46d90e682634e4dd17e146af7f9080 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>
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>
Simplify Sequence iterations in xmloff/source/{style..xforms} 2019-06-11T18:32:49+00:00 Arkadiy Illarionov qarkai@gmail.com 2019-05-12T13:07:58+00:00 79d58ee14da8fbf636fb087453834abb7173d3fc Use range-based loops or replace with comphelper or STL functions Change-Id: Ie268d80b9c01d38c745c14a81c219d9930860562 Reviewed-on: https://gerrit.libreoffice.org/72189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Use range-based loops or replace with comphelper or STL functions

Change-Id: Ie268d80b9c01d38c745c14a81c219d9930860562
Reviewed-on: https://gerrit.libreoffice.org/72189
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
loplugin:indentation in writerfilter..xmloff 2019-02-11T06:01:24+00:00 Noel Grandin noel.grandin@collabora.co.uk 2019-02-10T10:30:22+00:00 743d5604c22e2c599ec22c1afd8c7c02388d575f Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e Reviewed-on: https://gerrit.libreoffice.org/67611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e
Reviewed-on: https://gerrit.libreoffice.org/67611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Add missing sal/log.hxx headers 2018-07-12T08:40:25+00:00 Gabor Kelemen kelemeng@ubuntu.com 2018-07-11T06:00:51+00:00 0132f27d4e062b9306e4fb90c38a58afffbe6cf0 rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories w* x* Change-Id: I27bff44da3d34d24262031c7489e755311599bc5 Reviewed-on: https://gerrit.libreoffice.org/57307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories w* x*

Change-Id: I27bff44da3d34d24262031c7489e755311599bc5
Reviewed-on: https://gerrit.libreoffice.org/57307
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
cleanup tools/debug.hxx includes 2017-05-08T06:33:01+00:00 Jochen Nitschke j.nitschke+logerrit@ok.de 2017-05-07T12:34:55+00:00 b3eb84376653b1f5883a3543adf36547790dd045 with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
with command
> git grep -l tools/debug.hxx |
  xargs grep -L DBG_ |
  xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d'

don't change files in includes/ and */pch

Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08
Reviewed-on: https://gerrit.libreoffice.org/37349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
inline some constant strings in xmloff (part1) 2016-12-02T06:34:36+00:00 Noel Grandin noel.grandin@collabora.co.uk 2016-12-01T08:51:35+00:00 06eb947c1651cb623cd60d81b08281de4cc6a86b Change-Id: I7971f210ffb30bdd80a1adde2c286b4d092bd053 Reviewed-on: https://gerrit.libreoffice.org/31433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Change-Id: I7971f210ffb30bdd80a1adde2c286b4d092bd053
Reviewed-on: https://gerrit.libreoffice.org/31433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
tract891b LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/include/svx/float3d.hxx
AgeCommit message (Expand)Author
2014-09-23fdo#82577: Handle WindowNoel Grandin
2014-04-01Explicitly mark overriding destructors as "virtual"Stephan Bergmann
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
2014-03-11svx: sal_Bool->boolNoel Grandin
2014-03-01Remove visual noise from includeAlexander Wilms