summaryrefslogtreecommitdiff
path: root/include/comphelper
AgeCommit message (Collapse)Author
2023-05-24Remove unused comphelper::adjustIndexToStartOfSurrogateStephan Bergmann
...introduced in 28cc0bff10f5dcec0c7b698ae7ba275845b2cad1 "Break comphelper::adjustIndexToStartOfSurrogate out of o3tl::iterateCodePoints" in preparation for bd5c3582581f37513f45b518e348f443d5d57334 "a11y: Fix returning unpaired surrogates when retrieving characters", but which never picked it up Change-Id: I5a10a3053d2f51333e27b74a808a41df7c1912ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152183 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-23tdf#155235 workaround gtk3 accessiblibility crashes on closeNoel Grandin
we are still working around the problem here, which is that various bit are not firing accessibility events when their children change. So clear the static map in comphelper on shutdown, to prevent crashes resulting from objects being kept alive after vcl has shutdown Change-Id: I3ae216b345a1bb4cb4e3fde3527e4d4aa5968f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-19loplugin:virtualdeadNoel Grandin
Change-Id: I089fd6b9281cc35768462e83a7e18588f357df4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-18tdf#63130 reduce large memory copies when reading from BinaryDataContainerNoel Grandin
rather than writing a bunch more code, extract the common part from comphelper::SequenceInputStream into a new base class Change-Id: I0d3561e3ca2e748b904128e3b5955e27196d7170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09comphelper/servicedecl.hxx is unusedNoel Grandin
Change-Id: I3ddb06a31c746bfd7da72368a51266d688b1230b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151570 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-06update loplugin:stringview* for o3tl::iterateCodePointsNoel Grandin
And change o3tl::iterateCodePoints to use sal_Int32 for its second param, to integrate better with places where the parameter comes from an UNO API, which cannot use std::size_t Change-Id: I7b9dd2c9bc7f48e6c4a912f039f1b5dae7beae69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151421 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-05tdf#155149 Crash when exiting cell edit modeNoel Grandin
regression from commit 2dc240a82646fc23c673a6fd5a29ade934dd5b67 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue May 2 14:47:43 2023 +0200 improve AccessibleEventNotifier::addEvent and commit 3b7db802731826b6cc3b55100470b0c61c1f2dfa Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu May 4 10:06:14 2023 +0200 tdf#105404 [API CHANGE] add index to accessiblity change event (*) Send better index hints (*) Error check the index hints better (*) Convert asserts to warnings and fall back to old code when index hint is wrong. Change-Id: I8e752fc26e729c9c8926beb2c7b196f5418a147e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-05Break comphelper::adjustIndexToStartOfSurrogate out of o3tl::iterateCodePointsStephan Bergmann
...as what they do is orthogonal (and it turned out that the use case that motivated the addition of o3tl::iterateCodePoints in the first place needs them independently, anyway) Change-Id: Id33901a2f7ac627253654ee6d883305dcf5a456f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151415 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-02tdf#137544 reduce cost of AccessibleEventNotifierNoel Grandin
the ListenerContainer can be a moveable type, which means we can store it in a node and avoid an indirection and an extra allocation. Also use unordered_map to speed up lookups. Change-Id: I888f0418b035e459cce3facd956ba51db97335a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19loplugin::unusedmethodsNoel Grandin
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12remove unnecessary methodNoel Grandin
Change-Id: I9ef8f2cb2e3836c879532f690794df642c2449de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150255 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-05avmedia,*: guess the mime type of media files based on file nameMichael Stahl
.. at least for the most popular types, and do it automatically in MediaItem::setURL(). This should work in practice in most cases and is much simpler than adding some type detection or calling into platform dependent avmedia backends. Remove the parameter that was only ever set to "application/vnd.sun.star.media" anyway, the same value that would be used if it's missing. Stop using that silly type for everything, only use it when guessing fails. In case an ODF document is loaded, it will use the mime type loaded from the file (see setting of MediaMimeType in SdXMLPluginShapeContext) and not guess it because that would require updating the entry in manifest.xml as well. Change-Id: I8ce29cf7425678ae11dda1d8c875be818f8623af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150049 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-02remove IEventNotificationHook from comphelper::OPropertySetNoel Grandin
this class is a copy of cppuhelper::OPropertySet, and this feature is unused in that class too, so we are not likely to need it Change-Id: I9e3f0f7d786052f87f5a18c67e9b78409752fd99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-31simplify subclasses of comphelper::OPropertySetHelperNoel Grandin
they should deal in terms of the fast property IDS, they should not need to override setPropertyValueImpl, so just remove this, and standardise on the subclasses overriding setFastPropertyValueImpl Change-Id: I190955ccc4ae3e07dd481a1044f3c074dd1a40aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-31make some method in comphelper::OPropertySetHelper finalNoel Grandin
Change-Id: Ia745a0d7568cf8f9180ed2e28cfd11da94cd186a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-30loplugin:stringadd in variousNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-13lok: introduce resetCompatFlagXisco Fauli
and reset logic of setCompatFlag/isCompatFlagSet changed in afb7b373c34bd6a1608a30eb8267fa6f8231e853 "CppunitTest_sc_tiledrendering: reset CompatFlag in tearDown Otherwise, there are some tests setting it to scPrintTwipsMsgs, so depending on the order of execution, it might affect other tests" Change-Id: I306ac0b77b65f99879f4018cfbc57354a158f38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148783 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-13convert UnoControlModel and friends to use std::mutexNoel Grandin
Which means creating a variant of the cppuhelper::OPropertySetHelper helper class which uses a std::mutex. Since we can do virtual base classes now (which the original could not), use that and a new helper class comphelper::UnoImplBase to share std::mutex m_aMutex; bool m_bDisposing; fields that the OPropertySetHelper wants to share with the parent class. Change-Id: I05ad465a3d3653ed4e109137e3e1c58190da8d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22create new OPropertyChangeListener2 and use it in FmFieldWinNoel Grandin
create OPropertyChangeListener2 as a modified copy of OPropertyChangeListener which uses std::mutex instead of osl::Mutex Change-Id: Ic6be1c62992749e4f0dd23a8c95de63dc45eba3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147430 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22OPropertyChangeListener::setAdapter can be privateNoel Grandin
Change-Id: I5b849babe365300d1b6443caaacce45f4c7bf7c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147431 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22BaseMutex->std::mutex in CommandDispatchNoel Grandin
Change-Id: Ic73a84eb793d45e1041698e45e2c844a1e2f2f66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-19fix locking in OMultiTypeInterfaceContainerHelperVar4::diposeAndCloearNoel Grandin
where I forgot to relock at the end of the method And sprinkle some asserts around to catch mistakes like this in future Change-Id: I4908ac0ffdfe33b1b5cf1b02e6765f20973af841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147296 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-19osl::Mutex->std::mutex in OWeakEventListenerAdapterNoel Grandin
Change-Id: I3ebd6cfdb8ff76b2d1988c3c481ef4effa5c2964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-18osl::Mutex->std::mutex in DefaultGridColumnModelNoel Grandin
Change-Id: Ie3df092b013f10b36c85028fe3b9966d58b22005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-16no need to lock when accessing m_pInstance hereNoel Grandin
as noted by mkaganski, this field is valid until the object destructs, so no need to take a lock Change-Id: Id0b9a1a26391d4e971bd0b37b9d6e1b1a20e163a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15new comphelper::SingletonRefNoel Grandin
to replace salhelper::SingletonRef, but using a std::mutex instead of an osl::Mutex Change-Id: Ibf88a3778f47300c08b8ec9ee58ed24eb83aed7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-14no need to use unique_ptr for OInterfaceContainerHelper4Noel Grandin
it has an empty size of one pointer, so it saves no memory to use unique_ptr. Need to fix the const-ness of some methods in OInterfaceContainerHelper4 Change-Id: I0c0c28a228ccfe0e97174fbc83555059fc351b3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-13enforce proper locking when calling OInterfaceContainerHelper4Noel Grandin
Change-Id: Ic86305f3d16148925c7753200a687f36f08a6516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-09re-apply "optimize ConfigurationProperty::get()"Noel Grandin
This reverts commit 05b2bfc289df8712097cc1e640bf7d3bc6b86a84, but adds clearing of some more members, which were holding onto references to bits of config data after the config service was disposed. Change-Id: I9969ee2472445e4e1dbe8ea15e081401845ad29c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146605 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-06Revert "optimize ConfigurationProperty::get()"Xisco Fauli
This reverts commit 7df433cdc33b4d6ba38eafad9282d015571433ef and its follow-ups: * b4b63d0c46979ad6b6aae5d6a4ea6672ea248e10 "try to fix some shutdown crashes" * 203ad037ccb9fdebffea4f622229ded90635eb8b "try to fix shutdown crashes in ConfigurationWrapper" since it introduced a crash starting with LibreOffice 7.4 See https://crashreport.libreoffice.org/stats/signature/void%20rtl::str::release%3C_rtl_uString%3E(_rtl_uString*) Later, it was reverted in libreoffice-7-4 branch with df79a29ea20fb698d650be45a48c607f54476dea "Revert "optimize ConfigurationProperty::get()" (7.4 only)" so the crash is no longer reported in that branch. OTOH, Noel tried to fix it in master/libreoffice-7-5 branches with the two commits mentioned above but the crash is still being reported in LibreOffice 7.5 After talking to him, he suggested to revert it all Finally, adapt code to make loplugin:stringviewparam happy with getPropertyValue Change-Id: Id9fa97d2a81a590e53abd027e978d2d6179222b8 Change-Id: Id2e3475c342770be5705a74b9c0b45f45d6be5ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-29lok: support per-user timezoneAshod Nakashian
This adds support for user-specific timezone. When none is provided during loading, the system default is used. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146211 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-25Use ImplInheritanceHelper in OAccessibleTextHelperStephan Bergmann
(Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper(comphelper::OAccessibleExtendedComponentHelper &&)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(220): note: see declaration of 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper' > include\comphelper/accessiblecomponenthelper.hxx(220): note: 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper(comphelper::OAccessibleExtendedComponentHelper &&)': function was explicitly deleted > include\comphelper/accessibletexthelper.hxx(133): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText> &&)' being compiled > include\comphelper/accessibletexthelper.hxx(133): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText> &&)' being compiled ) Change-Id: I00377be4a5fb44b2ef2b5001823ca0d89ead026b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146109 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-25Use ImplInheritanceHelper in OAccessibleSelectionHelperStephan Bergmann
(Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OAccessibleComponentHelper::OAccessibleComponentHelper(comphelper::OAccessibleComponentHelper &&)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(191): note: see declaration of 'comphelper::OAccessibleComponentHelper::OAccessibleComponentHelper' > include\comphelper/accessibleselectionhelper.hxx(120): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection> &&)' being compiled > include\comphelper/accessibleselectionhelper.hxx(120): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper,com::sun::star::accessibility::XAccessibleSelection> &&)' being compiled > include\cppuhelper/implbase.hxx(151): error C2248: 'comphelper::OAccessibleComponentHelper::OAccessibleComponentHelper': cannot access private member declared in class 'comphelper::OAccessibleComponentHelper' > include\comphelper/accessiblecomponenthelper.hxx(191): note: see declaration of 'comphelper::OAccessibleComponentHelper::OAccessibleComponentHelper' > include\comphelper/accessiblecomponenthelper.hxx(185): note: see declaration of 'comphelper::OAccessibleComponentHelper' ) Change-Id: I2414d9f777de42b62c33492a90299aa9a9d53699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146108 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-24Use ImplInheritanceHelper in OAccessibleExtendedComponentHelperStephan Bergmann
(Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(176): note: compiler has generated 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent' here > include\comphelper/accessiblecomponenthelper.hxx(176): note: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': function was implicitly deleted because a base class invokes a deleted or inaccessible function 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)' > include\cppuhelper/basemutex.hxx(43): note: 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)': function was implicitly deleted because a data member invokes a deleted or inaccessible function 'osl::Mutex::Mutex(const osl::Mutex &)' > include\osl/mutex.hxx(107): note: 'osl::Mutex::Mutex(const osl::Mutex &)': function was explicitly deleted > include\comphelper/accessiblecomponenthelper.hxx(228): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent> &&)' being compiled > include\comphelper/accessiblecomponenthelper.hxx(228): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleExtendedComponent> &&)' being compiled ) Change-Id: Ia5a7b244dd018c1a63cc2940dba197c43827d563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-24Use ImplInheritanceHelper in OAccessibleComponentHelperStephan Bergmann
(Explicitly deleting the special member functions is needed to avoid MSVC > include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': attempting to reference a deleted function > include\comphelper/accessiblecomponenthelper.hxx(177): note: compiler has generated 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent' here > include\comphelper/accessiblecomponenthelper.hxx(177): note: 'comphelper::OCommonAccessibleComponent::OCommonAccessibleComponent(const comphelper::OCommonAccessibleComponent &)': function was implicitly deleted because a base class invokes a deleted or inaccessible function 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)' > include\cppuhelper/basemutex.hxx(43): note: 'cppu::BaseMutex::BaseMutex(const cppu::BaseMutex &)': function was implicitly deleted because a data member invokes a deleted or inaccessible function 'osl::Mutex::Mutex(const osl::Mutex &)' > include\osl/mutex.hxx(107): note: 'osl::Mutex::Mutex(const osl::Mutex &)': function was explicitly deleted > include\comphelper/accessiblecomponenthelper.hxx(200): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent> &&)' being compiled > include\comphelper/accessiblecomponenthelper.hxx(200): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent>>(cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent,com::sun::star::accessibility::XAccessibleComponent> &&)' being compiled ) Change-Id: Ide07c6a7c3660e469f16973d866c949d17fdf419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146010 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-15Merge SvXMLAttributeList to comphelper::AttributeListMike Kaganski
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13XUnoTunnel->dynamic_cast in comphelper::ByteReader and comphelper::ByteWriterNoel Grandin
Change-Id: I1f8c864a939dff1252ba15f517f63b62d1a1e1fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145393 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12comphelper::OCommonAccessibleComponent's XAggregation is apparently unusedStephan Bergmann
It had been using WeakAggComponentImplHelper2 ever since 2f79d5f4794ec7f076bb290702b4c9c0afb2a6c8 "initial checkin - helper for implementing an XAccessibleContext", but all the classes that derive from it (comphelper::OAccessibleComponentHelper, comphelper::OAccessibleExtendedComponentHelper, and classes that in turn derive from those) implement queryInterface (in a way not just forwarding to the base class queryInterface, as would be required for classes implementing XAggregation) rather than queryAggregation, so aggregation was broken and any delegator would be ignored when calling queryInterface on one of the derived classes. Also, without this commit but instead with a local > --- a/include/comphelper/accessiblecomponenthelper.hxx > +++ b/include/comphelper/accessiblecomponenthelper.hxx > @@ -49,6 +49,7 @@ namespace comphelper > :public ::cppu::BaseMutex > ,public OCommonAccessibleComponent_Base > { > + void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } > friend class OContextEntryGuard; > private: > css::uno::WeakReference< css::accessibility::XAccessible > m_aCreator; // the XAccessible which created our XAccessibleContext on all of Linux, macOS, and Windows: `make check` still succeeded, and running the resulting LibreOffice with the system in some assistive technology narration mode produced audio, all without hitting that injected assert that should have fired if the XAggregation mechanism had been used after all. Change-Id: I47045824d0762a5f3de150a11576694621b163b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145330 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-10OAccessibleImplementationAccess was apparently effectively unused by nowStephan Bergmann
...as there were no calls to its OAccessibleImplementationAccess::getUnoTunnelId so no code apparently made use of that XUnoTunnel Change-Id: I35d392999f1c28e81f7ff4bf395f63642eb17bce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145250 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-06Merge comphelper::OAccessibleContextHelper into ↵Stephan Bergmann
comphelper::OCommonAccessibleComponent Change-Id: I586ae8fe2842fd879ae2ae506c659d06dda16843 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145160 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-27try to fix shutdown crashes in ConfigurationWrapperNoel Grandin
associated with commit 7df433cdc33b4d6ba38eafad9282d015571433ef optimize ConfigurationProperty::get() it seems it introduced https://crashreport.libreoffice.org/stats/signature/void%20rtl::str::release%3C_rtl_uString%3E(_rtl_uString*) which, at the moment, is the most reported crash in https://crashreport.libreoffice.org/stats/version/7.4.3.2 We need to tie the lifetime of ConfigurationWrapper and the cache objects together, so they die as one unit, otherwise the unpredicatable ordering of destruction of static objects is a problem. Change-Id: I80db5a4c28510a68f40b919902b01f3981e32bfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-19loplugin:unocast (oox::ForumlaImExportBase)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I11bc363447c44319bc47f7eebb7084f64ea85511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144400 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-18loplugin:unocast (cairocanvas::SurfaceProvider)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) There are implementation classes whose getSomething already delegates to RepaintTarget, so they can't also delegate to SurfaceProvider. So introduce the concept of comphelper::getSomethingImpl additionally delegating to a sequence of mixin classes before delegating to the base. Change-Id: I9230f3dc06abbdd1ad92514a11473dae2624f7c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144404 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-18Fix typoAndrea Gelmini
Change-Id: Id469267ff57f8013accf2371b54174bee07016ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144396 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-12-17move and rename sanitizeString for reuseCaolán McNamara
Change-Id: I8378f3df79e511cf2d385ace1cd7964ab1c76e7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144388 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24Make some date functions inline constexprMike Kaganski
Change-Id: Ibef0f650ce66030f28b59e4818f549d86415e2d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143198 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-23loplugin:unusedfields make some fields privateNoel Grandin
this is one of the secondary analyses this plugin performs Change-Id: Iaa4424c2396470c6f1df85b0290fbffdda35fa08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-22Related: tdf#152114 Move some tools' Date class algorithms to comphelper::dateEike Rathke
So they can be reused, specifically in connectivity/source/commontools/dbconversion.cxx Change-Id: I8b2b59e3cb078a73d5f670f0756404471009cf9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143114 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins