summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2024-11-04pdf: move encryption methods into PDFEncryptor filesTomaž Vajngerl
Moving more PDF encryption implementation into common encryption files. This will make it easier to add new encryption later on as the code will be in one place. Change-Id: Id40c2f876a2e92bb8db27024a0e251befc5059e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176030 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: move EncHashTransporter into own filesTomaž Vajngerl
Also rename to EncryptionHashTransporter. Change-Id: I20f984af4428e1182c77dbce4343d69c106063a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176029 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: move some encryption code into PDFEncryptor classTomaž Vajngerl
Refactored the code to make encryption easier to change. Change-Id: I24b831781d4acd6329838dbf2468e9df6efad41e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176028 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: Don't emit metadata for /Info, allow XMP for PDF >= 1.4Tomaž Vajngerl
Metadata written to /Info dictionary is deprecated in PDF 2.0 with the exception of /CreateDate and /ModDate, so don't write it if we are writing to PDF 2.0. Instead of this allow to write the XMP metadata all the way back to PDF 1.4 (when it was added to the specs). Change-Id: I33e29d7d52e96d34e973032d7d8b42d876282dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176026 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04pdf: add m_nPDFA_Version to simplify PDF/A versionsTomaž Vajngerl
We have a bool for each PDFA version, which is inflexible when checking if the feature is supported in a range of versions so this adds a version number which simplifies checks a bit. Change-Id: If162e305766baa61278872297c9ab1eb41cb57d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176025 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04pdf: move encrypt code into emitEncrypt, add PDFStructureWriterTomaž Vajngerl
Move the encryption code into emitEncrypt and rewrite that with the newly introduced PDFStructureWriter, which is now responsible to write the PDF basic structure elements into a string buffer. The PDFStructureWriter will be extended with new features when there is demand. Change-Id: I4f4099886860b72b4f1866b19a8afb7cc8fb4ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176024 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: initial PDF 2.0 and PDF/A-4 supportTomaž Vajngerl
Added PDF 2.0 and PDF/A-4 version to enums. Write the PDF 2.0 support for the file headers. Add the identical considitons as for the PDF/A-4 as they were for PDF/A-3. Change-Id: Iccf5afbf09c4cd0cd1ae7122c860e8cbefe3a6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176023 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04Add experimental support for Emscripten JSPIStephan Bergmann
...which I've seen fundamentally working when building with recent emsdk against recent Qt6 trunk (and including <https://github.com/qt/qtbase/pull/108> "Update the check for WebAssembly JSPI support") and running on recent Chrome (with JSPI enabled under <chrome://flags/>) Change-Id: I98c11c5ee7e95b135ddc33c95c95752055ecd4c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176031 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-04new loplugin:staticconstexprNoel Grandin
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04Simplify a bitMike Kaganski
Change-Id: I5c6110cc26e8fb20066374dc235677f07e79ce1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175977 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-03tdf#145538: Use range based for loopsMelvinYG
Change-Id: I1865d2fab8d29bfbc81b10a9497b47c5c94f1af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175186 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
2024-11-03Related: tdf#163730 Avoid potential deadlockMike Kaganski
Similar to commit 43e5118496ae0c9b8f81a54574874eda7d439dbb (Related: tdf#163730 Avoid deadlock, 2024-11-03). I haven't seen this scenario myself, but seems likely to be possible. Change-Id: Ie6bb69e7ebe12a69e4dabee9103de32611235807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175971 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-02Related: tdf#163730 Avoid deadlockMike Kaganski
Seen locally, with main thread querying clipboard state: vclplug_winlo.dll!std::unique_lock<std::mutex>::unique_lock<std::mutex>(std::mutex & _Mtx) Line 145 vclplug_winlo.dll!CWinClipboard::getContents() Line 109 vcllo.dll!TransferableDataHelper::CreateFromClipboard(const com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> & rClipboard) Line 2162 vcllo.dll!TransferableDataHelper::CreateFromSystemClipboard(vcl::Window * pWindow) Line 2188 swlo.dll!SwBaseShell::StateClpbrd(SfxItemSet & rSet) Line 602 swlo.dll!SfxStubSwBaseShellStateClpbrd(SfxShell * pShell, SfxItemSet & rSet) Line 2220 sfxlo.dll!SfxDispatcher::FillState_(const SfxSlotServer & rSvr, SfxItemSet & rState, const SfxSlot * pRealSlot) Line 1726 sfxlo.dll!SfxBindings::Update_Impl(SfxStateCache & rCache) Line 267 sfxlo.dll!SfxBindings::NextJob_Impl(const Timer * pTimer) Line 1280 sfxlo.dll!SfxBindings::NextJob(Timer * pTimer) Line 1225 sfxlo.dll!SfxBindings::LinkStubNextJob(void * instance, Timer * data) Line 1220 vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 111 vcllo.dll!Timer::Invoke() Line 75 vcllo.dll!Scheduler::CallbackTaskScheduling() Line 509 vcllo.dll!SalTimer::CallCallback() Line 53 vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 169 vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 525 vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581 vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 385 vcllo.dll!Application::Yield() Line 473 vcCMtaOleClipboard::runllo.dll!Application::Execute() Line 361 sofficeapp.dll!desktop::Desktop::Main() Line 1679 CMtaOleClipboard::clipboardChangeNotifier thread holding CWinClipboard's mutex in handleClipboardContentChanged, and waiting for the destruction of IDataObject released from m_foreignContent (which was redirected to CMtaOleClipboard::run thread): vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release(IDataObject * ptr) Line 235 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 163 vclplug_winlo.dll!CAPNDataObject::~CAPNDataObject() Line 97 vclplug_winlo.dll!CAPNDataObject::`scalar deleting destructor'(unsigned int) vclplug_winlo.dll!CAPNDataObject::Release() Line 137 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release(IDataObject * ptr) Line 235 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 163 vclplug_winlo.dll!CDOTransferable::~CDOTransferable() vclplug_winlo.dll!CDOTransferable::`scalar deleting destructor'(unsigned int) cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 230 vclplug_winlo.dll!cppu::WeakImplHelper<com::sun::star::datatransfer::XTransferable>::release() Line 115 vclplug_winlo.dll!com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable>::clear() Line 234 vclplug_winlo.dll!CWinClipboard::handleClipboardContentChanged() Line 291 vclplug_winlo.dll!CWinClipboard::onClipboardContentChanged() Line 385 vclplug_winlo.dll!CMtaOleClipboard::clipboardChangedNotifierThreadProc(void * pParam) Line 721 and CMtaOleClipboard::run thread waiting for CWinClipboard's mutex in CWinClipboard::onReleaseDataObject: vclplug_winlo.dll!std::_Mutex_base::lock() Line 52 vclplug_winlo.dll!std::unique_lock<std::mutex>::unique_lock<std::mutex>(std::mutex & _Mtx) Line 145 vclplug_winlo.dll!CWinClipboard::onReleaseDataObject(CXNotifyingDataObject & theCaller) Line 362 vclplug_winlo.dll!CXNotifyingDataObject::Release() Line 75 ole32.dll!CClipDataObject::Release() Line 960 combase.dll!... rpcrt4.dll!Invoke() rpcrt4.dll!Ndr64StubWorker(void *,void *,struct _RPC_MESSAGE *,struct _MIDL_SERVER_INFO_ *,long (*const *)(void),struct _MIDL_SYNTAX_INFO *,unsigned long *) rpcrt4.dll!NdrStubCall3() combase.dll!... user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int) user32.dll!DispatchMessageWorker() vclplug_winlo.dll!CMtaOleClipboard::run() Line 655 vclplug_winlo.dll!CMtaOleClipboard::oleThreadProc(void * pParam) Line 673 Caused by changes in commit 2e0664015255ffc0f76a11a9cb254564b34de496 (tdf#148647: make sure to update own content on Win clipboard change, 2024-07-14). Change-Id: I26d35726f3d3f650a2db2ac63709ed820a60fc4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175956 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-02tdf#36709 Add loext:text-indent supporting font-relative unitsJonathan Clark
This change adds an ODF font-relative first-line indent paragraph style attribute as a LibreOffice extension. The corresponding ODF standard change is tracked by OFFICE-4165. This change only implements what is minimally necessary to serialize, deserialize, and check for ODF files containing this attribute. Further changes are necessary. * Added cssLength to schema, which is equivalent to length but also allows ic and em as units. * Added loext:text-indent to schema as a paragraph style attribute. This attribute is equivalent to fo:text-indent, but accepts cssLength instead of length. * Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts only the font-relative measures and forces fallback in other cases. * Added loext:text-indent to the ODF parser. This attribute accepts font-relative metrics, and will behave as an import-only alias for fo:text-indent in other cases. * Updated SvxFirstLineIndentItem to handle unit-denominated measures. * Added proof-of-concept indentation handler to Writer. This implementation is incomplete and temporary, and will be revised in future changes. Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-01tdf#130857 qt weld: Actually set link button URI as URIMichael Weghorn
Fix copy paste error: Take the value for the "uri" property whose existence was just checked, not the "label" one again as a few lines above. Change-Id: I1bf1251c14ba9dbda2b2f4ea73d35b612f4d0bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175888 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-01Drop GraphicFilter's bUseConfigMike Kaganski
It controlled how the FilterConfigCache initialized, and also how the unused aFilterPath was initialized. The FilterConfigCache is reused, when there are other instances of GraphicFilter - so that means, that the "bUseConfig" flag doesn't necessarily mean that the initialization will happen as intended: the existing instance could have been initialized using the other value. Avoid this indeterministic behavior, and always use the config, except in fuzzing. The VCL tests, that could possibly once depend on that, now use config, so this is not an issue - and that means testing the same thing as used in the working code, not something different. Change-Id: I6555dc47328b362e020138cf454f5ede7f39d063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-01Merge ImplInit into ctorMike Kaganski
Change-Id: I41ef9a3660cbb897074ec2bb2f234706d8b68de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175893 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-01tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 7998, 8001 Change-Id: I9ecb950ff3201265678816e42f1e7976112b7557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175305 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-31tdf#163486: PVS: Initial and final values of the iterator are the sameXisco Fauli
Since commit 4a4602ad7513262a6c0423f17b42791a852b7e23 Author: Michael Meeks <michael.meeks@collabora.com> Date: Fri Mar 10 10:36:22 2023 +0000 lok: add trimMemory capability, and expand dumpState to caches V625 Consider inspecting the 'for' operator. Initial and final values of the iterator are the same. Change-Id: I9ddd2593ace4234f720a6561b0dcbd85dbc18ef2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175880 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-10-31cid#1607569 silence Overflowed return valueCaolán McNamara
and cid#1607406 Overflowed return value Change-Id: Ia7917f9046382c25232415b7eb1de3b60071957a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175838 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-31tdf#163457 CairoSDPR: Need to apply 'damage' to gtkArmin Le Grand (allotropia)
If a CairoSDPR does directly render to a Window the changes do not get reliably visualized due to the Cairo backend and gtk/QT usage being dependent of being told what 'damage' is done to refresh the window accordingly. The VCLCairoBackend is doing that, but without reach from the outside. Note that this is a rare case, in fact the 1st one discovered where a CairoSDPR is painting to a Window directly, see comments in the task. Even this occasion should not do that - showing the Comments in Calc on the Overlay would be major to just painting to the Window roughly. There are other possible workarounds (also see comments in the task), but just adding to be able to set the needed 'damage' in case target is a Window is simplest and potentially the fastest way to do this. Since usage of CairoSDPR is bound to use GetSystemGfxData anyways it is okay to react there and call a method ApplyFullDamage that exists on Graphics when the flag USE_HEADLESS_CODE is active. That forwards to the CairoCommon being responsible for that Window and does the minimal necessary to apply 'damage' to the full Window. This is done when constructing the CairoSDPR, thus from the timing that incarnation can then paint anything and it seems that at the next occasion something can handle the callback from gtk all is painted. If that should change it may get necessary to separate the usage of ApplyFullDamage from GetSystemGfxData, but works as intended for now. Change-Id: I5442f3413e43418954da29a18d66dea27e25e655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175794 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-10-31convert KernArray from sal_Int32 to doubleNoel Grandin
which allows us to eliminate a bunch of rounding at various layers, and consequently maintain a lot more precision Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31Fix typoAndrea Gelmini
Change-Id: If3d4810cb2a5770b5432c398a3785d8bdcf19ff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175829 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-30tdf#163582: Fix scrolling distance increasing geometrically.Marc Mondesir
New scroll distance was previous distance multiplied by speed factor, but distance was not reset to base values when mouse not moved (or outside app window on some platforms), resulting in continuous multiply amplification. Break out base scroll values to separate variables to prevent multiply feedback. Add comments to help future code maintenance. Change-Id: If11baff3b25521abce7436b44aaf8e6a19e54f45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175657 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-10-30tdf#163684 gtk3 a11y: Don't use combobox role twice for non-editable oneMichael Weghorn
Since commit 9f078ed7b625e86182d64d5ccfbb410cdd38081c Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue May 7 10:04:16 2024 +0200 tdf#160971 gtk3 a11y: Set role for custom editable combobox Set the combobox a11y role for the box in the .ui file used for the custom gtk3 combobox implementation. With this in place, moving focus to the "Font Name" or another editable combobox in the Writer toolbar now makes Orca announce that one as "editable combobox" rather than just "text". , the combobox a11y role is set for the GtkBox of the custom combobox implementation used for gtk3. That box contains the edit (for editable comboboxes) and the button. While this is needed for editable comboboxes for AT to identify this as a combobox when the edit receives focus (by the fact that the edit's parent has a combobox role), this resulted in Orca no longer announcing the combobox role when the button receives focus for non-editable comboboxes. While the button also has the combobox role, Orca has logic to not announce the role of combobox children. (`SpeechGenerator._should_speak_role` returns `false` for that case [1].) To avoid this problem and make announcement for both, editable and non-editable comboboxes work as expected, no longer set a combobox role for the box in the .ui file, but set it only for the editable combobox in the C++ code. [1] https://gitlab.gnome.org/GNOME/orca/-/blob/78e44c625ef5fb082907ca484230458624d24ee8/src/orca/speech_generator.py#L365-366 Change-Id: Ia3ff00688f47e61d5a98c79f1a256061b2fb18a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175823 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30Missing test dependencyStephan Bergmann
Change-Id: I574ae3404ce4a9ad75176f2e2066563da60136ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175809 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-10-30tdf#130857 qt weld: Implement QtInstanceComboBox::set_entry_completionMichael Weghorn
Set a corresponding QCompleter [1] using QComboBox::setCompleter [2]. [1] https://doc.qt.io/qt-6/qcompleter.html [2] https://doc.qt.io/qt-6/qcombobox.html#setCompleter Change-Id: I89cdd8bee676c8a208ffe944ca84225210e842a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175819 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30tdf#130857 qt weld: Declare support for print progress dialogMichael Weghorn
Add .ui file for the print progress dialog that gets shown when starting a print job from the print dialog (Ctrl+P) to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: I4bfdd34fcdb6d5844e04d99235fbf3ad5ef9f66c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175817 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30tdf#130857 qt weld: Add a QtInstanceProgressBarMichael Weghorn
Add a new QtInstanceProgressBar class that is the weld::ProgressBar implementation using a native Qt widget. The widget used is a QProgressBar. This will be used e.g. by the print progress dialog, for which support will be declared in an upcoming commit. Change-Id: Ic4b162014cd3a09801096cebd38dbdc923f5dbfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175816 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30no need to use std::unique_ptr in GetPartialTextArrayNoel Grandin
Change-Id: I3c60f69d1693721a620faef4e1cda2f479c1bfda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175801 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-30tdf#130857 qt weld: Declare support for "Enter Safe Mode" dialogMichael Weghorn
Add .ui file for the "Help" -> "Restart In Safe Mode" dialog that asks whether to really restart in safe mode to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: Idec1c2dedd057aa2322453471c55022442941f7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175807 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30tdf#130857 qt weld: Support hiding plain text in entryMichael Weghorn
Evaluate the "visibility" GtkEntry property [1] [2] and set the QLineEdit's echoMode [3] to QLineEdit::Password if the visibility is set to false, so that replacement characters are shown instead of the actual text as expected. This is used e.g. in password dialogs, e.g. in Writer: "File" -> "Properties" -> "Security", press "Protect..." button. (But this dialog is not using native Qt widgets yet, more needs to be implemented first.) [1] https://docs.gtk.org/gtk3/property.Entry.visibility.html [2] https://docs.gtk.org/gtk3/method.Entry.set_visibility.html [3] https://doc.qt.io/qt-6/qlineedit.html#echoMode-prop Change-Id: I218e4721bbc21f3d6a3553647e92c1ea7cdc4a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175806 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30tdf#130857 qt weld: Add a QtInstanceLevelBarMichael Weghorn
Add a new QtInstanceLevelBar class that is the weld::LevelBar implementation using a native Qt widget. The widget used is a QProgressBar. This is used e.g. in password dialogs where the level bar is used as an indicator for the password strength, e.g. in Writer: "File" -> "Properties" -> "Security", press "Protect..." button. (But this is not using native Qt widgets yet, more needs to be implemented first.) Change-Id: I4400b8d1a03e8978bc96152166dec87f8134f48f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175805 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-30tdf#130857 qt weld: Declare support for Calc "Select Source" dialogMichael Weghorn
Add .ui file for Calc's "Select Source" dialog to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. This dialog is e.g. used for "Insert" -> "Pivot Table" in Calc. Change-Id: I4e9397f665f83cff099a7fb91d5e310b249be933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175800 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30tdf#130857 qt weld: Signal when radio button gets toggledMichael Weghorn
Call weld::RadioButton::signal_toggle when the QRadioButton::toggled signal gets emitted. Change-Id: Ib9713c452fef94448a4f101a7ef6b1dc1d93966c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175799 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-30tdf#130857 qt weld: Declare support for "Security Options" dialogMichael Weghorn
Add .ui file of the "Security Options and Warnings" dialog that can be triggered via "Tools" -> "Options" -> "LibreOfficeDev" -> "Security", then pressing the "Options..." button there to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: Ife7422cb82358d91e3b2092037768231669fcab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175798 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-30win a11y: Move (Impl)InitAccessBridge logic to only callerMichael Weghorn
Now, with previous commit Change-Id: I42f0059cecd43205690d958a875d3c17ff9a197b Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Oct 29 15:08:37 2024 +0100 win a11y: Stop using setting to indicate AT support in place, InitAccessBridge only gets called from the Windows- specific ImplHandleGetObject. Therefore, move the logic from ImplInitAccessBridge there and drop the InitAccessBridge and ImplInitAccessBridge functions. Change-Id: Id0d08478b84434b4ec03ab72b8af40e8ad51bd71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175796 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-30win a11y: Stop using setting to indicate AT supportMichael Weghorn
No longer use a "Accessibility"/"EnableATToolSupport" VCL setting to control/report whether support for assistive technology is (or should be) enabled, which was primarily used on Windows. As described in previous commit Change-Id: I32624b830d39d08510e4731edd06fd7a77642c50 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Oct 28 21:12:48 2024 +0100 win a11y: Drop "Enable AT Tool support" from options UI , that setting got automatically enabled when an assistive technology was active on Windows, and never got reset to "false" automatically, so AT support would be enabled next time LO starts as well. Instead of persisting this via a setting, enable the Windows a11y bridge if and when a WM_GETOBJECT message is received only, see `ImplHandleGetObject` (where this was already done earlier) and no longer alternatively start the a11y bridge in Desktop::Main when the mentioned setting is enabled. Drop MiscSettings::SetEnableATToolSupport altogether. Adjust MiscSettings::GetEnableATToolSupport to no longer read a setting, but return `true` if the AT bridge has been activated (or a SAL_ACCESSIBILITY_ENABLED environment variable is set, as was already checked before). This already returns `true` when called from MenuBarManager::FillMenuManager when starting LO while the NVDA screen reader is running. With this in place, the a11y bridge on Windows should now become active whenever an AT requests information (by sending a WM_GETOBJECT message), but not otherwise, and restarting LO will result in the a11y bridge no longer being active unless AT requests information again. Change-Id: I42f0059cecd43205690d958a875d3c17ff9a197b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175795 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29cid#1607551 silence Overflowed constantCaolán McNamara
Change-Id: Id632cf7933059e54b3cae9daabd981781e944313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175803 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-29tdf#130857 qt weld: Declare support for "Switch to override" dialogMichael Weghorn
Add .ui file of the "You are switching to the overwrite mode" dialog that gets shown when pressing the Insert key in Writer to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: Ib4f83af6d83e46a5bf1a816ffe7d1d494bc0b9d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175792 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-29tdf#130857 qt weld: Implement QtInstanceImage::set_from_icon_nameMichael Weghorn
This will get used e.g. by the "You are switching to the overwrite mode" dialog that gets shown when pressing the Insert key in Writer. Change-Id: Icea593ad65d643b647408c29482d64b9084d4cd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175790 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#161152 vcl: Set CUPS "sides" option for duplex modeMichael Weghorn
When the PPD "Duplex" option is set in a print job, also set the CUPS "sides" option documented at [1], section "Printing On Both Sides of the Paper". This is apparently required for at least some Brother printers where the "Duplex" PPD option is not evaluated during the print process. [1] https://www.cups.org/doc/options.html Change-Id: Ib280c3c65eaf7bf74b611f0ce921eda51b1ebe19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175782 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#130857 VclBuilder: Move extractResizable to BuilderBaseMichael Weghorn
Turn this local helper function into a static method in the BuilderBase class, for reuse in QtBuilder in an upcoming commit. Change-Id: Iee5d5c061c8b1bad3fefb7398111ad6815fc4c6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175776 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#130857 qt weld: Set widget tooltip defined in .ui fileMichael Weghorn
If a tooltip is defined for a widget in a .ui file, set that tooltip using QWidget::setToolTip. This e.g. makes the tooltip for the copy button in the "Help" -> "About" dialog shown as "Copy all version information in English" when hovering over the button with the mouse. Change-Id: Ida22b3fb8b3626474d4377aac6c51d9f7c7ba2ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175775 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#130857 VclBuilder: Move extractTooltipText to BuilderBaseMichael Weghorn
Turn this local helper function into a static method in the BuilderBase class, for reuse in QtBuilder in an upcoming commit. Change-Id: Ib1129801bc7315b1745d1b2690d59747c8db7ed6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175774 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#130857 qt weld: Declare support for "About LO" dialogMichael Weghorn
Add .ui file of the "Help" -> "About LibreOffice(Dev)" dialog to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: I57c83517e9f7cea16931107206f25f6a9013429c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175772 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29UnoApiTest: rename load to loadFromURL and use it everywhereXisco Fauli
Change-Id: Ie67eebec74f783fa0c29acfb23bb83bc582812b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175724 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-10-29tdf#130857 qt weld: Set button image set in .ui fileMichael Weghorn
Implement logic to set the image for a button, as specified via the "image" property for the "GtkButton" object in the .ui file. Similar to how VclBuilder::makeObject does it, extract an icon name and load an image using that one for "GtkImage" obejcts. Add another static `toQPixmap` variant that takes an Image parameter and use that one for conversion. For buttons, if the "image" property is set, get the corresponding QLabel object, get the pixmap from that one and set an icon in the button from that. With this in place, when opening the "Help" -> "About LibreOfficeDev" dialog in a WIP branch adding "cui/ui/aboutdialog.ui" to the list of .ui files in QtInstanceBuilder::IsUIFileSupported, the button to copy the version information now shows the corresponding icon when using the qt6 VCL plugin. Change-Id: If87866d7ab935cbc4162fb513074eefda22c981a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175761 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-29tdf#130857 Move loadThemeImage from FixedImage to BuilderBaseMichael Weghorn
This static helper method is currently only used by VclBuilder. Move it to the BuilderBase class, for reuse by QtBuilder in an upcoming commit. Change-Id: I229bc98e0de2dbe0788f07c7f4ff5e5426203de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175740 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-29tdf#130857 VclBuilder: Move extractIconName to BuilderBaseMichael Weghorn
Turn this helper function into a static method in the BuilderBase class, for reuse in QtBuilder in an upcoming commit. Change-Id: I1e3318f22d83ddef4e7bf6269c7142f307ec6d1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175739 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins