summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2016-07-29loplugin:countusersofdefaultparams in store..svtoolsNoel Grandin
Change-Id: I15b4400bddc5a4d0e3de5dfffe18b7e493f97df6 Reviewed-on: https://gerrit.libreoffice.org/27580 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27tdf#100834 Extend ODF for integer/fraction delimiterLaurent Balland-Poirier
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>
2016-07-27improve passstuffbyref return analysisNoel Grandin
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-26activate the remaining 1945-04-02 test cases, tdf#100046Eike Rathke
Change-Id: I4d2f3d5602b162924c14348c0307a74ddeb93079
2016-07-26add test data from tdf#79663, tdf#100046 relatedEike Rathke
... before changing anything. Change-Id: Iedf89713de1eb02e501723f679bf059b5a43415e
2016-07-26display data on test failureEike Rathke
Change-Id: I432ba81929dd0badd48d2bd7b4344ceed4df2b43
2016-07-26two more testDateInput() datesEike Rathke
Found in comments of i18npool/source/calendar/calendar_gregorian.cxx Calendar_gregorian::setValue() Change-Id: I4ab0aae15b7d97b22bc3a16d039542b5b49d3f14
2016-07-25obtain PreviousChar() only if necessaryEike Rathke
Change-Id: Ib23b34fd927eaecef1868fbeebde0a28399dc0c3
2016-07-25Resolves: tdf#101096 remove the "H after M" ruleEike Rathke
wrongly introduced with c9ed6e832213129cc579c1c309ce9dbd3593c57a Change-Id: Ic6c9c404ad0af11eb5d638f453150ee0da60e633
2016-07-25Revert "tdf#101096 Improve minute/month disambiguation"Eike Rathke
This reverts commit cb94d2fbd9596aca45d915a599caa671a261c2a2. There's an easier solution not leaving unhandled corner cases.
2016-07-25tdf#101096 Improve minute/month disambiguationLaurent Balland-Poirier
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>
2016-07-22tdf#100842 qa unit testLaurent Balland-Poirier
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>
2016-07-22svl: fix loplugin:loopvartoosmall warningsMiklos Vajna
Change-Id: I003719f67e6c1f0f48580c414b2ef7a7a2a2abcb
2016-07-22tdf#100834 String between integer and fractionLaurent Balland-Poirier
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>
2016-07-15tdf#100834 Treat string between integer and fraction as delimiterLaurent Balland-Poirier
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>
2016-07-15tdf#100755 Allow '0' for denominator symbolLaurent Balland-Poirier
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>
2016-07-13tdf#84635 - Slow layout of large tablesNoel Grandin
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>
2016-07-13loplugin:constparams in toolsNoel Grandin
Change-Id: Iea05efbb90a0a95fefd18ae9673095a31422f06c Reviewed-on: https://gerrit.libreoffice.org/27137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-12tdf#100842 Do not insert things in the middle of the numberLaurent Balland-Poirier
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>
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke
... 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>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I68ec15e8b52dd387b18077941811702b40caf020
2016-07-06tdf#99996 tdf#100594 tdf#100754 Add qa unit testLaurent Balland-Poirier
- tdf#99996: new algorithm for better fraction representation - tdf#100594: forced denominator with one ? for numerator - tdf#100754: forced denominator with text after fraction Change-Id: I0990c7b3848ba5def629346f71be732d75ca248d Reviewed-on: https://gerrit.libreoffice.org/26867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-05tdf#100754 Allow text after forced denominator fractionLaurent Balland-Poirier
For a fraction number format with forced denominator, stop detecting denominator value after digits Change-Id: I68281c5fc5b8a4c395932dff532179e694cf9827 Reviewed-on: https://gerrit.libreoffice.org/26907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-04tdf#99996 New algorithm for fractionLaurent Balland-Poirier
This new algorithm, based on continued fraction representation: - is smarter (165 lines schrinked in 31) - gives same results for 1 to 3 digits for divider - gives better results for more than 3 digits for divider - is faster: 1.5% for 1 digit, 5% for 2 digits, 20% for 3 digits, 70% for 4 digits See details in bug report In addition - removed uncessary fonctions: ImpGGT and ImpGGTRound - forced denominator do not required anymore calculation of nFrac and nDiv - replace sal_uLong with sal_uInt32 for time - replace sal_uLong with sal_uInt64 for fraction Change-Id: I9bf3a54a5284104718a53406f8784379fd19f6e6 Reviewed-on: https://gerrit.libreoffice.org/26621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-04remove comphelper::string::removeNoel Grandin
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-01svl: remove pointless catch around "delete" statementMichael Stahl
In C++11 the destructors are implicitly noexcept so if any of the subclasses of SfxUndoAction would have a throwing dtor we would have found out by now. Change-Id: I4e044f8c2c391464cdc236bac15465860fa0ef62
2016-06-29tdf#100594 Calculate nFrac with fNumber for Forced DenominatorLaurent Balland-Poirier
nFrac was calculated with fraction value = nFrac/nDiv which could be rounded in case of few digits in nDiv Change-Id: I568121b0e7b5ea0b67bbff7bbbb37d2c272c3691 Reviewed-on: https://gerrit.libreoffice.org/26663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-29tdf#100592 Add extra number formats for fractionLaurent Balland-Poirier
Change-Id: Ia3a5fa02029e06e083fcc10748b0deb3048dae79 Reviewed-on: https://gerrit.libreoffice.org/26675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-29loplugin:stringconstantStephan Bergmann
Change-Id: I7c7c7a43c6c6e0fd03a8533b7794dd52126dc047
2016-06-29Improve readability of OUString concatanation in SvNumberFormatterMuhammet Kara
It is more readable and more efficient as a bonus. See: https://goo.gl/jsVAwy: Change-Id: I5aa95161f9284ce40354316d6d01be97e60241e4 Reviewed-on: https://gerrit.libreoffice.org/26736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28loplugin:singlevalfields in variousNoel Grandin
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-26Restore qa unit test of number formats from zforlist.hxxLaurent Balland-Poirier
Date formats, DateTime formats and Currency formats did not follow NfIndexTableOffset order. Add extended Fraction formats Change-Id: I584c080ec29d81e4c2b76ffa4a6422dfb736992e Reviewed-on: https://gerrit.libreoffice.org/26530 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net>
2016-06-23Clean up uses of Any::getValue() in svlStephan Bergmann
Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40
2016-06-16properly prefix various global variables and hide themMichael Stahl
Change-Id: I6b97e6a4c6ac4c0e26bcbb2b132b333920c16f19
2016-06-14tdf#94205: Some remaining new+std::move -> o3tl::make_uniqueStephan Bergmann
Change-Id: I6a9a46d37bf09f6b497d591498c40103f4c96f59
2016-06-10tdf#89329: use shared_ptr for pImpl in ctloptionsXisco Fauli
Change-Id: I196f2bbff0e7796804c2d74eb68ebf914796993d Reviewed-on: https://gerrit.libreoffice.org/26138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10tdf#89329: use shared_ptr for pImpl in cjkoptionsXisco Fauli
Change-Id: I0ad43869d24e210b3591af25f108c68ed8f6160b Reviewed-on: https://gerrit.libreoffice.org/25634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-08make SvNumberFormatter::IsCompatible() staticEike Rathke
Change-Id: Ic40d0852c8e0a8f0957fc782c85c1084c7fe265f
2016-06-08sfx2 classification: use auto where it improves code readabilityMiklos Vajna
std::map<OUString, basegfx::BColor>::iterator itColor = aColors.find(aLevel); vs auto itColor = aColors.find(aLevel); and so on. (And do the same at two other places as well.) Change-Id: I538998c8b8afdf18a7eb139fa4d469205c561370 Reviewed-on: https://gerrit.libreoffice.org/26046 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06fix crashNoel Grandin
introduced by commit 4d666f5092d7c4f2ece9702dda4d874e44cdc6f7 "tdf#89329: use shared_ptr for pImpl in slstitm" Change-Id: I69da5a716f1e6c9f56e0be5a97182be9dd329abc
2016-06-06tdf#89329: use shared_ptr for pImpl in slstitmXisco Fauli
Change-Id: Icb9167f8e7612f40992e7146c0dce539c0b0eac7 Reviewed-on: https://gerrit.libreoffice.org/25632 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-04tdf#96099 Remove sfx std::shared_ptr typedefsMark Page
Removed SfxItemSet_Pointer_t and SfxStyleSheetIteratorPtr Change-Id: Ibfa6a79809fdbbe2648dacc02625e620ceaf9bf0 Reviewed-on: https://gerrit.libreoffice.org/25851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03tdf#89329: use unique_ptr for pImpl in imageitmXisco Fauli
Change-Id: I935da01bd03a9812facf30e1d45da1c4949188ed Reviewed-on: https://gerrit.libreoffice.org/25633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02preserve ISO date+time format when editing such valuesEike Rathke
Change-Id: I6dcbe6c9aeff87d735303713f328c84203f76b60
2016-06-02add NF_DATETIME_ISO_YYYYMMDD_HHMMSS YYYY-MM-DD HH:MM:SS builtin format codeEike Rathke
Change-Id: I4fe6ef01a4c7fb795e4499e54aa55ebaaa0d433d
2016-06-01tdf#89329: use unique_ptr for pImpl in itempoolXisco Fauli
Change-Id: Ie0a5e5a16cf4b724ff55b0a89ee0ec803df6eb41 Reviewed-on: https://gerrit.libreoffice.org/25635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31tdf#89329: use unique_ptr for pImpl in styleXisco Fauli
Change-Id: I206f1a7ee5a4020f712a969d26bde9268d9f2c53 Reviewed-on: https://gerrit.libreoffice.org/25636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31loplugin:unusedmethodsNoel Grandin
Change-Id: Ifeb818227a960cab8fd2e8e7352468efbfe1232c Reviewed-on: https://gerrit.libreoffice.org/25668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>