summaryrefslogtreecommitdiff
path: root/include/svl
AgeCommit message (Collapse)Author
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-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-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-23Clean up uses of Any::getValue() in svlStephan Bergmann
Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40
2016-06-14explicit svl::SharedString(const OUString&) ctorEike Rathke
... to prevent accidental surprises. Not interned shared strings constructed from OUString have mpDataIgnoreCase=nullptr so can't be used for case insensitive comparison. Change-Id: I03323354298a73e93b18d2796ec447c072fdefa5
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-08make SvNumberFormatter::IsCompatible() staticEike Rathke
Change-Id: Ic40d0852c8e0a8f0957fc782c85c1084c7fe265f
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-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>
2016-05-30tdf#99661 Add max-denominator-value attribute to number:fractionLaurent Balland-Poirier
Add max-denominator-value attibute to <number:fraction> to comply with ODF 1.3 See https://issues.oasis-open.org/browse/OFFICE-3695 Specify loext or number according to ODF version This value is only used to stored the number of digits in numerator. No other values than 9, 99, 999,... are expected. Add loext:max-numerator-digits attributes to <number:fraction> to distinguish ??/?? and ##/## or any combination Not saved for ODF strict min-...-digits indicates the number of '?' max-...-digits indicates the total number of '?' and '#' This needs to be saved with both min-...-digits at least one because previous versions cannot have min-...-digits of 0. See tdf#38097 Change-Id: Ibd785579aa75edc315e3bd94935a146d82bbeeef Reviewed-on: https://gerrit.libreoffice.org/24903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30loplugin:unusedmethods SfxLinkUndoActionNoel Grandin
Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b Reviewed-on: https://gerrit.libreoffice.org/25542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)Noel Grandin
and put an assert in SfxPoolItem::SetWhich() so nothing new creeps in. Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df Reviewed-on: https://gerrit.libreoffice.org/24324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26loplugin:unusedmethodsNoel Grandin
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09tdf#88657 calculate denominator lengthLaurent Balland-Poirier
Get length of denominator which could be different from numerator length Change-Id: I9f5c10917185eb029d52efbc0f20be5f81c74d10 Reviewed-on: https://gerrit.libreoffice.org/24712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-09convert SfxStyleFamily to scoped enumNoel Grandin
and update the RSC compiler to accept such In the process fix some confusion in SD where it was confusing SfxStyleFamily and the index of the relevant family (which other parts of the code in SVL use) Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-05-04No need to explicitly delete ctor the compiler wouldn't implicitly declareStephan Bergmann
Change-Id: Idd0e764765bd76e1f6a2d8ec6e18ebac27b91ec6
2016-05-03C++11: disable ctors with delete in include/Jochen Nitschke
replace the old declare and don't implement pattern with C++11 delete keyword no need to hide this design choice behind access restrictions Change-Id: I7e8430a07189aa48514a4613c3a8c2950b230f49 Reviewed-on: https://gerrit.libreoffice.org/24495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-03tdf#97835 No decimal separtor for empty decimalLaurent Balland-Poirier
If decimal part is empty (with #) decimal separator should not be added. It was not removed if there was text after value. Change-Id: I891cad8b6bec0f27f4cef8aea80c5dad264f062d Reviewed-on: https://gerrit.libreoffice.org/24586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03tdf#31449 Correctly test if fraction has no integer partLaurent Balland-Poirier
Test if fraction format has no integer part is modified to take into account all cases: ??/?? or ##/## and do not detect false positive like ? ??/?? Change-Id: Ia8677a5ad496e5df56ce6bf1290323555e46ba0a Reviewed-on: https://gerrit.libreoffice.org/24540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-04-13loplugin:passstuffbyref in svlNoel Grandin
Change-Id: I1434d96ae800d8e155262831472cf632d640b4c5
2016-04-12Avoid reserved identifiersStephan Bergmann
Change-Id: I15faa079a6e124b10bcd50bad19cf1301bafc500
2016-04-11clang-tidy performance-unnecessary-value-param in svlNoel Grandin
Change-Id: I8abc272d12e62e25be358dc4c73008971f1cd609
2016-04-06remove some dead bits of DDENoel Grandin
Change-Id: Ieb1d4e23f1a62b56d14a655a676d9c7d5f33c51c Reviewed-on: https://gerrit.libreoffice.org/23849 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04loplugin:constantparam in svlNoel Grandin
Change-Id: I6c336034a12fda493825b4a8388d3bde6bead910 Reviewed-on: https://gerrit.libreoffice.org/23729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17Revert "tdf#98458 sw: make search in shape text optional"Jan Holesovsky
Actually there seems to be a simpler solution to the immediate performance problem which I'll commit next. It still might be necessary to introduce the search switch at some stage, but first let's see if there are complaints. This reverts commit 8e0b08c3053ed5472409b1ea7e02653aad38f7d6.
2016-03-17loplugin:constantparam in svlNoel Grandin
Change-Id: If23e43beb401047825641817e09d7fdeb904f9d9 Reviewed-on: https://gerrit.libreoffice.org/23317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17tdf#98458 sw: make search in shape text optionalMiklos Vajna
Instead of forcing it silently on everyone, add a new search option and enable it only in case it's requested, as shape search is expensive for large documents. (Regression from commit bdc1824ea7acfa2fe9d71cdbe57882acce155577.) Change-Id: Ibb6e76ad5c870dfd63b36429e16ef6d572f5f1fd
2016-03-10Avoid reserved identifierStephan Bergmann
Change-Id: Iea66c7230f4570d6a2b88a514958788eb4105ffb
2016-03-09remove unused NOT_POOLABLE enum valueNoel Grandin
and simplify the resulting SfxItemInfo field down to a single bool Change-Id: I73e24e83d39afc7660ac85872ba96bc790713cb2 Reviewed-on: https://gerrit.libreoffice.org/23058 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-09loplugin:constantparam in svlNoel Grandin
Change-Id: Iefc441262cbdc6f115ea4ca5a673456b59477e13
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07loplugin:unuseddefaultparam in variousNoel Grandin
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-01remnants of the past ...Eike Rathke
... when OUString had to be automatically converted to String, but nowadays we can return a const reference instead. Change-Id: Ic3a68e100bd176b223575da8713c9dbdfe71c3d7
2016-03-01loplugin:unuseddefaultparam in svlNoel Grandin
Change-Id: Ifc82563c8930332d460df4d97935ba6e9946689f
2016-02-26loplugin:simplifyboolStephan Bergmann
Change-Id: Ie213b385d666aa17d47e6c85ff1fbdbc31bac0b9
2016-02-26add Wildcards to Find&Replace dialogEike Rathke
Enabled only for Calc. Writer needs to be adapted to support wildcards. The global escape character is '\' set in SvxSearchItem ctor. Change-Id: I1af78f296deff81e023ee9f0e936f5f506f80c83
2016-02-26add SvxSearchItem::GetWildcard() SetWildcard()Eike Rathke
Change-Id: I0aeb7fbcedad381a385ffe6649ac51e8c961ca11
2016-02-24let SvxSearchItem use SearchOptions2Eike Rathke
And all those places that interface to SvxSearchItem. Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09Formatting changes across all modulesChris Sherlock
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e Reviewed-on: https://gerrit.libreoffice.org/21603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-13loplugin:unusedmethods unused return value in include/svlNoel Grandin
Change-Id: I759fe8769daccea07c2157bfb5912df8ba285534