summaryrefslogtreecommitdiff
path: root/chart2/source/tools/DiagramHelper.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-05-07replace ODFDefaultVersion usage with ODFSaneDefaultVersionMichael Stahl1-2/+2
Compare with ODFSVER_012 mostly works the same, except for places where namespaces are defined where the ODFSVER_EXTENDED bit should be checked. Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-19loplugin:flatten in chart2Noel Grandin1-35/+35
Change-Id: Iadc4da6515a7d82e7a92b33d74d589b61fa2c64f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92480 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07Fix typoAndrea Gelmini1-1/+1
Change-Id: Idf99108e6f7813551a8cee2e8d7b990de8a36ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88251 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-12tdf#34517 Bring forward/backward in chart series switchedKelemen Gábor1-1/+2
Turns out bringing a data series forward means its index is increased while bringing backwards means decreasing it. Since the bool MOVE_SERIES_FORWARD is defined as true in ControllerCommandDispatch.cxx the condition here meant that bringing forward decreased the index and MOVE_SERIES_BACKWARD as false meant that bringing backward increased the index. Now the commands do the expected series order change. Change-Id: Ib49b301eacc227439b8fb3b0dc3513e59cbdc484 Reviewed-on: https://gerrit.libreoffice.org/84608 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-09-01Fix '..'Andrea Gelmini1-1/+1
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for ".." instead of "..." between words. It passed "make check" on Linux. Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8 Reviewed-on: https://gerrit.libreoffice.org/78357 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-07-19loplugin:referencecasting in canvas..chart2Noel Grandin1-8/+6
Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc Reviewed-on: https://gerrit.libreoffice.org/75935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-10Use hasElements to check Sequence emptiness in chart2..connectivityArkadiy Illarionov1-8/+8
Similar to clang-tidy readability-container-size-empty Change-Id: I41824e8a4ef38d6a35a0ac4421cffcbcd17308e1 Reviewed-on: https://gerrit.libreoffice.org/71802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13Remove ContainerHelper.hxxArkadiy Illarionov1-3/+2
Use comphelper::sequenceToContainer instead of ContainerHelper::SequenceToVector Change-Id: I4834255a1349ac7a29127a84a54fcfa98d678d00 Reviewed-on: https://gerrit.libreoffice.org/72186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08loplugin:indentation in canvas..chart2Noel Grandin1-1/+1
Change-Id: I9ef57a2e9aaf298f4cfd029aa9b8143871b1bc21 Reviewed-on: https://gerrit.libreoffice.org/67526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23clang-tidy performance-unnecessary-copy-init in canvas..cuiNoel Grandin1-2/+1
Change-Id: I08c137d852b5f1f817c171ee4f1cee7971417dc4 Reviewed-on: https://gerrit.libreoffice.org/62214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19loop run a maximum of onceCaolán McNamara1-18/+15
revealed since... commit f69585c35411ca74e17bb6cd1cf535489472a4c2 Date: Tue Mar 1 20:38:22 2016 +0200 loplugin:unuseddefaultparams in chart2 Change-Id: I805680f7087313b1bb678ab6f6756d7a2ccc3720 Reviewed-on: https://gerrit.libreoffice.org/61991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-16Resolves: tdf#115182 default Chart percentage format is integerEike Rathke1-1/+5
Regression from commit 0f4b3cb7d3d68906de316a64dcec281da2a641bd CommitDate: Mon Aug 10 17:12:45 2015 +0200 The chart2/qa/extras/xshape/data/reference/tdf90839-?.xml reference files were created with the then wrong default of two decimals so need to be adapted. For chart2/qa/extras/xshape/data/reference/tdf90839-1.xml this meant to regenerate because of the changed positions and sizes of labels. Change-Id: Ib0c2c862af9399ab2af5178d01510aa5e4fff97c Reviewed-on: https://gerrit.libreoffice.org/61826 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-10-09tdf#42949 Fix IWYU warnings in chart2/source/tools/*cxxGabor Kelemen1-7/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I804895a4dd2d98707f0d1bbbc9bb78782b07a397 Reviewed-on: https://gerrit.libreoffice.org/61505 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17cppcheck: knownConditionTrueFalse in chart2Jochen Nitschke1-4/+3
Change-Id: I89164a9bc4710d9a90d415c2369c2cde3857c778 Reviewed-on: https://gerrit.libreoffice.org/60552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-2/+2
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-28tdf#42949 Fix IWYU warnings in chart2/source/inc/[l-z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Some only-recently analyzed files were cleaned. Also tried harder to use more fw decls instead of blacklisting Change-Id: Ie4f8eb7065e44a2b5208d6da4fa8e3681a31820b Reviewed-on: https://gerrit.libreoffice.org/59420 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-08tdf#42949 Fix IWYU warnings in chart2/source/inc/[d-l]*hxxGabor Kelemen1-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Try harder to use fw declarations, and a few newly analyzed files Change-Id: I50299e9115ced60468c7bc5e63013addbaec48c0 Reviewed-on: https://gerrit.libreoffice.org/58618 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-09Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from a* to configmgr Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a Reviewed-on: https://gerrit.libreoffice.org/57170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin1-2/+0
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin1-32/+33
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-03Use for-range loops in chart2 (part1)Julien Nabet1-15/+8
Change-Id: I9310a6dc79d47f9058df8a3b463667389af1b2cb Reviewed-on: https://gerrit.libreoffice.org/50672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin1-2/+2
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-03inline ASSERT_EXCEPTION macro in chart2Noel Grandin1-17/+16
Change-Id: I6bdcde5fd416531e2cdd3c9ec160833f1022247c Reviewed-on: https://gerrit.libreoffice.org/44246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: chart2Stephan Bergmann1-15/+15
Change-Id: I5b455c684e7cd689d5160135246f3400363c7d40
2017-07-02loplugin:casttovoid: chart2Stephan Bergmann1-1/+0
Change-Id: I63a2429860bf0ac3d80a8a43bcbde8b8f00f533f
2017-06-20loplugin:oncevar chart2Noel Grandin1-6/+3
Change-Id: I2dd0939db440b5357225395e88680dd0b0fdbf43 Reviewed-on: https://gerrit.libreoffice.org/38970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin1-1/+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-07revert OSL_ASSERT changesChris Sherlock1-11/+11
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert chart2 tools source from OSL_ASSERT to assertChris Sherlock1-11/+11
Change-Id: Ib55bb437ff7228d12fa2b6c37fb71242f3a136b4
2017-04-28commit: loplugin:checkunusedparams in chart2Noel Grandin1-1/+1
Change-Id: Ia1f42e74365ca1dace93babc132ad67fd09fc99d Reviewed-on: https://gerrit.libreoffice.org/37064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-17convert StackMode to scoped enumNoel Grandin1-15/+12
and drop unused AMBIGUOUS enumerator Change-Id: I71954d75a64928061c0e520beb47f979c53ee5a8
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist1-15/+15
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: https://gerrit.libreoffice.org/34324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-03makeAny->Any in basctl..chart2Noel Grandin1-9/+9
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61 Reviewed-on: https://gerrit.libreoffice.org/33867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-06rtl::math::approxEqual(value,0.0) never yields true for value!=0.0Eike Rathke1-1/+1
... so replace with a simple value == 0.0 also in other modules than sc. Change-Id: Ie7316505a1cf9c15100114b45d300facceb03b7e Reviewed-on: https://gerrit.libreoffice.org/29575 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-1/+1
Change-Id: I1230a1785c61b8ef5dab97176e7c06600ac95a5b
2016-03-14com::sun::star->css in chart2Noel Grandin1-4/+3
Change-Id: I04320d32d6d5c54e461cfabef58645f8b772bc69
2016-03-02loplugin:unuseddefaultparams in chart2Noel Grandin1-32/+10
Change-Id: I03a3580fdbd1f6cf08af329b07edcfe09ecbb9aa
2016-01-06Fix typosAndrea Gelmini1-2/+2
Change-Id: Ie0578dcca6cbf4edb62544109d616a081888f369 Reviewed-on: https://gerrit.libreoffice.org/21140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-19use comphelper::containerToSequenceNoel Grandin1-2/+3
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-5/+5
Change-Id: I71de514405bb9bcc746c1ab9633e7fe659888943
2015-10-30use uno::Reference::set method instead of assignmentNoel Grandin1-1/+1
Change-Id: I58410209f32f988f258a588364e0b037c2790211
2015-08-12move date/time guess work to SvNumberFormatter::GuessDateTimeFormat()Eike Rathke1-31/+2
Change-Id: I26f7c47f5b3cf4a3c4274832448d9c8076981af0
2015-08-10if we have a number formatter then use it, dammit..Eike Rathke1-8/+17
Change-Id: I2d70bed4d9cf6f0ef4556a327c51fc5c10fcd2be
2015-08-10if we have a number formatter then use it, dammit..Eike Rathke1-15/+16
Change-Id: I43b777bb0b3f53682bab7af4643b29e2bd313caa
2015-08-10tdf#92997 obtain a date/time edit format according to field valueEike Rathke1-0/+49
Bloody workaround hack for the fact that Chart does not handle category/x-axis times internally and is not able to pass its own axis numberformat to its own databrowser editor. Change-Id: I016695ad0104366c0bb636b449a2014ade31aca3
2015-06-04uno::Sequence provides now begin and endNoel Grandin1-4/+3
use begin() and end() when calling std::copy on an uno::Sequence Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2 "uno::Sequence provides now begin and end" Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b Reviewed-on: https://gerrit.libreoffice.org/16057 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-07fdo#39440 reduce scope of local variablesŁukasz Hryniuk1-3/+2
Beside scope changes, it fixes lack of initialization in a few places. Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2 Reviewed-on: https://gerrit.libreoffice.org/13755 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-18chart2: Use appropriate OUString functions on string constantsStephan Bergmann1-1/+1
Change-Id: Ifc28920e69db410b00312e634caba33b0e286b7f
2014-09-19More scope reduction.Kohei Yoshida1-76/+77
Change-Id: Ibaabf1122fb3e828c1b7b71e846911d77f312445
2014-06-19Use define constant to keep track of all NumberFormat property usage.Kohei Yoshida1-2/+3
Change-Id: I2a544922e03ec8253290ac8bf5a89c9cdd72d8dd