Age | Commit message (Collapse) | Author |
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ic57b1259e612cc38ad22f123edbaca690cd506ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89937
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
...now that macOS builds are guaranteed to have std::optional since
358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to
Xcode 11.3 and macOS 10.14.4".
The change is done mostly mechanically with
> for i in $(git grep -Fl optional); do
> sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \
> -e 's/\<o3tl::optional\>/std::optional/g' \
> -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i"
> done
> for i in $(git grep -Flw o3tl::nullopt); do
> sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i"
> done
(though that causes some of the resulting
#include <optional>
to appear at different places relative to other includes than if they had been
added manually), plus a few manual modifications:
* adapt bin/find-unneeded-includes
* adapt desktop/IwyuFilter_desktop.yaml
* remove include/o3tl/optional.hxx
* quote resulting "<"/">" as "<"/">" in officecfg/registry/cppheader.xsl
* and then solenv/clang-format/reformat-formatted-files
Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...with a boost::optional fallback for Xcode < 10 (as std::optional is only
available starting with Xcode 10 according to
<https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS
and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite
all code to use o3tl::optional instead of boost::optional.
One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per
fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus
-Werror=maybe-uninitialized" should no longer be necessary (and whose check
happened to no longer trigger for GCC 10 trunk, even though that compiler would
still emit bogus -Wmaybe-uninitialized for uses of boost::optional under
--enable-optimized, which made me ponder whether this switch from
boost::optional to std::optional would be a useful thing to do; I keep that
configure.ac check for now, though, and will only remove it in a follow up
commit).
Another longer-term benefit is that the code is now already in good shape for an
eventual switch to std::optional (a switch we would have done anyway once we no
longer need to support Xcode < 10).
Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses
boost::property_tree::ptree::get_child_optional returning boost::optional, so
let it keep using boost::optional for now.
After a number of preceding commits have paved the way for this change, this
commit is completely mechanical, done with
> git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g'
(before committing include/o3tl/optional.hxx, and relying on some GNU features).
It excludes some files where mention of boost::optional et al should apparently
not be changed (and the sub-repo directory stubs). It turned out that all uses
of boost::none across the code base were in combination with boost::optional, so
had all to be rewritten as o3tl::nullopt.
Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b
Reviewed-on: https://gerrit.libreoffice.org/84128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.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>
|
|
Change-Id: Ief9d4bc5ce0e83a9eb9564cb94f773a3ff6048ba
Reviewed-on: https://gerrit.libreoffice.org/82357
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: Ieffc89b8119c2baf56383ac8b5d3cb54dc9d0d2d
Reviewed-on: https://gerrit.libreoffice.org/82090
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I9e769cff6db794389bcef821c08ca1cd60173ab9
Reviewed-on: https://gerrit.libreoffice.org/81531
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I545b3b262805361851ed2c829110c6a4f852e25e
Reviewed-on: https://gerrit.libreoffice.org/81267
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I4ba26647f4081f5c13726b78c737b54e8ab1773d
Reviewed-on: https://gerrit.libreoffice.org/79675
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Add sub-tile dumping code, and do compares.
Change-Id: I5bc29c07e1075ac40b495f35d01d433e81ba309a
Reviewed-on: https://gerrit.libreoffice.org/79195
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
...with the benefit of avoiding some Clang 10
-Werror,-Wimplicit-int-float-conversion in places where they are implicitly
converted to double
Change-Id: I0a8e85b23e3cb19d736e436b793ad83bb5fb99c4
Reviewed-on: https://gerrit.libreoffice.org/77034
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data
to &vector[0]"
Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01
Reviewed-on: https://gerrit.libreoffice.org/72765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Helps building the Online before the appropriate patch gets merged.
Change-Id: I9983d546bb0cb7fb472806622a0a10e3a4d3ab87
Reviewed-on: https://gerrit.libreoffice.org/71665
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I1893d52df505bc43428c37a624ca05c569ba1bc0
Reviewed-on: https://gerrit.libreoffice.org/70958
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
|
|
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561
Reviewed-on: https://gerrit.libreoffice.org/62701
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
Change-Id: I2a48c31bfcfa0c1fee213a70f3c25bcdcc1de56d
|
|
Thus it now actually takes a buffer pointer also on iOS, like on Linux
and Android. Less confusing, more uniform. Add a separate iOS-specific
paintTileToCGContext() method to LibreOfficeKitDocumentClass that
takes a CGContextRef. Adapt callers correspondingly. (The
LibreOfficeLight code in particular needs the paintTileToCGContext().)
Change-Id: I81084806d37b9aac9f2b2bc03d0c262e991eec81
|
|
Change-Id: Id1b75435134da830130ebe725d86ad4e273d1f06
|
|
Change-Id: I0ccdad335f0a2cd6f14a4a226590b0e1d3033244
|
|
Change-Id: Ib34b83bc14f17dbb2bf3e89140edb734697710a8
|
|
... to make the LibreOfficeKit usage more like a real app, to make
sure that calling these doesn't cause any change in behaviour. (It
didn't, as far as I could see.)
Change-Id: Idded20c06031b46d5194ffeeb17309f2dbcdbaac
|
|
On iOS, don't attempt to write the tile dump ppm file to /tmp, but use
the app-specific directory so that it can be copied for inspection
using iTunes. (Of course, even better would be to simply paint it to
the app's view. Later)
Change-Id: I8dd60d04adc61de6594099f5c358a9b6220522da
Reviewed-on: https://gerrit.libreoffice.org/61255
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: Idef0b375d5c7d6d4542aee1f8abecaf9f834189c
Reviewed-on: https://gerrit.libreoffice.org/61058
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I5578e195c834b2a3ceacd5c528f58d1d03502c2e
Reviewed-on: https://gerrit.libreoffice.org/57461
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Also cleanup DISPLAY to avoid various weird problems.
Change-Id: Ib480c94fc50baab6185ecadaabda9a8063cedfee
Reviewed-on: https://gerrit.libreoffice.org/57146
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I4661664d1206aacdaf22a4a8f05d7962547faf45
Reviewed-on: https://gerrit.libreoffice.org/56765
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I2268cc7b1db23c520ce3699d4e478d7c5bf6820f
Reviewed-on: https://gerrit.libreoffice.org/56764
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016
Reviewed-on: https://gerrit.libreoffice.org/54416
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Reduced the scope of some variables in source.
Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846
Reviewed-on: https://gerrit.libreoffice.org/52974
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I11078e36aafc715b7103998a17e0cb01926b8e97
Reviewed-on: https://gerrit.libreoffice.org/51618
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Iaa166a248f5c1e9fcf62834f65475265403e4322
|
|
And other improvements.
(cherry picked from commit b7d893d8a1ecb24290c4470e12d71caba2b85216)
Reviewed-on: https://gerrit.libreoffice.org/46678
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 0e7ccbdd559df3a446e73c367b12824c6c143579)
Change-Id: I5a27d6d2df5f946a708dd3b0b4fef8159da86e5c
Reviewed-on: https://gerrit.libreoffice.org/46985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
* Arguments for max number of parts and tiles to render (optional).
+ Automatic estimation of maximum tiles to render based on max parts
for Writer docs, since there is only 1 part, this caps the number
of pages to render, similar to other doc types.
* Fixed rendering of Writer documents over and over (as many times as pages).
+ Writer has a single part, unlike other doc types.
+ No point in rendering the whole document in writer to a single tile,
since that's completely unrealistic and impractical (it takes
forever for large docs and artificially spikes the memory).
* Rendering starts at the current part and not the first.
+ This gives the spreadsheet of interest priority (if saved as visible).
* The tile size is now more realistic as we use the same dimensions
as the Online client does.
* When rendering tiles at scale, we use the same dimensions as the
Online client rather than splitting the width by 4, for realism.
* Rendering of tiles is done rows-first, rather than columns-first,
which is similar to what the Online client does, which is more
cache friendly, therefore more realistic.
* Enabled compiling of tilebench when GTK3 is disabled, which
was erroneous, since tilebench doesn't have any dependency on GTK.
+ Now it's possible to compile with local Cairo/Pixman libs.
Reviewed-on: https://gerrit.libreoffice.org/44936
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 7db98521548de9eab955ee25a5aacaaef42df323)
Change-Id: I6ad2e97f39572778dd7d0c12d14550841c1d6963
Reviewed-on: https://gerrit.libreoffice.org/46984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70
Reviewed-on: https://gerrit.libreoffice.org/42156
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifbed5e534ba79d32b7188bb7fb7108338b6e124d
|
|
Change-Id: Ibdb6409664cdf9499b6fec95c5de3549887b8106
|
|
Change-Id: I166b4b713c2ea52c62c52045bb2073b6d84c1547
|
|
and
coverity#706196 Use of untrusted string value
coverity#1244947 Use of untrusted string value
Change-Id: I5083aba2eff9e852a24513db431585922302b279
|
|
Change-Id: I99da68d2003e01bbc4e8dd9ff6ab943d8ea156ca
|
|
Change-Id: I13a93991050cc25d06f2836d85ec1d0a0bc574f1
|
|
Change-Id: I631c0506f427d974c3dd4c75484aa25603100895
|