summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)Author
2024-10-25tdf#130857 VclBuilder: Move extractActive to BuilderBaseMichael Weghorn
Turn this helper function into a static function in the BuilderBase class, for reuse in QtBuilder in an upcoming commit. Change-Id: I68c7e62816ff5fdd1c2a02cf5e42f90b32cff627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175571 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-25speedup saving large XLS file with lots of query formula(2)Noel Grandin
reduce cost of OUString construction by avoiding initialising a temporary and then overwriting it. 12s to 10s Change-Id: I889152ba71947004ca7d5c96f073182c94d95ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175539 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-25tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 2404, 2441 Change-Id: I3e929e8b465e77a6ad550bf35658abb36befa6a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175426 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-24tdf#130857 VclBuilder: Make extractEntry a static helperMichael Weghorn
... in the base class BuilderBase, in order to reuse it in QtBuilder in an upcoming commit. Change-Id: Ia115804a9d2bf22b47afb94d97109e9495b21cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175530 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-24win a11y: No longer read/write registry keyMichael Weghorn
No longer attempt to write a registry "SupportAssistiveTechnology" in "HKEY_CURRENT_USER\Software\LibreOffice\Accessibility\AtToolSupport" when assistive technology support gets enabled (e.g. because a screen reader is running) and no longer try to read that registry key to determine whether or not AT tool support is requested. While the comment // Check in the Windows registry if an AT tool wants Accessibility support to // be activated .. seems to suggest that this is something requested by an assistive technology, it looks more like a way to persist whether the a11y bridge was ever used in LO, as LO itself writes that value. I don't really see the point, but think it makes much more sense to enable the a11y bridge if an AT is active *at the moment*. In addition, in my Windows 10 setup with LO 24.8 installed, there's no "HKEY_CURRENT_USER\Software\LibreOffice" in the registry, only a "HKEY_CURRENT_USER\Software\The Document Foundation\LibreOffice 24.8", so the code wouldn't have any effect in practice anyway. Maybe this was necessary at some point in the past when the Java Access Bridge was still in place, instead of supporting the platform API via today's MSAA/IAccessible2 bridge Note that before commit bfbaeb8192447265bdd78d1be4990947d135eb6e Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 18 17:01:43 2024 +0100 tdf#160982 wina11y: Drop extra screen reader check to enable a11y bridge , the presence or absence of the SPI_GETSCREENREADER param or a SAL_FORCE_IACCESSIBLE2 environment variable would additionally have played a role. Change-Id: I4dddb599eedb4b29c9709fbb41093ef615e60b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175501 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-23tdf#163486: PVS: Expression is always trueXisco Fauli
V560 A part of conditional expression is always true: pRun != pEnd. V560 A part of conditional expression is always true: pRun != pEnd. Change-Id: I1a99ae31346177bed731e26e883720efa018bcbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175451 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22pass by reference for ShouldDownscaleIconsAtSurfaceNoel Grandin
because the param is never null Change-Id: I58660a9e4e6c25def2a70099bffce322b477b702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 1241, 1244. Also, 1247 and 1251. Change-Id: Ibf474d045ae52bc0d7f655143e72117c29736dfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175206 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 627, 632, 636 Change-Id: If0f4f4da0d51389c12607770af58f4e34f3caafc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175353 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 465, 472 V1037 Two or more case-branches perform the same actions. Check lines: 497, 505 Change-Id: I826e2236100727f19bb60662dc7145e8e4814421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175389 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-22move vcl::DeleteOnDeinit to toolsNoel Grandin
so we can fix a shutdown use-after-free in sot. Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-21tdf#163484 Treeview not maximized in the StyleListNoel Grandin
regression from commit 7f42f031ed1b9f374f3fcba9c814dc5862492026 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Oct 10 09:39:14 2024 +0200 tdf#100894 speed up style tree creation Change-Id: I953c2765090cfa56c7926c4cc10534f6ce60237b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175330 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-21Make tools::Time ctor taking sal_Int64 privateMike Kaganski
This ctor is meant to set the value of nTime directly; and that value is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK. But in some places, this ctor was misused for setting of nanoseconds, which would only accidentally work for values less than one second. All places that initialized tools::Time with 0, now use EMPTY. This makes the ctor private; and for the very few cases where really the encoded value of nTime is stored / restored, fromEncodedTime is introduced. Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-10-21vcl: move bitmap filter headers into vcl/bitmap global header directoryChris Sherlock
Use #pragma once instead of header guards Change-Id: Iba43f2103628ed184933cf2611991e7aef9f0173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173369 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-10-21tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 156, 164 V1037 Two or more case-branches perform the same actions. Check lines: 898, 908 Change-Id: Iec6ceda7c4506317860950857e516991d8a507a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175238 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-20tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 856, 860 V1037 Two or more case-branches perform the same actions. Check lines: 918, 923, 958 Change-Id: I2ef4a1cbcbbc54496b896153f08ebd0049c4dfc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175232 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-20Fix CppunitTest_sw_a11y crash: clear mxAccessBridge in DeInitVCLMike Kaganski
I see the crash locally on Windows 11, in a 64-bit build. Debugging it, I see this call stack: vcllo.dll!std::unique_ptr<comphelper::SolarMutex,std::default_delete<comphelper::SolarMutex>>::get() Line 3433 vcllo.dll!SalInstance::GetYieldMutex() Line 142 vcllo.dll!Application::GetSolarMutex() Line 492 tklo.dll!SolarMutexGuard::SolarMutexGuard() Line 1340 tklo.dll!VCLXDevice::~VCLXDevice() Line 45 tklo.dll!cppu::ImplInheritanceHelper<VCLXDevice,com::sun::star::awt::XWindow2,com::sun::star::awt::XVclWindowPeer,com::sun::star::awt::XLayoutConstrains,com::sun::star::awt::XView,com::sun::star::awt::XDockableWindow,com::sun::star::accessibility::XAccessible,com::sun::star::lang::XEventListener,com::sun::star::beans::XPropertySetInfo,com::sun::star::awt::XStyleSettingsSupplier>::~ImplInheritanceHelper<VCLXDevice,com::sun::star::awt::XWindow2,com::sun::star::awt::XVclWindowPeer,com::sun::star::awt::XLayoutConstrains,com::sun::star::awt::XView,com::sun::star::awt::XDockableWindow,com::sun::star::accessibility::XAccessible,com::sun::star::lang::XEventListener,com::sun::star::beans::XPropertySetInfo,com::sun::star::awt::XStyleSettingsSupplier>() Line 155 tklo.dll!VCLXWindow::~VCLXWindow() Line 336 tklo.dll!cppu::ImplInheritanceHelper<VCLXWindow,com::sun::star::awt::XVclContainer,com::sun::star::awt::XVclContainerPeer>::~ImplInheritanceHelper<VCLXWindow,com::sun::star::awt::XVclContainer,com::sun::star::awt::XVclContainerPeer>() Line 155 tklo.dll!VCLXContainer::~VCLXContainer() Line 42 tklo.dll!cppu::ImplInheritanceHelper<VCLXContainer,com::sun::star::awt::XTopWindow3,com::sun::star::awt::XSystemDependentWindowPeer>::~ImplInheritanceHelper<VCLXContainer,com::sun::star::awt::XTopWindow3,com::sun::star::awt::XSystemDependentWindowPeer>() Line 155 tklo.dll!VCLXTopWindow::~VCLXTopWindow() Line 240 tklo.dll!VCLXTopWindow::`scalar deleting destructor'(unsigned int) cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 230 tklo.dll!cppu::WeakImplHelper<com::sun::star::awt::XDevice,com::sun::star::awt::XUnitConversion>::release() Line 115 tklo.dll!cppu::ImplInheritanceHelper<VCLXDevice,com::sun::star::awt::XWindow2,com::sun::star::awt::XVclWindowPeer,com::sun::star::awt::XLayoutConstrains,com::sun::star::awt::XView,com::sun::star::awt::XDockableWindow,com::sun::star::accessibility::XAccessible,com::sun::star::lang::XEventListener,com::sun::star::beans::XPropertySetInfo,com::sun::star::awt::XStyleSettingsSupplier>::release() Line 171 tklo.dll!cppu::ImplInheritanceHelper<VCLXWindow,com::sun::star::awt::XVclContainer,com::sun::star::awt::XVclContainerPeer>::release() Line 171 tklo.dll!cppu::ImplInheritanceHelper<VCLXContainer,com::sun::star::awt::XTopWindow3,com::sun::star::awt::XSystemDependentWindowPeer>::release() Line 171 winaccessibility.dll!com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::set(com::sun::star::accessibility::XAccessible * pInterface) Line 247 winaccessibility.dll!com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::operator=(com::sun::star::accessibility::XAccessible * pInterface) Line 351 winaccessibility.dll!AccObject::~AccObject() Line 283 winaccessibility.dll!std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>::~pair<com::sun::star::accessibility::XAccessible * const,AccObject>() winaccessibility.dll!std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>::`scalar deleting destructor'(unsigned int) winaccessibility.dll!std::destroy_at<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>>(std::pair<com::sun::star::accessibility::XAccessible * const,AccObject> * const _Location) Line 306 winaccessibility.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>>>::destroy<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>> & __formal, std::pair<com::sun::star::accessibility::XAccessible * const,AccObject> * const _Ptr) Line 707 winaccessibility.dll!std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *> * _Ptr) Line 382 winaccessibility.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>>>::_Erase_tree<std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>,void *> * _Rootnode) Line 760 winaccessibility.dll!std::_Tree<std::_Tmap_traits<com::sun::star::accessibility::XAccessible *,AccObject,std::less<com::sun::star::accessibility::XAccessible *>,std::allocator<std::pair<com::sun::star::accessibility::XAccessible * const,AccObject>>,0>>::clear() Line 1365 winaccessibility.dll!AccObjectWinManager::~AccObjectWinManager() Line 67 winaccessibility.dll!AccTopWindowListener::~AccTopWindowListener() Line 100 winaccessibility.dll!AccTopWindowListener::`scalar deleting destructor'(unsigned int) cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 230 winaccessibility.dll!cppu::WeakImplHelper<com::sun::star::awt::XTopWindowListener>::release() Line 115 winaccessibility.dll!rtl::Reference<AccTopWindowListener>::~Reference<AccTopWindowListener>() Line 126 winaccessibility.dll!my_sc_impl::`anonymous namespace'::MSAAServiceImpl::~MSAAServiceImpl() winaccessibility.dll!my_sc_impl::`anonymous namespace'::MSAAServiceImpl::`scalar deleting destructor'(unsigned int) cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 230 winaccessibility.dll!cppu::WeakImplHelper<com::sun::star::accessibility::XMSAAService,com::sun::star::lang::XServiceInfo>::release() Line 115 vcllo.dll!com::sun::star::uno::Reference<com::sun::star::lang::XComponent>::~Reference<com::sun::star::lang::XComponent>() Line 114 vcllo.dll!ImplSVData::~ImplSVData() Line 509 vcllo.dll!`rtl::Static<ImplSVData,`anonymous namespace'::private_aImplSVData>::get'::`2'::`dynamic atexit destructor for 'instance''() ucrtbased.dll!_execute_onexit_table::__l2::<lambda>() Line 206 ucrtbased.dll!__crt_seh_guarded_call<int>::operator()<void <lambda>(void),int <lambda>(void) &,void <lambda>(void)>(__acrt_lock_and_call::__l2::void <lambda>(void) && setup, _execute_onexit_table::__l2::int <lambda>(void) & action, __acrt_lock_and_call::__l2::void <lambda>(void) && cleanup) Line 204 ucrtbased.dll!__acrt_lock_and_call<int <lambda>(void)>(const __acrt_lock_id lock_id, _execute_onexit_table::__l2::int <lambda>(void) && action) Line 974 ucrtbased.dll!_execute_onexit_table(_onexit_table_t * table) Line 231 vcllo.dll!__scrt_dllmain_uninitialize_c() Line 398 vcllo.dll!dllmain_crt_process_detach(const bool is_terminating) Line 182 vcllo.dll!dllmain_crt_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 220 vcllo.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 vcllo.dll!_DllMainCRTStartup(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 335 ntdll.dll!LdrpCallInitRoutine() ntdll.dll!LdrShutdownProcess() ntdll.dll!RtlExitUserProcess() kernel32.dll!ExitProcessImplementation() ucrtbased.dll!exit_or_terminate_process(const unsigned int return_code) Line 138 ucrtbased.dll!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 274 ucrtbased.dll!exit(int return_code) Line 288 cppunittester.exe!__scrt_common_main_seh() Line 295 cppunittester.exe!__scrt_common_main() Line 331 cppunittester.exe!mainCRTStartup(void * __formal) Line 17 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() where in Application::GetSolarMutex, pSVData->mpDefInst is nullptr, so in the end, the message is: Exception thrown: read access violation. this was 0x10. This change moves the hack introduced in commit 05d2a415654e2b9324f70d92871df20ca964dc43 (INTEGRATION: CWS vcl37 (1.52.38); FILE MERGED, 2005-03-29), which obviously solved the same problem. The CppUnit case is different, because there ImplSVMain is not used, but instead, DeInitVCL is called from Protector dtor (test/source/vclbootstrapprotector.cxx). So doing it in the start of DeInitVCL looks a reasonable solution to me. Change-Id: I5ba740a6b94bbdabc28538dbbcf8cd211bb56f16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175198 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-19tdf#160982 wina11y: Drop extra screen reader check to enable a11y bridgeMichael Weghorn
When initializing the a11y bridge on Windows, no longer check whether the screen reader parameter `SPI_GETSCREENREADER` [1] is explicitly set or require to explicitly enable by setting an `SAL_FORCE_IACCESSIBLE2` environment variable. For performance reasons, it of course makes sense to only enable the a11y bridge when there is actually assistive technology that makes use of it. However, `ImplInitAccessBridge` already only gets called when either support for assistive technology has explicitly been enabled in the settings (i.e. in "Tools" -> "Options" -> "LibreOfficeDev" -> "Accessibility", the "Support assistive technology tools (restart required" checkbox was checked) or when a `WM_GETOBJECT` message is received, whose documentation says [2]: > Sent by both Microsoft Active Accessibility and Microsoft UI Automation > to obtain information about an accessible object contained in a server > application. > > Applications never send this message directly. Microsoft Active > Accessibility sends this message in response to calls to > AccessibleObjectFromPoint, AccessibleObjectFromEvent, or > AccessibleObjectFromWindow. However, server applications handle this > message. UI Automation sends this message in response to calls to > IUIAutomation::ElementFromHandle, ElementFromPoint, and > GetFocusedElement, and when handling events for which a client has > registered. Both of these cases (explicitly enabled, AT requests information) justify enabling the a11y bridge by themselves, so drop the extra check. Qt's UIA bridge for example also gets activated when a WM_GETOBJECT message is received [3]. This makes both, Microsoft Narrator (screen reader shipped with Windows, but which doesn't set the `SPI_GETSCREENREADER` parameter) and Microsoft Accessibility Insights for Windows (a tool for a11y analysis/debugging) work - at least to a certain degree - without having to explicitly set the environment variable `SAL_FORCE_IACCESSIBLE2`. While LibreOffice doesn't have a UIA bridge at this point in time, Windows provides an MSAA (IAccessible) to UIA proxy that provides some basic information via UIA at least, see [4]: > The LegacyIAccessible control pattern is supported by the Microsoft > Active Accessibility to Microsoft UI Automation Proxy. As expected, a breakpoint or assert in `ImplInitAccessBridge` only got hit in my testing when either an AT was active or the above-mentioned option was explicitly enabled, not otherwise when starting or using LO. [1] https://learn.microsoft.com/en-us/windows/win32/winauto/screen-reader-parameter [2] https://learn.microsoft.com/en-us/windows/win32/winauto/wm-getobject [3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp?id=e9662a4b665144a5eca418925d331024ec71fa2c#n40 [4] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-implementinglegacyiaccessible Change-Id: Iddafb149b50771412ba59972d0401bada6a9f680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175172 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-19vcl: Use OUString literals in SalGetDesktopEnvironmentMichael Weghorn
Change-Id: Ibd28148772fcdc64a9fe6ebca38706c0445d38fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175139 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-18tdf#163215: Enable kashida justification for AAT fontsJonathan Clark
Currently, we use HarfBuzz-provided kashida insertion position information to decide on positions to insert kashida. This data is used both while ranking kashida insertion positions, and to avoid inserting kashida in positions that would break shaping on a per-font basis. Unfortunately, HarfBuzz cannot validate kashida insertion positions for AAT fonts. As a result, kashida were previously not inserted for text using AAT fonts. This change updates kashida justification to skip validation against HarfBuzz when AAT fonts are used. Change-Id: If0d31512b1db0f1f8155963f9b1031eb01bacc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175165 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-10-18vcl: Drop indirection via lcl_get_desktop_environmentMichael Weghorn
`lcl_get_desktop_environment` just calls `get_desktop_environment` and returns the result. Switch callers to use `get_desktop_environment` right away and drop `lcl_get_desktop_environment`. Change-Id: If18690a31c8b09631b3a1181e5eac3aad72a0037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175138 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-18tdf#163486: PVS: check GetMenu()Xisco Fauli
V595 The 'GetMenu()' pointer was utilized before it was verified against nullptr. Check lines: 1582, 1612. Change-Id: I085320d3a5467e4e2c158bf2683b3156cb103e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175125 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-18tdf#163486: PVS: recurring checkXisco Fauli
V571 Recurring check. The 'pData' condition was already verified in line 795. Change-Id: I0aebea88938a2e23bb1eb7c9f4e836b013f5664e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175124 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-16tdf#163381 XBitmap.getMaskDIB() is invertedNoel Grandin
regression from the transparency->alpha work Change-Id: I2aaf8262191ca6136f87c59629e95bd9a7e7e419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174991 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-16loplugin:unusedmethodsNoel Grandin
Change-Id: I6ba4b4046190b701d4a15c6fa90b6009ecf4ab1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-16jsdialog: support textWithIconEnabled into Dump icon viewJaviya Vivekkumar Dineshbhai
Change-Id: Ib005da05fe500aae5729095533aab05578e567d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171679 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-10-16tdf#100894 speed up style tree creationNoel Grandin
by using bulk_insert_for_each() more aggressively. Reduces the open time from several minutes to 18s on my machine. I had to pass down a flag, because the gtk and the gen weld backends work differently, and the gen backend absolutely has to know up front if the inserter function is going to call set_text, otherwise it asserts in SvTreeListBox::SetEntryText Change-Id: I84750888c0a80f4041cfe024e6570dd94f6d09db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-13vcl: add font effects to mtf dumpThorsten Behrens
Change-Id: Ieb9a5b2e09e5d1d3c7c481b4eeb42e15fa2996d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174871 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-10-12tdf#130857 VclBuilder: Move internal child visible logic to baseMichael Weghorn
Move the special handling for internal children in .ui files from VclBuilder to the base class and set the "visible" property to true for them, instead of directly calling vcl::Window::Show. This allows to have this special logic that internal children are visible by default, even if the "visible" property is not explicitly set in one place, and thus reuse it for QtBuilder as well. Change-Id: Ic7a932556e02f47ee6007b5167f82bef152e1ef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174833 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-12tdf#130857 VclBuilder: Make extractVisible a static helperMichael Weghorn
... in the base class BuilderBase, in order to reuse it in QtBuilder in an upcoming commit. Change-Id: I61e73f98be9e4f0e0fd15f92d6d16c4e6e617c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174832 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-09vcl: Use fabs() for double argumentRico Tzschichholz
Change-Id: I959786e42dc576cb72411bacccf1b9bd32fbe21d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173626 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-08PDFDocument::ReadWithPossibleFixup: clear before reading fixupJustin Luth
Ensure that a read of the pdfdocument does not use info from failed previous reads. The result in the problematic documents was that GetCatalog failed because it was looking for an m_aTrailerOffset[0] from the failed read, and thus only empty pages were exported. I failed to create a clean-room document, and the single existing unit test that needs a fixup has the trailer at the same GetPosition, which replaced the m_aTrailerOffset instead of creating a second entry. Change-Id: I470b922323a2b2ebb6d4bbaa58c98f5cc492b750 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174652 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-10-08avoid PDF export crash when ReadWithPossibleFixup falls back to PdfiumJustin Luth
Unfortunately, I failed to create a clean-room example, even when I pasted some binary garbage at the end of the file. Somehow I was getting a sanitized version from getAsStream. In any case, this prevents crashing with the two examples I have, although there are still significant problems somewhere because the export just results in empty pages... The problem is that reading again with the Pdfium-fixed version gets mixed in with the original read results, and things get pretty garbled. Probably m_rElements and everything needs to be cleared before tokenizing the fixup-version. Change-Id: I01daefa23b8f92e2849d71bca269ba2b476199da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174648 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-10-07vcl: use correct var prefixes in BitmapScaleConvolutionFilterChris Sherlock
Change-Id: Idca191a21ef63a707d9c5230dad8c97552757c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173206 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-06cid#1608598 silence Overflowed constantCaolán McNamara
and cid#1607946 Overflowed constant cid#1608526 Overflowed integer argument cid#1608611 Overflowed integer argument Change-Id: Iec21df2f3d7dc8fba3872c6a70466ae12026a49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174557 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-05cid#1607727 silence Overflowed constantCaolán McNamara
Change-Id: I0bbd29231158379c9c7986033ce052b7f149ddc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174536 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-05cid#1620556: UNINIT_CTOR in textviewJulien Nabet
Change-Id: I0e13c8c189211a97161c1eef5a0ad12e48817564 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174533 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-10-05tdf#130857 VclBuilder: Extract setMnemonicWidget helper + call from baseMichael Weghorn
Instead of iterating over the map of mnemonic widgets in the VclBuilder ctor, split the logic: Add a new purely virtual WidgetBuilder::setMnemonicWidget method to the base class that passes the IDs of a single pair of label + the corresponding mnemonic widget as params, and let WidgetBuilder::processUIFile call the method once for every pair in the map. Implement that for VclBuilder (by moving the remaining logic for that previously in the ctor) to the new override VclBuilder::setMnemonicWidget and add a dummy implementation for QtBuilder that only triggers a warning for now. Change-Id: I32c922f91e5e1d06c003e6d26a4342cbb98942e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174509 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 VclBuilder: Move mnemonic-widget bookkeeping to base classMichael Weghorn
Move the `m_aMnemonicWidgetMaps` member and related struct and typedef from VclBuilder's `m_pVclParserState` to the base class BuilderBase's `m_pParserState` and also move the VclBuilder::extractMnemonicWidget method to the base class, so the logic can later be reused by QtBuilder. Add a new getter BuilderBase::getMnemonicWidgetMaps to get access and use that in VclBuilder instead. At least for now, VclBuilder::extractMnemonicWidget still explicitly needs to be called by VclBuilder (and other subclasses) when encountering a "GtkLabel" object for the mnemonic widget relationship to be added to the map in the base class. Change-Id: I878eec7be5e82fac3e1b944d7fed7bf6711744ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174508 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-04vcl: Merge ImpTextView into TextViewMichael Weghorn
The only thing that ImpTextView had were the class members, and then all access to these was done from TextView using `mpImpl->`. Move the class members from ImpTextView directly into TextView and drop ImpTextView. Change-Id: I9fd6ebbdc497b87e2440d3d6a810b7c24488430b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174461 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-04tdf#163225 vcl: Erase listbox bg when redrawing on mouse moveMichael Weghorn
Somehow, moving the listbox invalidation code from ImplWin::PreNotify to ListBox::PreNotify in commit fd7cb42f7d17d03e4fac6d8c5f1d6c7c49a36fc6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Feb 14 16:16:30 2023 +0100 tdf#153520 vcl: Align listbox invalidation with mouseover check triggered rendering artifacts for the tdf#163225 listbox example. It seems that the previous rendering operation apparently seems a pixel or so off from the current one and as the InvalidateFlags::NoErase flag gets passed, what was drawn previously is not erased. Don't pass that flag any more to ensure that the background is properly erased, which fixes the rendering artifacts. The flag's docmentation says: /** The invalidated area is painted with the background color/pattern. */ NoErase = 0x0004, Dropping the flag doesn't negatively affect drawing a listbox that has an explicit background color set in my tests, s. modified sample document attachment 196871 in tdf#163225 . Stop passing that flag in ListBox::StateChanged, too. Change-Id: Ibcacbed01888449db062f84b4782feb9de69851c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174438 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-03Revert "tdf#163213: do not show OpenType features if the font has "morx" table"Julien Nabet
Reason: regression See https://bugs.documentfoundation.org/show_bug.cgi?id=163213#c14 This reverts commit 0679a5cee16ae96c0d11e7d4fc1e59fb0f9cc591. Change-Id: Ib1392e2ad44577f69e6197bad8ae79791f072086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174435 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-03cid#1608220 Data race conditionNoel Grandin
Change-Id: I7ff30128d663ca3524dc95ef99ef8c64dd158643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174429 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-03cid#1606585 Data race conditionNoel Grandin
and cid#1606993 Data race condition Change-Id: I291829f0b59fc228ad3f305f280f7f58aae0d40b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174428 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-03tdf#163047 sc: fix more pages on a single sheet printing functionTibor Nagy
issue caused by commit I5e494a0714e398221bee00744d7e25c419a41df7 "tdf#155218 sc: fix different page orientation in print dialog". Change-Id: I0b6f645dc77af83b132a415570e5dfca4a5abddf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174404 Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de> Tested-by: Jenkins
2024-10-01tdf#160202 - Don't extend selection over two wordsAndreas Heinisch
Don't extend the selection over two separate string in the BASIC editor. Probably, the BreakIteratorImpl::nextWord needs to be corrected which could lead to unwanted side effects. Change-Id: I0e980006cca672fb63216dc860c12a7004bfd759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173900 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Jenkins
2024-10-01loplugin:constantparamNoel Grandin
Change-Id: I81c9647ec7166ba429f6f58e3bd86b3a5ee4848f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01loplugin:singlevalfieldsNoel Grandin
Change-Id: I8f844c40dcb48737d95a3004cd7e8c730656d955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174299 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01loplugin:unusedmethodsNoel Grandin
Change-Id: I121a0e1323df7b6669f496ad63d771df8f76b429 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174297 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-30tdf#163213: do not show OpenType features if the font has "morx" tableJulien Nabet
Change-Id: I589419f7ffe3db01848e711021c2efd1de07692b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174294 Reviewed-by: خالد حسني <khaled@libreoffice.org> Tested-by: Jenkins