summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-03-11Use weak reference to SfxObjectShell in SfxEventHint to avoid use-after-freeMike Kaganski
The events may be processed after the shell has been destroyed. This is happening reliably after commit e2bfc34d146806a8f96be0cd2323d716f12cba4e (Reimplement OleComponentNative_Impl to use IGlobalInterfaceTable, 2024-03-11) when controlling LibreOffice from external Java scripts; but obviously, it could happen before as well. Now SotObject inherits from cppu::OWeakObject, instead of SvRefBase. Change-Id: I73a3531499a3068c801c98f40de39bdf8ad90b2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164458 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-11Remove redundant function indirection in SfxHintPosterHassan Sajjad
SfxHintPoster::mLink always pointed to SfxDispatcher::PostMsgHandler and except in ~SfxDispatcher, it was reinitialized to empty i.e. cleared. This extra indirection is now removed. SfxHintPoster was using SvRefBase to persist even after SfxDispatcher was deleted and then deleted itself after SfxHintPoster::Post call was completed. This extra indirection was adding 4-5 frames while debugging. Change-Id: Ibfd6d3aea10ddf45732adc1a9d63a25717a771fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162700 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2024-03-10tdf#90242 Navigator: Improve custom shape namingJim Raykowski
This patch makes the Draw/Impress Navigator display the name retrieved by SdrCustomShapeGeometryItem::GetPropertyValueByName("Type") for custom shape objects when the custom shape is unnamed and the Navigator is set to show all objects. For Writer and Calc, this patch makes inserted fontwork custom shape objects be automatically named 'Fontwork N'. Change-Id: Ice34461fe7a4b26d01b2d93e871a956dc55392f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152568 Tested-by: Jenkins Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-03-09Support o3tl::iterateCodePoints with both sal_Int32 and std::size_tStephan Bergmann
...and clean up the most gross casting offenses Change-Id: If0d646fb3e73e71a9a2735569395034973563a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-09tdf#158773 avoid some OUString constructionNoel Grandin
Change-Id: I42c6b7a8c7b0c0af17a2806c908f5a336ef206d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-09Fix typoAndrea Gelmini
Change-Id: Iebc31f3dc1d99406e23ee4b89f12cd78b424826d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164600 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-08tdf#158773 reduce size of IndexedStyleSheetsNoel Grandin
we don't need to store SfxStyleFamily::All in the mStyleSheetsByFamily array, the call sites just iterate over the main vector for that case. Change-Id: I17fca2aa59e786d6dee13c884dedb9fde847b979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 reduce cost of stylesheet lookupNoel Grandin
we can store pointers styleSheetsByFamily and avoid having to access the vector Change-Id: I36b5df981b6e53d9aa4193de419fc6a44f0ed2da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 GetNumberOfStyleSheets can be an inline methodNoel Grandin
Change-Id: I24a013d74bf8f9336496232d585ac1f0b069696c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164572 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 flatten data of IndexedStyleSheetsNoel Grandin
we can store the mStyleSheetPositionsByFamily inline, since it is fixed size, and save some allocation overhead, and some pointer chasing. Change-Id: Id6ff02491e967b9fb145ba9752f4a52173692645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08LOK: send inner text boundry information of shapes/textbox on changePranam Lashkari
instroduced new callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXT now if innert text is changed LOK is instantly updated about new textarea Change-Id: I0a88e1dd77556e47f14359ce0a98701a327aceda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164497 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07tdf#158773 reduce dynamic_cast'ing in TextProperties::NotifyNoel Grandin
Change-Id: If4a68433c57fdf3da56891fa0b4be6f8a991d929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07ResetDefaultSystemCurrency can be privateCaolán McNamara
only called by a friend from the same .so Change-Id: I5f63e83325b291b95b0132089dc331f3b7e79362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07IsSpecialStandardFormat can be private, only used internallyCaolán McNamara
and rename to ImpIsSpecialStandardFormat Change-Id: Ie20c83906559f94e545f384807396ec8acf970f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164537 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07Collaborative editing with readonly and edit views.Gökay Şatır
We can have both readOnly and editor views at the same time while collaboratively editing a document. Our current solution is to disable any command if the user's view is readonly. We want to have a closer behaviour to desktop app with readonly views. For this purpose, we are allowing more interactions from online server to core side. We also need to filter out the events like the core side readonly view do (next commit). This commit initiates the readonly view infrastructure. The patches previous commit reverts were an example of how we disable things in readonly mode. We needed to open a window for getting hyperlink information. With this patch, we try to separate the edit and readonly view modes on core side. More notes: We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an endless loop with this patch. When we disable editing on a browser, almost all user actions are disabled. (cherry picked from commit 81dae2ca5187bd24aea0befb099a5b53535b5d03) Change-Id: Ia25368dd8065206ec6b4b83eb2f685531110cc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164527 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-07tdf#159931: pptx export: export each used slide layout for a masterSarper Akdemir
attempts to fix the slideLayout reference related regression from Idb6b88ebe87a83818d8eb27a1fa087652a002c0c. To correctly export the all used slideLayout instances for a given master, iterate through sdr::PageUsers of that master and figure out all used layouts. Change-Id: I0f58befac1ba4d5ec01aeedbb5f611c83683dcf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164468 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de> Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-03-07Revert hyperlinkInfoAtPositon changes.Gökay Şatır
Revert "Implement hyperlinkInfoAtPosition for Impress." This reverts commit 876543305c78cb596720da087454a5c54e5feb06. Revert "Readonly Hyperlink Info - normalize the clicked coordinates." This reverts commit 322669725b771f5fa2b3c10c5fb73238ca3713f6. Revert "Implement hyperlinkInfoAtPosition function for Calc." This reverts commit be01dd78c47b51b19603a6259504e29b11979b0b. Revert "Implement hyperlinkInfoAtPosition for Writer." This reverts commit 6773c8929690f557d29bc282dd8f5c4381da3484. Revert "In readonly mode, we restrict many events like click." This reverts commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd. (cherry picked from commit c3f1d63178d6aaa0888085c7b641eb6d49a18276) Conflicts: sc/source/ui/unoobj/docuno.cxx sd/source/ui/unoidl/unomodel.cxx sw/source/uibase/uno/unotxdoc.cxx Change-Id: Ie821a4bca6e6b4649cea17748c44af105cd45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-07tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::NotifyNoel Grandin
shaves 2% off the load time Change-Id: I579825bd6101b57a44b0f3118ede17ec2393d9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06tdf#158773 reduce cost of ContentInfo::GetTextNoel Grandin
The specific path that is showing up on the perf profile is SdrTextObj::HasText -> EditTextObjectImpl::GetText -> ContentInfo::GetText Reduce the cost by 10% there by adding a method to check if we have text, and avoid the cost of constructing an OUString from an svl::SharedString. Also make use of the new method in places. Change-Id: Ibc2e0f61c4a2a6c33eea7f2cce09d692d82fd2b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164449 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06remove deprecated IsGermanPreReform propertyNoel Grandin
deprecated in 2008 (and seemingly never even implemented) Replace the use of this property in sample code and in Java unit tests with another property (I arbitrarily selected "IsIgnoreControlCharacters") Change-Id: I2cb474f895ac221952b59e98bfdbc01012095519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164355 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-05map SAL_DLLPUBLIC_RTTI to visibility:default for gccNoel Grandin
Because I want to make more symbols private, but that runs into a problem with the special symbol "typeinfo for Foo" which is required for dynamic_cast. For clang, we can use SAL_DLLPUBLIC_RTTI to make just that magic "typeinfo for Foo" symbol visible. But for gcc, we are left with no option but to make the whole class visible via <MODULE>_DLLPUBLIC. (I have a feature request logged against gcc to support something like that at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113958) But I also don't want to use <MODULE>_DLLPUBLIC, since that blocks progress of reducing symbol visibility for platforms other than gcc. So map SAL_DLLPUBLIC_RTTI to visiblity:default for gcc, which means that only gcc suffers the negative affects of not having that annotation. However, that runs into the problem that gcc does not like visibility:default in a couple of places, so I have to introduce some extra preprocessor stuff. Change-Id: Ib4fc5c1d2a1f8cf87d5159a4b5684137ec061605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164356 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-05Fix Windows --enable-mergelibs=more buildNoel Grandin
after commit 68f55fc9a1aa8c0f403761e39e7531ae298ea79e Author: Vasily Melenchuk <vasily.melenchuk@cib.de> Date: Wed Oct 25 22:26:14 2023 +0300 vcl: interface for WinAPI FlashWindow() function and commit 621e16205363c1eea0be57017997396dee63df4b Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri Mar 1 15:58:23 2024 +0200 add UNLESS_MERGELIBS_MORE and use to reduce symbol visibility Change-Id: I32660173d255b4b49a346c56fadf998968580a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-04tdf#132599 cui offapi sw xmloff: implement hyphenate-keepLászló Németh
Both parts of a hyphenated word shall lie within a single page with ODF paragraph setting fo:hyphenation-keep="page". The implementation follows the default page layout of MSO 2016 and newer by shifting the bottom hyphenated line to the next page (and to the next column, see last note). Note: this is a MSO DOCX interoperability feature, used also in DTP software, XSL and CSS. * Add checkbox/combobox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep) * Add ODF import/export * Add ODF unit tests New constants of com::sun::star::text::ParagraphHyphenationKeepType, containing ODF AUTO and PAGE (borrowed from XSL), and for the planned extension ParaHyphenationKeepType of ParagraphProperties: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Note: the implementation truncates only a single hyphenated line, like MSO does: the pages can end in hyphenated lines (i.e. in the case of consecutive hyphenated lines), but less often, than before. Clean-up hyphenation dialog by collecting "Don't hyphenate" options at the end of the hyphenation settings, and negating them (similar to MSO and DTP), adding also the new option "Hyphenate across column and page": [x] Hyphenate words in CAPS [x] Hyphenate last word [x] Hyphenate across column and page Note: ODF fo:hyphenation-keep has got only "auto" and "page" attributes, while XSL defines also "column". Because of the interoperability with MSO and DTP, fo:hyphenation-keep="page" is interpreted as XSL "column", avoiding hyphenation at the end of column, not only at the end of page. Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2024-03-04Add Embind'ing of UNO Any getter for sequencesStephan Bergmann
Change-Id: I5b81ad3d5f1351062aef43105ea7ec4678045a90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164360 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-04Add Embing'ing of UNO Any getter for enumsStephan Bergmann
...which taps into the internals of emscripten::val, which is based on std::type_info identifiers, so we need an additional statically-built mapping between UNO (enum, for now) types and std::type_info Change-Id: I9fc1ff33fe31a1e1052504905de446ed2193e014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164359 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-04svx: prefix members of XGradientEntryMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ib00e0ea61ad421eb1d02d973ab8dc8c79b006a64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164326 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-04vcl: interface for WinAPI FlashWindow() functionVasily Melenchuk
To improve LibreOffice UX it will be great to have possibility to signal user on some event did happen, but without capuring focus and bringing LO to foreground, like it is happenings sometimes. It can be annoying. For example, if dialog window is opening slowly and user did switch to another application, this is used to inform user that there are some updates in LO window: dialog finally alive. There are somewhat confusing implementation of this feature: VCL dialog window became visible and actual Windows window should use ::FlashWindow() are very different in hierarchies, so it is somewhat challenging to find window to flash or even decide shoud we flash window or not. Change-Id: I6ca6706d2dda8902aea273ebe6e318ec9bf4beda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-03-04cool#8327 use tools::JsonWriter for theme colorsNoel Grandin
Change-Id: Iebca3781910f9e28100258da8266d51f673f31d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164232 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-04finish removing IsSpellCapitalisation propertyNoel Grandin
which was partially removed in commit 9bb9ba6ae02692e65498bae4598e3b63bb65c02e Author: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Date: Mon Oct 2 12:33:34 2023 +0200 [API CHANGE] Remove deprecated IsSpellCapitalization Change-Id: I861c8c484b77a041d91cb25ddeecb7027a2fd96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164183 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-04Fix --enable-mergelibs=more --enable-sal-log buildStephan Bergmann
...after 621e16205363c1eea0be57017997396dee63df4b "add UNLESS_MERGELIBS_MORE and use to reduce symbol visibility" caused > vcl/source/opengl/x11/context.cxx:118: error: undefined reference to 'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > const&)' > vcl/source/opengl/x11/context.cxx:270: error: undefined reference to 'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > const&)' > vcl/source/opengl/x11/context.cxx:370: error: undefined reference to 'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > const&)' > vcl/source/opengl/x11/context.cxx:251: error: undefined reference to 'OpenGLHelper::debugMsgStream(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > const&)' > collect2: error: ld returned 1 exit status > make[1]: *** [vcl/Library_vclplug_gen.mk:20: instdir/program/libvclplug_genlo.so] Error 1 Change-Id: If27b1ffaad7b40dd3baffa8b3a33b1cc3a8e7153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164314 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-03Resolves: tdf#159879 Crash when closing "3D View" dialogCaolán McNamara
Change-Id: I9c116007afe9cea97b597933ad8483dce25c3707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164295 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-02avoid a memcpy when constructing output of tools::JsonWriterNoel Grandin
we can store the data in an rtl::OString object and then return that directly Change-Id: I65af6820bfd3135b38d437cf9736fffff8924e88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164291 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-02add UNLESS_MERGELIBS_MORE and use to reduce symbol visibilityNoel Grandin
Change-Id: I2e6c2dcd06c76e0f5f68a1debde3a20665104b27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164219 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-01tdf#126573 Add Excel2021 array function FILTER to CalcBalazs Varga
https://issues.oasis-open.org/browse/OFFICE-4156 TODO: add dynamic arrays would be useful: Older array formulas, known as legacy array formulas, always return a fixed-size result - they always spill into the same number of cells. The spilling behavior described in this topic does not apply to legacy array formulas. More info about it: https://support.microsoft.com/en-gb/office/dynamic-array-formulas-and-spilled-array-behavior-205c6b06-03ba-4151-89a1-87a7eb36e531 Related Bug: https://bugs.documentfoundation.org/show_bug.cgi?id=127808 Change-Id: I1c3769ef33fa0207f55e1c96083717c2d90402e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163955 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-03-01tdf#94535 Change "Fontwork" to "Text along Path"Olivier Hallot
+ Applied to Draw and Impress format menu + Applied to Curve context menu + Connected to tdf#118336 Help page. Change-Id: Ibb5d2edf7f5baccf49852b62008aed1c89409f45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162047 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-03-01tdf#159837 Drop unneeded TabBar EventNotify KEYINPUT handling codeJim Raykowski
to make qt and windows VCL backends respond to shortcuts when the keyboard focus is on a TabBar tab. commit 51f8e04eaaea50b779e3882e87628a6e625e0fd8 done to make the Shift+Ctrl+F10 short cut, used to dock/undock the sidebar, work from the sidebar tabbar appears no longer necessary. Simply passing the KEYINPUT event on to InterimItemWindow::EventNotify seems to be enough. Change-Id: Idfa8be4260d31e686acf1b49e89549deb9463a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164051 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-02-29IASS: Update edited Text in other ViewsArmin Le Grand (allotropia)
This was not working for multiple Windows for a document, and also not supported for SlideShow until now. If you edit a Text on a Slide (Object, PresObj, ...) that text is not yet set at the Model until the TextEdit ends. In that situation those changes are now propagated to other views visualizing that object. This is done with slight slowdown to not do it all the time while typing, (currently 350ms, grepped from other places in the office). It will be shown in a running open SlideShow (and evtl. trigger an effect at the Object as Preview). This will allow to get a good preview for how it looks in the SlideShow. This is also done for further EditViews opened for that Document. This was not done before. It is fine-tuned to do this only for the Views besides the EditView with the running TextEdit to not cause slowdowns in that active view - the TextEdit is already running on the Overlay to have no problems with speed, this needs to be preserved. I had to fix a multi-view error in the a11y stack that implied that only one view exists and thus has to have an Outliner - that is wrong for multiple views, only one will have one. Change-Id: I781d32a8fcb8732ee8fcfbae72c02d1f99b6cd06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164160 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-29IniLnge is set during ctor and never changes subsequentlyCaolán McNamara
Change-Id: Ie052e32976d9810555c8f1892dab47a7472cdc71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164149 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29if we rearrange, we don't need to create maLanguageTag twiceCaolán McNamara
Change-Id: I2c8ad9999adc406dc850c59b48e49681099dc054 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29there is only the one ctor, so drop misleading "preferred" commentCaolán McNamara
that suggests there are alternatives to choose from Change-Id: Ica3367fae93f57f339bdc39b1cd91d47a2c9618e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164146 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29vcl: separate scanline direction from ScanlineFormatTomaž Vajngerl
ScanlineFormat enum is used to indicate 2 things - scanline format type and scanline direction (TopDown or BottomUp). This makes it complex to manipulate with (using bit arithmetics) and hard to use in general for no benefit, so this commit separates direction out from the ScanlineFormat into ScanlineDirection enum. ScanlineFormat is now just a simple enum class (not a bit field). Change-Id: Iad55d0a4c8c07b71221c2facf7cf6a2d518fec0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163943 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-29SvNumberFormatter::ImpConstruct is only used once by the single ctorCaolán McNamara
so fold it into the ctor Change-Id: If063143ef47a8ab293edf3896fb51079d0e0284f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29Simplify a bitMike Kaganski
Change-Id: I9fbc43916fe0d7af87001e48854a87636115a1f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164133 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29tdf#155218 sc: fix regression page orientation in print dialogTibor Nagy
The print page orientation set in the Print Dialog displays incorrect print area borders on the sheet after closing the Print Dialog or interrupting the printing process. The print dialog increase in size if the "Pages" and "All pages" radio buttons are toggled many times.(problem is not reproduced on Windows) regression was made by: I5e494a0714e398221bee00744d7e25c419a41df7 Change-Id: I5a0ab3d781b21eff575afaebb233237eff1827d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164085 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-02-28drop EEControlBits::FORMAT100Caolán McNamara
FORMAT100 is only used by calc (since #i51508#) and looks to me as a workaround for the same fundamental issue addressed by contemporary resolution independent text layout and rendering. Change-Id: Ifd0a0adaff717da97bb94d9f81e14c65f3213d34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164084 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-28use more string view in linguisticNoel Grandin
Change-Id: Ib5c776f95b424128871a1676d996ae95b7048c64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-28tdf#159874: Inspection of 3D object in Dev Tools crashes LO (take 2)Julien Nabet
To not trigger tdf#159911 (FILEOPEN: 3D object is displayed as black/white) Let's initialize Svx3DTextureKindItem to 2 which corresponds to COLOR in TextureKind2.idl (see https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/TextureKind2.idl?r=5687eba4) but now to avoid the crash, we must replace all uses of TextureKind by TextureKind2 Anyway, TextureKind has been deprecated since 2000 (see https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f9e6d84feb36ab3072dafbab0ba4ae46d264f9b "#80594# added a new TextureKind2 enum because of missing value in TextureKind") + use css::drawing::TextureKind2_LUMINANCE + css::drawing::TextureKind2_COLOR instead of wrong numbers Change-Id: I969bd9ba1c6752111a6e6f5cd2c6c608568e43e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163998 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-27tdf#159910 a11y VclBuilder: Apply tool item's a11y name to itselfMichael Weghorn
For the VCL `ToolBox` implementation of a toolbar, the items are not represented by own widgets (`vcl::Window`s), but handled by the `ToolBox`. As a consequence, the `vcl::Window` passed to `VclBuilder::applyAtkProperties` cannot be the tool item itself (e.g. a `GtkToolButton` in the .ui file), but is the `ToolBox`, i.e. the (VCL builder implementation of the `GtkToolbar` parent widget in the .ui file). So far, the ATK properties set for the tool item were just applied to the parent instead. For example, with the upcoming Change-Id: I852503e849651bb7be4daa419ec2379568623f0f Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Feb 27 11:51:55 2024 +0100 tdf#159910 sw a11y: Set a11y names for Navigator items , this would result in the toolbars getting the name of their last item (one of the toolbars in the Navigator would get the a11y name "Show Up to Outline Level") and the toolbar items would only have an a11y name set because they still fall back to the tooltip text for the a11y name. Adjust that to set the accessible name for the actual toolbar item when a toolbar item is processed. (Add a bool param to indicate that). See also `VclBuilder::applyPackingProperty` which already had a similar way to determine and handle that case. With this in place, the accessible name set in the .ui file is now applied to the toolbar item as expected. (The accessible description could be handled similarly, but I'm a bit more hesitant to add that right away because the accessible description is currently also used for the extended tooltip text and the NVDA screen reader on Windows announces the description in addition to the name by default.) Change-Id: I45b87839dda90083ceba1c43fdb4d4ec460fce3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164034 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-27tdf#159910 vcl a11y: Allow explicitly setting toolbar item a11y nameMichael Weghorn
Add `ToolBox::SetAccessibleName` (and corresponding getter) to allow explicitly setting an accessible name for a toolbox/toolbar item with the VCL toolbar implementation. In the a11y class for a toolbar item, use any explicitly set name if it's non-empty, otherwise fall back to the previous logic. This will be used in an upcoming commit to take into account the accessible name set in .ui files and align the VCL ToolBox more with the gtk implementation using native GtkToolbar and native widgets for the toolbar items. Change-Id: Ib0255e2741a7ab2489a857ac120fb87f680fa775 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164033 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>