Age | Commit message (Collapse) | Author |
|
"Find explicit casts from signed to unsigned integer in comparison against
unsigned integer, where the cast is presumably used to avoid warnings about
signed vs. unsigned comparisons, and could thus be replaced with
o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx)
o3tl::make_unsigned requires its argument to be non-negative, and there is a
chance that some original code like
static_cast<sal_uInt32>(n) >= c
used the explicit cast to actually force a (potentially negative) value of
sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the
cast to avoid a false "signed vs. unsigned comparison" warning in a case where
n is known to be non-negative. It appears that restricting this plugin to non-
equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=)
is a useful heuristic to avoid such false positives. The only remainging false
positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast
from sal_Int32 to sal_uInt32".
But which of course does not mean that there were no further false positivies
that I missed. So this commit may accidentally introduce some false hits of the
assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan
--enable-dbgutil) `make check && make screenshot`.
It is by design that o3tl::make_unsigned only accepts signed integer parameter
types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses
which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in
include/oox/helper/helper.hxx is used with both signed and unsigned types, so
needs a little oox::detail::make_unsigned helper function for now. (The
ultimate fix being to get rid of the macro in the first place.)
Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I048eb097e9570f2ad2fecef5e725c98e36e6559e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87078
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
|
|
so we return a const& for the normal case, just like other methods,
which reduces copying.
This revealed that CreateDisplayBitmap in Bitmap can be const.
Change-Id: I9f9b9ff0c52d7e95eaae62af152218be8847dd63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1b0df1a6cb5b8db9db09cb1d55d932459ab16d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86741
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found using 'git grep', I tried using clang-tidy, but it only
successfully found a tiny fraction of these
Change-Id: I61c7d85105ff7a911722750e759d6641d578da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I644bbebe798329e68665b8c751eccbb829178e91
Reviewed-on: https://gerrit.libreoffice.org/85182
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ia9c736042a07a17377db6d88c5bcd2b468e98777
Reviewed-on: https://gerrit.libreoffice.org/85471
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...caused by a8cd98c437f2c3b5c4f7c139aa7223c5cfb74d1a "use o3tl::optional
instead of pointer", see <https://ci.libreoffice.org/job/gerrit_mac/48607>:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/connectivity/qa/connectivity/resource/sharedresources_test.cxx:10:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/test/bootstrapfixture.hxx:16:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/salctype.hxx:25:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/graph.hxx:27:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/bitmapex.hxx:23:
> /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/o3tl/optional.hxx:20:10: fatal error: 'boost/none.hpp' file not found
> #include <boost/none.hpp>
> ^~~~~~~~~~~~~~~~
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/connectivity/qa/connectivity/commontools/FValue_test.cxx:20:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/test/bootstrapfixture.hxx:16:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/salctype.hxx:25:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/graph.hxx:27:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/bitmapex.hxx:23:
> /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/o3tl/optional.hxx:20:10: fatal error: 'boost/none.hpp' file not found
> #include <boost/none.hpp>
> ^~~~~~~~~~~~~~~~
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/emfio/qa/cppunit/emf/EmfImportTest.cxx:13:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/test/bootstrapfixture.hxx:16:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/salctype.hxx:25:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/graph.hxx:27:
> In file included from /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/vcl/bitmapex.hxx:23:
> /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/include/o3tl/optional.hxx:20:10: fatal error: 'boost/none.hpp' file not found
> #include <boost/none.hpp>
> ^~~~~~~~~~~~~~~~
Change-Id: I86ccc030a8f34b9ee6a853e843c9eb6f2d987406
Reviewed-on: https://gerrit.libreoffice.org/84664
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9a2c28f465b881583caae8d865d63b701213f8ee
Reviewed-on: https://gerrit.libreoffice.org/84139
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
...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>
|
|
Change-Id: I948555cb4895390ded8b6c9b257486cdce175185
Reviewed-on: https://gerrit.libreoffice.org/84096
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
For emfio I believe we need more logging, so I am gradually adding this.
I decided to log the EMR_COMMENT_PUBLIC record subtypes
EMR_COMMENT_BEGINGROUP and EMR_COMMENT_ENDGROUP.
I honestly don't know what these actually do, but they are specified in
[MS-EMF] 2.3.3.4.1 and 2.3.3.4.2. Later on, we will need to look into
handling EMR_COMMENT_MULTIFORMATS so we can display things with EPS
data. We should also probably look into handling
EMR_COMMENT_WINDOWS_METAFILE later on also.
Change-Id: I7c3ba3cfd7f51a6cff2c7a47a48dde12240d0382
Reviewed-on: https://gerrit.libreoffice.org/83407
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
...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: I449a0c2db77888a87a0ae983617848a9f0886ef1
Reviewed-on: https://gerrit.libreoffice.org/83233
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I53809ab01d5e8eb091305c3cb618a64920ad22ad
Reviewed-on: https://gerrit.libreoffice.org/82783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds
with our PCHs.
Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5
Reviewed-on: https://gerrit.libreoffice.org/80961
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I354edf5b169e797c76ec79719cdce01e63329df4
Reviewed-on: https://gerrit.libreoffice.org/79833
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Iec6a9ff8b62ac1986cca205435273b64b71f33cd
Reviewed-on: https://gerrit.libreoffice.org/79539
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c
Reviewed-on: https://gerrit.libreoffice.org/79360
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I4bd004af206813b9dc01c50ab20f2e8b954b8dca
Reviewed-on: https://gerrit.libreoffice.org/77323
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I8effe9e6e82340613016807490d1e727c02d1f6a
Reviewed-on: https://gerrit.libreoffice.org/76680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This depends on commit "Make font-based unit test depend on instdir
fonts, not that it's sure that this really fixes the problem, as its
origin is really unknown.
It especially enables all the font-based tests I could find on all
archs. Same for many more test where I couldn't see any reason they
don't work generally. To get rid of even more ifdefs, it moves these
from the class to the functions, so there is actually just one needed
for any test. As a result some few tests run but do nothing.
There is still some problem with embedded fonts on MacOS and with
delayed graphics loading on Windows, so these ifdefs are kept.
Change-Id: I63f8424e9debda6cbf3e5777c93245e09f8eb0f2
Reviewed-on: https://gerrit.libreoffice.org/74719
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Ibdc79538276992193e61f6dc16ddd3fd1ab80b82
Reviewed-on: https://gerrit.libreoffice.org/75069
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I43ac26058a98a85fc09321a93e29dbeb151f5069
Reviewed-on: https://gerrit.libreoffice.org/74572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
With -fsanitize=float-cast-overflow, opening doc/abi5309-1.doc as obtained by
bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at
<https://bugzilla.abisource.com/show_bug.cgi?id=5309#c3>) fails with
> include/tools/helpers.hxx:76:79: runtime error: 1e+20 is outside the range of representable values of type 'long'
> #0 in FRound(double) at include/tools/helpers.hxx:76:79 (instdir/program/libtllo.so +0x3c13dd)
> #1 in ImplPolygon::ImplPolygon(basegfx::B2DPolygon const&) at tools/source/generic/poly.cxx:474:30 (instdir/program/libtllo.so +0x40f35f)
> #2 in tools::Polygon::Polygon(basegfx::B2DPolygon const&) at tools/source/generic/poly.cxx:1849:72 (instdir/program/libtllo.so +0x42c9ff)
> #3 in ImplPolyPolygon::ImplPolyPolygon(basegfx::B2DPolyPolygon const&) at tools/source/generic/poly2.cxx:482:28 (instdir/program/libtllo.so +0x45561e)
> #4 in tools::PolyPolygon::PolyPolygon(basegfx::B2DPolyPolygon const&) at tools/source/generic/poly2.cxx:463:25 (instdir/program/libtllo.so +0x45512d)
> #5 in emfio::MtfTools::DrawPolygon(tools::Polygon, bool) at emfio/source/reader/mtftools.cxx:1287:17 (instdir/program/../program/libemfiolo.so +0x1828d3)
> #6 in emfio::WmfReader::ReadRecordParams(unsigned short) at emfio/source/reader/wmfreader.cxx:367:21 (instdir/program/../program/libemfiolo.so +0x1cffde)
> #7 in emfio::WmfReader::ReadWMF() at emfio/source/reader/wmfreader.cxx:1425:29 (instdir/program/../program/libemfiolo.so +0x1f7567)
> #8 in emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx:152:108 (instdir/program/../program/libemfiolo.so +0x13795a)
> #9 in non-virtual thunk to emfio::emfreader::XEmfParser::getDecomposition(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at emfio/source/emfuno/xemfparser.cxx (instdir/program/../program/libemfiolo.so +0x138735)
> #10 in VectorGraphicData::ensureSequenceAndRange() at vcl/source/gdi/vectorgraphicdata.cxx:172:137 (instdir/program/libvcllo.so +0x86bdadf)
> #11 in VectorGraphicData::ensureReplacement() at vcl/source/gdi/vectorgraphicdata.cxx:138:5 (instdir/program/libvcllo.so +0x86bcb94)
> #12 in VectorGraphicData::getReplacement() const at vcl/source/gdi/vectorgraphicdata.cxx:286:45 (instdir/program/libvcllo.so +0x86c0a04)
> #13 in ImpGraphic::ImplSetPrefSize(Size const&) at vcl/source/gdi/impgraph.cxx:956:45 (instdir/program/libvcllo.so +0x7d05433)
> #14 in Graphic::SetPrefSize(Size const&) at vcl/source/gdi/graph.cxx:388:19 (instdir/program/libvcllo.so +0x7ca7e26)
> #15 in SvxMSDffManager::GetBLIPDirect(SvStream&, Graphic&, tools::Rectangle*) at filter/source/msfilter/msdffimp.cxx:6616:26 (instdir/program/../program/libmsfilterlo.so +0x9617bc)
> #16 in SvxMSDffManager::GetBLIP(unsigned long, Graphic&, tools::Rectangle*) at filter/source/msfilter/msdffimp.cxx:6453:23 (instdir/program/../program/libmsfilterlo.so +0x95f368)
> #17 in SvxMSDffManager::ImportGraphic(SvStream&, SfxItemSet&, DffObjData const&) at filter/source/msfilter/msdffimp.cxx:3821:24 (instdir/program/../program/libmsfilterlo.so +0x990678)
> #18 in SvxMSDffManager::ImportShape(DffRecordHeader const&, SvStream&, SvxMSDffClientData&, tools::Rectangle&, tools::Rectangle const&, int, int*) at filter/source/msfilter/msdffimp.cxx:4368:28 (instdir/program/../program/libmsfilterlo.so +0x9a221a)
> #19 in SvxMSDffManager::ImportObj(SvStream&, SvxMSDffClientData&, tools::Rectangle&, tools::Rectangle const&, int, int*) at filter/source/msfilter/msdffimp.cxx:4073:16 (instdir/program/../program/libmsfilterlo.so +0x9972d8)
> #20 in SvxMSDffManager::GetShape(unsigned long, SdrObject*&, SvxMSDffImportData&) at filter/source/msfilter/msdffimp.cxx:6377:23 (instdir/program/../program/libmsfilterlo.so +0x9dde0c)
> #21 in SwWW8ImplReader::Read_GrafLayer(long) at sw/source/filter/ww8/ww8graf.cxx:2567:34 (instdir/program/../program/libmswordlo.so +0x2c51a1f)
> #22 in SwWW8ImplReader::ReadChar(long, long) at sw/source/filter/ww8/ww8par.cxx:3697:17 (instdir/program/../program/libmswordlo.so +0x2db3a07)
> #23 in SwWW8ImplReader::ReadChars(int&, int, long, long) at sw/source/filter/ww8/ww8par.cxx:3484:27 (instdir/program/../program/libmswordlo.so +0x2dafba2)
> #24 in SwWW8ImplReader::ReadText(int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:4045:22 (instdir/program/../program/libmswordlo.so +0x2d85c3e)
> #25 in SwWW8ImplReader::CoreLoad(WW8Glossary const*) at sw/source/filter/ww8/ww8par.cxx:5227:9 (instdir/program/../program/libmswordlo.so +0x2de3314)
> #26 in SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:5892:19 (instdir/program/../program/libmswordlo.so +0x2df31ad)
> #27 in SwWW8ImplReader::LoadDoc(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:6196:19 (instdir/program/../program/libmswordlo.so +0x2dfe1ed)
> #28 in WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/ww8/ww8par.cxx:6347:26 (instdir/program/../program/libmswordlo.so +0x2e0301a)
> #29 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:188:22 (instdir/program/../program/libswlo.so +0x1041d2be)
> #30 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:261:26 (instdir/program/../program/libswlo.so +0x10fc4d98)
> #31 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:768:23 (instdir/program/libsfxlo.so +0x49d934a)
[...]
To represent "negative" clip regions, basegfx/source/tools/b2dclipstate.cxx uses
an ugly hack of subtracting the region from a ±1E20 bounding box. This document
uses such a negative clip region with a 4504x633@(11301,38) rectangular hole.
(Though I don't know whether that's the real intention, or caused by LO
misparsing the input file format.)
So to avoid converting the ±1E20 bounding box from double to long, do the
intersection here with basegfx double values, and only convert the result to
tools long values. (There appears to be no implemenation of intersection with
a polypolygon for B2DPolyPolyon, just B2DClipState::intersectPolyPolygon.) (In
principle there could be loss of precision when aPolyPoly is converted to a
B2DPolyPolygon now, but that's unlikely with a typical IEEE 754 double with
52 bit mantissa.)
Change-Id: I82a9941b43d90153d63612147b2ca33fbca5f179
Reviewed-on: https://gerrit.libreoffice.org/73386
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I4894023e42cbfa32916ee3ddfb2cfb5426cfc69f
Reviewed-on: https://gerrit.libreoffice.org/72195
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Plus some build fixes triggered by this.
Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50
Reviewed-on: https://gerrit.libreoffice.org/71581
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Improve the conversion method to do something reasonable with
empty Rectangle.
Use the conversion method in more places.
Change-Id: I48c13f3d6dae71f39f03f7939101e545c8125503
Reviewed-on: https://gerrit.libreoffice.org/71853
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I7420dfde91ab52316139b446ea5c5aac79ed2350
Reviewed-on: https://gerrit.libreoffice.org/71380
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I95c6fb5e2ddc1c2d8a2fb1d5ff30b18ddad48b3a
Reviewed-on: https://gerrit.libreoffice.org/70699
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
detect static variables that can be made const.
Thanks to mike kaganski for suggesting this.
Here I introduce a new plugin feature - using markers
in nearby comments to disable the plugin for specific
vars.
Some of this stuff was old debugging code. I removed the stuff
that was older than 5 years.
Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c
Reviewed-on: https://gerrit.libreoffice.org/68807
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...similar to 095e1ca4372d90da7fc56051f1271ddd975a9e3a "Assume that
EMR_SETWINDOWEXTEX wants to read signed values", this time causing "implicit
conversion from type 'long' of value 4294967200 (64-bit, signed) to type
'sal_Int32' (aka 'int') changed the value to -96 (32-bit, signed)" in
emfio::MtfTools::SetDevExt (emfio/source/reader/mtftools.cxx) during
CppunitTest_sw_rtfexport2.
Change-Id: I114cc883fd3ac78291df8190b8528384966b563f
Reviewed-on: https://gerrit.libreoffice.org/68709
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Also needs extending the XmlWriter to output double numbers as
the attribute content.
Change-Id: Ie749ea990d856c8c90092ed8153c24efda99c444
Reviewed-on: https://gerrit.libreoffice.org/67573
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: If7d7c400fb5d24e48b6cd02b364a8ac7fa23505d
Reviewed-on: https://gerrit.libreoffice.org/67538
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e
Reviewed-on: https://gerrit.libreoffice.org/66545
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This is very useful functionality, this way it can be invoked from the
debugger and/or nested into an outer xml dump (sw/sd doc model dump)
more easily.
Change-Id: If6c83b11d0f3e65fcce71e8d820c6bc354f64d68
Reviewed-on: https://gerrit.libreoffice.org/65834
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"
Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
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: If1b2e04872eb0dd6725802c1709a9085f4cd8c91
Reviewed-on: https://gerrit.libreoffice.org/64141
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625
Reviewed-on: https://gerrit.libreoffice.org/63453
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I79ed336058ffa9e182d3332acfeda8d6526c6b43
Reviewed-on: https://gerrit.libreoffice.org/63432
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
While we are drawing DrawString record, in most cases optional
StringFormat information is available.
If StringFromat information is available then we should use default
values.
For LeadingMargin for String the default value is 1/6 inch.
Change-Id: I4a0a68df5ebe74e810f8b5864232b477b3aac255
Reviewed-on: https://gerrit.libreoffice.org/62927
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Added rotation support for DrawString and DrawDriverString
The EmfPlusDrawString record specifies text output with string formatting.
The EmfPlusDrawDriverString record specifies text output
with character positions.
Now both EMF+ records properly support rotation.
Change-Id: I15a7a6dd2b8a209cf2aac2af75d7dd89cedd1aeb
Reviewed-on: https://gerrit.libreoffice.org/62783
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: Id1a0749b78a7021be3564487fb974d7084705129
Reviewed-on: https://gerrit.libreoffice.org/62718
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
tighten up the handling of binary operators
Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee
Reviewed-on: https://gerrit.libreoffice.org/61777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and simplify callsites to use it instead of the current
"seek to end, find pos, seek back to original pos"
pattern
Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c
Reviewed-on: https://gerrit.libreoffice.org/61738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This unit test sometimes fails on Windows with the message:
"no suitable windowing system found, exiting."
Currently the test just depends on desktop_detector and manually
sets up VCL duplicating a lot of code and even library symbols.
The original Gerrit change describes a lot of failures in its
comments (change 28322, version 16). Now that Windows and MacOS
were converted to VCL plugins, depending on desktop_detector is
not sufficient anymore.
This reverts a lot of VCL test setup from commit 20f6a6b159c6
("tdf#99402: fix Metafile Font handling"). Seems now a simple
gb_CppunitTest_use_vcl is enough.
Change-Id: Ia941ded91358231021741ff4a5d96e2014ac6c80
Reviewed-on: https://gerrit.libreoffice.org/61497
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
...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: I3ec766dd243fa27068ec44b16c941beaa9da1479
Reviewed-on: https://gerrit.libreoffice.org/60359
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|