summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)AuthorFilesLines
2020-02-03loplugin:unusedfieldsNoel Grandin2-10/+13
tweak plugin with the name of another clone method Change-Id: I47193d31f53f48297c9e773da375c7255ddde282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87852 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák4-9/+164
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-31new loplugin:namespaceindentationNoel Grandin2-2/+2
check indentation of braces in namespace decls, and the comments that often appear with them. This is my penance for messing up the indentation with clang-tidy-modernize-namespaces. As such I have limited it to new-style namespaces for now, and the check is off by default. Change-Id: I4db7f10a81c79bc0eece8f8e3ee564da8bc7f168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorOnur Yilmaz2-4/+2
Change-Id: Ie5a381fc5e5b73490ab8b2036ef2a1164e475e8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87557 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-28drop some unneeded vcl/builderfactory.hxx includesCaolán McNamara1-1/+0
Change-Id: I3a6f4756a01a35825e6efaa7de33fcc863b5aaf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann10-21/+30
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28remove some unused local varsNoel Grandin1-1/+1
found by my new aggressive unused var plugin. these are unused return values from function calls Change-Id: I3359c583f535828f192cb833762dfedc008d82f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26Avoid explicit casts to smaller sal_uInt16 from larger intStephan Bergmann1-5/+6
...in what might be attempts to avoid warnings about signed vs. unsigned comparisons. Change-Id: I8eceaa989c35558e37cb815d997dda88d17c22b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87444 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26remove some unused local varsNoel Grandin2-2/+0
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26rename some local variablesNoel Grandin1-2/+2
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25tdf#124176: Use pragma once instead of include guardsBatuhan Taskaya5-20/+5
Change-Id: Ic35fce6fbc9c41a004f93952df83496ca1809004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87380 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-24loplugin:makeshared in cui..desktopNoel Grandin21-43/+43
Change-Id: I45b7381f665a749b86302be07fa095a30842428f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-23loplugin:unusedmethodsNoel Grandin5-38/+0
Change-Id: Ic2212a502bbd42217934884f4fce49f6f8d4765c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21use more FastParser in SvXMLStylesContextNoel Grandin4-53/+21
Change-Id: I05c7314739246a864b16723c13bd8fbb4ef725e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21Use FastParser in XMLDocumentSettingsContextNoel Grandin1-10/+4
and flatten the pImpl data Change-Id: I8d817cd2af0a3855d10dbfaa580c3379119d5067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21use FastParser in XMLScriptContextNoel Grandin1-3/+3
Change-Id: I7c5f5b77a78307c556ee5718480346ed3dd159fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20Resolves: tdf#130075 have to specify which column is the text columnCaolán McNamara1-1/+7
in this two column case Change-Id: Ia999a0540b2d0f7c03a54241c61bf4c2231b8460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-16tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorMesut Çifci4-10/+5
Change-Id: Ic6ed5dcf6343a4ff59a1f69c77c82b03b4ee6198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-16return nullptr from Create*Context methods in nullptr subclassesNoel Grandin1-6/+1
the calling class handles this nicely, and also tells us when we are not handling some part of the XML file Change-Id: Ic51a42b9d2dec96243e7f83b528d7455d4bc0504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-16clang-tidy modernize-concat-nested-namespace in dbaccess..desktopNoel Grandin1-2/+2
Change-Id: I35a3d422fe020a08f6c2678097252334a3951f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-13convert dbaccess to FastParser APIsNoel Grandin41-1104/+653
Noting that I use "& TOKEN_MASK" a lot because we can be dealing with either NAMESPACE_DB or NAMESPACE_DB_OASIS. Change-Id: I5ca0aac61e37dc903bb998a43b73b48df22e55fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-13tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorMesut Çifci1-4/+2
Change-Id: I1c1e7b42211c51f572698efd3135e388f8fb2979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-13loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: Iaf188bfd43396eeec31e62ac3de3fbc76da4331a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-12tdf88205 Adapt uses of css::uno::Sequence to use initializer_list ctorYusuf Keten2-4/+2
Change-Id: I5eb9c58f511a6ded473eb3fb998fd21584c227d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86607 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-12tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorYusuf Keten6-12/+6
Change-Id: I9b285a80e0d52f412e2738995d66aa65cf93d16a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86606 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-10use more std::make_sharedNoel Grandin1-2/+2
found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-09Improve loplugin:redundantcast for sal_Int... vs. ::sal_Int...Stephan Bergmann2-2/+2
Change-Id: I1548a76fdc03afee68f1e5c01bc665e616f2edf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86501 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-08Grammar fixesAndrea Gelmini1-1/+1
Change-Id: I6ac6f6abb601aa254e94612e6826488393de8e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86383 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-01-08make ODBFilter return a fast contextNoel Grandin2-69/+50
And (*) use the fast parser already inside ODBFilter (*) pass around ODBFilter explicitly to make the code easier to read Change-Id: Ib0dd24e530b32b5edb94f150390df1e405c3efb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-07extract some common code from ImportContext classesNoel Grandin12-47/+2
which reduces code bloat, and lets us log when elements are ignored Change-Id: I5ca12bc1fcbfa3bea49ebde819fd80bd233a96a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-06Removed redundant semicolonsAndrea Gelmini1-1/+1
Change-Id: Ife14b8c3f7d121deb390deb5f405dd42d3016acf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-31tdf#129375: Avoid crash when inserting bibliography entry on iOSTor Lillqvist1-6/+9
I don't really know how the bibliography functionality works and how it is connected to database stuff. Until now Library_bib for instance was excluded for iOS because it was seen to be part of the "DBCONNECTIVITY" feature. Change that now. Also, build the dba and dbahsql libraries also in the non-DBCONNECTIVITY case. This at least avoids the crash and avoids new warnings about missing constructors or factories. Change-Id: I8a8c62a895fcd43e7fa725a4707ac5ad428a64b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86043 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86045 Tested-by: Jenkins
2019-12-29Avoid crash in shutdown when accessing already destroyed BASIC_DLLMike Kaganski1-0/+10
... 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-26use more TOOLS_WARN_EXCEPTIONNoel Grandin5-9/+9
so we get more useful log messages when stuff goes wrong Change-Id: Ia55db7ab1a4d79b0f281673fbbb06c61745fa89e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-20loplugin:duplicate-definesNoel Grandin1-2/+0
already defined in xmlEnums.hxx Change-Id: I1840249c9e08721a3654d2c5eb4e4fa6468bf8d6 Reviewed-on: https://gerrit.libreoffice.org/85556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18sal_Char->char in dbaccessNoel Grandin27-55/+55
Change-Id: I6cce128843d88bc453d171b2584ecf0dfffd1044 Reviewed-on: https://gerrit.libreoffice.org/85398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13loplugin:expandablemethodsNoel Grandin2-8/+1
Change-Id: I333d91ea5ce78c82e9bb107f934614efc7bfb8f7 Reviewed-on: https://gerrit.libreoffice.org/85078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12Resolves: tdf#128972 limit width of combobox of recently-usedCaolán McNamara2-1/+5
in the wizard so that the end of the combobox is available and the dialog isn't oversized. the user can resize the window to see more of the text of the recently-used Change-Id: Ic0b8d6c6e8840052e8f20e9f9a13d44140efde85 Reviewed-on: https://gerrit.libreoffice.org/85069 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara6-6/+6
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-09tdf#129210 don't assert with clear on already cleared mutexCaolán McNamara1-0/+1
reset it after load completes, seeing as the comment suggests that's why the clear exists in the first place Change-Id: I3af633c5a1f99b5d0dd754c21e220c6c94b66634 Reviewed-on: https://gerrit.libreoffice.org/84778 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-09drop newly unused SfxFloatingWindowCaolán McNamara2-2/+0
Change-Id: I8ac3957579c76a89b9692bdb50cbe7a56e1693e3 Reviewed-on: https://gerrit.libreoffice.org/84444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-07Fix more new dependencies on boost_headersStephan Bergmann3-0/+6
Same as 97b3e455802cfc08568ec5e8379c509efe3e47b1 "Fix some new dependencies on boost_headers" Change-Id: I0f10374650847f4c50a8cff530c15e65906865ad Reviewed-on: https://gerrit.libreoffice.org/84672 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-03drop some unnecessary includesCaolán McNamara3-3/+0
Change-Id: Ic88ed0d36f1aae9f32a0097354042526fc18d649 Reviewed-on: https://gerrit.libreoffice.org/84244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-03remove some useless comment linesNoel Grandin38-49/+0
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-02use weld::WaitObjectCaolán McNamara15-45/+34
Change-Id: Ib2ad0f0fe17c4db66693ef91e3cdbc8511eb8314 Reviewed-on: https://gerrit.libreoffice.org/84166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann18-40/+40
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01boost::optional: replace uses of get_value_or with value_orStephan Bergmann1-1/+1
...in preparation for wholesale replacement of boost::optional with o3tl::optional, which will be an alias for either std::optional or boost::optional, and std::optional only has value_or. boost::optional::value_or was added with <https://github.com/boostorg/optional/ commit/3984c9f9a157ef116cea69bc8bb20f433320eb61> "Added function value_or()", which according to git-describe first appeared in tag boost-1.56.0. We appear to have no strict Boost baseline (the closest we get is with > [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)] in configure.ac), and at least CentOS 7 TDF machine tb76 only has boost-devel-1.53.0-27.el7.x86_64. However, any environment using Xcode < 10 that needs to make o3tl::optional fall back to boost::optional should use --without-system-boost, and external/boost is currently at 1.69.0, so should be safe. ATTENTION: In isolation, this commit will break in any environment that uses Boost older than 1.56.0. It requires the following commit introducing o3tl::optional. (But doing these changes in individual commits was deemed more valuable than supporting a hypothetical future git-bisect against an old Boost.) Change-Id: Ib31affa3eebf0d0029d8620dc6abb7a60f6c7629 Reviewed-on: https://gerrit.libreoffice.org/84127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-30Rewrite uses of boost::optionalStephan Bergmann3-5/+5
...to only use functions that are also available for std::optional (in preparation for changing from boost::optional to std::optional): * uses of get are replaced with operator * or operator -> * uses of is_initialized are replaced with operator bool * uses of reset with an argument are replace with operator = (All of the replacements are also available for boost::optional "since forever", so this change should not break builds against old --with-system-boost. An alternative replacement for is_initialized would have been has_value, but that is only available since Boost 1.68.) Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f Reviewed-on: https://gerrit.libreoffice.org/84124 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-26tdf#126043 fetch the command properties just onceCaolán McNamara2-3/+7
Change-Id: Iaf343e9858be36ca8772d9c12eee772d93b4c394 Reviewed-on: https://gerrit.libreoffice.org/83668 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-24cppcheck: performing init in init list (dbaccess/desktop/dtrans/e.)Julien Nabet2-3/+2
Change-Id: I7909df04a550a4fa843a70d20b5192231c3f175e Reviewed-on: https://gerrit.libreoffice.org/83600 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>