summaryrefslogtreecommitdiff
path: root/toolkit/source/helper
AgeCommit message (Collapse)AuthorFilesLines
8 daysSome missing "block untrusted referer links" for form controlsStephan Bergmann1-0/+2
...where "Referer" is now passed in as an additional property, so that the relevant objects can decide whether to obtain graphics while loading a document Change-Id: Ie3dabc574861713212b906a0d7793f438a7d50a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168674 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-05-15loplugin:ostr in toolkitNoel Grandin2-2/+2
Change-Id: Ia70d03713bfb7621196d2bd12473d3cf1c2ef1b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-04replace createFromAscii with OUString literals in toolkitNoel Grandin1-24/+0
Change-Id: I039ee0068cdd8640678524079dd60540abbf876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167126 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-02-29Create an UNO service to do the symbol lookup in toolkit::AccessibilityClientNoel Grandin1-31/+6
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the accessibility module into --enable-mergelibs=more Change-Id: I8664ae1d2da4526cc7eab79b36e1589eb391d7c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163680 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-24remove dummy accessibility factoryNoel Grandin1-129/+8
because when the dynamic symbol lookup fails, the dummy factory returns nullptrs to code expecting valid pointers, and end up with a much harder bug to diagnose, instead of failing at the actual problem site. Change-Id: I8e4885dc192b7089e1b1716567b41420309e8984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-08cid#1545370 COPY_INSTEAD_OF_MOVECaolán McNamara1-4/+3
and cid#1545364 COPY_INSTEAD_OF_MOVE cid#1545363 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545299 COPY_INSTEAD_OF_MOVE cid#1545287 COPY_INSTEAD_OF_MOVE cid#1545267 COPY_INSTEAD_OF_MOVE cid#1545256 COPY_INSTEAD_OF_MOVE cid#1545226 COPY_INSTEAD_OF_MOVE cid#1545500 COPY_INSTEAD_OF_MOVE cid#1545538 COPY_INSTEAD_OF_MOVE cid#1545618 COPY_INSTEAD_OF_MOVE cid#1545681 COPY_INSTEAD_OF_MOVE cid#1545750 COPY_INSTEAD_OF_MOVE cid#1545778 COPY_INSTEAD_OF_MOVE cid#1545785 COPY_INSTEAD_OF_MOVE cid#1545799 COPY_INSTEAD_OF_MOVE cid#1545847 COPY_INSTEAD_OF_MOVE cid#1545958 COPY_INSTEAD_OF_MOVE cid#1545963 COPY_INSTEAD_OF_MOVE cid#1545990 COPY_INSTEAD_OF_MOVE cid#1546013 COPY_INSTEAD_OF_MOVE cid#1546029 COPY_INSTEAD_OF_MOVE cid#1546079 COPY_INSTEAD_OF_MOVE cid#1546104 COPY_INSTEAD_OF_MOVE cid#1546127 COPY_INSTEAD_OF_MOVE cid#1546133 COPY_INSTEAD_OF_MOVE cid#1546155 COPY_INSTEAD_OF_MOVE cid#1546190 COPY_INSTEAD_OF_MOVE cid#1546216 COPY_INSTEAD_OF_MOVE cid#1546273 COPY_INSTEAD_OF_MOVE cid#1546315 COPY_INSTEAD_OF_MOVE cid#1546326 COPY_INSTEAD_OF_MOVE cid#1546387 COPY_INSTEAD_OF_MOVE accept some reasonable suggestions Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann1-4/+2
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-01tdf#104833 a11y: Use VCLXAccessibleEdit for VCLXMultiLineEditMichael Weghorn1-0/+5
Instead of the generic `VCLXAccessibleComponent`, use `VCLXAccessibleEdit` as a11y class for `VCLXMultiLineEdit` (the component interface class for MultiLineEdit) as well, not just for `VCLXEdit`. With the preparatory changes from Change-Id I8218db61feb07605f6ea5309f26eebd38312458a tdf#104833 a11y: Don't use VCLXEdit in VCLXAccessibleEdit in place, it behaves as expected when interacting with the multi line edit from the sample dialog in attachment 189287 in tdf#104833 using Accerciser and the qt6 or gtk3 VCL plugin (and the text can also be edited when removing the readonly flag from the control) or the update dialog (which uses UNO controls, `UnoControlEditModel` for the panes that were not announced, s. extensions/source/update/check/updatehdl.cxx ). In particular, the a11y text interface is supported by the multi line edit on the a11y layer, which makes Orca with the gtk3 VCL plugin announce the text content when the control gets focused. NVDA on Windows still announces "Checking..." instead of using the actual text that would be retrievable via the IAccessibleText interface now. This is probably because "Checking..." is the (outdated) accessible name, as can be seen by interacting with the object in NVDA's Python console: >>> focus.name 'Checking...' >>> txt = focus.IAccessibleTextObject >>> txt.text(0, txt.nCharacters) 'LibreOfficeDev 24.2 is up to date.' For both, gtk3 and qt6, the a11y object does have the new text as a11y name as well, as can be verified in Accerciser: In [10]: acc.name Out[10]: 'LibreOfficeDev 24.2 is up to date.' In [11]: txt = acc.queryText() In [12]: txt.getTextAtOffset(0,3) Out[12]: ('LibreOfficeDev 24.2 is up to date.', 0, 34) Change-Id: Id80e191cdd5342b3215fdb9d2ad3847470366337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156402 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-18tdf#156561 a11y: Create VCLXTopWindow peer for border win frameMichael Weghorn1-0/+7
If a border window is a "native frame", i.e. a top level window, then also create a `VCLXTopWindow` for it instead of just a simple `VCLXWindow`. This also addresses another cause why the Calc autofilter popup would not be announced by the NVDA screen reader before 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 For winaccessibility, an accessible event listener is registered for an object when either `AccTopWindowListener::windowOpened` gets an event with the top level window set or the parent of the window sends an `AccessibleEventId::CHILD` event for the child object. In case of the autofilter popup in Calc, the top-level border window of the work window (created and set in `WorkWindow::ImplInit` and retrieved via `Window::GetFrameWeld` in `ScGridWindow::LaunchAutoFilterMenu`) is set as the parent window of the popup, but since it is a top-level window and was so far not considered as such due to its peer/component interface not implementing `XTopWindow` (s. `Window::IsTopWindow` and the corresponding check in `VCLXToolkit::callTopWindowListeners`), it would not have any accessible listener set, and thus no child event for its new popup child would be sent to the winaccessibility layer. Therefore, no accessible events would be sent for the popup and it's children either, resulting in NVDA not announcing any focus changes, etc. With this change in place, NVDA announces focused items in the auto filter popup even with a revert of the above-mentioned commit (and follow-up commits), except for submenu entries (which still suffer from another problem that will be addressed separately). Change-Id: I69c6066127c8b853a27cc1f692f139572541f8eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155800 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin1-0/+1
(Second attempt at landing this) Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Add a couple of new Color constants to make the intention of the vcl code clearer. Notes (*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask to more accurately reflect the requirements of the CGImageCreateWithMask function seems to fix some tests. (*) The vcl code does not properly support gradients with transparency. So the previous code was wrong, and this change is going to result in slightly different wrongness. Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-09move a toolkit header inside the moduleNoel Grandin2-2/+2
It is only used inside the module, no need to be public Change-Id: Ibd8445ecbb67624569ee7225f0bdf6d9c041dab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10pack the ImplPropertyInfo structNoel Grandin1-3/+3
Change-Id: I08d163824ca0ed4fdba91d1e0d4d7f076c64a4dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10use std::unordered_map for static properties in toolkitNoel Grandin2-79/+31
which is faster than binary lookup Change-Id: Ia810313af36c75fd9b5b241704f0cbd66afcb6b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-01use more XVclWindowPeerNoel Grandin1-4/+4
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere. Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-22BaseMutex->std::mutex in ListenerMultiplexerBaseNoel Grandin1-2/+7
Change-Id: Icd565c83ca3b4afb1a846a637b7943b0498487e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147457 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-16XUnoTunnel->dynamic_cast in VCLXBitmapNoel Grandin1-1/+1
Change-Id: I2cf42ac720184bc2b8b89ced5564dbb95e7dc1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145535 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-16XUnoTunnel->dynamic_cast in VCLXRegionNoel Grandin1-1/+1
Change-Id: I75956a2c713d52c01dcfd47fc0b8506ba526523e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145532 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13XUnoTunnel->dynamic_cast in VCLXFontNoel Grandin1-1/+1
Change-Id: I4afa34805e64f3ff37b76fe8ca4676c1f4eb3e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13XUnoTunnel->dynamic_cast in VCLXDeviceNoel Grandin2-6/+6
Change-Id: I9fa06600d3b9a2172a1818f89a3b9c06d65c8c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann1-2/+1
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-19remove dependency from drawinglayer to frameworkNoel Grandin1-789/+0
to try and untangle the dependency mess a little. This means (*) tunneling a piece of information from VCLXWindow via the XWindowPeer::getProperty method, so we do not need to directly call VCLXWindow. (*) moving some formpdf code from framework "down" to vcl, where the drawinglayer code can use it Change-Id: I2c1ff3e34941b3147e66cf0a2d0fdb13293e3aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-16loplugin:unocast (VCLXWindow)Stephan Bergmann1-1/+2
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: Ic151fd657cb780291009ee4c9db51a35dfa7f357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-19loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: I5dcba14a9b0dfcc5267760410f6d135fcd3b1bd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142944 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19tdf#149797 Change highlight background color in some controlsIlhan Yesil1-0/+2
The highlight and highlighttext colors can be set for some controls. So as example a selected item in a listbox can now be paint with anothers colors then the standard blue. Controls are: listbox, combobox, edit field and some special edit fields like date, currency and others. Change-Id: Iace2dd9a1a61abb7819b6c81eb0b8030912db32b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136691 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann2-2/+2
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-02clang-tidy modernize-pass-by-value in toolkitNoel Grandin1-2/+3
Change-Id: I51823060a967b5c9f304af587ed4f9c262734be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-14Fix leak with stock widgets in a dialog from an extensionSamuel Mehrbrodt1-0/+6
When loading a dialog from XDL, buttons can have dlg:button-type="cancel" or dlg:button-type="help". These buttons might not have a peer when they are not referenced from the extension. In this case, they also weren't disposed when the dialog was disposed, leading to an abort on exit. Change-Id: I799d7535b766984fde47cafbe41ee6e89e476205 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135266 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-05-18tdf#105972: pdf form: export date fields as date typeXisco Fauli1-0/+48
using AFDate_FormatEx which allows to set a custom format Change-Id: I38839965423794a0278b783c39c612c361a90eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134543 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-18tdf#105972: pdf form: export time fields as time typeXisco Fauli1-2/+30
using AFTime_FormatEx which allows to set a custom format Change-Id: I2d30d9d8340782ed9ad53eb43e1f65728f926b23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134510 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-17tdf#105972: pdf form: export numeric and currency fields as number typeXisco Fauli1-0/+36
Initial support for AFNumber_Format and AFNumber_Keystroke More info in https://experienceleague.adobe.com/docs/experience-manager-learn/assets/FormsAPIReference.pdf?lang=en This patch adds support for CurrencySymbol, DecimalAccuracy and PrependCurrencySymbol for now Change-Id: I8d6ffac51d576a8c243b9c6d5be2c3517bc0125a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134471 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-13tdf#148706: map value prop in numericfield to textXisco Fauli1-0/+8
Change-Id: Ifc37b0aa8dc657d7a7f05199c8132896d03eb437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134240 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-12tdf#143612: map SecondaryRefValue in form pdf exportXisco Fauli1-0/+16
Change-Id: I590784eb94fb6f4f3a20c4f6d8e3fb618f60d0fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134227 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-12related: tdf#148442: do not replace 'Yes' if onValue is emptyXisco Fauli1-2/+0
Change-Id: I748422dfbe7a385f4206c5d129eb3091289a180d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134220 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-11tdf#148442: map RefValue property to onValue in pdfXisco Fauli1-0/+9
Similar to what it's already done for radiobuttons Change-Id: I708d23dc5f9d4470a9850d7ecc60bd71fada594e Change-Id: I34107c757b0e0933f392a6d0845fa0d2e07aed62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134170 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-02Recheck modules t* with IWYUGabor Kelemen3-4/+0
See tdf#42949 for motivation Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132369 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)1-0/+7
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-16use more OInterfaceContainerHelper3 in toolkitCaolán McNamara1-22/+3
Change-Id: I3861a254d660662cbf575e9669cbacba36634856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126855 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski1-2/+2
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski2-9/+9
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-28a11y: Expose FormattedField as spinboxMichael Weghorn2-1/+6
This adds a new accessibility class 'SVTXAccessibleNumericField' that implements 'XAccessibleValue' and reports having an a11y role of 'AccessibleRole::SPIN_BOX'. An object of that class is returned by 'SVTXNumericField::CreateAccessibleContext'. Create an 'SVTXNumericField' XWindow peer for windows of type 'WindowType::FORMATTEDFIELD' (instead of a 'VCLXNumericField' one), so the newly introduced accessibility class gets used for 'FormattedField'. This way, FormattedFields are now exposed to a11y tools as spinboxes. Previously, since no specific accessibility class had been implemented for VCLXNumericField (then used as XWindow peer class for FormattedField), the one for VCLXEdit, i.e. VCLXAccessibleEdit, was used. While VCLXNumericField implements XNumericField and thus in general offers the relevant methods to implement an accessible class that implements XAccessibleValue as well, it uses the Formatter from the VCLXFormattedSpinField base class to get/set values. However, that doesn't work for the FormattedField case, since FormattedField has its own formatter of a different type and the 'mpFormatter' member in the VCLXFormattedSpinField base class is a nullptr, resulting in the corresponding getter methods always returning 0 and the setters doing nothing. With this commit in place, Accerciser now reports role "spin box" instead of just "text" for FormattedFields and displays the current value as well as allows to change it via the "Value" interface when using the qt5/kf5 VCL plugin. Note: For non-integer values, Accerciser doesn't show the actual decimal value, but an integer, e.g. when the value for "Height" spinbox in Writer's "Page Style" -> "Page" dialog (section "Paper format") is set to "29.70cm", Accerciser shows "30" instead of "29.70", despite 'Qt5AccessibleWidget::currentValue' returning the exact value. This is because Accerciser appears to rely on the value for the minimum increment being reported (as a corresponding decimal value) by a call to 'atspi_value_get_minimum_increment', s.[1]. However, there is currently no corresponding method in the 'XAccesibleValue' interface for that at-spi method which 'Qt5AccessibleWidget::currentValue' could call to retrieve the value. The NVDA screen reader on Windows now also says e.g. "Width: (Type = 344) spin button editable Alt+W selected 8.50″" instead of "Width: (Type = 344) edit Alt+W selected 8.50″". [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119590 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-07tdf#140594 Create proper window peer for FORMATTEDFIELDMichael Weghorn1-0/+1
commit 2a694f9e0e7789b4b3b792a9eedd29366fa10c1c Date: Wed May 6 14:08:07 2020 -0400 lok: fix the window type of the formatted field control had introduced the new 'WindowType::FORMATTEDFIELD' and set it for the 'FormattedField' control (instead of using the previous default value set in the 'SpinField' ctor, which is 'WindowType::SPINFIELD'). So far, this type was not explicitly handled when creating the XWindow peer. Handle it just the same as 'WindowType::SPINFIELD' and return a new 'VCLXNumericField', which e.g. makes sure that a "proper" accessible is created and thus alues of a spin field are announced by the NVDA screen reader (again). (See also commit 33cac418db78f64f7fa84b8e65c01c2b02cf17a7 Date: Fri May 29 16:53:59 2020 +0200 tdf#133498 Make native drawing of FormattedField work (again) which had fixed a similar regression elsewhere.) Change-Id: Ie8a4d279a12a1b83a9cf97f1304d84214b3a2a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118568 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-05-19fix crash in X-Ray extensionNoel Grandin1-8/+16
caused by commit 883b7a34d288410ac6f820e91d9eaa65ba2b9cb1 DBG_ASSERT->assert in UnoWrapper No idea why X-ray is triggering this, but it seems to work when I dial it back to a SAL_WARN again And also caused by commit 5aa60be574ece81b27c8f63e6e809871c694dba0 fix leak in VCLXWindow So disconnect the toolkit-window-peer from the vcl::Window before disposing the peer. Change-Id: I3310b76c1affc13c53c1e23810e383a8d2152ec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115806 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17split OutputDevice from WindowNoel Grandin1-1/+1
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-13DBG_ASSERT->assert in UnoWrapperNoel Grandin1-9/+10
Change-Id: Ibc6b489f12c2734869bd45f93f946a53e3015226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115564 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-13can pass by const& hereNoel Grandin1-1/+1
Change-Id: I1984e3efd8fbd8400e15e82042b9c75b748a46fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115563 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-13Revert "simplify the vcl<->toolkit connection"Noel Grandin1-10/+12
because it introduces a link-time dependency of vcl on toolkit, and toolkit already depends on vcl This reverts commit f7a86c5cdf4323c99d26512bf78de7f7c380667d. Change-Id: Ibdd4f3e8221d70e2abd8fcbda67f85af3ac0396e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115547 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-12simplify the vcl<->toolkit connectionNoel Grandin1-12/+10
No need to store two different pointers and hide the underlying class behind an UNO interface Change-Id: I72c55e912caa9eae1cffa6c9d1b1d480e5668d40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann1-2/+2
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-12vclxtopwindow.hxx and vclxcontainer.hxx can now be private headersCaolán McNamara1-2/+2
Change-Id: If6d56c9f2fcaf47e1756e8645098ad86987c8b64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-12VCLXMultiPage can be in private headersCaolán McNamara1-0/+1
and similar VCLXFormattedSpinField can drop SAL_DLLPUBLIC_RTTI Change-Id: I72cf9eeb1a0cba45089692bc81ae0c79a32bbef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>