summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)Author
2023-11-19WIP: async popup menusJan-Marek Glogowski
A first patch to get some feedback. Asnyc LO popup menus are still buggy, as I'm not sure where to call the PopupMenu::Finish for them. Also the XDialogClosedListener is currently just for convenience and might want some separate notifier. Fun fact, that ImplExecute / ImplPopup is called for submenu, but then doesn't execute. And generally the naming of some variables is IMHO wrong; I might also prefix Menu members with "m_" for easier readability. Change-Id: Id8b413aa6b4699201e58db0113649c6b224d33b6
2023-11-19Extended loplugin:ostr: vclStephan Bergmann
Change-Id: I2a9d5383d1831d8bf61e5280d66556d71fccae52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159666 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-19tdf#143148: Use pragma once instead of include guards in vcl/sourceTaichi Haradaguchi
Change-Id: Ie19a3e16861946434342c7e07482ae649a4afb4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159646 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-19vcl: simplify warning messageChris Sherlock
Change-Id: Ie8ccf8bc5ba493987bebf38d8b1227c30bcd6e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158077 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-19vcl: ImplIsCharIn() -> lcl_IsCharIn()Chris Sherlock
Change-Id: I61b24783e39e9f904c48c0726024cd5fa122b724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158076 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-19vcl: remove unnecessary includes from textlayout.cxxChris Sherlock
Change-Id: I4cef4b61c15cde5682b65590bebdc9981d38908c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158074 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-16tdf#158224 Cannot convert bitmap to polygonsNoel Grandin
regression from commit a76a135c9e9bdecd38970e293e72eeeeca000d27 Author: Noel Grandin <noelgrandin@gmail.com> Date: Tue Jan 3 20:14:21 2023 +0200 flatten some vcl code Change-Id: Ibb2a059b283dc2e3bf3fecbf24ff71332a204d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159495 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-15loplugin:unusedmethodsNoel Grandin
Change-Id: I1e125bbd388953491b3f869641484fea737d39ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-11Move user agent initialization to InitCurl_easyMike Kaganski
Places that didn't initialize it previously, would benefit automatically Change-Id: I2f1ff25fc58d9378462072bc92d7b37be2370fc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159299 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-10vcl: don't override user's SSL_CERT_FILE for bundled OpenSSLMichael Stahl
Change-Id: I5d61fe62c2e6814ea757a0b543f7dbf45e0db456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159219 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-09vcl,openssl: set SSL_CERT_FILE for bundled OpenSSLMichael Stahl
OpenSSL may read a CA certificate file from $SSL_CERT_FILE, if the client library calls SSL_CTX_set_default_verify_paths(); python's ssl module does it but apparently libcurl does not. So split the code from commit 3fc632c0261c75fb4079a5305e814698e791f75c and set the environment variable in ImplSVMain(), hopefully before any threads are spawned; seems to work for PyMailSMTPService. This needs to have SYSTEM_OPENSSL available in a config header. Change-Id: I63b747cb61bb236cf4f605bb9858e5b0083388fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159149 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-08loplugin:fieldcast in SvTreeListBoxNoel Grandin
Change-Id: I9a0053ff196e45a2d13ca2406ff67c8d95180b11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159094 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in AnimationDataNoel Grandin
Change-Id: I2697d9201dfde8978224597d4c91f92f52585a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159087 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in vclNoel Grandin
Change-Id: Ib6300ae7d8081a71f6dd5238b14f4114479862b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in MenuBarWindowNoel Grandin
Change-Id: I2b8d8ce3bd20166637d1051fd0d4407a9b2a76b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159084 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-08loplugin:fieldcast in WindowImplNoel Grandin
Change-Id: I6790f6272b606c2fe8f1bde63ec9d072975701df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-07ITEM: Get away from classic 'poolable' Item flagArmin Le Grand (allotropia)
To understand this, some look back in history will be needed to see why it is as it is today. In some (reworked) comments 'poolable' is described as flag to hold Items in the ItemPool, also always having only one incarnation of each possible Item. This is not the original intention, but a side-effect. The reason is what the binary format in the office did: To save a document, the Objects & the Pool were saved, *not* individual Items *together* with the objects. The Pool was completely (binary) saved (and loaded) in one run. Temporary IDs were used to represent at the objects in file which Items were referenced. This *required* to have only one incarnation per item to have a minimal binary file size, thus this high effort was put into this. At doc load, the pool was loaded, all Items were set to RefCount 5000, the references from the objects were restored and then for each Item the RefCount was lowered by 5000 again and - if being zero - deleted. Items for UI were marked 'non-poolable' to *not* safe them with the document, so poolable was a flag to decide if that Info/Item was to be saved with the document - or more direct: if it is Model Data. Items are small, so if we prefer runtime it is okay to no longer being strict with this, anyways does not happen often and has only marginal memory effects - compared to runtime effects/savings. Other problems which this caused: One example is that objects in the UNDO stack were still in the pool, so e.g. deleted pictures were saved with the document despite no longer being used (!). That is the reason we have an UndoItemPool and a method MigrateItemPool to move stuff to that Pool when objects go to the UNDO stack - all of this is also no longer needed. Cleaning this up means to ideally have all items in the SfxItemSet, no longer at the Pool. The Pool should be reduced to a 'Default-Item- Holder' and a 'Slot-to-whichId-mapper'. This needs thorough cleanups/removals, but will be worth it because that massive simplification(s) will increase safety an runtime and make migrating to the goal of completely type-based ItemSet stuff easier for the future. Hopefully only view code in the office working with items will have to be changed for this. In this 1st step I already found that some 'compromizes' will be needed: - There are still Items that have to be at the pool to make the Surrogate-stuff working. This gives back all Items in a Pool of a type and is used in ca. 80 cases. Each one looks at these Items *without* context (e.g. a SfxItemSet at an Object would be a context), so if e.g. a dialog is open that temporarily uses Items of that type you would also get these - without knowing about it... To make that work there is still a mechanism to have Items at the Pool, but now just *registering* (and un-reg) them without any sort/search/ remove needs. Also only for Items that need that, so I evaluated the GetItemSurrogates calls and added some asserts when GetItemSurrogates tries to access an unregistered item type which needs to be added. - Another caveat is that there are about 250 places that directly put Items to the Pool (not all remove these, that is done at pool deletion, so some kind of silent 'garbage-collection' is in place). To have an overview I renamed the accessing methods to separate them from the same functionality at the SfxItemSet, which had the same names. An implementation does still add these directly to the pool, there is no way to cleanup those usages for now. In principle all these should be changed to hold the data at an SfxItemSet. I am still hunting problems. But you can build the office, all apps work (including chart) and you can do speed comparisons already. There are test throwing errors, so I hunt these now. It is hard to give an estimation about how much more changes/corrections will be needed. Completed adaptions to new registered Items at Pool, that reduces the failing tests. Still many that I need to hunt. Added stuff to work around that 'compromize' in ScDocumentPool: It overloads ::PutImpl of the pool to implement special handling for a single Item in SC, the ScPatternAttr. In former code that method was used from SfxItemSet and ::PutImpl at the pool directly, so it was only used in one place. I am not sure if it was used from the SfxItemSet functionality, but better offer it for now. To not waste too much runtime the callbacks depend on the boolean 'NewItemCallback' at the SfxPoolItem, it gets set for that single Item in SC and only then the callbacks trigger. I hope to get rid of those again, e.g. newItem_UseDirect is only needed since we have no 'real' StaticPoolDefaults currently - another thing that needs to be cleaned up in a next step. Since usages of impl(Create|Cleanup)ItemEntry and Direct(Put|Remove)ItemInPoolImpl got more and more similar I decided to unify that: move impl(Create|Cleanup)ItemEntry to tooling, make it globally available in svl and use it also directly for Direct(Put|Remove)ItemInPoolImpl. This slightly increases the failing tests again, but only since in Direct(Put|Remove)ItemInPoolImpl that fallback (e.g. tryToGetEqualItem) was used before, thus this is the same class of errors (SfxPoolItem ptr-compare) as the others which I will need to find anyways. Also fixed some missing stuff. Have now idenified and redirected all SfxPoolItem ptr-compares to be able to debug these - one cause for the remaining errors is probably that before with bPoolable those often were sufficient, but are no longer. Used the [loplugin:itemcompare] and a local clang build to do so, see https://gerrit.libreoffice.org/c/core/+/157172 Stabilized Direct(Put|Remove)ItemInPoolImpl forwards, added parameter to implCreateItemEntry to signal that it gets called from DirectPool stuff - currently needed. Hopefully when getting rid of that DirectPool stuff we can remove that again Added two more debug functionalities: - Added a SerialNumber to allow targeted debugging for deterministic cases - Added registering & listing of still-allocated SfxPoolItems at office shutdown Found PtrComp error in thints.cxx - POC, thanks to areSfxPoolItemPtrsEqual. Will hopefully help more with other tests Found some wrong asserts/warnings where I was too careful and not finding something/succeeding is OK, fixes some UnitTests for SC For SC I now just tried to replace all areSfxPoolItemPtrsEqual with the full-ptr-content compare SfxPoolItem::areSame. I also needed to experiment/adapt the newItem_Callback solution but got it working. Did that replacement now for SW too, found some places where the direct ptr compare is OK. Continued for the rest of occurrences, now all 160 places evaluated. Also done some cleanups. Massive cleanups of stuff no longer needed with this paradigm change. Also decided to keep tryToGetEqualItem/ITEM_CLASSIC_MODE for now. It is used for *one* Item (ScPatternAttr/ATTR_PATTERN) in SC that already needs many exceptions. Also useful for testing if errors come up on this change to test if it is related to this. Added forwarding of target Pool for ::Clone in SvxSetItem and SvxSetItem, simplified SfxStateCache::SetState_Impl and returned to simple ptr compares in SfxPoolItem::areSame to not do the test in areSfxPoolItemPtrsEqual. Debugged through UITest_calc_tests9 and found that in tdf133629 where BoxStyle is applied to fully selected empty calc the Item- reuse fallback has to be used not only for ATTR_PATTERN, see comment @implCreateItemEntry. Maybe more... Problem with test_tdf156611_insert_hyperlink_like_excel. Found that in ScEditShell::GetFirstURLFieldFromCell the correct SvxURLField is found and returned as ptr, but it's usage crashes. That is due to the SfxItemSet aEditSet used there gets destroyed at function return what again deletes the SvxFieldItem that is holding the SvxURLField that gets returned. This shows a more general problem: There is no 'SfxPoolItemHolder' that safely holds a single SfxPoolItem - like a SfxItemSet for a single Item (if Items would be shared_ptrs, that would be a safe return value). That will be needed in the future, but for now use another solution: Since I see no reason why EE_FEATURE_FIELD should not be shareable I wil change this for ow in the SfxItemInfo for EditCharAttribField. That way the Item returned will be shared (RefCnt > 1) and thus not be deleted. I changed the return value for GetURLField() and GetFirstURLFieldFromCell() in ScEditShell: At least for GetFirstURLFieldFromCell the return type/value was not safe: The SvxFieldItem accessed there and held in the local temporary SfxItemSet may be deleted with it, so return value can be corrupted/deleted. To avoid that, return a Clone of SvxFieldData as a unique_ptr. With all that UnitTest debugging and hunting and to get the paradigm change working to no longer rely on shared/pooled items I lost a little bit focus on speed, so I made an optimization round for the two central methods implCreateItemEntry/implCleanupItemEntry to get back to the speed improvements that I detected when starting this change. It was mainly lost due to that 'strange' chained pool stuff we have, so I added to detect the target pool (the one at which the WhichID is registered) directly and only once. Next thing to cleanup will/should be the pool and it's concept, all this is not needed and really costs runtime. Since implCreateItemEntry/implCleanupItemEntry are executed millions of times, each cycle counts here. Had an error in the last changes: pool::*_Impl methods use index instead of WhichID - most of them. Another bad trap, I really need to cleanup pool stuff next. Change-Id: I6295f332325b33268ec396ed46f8d0a1026e2d69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157559 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-11-07tdf#152155 vcl: fix gtk popup listbox positions on sidebarLászló Németh
It was fixed only on Wayland previously. Follow-up to commit 15cdee0d846854b50dd04626b73499bef9305e00 "Resolves: tdf#152155 use gtk's knowledge of relative widget positions". Change-Id: I7a8b17189b319146142a2193ec4b5ec41e2c2d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159020 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-11-07simplify OutputDevice::ClipAndDrawGradientMetafileNoel Grandin
using a poly clip is better than using XOR, so make this the default. Change-Id: I48bb6b5d617b8b6dc82760277d72a50a2123ae0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158957 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-06tdf#43157 vcl: remove DBG_ASSERT() from BreakLinesWithIterator()Chris Sherlock
Change-Id: I2ab54966c8a8b5e5a15f78481330365725b6ef30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158073 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-06vcl: flatten TextLayoutHelper::GetNewsEllipsisString()Chris Sherlock
Change-Id: Ie94ce7c75ab96b8f7186f9f0c455dfa3a9f1683f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158072 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-06vcl: split out functions from TextLayoutCommon::GetEllipsisString()Chris Sherlock
Change-Id: Ifced331b65e27a02d9a3b3e220e22c279c6fc496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158071 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-03tdf#158047 allow the tdf#157635 fix for palettes with 64 entriesPatrick Luby
Change-Id: Ib4e4deb5f7e332a7ef3a9231e993231068c21c4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-03tdf#157028 vcl: PDF export: inline OBJR dictionariesMichael Stahl
There seems to be no reason why SE child OBJR dictionaries are separate objects, they could just be inline. Change-Id: I9e4fcdf56d9b7454325f9d3ef7ba55bdc090f948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158838 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2023-11-03tdf#156478 Remove unused default values for MediaBox and UserUnitTobias Kokolakis
Change-Id: Ica75be2fa238fdf2a40e274f1175710923b281e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156468 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-02vcl: removed redundant checkVasily Melenchuk
Change-Id: Iec2c344df9eb1fa61bb04355c3eee38499edcdac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158422 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2023-11-01new loplugin:fieldcanbelocalNoel Grandin
Change-Id: I33fe8afcbba1d461bee98c92507c878e4e5d41d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-31ofz#63741 Unknown ReadCaolán McNamara
this went wrong in commit d97e0458914991214e3d396273862855aff66234 Date: Mon Oct 1 03:09:35 2018 +0200 vcl: no raw pointers where rJobData.SetDriverDataLen() was dropped in favour of using using nDriverDataLen, but missed replacing an interleaved GetDriverDataLen() with nDriverDataLen Change-Id: Iebc9145865fa4ec985bc2feed754c775d77011b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-30tdf#157518: vcl: Introduce vcl control LevelBarSarper Akdemir
Introduces LevelBar that shares implementation with Progress(Bar). LevelBar is to be as a level indicator, e.g. password strength level. Currently with native backends for gtk and Windows. Currently, except on gtk - the colors of the bar at different levels are hardcoded and not dependent on any kind of themeing. On Windows it follows the styling of progress bar of type "Meter" according to the uxguide: https://learn.microsoft.com/en-us/windows/win32/uxguide/progress-bars#meters Change-Id: Id772cda23615e9582463bf589e4674fd4588c864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157826 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-29vcl: no raw pointersThorsten Behrens
For ImplJobSetup. Also, check memcmp mem size more properly Change-Id: Idcf20bf1b51bc2508f3d37e018efd18e591a6099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/26648 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-29simplify calculation in AlphaMask::BlendWithNoel Grandin
spotted by mkaganski Change-Id: If009be48a10ee5c7066a19b969212d10b9f6a83c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-29ofz#63518 don't allow short read with PHOTOMETRIC_YCBCR formatCaolán McNamara
which the old parser didn't support Change-Id: I63e426f57e893b13dd800f4af1ed4b50751dbb2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-28use more TempFileFast in BinaryDataContainer::ImplNoel Grandin
Change-Id: Iea16260cd152e1c495e7713ada812265dbb5b702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-27tdf#152571 speedup slow draw file saveNoel Grandin
with lots of images, we seem to spend lots of time calculating CRC. Replace the vcl checksum/CRC with rtl_crc32 in sal/, which forwards to the zlib implementation, which has all kinds of nice SIMD code for performance. Change-Id: I295e2ee91b3450fa558b06e67aac0fbb20b85f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-27remove unused vcl_get_crc64_tableNoel Grandin
Change-Id: I8ebc2473884ad991a704c7e0955f262bccbf6dec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-27vcl: flatten OutputDevice::BlendBitmap()Chris Sherlock
Change-Id: Idb0c21dd37af81fae0fd4152f0556edb20e63b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157190 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-10-27vcl: flatten OutputDevice::GetBitmapEx()Chris Sherlock
Change-Id: I85e7767cd2665febd289cc1fd023d30ab80cfe5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157191 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-10-27vcl: move textlayout.cxx from gdi to text directoryChris Sherlock
Change-Id: Ia8efd1d984c94b4fa6d77759fa8c8ec8834ac140 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157415 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-10-27vcl: flatten TextLayoutCommon::GetEllipsisString()Chris Sherlock
Change-Id: I04a5eed7a6fbd2d4c7f31006c73729cf79a2ed02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157367 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-10-26tdf#153519 use new IdleTask::waitUntilIdleDispatchedNoel Grandin
to wait until the Idle inside sw/ has done populating the navigator tree. Which required (*) moving the code down from test/ to vcl/ to avoid circular dependency issues. (*) adding a call SolarMutexGuard before Application::Yield inside IdleTask::waitUntilIdleDispatched (*) exposing the function to python by adding a method to the XToolkitExperimental UNO API Change-Id: Iee418f7a0beb1f5b53addb7fe25823d61720eb3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-26crash seen in Window::ImplTrackTimerHdlCaolán McNamara
#0 vcl::Window::ImplTrackTimerHdl (this=0x3403b0a0, pTimer=<optimized out>) at libreoffice/vcl/source/window/window2.cxx:231 #1 0x00007f2bdd31f5e7 in Scheduler::CallbackTaskScheduling () at libreoffice/vcl/source/app/scheduler.cxx:485 #2 0x00007f2bdd4e5176 in SalTimer::CallCallback (this=<optimized out>) at libreoffice/vcl/inc/saltimer.hxx:54 #3 SvpSalInstance::CheckTimeout (this=this@entry=0x261ef40, bExecuteTimers=bExecuteTimers@entry=true) at libreoffice/vcl/headless/svpinst.cxx:212 #4 0x00007f2bdd4e713d in SvpSalInstance::ImplYield (this=this@entry=0x261ef40, bWait=bWait@entry=true, bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at libreoffice/vcl/headless/svpinst.cxx:453 #5 0x00007f2bdd4e74a0 in SvpSalInstance::DoYield (this=0x261ef40, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at libreoffice/vcl/headless/svpinst.cxx:525 Change-Id: I66ec56603aeb8a7fe855253b961dafb0bc7b875e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-26add warning for suspicious potential double-trackingCaolán McNamara
Change-Id: I0fa7b2a108350a394b5d774aaed899215bdb20de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-25vcl,sw: PDF/UA export: produce Ruby and Warichu SEsMichael Stahl
These need to generate multiple elements in SwTextPainter::PaintMultiPortion() and it's not altogether obvious. Change-Id: Ib5fd36c3ea8e15dff93a87bb231c3cc4f78b0089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158398 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-25tdf#114441 - Convert use of sal_uLong to better integer typessahil
nUpdateInterval (sal_uLong --> sal_uInt64) because it is passed as argument to Timer::SetTimeout function that takes a sal_uInt64 func CalcUpdateInterval (sal_uLong --> sal_uInt64 return type) because this function is only being called once, and in that call, the return value is passed to a function which takes sal_uInt64 type int. line 412 (https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/select.cxx?r=b6b26421#412) two lines after which it is passed to a function ... and the function changed in vcl/source/window/seleng.cxx is the one to which the value of nUpdateInterval is being passed as explained in the lines above. Change-Id: I73441c2d3520a222ddb39b8c0c205b4dd61d4751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156015 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-24tdf#157028 vcl: PDF export: inline attribute dictionariesMichael Stahl
There seems to be no reason why SE attribute dictionaries are separate objects, they could just be inline, which saves a little space (1%) and more importantly the PDF file is easier to read with less clutter. Change-Id: Iaaea2432313c0b710edabecae32545205f4f495e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158392 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-24tdf#153519 make TreeListEntryUIObject saferNoel Grandin
Do not store a raw pointer to an object that go away. Consequently we can remove the various sleep() hacks Change-Id: I3200c26b3a2a4eb7592cb2e5c6af64d6b739d1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158390 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-24tdf#135921 a11y Send event when toggling listbox checkboxMichael Weghorn
When toggling the state of the checkbox in a listbox/ treelist entry using the mouse or the keyboard, emit a `VclEventId::CheckboxToggle` event and process that in the a11y class that's used for the case where there's just a single checkbox (like in the spelling options dialog), `AccessibleListBoxEntry` by sending a corresponding STATE_CHANGED event on the a11y layer. This makes Orca with the qt6 VCL plugin and NVDA on Windows announce the new value when toggling a checkbox in the Spelling options dialog using either the mouse or the keyboard. As mentioned in the previous commit, Change-Id Ic78f9052d166be0da17a76261a09da02b8a11cd7 tdf#135921 a11y: Toggle listbox item checkbox on space , the case where a listbox entry has multiple checkboxes (like the autocorrect options dialog in Writer) uses different a11y classes and toggling a checkbox there still doesn't result in the new value being announced. Change-Id: I36a2b0a3fa3154279fb06af023fdb96f699fac2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158375 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-24tdf#135921 a11y: Toggle listbox item checkbox on spaceMichael Weghorn
Allow toggling the state of the checkbox in a listbox/ treelist entry using the space key if the entry is currently selected. This aligns it with the behavior for "plain" checkboxes. On the a11y layer, these listbox entries are even exposed just as a checkbox when there's only a single checkbox for the entry (s. `AccessibleListBoxEntry::getAccessibleRole`), like in the Spelling options dialog ("Tools" -> "Spelling", then press the "Options..." button). For the case where there are multiple checkboxes (like in the Writer autocorrect options dialog), the first checkbox will be toggled. Making it possible to toggle any of the checkboxes for that case would need further work, s.a. the the related tdf#135585. (For gtk3, it's possible to use the arrow keys to switch the column, then use the space key to toggle the checkbox.) That scenario also uses a different approach for the a11y layer, not a single `AccessibleListBoxEntry` object as is the case for the tdf#135921 scenario. This change makes it possible to toggle the checkbox, but so far, the new state is not yet announced when a screen reader is running, neither when using the keyboard nor when using the mouse (which was possible without this change already). The event handling that's required for this will be added in a separate commit. Change-Id: Ic78f9052d166be0da17a76261a09da02b8a11cd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158374 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-24Fix typoAndrea Gelmini
Change-Id: Ib2e612960f27d103bd25d14b86fa9eb0c0422669 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158367 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>