V1037 Two or more case-branches perform the same actions. Check lines: 92, 96
Change-Id: Ibf8ca692e5d7208d99280c14190bda35a0fd7022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175231
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1048 The 'bDifferentParents' variable was assigned the same value. See lines 478 and 539
Change-Id: Ieb29f0a089bedc3e52056f2b24284298b097fbc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175202
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
V1048 The 'bDec' variable was assigned the same value. Lines 1787 and 1799.
Change-Id: Ia2acce92ee597d9ca801785e8c512d7351ead669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175160
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
V1048 The 'bDeleteMark' variable was assigned the same value. See lines 983 and 1001.
Change-Id: I004d5fa043404a945498182d0a366c1e05158435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175201
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
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:⭐:awt::XWindow2,com::sun:⭐:awt::XVclWindowPeer,com::sun:⭐:awt::XLayoutConstrains,com::sun:⭐:awt::XView,com::sun:⭐:awt::XDockableWindow,com::sun:⭐:accessibility::XAccessible,com::sun:⭐:lang::XEventListener,com::sun:⭐🫘:XPropertySetInfo,com::sun:⭐:awt::XStyleSettingsSupplier>::~ImplInheritanceHelper<VCLXDevice,com::sun:⭐:awt::XWindow2,com::sun:⭐:awt::XVclWindowPeer,com::sun:⭐:awt::XLayoutConstrains,com::sun:⭐:awt::XView,com::sun:⭐:awt::XDockableWindow,com::sun:⭐:accessibility::XAccessible,com::sun:⭐:lang::XEventListener,com::sun:⭐🫘:XPropertySetInfo,com::sun:⭐:awt::XStyleSettingsSupplier>() Line 155
tklo.dll!VCLXWindow::~VCLXWindow() Line 336
tklo.dll!cppu::ImplInheritanceHelper<VCLXWindow,com::sun:⭐:awt::XVclContainer,com::sun:⭐:awt::XVclContainerPeer>::~ImplInheritanceHelper<VCLXWindow,com::sun:⭐:awt::XVclContainer,com::sun:⭐:awt::XVclContainerPeer>() Line 155
tklo.dll!VCLXContainer::~VCLXContainer() Line 42
tklo.dll!cppu::ImplInheritanceHelper<VCLXContainer,com::sun:⭐:awt::XTopWindow3,com::sun:⭐:awt::XSystemDependentWindowPeer>::~ImplInheritanceHelper<VCLXContainer,com::sun:⭐:awt::XTopWindow3,com::sun:⭐: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:⭐:awt::XDevice,com::sun:⭐:awt::XUnitConversion>::release() Line 115
tklo.dll!cppu::ImplInheritanceHelper<VCLXDevice,com::sun:⭐:awt::XWindow2,com::sun:⭐:awt::XVclWindowPeer,com::sun:⭐:awt::XLayoutConstrains,com::sun:⭐:awt::XView,com::sun:⭐:awt::XDockableWindow,com::sun:⭐:accessibility::XAccessible,com::sun:⭐:lang::XEventListener,com::sun:⭐🫘:XPropertySetInfo,com::sun:⭐:awt::XStyleSettingsSupplier>::release() Line 171
tklo.dll!cppu::ImplInheritanceHelper<VCLXWindow,com::sun:⭐:awt::XVclContainer,com::sun:⭐:awt::XVclContainerPeer>::release() Line 171
tklo.dll!cppu::ImplInheritanceHelper<VCLXContainer,com::sun:⭐:awt::XTopWindow3,com::sun:⭐:awt::XSystemDependentWindowPeer>::release() Line 171
winaccessibility.dll!com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessible>::set(com::sun:⭐:accessibility::XAccessible * pInterface) Line 247
winaccessibility.dll!com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessible>::operator=(com::sun:⭐:accessibility::XAccessible * pInterface) Line 351
winaccessibility.dll!AccObject::~AccObject() Line 283
winaccessibility.dll!std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>::~pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>()
winaccessibility.dll!std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>::`scalar deleting destructor'(unsigned int)
winaccessibility.dll!std::destroy_at<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>>(std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject> * const _Location) Line 306
winaccessibility.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>>>::destroy<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>>(std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>> & __formal, std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject> * const _Ptr) Line 707
winaccessibility.dll!std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>> & _Al, std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *> * _Ptr) Line 382
winaccessibility.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>>>::_Erase_tree<std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *>> & _Al, std::_Tree_node<std::pair<com::sun:⭐:accessibility::XAccessible * const,AccObject>,void *> * _Rootnode) Line 760
winaccessibility.dll!std::_Tree<std::_Tmap_traits<com::sun:⭐:accessibility::XAccessible *,AccObject,std::less<com::sun:⭐:accessibility::XAccessible *>,std::allocator<std::pair<com::sun:⭐: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:⭐: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:⭐:accessibility::XMSAAService,com::sun:⭐:lang::XServiceInfo>::release() Line 115
vcllo.dll!com::sun:⭐:uno::Reference<com::sun:⭐:lang::XComponent>::~Reference<com::sun:⭐: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
05d2a41565 (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
Switch from linear search to a fast lookup.
Change-Id: Ie10435895c9a096fe0ae4bdda0a1a1eecf3c1bc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154284
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Change-Id: I01aae9395213eb09c8bea990b2b6a811f7ab2ee2
V1037: Two or more case-branches perform the same actions. Check lines: 1249, 1277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175150
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Change-Id: If000f1e0bb01c6d551ef970edae8058e8020a202
V1037: Two or more case-branches perform the same actions. Check lines: 917, 945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175152
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Starting in LO 24.2, we started displaying imported XLS/X files
that had contents-with-newlines on a single line
if the cell did not have the wrap-text property - just like buggy Excel.
So, now we need to round-trip that without setting wrap-text,
so that we can continue to exhibit buggy behaviour
(instead of fixing the document so that the newlines aren't ignored).
A previous attempt to do this was reverted (for many reasons),
significantly because it failed to handle the situation
where a user entered new newline content (without forcing wrap-text).
So in LO the new content DISPLAYS on multiple lines,
but after a round-trip it was all squashed together.
So it is important to keep the traditional behaviour of forcing wrap-text,
and ONLY avoiding it when round-tripping imported content.
It also preserves ODS -> XLS/X conversions.
I also took the opportunity to rename mbWrapped.
make CppunitTest_sc_subsequent_export_test3 \
CPPUNIT_TEST_NAME=testPreserveTextWhitespace2XLSX
Change-Id: Ia35b0679946b51626fabd4043779c1b43cc1ae37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174436
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Before implementing text effects from the TextFill tag, their values
must be directly saved in ComplexColor, without saving in GrabBag.
To achieve this, DomainMapper has introduced separate processing
of the LN_textFill_textFill tag using the new TextFillHandler class.
TextFillHandler inherits from TextEffectsHandler. As a parameter in
the constructor, it receives a reference to the ComplexColor to which
changes will be added. This is done because some text effects
(ThemeTint, ThemeShade) can be specified in the <color> tag, so
TextFill must complement existing transformations. For the same
reason, when processing LN_EG_RPrBase_color, the ComplexColor
value is taken from the context if it was placed there previously.
In docx export, existing "Tint" and "Shade" transformations are
preserved only in <color ThemeTint=...> and <color ThemeShade=...>.
Because the Tint and Shade values from TextFill must be
distinguished from the values from color during export, the "Tint"
and "Shade" transforms have been renamed to "ThemeTint" and
"ThemeShade". Also added new "Tint" and "Shade" transformations,
which are currently only saved in TextFill.
Change-Id: I0ebba53eba83ccfc99fa812e60d6cebb2ff6bf0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157979
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
When creating an export graphic,
the view options are changed to hide hidden stuff,
not show the formatting marks etc.
However, the user's view settings were not being restored
after the export was done.
Change-Id: I3e236e5ef47eddca487621c92ec639f7bac073de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175185
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This simplifies the process; in D2DWriteTextOutRenderer ctor, it
uses the final mode for the call to CreateRenderTarget, applying
the correct mode.
Also, pass the AA flag from SalGraphics, and check the setting of
GetUseFontAAFromSystem to use it, as done in e.g. CairoTextRender
after commit e6538f5bdd (tdf#118966
vcl: add a flag to determine if AA of fonts is used from the system,
2018-07-28).
This fixes the failures on Windows with --disable-skia, as seen in
https://lists.freedesktop.org/archives/libreoffice/2024-October/092541.html
VclCjkTextTest::testVerticalText needed to be fixed by a tweak in
getCharacterRightSideHeight, to use color's IsDark, instead of
comparing to the fixed black, because the correct AA mode that is
used now, makes the vertical part of the character not completely
black.
Change-Id: Iee8fe98e29a80a242f8e761c9a23c68b34a45699
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175188
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
... as a tool that can be useful for analysis/debugging.
Change-Id: I310b04abfd3cacd403e2cfafc67f2471fa673c22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175173
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Add the .ui file used e.g. for the "Rename Sheet" dialog
in Calc to the list of .ui files supported by QtInstanceBuilder.
This means that a dialog using native Qt widgets gets
used by the qt5/qt6 VCL plugins now when e.g. starting
Calc, right-clicking the the tab for the current sheet at
the bottom and selecting the "Rename Sheet" menu entry.
Change-Id: Ie656e55cb2701596f6c6f1f7d395934eedf710fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175183
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
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>
V595 The 'mpViewShell' pointer was utilized before it was verified against nullptr. Check lines: 368, 380.
Change-Id: I5e8d53d3503ade1814d7436e89f0f407f1d9ccfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175164
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Change-Id: Ibe65f4eca6009e8be4355974cdf33b5cabbe03e5
V1037: Two or more case-branches perform the same actions. Check lines: 54, 60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175144
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V570 The same value is assigned twice to the 'pEntry' variable.
Change-Id: I2c6a106f910a915065cdb3bc56a69e3873c3f3e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175163
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Set the "use-underline" property for the buttons in the
"Restart %PRODUCTNAME" dialog and specify the accelerators.
This way, the dialog can easily be closed using Alt+[accelerator]
with the gtk3 and qt5/qt6 VCL plugin as well.
Use those characters that the VCL logic was using as well.
(The VCL implementation seems to have some way to auto-generate
mnemonic characters if none is set automatically.)
This dialog is e.g. seen when toggling experimental mode in
"Tools" -> "Options" and closing the options dialog with the
"OK" button.
Change-Id: I50c3402fb89d5fbfc0e610c0e41f5f035cf0b0e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175137
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add the .ui file of the "Restart %PRODUCTNAME"
dialog to the list of .ui files suported by
QtInstanceBuilder.
This means that a dialog using native Qt widgets gets
used by the qt5/qt6 VCL plugins now when e.g. toggling
experimental mode in "Tools" -> "Options" and closing the
options dialog with the "OK" button.
Change-Id: I617bcb4d0815aeae8a30d7765ff7b4c0cc6992e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175136
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Don't call `qtResponseTypeToVclResponseType` to convert
an alleged Qt response code to a VCL one in
QtInstanceDialog::run.
In fact, the return code is already the VCL one, see
commit 08b55df5c9
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Sep 28 00:32:15 2024 +0200
tdf#130857 qt weld: Close dialog on button click
QDialog::Accepted and VCL's RET_OK both happen to be 1,
so that mapping didn't have any effect, but everything
else would be mapped to `RET_CANCEL` unconditionally.
This wasn't a problem so far, most likely because the few
non-message dialogs using native Qt widgets didn't use
the response codes yet.
For example, for the "Help" -> "License Information"
dialog, only `RET_OK` is explicitly handled in
`LicenseDialog::run` (sfx2/source/appl/appserv.cxx).
Change-Id: If0a7cbf291ad94b21d6bbeecb9793b4afaa2c76d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175135
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Move the QtInstanceMessageDialog::response
implementation down into the base class
QtInstanceDialog and simplify a bit, and drop
the override in QtInstanceMessageDialog.
This will be needed e.g. by the
svtools/uiconfig/ui/restartdialog.ui
dialog shown when toggling experimental mode in
"Tools" -> "Options" and closing the dialog with
the "OK" button.
Change-Id: I147ea68554725a9d3b6bea6f77b15e7754cc962b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175132
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
`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>
The old implementation used a UB (signed integer overflow).
Change-Id: I1d8222b261f0db49c48b38defa2b58bc4770aae4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175143
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V728 An excessive check can be simplified. The '||' operator is surrounded by opposite expressions '!p3DProperties' and 'p3DProperties'.
Change-Id: Iab3da21332f50a7414edff7283659106aa8d22e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175134
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V668 There is no sense in testing the 'xExtra' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
Change-Id: I1e0d02621808b7eda104d06afe8882f72da6d87f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175131
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V668 There is no sense in testing the 'xExtra' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
Change-Id: Ie851b98f15eac9e7d8118fb919438fbd389cfbf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175130
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
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
'clipToStrokePath' is a variant of 'clip' it sets up a clip
to a path that's been stroked with whatever width the current
pen is. Now that we have all the rest of the code in, we can
start using it.
This fixes the white blobs on page 3 of tdf#148526 which
are clipped radial fills. It has a separate problem with
text corruption which this doesn't fix.
It also fixes the geometry of the top left square in:
https://gitlab.freedesktop.org/poppler/poppler/-/issues/178
(although it still has colour problems with that test case)
Change-Id: Ibe2c56927b45d44e90cfa2934fc905034a50e9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172927
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins