summaryrefslogtreecommitdiff
path: root/chart2/source/tools
AgeCommit message (Collapse)AuthorFilesLines
2017-09-11clang-tidy modernize-use-emplace in c*Noel Grandin11-379/+255
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9 Reviewed-on: https://gerrit.libreoffice.org/42110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin1-3/+2
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin3-3/+3
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02remove unnecessary use of 'this->'Noel Grandin9-39/+39
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01move resmgr to unotoolsCaolán McNamara2-5/+3
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01loplugin:checkunusedparamsNoel Grandin3-27/+12
the "check for taking address of function" part was generating false+ Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f Reviewed-on: https://gerrit.libreoffice.org/40613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:checkunusedparams more part3Noel Grandin3-14/+10
Change-Id: I621fcf7ceb27238ca86d2299dfb2b8ed03c270fd Reviewed-on: https://gerrit.libreoffice.org/40509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27loplugin:constparams in chart2Noel Grandin5-11/+11
Change-Id: Ic325b79f04e04aa19e08a60db30b982d90f04c80 Reviewed-on: https://gerrit.libreoffice.org/40480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25loplugin:unusedmethodsNoel Grandin1-38/+0
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb Reviewed-on: https://gerrit.libreoffice.org/40391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-23tdf#103984 : For bubble charts append data column...Dennis Francis1-1/+1
for "values-size" role too, after parsing in InternalDataProvider::createDataSequenceFromArray(). Without this, embedded bubble charts in documents(MSO) other than spreadsheets will be empty when imported. Also adds docx import chart2-unit-test in chart2import.cxx Change-Id: I63168074b30090a8b7cf977eb5af443f6b9ac240 Reviewed-on: https://gerrit.libreoffice.org/40258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-07-21migrate to boost::gettextCaolán McNamara5-14/+11
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-18Change nonsense non-const Date* GetNullDate() to const Date&Eike Rathke1-10/+5
* first, a non-const Date* may leave the impression that one could change the NullDate through the pointer, which is only partly successful; luckily no one did that * second, there is always a NullDate so checking for nullptr is superfluous * third, the pointer was dereferenced (maybe after a check) everywhere to obtain the NullDate, luckily.. Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
2017-07-13use more OUString::operator== in a*..chart2Noel Grandin5-8/+8
Change-Id: Ifb5608abebffd9687ed55e8c74f9be54a749111d Reviewed-on: https://gerrit.libreoffice.org/39887 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)Noel Grandin1-1/+1
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-09C++11 replace std::remove_copy_if with std::copy_ifJochen Nitschke1-4/+2
remove_copy_if copies entries for which predicate returns false. since C++11 there is copy_if which copies entries for which predicate returns true. Change-Id: I3ade82f13d27364e2cd35f4286b18128f52f8a5b Reviewed-on: https://gerrit.libreoffice.org/39727 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke1-2/+2
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03use begin()/end() when working with SequenceNoel Grandin3-6/+6
Change-Id: Icf9da6a24d72c073338f6fbb513d7250b3898015 Reviewed-on: https://gerrit.libreoffice.org/39469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke6-29/+22
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-02loplugin:casttovoid: chart2Stephan Bergmann3-4/+0
Change-Id: I63a2429860bf0ac3d80a8a43bcbde8b8f00f533f
2017-06-29ChartTypeHelper::getSupportedLabelPlacements nDimensionCount was ignoredStephan Bergmann1-3/+1
...ever since the code's integration with 124d934dffd8737db2d4375029c5a8b3880acaec "INTEGRATION: CWS chart17: #i63857#, #i4039# more flexible placement of data point labels, best fit for pie labels" Change-Id: I942d7ff128d0b9e42ede371f81860f3c67943879
2017-06-23loplugin:unusedfields in accessibility..comphelperNoel Grandin1-31/+12
Change-Id: Ifb68d65fc3e48dd80e3ff2b7a4124468fdda1695 Reviewed-on: https://gerrit.libreoffice.org/39137 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20loplugin:oncevar chart2Noel Grandin6-18/+9
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-06-12cleanup unused css/frame/* includesJochen Nitschke2-3/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin2-3/+3
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23loplugin:comparisonwithconstant in chart2Noel Grandin7-25/+25
Change-Id: I95787007b26cdcf0d5d1617ecd0e55d377b551d7 Reviewed-on: https://gerrit.libreoffice.org/37941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19loplugin:stringcopy: chart2Stephan Bergmann1-6/+6
Change-Id: Ia7cfa9b56646c83ead491d419aba5bd8d9306fe4
2017-05-19make string translation loading more uniformCaolán McNamara2-4/+4
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-18can drop SCH_RESSTR nowCaolán McNamara3-10/+10
Change-Id: Ic9e82098101cb184faec6b3f7fe4c821f5df3278
2017-05-16loplugin:unusedfields improve write-only analysisNoel Grandin1-48/+0
by whitelisting a couple of methods we know only write to their parameters Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c Reviewed-on: https://gerrit.libreoffice.org/37647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin3-3/+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 Sherlock13-33/+33
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert chart2 tools source from OSL_ASSERT to assertChris Sherlock13-33/+33
Change-Id: Ib55bb437ff7228d12fa2b6c37fb71242f3a136b4
2017-04-29tdf#107097 invoke internal DP and correctly handle "range" namesTomaž Vajngerl1-0/+4
When we copy/paste a pivot chart to another (new) document, we "send" a chart data as ODC to the other document. In the new document we can't use the pivot table (as there is none in this document) so we read-in the table data from the document to the internal data provider. The problem was that we didn't match the (fake) range names from the pivot table correctly in the internal data provider and the data wasn't populated. This commit fixes that and changes the fake range names to something that is easy to parse and matches the names in internal data provider. Change-Id: I9872160cca68abd91738a25bf9b3b27bc77ce38d Reviewed-on: https://gerrit.libreoffice.org/37086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-28loplugin:salunicodeliteral: chart2Stephan Bergmann2-2/+2
Change-Id: I8531b2466298a18c06a4c2a690af6bc998cc802f
2017-04-28commit: loplugin:checkunusedparams in chart2Noel Grandin5-9/+9
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-04-19clang-tidy readability-simplify-boolean-expr in accessibility..cuiNoel Grandin3-17/+6
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc Reviewed-on: https://gerrit.libreoffice.org/36677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-15Fix typosAndrea Gelmini1-2/+2
Change-Id: I0238202c0dc0380b0e33a9c4567a9513c0afbe91 Reviewed-on: https://gerrit.libreoffice.org/36556 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31use actual UNO enums in chart2Noel Grandin1-4/+4
Change-Id: I05d4eed55f5deba4b1802389d1ba94582d30550f Reviewed-on: https://gerrit.libreoffice.org/35917 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: If92860597a44ee79b513d255ce3f21112485a97e Reviewed-on: https://gerrit.libreoffice.org/35617 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19TyposJulien Nabet1-4/+4
Change-Id: I13020539fe121151e884a90d72d47788fb3ae65c Reviewed-on: https://gerrit.libreoffice.org/35436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-3/+3
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-21loplugin:subtlezeroinit: chart2Stephan Bergmann1-1/+1
Change-Id: I9012f97b188195140504dacb262c212d46df675a
2017-02-17convert StackMode to scoped enumNoel Grandin3-25/+19
and drop unused AMBIGUOUS enumerator Change-Id: I71954d75a64928061c0e520beb47f979c53ee5a8
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist30-201/+201
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-12[API CHANGE] Add PopupRequest - a callback to open a pop-up win. in calcTomaž Vajngerl1-0/+42
Change-Id: Iea600e229deb69d1638a1a649008fc4738a5934a Reviewed-on: https://gerrit.libreoffice.org/34005 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-02-12"Unicode" is a proper noun and should not be used in pluralTor Lillqvist4-4/+4
The 16-bit things that make up the UTF-16 encoding are called "code units". Change-Id: Iab2b83323783e518198c1a0553f7b053fc415985
2017-02-08The string "###" can be written as such, no need for a Special Const VariableTor Lillqvist2-5/+2
Change-Id: Ib9737acc8e0a9845fc03ed2c7de7969cef41f27c
2017-02-08A newline is not that special or hard to rememberTor Lillqvist1-1/+1
Change-Id: I2960a59283a5a04c5c804a57e43bdb633c0e45cf
2017-02-03makeAny->Any in basctl..chart2Noel Grandin23-129/+129
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>
2017-01-26Remove dynamic exception specificationsStephan Bergmann31-440/+59
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>