summaryrefslogtreecommitdiff
path: root/include/tools
AgeCommit message (Collapse)Author
2020-01-08Grammar fixesAndrea Gelmini
Change-Id: I6ac6f6abb601aa254e94612e6826488393de8e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86383 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-12-28pdf: extract XMP metadata writing and use XmlWriterTomaž Vajngerl
Instead of writing XMP metadata with a string buffer, change to use XmlWriter instead. Extract XMP metadata writing into its own class vcl::pdf::XmpMetadata. This also needs a change to the XmlWriter to not write a classic XML header: '<?xml version="1.0" ... ?>' Change-Id: I95ea0e7ba58e7c43a0c707bf9c676994210ff104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85908 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-12-23sal_Char->char in toolsNoel Grandin
Change-Id: Id8be02e445ac439439b2f78ba4a7376dd19ce360 Reviewed-on: https://gerrit.libreoffice.org/85744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18tools: define DbgTestSolarMutex() unconditionallyMiklos Vajna
See the discussion at <https://gerrit.libreoffice.org/#/c/58170/>, and this came up on IRC today again. The above change broke the invariant that you can mix product and debug (but not dbgutil) builds. Restore this, without mandating dbgutil for the solar mutex assert code, which is useful for plain debug builds as well. Change-Id: I1f8bdb114b129fc4f39f186ba917e35e346a16b5 Reviewed-on: https://gerrit.libreoffice.org/85369 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-12SvFileStream::Lock/UnlockRange are only called from within SvFileStream itselfStephan Bergmann
...and only for whole-file locking, so simplify the implementations in strmunx.cx and strmwnt.cxx accordingly Change-Id: I973e0ea41f246ad614232b107c8bf152073867be Reviewed-on: https://gerrit.libreoffice.org/85039 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-05make some classes module privateNoel Grandin
Mark some stuff SAL_DLLPUBLIC_RTTI in include/vcl/metaact.hxx in order to make ASAN happy. Change-Id: I97febe0968bf58b9cbe60ce647f0ada25e6f4bb0 Reviewed-on: https://gerrit.libreoffice.org/84202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-04Use SAL_STRINGIFYStephan Bergmann
Change-Id: I2bfc35ee72ab0a27902aa8382ccb6b6dce9126be Reviewed-on: https://gerrit.libreoffice.org/84406 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-17cid#1455745 Not restoring ostream formatCaolán McNamara
Change-Id: Ie5b73bca282a279a0318e42499d44f19822b1554 Reviewed-on: https://gerrit.libreoffice.org/83017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-03find symbols that can be privateNoel Grandin
update the script and make private standalone functions Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1 Reviewed-on: https://gerrit.libreoffice.org/81879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-30loplugin:finalclasses toolsNoel Grandin
Change-Id: I6577a0947acda837dd3f775b10fc09bac9fbb27e Reviewed-on: https://gerrit.libreoffice.org/81728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19add menubar support to vclbuilderCaolán McNamara
Change-Id: Ibe9a820f178a955eec21b96796e346d785b835b6
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-12All occurrences of WriteOStringBuffer(b) can easily be replaced...Stephan Bergmann
...with WriteOString(b.makeStringAndClear()) Change-Id: I46be4f80d6633b5c51a2c3d99f9faf0db5764d3f Reviewed-on: https://gerrit.libreoffice.org/80704 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-10convert WriteCharPtr..getStr to WriteOStringNoel Grandin
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-29Move Rectangle,Point,Size serialization to GenericTypeSerializerTomaž Vajngerl
Change-Id: Iae489fc31b13b836e1df5327ba2fa07e0325907a Reviewed-on: https://gerrit.libreoffice.org/79793 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-09-18remove unused crc functionality from ZCodecNoel Grandin
Change-Id: I3e57e815b538ad5749b4bab3d4ef8e295cbe116b Reviewed-on: https://gerrit.libreoffice.org/79098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06TyposAndrea Gelmini
Mainly fixing '....' and '..' Change-Id: Ic928701b319868671b826d757dd94c296fd5e942 Reviewed-on: https://gerrit.libreoffice.org/78668 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-30fix PolyPolygon move operator=Noel Grandin
and add move constructor, found by loplugin:noexceptmove Change-Id: I89507113b354c4ae080f7107c996b55ab1285738 Reviewed-on: https://gerrit.libreoffice.org/78285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-30new loplugin:noexceptmoveNoel Grandin
idea from mike kaganski look for places where we can mark move operators as noexcept, which makes some STL operations more efficient Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f Reviewed-on: https://gerrit.libreoffice.org/78251 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-28INetURLObject::setFSysPath is unused nowStephan Bergmann
...after 056e1fff2ed232f2a50db933fbade1c71c0c2a65 "Simplify code removing the last segment from a URL" Change-Id: I3abe84ada119356191d8df9c0a8ee62dcf18d108 Reviewed-on: https://gerrit.libreoffice.org/78228 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-28INetURLObject FSysStyle ctor is unused nowStephan Bergmann
...after 90e33df14a1bdff55c4759102658dba7510a733a "Always using translateToInternal should be fine in SalGtkPicker::uritounicode" Change-Id: I3712109ef875ce8961d2da904a38400e0cf97496 Reviewed-on: https://gerrit.libreoffice.org/78166 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-23loplugin:returnconstval in toolsNoel Grandin
Change-Id: Ic00c0a6788e65ba2b50e93d49592e67596354f96 Reviewed-on: https://gerrit.libreoffice.org/77998 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-22weld ODbTypeWizDialogSetupCaolán McNamara
split up RoadmapWizard to sit its wizard logic on top of a a native GtkAssistant a) awkwardly GtkAssistant is not a GtkDialog, but derives directly from GtkWindow so some shuffling around required due to that b) hidden/unused pages are shuffled to the end of the list of pages and their titles turned off in order to hide them from the roadmap c) some nonstandard hackery required to get the gtk roadmap titles to wrap Change-Id: I0d2346c489fef744136a2785f33c846d97bd8dc6 Reviewed-on: https://gerrit.libreoffice.org/76876 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16Fix typosAndrea Gelmini
Change-Id: I5d0776d5f90f44ebbeeb5916cbbf6e87406adcad Reviewed-on: https://gerrit.libreoffice.org/77609 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini
Change-Id: Id20e239b8a5a2dababe9284dc30d4d155ffecfc5 Reviewed-on: https://gerrit.libreoffice.org/77322 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-07-20Fix typosAndrea Gelmini
Change-Id: I8561dc27229a2430bfdfd8ac806139b4450496c7 Reviewed-on: https://gerrit.libreoffice.org/76026 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-18include supported SIMD intrinsics headers automaticallyTomaž Vajngerl
If we include simdsupport.hxx, this now includes the supported intrinsics headers automatically, so this removes the need to do it ourselves. Change-Id: Icc406316a7e27b7b5fd5905f51664f4fe47e5468 Reviewed-on: https://gerrit.libreoffice.org/75783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-17cid#1399432 Uncaught exceptionCaolán McNamara
Change-Id: I6dd5ce2e3b5b9d30d4e7e56c837fd8ccff6c99a3 Reviewed-on: https://gerrit.libreoffice.org/75733 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-15make tools::Rectangle::getBottom return 0 when emptyNoel Grandin
LayoutConverter::calcAbsRectangle needed to be tweaked because we now end up with a zero width/height instead of a large negative number. Change-Id: I81f04759a1d5bf6f44753a1701596796fad40567 Reviewed-on: https://gerrit.libreoffice.org/75610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-15make tools::Rectangle::getWidth return 0 when emptyNoel Grandin
Change-Id: I5c7565309d380cdbe60a078d2c97f7dd1fae4274 Reviewed-on: https://gerrit.libreoffice.org/75517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-12make tools::Rectangle::Bottom return Top when emptyNoel Grandin
Change-Id: Ia424b91149245907b045b43aa31a622e34e6e5bc Reviewed-on: https://gerrit.libreoffice.org/75504 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-12make tools::Rectangle::Right return Left when emptyNoel Grandin
I tried making this assert, but there are just too many places where we pass around empty rectangles, so rather just return the value of nLeft, in a similar fashion to methods like Rectangle::TopLeft Change-Id: I3377071ecae26f13e895ae411cd269f0bdbe0ef6 Reviewed-on: https://gerrit.libreoffice.org/75486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::setY respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I6feb94ca2f24246b96757575288c86c0b0c54227 Reviewed-on: https://gerrit.libreoffice.org/75342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::setX respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I2beae23bbdea36e91e0e367f9a94cbc35be3cd24 Reviewed-on: https://gerrit.libreoffice.org/75337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::AdjustBottom respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I9a3f7a0356ab625681419f74af0b9884624f3642 Reviewed-on: https://gerrit.libreoffice.org/75336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-10make tools::Rectangle::AdjustRight respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: I69c717be91712b73e9d3b8f9c83d26305c052bd5 Reviewed-on: https://gerrit.libreoffice.org/75300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09make tools::Rectangle::shrink respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: Id529037e82b2fdd8c2120877a44fc7e069fc8406 Reviewed-on: https://gerrit.libreoffice.org/75298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-09CPU intrinsics detection (SSE, AVX)Tomaž Vajngerl
Adds CPU intrinsics detection in configure pass for compile time detection and "cpuid" runtime detection of which CPU instruction sets are available on the user device. Change-Id: I0ee4d0b22a7c51f72796d43e7383a31d03b437ad Reviewed-on: https://gerrit.libreoffice.org/75175 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-08make tools::Rectangle::expandBy respect empty stateNoel Grandin
and make non-inline so it is easy to disable this for debugging, if need be Change-Id: Ib383bb990ddcd835ff37e98893e44156287e0488 Reviewed-on: https://gerrit.libreoffice.org/75227 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-28tdf#126121: WebDAV redirection detectionMike Kaganski
This rewrites URI of a document opened from a WebDAV mapped UNC path on Windows (like "file://server/DavWWWRoot/Dir/Doc.odt") into HTTP URI (like "http://server/Dir/Doc.odt"). This allows using WebDAV protocol for these files, and e.g. get information about other user who locked the document to show when asking if open read-only or a copy. Change-Id: I643fa8df30d4b163783b279b1b973304fcafff37 Reviewed-on: https://gerrit.libreoffice.org/71746 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-25weld HyperLink DialogCaolán McNamara
Change-Id: Ic861b0a593505828a900fe2163125d6f5584a956 Reviewed-on: https://gerrit.libreoffice.org/74634 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25tdf#94677 Calc is slow opening large CSV, improve tools::FractionNoel Grandin
Flatten the tools::Fraction class. Shaves 1s off a load time of 49s Change-Id: I7cbee9892831a1e47704a283351fa97eda262343 Reviewed-on: https://gerrit.libreoffice.org/74639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21Fix INetURLObject::setName descriptionStephan Bergmann
...after 359e0b47a0f96ffa595a0c38a5e5318d797812fe "loplugin:unuseddefaultparams" had removed its nIndex and bIgnoreFinalSlash parameters denoting the segment whose name to set. (One would assume that a hierarchical URL always has a last segment, so the "[if] a last segment does not exist, false is returned" part be removed from the description. But for a hierarchical URL with an empty (i.e., just "/" in the canonic form) path, setName("foo") actually returns false.) Change-Id: I35b96f4687784648c141e16c0806fe49d80c940a Reviewed-on: https://gerrit.libreoffice.org/74487 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-21tdf#42949 Fix IWYU warnings in include/Gabor Kelemen
Recheck directories under include/ and below vcl in the module hierarchy. New IWYU and recent developments in f-u-i helped to identify some non self contained files, those were fixed too. Also some new removal proposals are dealt with here. Change-Id: If12ae37602eecdf3004ae0fa6623d464077d4f9f Reviewed-on: https://gerrit.libreoffice.org/74213 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-21Extend INetURLObject::setName and drop INetURLObject::SetNameMike Kaganski
Change-Id: I488313eeb363d2a9344d6bc801900d5b1f913020 Reviewed-on: https://gerrit.libreoffice.org/74463 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-21Drop INetURLObject::GetName and INetURLObject::GetExtensionMike Kaganski
They are just synonyms for GetLastName and GetFileExtension resp. Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd Reviewed-on: https://gerrit.libreoffice.org/74448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-15fix copy/paste mistake in TOOLS_INFO_EXCEPTIONNoel Grandin
Change-Id: I209efe41639eeff215b876cb1da5c9a8252f4b55 Reviewed-on: https://gerrit.libreoffice.org/74042 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-14add TOOLS_WARN_EXCEPTION,etc macrosNoel Grandin
to be used for nicer logging of exceptions, along with upcoming clang plugin Change-Id: I028c31ec329652e4842136528605b4cceaae946d Reviewed-on: https://gerrit.libreoffice.org/73949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12Revert "improve empty tools::Rectangle (width)"Noel Grandin
This reverts commit a46a257794f1f53b294735fc876c394be23a3811. Too many issues, I'm going to try landing this in smaller pieces to make it easier to fix regressions Change-Id: Ie5e8979838017af86c119c887b580385ba068d54 Reviewed-on: https://gerrit.libreoffice.org/73859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>