summaryrefslogtreecommitdiffstats
path: root/svl
Commit message (Collapse)AuthorAgeFilesLines
* tdf#101636 Test index before reading OUStringLaurent Balland-Poirier2016-08-221-1/+1
| | | | | | | Change-Id: I0a4c02b172fc6d3273f6aa2cca855c27705b4d68 Reviewed-on: https://gerrit.libreoffice.org/28282 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* Resolves: coverity#705366 Mixing enum typesCaolán McNamara2016-08-1920-61/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and coverity#705367 Mixing enum types coverity#705371 Mixing enum types coverity#982694 Mixing enum types coverity#1027717 Mixing enum types coverity#1371228 Mixing enum types coverity#1371242 Mixing enum types coverity#1371280 Mixing enum types coverity#1371310 Mixing enum types MapUnit and SfxMapUnit share the same values and are freely cast from one to the other. Now that commit d30a4298bdb5ba53cd1fe659f2b742f218a2e527 Date: Thu Aug 11 15:02:19 2016 +0200 loplugin:unusedenumconstants in package..svtools removed the SfxMapUnit entries that were directly unused, they don't match anymore and casting from one to the other is dangerous. Why there was two of these anyway escapes me, get rid of SfxMapUnit and just use MapUnit universally Change-Id: I4db5dcd04b59be2f85b62b728f96c90afe00c57e Reviewed-on: https://gerrit.libreoffice.org/28234 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:stringconstantTor Lillqvist2016-08-181-1/+1
| | | | Change-Id: I6dd872afb8d96da2ceb09ee553795ae98d5c0d09
* tdf#79399 tdf#101462 Add qa unit testLaurent Balland-Poirier2016-08-181-0/+11
| | | | | | | | | Test Native Number formats NatNum and DBNum Change-Id: I6e62586d9bfcc27162017291ee110cb70f85d425 Reviewed-on: https://gerrit.libreoffice.org/28098 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* svl: no need to iterate in reverse order in GetRedoActionsInfo()Miklos Vajna2016-08-181-2/+4
| | | | | | | | | | We have random access to the array after all, so the non-reverse order is OK as well, and it's more readable. Change-Id: I966a56ae2e161d95f56927be1b2a9f9162d0f7bb Reviewed-on: https://gerrit.libreoffice.org/28204 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* Fraction Number Format: add UI/Sidebar optionsLaurent Balland-Poirier2016-08-163-5/+31
| | | | | | | | | | | | | | | | Enable modification of fraction number format through dialog UI: - negative in red - "Decimal places" is replaced with "Denominator places" - leading zeros for integer part - thousand separator for integer part Update: options in Sidebar Thousand separator works, also for ' ' as thousand separator Change-Id: I0ed2952ed9cd8afb5444b44997526e5019a5858d Reviewed-on: https://gerrit.libreoffice.org/27268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
* loplugin:stringstaticStephan Bergmann2016-08-161-30/+12
| | | | Change-Id: Icb05f681aa549a975ae4a1dee749e20ad4a215f0
* properly move bLCIDInserted=true into the conditionEike Rathke2016-08-151-1/+1
| | | | Change-Id: Iaad1b3cb2ee4e7dd293af00eb738cfd66c8b94d6
* use SvNumberNatNum::IsComplete() instead of IsSet(), tdf#79398 follow-upEike Rathke2016-08-151-1/+1
| | | | | | | IsComplete() takes into account if the language was also set, output is transliterated only if complete. Change-Id: I1b7c2c8dbd308604c7af9aa5d1aa3ff0c1b436ca
* tdf#79398 Export to XL DBNum codesLaurent Balland-Poirier2016-08-151-6/+6
| | | | | | | | Change-Id: Ibe24b68b89909eecdf73fe4f7db19de26396194d Update: only if corresponding code exists Reviewed-on: https://gerrit.libreoffice.org/28090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* tdf#101462 tdf#79399 lcl_matchKeywordAndGetNumber returns integerLaurent Balland-Poirier2016-08-151-2/+2
| | | | | | | | | | | This prevent [DBNumX] format codes to be recognized Fix in the same time tdf#79399 (import of [DBNumX] from XL) Do NOT fix yet tdf#79398 (export of [DBNumX] to XL) Change-Id: I08817818bf0ff30b4704bb69b2ac9aa3890c7aa6 Reviewed-on: https://gerrit.libreoffice.org/28071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* loplugin:unusedenumconstants in package..svtoolsNoel Grandin2016-08-121-6/+0
| | | | | | | Change-Id: I8136b93b9303ebecafd791159e813c335b1bc172 Reviewed-on: https://gerrit.libreoffice.org/28052 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Fix comments to match new reality: these are no longer optional parametersTor Lillqvist2016-08-111-4/+4
| | | | Change-Id: Idf054aa4ef095ce37f05a01adf59cb450a6906c6
* loplugin:countusersofdefaultparams in svl..unodevtoolsNoel Grandin2016-08-112-8/+8
| | | | | | | Change-Id: Ie3d2cf29e99b8a51b80246aafa23a92e6c3404b2 Reviewed-on: https://gerrit.libreoffice.org/28017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#101096 tdf#101147 Add qa tests for minute/month detectionLaurent Balland-Poirier2016-08-091-2/+18
| | | | | | | | | | | Test number formats of bug reports Test odd date formats which do not follow Excel detection Change-Id: Iaa6d25a0103cae5e3ddd76075a324240aa255c35 Reviewed-on: https://gerrit.libreoffice.org/27494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* remove the duplicated system locale checkEike Rathke2016-08-091-4/+0
| | | | | | ... which is handled by LanguageTag::convertToLanguageType() anyway. Change-Id: I26656d64fdccf9c06d24c53e1e473e355732e00f
* do not resolve system locale when queried, rhbz#1364406 relatedEike Rathke2016-08-091-1/+1
| | | | | | | | | | | | | | When loading older documents that calculated a number format on the fly an inherited but default format of a type could had been applied using the fixed resolved locale instead of the default system locale, which then was stored upon save and remained sticky. This because a format the formula depends on already was applied using the resolved system locale. http://bugs.documentfoundation.org/attachment.cgi?id=78559 of tdf#63267 exhibits the behavior on the hidden sheet 'Festwerte' when unprotected and inspecting number formats in column A under Datum. Change-Id: If23908f259458e988c5164cc5e268bfc9a6a6bcd
* another fraction format unit testEike Rathke2016-08-061-0/+5
| | | | Change-Id: Ic33edb9ca34235d2e24e8b0b0d6455efd0f3076c
* force integer display if numerator and denominator are equalEike Rathke2016-08-051-0/+5
| | | | | | So with {# ?/?} format 1.96 is displayed as "2" insted of "1 1/1" Change-Id: I756deeb884d41726c7d476a236d3c68b89fe9cba
* gtktiledviewer: expose undo/redo info in a repair document dialogMiklos Vajna2016-08-051-2/+2
| | | | | | | | | | | | | This shows the full undo and redo stack, with all the metadata available via the LOK API. Also fix SfxUndoManager::GetRedoActionsInfo(), so it's easy to show the undo/redo stack in linear time; and fix a use-after-free in lokdocview. Change-Id: I66625ed453efa61b5738d99d7d1ad8f468908240 Reviewed-on: https://gerrit.libreoffice.org/27913 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* desktop: add undo/redo support to lok::Document::getCommandValues()Miklos Vajna2016-08-051-0/+46
| | | | | | | | | Expose the undo/redo stack and the metadata of each item. Change-Id: I66b81e855a945c97be3d491ed709959f310d4b73 Reviewed-on: https://gerrit.libreoffice.org/27905 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* tdf#101147 New approach to fix minute/month detectionLaurent Balland-Poirier2016-08-051-6/+4
| | | | | | | | | | | Other formats may be differently interpreted HH YY/MM => Month expected HH DD/MM => Month expected Change-Id: Iabb17911bf2907c02b6b898052b6933692f8074a Reviewed-on: https://gerrit.libreoffice.org/27823 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* svl: track creation time of SfxUndoAction instancesMiklos Vajna2016-08-041-0/+8
| | | | | | | | | It's not yet clear how to expose this on the UI, though. Change-Id: Iee6737922d36e896653b4fae557442747dda1b8b Reviewed-on: https://gerrit.libreoffice.org/27878 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* svl: expose redo actions in SfxUndoManager::dumpAsXml()Miklos Vajna2016-08-041-1/+17
| | | | | | | | | | To see if an undo action is actually deleted or just moved to the redo stack. Change-Id: I40632ea29353e50b643b8b1831d5ffdf443ca75a Reviewed-on: https://gerrit.libreoffice.org/27871 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* svl: handle nullptr pWriter in SfxUndoManager::dumpAsXml()Miklos Vajna2016-08-031-0/+13
| | | | | | | | | This is useful when it's called from gdb for Calc. Change-Id: I22b3e5bbfc5627bff27899a288f7c25179f750ec Reviewed-on: https://gerrit.libreoffice.org/27836 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* break the Excel rule for YMD and DMY, tdf#101147 follow-upEike Rathke2016-08-022-4/+12
| | | | | | | | | | Clearly in {HH YYYY-MM-DD} the MM should not be minute. Also not in {HH DD.MM.YY}. Don't follow every bullshit. Period. It is debatable how to treat MDY, {HH:MM DD/YY} should be different from {HH MM/DD/YY}, Excel ironically takes both as minute, even in an en-US locale. Change-Id: I13d39a36294e3c40cc0e9bf72026804b299bb264
* svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoActionMiklos Vajna2016-08-011-5/+13
| | | | | | | | | | | | | Client code in sw, sd, sc and svx is adapted, the rest is just a placeholder for now. With this, e.g. the undo item for Writer's insert comment properly tracks which window was used for the insertion. Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab Reviewed-on: https://gerrit.libreoffice.org/27781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* tdf#101147 Improve (again) minute/month detectionLaurent Balland-Poirier2016-08-012-7/+16
| | | | | | | | | | | | | | | | | | | For format like HH:MM:SS MM/DD second MM is detected as minute: see tdf#95339 New rules: - first M following each H is minute - first M following first S is minute Detection Month/minute now fully compatible with Excel even with unwanted detection: SS:MM:HH DD/MM/YY second MM is minute even if user would expect month Change-Id: Ia789fbc2dbd6d2dcbe9b9c34d3f288674966dd10 Reviewed-on: https://gerrit.libreoffice.org/27560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* svl: add SfxUndoAction::GetViewShellId()Miklos Vajna2016-07-291-0/+5
| | | | | | | | | | In preparation of a Writer version that overrides this and remembers which view shell introduced which action. Change-Id: I4970f8ce9c56f1b57ab1ae92f3ea8be804ca27bf Reviewed-on: https://gerrit.libreoffice.org/27682 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
* loplugin:countusersofdefaultparams in store..svtoolsNoel Grandin2016-07-293-4/+4
| | | | | | | Change-Id: I15b4400bddc5a4d0e3de5dfffe18b7e493f97df6 Reviewed-on: https://gerrit.libreoffice.org/27580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#100834 Extend ODF for integer/fraction delimiterLaurent Balland-Poirier2016-07-271-0/+20
| | | | | | | | | | | Any string can be used as delimiter between integer and fraction. It is now saved/loaded to/from ODF, as it was from XLS. Change-Id: Ie6364d1cdefc020ea615c18099118135c619f96b Reviewed-on: https://gerrit.libreoffice.org/27262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* improve passstuffbyref return analysisNoel Grandin2016-07-274-4/+4
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* activate the remaining 1945-04-02 test cases, tdf#100046Eike Rathke2016-07-261-8/+3
| | | | Change-Id: I4d2f3d5602b162924c14348c0307a74ddeb93079
* add test data from tdf#79663, tdf#100046 relatedEike Rathke2016-07-261-0/+39
| | | | | | ... before changing anything. Change-Id: Iedf89713de1eb02e501723f679bf059b5a43415e
* display data on test failureEike Rathke2016-07-261-1/+2
| | | | Change-Id: I432ba81929dd0badd48d2bd7b4344ceed4df2b43
* two more testDateInput() datesEike Rathke2016-07-261-0/+2
| | | | | | | Found in comments of i18npool/source/calendar/calendar_gregorian.cxx Calendar_gregorian::setValue() Change-Id: I4ab0aae15b7d97b22bc3a16d039542b5b49d3f14
* obtain PreviousChar() only if necessaryEike Rathke2016-07-251-3/+1
| | | | Change-Id: Ib23b34fd927eaecef1868fbeebde0a28399dc0c3
* Resolves: tdf#101096 remove the "H after M" ruleEike Rathke2016-07-251-3/+7
| | | | | | wrongly introduced with c9ed6e832213129cc579c1c309ce9dbd3593c57a Change-Id: Ic6c9c404ad0af11eb5d638f453150ee0da60e633
* Revert "tdf#101096 Improve minute/month disambiguation"Eike Rathke2016-07-251-9/+9
| | | | | | This reverts commit cb94d2fbd9596aca45d915a599caa671a261c2a2. There's an easier solution not leaving unhandled corner cases.
* tdf#101096 Improve minute/month disambiguationLaurent Balland-Poirier2016-07-251-9/+9
| | | | | | | | | | | | | | | To fix tdf#95339 M-H was treated as minute-hour But for "D.M.H" it should be treated as day.month.hour THis commit extends test to detect if - in case of M.H: there is day or year previous M => M stands for month - in case of S.M: there is day or year after M => M stands for month Some ambiguous cases like S.M.D are now treated as it was previously (month) Change-Id: I048eb227a738b6c453e39d9208bef0d1fda136a0 Reviewed-on: https://gerrit.libreoffice.org/27493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* tdf#100842 qa unit testLaurent Balland-Poirier2016-07-221-0/+11
| | | | | | | | | | test of text before after fraction, with or without integer test of text before after and in the middle of scientific number Change-Id: Ib4a1a722d4cf2350c73b1b721b4e77889dfc666c Reviewed-on: https://gerrit.libreoffice.org/27172 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
* svl: fix loplugin:loopvartoosmall warningsMiklos Vajna2016-07-221-2/+2
| | | | Change-Id: I003719f67e6c1f0f48580c414b2ef7a7a2a2abcb
* tdf#100834 String between integer and fractionLaurent Balland-Poirier2016-07-221-10/+58
| | | | | | | | | | | | | | | Fraction number format Insert Blank delimiter string between Integer/Fraction only if both of them are present In other cases, replace string with blank string if there are some '?' in formats Else insert nothing. If there is no fraction part, insert blank instead of '/' if there are some '?' in formats Change-Id: Ib606bdaa2b3809f15ce23acc3b5b6ee3fdbd230d Reviewed-on: https://gerrit.libreoffice.org/27252 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* tdf#100834 Treat string between integer and fraction as delimiterLaurent Balland-Poirier2016-07-152-7/+15
| | | | | | | | | | In fraction number format, strings located between integer and fraction should be treated as blank delimiter Change-Id: I83e78fb0fe08178ee194fc2a213ee260ce15c639 Reviewed-on: https://gerrit.libreoffice.org/27128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* tdf#100755 Allow '0' for denominator symbolLaurent Balland-Poirier2016-07-152-9/+11
| | | | | | | | | | | | | Fraction number format Accept '0' in numerator and denominator format: 0 0/0 Represent integer 3 as: 3 0/1 Load and save format to Excel As it cannot (yet) be saved in ODF, replace 0 by ? during save to ODF Change-Id: I4721a751431d3f9b903b369d199146ddfb76b43d Reviewed-on: https://gerrit.libreoffice.org/27062 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* tdf#84635 - Slow layout of large tablesNoel Grandin2016-07-131-18/+4
| | | | | | | | | | | | | | | | | | | | | | | Based on suggestion from Aron Budea. And do something similar to most other places keeping vectors of weak references where the code looks like it will hold more than a few entries. Measurements: the 26 page file file takes 51s without my path 15s with this patch the 69 page file file takes 5m28 without my path 51s with this patch the 84 page file file takes 8m28 without my path 58s with this patch Change-Id: I8da94c525fc73ebd969e0343c6f074be4f0063b1 Reviewed-on: https://gerrit.libreoffice.org/27093 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:constparams in toolsNoel Grandin2016-07-131-1/+1
| | | | | | | Change-Id: Iea05efbb90a0a95fefd18ae9673095a31422f06c Reviewed-on: https://gerrit.libreoffice.org/27137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#100842 Do not insert things in the middle of the numberLaurent Balland-Poirier2016-07-121-0/+11
| | | | | | | | | | | | | With fraction number format, if number is longer than number of digits in format jump to the beginning of number before inserting extras: strings, blank, star filling Do not do this for exponent of scientific format as it may contain unwanted 0 at beginning. Change-Id: Ide99f5cba198f76541f0e4e17b29469a99b57b9f Reviewed-on: https://gerrit.libreoffice.org/27097 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
* Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke2016-07-085-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... implementing signed years with year 0 gap. Date(31,12,-1) last day BCE Date(1,1,1) first day CE New class Date member functions: * AddYears(sal_Int16) to be used instead of aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap. * convenience GetNextYear() to be used insted of GetYear()+1 * convenience GetPrevYear() to be used insted of GetYear()-1 * AddMonths(sal_Int32) * operator=(const css::util::Date&) New class DateTime member functions: * operator=(const css::util::DateTime&) Made some conversion ctors explicit, specifically Date(sal_Int32) Adapted hopefully all places that used a sal_uInt16 year to use sal_Int16 where appropriate. Eliminated some quirks in date handling found on the fly. Added era handling to i18npool icu calendar setting interface, which missing was responsible for 0001-01-01 entered in Calc being set as -0001-01-01, hence subtracting one day resulted in -0002-12-31. Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f Reviewed-on: https://gerrit.libreoffice.org/27049 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
* loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann2016-07-072-3/+3
| | | | Change-Id: I68ec15e8b52dd387b18077941811702b40caf020