Commit Graph
3558 Commits
Author SHA1 Message Date
Andrea Gelmini 2f4c240fab Fix typos
Change-Id: I739007b9f8ce1d0fa654fe14c2d15cfb5678415d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210064
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 11:20:33 +02:00
Andrea Gelmini 4bb0be44a0 Fix typos
Change-Id: Ie43b0980aa00d049cc38d29766530190e57a273b

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209766
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-25 15:40:08 +02:00
Andrea Gelmini 487b0c07e7 Fix typos
Change-Id: I7d15d22c26402d9c57288a680576f51a86ef42ff

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209765
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-25 15:22:00 +02:00
Rachit Arora 1197dd983b tdf#42982 Add informative message to RuntimeException in OQuery
Change-Id: I8bac7b8b60b89bedcd61c92e8dbb63a8a9f5be21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201073
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-08-17 16:45:02 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 3f1fb9d4b0 weld: Move weld::Window to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: If7cb4403f1861c465f44a1cae4065b0bf8dfad48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205323
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-19 09:10:43 +02:00
Samuel Mehrbrodt 7f9e03fb53 remove bogus assert
A data source can legitimately have a non-empty name but not be
registered in the object cache, e.g. when loading fails before
attachResource is called, or during context disposal.

This removes warnings like:
  warn:legacy.osl:1611319:1611319:dbaccess/source/core/dataaccess/databasecontext.cxx:489: ODatabaseContext::storeTransientProperties: a non-empty data source which I do not know?!

Change-Id: I75e878107396d984f2fcf3d7d6a6e7678bc9b0c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200060
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-02-26 07:46:47 +01:00
Samuel Mehrbrodt 2a6b0e91fa Remove unnecessary OSL_ENSURE
All callers handle empty storage references, and this is expected
when database components are initialized without a backing file.

Fixes warnings like:
  warn:legacy.osl:1530244:1530244:dbaccess/source/core/dataaccess/ModelImpl.cxx:768: ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage from!

Change-Id: Ie53b3be6908a2a9b910dd374703237a4aea09794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200058
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-02-26 07:46:19 +01:00
Gabor Kelemen 0a42ddbdf1 tdf#146619 Use more forward declarations in include/xmloff
Change-Id: I49e39d669ba77a99b77322275d2e54e211da5b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199386
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-22 10:42:36 +01:00
Sampath-1984 3b1d775c7c tdf#148499 Update Database wizard ui for writer
Added new strings STR_WRITER_HEADERTEXT, STR_WRITER_HELPTEXT
in /dbaccess/inc/strings.hrc. The case
PAGE_DBSETUPWIZARD_DOCUMENT_OR_SPREADSHEET is now split into
PAGE_DBSETUP_DOCUMENT and PAGE_DBSETUP_SPREADSHEET. A duplicate function
ODocumentConnectionPageSetup() similar to OSpreadSheetConnectionPageSetup() in
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx is created. After the changes
 there are now no inconsistencies in the database connection wizard for Word
 documents or LibreOffice Writer Documents, also now the SpreadSheet connection
 wizard no longer mentions Writer Documents in the sidebar title.

Change-Id: I126c679dab2eecf1e235a1e4c87406e04bb7486c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197523
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-02-10 14:41:46 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Stephan Bergmann 0360f4d2d2 Silence spurious -Werror=array-bounds=
seen at least with recent GCC 16 trunk,

> In file included from ~/gcc/inst/include/c++/16.0.1/bits/char_traits.h:59,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:44,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
>                  from include/rtl/ustring.hxx:34,
>                  from include/com/sun/star/uno/Any.h:30,
>                  from include/cppuhelper/implbase_ex.hxx:26,
>                  from include/cppuhelper/implbase5.hxx:26,
>                  from dbaccess/source/core/inc/querycontainer.hxx:22,
>                  from dbaccess/source/core/api/querycontainer.cxx:20:
> In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = dbaccess::ODefinitionContainer_Impl]’,
>     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = dbaccess::ODefinitionContainer_Impl]’ at ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
>     inlined from ‘static constexpr void std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) [with _Up = dbaccess::ODefinitionContainer_Impl]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_dispose() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:25: error: array subscript ‘dbaccess::ODefinitionContainer_Impl[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>    88 |         __location->~_Tp();
>       |         ~~~~~~~~~~~~~~~~^~
> In file included from ~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
>                  from ~/gcc/inst/include/c++/16.0.1/string:46,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
>                  from ~/gcc/inst/include/c++/16.0.1/ios:46:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at offset 16 into object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/rtl/stringconcat.hxx:22,
>                  from include/rtl/string.hxx:51,
>                  from include/rtl/ustring.hxx:45:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
>     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_destroy() [with _Tp = dbaccess::ODefinitionContainer_Impl; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
>     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
>     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp = dbaccess::IContainerApprove; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
>     inlined from ‘std::shared_ptr<dbaccess::IContainerApprove>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’,
>     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
>     inlined from ‘static constexpr _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, std::allocator<void>, __gnu_cxx::_S_atomic>]’ at ~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
>     inlined from ‘std::__allocated_ptr<_Alloc> std::__allocate_guarded(_Alloc&) [with _Alloc = allocator<_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, allocator<void>, __gnu_cxx::_S_atomic> >]’ at ~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
>     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
>     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
>     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
>     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = {com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, dbaccess::ObjectNameApproval::ObjectType}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘void dbaccess::OQueryContainer::init()’ at dbaccess/source/core/api/querycontainer.cxx:87:61:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 40 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I089a58793649d892e88b7e3632c8b61f89b0a60c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197834
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-22 22:48:48 +01:00
Michael Weghorn 5454b7ed94 weld: Move weld::DialogController and subclasses to own header/source
This is also in preparation of moving weld::Builder to
its own header.

Change-Id: Icb65ee85376d17e1abead2c6339f78b129112d0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195841
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-12-18 19:44:41 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
Gabor Kelemen fd2e467ba3 tdf#146619 Run IWYU in fw decl mode on include/[a-c]*
After recent commit 851fb75779
recheck these directories in include/ again
to test drive the new --headersfwd mode of bin/find-unneeded-includes

Change-Id: I0ede437c4f9958cd98210ed1760a5b98ea8bd1ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192377
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-08 09:37:19 +01:00
siddhi 817e7e92d4 tdf#158237 Use C++20 contains() instead of find() and end()
replace find() and end() with contains() in SingleSelectQueryComposer.cxx

Change-Id: I965108b9f733e7097ea1812092ac1b5044dadac4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192421
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-10-16 17:58:04 +02:00
prrvchr 5d64bdf62a tdf#168145 Base must come out of the insert row
If you use ResultSets with the XRowLocate interface, Base moves to the insertion row in the WrappedResultSet.cxx file, line 73.

And it never returns. Normally, this shouldn't happen, after the insert is done you must go away from the insertion row to continue.
At least that's what it seems to me?

The same scenario happens in the file BookmarkSet.cxx line 78 and so this has also been corrected.

Change-Id: I169fd0a32441922025b3cc5531b32166b4c54be0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190349
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-29 09:40:28 +02:00
prrvchr eab92ae8db tdf#167434 Don't call cancelRowUpdates when cursor not positioned
What has been done in:
https://gerrit.libreoffice.org/c/core/+/187567
only solves part of the problem.

Since cancelRowUpdate() is now indeed called when the ResultSet is no longer on the insert row, but it is still called even though the cursor is not positioned, in fact, at this point the cursor must be beforeFirstRow() and therefore cancelRowUpdate() should not be called until the cursor is positioned on a valid row.

These three instructions (ie: moveToInsertRow(), moveToCurrentRow() and cancelRowUpdate()) are apparently only there to ensure that the resultSet is modifiable, so I consider that if we only perform moveToInsertRow() and moveToCurrentRow() this is sufficient to ensure that the ResultSet is modifiable.

Moreover, this first correction introduces a nice regression because now, as cancelRowUpdate() is no longer called while the ResultSet is on its insert row, it becomes difficult to manage such a case.

Change-Id: I5924376d1b483451a439db97580b81fa8e4546c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190322
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-28 13:47:02 +02:00
Mike Kaganski a255b04d8d Shorten some names ending with _ASCII
Whatever that was intended to mean: if that meant that the constants
were encoded that way, these are UTF-16 already; is that meant that
they only contained characters in that range, that is unimportant.

Change-Id: I5463f1fca0d552a93d3c9d487ed9912c9e1a989e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191240
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-09-20 19:35:12 +02:00
Gabor Kelemen 2060e38e11 tdf#146619 Run IWYU on dbaccess/
Change-Id: I86a60f94268ee3594c68fe9f1dfb4e2c819ac616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189784
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-09-13 09:23:23 +02:00
Mike Kaganski 6f14e2d0bc dbaccess::tools -> dbaccesstools
At least some IDEs are confused by our multitude of `tools` namespaces,
and show errors like `namespace "tools" is ambiguous`.
This removes one such namespace. The idea is to drop all but the one
in /tools (that has tools::Long and tools::Rectangle).

Change-Id: Ic718fa1be0ca34fc38fda10859f11d5a949b2603
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189951
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-20 15:23:30 +02:00
Stephan Bergmann 65fe54ec9a Read of uninitialized ODatabaseModelImpl::m_bAskPassword
...during CppunitTest_dbaccess_dialog_save at

> /dbaccess/source/core/dataaccess/databasecontext.cxx:461:66: runtime error: load of value 190, which is not a valid value for type 'bool'
>     #0 0x7f7563a4f478 in dbaccess::ODatabaseContext::storeTransientProperties(dbaccess::ODatabaseModelImpl&) /dbaccess/source/core/dataaccess/databasecontext.cxx:461:66
>     #1 0x7f7563eb4b06 in dbaccess::ODatabaseModelImpl::release() /dbaccess/source/core/dataaccess/ModelImpl.cxx:1014:22
>     #2 0x7f7563a60ef9 in rtl::Reference<dbaccess::ODatabaseModelImpl>::~Reference() /include/rtl/ref.hxx:126:22
>     #3 0x7f7563a44db9 in dbaccess::ODatabaseContext::disposing() /dbaccess/source/core/dataaccess/databasecontext.cxx:254:5
>     #4 0x7f75b1c465ab in cppu::WeakComponentImplHelperBase::dispose() /cppuhelper/source/implbase.cxx:104:13
>     #5 0x7f7563a6ffc9 in cppu::PartialWeakComponentImplHelper<com::sun::star::lang::XServiceInfo, com::sun::star::sdb::XDatabaseContext>::dispose() /include/cppuhelper/compbase.hxx:90:36
>     #6 0x7f75b1e0a3c2 in cppuhelper::ServiceManager::disposing(std::unique_lock<std::mutex>&) /cppuhelper/source/servicemanager.cxx:919:21
>     #7 0x7f75b1b2e214 in cppuhelper::WeakComponentImplHelperBase2::dispose() /cppuhelper/source/compbase.cxx:27:5
>     #8 0x7f75b1bddd29 in cppuhelper::WeakComponentImplHelper2<com::sun::star::lang::XServiceInfo, com::sun::star::lang::XMultiServiceFactory, com::sun::star::lang::XMultiComponentFactory, com::sun::star::container::XSet, com::sun::star::container::XContentEnumerationAccess, com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertySetInfo, com::sun::star::lang::XEventListener, com::sun::star::lang::XInitialization>::dispose() /cppuhelper/inc/compbase2.hxx:87:39
>     #9 0x7f75b1b80810 in cppu::try_dispose(std::unique_lock<std::mutex>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) /cppuhelper/source/component_context.cxx:66:16
>     #10 0x7f75b1b69605 in cppu::(anonymous namespace)::ComponentContext::disposing(std::unique_lock<std::mutex>&) /cppuhelper/source/component_context.cxx:430:5
>     #11 0x7f75b1b2e214 in cppuhelper::WeakComponentImplHelperBase2::dispose() /cppuhelper/source/compbase.cxx:27:5
>     #12 0x7f75b1b9c669 in cppuhelper::WeakComponentImplHelper2<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose() /cppuhelper/inc/compbase2.hxx:87:39
>     #13 0x7f75a719ea7c in (anonymous namespace)::Hook::deinitHook((anonymous namespace)::Hook*, LinkParamNone*) /test/source/setupvcl.cxx:67:46
>     #14 0x7f75a719df94 in (anonymous namespace)::Hook::LinkStubdeinitHook(void*, LinkParamNone*) /test/source/setupvcl.cxx:37:1
>     #15 0x7f7597d6104d in Link<LinkParamNone*, void>::Call(LinkParamNone*) const /include/tools/link.hxx:105:45
>     #16 0x7f759b87c56e in DeInitVCL() /vcl/source/app/svmain.cxx:532:35
>     #17 0x7f75bb739454 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:29:9
>     #18 0x7f75bb739538 in (anonymous namespace)::Protector::~Protector() /test/source/vclbootstrapprotector.cxx:28:35
>     #19 0x7f75bb2484f3 in CppUnit::ProtectorChain::pop() (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x2de4f3)
>     #20 0x7f75bb2f16ad in CppUnit::TestResult::popProtector() (/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.15.so.1+0x3876ad)
>     #21 0x50ac01 in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:337:20
>     #22 0x506d13 in main2() /sal/cppunittester/cppunittester.cxx:482:16
>     #23 0x50512f in sal_main() /sal/cppunittester/cppunittester.cxx:627:14
>     #24 0x504f6e in main /sal/cppunittester/cppunittester.cxx:622:1

(<https://ci.libreoffice.org/job/lo_ubsan/3655/>), reading a member recently
introduced in 04d2a7d2f6 "tdf#167960 The password
of an unknown user is no longer stored", the initial value of which should
presumably be false

Change-Id: Ib46f6f37776688a9853d136adab99263714f0aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189894
Tested-by: Jenkins
Reviewed-by: Pierre Vacher <prrvchr@gmail.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-08-19 09:12:20 +02:00
prrvchr 04d2a7d2f6 tdf#167960 The password of an unknown user is no longer stored
To resolve this issue, several things were necessary.

- Add a Boolean attribute m_bAskPassword to the data source's Model implementation (i.e., the ModelImpl.hxx file)

- Modify the connectWithCompletion() procedure of the data source (i.e., the datasource.cxx file) that Base calls each time an ODB file is first opened. When opening the connection, it will verify that the connection is indeed made by the user provided by the data source. If this is not the case, the m_bAskPassword attribute of the model will be set to true.

- If this first connection is successful, the DataBaseContext (i.e., the databasecontext.cxx file) will attempt to cache the data source's properties, and if the m_bAskPassword attribute of the model is true, the Password property of the data source will not be cached.

Now if you connect with a user other than the one proposed by default, your password will be constantly requested after disconnecting and reconnecting or until the odb file is saved.

Change-Id: I40960c04fb84604c018374743a735676f556e2b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189732
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-18 11:23:26 +02:00
Mike Kaganski d4e478e4b5 Revert "tdf#167960: store also username associated with this password"
This reverts commit 5b064206d8.

Reason for revert:
Let's use https://gerrit.libreoffice.org/c/core/+/189732 instead.
This reportedly doesn't cause tdf#167994.

Change-Id: I47014b0419362d54c75b13ccb299f64ed9e29b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189837
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-18 11:23:20 +02:00
Mike Kaganski 5b064206d8 tdf#167960: store also username associated with this password
The problem was, that the password that got stored as a transient
session-persistent property, could be for one user; but after the
reload, it could be reused for another user, stored in the file.
That resulted in a failed authentication attempt; but since the
password was present, it didn't ask for a new attempt, but failed
the connection.

This change stores the current user name along with the password;
and when loading the document next time, it checks the username
set in the document (i.e., that will be used for logon), and if
it's different from the name used with the stored password, the
password is not reused.

Change-Id: I8f971e641492e3ab93dabfce38d376a06339be3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189828
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-17 21:23:50 +02:00
Mike Kaganski e7cc35a41d Drop needless const_casts
Change-Id: I69a77bfe60c4554e71e3b24026d2f856236e3d43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189814
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-17 13:40:18 +02:00
prrvchr 1c2e63ec15 tdf#167495 Base need to close ResultSet after using it.
Change-Id: Ief6eb9c7a12871de33e748d87045f6393faee75f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189328
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-11 07:54:20 +02:00
Caolán McNamara 338d7b981c cid#1662040 Variable copied when it could be moved
and

cid#1660117 Variable copied when it could be moved
cid#1659985 Variable copied when it could be moved
cid#1659983 Variable copied when it could be moved
cid#1659982 Variable copied when it could be moved
cid#1659973 Variable copied when it could be moved
cid#1659956 Variable copied when it could be moved
cid#1659955 Variable copied when it could be moved

Change-Id: Icc0f2f4a37fa8eb4c874dfd842650067c186466b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189255
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-09 16:49:01 +02:00
Caolán McNamara fc6d103827 cid#1662042 Variable copied when it could be moved
and

cid#1662041 Variable copied when it could be moved
cid#1662040 Variable copied when it could be moved
cid#1662038 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1659985 Variable copied when it could be moved

Change-Id: I34627585e593f9de6bfa195ee0617848d9ed6135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189157
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-08 12:35:37 +02:00
Caolán McNamara c7987c472f cid#1660426 Variable copied when it could be moved
and

cid#1660421 Variable copied when it could be moved
cid#1660419 Variable copied when it could be moved
cid#1660416 Variable copied when it could be moved
cid#1660406 Variable copied when it could be moved
cid#1660405 Variable copied when it could be moved
cid#1660403 Variable copied when it could be moved
cid#1660388 Variable copied when it could be moved
cid#1660380 Variable copied when it could be moved

Change-Id: Ic017abb85bb9b3f9fdb962c0862476f40c0953f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188847
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-03 12:18:11 +02:00
Samuel Mehrbrodt 6f37a5ce0c Related tdf#97694 Don't require signed document in Base
Macros were disabled in Base when calls to macros were detected in
the Base document - since the document is not signed.

However, Base does not support document signatures at this stage.

So relax that requirement to require a signed document when detecting
calls to signed macros from an unsigned document - at least for Base.

Change-Id: I129f3ffb2607a1c5eebf4795fcd1638c206aea22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188458
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-07-31 08:07:56 +02:00
Mike Kaganski 3a4961af43 Use o3tl::{get,set}Environment instead of resp. osl_* functions
Simplifies the code, and avoids OUString internals access.
Also replace some getenv calls.

Change-Id: I5f7dc492fe87ea1fbaad6a61bc54e21f0f0c5aef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187974
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-07-17 07:03:19 +02:00
prrvchr 8fcd59e870 tdf#167495 Base need to close ResultSet after using it.
I checked that this is where I saw Base open DatabaseMetData.getColumnVersion() as many times as there are columns in the ResultSet and never close them.

Change-Id: I4aa371dc08826d864718285588a685a799eca607
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187901
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-15 13:38:20 +02:00
prrvchr dc41bafaf5 tdf#167434 Don't call cancelRowUpdates when cursor is in insert row
It is not possible to use the css.sdbcx.XRowLocate interface in
ResultSets because Base, in order to ensure that this ResultSet
is editable, performs cancelRowUpdates() when the cursor is on
the insertion row.

Change-Id: I4624623754c40dbef1f83b4d6498db17f996c65e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187567
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-07-09 16:00:29 +02:00
Michael Weghorn f93e0514c5 connectivity: Drop dbtools::getDataSourceSetting taking const char*
Switch all callers to use the other variant that
takes const OUString&, which the now dropped variant
was also calling internally.

Change-Id: If7d2861dc570744444f25b8124cc04781d7772d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-19 23:32:22 +02:00
AlexTMFN a347c47ee9 tdf#158237 chart2: use c++20 contains() instead of find() and end()
Change-Id: Id1a128b0c0f8e1e7ec13545240fe6c07637e9ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185262
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2025-05-14 14:03:03 +02:00
Gabor Kelemen 8d9cd8c894 Remove obsolete fw declarations from dbaccess/
found with bin/find-unneeded-includes --fwdecl

Change-Id: I1a3b1420119b0c79860a1fde69efa4272356af61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183882
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-13 10:57:58 +02:00
Noel Grandin b1b6f4f706 use more concrete UNO in dbaccess
Change-Id: I46188654135721d21dd05ac2778224a078e96293
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182623
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-07 15:47:08 +01:00
Noel Grandin 6e031fc7d6 improve type-safety in dbaccess::OConnection
Change-Id: I39ebd277431407b65c5c4a80698714399d39330f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182531
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-05 17:09:48 +01:00
Noel Grandin 8056d28ee3 improve type-safety in dbaccess::ORowSet
Change-Id: I08ae1369a7b1e388bc6eeaed86587261ffb83943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182530
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-05 14:46:18 +01:00
Noel Grandin d7c17d4a99 improve type-safety in dbaccess OStatementBase
we can use unotools::WeakReference instead of untyped
WeakReferenceHelper.

Also rename the field to something more obvious

Change-Id: Iff674893ec0c3144830c46d1745c920f910d6067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182458
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-04 12:07:12 +01:00
Noel Grandin 2df7a51f6e expand the ObjectType typedef
in preparation for making some of the code more typesafe

Change-Id: I7c8a4b30cd1144feaaa2e31fce67cd6545065a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182425
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-03-03 14:53:27 +01:00
Noel Grandin 09e2627a83 use more concrete UNO types in some local vars
found by a little plugin I created.

Plugin parked into store/ folder because it needs hand-holding
when run.

Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 16:56:56 +01:00
Caolán McNamara 8c1dbd3188 cid#1607542 COPY_INSTEAD_OF_MOVE
and

cid#1606986 COPY_INSTEAD_OF_MOVE
cid#1557969 COPY_INSTEAD_OF_MOVE
cid#1557837 COPY_INSTEAD_OF_MOVE
cid#1557772 COPY_INSTEAD_OF_MOVE
cid#1557735 COPY_INSTEAD_OF_MOVE
cid#1557672 COPY_INSTEAD_OF_MOVE
cid#1557664 COPY_INSTEAD_OF_MOVE
cid#1557650 COPY_INSTEAD_OF_MOVE
cid#1557642 COPY_INSTEAD_OF_MOVE
cid#1557639 COPY_INSTEAD_OF_MOVE
cid#1557628 COPY_INSTEAD_OF_MOVE
cid#1557623 COPY_INSTEAD_OF_MOVE
cid#1557581 COPY_INSTEAD_OF_MOVE
cid#1557489 COPY_INSTEAD_OF_MOVE
cid#1557473 COPY_INSTEAD_OF_MOVE
cid#1557317 COPY_INSTEAD_OF_MOVE
cid#1557261 COPY_INSTEAD_OF_MOVE
cid#1557146 COPY_INSTEAD_OF_MOVE
cid#1557135 COPY_INSTEAD_OF_MOVE
cid#1557134 COPY_INSTEAD_OF_MOVE
cid#1557079 COPY_INSTEAD_OF_MOVE
cid#1557063 COPY_INSTEAD_OF_MOVE
cid#1557052 COPY_INSTEAD_OF_MOVE
cid#1556982 COPY_INSTEAD_OF_MOVE
cid#1556977 COPY_INSTEAD_OF_MOVE
cid#1556950 COPY_INSTEAD_OF_MOVE
cid#1556943 COPY_INSTEAD_OF_MOVE
cid#1556804 COPY_INSTEAD_OF_MOVE
cid#1556736 COPY_INSTEAD_OF_MOVE
cid#1556658 COPY_INSTEAD_OF_MOVE
cid#1556621 COPY_INSTEAD_OF_MOVE
cid#1556590 COPY_INSTEAD_OF_MOVE
cid#1556579 COPY_INSTEAD_OF_MOVE
cid#1556534 COPY_INSTEAD_OF_MOVE
cid#1556524 COPY_INSTEAD_OF_MOVE
cid#1556478 COPY_INSTEAD_OF_MOVE
cid#1556467 COPY_INSTEAD_OF_MOVE
cid#1556422 COPY_INSTEAD_OF_MOVE
cid#1556314 COPY_INSTEAD_OF_MOVE
cid#1556309 COPY_INSTEAD_OF_MOVE
cid#1556258 COPY_INSTEAD_OF_MOVE
cid#1556143 COPY_INSTEAD_OF_MOVE
cid#1556119 COPY_INSTEAD_OF_MOVE
cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1556097 COPY_INSTEAD_OF_MOVE
cid#1556039 COPY_INSTEAD_OF_MOVE
cid#1555966 COPY_INSTEAD_OF_MOVE
cid#1555948 COPY_INSTEAD_OF_MOVE
cid#1555915 COPY_INSTEAD_OF_MOVE
cid#1555836 COPY_INSTEAD_OF_MOVE
cid#1555748 COPY_INSTEAD_OF_MOVE
cid#1555644 COPY_INSTEAD_OF_MOVE
cid#1555582 COPY_INSTEAD_OF_MOVE
cid#1555478 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555409 COPY_INSTEAD_OF_MOVE
cid#1555372 COPY_INSTEAD_OF_MOVE
cid#1555334 COPY_INSTEAD_OF_MOVE
cid#1555330 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE
cid#1555257 COPY_INSTEAD_OF_MOVE
cid#1555247 COPY_INSTEAD_OF_MOVE
cid#1555147 COPY_INSTEAD_OF_MOVE
cid#1555120 COPY_INSTEAD_OF_MOVE
cid#1555059 COPY_INSTEAD_OF_MOVE
cid#1555016 COPY_INSTEAD_OF_MOVE
cid#1554880 COPY_INSTEAD_OF_MOVE
cid#1554824 COPY_INSTEAD_OF_MOVE
cid#1554808 COPY_INSTEAD_OF_MOVE
cid#1546189 COPY_INSTEAD_OF_MOVE

Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 22:39:23 +01:00
Bogdan Buzea eb8e6ddd6a tdf#158237 dbaccess: use c++20 contains() instead of find() and end()
Change-Id: I03e682093bff3b743b074d0d1dc68994f31ae707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176800
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-11-29 20:49:15 +01:00
Julien Nabet bf0374b64e tdf#130564: getTableTypes retrieves only table types of the current database
So indicate to LO that at least PostgreSQL and MySQL/MariaDB support views

Change-Id: I241fa3cfc599e11c1f1523a78a1905beadc80307
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176308
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-11-15 16:56:43 +01:00
Stephan Bergmann 86b86ac87e Give DocumentEventHolder (aka EventHolder<DocumentEvent>) a key function
...that is not inline, so that RTTI and vtable are not emitted for each dynamic
library individually.  (Where they would be internal on macOS, which could break
optimized uses of dynamic_cast for that final class just checking vtable pointer
identity, as could happen for the dynamic_cast at
dbaccess/source/core/dataaccess/documenteventnotifier.cxx:232:51,

>   232 |         const DocumentEventHolder& rEventHolder = dynamic_cast< const DocumentEventHolder& >( _rEvent );
>       |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And with the extern explicit template instantiation, EventHolder needs to be
SAL_DLLPUBLIC_TEMPLATE instead of just SAL_DLLPUBLIC_RTTI now, so that
Library_comphelper will export the DocumentEventHolder ctors and
DocumentEventHolder::getEventObject.)

(This would ideally have been caught by an upcoming improvement of
loplugin:dyncastvisibility, but might be complicated to check there for template
instantiations.)

Change-Id: I1e6280b185535968a870fbfadaff6238d38858e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176547
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 11:10:30 +01:00
Noel Grandin 681c7292b2 clang-tidy: performance-unnecessary-copy-initialization in dbaccess
Change-Id: If72f9eea59e5f2a4e183b98888a037ea26333cb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176377
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 10:58:19 +01:00
Noel Grandin 5962006370 loplugin:reftotemp in dbaccess..editeng
Change-Id: I51f5e47fb2fca37928ac58952a6a34b7351ca53c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176277
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-08 19:38:38 +01:00
Caolán McNamara 92f5913aef cid#1556442 COPY_INSTEAD_OF_MOVE
and

cid#1607753 COPY_INSTEAD_OF_MOVE
cid#1554790 COPY_INSTEAD_OF_MOVE
cid#1556463 COPY_INSTEAD_OF_MOVE
cid#1554838 COPY_INSTEAD_OF_MOVE
cid#1556231 COPY_INSTEAD_OF_MOVE
cid#1556878 COPY_INSTEAD_OF_MOVE
cid#1554913 COPY_INSTEAD_OF_MOVE
cid#1558064 COPY_INSTEAD_OF_MOVE
cid#1557043 COPY_INSTEAD_OF_MOVE
cid#1556985 COPY_INSTEAD_OF_MOVE
cid#1556766 COPY_INSTEAD_OF_MOVE
cid#1557351 COPY_INSTEAD_OF_MOVE
cid#1554863 COPY_INSTEAD_OF_MOVE
cid#1556764 COPY_INSTEAD_OF_MOVE
cid#1556279 COPY_INSTEAD_OF_MOVE
cid#1555970 COPY_INSTEAD_OF_MOVE
cid#1556942 COPY_INSTEAD_OF_MOVE
cid#1557964 COPY_INSTEAD_OF_MOVE
cid#1555166 COPY_INSTEAD_OF_MOVE
cid#1556496 COPY_INSTEAD_OF_MOVE
cid#1557175 COPY_INSTEAD_OF_MOVE
cid#1558054 COPY_INSTEAD_OF_MOVE
cid#1557392 COPY_INSTEAD_OF_MOVE
cid#1557850 COPY_INSTEAD_OF_MOVE
cid#1555118 COPY_INSTEAD_OF_MOVE
cid#1557131 COPY_INSTEAD_OF_MOVE
cid#1556614 COPY_INSTEAD_OF_MOVE
cid#1609650 COPY_INSTEAD_OF_MOVE
cid#1555114 COPY_INSTEAD_OF_MOVE
cid#1555241 COPY_INSTEAD_OF_MOVE
cid#1555442 COPY_INSTEAD_OF_MOVE
cid#1556473 COPY_INSTEAD_OF_MOVE
cid#1557654 COPY_INSTEAD_OF_MOVE
cid#1554689 COPY_INSTEAD_OF_MOVE
cid#1556316 COPY_INSTEAD_OF_MOVE
cid#1557929 COPY_INSTEAD_OF_MOVE
cid#1554807 COPY_INSTEAD_OF_MOVE
cid#1554858 COPY_INSTEAD_OF_MOVE
cid#1555103 COPY_INSTEAD_OF_MOVE
cid#1555517 COPY_INSTEAD_OF_MOVE
cid#1556424 COPY_INSTEAD_OF_MOVE
cid#1557252 COPY_INSTEAD_OF_MOVE
cid#1557566 COPY_INSTEAD_OF_MOVE
cid#1608020 COPY_INSTEAD_OF_MOVE
cid#1557742 COPY_INSTEAD_OF_MOVE
cid#1555884 COPY_INSTEAD_OF_MOVE
cid#1554809 COPY_INSTEAD_OF_MOVE
cid#1555336 COPY_INSTEAD_OF_MOVE
cid#1555173 COPY_INSTEAD_OF_MOVE
cid#1556067 COPY_INSTEAD_OF_MOVE
cid#1557040 COPY_INSTEAD_OF_MOVE
cid#1556235 COPY_INSTEAD_OF_MOVE
cid#1557366 COPY_INSTEAD_OF_MOVE
cid#1555910 COPY_INSTEAD_OF_MOVE
cid#1556716 COPY_INSTEAD_OF_MOVE
cid#1558022 COPY_INSTEAD_OF_MOVE
cid#1555769 COPY_INSTEAD_OF_MOVE
cid#1555940 COPY_INSTEAD_OF_MOVE
cid#1557077 COPY_INSTEAD_OF_MOVE
cid#1555270 COPY_INSTEAD_OF_MOVE
cid#1555660 COPY_INSTEAD_OF_MOVE
cid#1556302 COPY_INSTEAD_OF_MOVE
cid#1555678 COPY_INSTEAD_OF_MOVE
cid#1556538 COPY_INSTEAD_OF_MOVE
cid#1557689 COPY_INSTEAD_OF_MOVE
cid#1555009 COPY_INSTEAD_OF_MOVE
cid#1555433 COPY_INSTEAD_OF_MOVE
cid#1555671 COPY_INSTEAD_OF_MOVE
cid#1555255 COPY_INSTEAD_OF_MOVE
cid#1557681 COPY_INSTEAD_OF_MOVE
cid#1557512 COPY_INSTEAD_OF_MOVE
cid#1554958 COPY_INSTEAD_OF_MOVE
cid#1555758 COPY_INSTEAD_OF_MOVE
cid#1555597 COPY_INSTEAD_OF_MOVE
cid#1558040 COPY_INSTEAD_OF_MOVE
cid#1556476 COPY_INSTEAD_OF_MOVE
cid#1557646 COPY_INSTEAD_OF_MOVE
cid#1557950 COPY_INSTEAD_OF_MOVE
cid#1557019 COPY_INSTEAD_OF_MOVE
cid#1557885 COPY_INSTEAD_OF_MOVE
cid#1556402 COPY_INSTEAD_OF_MOVE
cid#1557906 COPY_INSTEAD_OF_MOVE
cid#1556619 COPY_INSTEAD_OF_MOVE
cid#1554683 COPY_INSTEAD_OF_MOVE
cid#1556549 COPY_INSTEAD_OF_MOVE
cid#1554747 COPY_INSTEAD_OF_MOVE
cid#1554929 COPY_INSTEAD_OF_MOVE
cid#1555362 COPY_INSTEAD_OF_MOVE
cid#1557053 COPY_INSTEAD_OF_MOVE
cid#1557891 COPY_INSTEAD_OF_MOVE
cid#1555043 COPY_INSTEAD_OF_MOVE
cid#1555107 COPY_INSTEAD_OF_MOVE
cid#1557203 COPY_INSTEAD_OF_MOVE
cid#1556728 COPY_INSTEAD_OF_MOVE
cid#1557773 COPY_INSTEAD_OF_MOVE
cid#1556845 COPY_INSTEAD_OF_MOVE

Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-06 13:58:54 +01:00