Commit Graph
2269 Commits
Author SHA1 Message Date
Andrea Gelmini f6b0e1736e Fix typos
Change-Id: I57ddd4f37138287fce235b10469257c1bcb1efe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211772
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-10-03 10:12:19 +02:00
Caolán McNamara 984bb7858f check the byte ranges of a pdf signature against the file
The offsets and lengths come from the document, so a range that is
not inside the file leaves the signature unchecked now.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4c293d4c49326cb08336295714dec91d833bbd88
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13334
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 2fb3bbcf0afd5d13f41d526551835a24a0d8b5aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211454
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 19:37:47 +02:00
Andrea Gelmini a209dfe23b Fix typos
Change-Id: I7365a0194ef09107c8dc6fe2c15309f4607f2d8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210222
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 15:34:38 +02:00
Andrea Gelmini 6aa165eec0 Fix typo in code
Change-Id: Ib07ea266ebe8d9bf5d42473f3f82fbeaf43c2272
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210147
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 15:18:57 +02:00
Andrea Gelmini ac5aeb3dc7 Fix typos
Change-Id: Ia69fe9989c414ebb69ed6365cc882be4fea38576
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209945
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:29:19 +02:00
Andrea Gelmini dce97b7d60 Fix typos
Change-Id: I93427223b9352f6e9d312f0e1ae28c00dd268145

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209741
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-24 09:07:24 +02:00
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.

This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.

That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before

    Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 13:08:58 2026 +0200

        tdf#130857 weld: Don't signal about programmatic TextView text change
.)

Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 18:17:27 +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 8b5a46a0e0 weld: Move weld::toId and weld::fromId to weldutils.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses,
as well as a few helpers.

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 anything in weld.hxx
changes.

Move the weld::toId and weld::fromId helpers from
weld.hxx to weldutils.hxx, in preparation of getting
rid of weld.hxx altogether in an upcomcing commit.

Change-Id: I408fe20a74ff104cbfe07bde3105317a1922ff61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-04 14:37:13 +02:00
Michael Weghorn 03d5d803c4 weld: Switch TreeView selection changed signal param to ItemView
Switch the param for the signal and handlers used when
the selection in a weld::TreeView changes from weld::TreeView&
to the base class, weld::ItemView&.

This is in preparation of moving the logic to the weld::ItemView
base class in an upcoming commit.

Handler implementations that require a weld::TreeView
instance can use the one that the signal is connected
to, e.g. use the class member directly inside of the
implementation instead of using the param (as is done
in most of the places anyway).

Change-Id: I0bbf8fe1dbd95906a5224155d48d832bcd144532
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203366
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-10 06:36:08 +02:00
Michael Weghorn 8ff8ad952e weld: Rename row activation related TreeView members to match IconView
Rename methods and field related to signalling activation
of a weld::TreeView row to use the same names as the equivalent
ones for signalling activation of an entry in weld::IconView:

* weld::TreeView::m_aRowActivatedHdl -> weld::TreeView::m_aItemActivatedHdl
* weld::TreeView::signal_row_activated -> weld::TreeView::signal_item_activated
* weld::TreeView::connect_row_activated -> weld::TreeView::connect_item_activated

This is in preparation of deduplicating the weld::TreeView
and weld::IconView implementations for these by moving them
to the common weld::ItemView base class in an upcoming commit.

Change-Id: I4ca4dec1295c57cea574b68fd41b89c12144c4f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203350
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-10 06:29:43 +02:00
Michael Weghorn 11789e47ac weld: Pass activated row in TreeView::signal_row_activated
This is basically the weld::TreeView version of earlier
commit

        Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
        Author: Michael Weghorn <m.weghorn@posteo.de>
        Date:   Wed Apr 8 12:35:25 2026 +0200

            weld: Pass activated item in IconView::signal_item_activated

applying an equivalent change for weld::IconView instead
of weld::TreeView. See that commit for more details/background.

For weld::TreeView, the weld::TreeIter refers to
a full row (and columns are handled separately
by a column index in the weld::TreeView API).

As for the above commit:
Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits to use the
newly passed weld::TreeIter param directly instead of
determining the current/activated row a different
way.

Change-Id: Ie6a962702d4f7f069b2f7b77a22a78722b2a6408
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203331
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-09 10:21:45 +02:00
Rafał Dobrakowski 8f76899b2d tdf#168771 - Convert enum to enum class
The package supporting the “pdfium” library has been improved.
Numeric values have been converted to a fixed-size enumeration type.
The changes apply to all occurrences of the older version of this code.

Change-Id: Ie9d0bd98d7c323f890ac3051bb1f08a50d51e046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201303
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2026-03-30 10:05:05 +02:00
Jan Luethi 4acd9056df tdf#145538 Use range based for loops in xsecctl.cxx
Change-Id: I04eec9ca3f413b3b3415053a48121c7bfc0b35a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200641
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2026-03-01 18:21:24 +01:00
Michael Weghorn fbcfd00fb7 weld: Move weld::Dialog to own header/source
Move the class out of weld.hxx into its own header and source
file, 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: Ic47dac553fc065c5c9cddbf31e33012314dbe43d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199073
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-02-11 07:32:57 +01:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog 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: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-02-11 07:32:45 +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 84beb59bb7 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/shared_ptr.h:53,
>                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
>                  from include/unotools/syslocale.hxx:25,
>                  from include/unotools/resmgr.hxx:24,
>                  from xmlsecurity/inc/resourcemanager.hxx:22,
>                  from xmlsecurity/source/component/documentdigitalsignatures.cxx:20:
> In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::~_Sp_counted_ptr_inplace() [with _Tp = DigitalSignaturesDialog; _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 = DigitalSignaturesDialog; _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 = CertificateChooser; __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<CertificateChooser>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:674:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<DigitalSignaturesDialog, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [384]’ [-Werror=array-bounds=]
>   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
>       |                                             ^
> 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/memory:67:
> In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, 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<CertificateChooser, 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<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, 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<CertificateChooser, 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 = CertificateChooser; _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; __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 = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser; __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 = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser]’ 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 = CertificateChooser; _Args = {weld::Window*&, SfxViewShell*&, __debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘static std::shared_ptr<CertificateChooser> CertificateChooser::getInstance(weld::Window*, SfxViewShell*, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> >&&, CertificateChooserUserAction)’ at xmlsecurity/inc/certificatechooser.hxx:111:113,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:664:171:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 384 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 = DigitalSignaturesDialog; _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 = DigitalSignaturesDialog; _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 = CertificateChooser; __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<CertificateChooser>::~shared_ptr()’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:674:1:
> ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array subscript ‘std::_Sp_counted_ptr_inplace<DigitalSignaturesDialog, std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds of ‘unsigned char [384]’ [-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<CertificateChooser, 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<CertificateChooser, 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<_Up> >::allocate(allocator_type&, size_type) [with _Tp = std::_Sp_counted_ptr_inplace<CertificateChooser, 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<CertificateChooser, 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 = CertificateChooser; _Alloc = std::allocator<void>; _Args = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; __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 = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser; __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 = {weld::Window*&, SfxViewShell*&, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, std::allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}; _Tp = CertificateChooser]’ 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 = CertificateChooser; _Args = {weld::Window*&, SfxViewShell*&, __debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext>, allocator<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> > >, CertificateChooserUserAction&}]’ at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
>     inlined from ‘static std::shared_ptr<CertificateChooser> CertificateChooser::getInstance(weld::Window*, SfxViewShell*, std::__debug::vector<com::sun::star::uno::Reference<com::sun::star::xml::crypto::XXMLSecurityContext> >&&, CertificateChooserUserAction)’ at xmlsecurity/inc/certificatechooser.hxx:111:113,
>     inlined from ‘com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::security::XCertificate> > {anonymous}::DocumentDigitalSignatures::chooseCertificatesImpl.constprop(SfxViewShell*, std::__debug::map<rtl::OUString, rtl::OUString>&, CertificateChooserUserAction, com::sun::star::security::CertificateKind)’ at xmlsecurity/source/component/documentdigitalsignatures.cxx:664:171:
> ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object of size 384 allocated by ‘operator new’
>   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
>       |                                                                     ^

Change-Id: I19ffa8f6d2b7a7c87fe3fbece2eb5e6dc147aa04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197838
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-23 08:05:10 +01:00
Tibor Nagy 514299d0ef xmlsecurity: avoid long blocking delays caused by CRL timeouts
Windows performs certificate revocation checks (CRL) during signature
verification. When the revocation endpoints listed in a certificate are
unreachable or respond slowly, the revocation checking logic issues
blocking network requests and waits for connection timeouts, which can
introduce multi‑second delays for each certificate in the chain.

Add a configuration option to disable CRL checking. The signature is
still validated against the certificate itself, preserving security
while improving performance in restricted environments.

Change-Id: I83e76556b8bd37d6b0b2fda4bb676ebd10580b38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197516
Reviewed-by: Nagy Tibor <tibor.nagy@collabora.com>
Tested-by: Jenkins
2026-01-20 11:44:13 +01:00
Gabor Kelemen b63115f3fa tdf#146619 Use more forward declarations in include/vcl/[d-g]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[d-g]*

This shaves off about 150M input

Change-Id: I2b15257451d4b392dca3e5d07f4a443ee653b04c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196395
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-11 21:38:37 +01:00
Pragat Pandya 89559c8bc7 tdf#168771 Convert enum to enum class in xmlreader and xmlsecurity
Converted plain enums to enum class for better type safety:

- xmlreader: Converted two local Space enums to enum class and removed
  redundant SPACE_ prefix from enum values (NONE, SPAN, BREAK, START)
- xmlsecurity: Converted EqualMode enum to enum class
- xmlsecurity: Converted local State enum in CompatDNCryptoAPI to enum class

Updated all usages across 8 files to use scoped enum syntax.

Change-Id: I27fd7280bccad72a43cda3b669b1f0926c34271c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196207
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2025-12-29 19:39:46 +01:00
Michael Weghorn 82edaf048b weld: Return std::unique_ptr in weld::ItemView::get_selected
So far, the method had a weld:::TreeView* out param
and a bool return value, which indicated whether
or not a selected item actually exists (and was
set in the passed TreeIter).

Drop the method param and instead return a
std::unique_ptr<weld::TreeIter>. If it doesn't
own a pointer, there is no selection (i.e. the
case previously indicated by a `false` return
value). If it owns a weld::TreeIter, then
that one points to the (first) selected item.

This simplifies using this as it is no longer
necessary to separately create weld::TreeIter to
pass as an out param first, e.g.

    std::unique_ptr<weld::TreeIter> pEntry = rMyIconView.make_iterator());
    if (rMyIconView.get_selected(xEntry.get()))
    {
        // do sth
    }

now turns into

    if (std::unique_ptr<weld::TreeIter> xEntry = rMyIconView->get_selected())
    {
        // do sth
    }

Adjust all callers accordingly.

It might be worth looking into doing something
similar for other methods (e.g.
weld::ItemView::get_iter_first) as well.

Change-Id: I83146fc8d68a92d50eed9bd635bf91b1450ce495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196039
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-22 09:18:39 +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
Mike Kaganski 7f198b27f4 Drop class utl::MediaDescriptor, and use comphelper::SequenceAsHashMap
utl::MediaDescriptor was just a SequenceAsHashMap with a few added
methods. It made it more difficult to assign a SequenceAsHashMap to
MediaDescriptor, without real upsides. In many places, the class was
used not as media descriptor, but just as helper to create sequences.

This change puts the string constants and the former methods into a
namespace utl::MediaDescriptor.

It would be also good to drop comphelper::NamedValueCollection, which
is basically a twin of comphelper::SequenceAsHashMap (TODO).

Change-Id: Ia9b69c5a2ad153ecc654944c419c1880252ed86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-06 18:18:32 +01:00
Noel Grandin 4e2b089020 loplugin:stringloop
resurrect the plugin and run it over the codebase

Change-Id: I443a75961124aabd1e62b3c4bc166d52e4621b52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194870
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-12-01 14:25:01 +01:00
Daniel Lee e7e6ef7e7a tdf#163691 Replace memcpy() with std::copy()
Change-Id: Ia95bf6e5fbd5b3d2986bd608eb85a95b4c319657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193638
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-11-13 19:51:59 +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
kallial fc2948b208 tdf#160701 Change OpenPGP untrusted key dialog type from "Error" to
"Warning"

Change-Id: I626e7fa6861699d86490b63b8d3c1c7efc31206a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192586
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-10-20 10:02:48 +02:00
Michael Weghorn c368f94db2 libxml2: Ignore deprecations for system libxml2 as well for now
commit e3b5e3aebc
    Date:   Wed Apr 23 13:38:50 2025 +0200

        libxml2: upgrade to 2.14.3

        * In https://gitlab.gnome.org/GNOME/libxml2/-/commit/712a31abe458eed75f0e2a442b35af58cf7091ca
        some members used by Libreoffice were marked as deprecated.
        Add deprecated.patch.0 to undeprecate them for now.
        Meanwhile
        https://gitlab.gnome.org/GNOME/libxml2/-/issues/936#note_2461334 has been
        opened to discuss it. The necessary code changes
        will be addressed in a follow-up commit
        [...]

added a patch to ignore deprecated symbols in
the internal libxml2, by undeprecating the symbols for
that version.

Drop that patch again and instead let compilers ignore
the deprecation warnings for now, to also make the --enable-werror
build pass for the (default) system libxml2 used e.g. on
Debian testing (which currently provides 2.14.5+dfsg-0.2).

Build failure seen there otherwise:

    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:162:24: error: 'recovery' is deprecated [-Werror,-Wdeprecated-declarations]
      162 |         m_pParserCtxt->recovery = 1 ;
          |                        ^
    /usr/include/libxml2/libxml/parser.h:377:18: note: 'recovery' has been explicitly marked deprecated here
      377 |     int recovery XML_DEPRECATED_MEMBER;
          |                  ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:209:20: error: 'nodeTab' is deprecated [-Werror,-Wdeprecated-declarations]
      209 |     m_pParserCtxt->nodeTab[m_pParserCtxt->nodeNr - 1]
          |                    ^
    /usr/include/libxml2/libxml/parser.h:284:25: note: 'nodeTab' has been explicitly marked deprecated here
      284 |     xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
          |                         ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:209:43: error: 'nodeNr' is deprecated [-Werror,-Wdeprecated-declarations]
      209 |     m_pParserCtxt->nodeTab[m_pParserCtxt->nodeNr - 1]
          |                                           ^
    /usr/include/libxml2/libxml/parser.h:280:16: note: 'nodeNr' has been explicitly marked deprecated here
      280 |     int nodeNr XML_DEPRECATED_MEMBER;
          |                ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    /home/michi/development/git/libreoffice/xmlsecurity/source/xmlsec/saxhelper.cxx:229:62: error: 'inputMax' is deprecated [-Werror,-Wdeprecated-declarations]
      229 |     if( m_pParserCtxt->inputTab != nullptr && m_pParserCtxt->inputMax != 0 )
          |                                                              ^
    /usr/include/libxml2/libxml/parser.h:271:18: note: 'inputMax' has been explicitly marked deprecated here
      271 |     int inputMax XML_DEPRECATED_MEMBER;
          |                  ^
    /usr/include/libxml2/libxml/xmlexports.h:74:50: note: expanded from macro 'XML_DEPRECATED_MEMBER'
       74 |     #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
          |                                                  ^
    4 errors generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:338: /home/michi/development/git/libreoffice/workdir/CxxObject/xmlsecurity/source/xmlsec/saxhelper.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make: *** [Makefile:301: build] Error 2

Change-Id: I1124859c0ef766b73f506dd997d89543ccf6eb12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190668
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-09-08 15:32:08 +02:00
Mike Kaganski 476b391080 Inline and constexpr an array that is used in a single place
Change-Id: I011111504d5c53c0f7755ce50b1bf30a23665a56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190195
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-08-26 07:57:51 +02:00
Simon Chenery 2741a81915 tdf#147021 avoid use of SAL_N_ELEMENTS macro in oid.hxx
Also replace for loop that used nOID value with a range-based for loop.

Change-Id: Icb7e53627fe23865600f19c38b1198e46ee3fd23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189765
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2025-08-26 01:15:41 +02:00
Caolán McNamara d02fde021c cid#1659748 Variable copied when it could be moved
and

cid#1659754 Variable copied when it could be moved
cid#1659755 Variable copied when it could be moved
cid#1659756 Variable copied when it could be moved
cid#1659766 Variable copied when it could be moved
cid#1659767 Variable copied when it could be moved
cid#1659769 Variable copied when it could be moved
cid#1659770 Variable copied when it could be moved
cid#1659777 Variable copied when it could be moved
cid#1659787 Variable copied when it could be moved
cid#1659790 Variable copied when it could be moved
cid#1659793 Variable copied when it could be moved
cid#1659802 Variable copied when it could be moved
cid#1659818 Variable copied when it could be moved
cid#1659822 Variable copied when it could be moved
cid#1659824 Variable copied when it could be moved
cid#1659825 Variable copied when it could be moved
cid#1659826 Variable copied when it could be moved
cid#1659842 Variable copied when it could be moved
cid#1659849 Variable copied when it could be moved
cid#1659850 Variable copied when it could be moved

Change-Id: I70729aaf6e229518a9a50ac18311286ab5b05b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189348
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-11 13:16:28 +02:00
Caolán McNamara d752e23e41 drop coverity workarounds that no longer seem needed
since version 2024

Change-Id: I81b3c04087f0f9db181311cbfdd95a04b229b1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189276
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-10 11:51:43 +02:00
Caolán McNamara 5568801a46 cid#1556634 Variable copied when it could be moved
cid#1659641 Variable copied when it could be moved
cid#1659647 Variable copied when it could be moved
cid#1659650 Variable copied when it could be moved
cid#1659663 Variable copied when it could be moved
cid#1659685 Variable copied when it could be moved
cid#1659698 Variable copied when it could be moved
cid#1659703 Variable copied when it could be moved
cid#1659705 Variable copied when it could be moved

Change-Id: If0d399dcce73d47be105ac4b1c342bcc010c56c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189181
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-09 00:45:51 +02:00
Caolán McNamara b1ec05b4b1 cid#1662031 Variable copied when it could be moved
and

cid#1660225 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660185 Variable copied when it could be moved
cid#1660173 Variable copied when it could be moved
cid#1660168 Variable copied when it could be moved
cid#1660166 Variable copied when it could be moved
cid#1660165 Variable copied when it could be moved
cid#1660163 Variable copied when it could be moved
cid#1660152 Variable copied when it could be moved
cid#1660149 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660145 Variable copied when it could be moved
cid#1660142 Variable copied when it could be moved
cid#1660140 Variable copied when it could be moved
cid#1660137 Variable copied when it could be moved
cid#1660136 Variable copied when it could be moved
cid#1660135 Variable copied when it could be moved
cid#1660128 Variable copied when it could be moved
cid#1660124 Variable copied when it could be moved
cid#1660122 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660114 Variable copied when it could be moved
cid#1660110 Variable copied when it could be moved
cid#1660109 Variable copied when it could be moved
cid#1660105 Variable copied when it could be moved
cid#1660104 Variable copied when it could be moved
cid#1660102 Variable copied when it could be moved
cid#1660100 Variable copied when it could be moved
cid#1660098 Variable copied when it could be moved
cid#1660080 Variable copied when it could be moved
cid#1660079 Variable copied when it could be moved
cid#1660078 Variable copied when it could be moved
cid#1660075 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660070 Variable copied when it could be moved
cid#1660064 Variable copied when it could be moved
cid#1660063 Variable copied when it could be moved
cid#1660060 Variable copied when it could be moved
cid#1660058 Variable copied when it could be moved
cid#1660053 Variable copied when it could be moved
cid#1660050 Variable copied when it could be moved
cid#1660049 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660042 Variable copied when it could be moved
cid#1660028 Variable copied when it could be moved
cid#1660023 Variable copied when it could be moved
cid#1660022 Variable copied when it could be moved
cid#1660021 Variable copied when it could be moved
cid#1660020 Variable copied when it could be moved
cid#1660017 Variable copied when it could be moved
cid#1660013 Variable copied when it could be moved
cid#1660005 Variable copied when it could be moved
cid#1660003 Variable copied when it could be moved
cid#1659999 Variable copied when it could be moved
cid#1659998 Variable copied when it could be moved
cid#1659995 Variable copied when it could be moved
cid#1659993 Variable copied when it could be moved
cid#1659989 Variable copied when it could be moved
cid#1659988 Variable copied when it could be moved

Change-Id: I2a30c8a2ac8785050d49b98635b0b406535b185a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189056
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-07 20:51:26 +02:00
Caolán McNamara d356341535 cid#1660220 Variable copied when it could be moved
and

cid#1660211 Variable copied when it could be moved
cid#1660204 Variable copied when it could be moved
cid#1660195 Variable copied when it could be moved
cid#1660194 Variable copied when it could be moved
cid#1660193 Variable copied when it could be moved
cid#1660191 Variable copied when it could be moved
cid#1660188 Variable copied when it could be moved
cid#1660187 Variable copied when it could be moved

Change-Id: Ifcb179f73723e2d43144e242fa9c1b5ac332cd4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188965
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-05 22:12:32 +02:00
Caolán McNamara 3d36a94b25 cid#1660296 Variable copied when it could be moved
and

cid#1660283 Variable copied when it could be moved
cid#1660278 Variable copied when it could be moved
cid#1660277 Variable copied when it could be moved
cid#1660272 Variable copied when it could be moved
cid#1660271 Variable copied when it could be moved
cid#1660269 Variable copied when it could be moved
cid#1660257 Variable copied when it could be moved
cid#1660251 Variable copied when it could be moved

Change-Id: I6684eaf2162dd3550e2eab3f72cccbaa09448f43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-04 22:05:59 +02:00
Caolán McNamara 79c3a09385 cid#1660333 Variable copied when it could be moved
and

cid#1660326 Variable copied when it could be moved
cid#1660325 Variable copied when it could be moved
cid#1660324 Variable copied when it could be moved
cid#1660321 Variable copied when it could be moved
cid#1660320 Variable copied when it could be moved
cid#1660316 Variable copied when it could be moved
cid#1660313 Variable copied when it could be moved
cid#1660307 Variable copied when it could be moved

Change-Id: I9fe4fa56693f8e3a1efd47294ecb7e0e5588b9b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188851
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-03 12:18:39 +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
Caolán McNamara 4725db2575 cid#1659599 Variable copied when it could be moved
and

cid#1659624 Variable copied when it could be moved
cid#1659632 Variable copied when it could be moved
cid#1659637 Variable copied when it could be moved
cid#1659656 Variable copied when it could be moved
cid#1659662 Variable copied when it could be moved

Change-Id: I20179a4ff699af546694b8a4796ab2f0cfae1903
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188708
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-01 17:29:00 +02:00
Caolán McNamara 83094e8fe6 cid#1660393 Variable copied when it could be moved
Change-Id: I4af2169ba914b3aa60735360c126f6a0cbd4909d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188508
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-29 00:22:43 +02:00
Noel Grandin 9b79ae1161 loplugin:blockblock
found with a modified copy of this plugin

Change-Id: Ib2ca97c7479abdf1a375e2700f9c947e1101f0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-19 19:11:16 +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
Caolán McNamara 9e96f6977c column width missing in signature treeview column list
which causes some problems.

reproduce on desktop with:

SAL_USE_VCLPLUGIN=gen ./instdir/program/soffice xmlsecurity/qa/unit/signing/data/signatureline.odt
and the column with heading "Signature type" appears blank unless you
select the seperator between it and Description and move it, at which
point "XAdES" appears

while in lokit there is a out-of-bound crash:

 #8  0x00007f830d436902 in abort () from target:/lib64/libc.so.6
 #9  0x00007f830d6a84e9 in __gnu_debug::_Error_formatter::_M_error() const [clone .cold] () from target:/lib64/libstdc++.so.6
 #10 0x00007f830518aa13 in std::__debug::vector<std::unique_ptr<SvLBoxTab, std::default_delete<SvLBoxTab> >, std::allocator<std::unique_ptr<SvLBoxTab, std::default_delete<SvLBoxTab> > > >::operator[] (this=0x4e31dfa8, __n=6) at /usr/include/c++/14/debug/vector:517
 #11 0x00007f8305183b4d in SvTreeListBox::GetTab (this=0x4e31dbb0, pEntry=0x4e349e00, pItem=0x4b857ab0) at vcl/source/treelist/treelistbox.cxx:3203
 #12 0x00007f830513529c in lcl_DumpEntryAndSiblings (rJsonWriter=..., pEntry=0x4e349e00, pTabListBox=0x4e31dbb0, bCheckButtons=false)
     at vcl/source/treelist/svtabbx.cxx:102
 #13 0x00007f8305135f7b in SvTabListBox::DumpAsPropertyTree (this=0x4e31dbb0, rJsonWriter=...) at vcl/source/treelist/svtabbx.cxx:217
 #14 0x00007f830513868b in SvHeaderTabListBox::DumpAsPropertyTree (this=0x4e31dbb0, rJsonWriter=...) at vcl/source/treelist/svtabbx.cxx:647
 #15 0x00007f83058951b1 in JSDialogNotifyIdle::generateWidgetUpdate (this=0x4e32b530, pWindow=...) at vcl/jsdialog/jsdialogsender.cxx:111

Change-Id: Ia617d18c9cdf1170f50cbda3082e548777196dcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187351
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 1cb5d4338d8467645494b5723b35aba031aea51b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187360
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-07-04 10:45:17 +02:00
Gabor Kelemen b52384de6f Remove obsolete fw declarations from writerperfect/ xml{help,script,security}
found with bin/find-unneeded-includes --fwdecl

Change-Id: Ib5cfbeea3a5811f770dc82d31000e88ec0ea19d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184009
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-05-20 12:20:47 +02:00
Mike Kaganski 9147a19d24 Use osl_getEnvironment instead of getenv
Avoids conversion to OUString; and is Unicode-safe on Windows.

Change-Id: Idd82f589ae9bf692ce2e73f84cb664a68156915a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183507
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-30 17:07:52 +02:00
varshneydevansh 2a20616d09 Move Windows error helpers to comphelper namespace
Previously, WindowsErrorString and WindowsErrorStringFromHRESULT were
defined in an anonymous namespace in windowserrorstring.hxx, which:
1. Made them unavailable to other translation units
2. Violate ODR by creating separate copies in each TU
3. Require workarounds to access them

Changes:
- Move functions to proper comphelper namespace
- Keep implementations inline as they're simple utilities
- Preserve all existing functionality
- Update all call sites to use comphelper:: prefix

This change enables proper use of these utilities across LibreOffice
while maintaining current behavior and performance characteristics.

Introduced in this commit:

    commit 94cdcaa4d8
    Author: Tor Lillqvist <tml@collabora.com>
    Date:   Thu Aug 13 13:22:28 2015 +0300

        Add a globally usable WindowsErrorString function

Change-Id: I34df1c2b1f30c6204f107ca4792131d692203880
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183332
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-26 15:11:33 +01:00
Noel Grandin 22f46bd89f use more concrete UNO classes
Change-Id: Id10786bbf7985adbb251224b45f9dabcc84d0a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182721
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-10 14:18:35 +01:00
Miklos Vajna ec9dbbe288 tdf#161872 xmlsecurity mscrypt: don't require trusted signing certs
See commit 1817760f56 (tdf#161872
xmlsecurity nss: don't require trusted signing certs, 2025-01-28), this
is the same situation, but this time on Windows.

Change-Id: I945899da47ab5dcc421f35db31ec7af240c59b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180881
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2025-01-29 10:45:42 +01:00
Miklos Vajna 1817760f56 tdf#161872 xmlsecurity nss: don't require trusted signing certs
Configure your signing cert in Firefox, (unusually) don't trust the CA
that you would use to issue your signing cert, try to sign a document,
error.

This is reportedly wrong since commit
bfd479abf0 (Update libxmlsec to 1.3.1,
2023-06-09), for some reason our usage of libxmlsec-1.2 didn't trigger
this problem.

Given that we already disable libxmlsec-side cert verify while
verifying a signature (and have our own logic there), it's consistent to
do the same while creating the signature, and that fixes the bug, too.

The Windows / MSCNG backend is not yet changed here.

Change-Id: I8a7adf06b9a26731f1a180a4f6257317084e414a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180844
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-28 18:14:02 +01:00