summaryrefslogtreecommitdiff
path: root/include/vcl
AgeCommit message (Collapse)Author
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-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-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-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-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#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-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-23vcl: migrate text layout functions out of OutputDeviceChris Sherlock
OutputDevice is not where text layout should be done. There are a number of text layout functions that are used across the text layout classes, so I have moved them into TextLayoutHelper and made the text layout classes rely on this. I have made TextLayoutHelper implement the ITextLayout interface because this is still useful to new classes that need to implement new text layout functionality. Change-Id: Ic137a938576e7a6a64db0e5780bbbdd8342ef421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157362 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-10-22Fix typoAndrea Gelmini
Change-Id: I4266832365533330e2a1e2f3a8fdd8abf1a99443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158321 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-21tdf#135922 a11y: Prepare reporting text attrs as IA2 obj attrsMichael Weghorn
According to the IAccessible2 specification, some of the attributes that LibreOffice handles as text attributes are mapped to IAccessible2 text attributes as well [1], but others should be reported as object attributes [2], e.g. text alignment is reported via the "text-align" object attribute on the paragraph object. So far, `AccessibleTextAttributeHelper` was only handling attributes that are mapped to IAccessible2 text attributes. Prepare for reporting object attributes as well, which will be required to report text alignment on Windows in a compliant way (s. tdf#135922). On the other hand, Qt also expects `QAccessibleTextInterface::attributes` to return text formatting using the attributes specified in the IAccessible2 attribute specifications and maps that to the platform-specific attributes (AT-SPI text attributes on Linux), but currently does not provide any way to report object attributes in addition to text attributes. It however supports e.g. the "text-align" attribute mentioned in the IAccessible2 object attribute specification when it's reported as a text attribute [3]. Therefore, add a new `IA2AttributeType` enum that can be used to specify what kind of IAccessible2 attributes (text attributes, object attributes) to report. Only request IA2 text attributes on Windows when text attributes are requested, but both types for Qt. So far, support for none of the object attributes has been implemented, but an upcoming change will do that. [1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes [2] https://wiki.linuxfoundation.org/accessibility/iaccessible2/objectattributes [3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=546208f0ff23819d216cbb5bf0b5daded79b454e#n2193 Change-Id: Ief7c840d3c5274714a914ca0e56df0c5eaffb06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158255 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-18Fix typoAndrea Gelmini
Change-Id: Ie54bc5f012d2de46363da9d19278736a732a1a25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158125 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-18tdf#157696 qt a11y: Move handling for text attr offsets to helperMichael Weghorn
Add a new method `AccessibleTextAttributeHelper::GetIAccessible2TextAttributes` and move some more of the logic from `QtAccessibleWidget::attributes` there to prepare adding handling for spelling errors via the "invalid:spelling" IAccessible2 text attribute and for reuse in winaccessibility. Change-Id: I3b4a89ee680437fa2c35c429639b372a55f5a4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158088 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-17tdf#157792 FILEOPEN: PPT: logo not displayedNoel Grandin
regression from commit 3622404f09448b82c095256140afe6240b522ece Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Oct 11 12:54:43 2023 +0200 tdf#157636 FILEOPEN: PPT: Images have no background But actually from commit 81994cb2b8b32453a92bcb011830fcb884f22ffe Convert internal vcl bitmap formats transparency->alpha (II) where BitmapEx::CombineMaskOr was not properly updated. To make this stuff more obvious, add a version of CombineOr called AlphaCombineOr that only operates on AlphaMask objects. Change-Id: I8222bcdd7babefb748d21a71d02775c6a74bf068 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-14Add NUMBERSIGN key handler.Gökay Şatır
German keyboard layout has number sign key. Users can print number sign without using modification keys. So this key can be assigned a shortcut. Subscript is assigned to CTRL + NUMBERSIGN. Below PR is used as reference when adding the new key handler: https://gerrit.libreoffice.org/c/core/+/86713 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I340dc47764e9200d2477f8db740a629f62f48004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-12tdf#157696 vcl a11y: Move qt's translation to IA2 text attrs for reuseMichael Weghorn
Qt expects the text attributes to be reported as IAccessible2 attributes. Therefore, there is a translation/conversion from the LO-internal text attributes to IAccessible2 text attributes in `QtAccessibleWidget::attributes`. Move the logic from the qt-VCL-specific code into a new VCL helper class `AccessibleTextAttributeHelper`, so it can be reused in winaccessibility in following commits. Change-Id: I434481faa53c74bae95cae5b2c9f0907b87fb1bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157804 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-12cool#7318 Calc rendering acceleration (part2)Noel Grandin
we are spending a lot of time in SalLayoutGlyphsCache::GetLayoutGlyphs, and most of that is inserting into the GlyphsCache, which has a very very large key. Shrink that key a little bit Change-Id: I6f27c147652521502dba4517afd9a2ae2a6daebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11cool#7318 Calc rendering accelerationNoel Grandin
we are spending a lot of time in SalLayoutGlyphsCache::GetLayoutGlyphs, and most of that is inserting into the GlyphsCache, which has a very very large key. Shrink that key a little bit on 64-bit machines, where tools::Long is 64-bit, which is quite unnecessary for FontMetric fields. Change-Id: I64983d191ba9aeb76671671443ea90f90fd2c401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157753 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-10tdf#157182 vcl,filter: PDF/A export: fix crash due to SE ID mismatchMichael Stahl
The SE IDs in PDFExtOutDevData and PDFWriterImpl are supposed to match. If PDF/A-1 is exported then RemoveTransparenciesFromMetaFile() is called and that does unspeakable things to the Metafile and then we just throw away the PDF related data for the page in PDFExtOutDevData::ResetSyncData(). This means that then EnsureStructureElement are called on PDFExtOutDevData but not on PDFWriterImpl, so on the next page the IDs will no longer match, which is noticed if there is no transparency to be removed on that page. pdfextoutdevdata.cxx:347: bool vcl::PageSyncData::PlaySyncPageAct(): Assertion `id == -1 || id == mParaInts.front()' failed. Guess the easiest way to deal with this is to have the premature ResetSyncData() replay only the EnsureStructureElement actions, which is only possible because they don't really require any extra data stored in the ridiculous vectors in PageSyncData; PDFWriterImpl will eventually remove the elements as they are never initialised. (regression from commit 07d790ca473cd6e71f0343419b819fa6b485dc01) Change-Id: I8eb295504067edff00608e28fd86b0c86d547083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157748 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-10Make some methods const, and avoid some const_castsMike Kaganski
Change-Id: I4964abd34836438e3d24ee7c3c3b324f356477b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157746 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-05Drop MinMax in favor of std::clampMike Kaganski
Change-Id: I021f524b232ddbe091981444d859d35dd9cd05ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157582 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-05Add BitmapReadAccess::GetColorFromDataMike Kaganski
Change-Id: Ie7eb0770dc6c5feaa7b4835bdaebfe688a3a381f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157580 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-04vcl: remove defensive programming from SetCurrentStructureElement()Michael Stahl
Change-Id: I47b0f29a564cdbdd1a55fe4a332fa9efd63af557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157505 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-03Use Degree100Mike Kaganski
Change-Id: I133dbe40d57eda77b64f3e38631da30f296489f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157517 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-30pdf-dialog general-tab: set_sensitive if config not read-onlyJustin Luth
Disable (gray out) Export as PDF options that are enforced (unchangeable) in the settings, similar to how optsave does it for tools - options. It is possible for an config extension to set oor:finalized="true", which needs to prevent the user from changing the value. Noticed during the LibreOffice conference in Bucharest, RO. mxCbExportBookmarks == Export Outlines Change-Id: I27f28107d1c1dc5d46fc6e2b8a8a83933e30d6ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157408 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-27vcl: remove rTargetDevice from OutputDevice::ImplGetEllipsisString()Chris Sherlock
Change-Id: I886510af06bbfb77e24ea004cc3abfd6ff3a8832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157194 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-26Resolves: tdf#151919 mark blanked fields as requiring a reformatCaolán McNamara
the next time a format is requested, even if the value of the Formatter is the same, otherwise if the value is the same it will remain blank. Change-Id: Iec77e6d9f792b51a83a9e289cbdb197605ab1a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157267 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-13tdf#90341 Clean up excessive const_cast'ingsahil
Change-Id: I5e3cc14ed75309d0569a4bad710e7adea007329f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156807 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-05tdf#114441 - Convert use of sal_uLong to better integer typessahil
Updated scrolling related variables to double from sal_uLong Change-Id: Ibf4bb3d55b074b5d2e369e4bc708b87bdfa302b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155644 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-09-04tdf#138792: PDF export: add batch of dublin core attributesSarper Akdemir
Adds support for exporting, editing in the UI and storage in ODF for the dublin core attributes listed below. Contributor (http://purl.org/dc/elements/1.1/contributor) Coverage (http://purl.org/dc/elements/1.1/coverage) Identifier (http://purl.org/dc/elements/1.1/identifier) Publisher (http://purl.org/dc/elements/1.1/publisher) Relation (http://purl.org/dc/elements/1.1/relation) Rights (http://purl.org/dc/elements/1.1/rights) Source (http://purl.org/dc/elements/1.1/source) Type (http://purl.org/dc/elements/1.1/type) Introduces XDocumentProperties2 to extend XDocumentProperties interface. Change-Id: Ie2e0b1fbbbd00b66aef477ba1bf4e4f61c03a3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156330 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04tdf#138792: PDF export: fix date of xmp:CreateDateSarper Akdemir
for pdf export xmp:CreateDate should be the modification date instead of the creation date. Change-Id: I2a86f30cb528cb2bd5e0f9e7c9a8a8b8d2993f50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156327 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-04tdf#134193: Support rendering math in RTL modeKhaled Hosny
Respect IsRightToLeft property and render accordingly. This also fixes math rendering in RTL UI, which was incorrectly rendered RTL. Change-Id: Id8520930f09a21daa1c70e40a765ac25572ea994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155738 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-04tdf#154875 "Use slide background" is only for ImpressSamuel Mehrbrodt
Change-Id: I078437a1cff58b868f4db4b482ad2aff335dc965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156514 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-08-31jsdialog: render font previews with hidpiSzymon Kłos
we pass dpi scale, let's use it to determine combobox entry size Change-Id: I4088eca565b301c5693e52b1c05af1a335fc34fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156115 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156251 Tested-by: Jenkins
2023-08-30make IAccessibleBrowseBox extend cppu::WeakImplHelperNoel Grandin
i.e. push this up from the implementation class AccessibleBrowseBoxAccess to the interface class. Which means we don't need the getMyself helper method, and make the memory management simpler. Change-Id: Icecb83834bb3f5304908bbd3682b3d2ea06dbfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-30make IAccessibleTableControl extend cppu::WeakImplHelperNoel Grandin
i.e. push this up from the implementation class AccessibleGridControlAccess to the interface class. Which means we don't need the getMyself helper method, and make the memory management simpler. Change-Id: Iced5f259638531a74ce86876d1a295e105530474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-30a11y: Drop AccessibleChildren typedefMichael Weghorn
It's only used a single time anyway. Change-Id: Icef8bb635b9cf2cb2d244619fb9b63eb395213d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-30Fix typoAndrea Gelmini
Change-Id: Ibc68bc830aaf01d2ad3df8cf11bb150ef60eea6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156263 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-29Fix typoAndrea Gelmini
Change-Id: If4a80e7a3427e88f29e6ee36d05ec96ae820b60e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156249 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-08-29vcl,sw: PDF export: move SwEnhancedPDFExportHelper statics to memberMichael Stahl
New struct SwEnhancedPDFState to contain the state; it is transported from SwEnhancedPDFExportHelper instance to SwTaggedPDFHelper instances via vcl::PDFExtOutDevData. Change-Id: I0c0f10587ce8bc6f5f1125da4761b7504ad2b970 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156241 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-08-27tdf#150610 fix broken rendering of text meta actionsPatrick Luby
Even when drawing to a VirtualDevice where antialiasing is disabled, text will still be drawn with some antialiased pixels on HiDPI displays. So, expand the size of the VirtualDevice slightly to capture any of the pixles drawn past the edges of the destination bounds. Change-Id: Ibcba8234708d8784c12f984289ec0a8fcad6694e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156098 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-08-27Add APNG export option in File -> ExportParis Oplopoios
A separate filter was made to allow for the option of exporting a still image instead if the user wants to Change-Id: I8140c834990e592ee579425d6cd18ae764128576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155878 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-24vcl: Allow pushing/popping OutputDevice’s RTLEnabled stateKhaled Hosny
Change-Id: Icafdc307c5c9df768f00c3ac0d128936607bf3e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155794 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-23tdf#146619 Remove unused includes from vcl/incGabor Kelemen
Change-Id: I8fbe02547d5045cfdb5021720b10ddd10106209a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@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-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>