summaryrefslogtreecommitdiff
path: root/emfio
AgeCommit message (Collapse)Author
2020-11-16Instead of labs, use overloaded absStephan Bergmann
...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-14tdf#35986 EMF import: Add support for PS_COSMETIC line style in CREATEPENBartosz Kosiorek
When the PS_COSMETIC line style is set in CREATEPEN, line width should be set to one logical unit and a style that is a solid color This patch is fixing that, allowing to properly import EMF file. The corresponding unit tests were added Change-Id: I1a0caf6382d9c313d9725d0b94e2fcd37122a099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105790 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-11-14tdf#35986 tdf#92315 tdf#116335 tdf#116622 Add support for MapMode TEXTBartosz Kosiorek
To properly import some EMF files, the proper implementation of MapMode Text needs to be done according to MS documentation. I have also added regression tests. Change-Id: Id788294a498b93bebb62118d13ea545f80a60f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105771 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-11-13tdf#123936 Formatting files in module emfio with clang-formatPhilipp Hofer
Change-Id: I5b0867630741713d08f533dc76c82bfb1cad9cbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105666 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11disable O(U)String::concat for internal codeNoel Grandin
in favour of the more widely used, and better optimised, operator+ Change-Id: I6a1b37e0f3d253af1f7a0892443f59b620efea63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27tdf#137413 EMF import: fix transparency in the PDF fallback caseMiklos Vajna
Commit d75c5b38911557173c54a78f42ff220ab3918573 (tdf#136836 emfio: speed up import of EMF import when the orig PDF is available, 2020-09-17) improved both performance and correctness of the EMF import, in case it had a PDF fallback. It turns out that PDF fallback can be nominally non-transparent, and still the EMF equivalent supports transparency. Fix the problem by enabling transparency in the PDF-in-EMF case. Change-Id: I4d1585a5db6f28bd9c9cb380b5f193f4d5edcc8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104849 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-22long->tools::Long in emfio..filterNoel
Change-Id: I961cee10d45d628ff70dea0694a7a63a4fe867ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
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>
2020-10-02loplugin:reducevarscope in desktop..emfioNoel
Change-Id: I25ca760ae15114ada621d928997a7117401c75d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-21update pchesCaolán McNamara
Change-Id: I41a204fbc5e2c9b819fb948c5288f8d7b4195489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103117 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-21emfio: fix emf/wmf test cppunit name vs makefile nameMiklos Vajna
The convention is that CppunitTest_foo is defined in CppunitTest_foo.mk, but we got an extra "_test" suffix here, fix that. Change-Id: I226031c99c457e1b54714a425fd9c7abfc876cda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103096 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-18[API CHANGE] tdf#136836 emfio: set size hint on inner PDF if used as shape fillMiklos Vajna
The bugdoc has a shape, its bitmap fill is an EMF, which is actually a PDF. The PDF is has a height of 5cm, but the shape has a height of 14 cm. Inform vcl::RenderPDFBitmaps() about the size of the shape, so the result won't be blurry. This approach makes sure that we don't unconditionally render at higher resolution, i.e. the "load a PDF of 100 pages into Online" use-case won't use more memory than before. API CHANGE, because the EMF reader is only available via UNO, though it's likely that no actual external code would ever invoke it directly. Change-Id: If1d8def0136d408a31a0cc54777a7f26430a0ff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102996 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-09-17Fix typoAndrea Gelmini
Change-Id: I7840929712a8e9bd3f46b2c718cf430b97e9b683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102970 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-09-17tdf#136836 emfio: speed up import of EMF import when the orig PDF is availableMiklos Vajna
The PPTX bugdoc has a 17MB EMF file, which has enough instructions to keep Impress busy for minutes during import. Take advantage of the detail that this EMF has a EMR_COMMENT_MULTIFORMATS record that contains the original PDF, which can be rendered much faster: - old cost: 122.153 seconds - new cost: 1.952 seconds (1.6% of baseline) Change-Id: I38efc1c24e21a7622377b9e1c1938ebee826bae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102918 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-08-15remove constructor with plain Bitmap from Graphic, use BitmapExTomaž Vajngerl
Change-Id: Ie429a10a8f54c6779d437ee4bc75a5ea0c427848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100727 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-05Silence loplugin:staticmethods when the definition involves preprocessingStephan Bergmann
...to help avoid false positives. (Another option to silence such warnings is to add (void) this; to false-positive function bodies, but this new approach may be more natural in certain cases.) Change-Id: Ie6ea908730c596dbfb62ff42ae60dbd0a00a8fc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100152 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-13move Primitive2dXmlDump from drawinglayer::tools to drawinglayer NSTomaž Vajngerl
drawinglayer::tools causes conflicts with ::tools namespace, so better to move Primitive2dXmlDump out from this namespace as for inspecting purposes it ccan be injected into existing code which could break make it conflict and break compilation. Change-Id: I5f9e594b2b8b1dd24067fa5f5ca3cfc4eefb85cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98627 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-12update pchesCaolán McNamara
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-06emfio: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: I1685fe05a2a6b1761e78359596c265ac6487f99b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: emfioStephan Bergmann
Change-Id: Id7ceb329a6fa6f2af15bf4599ef97dcbd44fa64d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97559 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-30tdf#133448 tdf#133435 ignore broken rectangles so can we load dodgy EMF/WMFNoel Grandin
regression from commit 059f07f9f33460c809a93e0fda1165f5c6f6d805 fixes for code creating reversed Rectangles Change-Id: Ia4d41ac6845afcae3da1c259d8fbf48aa7db3489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29loplugin:simplifybool in dbaccess..frameworkNoel Grandin
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in editeng..extensionsNoel Grandin
Change-Id: Ie93ac69592c3625b8e2e5db3619ce24597a07a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-07fix memory leak of xmlDoc objectsNoel Grandin
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Extract getting default locale for filters into separate unotools functionMike Kaganski
Change-Id: Ic97b1a4507d5629963f360147ecc20eb10f5d391 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-27Don't convert OUString to char*Mike Kaganski
Change-Id: I3bfcc6fedb782b12be1fb1d42981756287f29f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92956 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-16fixes for code creating reversed RectanglesNoel Grandin
ie. where left > right or top > bottom These are all places where the code is self-evidently doing the wrong thing. Found by adding asserts to tools::Rectangle. In theory, this is legit, and code that wants a proper Rectangle is supposed to be first call Justify on a Rectangle, but lots of places don't do that, and that seems very dodgy to me. So lets work towards Rectangles always being in a valid state. Change-Id: I03296a624bd9b5b193e6aa8778addfb09708cdc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:flatten in embeddedobj,emfioNoel Grandin
Change-Id: Ibaf5e1a4db1088322cf8c5e127d328b140406197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-23make more classes private in mergedlibs modeNoel Grandin
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16tdf#124424 EMF+ Extend test options of SvgLinearGradientPrimitive2DBartosz Kosiorek
The extended options were used in LinearGradient tests Change-Id: I44336edda2d82f936b6e931668bdac46ee7899e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90541 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2020-03-15tdf#124424 EMF+ Add tests for LinearGradientBartosz Kosiorek
Change-Id: I85dadb067c4e77b47504dee8bb11b4c15b6ead8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90536 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2020-03-12comparison operators should be constNoel Grandin
Change-Id: Ifa76e004128223460945d58d1c59c4e23db0f108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...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 "&lt;"/"&gt;" 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>
2020-02-16clang-format c*,d*,e* with under 5-percent lines of changeMuhammet Kara
Files which could become clang-format conformant with under 5-percent lines of change relative to the total count of lines in the file are found by using bin/find-clang-format.py, and fixed with /opt/lo/bin/clang-format -i <path-of-the-file> There will be follow-up patches to fix all 'under-5-percent' files. Change-Id: I06087a1385ca9da6a28d36ea4c0d2e40bdbf8f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88774 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"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>
2020-01-20fix constants according to [MS-EMF] 2.1.10Andras Timar
Change-Id: I048eb097e9570f2ad2fecef5e725c98e36e6559e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87078 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-01-15tweak GetBitmap methods in BitmapExNoel Grandin
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>
2020-01-14loplugin:finalclasses in basic..emfioNoel Grandin
Change-Id: I1b0df1a6cb5b8db9db09cb1d55d932459ab16d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-10use more std::make_sharedNoel Grandin
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>
2019-12-20tdf#42949 Fix IWYU warnings in emfio/Gabor Kelemen
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>
2019-12-19sal_Char->char in editeng..eventattacherNoel Grandin
Change-Id: Ia9c736042a07a17377db6d88c5bcd2b468e98777 Reviewed-on: https://gerrit.libreoffice.org/85471 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-06Fix some new dependencies on boost_headersStephan Bergmann
...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>
2019-12-04vcl: fix number of polygons shown in SAL_INFO messageChris Sherlock
Change-Id: I9a2c28f465b881583caae8d865d63b701213f8ee Reviewed-on: https://gerrit.libreoffice.org/84139 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...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>