summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2017-06-28loplugin:oncevar in ucb..vbahelperNoel Grandin8-38/+21
Change-Id: I1fc7c7505a42b3bf9d4a5ab22961930b9831d4ae Reviewed-on: https://gerrit.libreoffice.org/39327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26s/catched/caughtNoel Grandin1-1/+1
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18Fix typosAndrea Gelmini1-1/+1
Change-Id: If28e198b8e1a26660e07dce49db66a651de43d3f Reviewed-on: https://gerrit.libreoffice.org/38850 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke3-4/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-17replace misc double checked locking patternsJochen Nitschke2-22/+4
... with thread safe local statics Change-Id: Ie3c8023776a388846b989f00a0be185273c0d5da Reviewed-on: https://gerrit.libreoffice.org/38907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17use local statics in getTypes functionsJochen Nitschke1-23/+16
... instead of double checked locking patterns. Change-Id: I1b86ce723ff22dd357b3ed69a52757b085472424 Reviewed-on: https://gerrit.libreoffice.org/38906 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16loplugin:unusedfields in tools..vbahelperNoel Grandin2-6/+0
Change-Id: Ief7d4c8e1866604eda6308ea2a5c1ce4b1c093bc Reviewed-on: https://gerrit.libreoffice.org/38836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use more SAL_N_ELEMENTS part 1Noel Grandin1-3/+1
- teach comphelper::containerToSequence to handle sized arrays - also use range based for-loop where appropriate. Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99 Reviewed-on: https://gerrit.libreoffice.org/38769 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12cleanup unused css/frame/* includesJochen Nitschke1-1/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-10-Werror=unused-variableMarkus Mohrhard1-2/+0
Change-Id: I98af7f2f6f14555eda8a20c49a614401685b6eb5 Reviewed-on: https://gerrit.libreoffice.org/38625 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-06-07Make use of OUString::startsWithIgnoreAsciiCase rest parameterStephan Bergmann1-2/+1
Change-Id: Id5d1df581307ea6eb4e3e634d14ed3dbbe914544
2017-06-06ucb: replace double checked locking patternsJochen Nitschke15-328/+71
with thread safe local statics and prefix statics Change-Id: Iaa7c9056847f75612d6cf6c6e44d3896fca734de Reviewed-on: https://gerrit.libreoffice.org/38433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05spelling instanciate -> instantiateNoel Grandin6-10/+10
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81 Reviewed-on: https://gerrit.libreoffice.org/38401 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01clang-tidy misc-string-compareNoel Grandin2-2/+2
Change-Id: Ic5250563b7dc9c19771d3f728d2087ef335ceb46 Reviewed-on: https://gerrit.libreoffice.org/38279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-31Remove some unnecessary scaffolding around SAL_WARN callsStephan Bergmann1-1/+0
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin2-5/+0
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30FTPURL::parse doesn't need so much string conversionNoel Grandin1-40/+41
just do all the work on an OUString Change-Id: Id8c03203dd793fa9351d0d4d46a7726bafd7d814 Reviewed-on: https://gerrit.libreoffice.org/38183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin1-1/+1
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-3/+1
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: ucbStephan Bergmann4-5/+5
Change-Id: I9ea5e17673ec91fcbb1c7e42df3820c80aa90b93
2017-05-18Revert "Fix typos"Stephan Bergmann1-1/+1
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini1-1/+1
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-12fix build after 185ed3ddb8c01ee4465ce559e37113824f57b5c7Markus Mohrhard1-1/+1
Change-Id: I2c4f8df6009e407cb0da6fa1b7317a681647d89d
2017-05-12remove unused uno::Reference varsNoel Grandin5-6/+0
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke18-18/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-08teach loplugin:constantparam about simple constructor callsNoel Grandin3-5/+4
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock6-10/+10
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert ucb and svl from OSL_ASSERT to assertChris Sherlock6-10/+10
Change-Id: I34579b2ec0b9a2a98361108bc259ddb1fc1df7b5
2017-05-05loplugin:checkunusedparams in toolkit..vbahelperNoel Grandin6-11/+9
the extra argument on the runtimeexception method was only ever passed an "OUString()" Change-Id: I0ea19ae9328760918f1267f27ba103432fff0b47 Reviewed-on: https://gerrit.libreoffice.org/37274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: ucbStephan Bergmann3-8/+8
Change-Id: I236cf168d144debef1ba46cb6294f109773d0636
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin9-64/+26
Change-Id: Iea7ab64683f0b29794d50d774cc482b54a00e70a Reviewed-on: https://gerrit.libreoffice.org/36450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27tdf#39468 cleanup source code commentsdennisroczek1-13/+5
* translate German source code comments * remove ascii art * remove bogus source Code comments * remove old StarOffice/Sun internal bug tracker references Change-Id: I443bf2fdba3780c411d69809111daf3aa3a48451 Reviewed-on: https://gerrit.libreoffice.org/36005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock13-0/+13
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky13-13/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-5/+5
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19file UCP: Dir entries can disappear during non-atomic traversalStephan Bergmann3-44/+59
...so allow for that by reporting failure to call osl::DirectoryItem::getFileStatus from TaskManager::getv, and make XResultSet_impl::OneMore ignore such lost entries. While there may be legitimate cases where getFileStatus in getv would fail (and thus SAL_INFO would be more appropriate), the broken, non-atomic design means that such failure is likely unexpected (and worth a SAL_WARN). Occasionally ran into this when building UBSan builds, which sometimes failed in one of the extras/Gallery_*.mk like > ucb/source/ucp/file/filrset.cxx:235:60: runtime error: load of value 96, which is not a valid value for type 'bool' > #0 0x7f079bff575e in fileaccess::XResultSet_impl::OneMore() ucb/source/ucp/file/filrset.cxx:234:60 > #1 0x7f079bff823e in fileaccess::XResultSet_impl::next() ucb/source/ucp/file/filrset.cxx:288:16 > #2 0x7f0800a109a8 in Gallery::ImplLoadSubDirs(INetURLObject const&, bool&) svx/source/gallery2/gallery1.cxx:291:36 > #3 0x7f0800a0c88c in Gallery::ImplLoad(rtl::OUString const&) svx/source/gallery2/gallery1.cxx:202:5 > #4 0x7f0800a0bfa5 in Gallery::Gallery(rtl::OUString const&) svx/source/gallery2/gallery1.cxx:167:5 > #5 0x522e13 in createGallery(rtl::OUString const&) svx/source/gengal/gengal.cxx:62:16 > #6 0x52979a in createTheme(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, std::__debug::vector<INetURLObject, std::allocator<INetURLObject> >&, bool) svx/source/gengal/gengal.cxx:76:16 > #7 0x52853d in GalApp::Main() svx/source/gengal/gengal.cxx:318:9 > #8 0x7f080f6f8c36 in ImplSVMain() vcl/source/app/svmain.cxx:191:35 > #9 0x7f080f706571 in SVMain() vcl/source/app/svmain.cxx:229:16 > #10 0x56aa0a in sal_main() vcl/source/salmain/salmain.cxx:41:12 > #11 0x56a99f in main vcl/source/salmain/salmain.cxx:35:1 > #12 0x7f07fbaf5400 in __libc_start_main /usr/src/debug/glibc-2.24-33-ge9e69e4/csu/../csu/libc-start.c:289 > #13 0x42e219 in _start (instdir/program/gengal.bin+0x42e219) > > SUMMARY: AddressSanitizer: undefined-behavior ucb/source/ucp/file/filrset.cxx:235:60 in > solenv/gbuild/Gallery.mk:58: recipe for target 'workdir/Gallery/education.done' failed presumably because some other part of the build changed instdir/share/config/ in parallel. (And doing > while (touch instdir/share/config/TEST && rm instdir/share/config/TEST); do :; done in parallel to 'make extras' indeed causes this issue to occur easily.) Change-Id: I115ac727f99eed209b223d828c33060b275daaaa
2017-04-13Removed duplicated includesAndrea Gelmini1-2/+0
No automatic tools. Manual checked and tested. Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754 Reviewed-on: https://gerrit.libreoffice.org/36371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-10loplugin:inlinefields in ucb_impl::RegexpMapNoel Grandin1-29/+27
Change-Id: Id8cf4a9e7f85048dac37fc1256427214abe3ac8c Reviewed-on: https://gerrit.libreoffice.org/36265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-10use unique_ptr in RegexpMapImplNoel Grandin1-11/+4
Change-Id: I150bd441281305346bf6be1844894ae857dd50f7 Reviewed-on: https://gerrit.libreoffice.org/36264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05tdf#106955: Open WebDAV resources on which PROPFIND failsMike Kaganski2-108/+172
When PROPFIND fails on a WebDAV resource, its IsDocument property stays undefined, and so stream creation fails. Proposed solution is to default to IsDocument=true for all WebDAV documents where we cannot get the property from server. Such resources also fail to return their locking options, so defaulting to server properties. When later locking is attempted on it, the attempt fails with user notification (a dialog saying that getting information from server failed). Proposed solution is to check Content-Disposition header in such resources, and in case it's attachment, disable lock on this resource. The rationale for this is that "In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed ... as an attachment, that is downloaded and saved locally" (see MDN: https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition Also, Content::getProperties wasn't ready for PROPFIND returning empty result. Change-Id: I91dbffa8bdf0fe900c11d2f8c9c9394d2104bb49 Reviewed-on: https://gerrit.libreoffice.org/36090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-03use actual UNO enums in test..vbahelperNoel Grandin1-4/+4
Change-Id: I2e38462045efedc31903589a3fa4e6f62d74d8de Reviewed-on: https://gerrit.libreoffice.org/36042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30NeonSession_NeonAuth(): avoid redundant OUString->OString conversionVitaliy Anderson1-9/+5
Change-Id: I6b8515c25d58a88a040d4e08e36ffbd442228828 Reviewed-on: https://gerrit.libreoffice.org/35915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-03-25Fix typosAndrea Gelmini9-12/+12
Change-Id: Ieea40e1b7282267157810f9f58ca083e68ae6715 Reviewed-on: https://gerrit.libreoffice.org/35659 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin1-1/+1
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17cleanup double includes and declarationsJochen Nitschke2-4/+0
Change-Id: I770e09f48b1a3e8299f59a8e475ba3c18d436d7b Reviewed-on: https://gerrit.libreoffice.org/35312 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-03-14try to fix webdav buildMarkus Mohrhard1-0/+5
Found by the "Random Condig" tb run #293. Change-Id: I8fa7b66444b9b57f289c963cb1da5e772341dc30 Reviewed-on: https://gerrit.libreoffice.org/35156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-13tdf#95416 remove ../ in #include headers of sfx2 filesJeevan1-1/+1
Change-Id: I5f3e1a8fe559500aec7ea9e38edaba42dff3f98b Reviewed-on: https://gerrit.libreoffice.org/35028 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann4-6/+6
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-02Fix typosAndrea Gelmini2-2/+2
Change-Id: I139e6948e92a7bcdce5a2197b9d3754cb9549a33 Reviewed-on: https://gerrit.libreoffice.org/34781 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28new loplugin unoanyNoel Grandin7-28/+25
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>