summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-08-22smallcaps: support dxarray in SvxDoDrawCapitalCaolán McNamara
Change-Id: I1924fce8323fb14f75f49cb67320f21a3ca62cc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-22tdf#98367 implement rendering of draw/impress small capitalsCaolán McNamara
arising out of Þe old tdf#91932 Change-Id: I953aabc280bc31ef1297dc79d483eb3d28a542f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-22tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup closeMichael Weghorn
Don't request focus for the color window before the menu button popup opens. Doing so would prevent properly restoring focus to the menu button itself after the popup closes again. Without this change in place, the call to `MenuButton::Activate` in `MenuButton::ExecuteMenu (s. frame 14/15 in below backtrace) would already set focus to the "Automatic" button in the color window: 1 PushButton::GetFocus button.cxx 1490 0x7f4acfdc83b6 2 vcl::Window::CompatGetFocus window.cxx 3888 0x7f4acfd9d26d 3 vcl::Window::ImplGrabFocus mouse.cxx 384 0x7f4acfcd5215 4 vcl::Window::GrabFocus window.cxx 2979 0x7f4acfd988e9 5 SalInstanceWidget::grab_focus salvtables.cxx 390 0x7f4ad046f505 6 ColorWindow::GrabFocus tbcontrl.cxx 2127 0x7f4ad3f21af1 7 ColorListBox::ToggleHdl tbcontrl.cxx 4291 0x7f4ad3f313d6 8 ColorListBox::LinkStubToggleHdl tbcontrl.cxx 4285 0x7f4ad3f31369 9 Link<weld::Toggleable&, void>::Call link.hxx 111 0x7f4ad04aec71 10 weld::Toggleable::signal_toggled weld.hxx 1539 0x7f4ad04a77a3 11 SalInstanceMenuButton::ActivateHdl salvtables.cxx 3075 0x7f4ad0483086 12 SalInstanceMenuButton::LinkStubActivateHdl salvtables.cxx 3071 0x7f4ad0483043 13 Link<MenuButton *, void>::Call link.hxx 111 0x7f4acfe9e9c1 14 MenuButton::Activate menubtn.cxx 237 0x7f4acfe9e136 15 MenuButton::ExecuteMenu menubtn.cxx 61 0x7f4acfe9cca1 16 MenuButton::KeyInput menubtn.cxx 226 0x7f4acfe9e092 17 ImplHandleKey winproc.cxx 1211 0x7f4acfdb0962 18 ImplWindowFrameProc winproc.cxx 2724 0x7f4acfdb6fcf 19 SalFrame::CallCallback salframe.hxx 310 0x7f4ac5aa3dfa 20 QtFrame::CallCallback QtFrame.hxx 229 0x7f4ac5aa5336 ... <More> As a consequence, this "Automatic" button inside of the color window would be the UI element remembered as the the one to which focus focus should be restored when closing the popup, see the mxPrevFocusWin = Window::SaveFocus(); in `FloatingWindow::StartPopupMode`, which gets called like this: 1 FloatingWindow::StartPopupMode floatwin.cxx 824 0x7f4acfc61a61 2 ImplDockingWindowWrapper::StartPopupMode dockmgr.cxx 846 0x7f4acfc43bd3 3 DockingManager::StartPopupMode dockmgr.cxx 341 0x7f4acfc412c3 4 MenuButton::ExecuteMenu menubtn.cxx 94 0x7f4acfe9cfa9 5 MenuButton::KeyInput menubtn.cxx 226 0x7f4acfe9e092 6 ImplHandleKey winproc.cxx 1211 0x7f4acfdb0962 7 ImplWindowFrameProc winproc.cxx 2724 0x7f4acfdb6fcf 8 SalFrame::CallCallback salframe.hxx 310 0x7f4ac5aa3dfa 9 QtFrame::CallCallback QtFrame.hxx 229 0x7f4ac5aa5336 10 QtWidget::handleKeyEvent QtWidget.cxx 671 0x7f4ac5af9f38 11 QtWidget::handleEvent QtWidget.cxx 707 0x7f4ac5afa094 12 QtWidget::event QtWidget.cxx 730 0x7f4ac5afa1f7 13 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7f4ac37a2414 14 QApplication::notify qapplication.cpp 2715 0x7f4ac379fd5b 15 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1123 0x7f4ac51a3c34 16 QCoreApplication::forwardEvent qcoreapplication.cpp 1138 0x7f4ac51a3cac 17 QWidgetWindow::handleKeyEvent qwidgetwindow.cpp 669 0x7f4ac38567b1 18 QWidgetWindow::event qwidgetwindow.cpp 234 0x7f4ac3854924 19 QApplicationPrivate::notify_helper qapplication.cpp 3287 0x7f4ac37a2414 20 QApplication::notify qapplication.cpp 3238 0x7f4ac37a2224 ... <More> and then properly restoring focus fails in `FloatingWindow::EndPopupMode`. Move the call to `Activate` to after showing the popup instead. This makes sure that the actual widget that had focus *before* the popup opened is remembered and focus is correctly restored on close. The handler for the toggled signal had been added in commit e55a1dc163165cb79fc9113101d16ee8d3db7298 Date: Wed Nov 27 14:58:00 2019 +0000 don't put focus into unmapped windows defer until the color selectors are activated to grab focus, otherwise esc doesn't work to close a dialog under gtk3 until focus is put into some visible widget which apparently already moved the focus request to later than it was before. With this change in place, the NVDA screen reader announces the menu button again once the color popup closes (tdf#141101) and it also makes opening the popup menu again right away work by pressing Alt+Down button again on Windows or with the gen or qt6 VCL plugins on Linux, which didn't work beforehand, but required either using the mouse or tabbing to another UI element and back before that keyboard shortcut would work again. The same is true for the border line style popup (tdf#101886). Setting the focus only when the popup shows also makes the focus correctly be on the previously selected color for the non-gtk3 case when opening the popup again. (Previously, the "Automatic" button would always have focus.) Ensure that the required preparations for showing the popup in the `ManagedMenuButton` subclass are still done before executing the menu by doing what's needed in the newly named `ManagedMenuButton::PrepareExecute` method rather than in `Activate` and call that one before showing the menu. Change-Id: I82fbfea2ae8b9064979796da279750350deb742d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155891 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-21split to allow getting decoration on its ownCaolán McNamara
Change-Id: Ib65750245906de0852c39e4a4bdaa85a2f822282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-21svx: prefix members of SdrEdgeObjMiklos Vajna
See tdf#94879 for motivation. Change-Id: I5236f1d6d2294172640ec671424fbcd78a866d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155883 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-08-21move BGradient to awt::Gradient2 UNO conversion into docmodelTomaž Vajngerl
This is needed because the module dependencies are an issues if the conversion is done in basegfx. The bigger issue will come when the ComplexColor conversion will be done as basegfx can't depend on docmodel because of circular dependencies. The BGradient is also more suitable for docmodel anyway as the previously it was part of the model and is not a basic (gfx) type - however this doesn't move the whole BGradient into docmodel yet. Change-Id: Id91ce52232f89f00e09b451c13da36e2854ae14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155674 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-19Fix typoAndrea Gelmini
Change-Id: I6649e13646e4fd33dd1858f5a5a56ec0955005dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155841 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-18ucbhelper,ucb,desktop: InternetProxyServer is problematicMichael Stahl
It turns out that every single client of InternetProxyDecider simply concatenates the 2 members of InternetProxyServer into a single string and passes it on to curl_easy_setopt(CURLOPT_PROXY), which will happily take a URL including scheme and everything. It turns out that the awful GetUnixSystemProxy() tries to cut off the scheme in a terrible way, but GetPACProxy() does no such thing and WINHTTP_PROXY_INFO::lpszProxy may or may not contain scheme in its entries; fix this to only separate the port and leave the rest alone. So why do we need a InternetProxyServer struct? Because officecfg has separate entries that correspond to its members, and so InternetProxyDecider gets separate events on its listener interface when any of them changes, which is easiest to handle if it stores these separately. So just return a concatenated URL with or without scheme in getProxy(). Change-Id: I43c696471c8bec90667b5930fa00975adb432fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18add a SfxLokHelper::notifyInvalidation which can take a 'part'Caolán McNamara
no change in behaviour intended Change-Id: I6040eafb03bcf39724761d7708540e9b25edd8f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155813 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-18ITEM: preparations for more/easier changesArmin Le Grand (allotropia)
This change is not about speed improvements but diverse preparations to make changes/reading/understanding easier. It does not change speed AFAIK. Added a global static debug-only counter to allow getting an overview over number of all allocated SfxPoolItem's and the still alloated ones at office shutdown. The values are used in Application::~Application to make a short info statement. It allows to be able to quickly detect if an error in future changes may lead to memory losses - these would show in dramaitically higher numbers then (hopefully) immediately. Moved SfxVoidItem to own source/header. Added container library interface support to SfxItemSet, adapted already some methods to use it - not all possible, I will commit & get status from gerrit 1st if all still works and then continue. Changed INVALID_POOL_ITEM from -1 to use a global unique incarnation of an isolated derivation from SfxPoolItem. It allows to avoid the (-1) pointer hack. Since still just pointers are compared it's not worse. NOTE: That way, more 'special' SfxPoolItem's may be used for more States - a candidate is e.g. SfxVoidItem(0) which represents ::DISABLED state -- unfortunately not only, it is also used (mainly for UI stuff) with 'real' WhichIDs - hard to sort out, will have to stay that way for now AFAIK. Changed INVALID_POOL_ITEM stuff to use a static extern incarnated item in combination with a inline method to return it, called GetGlobalStaticInvalidItemInstance(). Isolated create/cleanup of a SfxPoolItem entry in SfxItemSet to further modularize/simplify that. It is currently from constructor & destructor but already shows that PoolDefaults are handled differently - probably an error. Still, for now, do no change in behaviour (yet). Got regular 'killed by the Kill-Wrapper' messages from gerrit, seems to have to do with UITest_sw_findReplace. That python/c++ scripting stuff is hard to debug, but finally I identified the problem has to do with the INVALID_POOL_ITEM change. It was in SfxItemSet::InvalidateAllItems() where still a (-1) was used -> chaos in detecting invalid items. Change-Id: I595e1f25ab660c35c4f2d19c233d1dfadfe25214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155675 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-08-18tdf#156561 tdf#141101 Revert "tdf#140762 tdf#152671 Make dock win ..." et alMichael Weghorn
Revert commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup and 2 follow-up commits, since it's no longer necessary to have the window visible already when the popup shows in order for NVDA on Windows to announce the content. This unifies the code path between gtk and non-gtk again, as already pointed out in commit 3bb762c53ea79f8915a1b8fa39f3f5f57aa68c84 Date: Tue Aug 1 09:44:56 2023 +0200 tdf#156100 tdf#156561 Revert to previous behavior for gtk popups > Further analysis of the root causes is planned in the context of > tdf#156561, so hopefully the code paths can be unified again in > the future. The underlying issues have now been addressed by these commits instead now: commit 1d92445fcac1c51c17d8dbfd1a4017430fe7bc46 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Aug 1 09:26:37 2023 +0100 tdf#156561 wina11y: Handle CHILD event Change-Id I83cf5732bfc9d4886e4f7fa75d4ff462e4d4af6d tdf#141101 tdf#156561 a11y: Handle a11y child events in win parent Change-Id I69c6066127c8b853a27cc1f692f139572541f8eb tdf#156561 a11y: Create VCLXTopWindow peer for border win frame Change-Id If374032387babf41b28067d5df54d5f6ce682c48 tdf#156561 a11y: Don't ignore child events in AccessibleListBox Change-Id Ifbe27de01739103d1da04951475db32aa50d429d tdf#156561 svtools, a11y: Return created popup win for focus handling Together with the above-mentioned commits, this also makes NVDA announce the font color popup in the "Character" (character style) dialog. (Announcement starts as soon as Tab is pressed once, not yet for the initially focused item right away.) Reverted commits: commit 3bb762c53ea79f8915a1b8fa39f3f5f57aa68c84 Date: Tue Aug 1 09:44:56 2023 +0200 tdf#156100 tdf#156561 Revert to previous behavior for gtk popups commit 70642bb7afd2cee6f7ae6eff2936a35978bd0597 Date: Thu Apr 6 15:07:15 2023 +0100 tdf#154470 try moving the Show of the client to after the float positioning commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb Date: Wed Mar 15 17:00:27 2023 +0100 tdf#140762 tdf#152671 Make dock win visible before showing popup Change-Id: Ic621b4344311679af2d13b5a80220e1daf411061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155803 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-18Rename Window::ImplIsAccessibleNativeFrame and make it publicMichael Weghorn
The way to determine whether this window is a "native frame" doesn't look particularly specific to a11y, so rename it to just `Window::IsNativeFrame` and make it public in order to reuse it in a follow-up commit. Also move the implementation out of the source file that implements accessibility-specific Window methods for consistency. Change-Id: I980f251cacce6a601e86fc6261a231b799b30317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155798 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-17Simplify Point/Size/tools::Rectangle templatesMike Kaganski
Avoid reinterpret_cast; drop unneeded 'using'; deduplicate some code Change-Id: I9c39552b0ccaa45344808e02ad89b21a42766784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155761 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-17tdf#156699 sfx2: Extract helper method to get char value + nameMichael Weghorn
It will be reused in an upcoming commit to set the a11y name for the `SvxCharView`. Change-Id: Ib5938e5363571e547ee00cac8432f919b60cd97a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155756 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-16tdf#156591 - A11Y - add fix button for "Style has no language set."Balazs Varga
Open style language character settings if the language is set to 'None'. Add EditStyleFont uno command for editing directly Font of paragraph styles. Change-Id: I8b7d7880cc77f7352edac089ee95b4a6d0744575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155494 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-08-16cid#1539911 Big parameter passed by valueCaolán McNamara
Change-Id: I761fb02d80a224a4b170bb287169da923a003d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155736 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-16tdf#156538 Enhancement to show character information in the insertJim Raykowski
special characters control This patch makes a tooltip show when the mouse pointer is over a character window in the special characters control. It also adds a label that is used to display character information of the highlighted character. Code for creating the character information text shown in the tooltip and label was referenced from SvxCharacterMap. Change-Id: I4b62e63b27310cbe9e9661ff51c2db206e9e3507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155547 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-08-15ComplexColor various clean-up and (trivial) refactoringsTomaž Vajngerl
Don't allow access to member variables of ComplexColor and makes them private. Needs a lot of changes. Change "scheme" to "theme" to be more consistent. In LO we usually call the "theme color" what is usually refered to as "scheme color" in OOXML, where it is sometimes refered to as "scheme" and other times as theme color. Remove ThemeColor class which was replaced with CmplexColor some time ago. Remove un-needed includes and un-needed components. Use isValidThemeColor in many places where we check that the ComplexColor is of "Theme" type and that ThemeColorType is set to a valid value. Change-Id: I325595fa65b8e56a4707e9d22acc6330aac28961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155359 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-15sw floattable: handle AllowOverlap==false in the RTF filterMiklos Vajna
Map \tabsnoovrlp to SwFormatWrapInfluenceOnObjPos::mbAllowOverlap on import and do the opposite on export. Change-Id: I3d786041648d62e80f2ea9e3d726426e01a8d192 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155687 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-08-14lok: a11y: when we are inside a table notify table and current cell infoMarco Cecchetti
When we get in one or more tables we notify row and column count. When we get out one or more table we notify we are leaving a table. When the fosused cell changes we notify the new row/col index. The paragraph content is notified together with table info, so that client has some opportunity for getting the screen reader to report together content and table info. Change-Id: Ic524259aa1879a70fc3de2467bdee27475352b7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155577 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-13Revert "clang-tidy bugprone-parent-virtual-call in vcl"Noel Grandin
This reverts commit 69972719542cd686687ddd91f2b5284483513608. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: If5316654c16a697a2aff5eccdffaa5b2a6e0052d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155598 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-13Revert "clang-tidy bugprone-parent-virtual-call in sfx2"Noel Grandin
This reverts commit 0f3b36bd2749f360df84d1594c01e619ba0f4930. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: Ifa383ee7ed2db4f81e2b0ac593e652288a07514f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155596 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-12clang-tidy bugprone-parent-virtual-call in sfx2Noel Grandin
Change-Id: Id1e32a696dd97d1bded467834e5fbd14345d02c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-11lok: a11y: get focused paragraph notified on document loadMarco Cecchetti
Usually, when the document is loaded, a CARET_CHANGED accessibility event is automatically emitted for the first paragraph. That allows to notify the paragraph content to the client, even if no input event occurred yet. However, in Cypress tests no accessibility event is automatically emitted until some input event occurs. So we use the workaround in this patch to notify the content of the focused paragraph, without waiting for an input event. (cherry picked from commit d6f929c03ca08a0c1134937a1ff1a42f75221e93) Change-Id: I8696c5f9ea069824614e9b541f4959b315dbda5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155575 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-11clang-tidy bugprone-parent-virtual-call in vclNoel Grandin
Change-Id: I270bb35f577cc1ee56233c585665478cbaab9085 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-11move setting properties into note comments from oox to scCaolán McNamara
no change in behavior intended, the SdrCaption doesn't support the skipped conditions Change-Id: Id909ae4ed115c1ad3398d2a62c6432ff1dfde453 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-11split ShapeBase::convertShapeProperties into two partsCaolán McNamara
Change-Id: I62f42e54c776f15ea83c5fc861bb4f4ff899e891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155584 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-11refactor to return the position to be set by the caller insteadCaolán McNamara
no change in behavior intended Change-Id: I32043bdf1d29521d8503df315fa786236e272f7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155580 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-11Initial APNG export supportParis Oplopoios
Change-Id: I27877d4bdf27cd92bdd939fd25e3820edad10f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155387 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-10ITEM: improve SfxItemSet notification callbackArmin Le Grand (allotropia)
When browsing cachegrind data I stumbled over the notification callback used by Writer in SfxItemSet::Changed. That is a virtual method that gets called in quite some places to forward item changes, SW uses it to record these. For that purpose always (quite some) data gets prepared without checking if this is necessary, this uses calls to ::Get and ::GetDefaultItem to have either the old or new Item from the parent or default (pool). This is not needed - except for Writer. Even there this mechanism is not always active. Thus I: - removed SfxItemSet::Changed, replaced with a settable callback member of type std::function<...>. Thus one less virtual function and depenence in SfxItemSet - added a callback functor to SwAttrSet that can be set at the SfxItemSet it is derived from - setting/releasing this only in used cases. It is not even used all the time in SW. - moved the creation/processing of needed data to a member function in SW (SwAttrSet::changeCallback). All processing and evtl. needed data is now created there - on demand. - adapted all places in SfxItemSet where that mechanism is used to only call it if set & without pre-calculating anything - since all former calls/usages were pretty similar I could put all of this to SwAttrSet::changeCallback This leads to use that only when needed now. Naturally, SW will potentially profit less than the other apps. Here are callgrind numbers with this change using OfficeStart, DocLoad, DocClose, OfficeShutdown. This change also has potential avantages @runtime/UI which also did all preparations to call SfxItemSet::Changed all the time: Writer doc: 0,9907 ~1% old: 93842 mio new: 92971 mio Draw/Impress doc: 0,9971 ~2,8% old: 170023 mio new: 169544 mio ::Get reduces from 1416103 to 293874 calls ::GetDefaultItem reduces from 2252336 to 1927209 calls (nearly half) Calc doc: 0.9868 ~1,3% old: 194708 mio new: 192130 mio ::Get reduces from 882298 to 880087 calls ::GetDefaultItem reduces from 4611901 to 2633555 calls (nearly half) Of course this highly depends on the used test documents, so it can only be a excerpt result. Also adapted SfxItemSet::MergeRange a little bit: Do nothing not only when a single new slot is already contaioned, but check if all slots are already present. This works well and fast using the formally added caching mechanism. Change-Id: I4d369d2e5b21aa7a21687177518150515e3de954 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-08-09use sal_uInt64 when dealing with stream positionNoel Grandin
Change-Id: I2c89096c306e1537622fc52644d20ae605183b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09use sal_uInt64 when dealing with stream positionNoel Grandin
Change-Id: I09285716b6d17d8de95af91d822966520af35605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09Resolves: tdf#156661 only set a fixed height for the single row caseCaolán McNamara
of the insert special character dialog. The character popdown uses multiple rows instead. Change-Id: If3c5578a018a31dbdb0a0d9785f18b570e13112f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155502 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-07ITEM: speedup WhichRanges access by bufferingArmin Le Grand (allotropia)
I checked for was to speedup SfxItemSet stuff, so had (besides other things) a look at WhichRangesContainer and it's usage(s). Problem with the WhichRanges is that a WhichID which you try to find is usually inside that range, so binary search is no option. You have to detect in which range the WhichID is hosted and can the directly calculate the index into the array of Items at the SfxtemSet. Currently when needing to transform a WhichID to an index into the array of Items in SfxItemSet the array of the WhichRangesContainer is searched linearly from the start every time. This can be a little bit speed up by buffering the last successful 'hit' and trying to re-use it. Also the special case of a single WhichPair (e.g. UI stuff) is worth having a look. All acesses to that transformation are changed to use the tooling method getOffsetFromWhich() at the WhichRangesContainer which does the transformation. This also needed cleanup of ItemOffsetHint instances & stuff around it. It does not more than before but also profits from the single entry buffer. I added some DBG_UTIL-based stuff to watch the hit/miss ratio, which is heavily changing from app to app & usage, but varies around 1.5 to 3.5, also saw 6.5 and more at document import. NOTE: I already checked if sorting the WhichPair(s) in WhichRangesContainer by their 'width' (highest WhichID mnius lowest WhichID helps. The idea was when the Items would be used in a regular manner that when having the widest WhichPairs at the start, the buffer would even be better used - but doing tests in all apps shows nearly no gain, so I left that out. NOTE: Not too much speedup, but faster... Had to deep-debug due to CppunitTest_sw_odfexport failing, found a slight diff between GetItemState impls, corrected. Also added more changes, e.g. TotalCount is now a member to not always have to calculate it from the WhichRangesContainer. Extended GetWhichByPos to 1st try to find a set Item, else iterate over WhichRangesContainer. This is due to SfxItemIter's implementations of GetItemState and ClearItem which both up to now just accessed the SfxPoolItem array of the SfxItemSet, ignoring that no Item (nullptr) or state DONTCARE (-1) may have been set there (no item is prevented by ite Iterator, but better be careful). Added WhichRangesContainer::getWhichFromOffset and made SfxItemSet::GetWhichByOffset use it. Addedd optimizations there for single-entry WhichPair and using the buffer at WhichRangesContainer which is possible. Removed debug comparing stuff (had a test that used the former adapted GetItemStateImpl method in SfxItemSet::GetItemState and compared with the changed GetItemState_ForWhichID). Added some comments and assertions where useful. Made ClearSingleItem_ForOffset work without handing over WhichID, that makes calls using it simpler and avoids calculating the WhichID just for that call. Change-Id: I54de552368b654f00f115978715f8241eb603752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155316 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-08-07ofz#57384 TimeoutCaolán McNamara
Change-Id: Ic2007f52056acd46f96d454c1fdb7b8ca8838d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-07svx: prefix members of SdrEdgeInfoRecMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ia1f0f7016217f17d45e863484bdb176e7d47a594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155389 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-08-05Rename setRGB to createRGB to make it less misleadingMike Kaganski
Somehow I overlooked completely, that there already is a non-static setRGB. Thanks Miklos and Tomaž for the heads up! Change-Id: If20018a317d90e0a6297950dff201671316aacad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155353 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-05Fix crash in lokit form control mouse handlerThorsten Behrens
Since 7adfecb0f5947ae258226c8d1652546f81577026 , clicking on form controls results in a crash like this one: 0x00007f7c81092a7c in __pthread_kill_implementation () at /lib64/libc.so.6 0x00007f7c81041226 in raise () at /lib64/libc.so.6 0x00007f7c81029897 in abort () at /lib64/libc.so.6 0x00007f7c812e4c60 in __gnu_debug::_Safe_sequence_base::_M_get_mutex() () at /lib64/libstdc++.so.6 0x00007f7c2aaaf36f in std::_Optional_base_impl<PointerStyle, std::_Optional_base<PointerStyle, true, true> >::_M_get() (this=0x7f7c2c673b50 <LokControlHandler::postMouseEvent(SdrPage const*, SdrView const*, vcl::DocWindow&, int, Point, int, int, int)::eDocPointerStyle>) at /usr/include/c++/13/optional:477 0x00007f7c2aaa9b24 in std::optional<PointerStyle>::operator*() & (this=0x7f7c2c673b50 <LokControlHandler::postMouseEvent(SdrPage const*, SdrView const*, vcl::DocWindow&, int, Point, int, int, int)::eDocPointerStyle>) at /usr/include/c++/13/optional:974 0x00007f7c2aaa66bb in LokControlHandler::postMouseEvent(SdrPage const*, SdrView const*, vcl::DocWindow&, int, Point, int, int, int) (pPage=0x7f7c6ec35910, pDrawView=0x7f7c6f097a40, rMainWindow=..., nType=0, aPointHmm=Point = {...}, nCount=1, nButtons=1, nModifier=0) at core/include/sfx2/LokControlHandler.hxx:79 0x00007f7c2aa9d784 in SwXTextDocument::postMouseEvent(int, int, int, int, int, int) (this=0x7f7c6eae94f0, nType=0, nX=1756, nY=4106, nCount=1, nButtons=1, nModifier=0) at core/sw/source/uibase/uno/unotxdoc.cxx:3741 0x00007f7c7c8fb074 in doc_postMouseEvent(LibreOfficeKitDocument*, int, int, int, int, int, int) (pThis=0x7f7c6f37fe90, nType=0, nX=1756, nY=4106, nCount=1, nButtons=1, nModifier=0) at core/desktop/source/lib/init.cxx:5062 0x00007f7c81642c9e in postMouseEventInThread(gpointer) (data=0x19aa340) at core/libreofficekit/source/gtk/lokdocview.cxx:2335 0x00007f7c816441fb in lokThreadFunc(gpointer, gpointer) (data=0x19aa340) at core/libreofficekit/source/gtk/lokdocview.cxx:2567 Change-Id: I77e85df6a77adc033cc793488924ed676a9900be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155364 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-04docmodel: Fix comment at end of namespaceMichael Weghorn
Change-Id: I6a89ae49f735bde8220a110d83001604cc3c335e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155337 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-04Rename ComplexColor::RGB to setRGB, to avoid conflict with Windows defineMike Kaganski
Affects Windows' no-pch builds. Change-Id: Ifff401df40854f59760bd398c156a8837b528efe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155340 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-08-04pptx: import shape text from master pageSzymon Kłos
If shape has custom text defined in master page but no text itself - don't prefer placeholder text but text from master page. Change-Id: Id4f7aeca0e74ecd8565905cd656a182c1195fa30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154980 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155335 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-08-03Resolves: tdf#127334 Increase tools::Duration accuracy epsilon unsharpnessEike Rathke
... when converting from double, i.e. to 300 nanoseconds. Empirically determined.. Change-Id: I92c43b5f244923363af5d44bece9c155126ca343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155324 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-08-03Related: cool#6911 opt to skip SdrObject::GetViewContent() when possibleCaolán McNamara
as seen in: https://user-images.githubusercontent.com/122848/253732636-3dfeddad-f146-4268-bde5-85788b72d539.svg SdrPageView::DrawLayer takes ~11% of the time when scrolling with many comments in calc, but none of these comments actually get drawn, all this effort is to find that they are not to be drawn. optimize ViewContactOfPageHierarchy impl over its parent impl to skip SdrObject::GetViewContent(), etc if the SdrObject isn't shown on the target layer. ViewObjectContactOfSdrobject::getPrimitive2DSequenceHierarchy does the same check, but after a set of allocations which is expensive in the case of SdrCaptions in a calc internal layer where there can be thousands of such objects. Change-Id: Iad86c77e8fa71ec90f54ce06d5a27c0380fb03ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155269 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-03Related: cool#6911 refactor for an optimizationCaolán McNamara
no change intended here Change-Id: I34b72776b1a05979fbe3a02ff1548b6aa8a183df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155268 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-03move SwVirtPageNumInfo to SfxHintBjoern Michaelsen
- also remove now obsolete GetInfo overrides Change-Id: Iaac75ed2e53daead06242ce4620fd2b879909e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155061 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-08-02sc: theme color support for sparklines + ODF & OOXML import/exportTomaž Vajngerl
This changes Sparkline colors to use complex colors instead and adds Sparkline theme color import and export support for ODF and OOXML. Change-Id: I58edd525d50f95199bd4fe7825afb51aaa7fc091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155113 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-02Silence C++20 volatile increment deprecation warningsStephan Bergmann
...as seen with path set 2 of <https://gerrit.libreoffice.org/c/core/+/155121/2> "Bump baseline to C++20", > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/source/app/watchdog.cxx:19: > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/opengl/zone.hxx:16: > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:59:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void enter() { gnEnterCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:60:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void leave() { gnLeaveCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:59:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void enter() { gnEnterCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:54:19: note: in instantiation of member function 'CrashZone<SkiaZone>::enter' requested here > CrashZone() { enter(); } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/skia/zone.hxx:23:5: note: in instantiation of member function 'CrashZone<SkiaZone>::CrashZone' requested here > SkiaZone() { assert(comphelper::SolarMutex::get()->IsCurrentThread()); } > ^ > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/source/app/watchdog.cxx:19: > In file included from /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/opengl/zone.hxx:16: > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:60:39: error: increment of object of volatile-qualified type 'CrashZone::AtomicCounter' (aka 'volatile unsigned int') is deprecated [-Werror,-Wdeprecated-volatile] > static void leave() { gnLeaveCount++; } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/include/comphelper/crashzone.hxx:55:20: note: in instantiation of member function 'CrashZone<SkiaZone>::leave' requested here > ~CrashZone() { leave(); } > ^ > /home/tdf/lode/jenkins/workspace/android_arm/vcl/inc/skia/zone.hxx:23:5: note: in instantiation of member function 'CrashZone<SkiaZone>::~CrashZone' requested here > SkiaZone() { assert(comphelper::SolarMutex::get()->IsCurrentThread()); } > ^ (<https://ci.libreoffice.org/job/gerrit_android_arm/31168/>) Change-Id: Ia63c54ed5bde6678ef6b544c1edad9600534ff05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-02Make the Xcode workaround apply more broadlyStephan Bergmann
...so that it should also work for <https://ci.libreoffice.org/job/gerrit_mac/151630/>, which reports > checking whether Xcode is new enough... yes (13.3.1) Change-Id: Ifae5d4d3516d4af8947fe663d557dc232ea22ab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155263 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-02tdf#156525 Save as > HTML loses drawing object as invalid gifNoel Grandin
regression from commit 1c7cbd685633d44eac554629572f3401c450f855 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sun May 7 16:56:21 2023 +0200 use AlphaMask for variables when calling GetAlphaMask where after my change, the code is now calling Bitmap::Replace(AlphaMask,...) instead of Bitmap::Replace(Bitmap,...) and those two methods do quite different things. However, we have to (*) restore Bitmap::Replace(Bitmap,...) which was removed in commit 8270eb5d5600cc84dbf5f0e339f90c4519ef88bb Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri May 19 13:35:31 2023 +0200 loplugin:unusedmethods (*) restore BitmapWriteAccess::SetPaletteEntryCount which was removed in commit 74cd0d0b281f8df75612bfb600df2eae62c4d21d Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Jun 29 13:53:30 2023 +0200 loplugin:unusedmethods (*) Invert the mask/alpha layer, since after commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 Author: Noel Grandin <noelgrandin@gmail.com> Date: Fri Apr 16 20:33:10 2021 +0200 Convert internal vcl bitmap formats transparency->alpha (II) we are dealing with real alpha, and not transparency. Also add an assert in GIFWriter::WriteAccess, since it is a logic error to get here and have the image in the wrong format. Change-Id: I0e09b3ca82af0bd5b58d80e0a6eac4c7bdf7c48e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-02Don't enable the requires clause for some Xcode ClangStephan Bergmann
...even when building with -std=c++20 (cf. <https://gerrit.libreoffice.org/c/core/+/155121> "Bump baseline to C++20"), as that causes > In file included from animations/source/animcore/animcore.cxx:20: > In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/util/XCloneable.hpp:8: > workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hpp:32:65: error: invalid application of 'sizeof' to an incomplete type 'animcore::(anonymous namespace)::AnimationNode' > template<typename T> inline constexpr auto isUnoInterfaceType = sizeof (T) && IsUnoInterfaceType<T>::value; > ^~~~~~~~~~ > include/unotools/weakref.hxx:119:33: note: in instantiation of variable template specialization 'cppu::detail::isUnoInterfaceType' requested here > requires(!cppu::detail::isUnoInterfaceType<interface_type>) > ^ > animations/source/animcore/animcore.cxx:310:44: note: in instantiation of template class 'unotools::WeakReference<animcore::(anonymous namespace)::AnimationNode>' requested here > unotools::WeakReference<AnimationNode> mxParent; > ^ > animations/source/animcore/animcore.cxx:122:7: note: definition of 'animcore::(anonymous namespace)::AnimationNode' is not complete until the closing '}' > class AnimationNode final: public AnimationNodeBase > ^ at least with Xcode 14.3.1. Change-Id: Iea6690578cd328545f54254acc0099947778c03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155220 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>