summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-06-14use more SAL_N_ELEMENTS part 2Noel Grandin1-1/+1
Change-Id: If00e371c3cd3ae616309a172c875faed016e391b Reviewed-on: https://gerrit.libreoffice.org/38773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13Let SfxSetItem ctor take SfxItemSet by unique_ptrStephan Bergmann1-3/+7
Change-Id: I219dd03477862169cd50eecc14822f6a023f879a
2017-06-09use comphelper::InitPropertySequence in more placesNoel Grandin1-29/+16
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09Avoid overflow in subtractionStephan Bergmann1-1/+2
Change-Id: Ib92239fd9b347efbeeeef9661a1a9180445e7739
2017-06-06Eliminate dynamic_cast<const SfxVoidItem*>, use SfxPoolItem::IsVoidItem()Eike Rathke1-1/+1
Change-Id: I09dafffd64dd107e802d016494d884f32363521a
2017-06-06Perf-sc: tdf#100709 SfxPoolItem::IsVoidItem() instead of dynamic_castEike Rathke2-1/+10
SfxItemSet::GetItemState() before, Ir: 4 048 231 416 after, Ir: 2 577 117 709 Change-Id: I26d8b91ad5d851011a670b38b7b98e5582c319cf
2017-06-06tdf#106942 Wrong message when lock file is empty or corruptJuergen Funk1-0/+7
1. Erase empty or corrupt lockfile, when reading it fails and skip "Locked Document Dialog" in that case 2. Show Dialog (use LockFileIgnoreRequest -> LockFailedQueryBox) when create lock file is not possible. Two Dialogs: "lock file create error" and "empty lockfile is present" Set the document to read-only when creating lockfile is not possible. If lockfile is corrupt or empty, inform the user. They can interrupt loading the document or open it read-only, which also erases the corrupt lock file after closing the document 3. Handling for the two Dialogs Use LockFileIgnoreRequst for create lockfile error and add a new LockFileCorruptRequest, (lock file is corrupt). Change and generate new messages for both dialogs in english Change-Id: I35c377f85b5113e8ffb89d83b9544b8ebc81d89f Reviewed-on: https://gerrit.libreoffice.org/36658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara5-5/+5
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06replace SVSTREAM_OK with ERRCODE_NONENoel Grandin1-1/+1
since the first is #define'd to the second, and offers no extra value Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450 Reviewed-on: https://gerrit.libreoffice.org/38406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05Improved loplugin:cstylecast to reference types: svlStephan Bergmann1-2/+1
Change-Id: I37cc0ba5d05c198795c6ae3d0f1037aa1221cfb6
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin1-1/+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-30remove duplicate 'using namespace'Jochen Nitschke1-6/+0
Change-Id: I7f8828f677cfb588135ff75c03ffb75895773440 Reviewed-on: https://gerrit.libreoffice.org/38201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin1-4/+4
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 Grandin2-11/+8
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-25Revert "tdf#107945: Perhaps this will make this method thread-safe..."Kohei Yoshida1-1/+1
This reverts commit 50fc62ce76bc51f18b16eae937761d0a8872df3e. The method was already thread-safe before this change.
2017-05-25tdf#107945: Perhaps this will make this method thread-safe...Kohei Yoshida1-1/+1
Assuming that rtl_uString_new() is thread-safe, and static variable initialization is technically thread-safe, hopefully we can declare this static method thread-safe now. Change-Id: Ibc3685a576c2a6692bdf2beff79592290b42cc8a Reviewed-on: https://gerrit.libreoffice.org/38011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-05-23enhance useuniqueptr lopluginNoel Grandin1-1/+0
teach it to look for the following sequence in a destructor: delete m_pfoo; m_pfoo = nullptr; Change-Id: Icd6271a63a024e32b53cc9e599f8f59952160380 Reviewed-on: https://gerrit.libreoffice.org/37900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: svlStephan Bergmann3-6/+6
Change-Id: I47a0e13c5affa220646c59ec0bddb342f858fe53
2017-05-17Remove old cruft #if 0 debugger test casesEike Rathke1-25/+0
Change-Id: I95ae76820a434ac1d295bea21f9bf77dab9a7e6e
2017-05-12remove unused uno::Reference varsNoel Grandin1-2/+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-11Clean up uses of SAL_U/SAL_W: svlStephan Bergmann2-9/+1
Change-Id: Iab8a066d050ec042a32d57c338f5318c992c1999
2017-05-11remove some unnecessary temporary OUStringsNoel Grandin1-3/+2
found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke4-4/+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-08cleanup tools/debug.hxx includesJochen Nitschke1-1/+0
with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock3-5/+5
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert ucb and svl from OSL_ASSERT to assertChris Sherlock3-5/+5
Change-Id: I34579b2ec0b9a2a98361108bc259ddb1fc1df7b5
2017-05-06Plausible fix for timezone offset issue in Repair Document.Michael Meeks1-0/+1
Change-Id: Ic1dabb2c2330e0a74a75d75140b0c598555a0d53 Reviewed-on: https://gerrit.libreoffice.org/37301 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-05-04Number formatter: handle negative signed year date as BCEEike Rathke3-8/+153
Accept input -YYYY-MM-DD or -Y/M/D or M/D/-Y or D.M.-Y ... and display likewise if no era word is to be displayed. Change-Id: I199d34354d5b91dbe2a6a6ac3ae4b50d5dbde670
2017-05-04Bail out early for just a sign as start stringEike Rathke1-0/+4
Change-Id: I9852aa70f6cf61c00d882cd7ff1171275c5b9c24
2017-05-04Make SvNumberformat::ImpIsIso8601() constEike Rathke1-1/+1
Change-Id: Ied2440046ab01bc0f18629ddb885e7555b8af137
2017-04-28loplugin:salunicodeliteral: svlStephan Bergmann4-6/+6
Change-Id: Iaa5b97267b6487c37744bd08d21c82015da9d522
2017-04-28clang-tidy readability-simplify-boolean-exprNoel Grandin2-14/+3
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-26use strong_int for LanguageTypeNoel Grandin6-269/+212
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock4-0/+4
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 Ostrovsky5-5/+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 Grandin3-18/+18
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-20loplugin:inlinefields in FSStorage_ImplNoel Grandin1-17/+3
Change-Id: I6650d39f8f4c2f271e3936d590fe7eb500e674fe Reviewed-on: https://gerrit.libreoffice.org/36665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19loplugin:useuniqueptr (clang-cl)Stephan Bergmann1-5/+5
Change-Id: Ia854d1d6a8bd5f5f9a87aebb57337a992606c03f
2017-04-19coverity#1405221 silence Out-of-bounds readCaolán McNamara1-0/+1
Change-Id: I39b84b1d0272c2e8aa606e8b2e9ab0d2d88c3586 Reviewed-on: https://gerrit.libreoffice.org/36671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-18Resolves: tdf#107012 follow date order of the target localeEike Rathke2-0/+191
... when converting format codes between locales, so en-US MM/DD/YYYY correctly ends up as de-DE DD.MM.YYYY instead of MM.DD.YYYY Change-Id: Iccfdd4787fc05462f47266c77cc9e95d14dae60d
2017-04-13convert DateFormat to scoped enum and rename to DateOrderNoel Grandin4-49/+50
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-10tdf#106190 Tests of fraction formatsLaurent Balland-Poirier1-1/+39
Improve error message if test fails Add more formats to test Need https://gerrit.libreoffice.org/35320/ Change-Id: I89f5071e12ff87cdf1c03912922918390531e972 Reviewed-on: https://gerrit.libreoffice.org/35377 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-07loplugin:redundantcast find cstyle arithmetic castsNoel Grandin1-2/+2
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-07tdf#39468 Translate German commentsJens Carl1-1/+1
Translate German comments and terms in dbaccess/, extensions/, formula/, include/, reportdesign/, rsc/, sd/, svtools/, and vcl/ Change-Id: Ie20dadda0eeb0786eb328c6c652287d5481c5e3b Reviewed-on: https://gerrit.libreoffice.org/36249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-06make page size compile time constantJochen Nitschke1-5/+1
on educated guess > std::numeric_limits<sal_uInt32>::max() - sizeof(few fields) + 1 is always greater 1000 Change-Id: If0e91e27aabc2bda4beccb5e98eb20a7c890e2f0 Reviewed-on: https://gerrit.libreoffice.org/36201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: svlStephan Bergmann1-2/+2
Change-Id: I9a99d243173eb2300a57d47097b2eef8c48bb76b
2017-04-06tdf#106190 Fix (again) left alignment of denominatorLaurent Balland-Poirier1-18/+11
Instead of moving spaces from left to right, like it was done previously, this patch insert spaces directly on right when in denominator This avoid complex calculation when user enter such (stupid) format: # ?/ ??? or # ?/" hello world "??? In SvNumberformat::ImpNumberFill, for NF_SYMBOLTYPE_FRAC_FDIV you need at least to move in sBuf, to insert text at the expected place for (stupid) format like # ?/ 100 or # ?/" hello world "100 All these formats works, but are stored in ODF with text after fraction Change-Id: I296e60643e93242b8006848a643135219ad4ad0c Reviewed-on: https://gerrit.libreoffice.org/35320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-05loplugin:constantparam part2Noel Grandin5-12/+10
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746 Reviewed-on: https://gerrit.libreoffice.org/36072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann1-2/+2
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:unusedmethodsNoel Grandin1-7/+0
Change-Id: I30f9b6e68a7aa73782c980749e34f8f8d40ae57b Reviewed-on: https://gerrit.libreoffice.org/36047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>