summaryrefslogtreecommitdiff
path: root/basic/inc
AgeCommit message (Collapse)Author
2019-11-12tdf#42949 Fix IWYU warnings in basic/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I325149be2ea7697b5b4a2ce4a662edd2f8be6e50 Reviewed-on: https://gerrit.libreoffice.org/82312 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-05make some classes module-privateNoel Grandin
Change-Id: Ice9a57eedb166672dbdfae6da2a172ab77566a19 Reviewed-on: https://gerrit.libreoffice.org/81983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03find symbols that can be privateNoel Grandin
update the script and make private standalone functions Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1 Reviewed-on: https://gerrit.libreoffice.org/81879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-03loplugin:constmethod in basicNoel Grandin
Change-Id: Ib2056ab8437e163c7ae42e3ab7a4a3f8b6cb80a2 Reviewed-on: https://gerrit.libreoffice.org/78547 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-03-07tdf#42949 Fix IWYU warnings in include/basic/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9dd7984affc4343f148c66077feaac19176adf51 Reviewed-on: https://gerrit.libreoffice.org/68769 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-20o3tl::make_unique -> std::make_unique in include/ & o3tl/Gabor Kelemen
Also the last few remaining occurrences of the header Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I18f435270057f2d09e21d6ea262532cbcc974598 Reviewed-on: https://gerrit.libreoffice.org/67843 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-20drop unnecessary includesCaolán McNamara
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-02RID_* can be extern global variablesNoel Grandin
no need to access them via methods Change-Id: If0d1a65d6f56ce2fc585749d974ba13c9f2749b2 Reviewed-on: https://gerrit.libreoffice.org/47245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10loplugin:finalclasses in basic,basegfxNoel Grandin
Change-Id: Iff223782fa0ded0fe46b8b7af35bfd21f331015f Reviewed-on: https://gerrit.libreoffice.org/44535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: basicStephan Bergmann
Change-Id: I6fbba5c4619eec7ae03fed65a18974faa0f190af
2017-10-10basic: consistently use "" and <> in include directivesMike Kaganski
Change-Id: I147c0e9b9b1e09af593f54799e45e1348cd40716 Reviewed-on: https://gerrit.libreoffice.org/43298 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-25no need to use ERRCODE_RES_MASK hereNoel Grandin
the relevant usage sites already call GetRest() before comparing Change-Id: I5e8ce3a3c2b6972810aa527356f6350c61b8bd63 Reviewed-on: https://gerrit.libreoffice.org/41470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02normalize resource locale ctor construction mechanismsCaolán McNamara
make them all the same and share std::locales more various OModuleClient, etc, classes go away Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5 Reviewed-on: https://gerrit.libreoffice.org/40634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-01loplugin:checkunusedparamsNoel Grandin
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-21migrate to boost::gettextCaolán McNamara
* 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-20loplugin:constparams in basicNoel Grandin
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60 Reviewed-on: https://gerrit.libreoffice.org/40214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: basicStephan Bergmann
Change-Id: I4e70accf67d4d812b8998b0baa07cd04c27216ad
2017-06-15replace SbxError typedef with ErrCodeNoel Grandin
part of a larger patch to convert ErrCode to strong_int Change-Id: Ia56e5d6d8c4217d6f258e2113d20ce737977892f Reviewed-on: https://gerrit.libreoffice.org/38813 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in basctl and basicNoel Grandin
Change-Id: I077ce96aed3c79045d5e8438109a8b1690ff1218 Reviewed-on: https://gerrit.libreoffice.org/37062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27tools: move errcode.hxx to the vcl moduleChris Sherlock
Change-Id: I17e5a033de5f0aeb0a726744f7b464cdab6e2ee3 Reviewed-on: https://gerrit.libreoffice.org/36854 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-17remove unused defines from HRC files in variousNoel Grandin
Change-Id: Ia1ba313d2438f04a84bcfcbbbcf6fffea5c1921d Reviewed-on: https://gerrit.libreoffice.org/35310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(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>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, basicStephan Bergmann
Change-Id: Ic3e265e05c69942c5c1c7d1b83f65f2cbe35ca1f
2016-10-19loplugin:expandablemethodds in basctl..chart2Noel Grandin
Change-Id: I96f565a974fe3e316ae2ab04f8731b8bbfb87993 Reviewed-on: https://gerrit.libreoffice.org/29998 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:dllprivateStephan Bergmann
Change-Id: I1fe70a39c50aba8b84c117653185fc37dbbfeab0
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-29BASIC : Remove useless SbxBase::GetCreatorArnaud Versini
Change-Id: I3d9aa358ffaefc11b7d2427f2b567c360be2c667 Reviewed-on: https://gerrit.libreoffice.org/28434 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-13BASIC: Use more often std::unique_ptrArnaud Versini
Change-Id: I37f3b35afcf3b4dba30a6ba841a59e0d851f1ebb Reviewed-on: https://gerrit.libreoffice.org/27930 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18BASIC: Remove useless overridesArnaud Versini
Change-Id: I49eb680bb0945a65a98978e98750fd62669fd820 Reviewed-on: https://gerrit.libreoffice.org/27255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27loplugin:singlevalfields in basic and fix leakNoel Grandin
And fix leak in BasicManagerImpl where it would never have freed the streams. Change-Id: I1e99c2c6a70a8cac27dd5c86a7042efc3de7a578 Reviewed-on: https://gerrit.libreoffice.org/26632 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-13loplugin:passstuffbyref in basicNoel Grandin
Change-Id: Ie93b33502325f00ba95ab168a445a347148f9edd
2016-04-12Avoid reserved identifierStephan Bergmann
Change-Id: Ic59b23de2c11e8a0a86c3711a4507cd76e07896f
2016-03-08tdf#94306 Replace boost::noncopyable with plain C++11 deleted copy ctorsSteven Guo
Replaced boost::noncopyable with plain C++11 deleted copy ctors in /basic/* files. Change-Id: I9c0eb0a51ec5cb25c88c72b55f42864e73006e6b Reviewed-on: https://gerrit.libreoffice.org/22969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-05Fix typosAndrea Gelmini
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727 Reviewed-on: https://gerrit.libreoffice.org/21103 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-11-18remove unused typedefs and inline use-once typedefsNoel Grandin
and improve the script a little Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84 Reviewed-on: https://gerrit.libreoffice.org/20033 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15Fast PCH generator and optimized PCH filesAshod Nakashian
Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-115th step to remove tools/rtti.hxxOliver Specht
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-10-26basic: replace boost::ptr_vector with std::vector<std::unqiue_ptr>Michael Stahl
Change-Id: Ieba2fb34e0279871d36b4fe80d9de76e614b5cde
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-18boost->stdCaolán McNamara
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0 Reviewed-on: https://gerrit.libreoffice.org/18670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-20com::sun::star->css in basicNoel Grandin
Change-Id: I637fd7aedeb97b7dca22521474a54a1d4274f212 Reviewed-on: https://gerrit.libreoffice.org/17206 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-27coverity#1308445 Uncaught exceptionCaolán McNamara
Change-Id: I831637f7f2fb2c552de8c20dc9f5da4e8783b935
2015-06-24remove SFX_NOTIFY macroNoel Grandin
it has not served any purpose since we switched to using normal C++ RTTI for the SfxHint objects Change-Id: Ic81353bcb7863ce892eb75296248ca14d8fd6c86
2015-06-17Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-19tdf#90110: basic: fix Randomize statementMichael Stahl
- time() is used to seed the RNG but since it only has second resolution, the same values will be generated if it's called multiple times like in the bug report - BASIC using the global rng would be fine except that BASIC Randomize takes an optional parameter to set the seed, which should continue to be supported, but should not affect the RNG state for non-BASIC users of comphelper::random (regression from df466d79cb126667cc9d5c108367bfa4f5ce76c8, but the old implementation was even more delightfully absurd, where Randomize was essentially srand((sal_uInt16)rand()) ...) Change-Id: I0f30e509de08f933c02ac77c5d932b20e79586c5
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd