summaryrefslogtreecommitdiff
path: root/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2020-08-14loplugin:simplifybool moreNoel Grandin1-2/+2
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin2-20/+20
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara1-3/+1
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-31loplugin:unusedmethodsNoel Grandin2-60/+0
Change-Id: I0d888b565b0b53b318b790926667d7ba49504411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-30loplugin:unusedmethodsNoel Grandin1-13/+0
and tweak the plugin a little to speed it up Change-Id: Ia59456232602184c4f1b5d1d75ad94a9a2e2d0be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99799 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-30svx: GalleryObjectCollection shared class and related refactoring workAditya1-0/+48
Add GalleryObjectCollection, a shared class primarily owned by GalleryTheme which contains object list to be used by GalleryTheme and GalleryBinaryEngine. Refactor ImplCreateUniqueURL, InsertGraphic() Implement comphelper::GraphicMimeTypeHelper::GetExtensionForConvertDataFormat() Refactor Actualize(), implement updateSvDrawObject(), updateTheme() Move ImplCreateSvDrawStorage into constructor instead of calling in directly. Change-Id: I6a8c552268628b4e192f45112ac9e8789c6e1609 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99035 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-25loplugin:unusedmethodsNoel Grandin1-32/+0
Change-Id: I3a35c988b1c55b16958172ed5ef4e2d5cb410e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22tdf#81522 comphelper: just ignore disposed obj on saveJustin Luth1-66/+73
Even if xObj.is(), it might be disposed, and then getCurrentState() will raise an exception, resulting in an ERRCODE_IO_GENERAL, and failing to save the entire document. Although it might not seem good to just ignore an error on save, the general attitude in that function already leans that way. In fact, the other ::StoreChildren() wraps the entire for-loop in a try-catch. Also, in this function a bad xPersist also breaks out of the loop and returns a false. So wrapping the entire xObj in an "ignore if errors" try-catch seems reasonable to me in this instance. The alternative is not to allow the user to save at all, which is much worse, especially since there is nothing he can do to fix the problem. Change-Id: I0372245563735ae7ac7976bf7ce6060e57a5eb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99129 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-21loplugin:unusedmethodsNoel Grandin4-105/+1
Change-Id: I3520c2e97bb5b1611dcce77ca9f8393b29e75a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16loplugin:unusedmethodsNoel Grandin2-20/+0
Change-Id: Ibc1ec64cba8eb083aaff28848a42337cc597ea19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15comphelper: don't hardcode hash sizes in Hash::getLength()Miklos Vajna1-4/+4
Instead move the constants from filter to comphelper and reuse them. Change-Id: Ib7061e9028ccf6067b4e86f50145c1472c2b01d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98785 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-12update pchesCaolán McNamara1-1/+2
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 Behrens1-1/+1
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-10replace usage of whitelist with allowlistThorsten Behrens1-11/+11
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-05comphelper: create instances with uno constructorsNoel Grandin5-126/+11
See tdf#74608 for motivation Change-Id: Ib7aa69cdf62992cea38a60aac9169c2f1779c1cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98094 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: comphelperStephan Bergmann8-25/+25
Change-Id: I222ea673a44528cb04847a912cd8da971bb1be3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97542 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin1-10/+2
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>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin1-4/+4
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-03Upcoming loplugin:elidestringvar: comphelperStephan Bergmann6-31/+15
Change-Id: Id388af90ca2c3dff435a1a6261e3de0c3c0dbdbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95376 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29use for-range loop on SequenceNoel Grandin7-74/+61
Change-Id: Ib2d7b21e0fa52087027c0b3b1d362693c7019ba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29improve pahole script and pack a few classesNoel Grandin1-2/+2
(*) fix: I was substracting the padding space instead of adding it when calculating how much free space we had to improve. (*) sort input data, so we process structs located in the same DSO together, which reduces GDB's memory usage (*) handle another error condition, where gdbs output is sufficiently mixed up that we miss the end of commands terminator Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-28loplugin:simplifybool in canvas..cuiNoel Grandin1-1/+1
Change-Id: Ib7c3b381ce4456e3d48538ee6f762ceaf2784fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-15replace hard-coded "1.2" ODF version stringsMichael Stahl1-2/+3
Most of these are calls to DocumentDigitalSignatures::createWithVersion(), where it doesn't make a difference if "1.2" or "1.3" is passed in but maybe it will be different with "1.4". There is another ctor createDefault() which looks appropriate for non-ODF contexts and can also be used when no actual signing or verifying is done. In cases where there's an actual document its Storage has the version. Change-Id: Id636bbf965d9f96c7ed5f50774c509032525b2b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93091 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-1/+1
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10lok: set device form factor of the client on view creationMarco Cecchetti1-36/+0
This patch allows the lok core to know about the device form facor of the client requesting the creation of new view, immediately instead of a later time. When a new view is needed a "DeviceFormFactor" parameter is forwarded to lo_documentLoadWithOptions and doc_createViewWithOptions from the client. This parameter can have one of the following values: 'desktop', 'tablet','mobile' and it is used to set a global variable accessible by SfxLokHelper::setDeviceFormFactor and SfxLokHelper::getDeviceFormFactor. This global variable is retrived in the SfxViewShell constructor for setting SfxViewShell::maLOKDeviceFormFactor attribute. In SfxViewShell we have the following 3 methods: - bool isLOKDesktop() - bool isLOKTablet() - bool isLOKMobilePhone() which replace the following boolean functions: - comphelper::LibreOfficeKit::isTablet - comphelper::LibreOfficeKit::::isMobilePhone Change-Id: I9b36f354278df8c216fcb90f6a9da8256ec9c1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93340 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-08improve loplugin:referencecastingNoel Grandin1-1/+1
to catch a few more cases Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in canvas..cuiNoel Grandin1-2/+2
Change-Id: I7bd0c2a55b936896fcfe7e1a374871008a18618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-06allow disabling Skia's Vulkan use in safe mode (tdf#132439)Luboš Luňák1-0/+5
Change-Id: I2991ace387356f049fba1a730041bbb4c62c876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93562 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-04fix leak in comphelper::TestHashNoel Grandin2-0/+19
by shutting down NSS at end of test Change-Id: I63694e9bc54e8c142592005be353af7ed95d444d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93427 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29tdf#131733 Show only CN part of X.509 subject infoGabor Kelemen1-14/+5
The problem was that the whole Subject info was returned from X.509 certs if they did not start with one of "CN", "OU", "O", "E" Instead of extending this list with random keys, pass the type of cert and only return the whole Subject info if it's an OpenGPG one, and process the info unconditionally if it's X.509 like before the OpenGPG integration Change-Id: I1aa5d7285e48b0f4a769a073cdfb7732e482792c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92675 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann2-1/+4
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>
2020-04-26update pchesCaolán McNamara1-2/+2
Change-Id: I83a61da7dda6c72552eecd377f1c3744c92a797e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22uiobject.hxx only needs forward declaresCaolán McNamara1-2/+3
and update pches accordingly Change-Id: I411712532fd85961bffe6678416fcdc1d9c7f53d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92617 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-18loplugin:flatten in comphelperNoel Grandin16-507/+508
Change-Id: I1a8db4dbd744b87406d1db5609585495f01f4403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14loplugin:buriedassign in c*Noel Grandin1-3/+6
Change-Id: Id14fed7e5c0f588ad3c927f12251432d12c1a7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-26Check call to NSS_NoDB_Init for successStephan Bergmann1-1/+7
I had run into this when prior to 23245f723fb29262b8543d6447d1b0bb69cb50fb "external/nss: Fix rpath for Linux et al" that call had failed at least for my Linux ASan+UBSan build, causing UITest_calc_tests to fail with > ../../lib/cryptohi/sechash.c:443:16: runtime error: member access within null pointer of type 'HASHContext' (aka 'struct HASHContextStr') > #0 in HASH_Begin at workdir/UnpackedTarball/nss/nss/out/Debug/../../lib/cryptohi/sechash.c:443:16 (instdir/program/libnss3.so +0x3c47eb) > #1 in comphelper::HashImpl::HashImpl(comphelper::HashType) at comphelper/source/misc/hash.cxx:78:9 (instdir/program/libcomphelper.so +0x149945a) > #2 in comphelper::Hash::Hash(comphelper::HashType) at comphelper/source/misc/hash.cxx:96:16 (instdir/program/libcomphelper.so +0x1496eb7) > #3 in vcl::PDFWriterImpl::PDFWriterImpl(vcl::PDFWriter::PDFWriterContext const&, com::sun::star::uno::Reference<com::sun::star::beans::XMaterialHolder> const&, vcl::PDFWriter&) at vcl/source/gdi/pdfwriter_impl.cxx:1137:9 (instdir/program/libvcllo.so +0x8f20d3c) because that HASH functionality was used even though initializing it had failed. Throwing a RuntimeException appears to be effective, even though conceptually not the best approach: at least doing "Export Directly as PDF" of a fresh Writer document fails cleanly with an error box "Error saving the document Untitled 1: General Error. General input/output error." Change-Id: I07564a7f27a7b44e535556032e0eeb267026f06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91088 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-24Simplify the LibreOfficeKit mobile phone and tablet APITor Lillqvist1-4/+8
There is not need to ever change the kind of device a view is for, so why bother with the bool parameter to setMobilePhone() and setTablet(). Also, make sure just either of them is called, at most once, for a view. Change-Id: I9ac872f0ab4772e4a7c40c49f62b32fa7b1e47f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90968 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-03-20Rename isMobile to isMobilePhone and introduce a separate isTabletTor Lillqvist1-9/+22
The intended semantics of isMobile() has been to say whether the device is a mobile phone ot not. Not whether it is a mobile device in general. So make that explicit. Adjust call sites as necessary. Also, in a couple of places where it is likely that what is relevant is whether it is a mobile device in general, not just whether it is a mobile phone, check both isMobile() and isTablet(). For stable interoperability with current Online, keep accepting also the .uno:LOKSetMobile "command" (and .uno:LOKUnSetMobile, except that Online never sends that). Online will eventually be changed to use .uno:LOKSetMobilePhone or .uno:LOGSetTablet only (and never the UnSet variants). Also drop the default value for the bool parameter to setMobilePhone(). Default bool parameters can be quite confusing, and it was especially silly in this case as there is one (1) call site. This is a work in progress and will be improved. Currently there are undefined corner cases. Change-Id: I2a71c37323ee151cbc671bd8e714e1dee10f8b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90560 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90778 Tested-by: Jenkins
2020-03-18comphelper::isDebuggerAttached must be defined irrespective of NDEBUGStephan Bergmann1-1/+1
ac9083f64fc064e4bad3dc522a90ca214b3f1c2f "make isDebuggerAttached() public comphelper API" had forgotten to drop the NDEBUG condition, causing --enable-dbgutil --disable-assert-always-abort builds like <https://ci.libreoffice.org//job/lo_tb_random_config_linux/2215/> to fail with > /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /lo/home/tdf/lode/jenkins/workspace/lo_tb_random_config_linux/workdir/CxxObject/vcl/source/app/watchdog.o: in function `WatchdogThread::start()': > /lo/home/tdf/lode/jenkins/workspace/lo_tb_random_config_linux/vcl/source/app/watchdog.cxx:138: undefined reference to `comphelper::isDebuggerAttached()' > collect2: error: ld returned 1 exit status > /lo/home/tdf/lode/jenkins/workspace/lo_tb_random_config_linux/vcl/Library_vcl.mk:20: recipe for target '/lo/home/tdf/lode/jenkins/workspace/lo_tb_random_config_linux/instdir/program/libvcllo.so' failed Change-Id: Ia391881f0b6a79709fbebfd204097840a9890147 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-14tdf#130975 replace `rtl::math::isNan` with `std::isnan`.Yukio Siraichi1-1/+1
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-04comphelper: allow simple ad-hoc measuring with ProfileZonesMiklos Vajna1-0/+9
And then remove the manual measuring from the RTF import. Sample output: comphelper::ProfileZone: RtfFilter::filter finished in 180 ms Change-Id: I85e2e12d82ff491a2991a41e5a6f6d1410e12363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89905 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28change SAL_WARN to SAL_INFO when language is not setTomaž Vajngerl1-2/+2
Change this, so we don't fill the console with warnings. Change-Id: I089113207be99b50b15cf292cae3e929f9edff26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89556 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit af17b2cd26a1e36edf0b995f81a2e0757086dad1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89676 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-25Fix currency symbol selection in Calc on mobileTomaž Vajngerl1-10/+63
In LOK we use one language identifier for both - UI language and the locale used. This is a problem when we determine that we a language for UI is not available and fall-back to the default "en-US" langauge, which also changes the locale. This introduces a separate variable that stores the language tag for the locale independently to the language. Another problem is that in some cases we don't reset the staticly initialized data, when the new document is loaded, which is on the other hand used to define which currency symbol is used as SYSTEM locale. That can in some cases select the wrong currency symbol even when we changed the locale to something else. This fix introduces a reset function, which is triggered on every document load. Change-Id: I55c7f467600a832895f94346f8bf11a6ef6a1e49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89320 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89343 Tested-by: Jenkins
2020-02-21Drop o3tl::optional wrapperStephan Bergmann3-10/+10
...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-17inline some acquire/release callsNoel Grandin1-10/+0
because these are all on the hot path, and in the best case, with enough inlining, the compiler can skip the call altogether and just do a locked CMPXHG instruction Change-Id: I099d6385f602e40e1767f9f1002b7514ecf436e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-16clang-format c*,d*,e* with under 5-percent lines of changeMuhammet Kara1-2/+2
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-11android hunspell: All languages we pack are the supported ones.Jan Holesovsky1-0/+5
Without this, we disable all the languages, because the env. variable is not set. Change-Id: If8f6a9ec6270391d1f8c2bf225c8ea4bb1aae688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88220 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88367 Tested-by: Jenkins
2020-02-08pack some data structuresNoel Grandin1-2/+2
Change-Id: I7ef990b8aa7b26c413b54186c360ed3f858d4e26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07make isDebuggerAttached() public comphelper APILuboš Luňák3-30/+60
So that it can be used also from other places. Change-Id: Iab90350fd02872ffde180ce74f01f7ff5e4448b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88009 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák1-2/+2
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>