summaryrefslogtreecommitdiff
path: root/include/basic
AgeCommit message (Collapse)Author
2020-04-02tdf#79426, tdf#125180 - Don't convert missing parameters to requested typeAndreas Heinisch
If a particular parameter type is requested during the construction of a parameter list, don't convert missing parameters to avoid implicit casting to the specified data type and value of the method. Missing parameters are handled in StepEMPTY, where additional information about missing parameters is added. Change-Id: Ia413b2996d7d1feecedc1dfefaf6baf0fd9d917e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90215 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-23make more classes private in mergedlibs modeNoel Grandin
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-08move some headers inside basicNoel Grandin
Change-Id: If711825c36bd4f9836fcd3ba26e5d4f38a5f3e36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25Change some #define to constexprStephan Bergmann
...plus loplugin:unnecessaryparen fallout in sw/source/uibase/docvw/edtwin.cxx. Each of the files contained at least one #define that would have caused warnings with upcoming loplugin:unsignedcompare. For consistency, I changed all #defines in those files (using a variable of a specific type if the original #define used a cast to that type, otherwise using 'auto'). Change-Id: I66f71b2d83394c9dc6952ae19df774cdd4d0b76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-29Avoid crash in shutdown when accessing already destroyed BASIC_DLLMike Kaganski
... in ImplRepository::~ImplRepository. Running on Windows: make UITest_manual_tests UITEST_TEST_NAME=calc.ManualCalcTests.test_cell_recalc fails: ... Execution time for calc.ManualCalcTests.test_cell_recalc: 8.876 tearDown: calling terminate()... ...done ERROR ====================================================================== ERROR: test_cell_recalc (calc.ManualCalcTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\lo\src\core\uitest\uitest\framework.py", line 46, in tearDown self.connection.tearDown() File "C:\lo\src\core\uitest\libreoffice\connection.py", line 178, in tearDown self.connection.tearDown() File "C:\lo\src\core\uitest\libreoffice\connection.py", line 138, in tearDown raise Exception("Exit status indicates failure: " + str(ret)) Exception: Exit status indicates failure: 3221225477 ---------------------------------------------------------------------- Ran 1 test in 131.616s FAILED (errors=1) Tests run: 1 Tests failed: 0 Tests errors: 1 Tests skipped: 0 The call stack at the point of failure is sblo.dll!std::unique_ptr<SbxAppData,std::default_delete<SbxAppData>>::operator*() Line 1886 sblo.dll!GetSbxData_Impl() Line 110 sblo.dll!SbxBase::RemoveFactory(const SbxFactory * pFac) Line 122 sblo.dll!StarBASIC::~StarBASIC() Line 964 sblo.dll!StarBASIC::`vbase destructor'() sblo.dll!StarBASIC::`vector deleting destructor'(unsigned int) tllo.dll!SvRefBase::ReleaseRef() Line 163 sblo.dll!tools::SvRef<StarBASIC>::~SvRef<StarBASIC>() Line 56 sblo.dll!BasicLibInfo::~BasicLibInfo() sblo.dll!BasicLibInfo::`scalar deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicLibInfo>::operator()(BasicLibInfo * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>::~unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>() Line 1875 sblo.dll!std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::destroy<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>(std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>> & __formal, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * const _Ptr) Line 677 sblo.dll!std::_Destroy_range<std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>(std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _First, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * const _Last, std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>> & _Al) Line 951 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::_Destroy(std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _First, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _Last) Line 1616 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::_Tidy() Line 1698 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::~vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>() Line 674 sblo.dll!BasicManagerImpl::~BasicManagerImpl() sblo.dll!BasicManagerImpl::`scalar deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManagerImpl>::operator()(BasicManagerImpl * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManagerImpl,std::default_delete<BasicManagerImpl>>::~unique_ptr<BasicManagerImpl,std::default_delete<BasicManagerImpl>>() Line 1875 sblo.dll!BasicManager::~BasicManager() Line 824 sblo.dll!BasicManager::`vector deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManager>::operator()(BasicManager * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManager,std::default_delete<BasicManager>>::~unique_ptr<BasicManager,std::default_delete<BasicManager>>() Line 1875 sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::~pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>() sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>::destroy<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & __formal, std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>> * const _Ptr) Line 677 sblo.dll!std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Ptr) Line 379 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::_Erase_unchecked(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>,std::_Iterator_base0> _Where) Line 1389 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::erase<std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>>,void>(std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>> _Where) Line 1417 sblo.dll!basic::ImplRepository::Notify(SfxBroadcaster & _rBC, const SfxHint & _rHint) Line 580 svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 50 sblo.dll!BasicManager::~BasicManager() Line 823 sblo.dll!BasicManager::`vector deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManager>::operator()(BasicManager * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManager,std::default_delete<BasicManager>>::~unique_ptr<BasicManager,std::default_delete<BasicManager>>() Line 1875 sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::~pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>() sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>::destroy<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & __formal, std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>> * const _Ptr) Line 677 sblo.dll!std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Ptr) Line 379 sblo.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::_Erase_tree<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Rootnode) Line 745 sblo.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::_Erase_head<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al) Line 753 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::~_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>() Line 1191 sblo.dll!std::map<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::~map<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>() sblo.dll!basic::ImplRepository::~ImplRepository() sblo.dll!`basic::ImplRepository::Instance'::`2'::`dynamic atexit destructor for 'repository''() ucrtbased.dll!_execute_onexit_table::__l2::<lambda>() Line 206 ucrtbased.dll!__crt_seh_guarded_call<int>::operator()<void <lambda>(void),int <lambda>(void) &,void <lambda>(void)>(__acrt_lock_and_call::__l2::void <lambda>(void) && setup, _execute_onexit_table::__l2::int <lambda>(void) & action, __acrt_lock_and_call::__l2::void <lambda>(void) && cleanup) Line 204 ucrtbased.dll!__acrt_lock_and_call<int <lambda>(void)>(const __acrt_lock_id lock_id, _execute_onexit_table::__l2::int <lambda>(void) && action) Line 975 ucrtbased.dll!_execute_onexit_table(_onexit_table_t * table) Line 231 sblo.dll!__scrt_dllmain_uninitialize_c() Line 399 sblo.dll!dllmain_crt_process_detach(const bool is_terminating) Line 182 sblo.dll!dllmain_crt_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 220 sblo.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 sblo.dll!_DllMainCRTStartup(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 335 ntdll.dll!LdrpCallInitRoutine() ntdll.dll!LdrShutdownProcess() ntdll.dll!RtlExitUserProcess() kernel32.dll!ExitProcessImplementation() ucrtbased.dll!exit_or_terminate_process(const unsigned int return_code) Line 144 ucrtbased.dll!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 282 ucrtbased.dll!exit(int return_code) Line 294 soffice.bin!__scrt_common_main_seh() Line 297 soffice.bin!__scrt_common_main() Line 331 soffice.bin!mainCRTStartup() Line 17 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Two problems here: 1. Deleting a function-local static ImplRepository object happens after BASIC_DLL destruction either in SfxApplication::~SfxApplication or in MacroSnippet::~MacroSnippet, so BasicManager dtor indirectly trying to access BASIC_DLL segfaults. 2. Implicit clearing of m_aStore in ImplRepository dtor calls dtors of owned BasicManager objects, which in turn notify parent ImplRepository, which again deletes the objects. This change limits lifetime of ImplRepository object with SbxAppData in BASIC_DLL, and avoids "owned BasicManager is deleting" notifications in its dtor. In dbaccess_complex test, ODatabaseContext accesses ImplRepository instance independently of SfxAppData_Impl lifetime: the latter is created before the former is created (and accesses ImplRepository instance first time), and destroyed before the former is destroyed (and accesses ImplRepository last time). So BASIC_DLL lifetime made ref-counted, to allow correct sharing of common instance between objects with independent lifetime. See also commit 3ebf6a090b227c0097ff8668fe023e7bdbdadc5d. Change-Id: I2ca36a87ddaf669557b3c3c7678e3d74aae66cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85892 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-09GetSource32 and GetSource are identicalMike Kaganski
Change-Id: Ia7c6687586b5a37b7556f1bae9ffd5b5b954db47 Reviewed-on: https://gerrit.libreoffice.org/84747 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-09SbxArray: drop 16-bit indicesMike Kaganski
Change-Id: I43b478187636b9bb53fdf7ab938436ae364bd7a7 Reviewed-on: https://gerrit.libreoffice.org/84733 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-04tdf#129107 objects in basic disappearNoel Grandin
Reverts part of "loplugin:useuniqueptr in SbModule" This reverts commit 263d7325691f4b0a1bda155f1c53bbcf712e9f09. because SbClassModuleObject is playing silly buggers with ownership by messing with fields in its SbModule superclass. Change-Id: I725332d080663e94b57f4bd4e1fb05aeeddf9038 Reviewed-on: https://gerrit.libreoffice.org/84352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-29make some function symbols module privateNoel Grandin
improve the script to filter out more noise generated by library symbols Change-Id: I22bf6037d56bc4015001825c3fb3b21a39d85e07 Reviewed-on: https://gerrit.libreoffice.org/84022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-03make some classes module-privateNoel Grandin
improve the script, but it still generates some false positives Change-Id: If8ee1cba8c04ac0be11f73220149e6de15f24f44 Reviewed-on: https://gerrit.libreoffice.org/81929 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-28loplugin:finalclasses in avmedia..basicNoel Grandin
Change-Id: Ia54364237149fac38e6ebcc5fcf9933d0ccf5984 Reviewed-on: https://gerrit.libreoffice.org/81619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-08New loplugin:classmemaccessStephan Bergmann
...to complement and improve upon GCC's -Wclass-memaccess. See the comment at the head of compilerplugins/clang/classmemaccess.cxx for details. (It is not yet clear to me whether we would want to get this upstreamed into Clang.) 35d21e4bf6f66b3bbc7a44fcf184cb721b524a94 "Remove redundant memsets" was a case that benefited from looking through toplevel casts to void*. (Though the code in include/basic/sbxvar.hxx needs a slightly more verbose way to deliberately silence the warning now.) d03041e19215592f21ba1222d3cfa29e1f94260a "Drop bogus memsets" is one example of various cases that GCC -Wclass-memaccess failed to catch due to the use of array instead of pointer types. Change-Id: I6a9bfc34e3536834af35fdf4fb7ceeb31f31f8c0 Reviewed-on: https://gerrit.libreoffice.org/80421 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-10Fix typosAndrea Gelmini
Change-Id: I4671d0f13e67b1272fd7c24bb6a2a7679c75f20b Reviewed-on: https://gerrit.libreoffice.org/78797 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-06-11loplugin:virtualdown in SbxValueNoel Grandin
Change-Id: I746b6b7e18265366903825ccf6c94f672dc92db9 Reviewed-on: https://gerrit.libreoffice.org/73770 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-10an uno -> a unoCaolán McNamara
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.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-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-06remove with_sprintf_ defineNoel Grandin
it has been this way since commit f333ee4564f7786f5f4ca501d71e660b5c366b93 Date: Wed Apr 11 11:54:30 2007 +0000 INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED Change-Id: I317efd9538436480a9fc3d37e748b0a51052ef80 Reviewed-on: https://gerrit.libreoffice.org/62932 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15clang-tidy bugprone-copy-constructor-initNoel Grandin
message is "calling a base constructor other than the copy constructor" these constructors are not in use, so just remove them Change-Id: Ic8cede1eb153a6ae97fd1ca9c96ca8c1f43e3399 Reviewed-on: https://gerrit.libreoffice.org/61784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-21new loplugin:methodcyclesNoel Grandin
look for closed cycles of methods i.e. unused code that would not otherwise be found by the unusedmethods loplugin Change-Id: I3fb052132d97aabca573bb8e9fc424201b1e2042 Reviewed-on: https://gerrit.libreoffice.org/60875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-03loplugin:useuniqueptr in BasicManagerNoel Grandin
Change-Id: I9774a1651c8754f575ebb4b98fbddee5a99a7719 Reviewed-on: https://gerrit.libreoffice.org/58485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27related tdf#109132, ugly hack to ensure the VBA mode is setup during importMarkus Mohrhard
Change-Id: Ia48e4b19eb690ba7ab24a37538f6de11a74ad4d3 Reviewed-on: https://gerrit.libreoffice.org/58148 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-03-29loplugin:unusedmethodsNoel Grandin
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29loplugin:virtualdown in basctl,basicNoel Grandin
Change-Id: If0d729ee84263a5afb2c7acb2d62b08602aa59f4 Reviewed-on: https://gerrit.libreoffice.org/52046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-17Typos: definied->definedJulien Nabet
Change-Id: I052d6a4815372c79b6d62c1c85d303c6272af3df Reviewed-on: https://gerrit.libreoffice.org/51466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23Introduce SbxValues::clearStephan Bergmann
...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non- trivial type ‘struct SbxValues’") Change-Id: Icf610e692b81030bfd6f2f940c43ee8bf6f1d4e0 Reviewed-on: https://gerrit.libreoffice.org/48389 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19loplugin:useuniqeptr in SbxVariableNoel Grandin
Change-Id: I788ec594589d9708e12db83a7371b5a8d9fed38c
2018-01-19loplugin:useuniqueptr in SbModuleNoel Grandin
Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
2018-01-17Fix typosAndrea Gelmini
Change-Id: I5fff9ccb1bc74b85ee378439ffa2272583ffcb0f Reviewed-on: https://gerrit.libreoffice.org/48024 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-12More loplugin:cstylecast: basicStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I20b38196ee1b6a34384dc46d9de1b6e1b44947ae
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-12-26loplugin:passstuffbyref improved return in basic,frameworkNoel Grandin
Change-Id: Ib19836febb59f4e2bb07dc874cfc6baabc653237 Reviewed-on: https://gerrit.libreoffice.org/47065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19Fix typosAndrea Gelmini
Change-Id: Ibffe19c1dfda9d0f4ba8d2a0761ad1222491007f Reviewed-on: https://gerrit.libreoffice.org/46599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-17inline SbxMAXSALUINT64 and friendsNoel Grandin
which don't offer any value Change-Id: Ie8082abc80ffd0e7719f4fa9a0d5f93203628ee5 Reviewed-on: https://gerrit.libreoffice.org/44798 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-23overload std::hash for OUString and OStringNoel Grandin
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29rename SBX errorcodes to BASICNoel Grandin
Change-Id: Ia6c2d2379a2f6e9b1109e2c04edd5cdd9dcf242f Reviewed-on: https://gerrit.libreoffice.org/41706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29move all the basic errcodes to one fileNoel Grandin
Change-Id: Ic3353c80ac9fdbd17f17503b1c973c9a7cef0c7f Reviewed-on: https://gerrit.libreoffice.org/41617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-27convert code-class in ErrCode to scoped enumNoel Grandin
Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7 Reviewed-on: https://gerrit.libreoffice.org/41601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-22Convert ErrCode area to scoped enumNoel Grandin
Change-Id: Ifa365bbac3c7eb21da9381ec8bb3be6b6785016b Reviewed-on: https://gerrit.libreoffice.org/41402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11new loplugin:deadclassNoel Grandin
look for classes which only have copy/move constructors, and so are effectively dead Change-Id: I0b844f301e2200c2b40031856bfdb0b0e2c8f77d Reviewed-on: https://gerrit.libreoffice.org/41039 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-07-28loplugin:constparams handle constructorsNoel Grandin
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21de-hrc various thingsCaolán McNamara
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
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