summaryrefslogtreecommitdiff
path: root/vcl/source/control/field2.cxx
AgeCommit message (Collapse)AuthorFilesLines
2017-09-03Assertion when editing pattern fieldTamás Zolnai1-1/+1
Change-Id: Ia515382556329feeec359254d3be3f90d2fd17ad Reviewed-on: https://gerrit.libreoffice.org/41870 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-9/+2
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18loplugin:constparams in vclNoel Grandin1-2/+2
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4 Reviewed-on: https://gerrit.libreoffice.org/40116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23enhance useuniqueptr lopluginNoel Grandin1-5/+2
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: vclStephan Bergmann1-1/+1
Change-Id: I41a9642a8707e9da5be55ddb942a83ebbb9f9c3f
2017-04-25clang-tidy readability-simplify-boolean-expr in vclNoel Grandin1-7/+5
Change-Id: I10ad38bcb5b05a754de9a396f4aaa79d97458d6f Reviewed-on: https://gerrit.libreoffice.org/36930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25loplugin:checkunusedparams in vclNoel Grandin1-20/+18
Change-Id: I26661684e634aa15a18f78442de15c9db832f319 Reviewed-on: https://gerrit.libreoffice.org/36886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20mnDateFormat in DateFormatter is unusedNoel Grandin1-1/+0
ever since it was added in commit c8330937878a57c74b4f3e3083c013ed0903f80d Author: Vladimir Glazounov <vg@openoffice.org> Date: Wed Apr 11 16:52:58 2007 +0000 INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED Change-Id: Iceb44ea4da620e1e7b9c9494486954db9e5d7959 Reviewed-on: https://gerrit.libreoffice.org/36691 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19remove freshly unused menu support from src filesCaolán McNamara1-1/+0
Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b Reviewed-on: https://gerrit.libreoffice.org/36646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-13convert DateFormat to scoped enum and rename to DateOrderNoel Grandin1-22/+24
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-16remove unused F_100TH_SEC from TimeFieldFormat enumNoel Grandin1-4/+1
Change-Id: I04b27ea7ede9dca6ca41ac910ac97a878788f2e0
2017-02-10coverity#1371289 Missing move assignment operatorCaolán McNamara1-1/+1
Change-Id: Iabdebb02e91c630aef11e99f4677fd4187df78a5
2017-02-08loplugin:unusedenumconstants read-only constants in vclNoel Grandin1-26/+0
Change-Id: I8c81444cbecdc103cc47d9a4133b0b4d9010e0c2 Reviewed-on: https://gerrit.libreoffice.org/34018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08coverity#1371289 Missing move assignment operatorCaolán McNamara1-2/+5
Change-Id: Idc26faf904f0c89cfd66f53bb311d8ce9b41eaab
2017-01-14coverity#735343 Unchecked return valueCaolán McNamara1-1/+1
Change-Id: I18c605511094ad48557a24a89a391d8361a001a7
2016-11-24vcl: rename Window::Notify to EventNotifyMichael Stahl1-12/+12
There is annoying overloading between Window::Notify and SfxListener::Notify, and the Window one has apparently fewer implementations, so rename that and remove lots of disambiguating "using Notify" in multiply inheriting classes. Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-10-21loplugin:expandablemethodds in include/vclNoel Grandin1-8/+3
Change-Id: I9ff378d9c7c9a221599c0a84df638b3acf8f069f Reviewed-on: https://gerrit.libreoffice.org/30121 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-05convert ExtTimeFieldFormat to scoped enumNoel Grandin1-6/+6
Change-Id: I6cb4e057f7a5b83edb51048f24372d19fbf48177
2016-09-05convert ExtDateFieldFormat to scoped enumNoel Grandin1-70/+70
Change-Id: I717e5e727ee0e2b6d732ecc6a432c70926654902
2016-07-27improve passstuffbyref return analysisNoel Grandin1-1/+1
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-21Resolves: tdf#100558 last 'section' of date field not incrementedCaolán McNamara1-1/+1
presumably a regression from... commit 3cad6c806e5247ce20b78eb688551aa5d872b934 Author: Chr. Rossmanith <ChrRossmanith@gmx.de> Date: Fri Mar 1 21:47:10 2013 +0100 Replace (Xub)String with OUString in vcl(field) where UniString::Search returned a max short on not-found while OUString::indexOf returns a -1 Change-Id: Ia3ef80dd318375ccdb3bdcee9bed7b70bf67cae1
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke1-22/+32
... 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-06-24loplugin:singlevalfields in vcl(part1)Noel Grandin1-8/+7
Change-Id: I0031199937cc95793951a070c4b3d8910933e69f Reviewed-on: https://gerrit.libreoffice.org/26595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Convert TimeFormat to scoped enumNoel Grandin1-8/+8
Change-Id: Ia40c70493a61886c76e515c3b2953243025c2438 Reviewed-on: https://gerrit.libreoffice.org/25602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin1-3/+2
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16loplugin:constantparam in unotools/Noel Grandin1-1/+1
Change-Id: I016cf96af3a93c8f2114657a7e59599f68446ddc Reviewed-on: https://gerrit.libreoffice.org/23296 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31Revert "tdf#89756 swich postfix to prefix operators"jan iversen1-29/+29
This reverts commit 3294af80ab39488188ffe6c762bf1a0aaf84a201. merged due to a network problem (never have 2 gerrit tabs open, when merging) Change-Id: I0688a3e14cd815af273b3fb4d028929659d77bab
2016-01-31tdf#89756 swich postfix to prefix operatorserdemdemirkapi1-29/+29
Change-Id: Id9a618994396d958dc7c7bf2acf9656e76d199e3 Reviewed-on: https://gerrit.libreoffice.org/21925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2015-11-18com::sun::star->css in vcl/Noel Grandin1-2/+2
Change-Id: Ifad76177673cf93746ba221838be80ff76fed228 Reviewed-on: https://gerrit.libreoffice.org/20032 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-9/+9
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
2015-11-09new loplugin: oncevarNoel Grandin1-6/+4
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-23memleak:clear self referring VclPtr in *Field and *Box classesDennis Francis1-0/+36
Clears self referring VclPtr called mpField via FormatterBase in : 1. MetricField, PatternField, NumericField, CurrencyField, DateField, TimeField 2. PatternBox, NumericBox, CurrencyBox, DateBox, TimeBox via respective dispose() methods. Change-Id: I7f92fefd49756cabe7db7d240781260a2d4cd298 Reviewed-on: https://gerrit.libreoffice.org/18701 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-09remove unused Link<> fieldNoel Grandin1-12/+0
Change-Id: I8832a303ae2ac384e49488835df6b2d145ebbfcd Reviewed-on: https://gerrit.libreoffice.org/18430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-16Avoid conversion warningsMatteo Casalin1-6/+6
Change-Id: Ia618b71047f27a0400b8a9eb2c14e319c66e05dc
2015-08-11loplugin: defaultparamsNoel Grandin1-2/+2
Change-Id: I79a889c68e91712d2abdacc559c78813f730e623
2015-07-21avoid 1-past-the-end string accessLionel Elie Mamane1-5/+4
Change-Id: Ia475ce737c430fab8d019e1b8a762f81897e0847
2015-07-13Bin two unused fieldsTor Lillqvist1-14/+0
Change-Id: If06753320d34e0e677c9456ddb47bfd3636e8a66
2015-06-25loplugin:stringconstant: Flag more inefficienciesStephan Bergmann1-1/+1
Change-Id: I918023aa2e14d0913e6e05129ceb0c528b6cfd96
2015-04-09vcl: window destructors calling disposeNoel Grandin1-24/+0
Extend plugin to warn on any vcl::Window subclass that has a destructor and does not implement dispose. Apply this provision to the necessary classes in vcl/ Change-Id: I05189f8df02568131d59fc44fea904c87733c8c7
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann1-1/+1
Change-Id: I17c57a85bcda98ef36ddefd6562d4681d0c7d5fc
2015-03-13V803 decreased performance postfix incrementMichael Stahl1-2/+2
These are pretty silly anyway, but apparently it complains even about integer variables which make this rather a waste of time. Change-Id: I15e847d33d5decd2adcab04e4f1567d3997d28a2
2015-01-19fdo#39440 vcl: reduce scope of local variablesMichael Weghorn1-1/+2
This addresses some cppcheck warnings. Change-Id: Ib6b9651b828287665f7248052855f0da2779806e Reviewed-on: https://gerrit.libreoffice.org/13968 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-12convert SETTINGS_ #defines to 'enum class'Noel Grandin1-5/+5
and dump the ones that nothing is listening to Change-Id: I253ef284df785812a439dd160edba1b07fdbaac4
2015-01-12fdo#84938: replace DATACHANGED_ constants with 'enum class'Noel Grandin1-4/+4
and drop DATACHANGED_DATETIME because no-one is using it Change-Id: Id5ac9a7fbba0e35501ed82e5252f66858621f7ff
2014-12-31drop dateformatter resource loadingCaolán McNamara1-79/+0
Change-Id: Ie94c7502b0a82ca406b8d76e18def7bab8233a00
2014-12-31drop timeformatter resource loadingCaolán McNamara1-42/+0
Change-Id: I11de468ab65aa4dec761fbcc1e9416528c332dd5
2014-12-31TimeFields not loaded from resource files anymoreCaolán McNamara1-41/+0
Change-Id: Idf69d375eff4bfff7115e59530b37200ee79f086
2014-12-01fdo#84938: replace EVENT_ constants with enumTobias Madl1-18/+18
Change-Id: I8275832d8dae43b374bddd48520d11592e9a6a1f Reviewed-on: https://gerrit.libreoffice.org/13134 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-28fdo#84938: replace TIMEF_ constants with enumNoel Grandin1-19/+19
Change-Id: Ia6aa4e21fef46b20d1d8996d2f15855b8ba1776e Reviewed-on: https://gerrit.libreoffice.org/12114 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01fdo#82577: Handle TimeNoel Grandin1-35/+35
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>