summaryrefslogtreecommitdiff
path: root/svl/source
AgeCommit message (Collapse)AuthorFilesLines
2017-10-17Resolves: tdf#112933 correct number of one decimal in fraction of secondsEike Rathke1-22/+16
Regression from commit 0ac1e2ad19d4fdb46dcf54f67db2df081f4675bb Date: Wed Aug 2 09:39:43 2017 +0100 Resolves: ofz#2833 null deref and similar for date+time commit 42b894f80a6d0c39bb0f7092eb204a15c22c4f38 Date: Sat Aug 5 19:15:36 2017 +0100 ofz#2867 null deref Effectively revert the code changes of those, leaving the test case files intact, and "do the right thing" (switching two lines, to nPos = nPos + sStrArray[i].getLength(); i++; nPos actually had always to be incremented by the length of the *current* string position but was used after only as an error position indicator, meaningless if there was no error. (cherry picked from commit 4f72d2ec6c210232e0abd4965e215611e807c125) Conflicts: svl/source/numbers/zforscan.cxx Backported. Change-Id: I9bc4e5e56d70a275d26df0b72ed6a19e9297e0fa Reviewed-on: https://gerrit.libreoffice.org/43440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-02Number scanner: accept fractional separators in an ISO 8601 date+time stringEike Rathke2-0/+17
In a strict ISO 8601 date+time string with 'T' separator the Time100SecSep separating seconds and fractional seconds can be either '.' period or ',' comma, so accept those in all locales. Not accepting '.' in all locales was the cause of tdf#100822 before code was changed to use sax::Converter::parseDateTime() instead. Change-Id: Ica676050b52b11da64afbac6feabb43d9e985bc4 (cherry picked from commit 00bb8e4a66008098d1133f4923f6d2d65e0dd598) Reviewed-on: https://gerrit.libreoffice.org/43038 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-10-01Number scanner: accept negative year ISO 8601 input with 'T' time separatorEike Rathke1-2/+3
This is valid input: -1999-11-23T12:34:56 Change-Id: I0464b623b76fb55c1d2b848d0db9278e9589a4d8 (cherry picked from commit c3819630e0205a372899ef67d689619657bbbf33) Reviewed-on: https://gerrit.libreoffice.org/42972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-09-15Resolves: tdf#52510 handle trailing ';' specifying empty following subformatEike Rathke1-2/+20
Change-Id: Ic84065f11619542fe735f45e72c9303897ea5755 (cherry picked from commit 8cb3faca4b1d1d9c68faba103c6c6117853e639e) Reviewed-on: https://gerrit.libreoffice.org/41878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-09-11Resolves: tdf#91758 more stringent check for ISO date like looking inputEike Rathke3-38/+48
This is a combination of 4 commits. Related: tdf#91758 don't remember nCanForceToIso8601 state CanForceToIso8601() can be called twice for different DateOrder. (cherry picked from commit ae6c5083f04f8fad299cdc7a6b6558f1270cc619) Related: tdf#91758 shortcut CanForceToIso8601() for MayBeIso8601() results (cherry picked from commit 6254fbf8a76a0d8edb290b03e0632ef6513a8d98) Resolves: tdf#91758 more stringent check for ISO date like looking input Already check at the end of input analysis whether it could be an ISO date to not apply x-y-z onto MDY or DMY later. For an acceptable ISO input, apart from M and D restrictions, Y-M-D year numbers must be greater than 12 in MDY order or greater than 31 in DMY order, or have at least 3 digits (possibly leading 0). (cherry picked from commit 1cfe6a904d3349413173f5d412c280936f938a9e) Conflicts: svl/source/numbers/zforfind.cxx Backported. 3cd6967931abcbf806a539a19f7f9371398567c2 8d3eb7e2403421469050850e45d1db5c0be018f5 Force ISO date format again if ISO input, tdf#91758 follow-up ... and input doesn't match a date acceptance pattern, even if less than 3 digits in year. (cherry picked from commit f49ef5b771910384de0bc2d4c86ad3e0442b295a) b25aa8e813c06a224cfa95ead79c0f3bf2d2d672 Change-Id: I656d499b8a557814326fe71333fcb644c7d3e909 Reviewed-on: https://gerrit.libreoffice.org/41726 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-07ofz#2867 null derefCaolán McNamara1-8/+11
Reviewed-on: https://gerrit.libreoffice.org/40792 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 42b894f80a6d0c39bb0f7092eb204a15c22c4f38) Change-Id: If856473683685d79d88b024f7fafa2920b403bb7 Reviewed-on: https://gerrit.libreoffice.org/40793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-07Resolves: ofz#2833 null derefCaolán McNamara1-8/+11
Change-Id: I021a716aa76d430a1d3c6fac2dddec4daa01e563 Reviewed-on: https://gerrit.libreoffice.org/40668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-07Eliminate dynamic_cast<const SfxVoidItem*>, use SfxPoolItem::IsVoidItem()Eike Rathke1-1/+1
Change-Id: I09dafffd64dd107e802d016494d884f32363521a (cherry picked from commit ca8a4a7abc81a53a88fc0daa61447f9562f532f5) Reviewed-on: https://gerrit.libreoffice.org/38463 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-06-07Perf-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 (cherry picked from commit f300a627b9a88eb8814cc35844ed7c6aa7f19379) Reviewed-on: https://gerrit.libreoffice.org/38462 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
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 Bergmann3-5/+5
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 Grandin5-268/+211
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-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-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-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 Grandin4-10/+8
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>
2017-04-03tdf#39468 Translate German commentsJens Carl2-2/+2
Translate German comments and terms in UnoControls/, editeng/, filter/, odk/, reportdesign/, sd/, sfx2/, starmath/, svl/, svtools/, toolkit/, tools/, writerfilter/, and xmloff/. Change-Id: Ibc401a425ddfdf41e4e4a78600f3fbce8cfaa2b1 Reviewed-on: https://gerrit.libreoffice.org/35992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna1-2/+2
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30remove type decorations on char literalsJochen Nitschke3-12/+12
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-29loplugin:unusedmethodsNoel Grandin3-41/+0
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29convert SearchBehavior to scoped enumNoel Grandin2-2/+2
Change-Id: I57f03fc43aff838c7066556319a3a5a187e46ad3 Reviewed-on: https://gerrit.libreoffice.org/35831 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini3-3/+3
Change-Id: I4eda687db6ad8d41e6a28430c76b288510da605d Reviewed-on: https://gerrit.libreoffice.org/35645 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-24convert ViewShellId to o3tl::strong_intNoel Grandin1-9/+9
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09 Reviewed-on: https://gerrit.libreoffice.org/35421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23Remove unused #include <ctype.h>Stephan Bergmann3-3/+0
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-22Use rtl::isAscii* instead of ctype.h is* with sal_Unicode argStephan Bergmann2-13/+4
Change-Id: I744f774e6e43866f1c6ef9ff8de2d9f2e183f0be
2017-03-21tdf#96505 - Get rid of cargo cult long integer literalsudaycoder1-1/+1
Change-Id: I56fbc7cd9c879b18ac65c5e6adf80f01c6b95b84 Reviewed-on: https://gerrit.libreoffice.org/35176 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-17cleanup double includes and declarationsJochen Nitschke1-1/+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-17remove unused defines from HRC files in svlNoel Grandin1-25/+0
Change-Id: Ib8e45921593784cccd5ff29feba47b6953b860e8 Reviewed-on: https://gerrit.libreoffice.org/35278 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>