summaryrefslogtreecommitdiff
path: root/svtools
AgeCommit message (Collapse)Author
2023-08-07ofz#57384 TimeoutCaolán McNamara
Change-Id: Ic2007f52056acd46f96d454c1fdb7b8ca8838d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-30tdf#156230: Deprecate and stop using PDFAsStandardPrintJobFormatKhaled Hosny
PDF is the only supported printing format (on Unix) going forward. Change-Id: I1bd442bac370b89a77e2035d4c17bfc43a869ab1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154974 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-27rename GetFieldRectPixelAbs to GetFieldRectPixelNoel Grandin
since it can return either absolute or relative values Change-Id: I23f2403879eded3ec4b3ca20a639ea18b28f5de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-26improve override of Window::Invalidate(*)Noel Grandin
rather than having to override 3 different methods, have them override the ImplInvalidate, which is where the code ends up anywhere. This already exposes a couple of places that were not overriding all 3 methods. Change-Id: If76abcf18325b7138ea451fbd0213cd6c7b4daa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-20Revert "tdf#149401 show "Restart LibreOffice" dialog changing AutoRecovery"Justin Luth
This reverts 7.4 commit 18cc891483fef63ad168273658a30bff72b87a95. The bits are no longer used because all options in this dialog apply immediately, thanks to tdf#65509 and even more so tdf#156308 (which are API changes that won't be backported - so 24.2+ only). I didn't see any other option in this dialog that could have benefitted from a restart request, and the scope of this dialog is rather small, so no value in ignoring the dead code. Change-Id: I3f40421af079fd42c10d6862949279328ef5583b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154669 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-20split GetWindowExtentsRelative asunderNoel Grandin
sometimes it returns a relative position, sometimes an absolute position. Rather have two different methods with names that match what they return. Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-12jsdialog: calendar widgetSzymon Kłos
Change-Id: I5b2b8a1516ed2e851309dca6ef3200ed522d1b7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154136 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154361 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-07-06make tools::Poly*gon single-arg constructors explicitNoel Grandin
which will help avoid ambiguity in method calls in an upcoming patch Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-05these enums are unnecessaryNoel Grandin
Change-Id: I29bf28202e11db836764276f773b134356d93e0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154057 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-27loplugin:stringstatic look for more stringsNoel Grandin
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-19Simplify a bitMike Kaganski
No other options are possible, as implemented in GetExportMode Change-Id: Id64ec1b5bd52f28a100bd2b31cd56c6620bb2cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153239 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-12tdf#154349: round before converting to an integerMike Kaganski
Commit cfff893b9c82843a90aac4ecdb3a3936721b74a0 (Move unit conversion code to o3tl, and unify on that in more places, 2021-02-14) changed a custom conversion code in CalcToUnit doing inexact conversion from points to mm/20 (with "* 10 / 567"), with correct conversion function. A side effect was, however, that the imprecise arithmetics provided floating-point values that rounded down to correct integers (or maybe it was all the chain of calculations down to this function), while the correctly converted values could round down to a smaller value. Fix this problem using rounding. Change-Id: I42e0d56b068832ef309f6b696f661642e62ddacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-06use more officecfg for SvtMiscOptionsNoel Grandin
Change-Id: I6c87025fc0997b5edbc085fc88333fe9e150eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06convert SvtAccessibilityOptions to officecfg where possibleNoel Grandin
Change-Id: Ia530086fe35e64379e55135d392020304b466325 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06convert ColorConfig to officecfg where possibleNoel Grandin
Change-Id: I14f0ada21d328b3b6637709e403bfe973a7035b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152670 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31Improve some error diagnosticsStephan Bergmann
Change-Id: I4e9d19a164fdc035ceabd9d4a04a0f500322dd0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152419 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-28tdf#154547: Improve Hebrew font preview sample textKhaled Hosny
The Hebrew font preview sample text include Nikkud (vowel marks) which are optional for modern Hebrew and not all Hebrew fonts have them, and for fonts lacking them we use a much shorter preview text. The inclusion of Nikkud is unnecessary and we don’t include vowel marks in many other scripts (e.g. Arabic where they are more used). This patch drop the Nikkud marks and leaves the sample text otherwise unchanged. Change-Id: Ie4e5abcd74599d25db41c4cdf7e1d3bf997a998c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152350 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-05-25merge some stringaddsNoel Grandin
found with a lightly tweaked version of the loplugin:stringadd and some hand-holding. Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25[API CHANGE] remove XModuleUIConfigurationManager3 and XUIConfigurationManager3Miklos Vajna
The motivation was to not modify XModuleUIConfigurationManager / XUIConfigurationManager, but as pointed out at <https://gerrit.libreoffice.org/c/core/+/151798/10#message-31d00a775989b981a5f50639623cc773d6ea930d>, it may be fine to modify XModuleUIConfigurationManager2 and XUIConfigurationManager2 instead of adding XModuleUIConfigurationManager3 and XUIConfigurationManager3. Indeed, searching for usage in <https://github.com/libreoffice/wollmux>, only the published interfaces are used, so let's fold XModuleUIConfigurationManager3 into XModuleUIConfigurationManager2 and XUIConfigurationManager3 into XUIConfigurationManager2. This is a reasonable middle ground between 0 API change and breaking known users of the public API. Change-Id: I2dedee7e255f9dda9c9057961e6c829f83b2b709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152254 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-23prevent some "index hint out of range" warningsNoel Grandin
Change-Id: Ib3d4dce2e535fb16a0f34c01c03c71927fa5cdd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152160 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.Gökay Şatır
We need to have different accelerator classes for differnt languages. This PR creates a new accelerator class for different languages. Since current code uses single instance for accelerators, i needed to add a create function. Also we now have an unordered map for different languages and modules. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680 Tested-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798 Tested-by: Jenkins
2023-05-06Use getXWeak in svtoolsMike Kaganski
Change-Id: Ia985e96eb441d03ace050f4f184a899fba897830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150873 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-28survive exporting to pdf without config for fuzzingCaolán McNamara
Change-Id: I229f25a8a15b21257756ecfa008b9e99681003c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-28Move all handling of AA allowing from svt to drawinglayerMike Kaganski
Commit 444bf8710d5da7b584fbcb94693e4ed8d2e29297 (Update handling of AntiAliasing settings and processor2d, 2022-11-08) moved the actual variable holding the AA state to drawinglayer, which introduced a duplication of the information. This moves all the handling from svt to drawinglayer, so that svt functions only use respective drawinglayer functions. Well, almost: the IsAAPossibleOnThisSystem function needs vcl, so stays in svt. Change-Id: I887307fbca1ca0cff1f5f32446e3599817099c3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151163 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-28tdf#155048: forward AntiAliasing to drawinglayer also in temporary caseMike Kaganski
Commit 444bf8710d5da7b584fbcb94693e4ed8d2e29297 (Update handling of AntiAliasing settings and processor2d, 2022-11-08) made respective changes so that SvtOptionsDrawinglayer::SetAntiAliasing forwards the setting to drawinglayer. However, it only happened in non-temporary case, which is fixed now. Change-Id: I66f5630dde759e3a3aa305ef38f60c8e24e6330e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151109 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-25Resolves tdf#154080 - Allow customization of comment indicator colorHeiko Tietze
* New application color added * Border color depending on cell/sheet background * Comments color set to light magenta to align with similar tools Change-Id: I782e8359632c5a319e61f5d5ac3deb4614bd7e79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150970 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-17Resolves tdf#152184 - App color follow system colorsHeiko Tietze
Change-Id: I47d37a911baab57af832821bb66f8dd4818a8830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150283 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-16Related: tdf#154832 Official name is MorisyenEike Rathke
Change-Id: Ieae2d95318184e76cd8e533ba37d5a31eb9d2a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150453 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-16Resolves: tdf#154832 Add Creole (Mauritius) {mfe-MU} [0x06B2] locale dataEike Rathke
Change-Id: Ia49e3dfb6ef7abc35f981712077018f98ef94297 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150449 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-04-15a11y: Report focusable and focused state for ValueSetItemMichael Weghorn
With this in place, Orca now also announces the selected color when moving focus in the list of available colors in the Writer toolbar font color popup when using the qt6 VCL plugin. Change-Id: I3f14047fe721c4a2bc0c6acb2d32f185d0eed204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150418 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-15Simplify initialized checkMike Kaganski
The previous complexity did nothing useful; it allowed to have a single unguarded boolean value check, for the cost of releasing and acquiring the mutex again. Change-Id: I426304e9ef6f27ca371544951bf3cc029887019e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150437 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-14[API CHANGE] Related tdf#154080 - Allow customization of comment indicator colorHeiko Tietze
* Calc > View option replaced by a new application color * Border not only in highcontrast mode but always shown * Border color depending on cell/sheet background The previous option TextOverflow in Calc.xcs was replaced by CalcTextOverflow in UI.xcs in order to combine color and on/off with the accepted drawback of incompatibility. The alternative, keeping the color separate from the toggle, would separate the options and was rejected therefore. Change-Id: Ie3e469163485d8eb1cffc7022e1518ad20e8e54e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150340 Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-04-12loplugin:stringview whitelist getLength and isEmptyNoel Grandin
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11Drop Writer::OutLongMike Kaganski
... and use SvStream::WriteNumberAsString, replacing Write[U]Int32AsString Change-Id: I10e56c532494239ed40ec01b6184dd06db463a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150193 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Drop SvStream::WriteCharPtrMike Kaganski
WriteOString is a better replacement Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10Use more *string_viewMike Kaganski
Change-Id: I1172febd45da4dba006f8495427fe45c6d9b9fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150187 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-07move using the vcl file dialog in headless mode to the point of creationCaolán McNamara
instead of setting and unsetting the config option at start and exit because a document that crashes in headless mode leaves my config in an unwanted built-in file dialog state. Change-Id: Ib5fcc5994a08c78bffdf57cb5b252dc469167ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-04Convert SvtLineListBox to WeldToolbarPopupSzymon Kłos
Change-Id: I1849e40508a8754ec567da5913d3454571da5bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149063 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150015 Tested-by: Jenkins
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-29Resolves tdf#152184 - Application color should follow system colorHeiko Tietze
This patch reverts the previously added "LibreOffice Dark" application color set and adds it to the automatic colors. Switching between light and dark changes the Automatic color accordingly instead switching to another color scheme. The added System Theme option makes Light/Dark follow the actual OS appearance. Reverts 6dfc49bb6a72bf6bb79167b12f0d2d0c5a155d06 (Introduce dark color set), 546ad5d17d3e363b75337c336cfb2b2f8acc55e3 (color scheme translatable), 9f0cf00d29298ed55737928ec4dddc50ac850cd8 (Update view options string based on theme) Change-Id: Ibf491f2e510fac5f1d27a7166560c4ec281d98d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149059 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22Related tdf#154182 - Recognize flat open document formats in MRU listHeiko Tietze
Change-Id: I7e25cf98502db62e80f563af6a80dbf9a7ac8db3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148845 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-20tdf#154273: Add the "&apos;" entity definition to our HTML parser...Damjan Jovanovic
... so that we can correctly read it and convert it a "'", but when writing to HTML write out the "'" directly for now. Fixes: https://bz.apache.org/ooo/show_bug.cgi?id=80657 Patch by: me Cherry-picked from https://github.com/apache/openoffice/commit/3304210c5c53f441cdb2c462fbbf6d8351380b01 "Add the "&apos;" entity definition to our HTML parser, so that we can…" Change-Id: I10d07af5f49d2432d99a79318d9d95b0bc976637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149150 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-18loplugin:stringadd use more O[U]StringCharNoel Grandin
Change-Id: I196e4539ad430a39415eff9d7170b33df7228230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-16Update view options string based on themeParis Oplopoios
Update the view options string based on the theme when tiled rendering, and make sure only the currently active view is updated Change-Id: Ib24111848f2926fe7ae858ca2e18e946d980e83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148943 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-03-16update line controls dropdown valueset if style changedCaolán McNamara
e.g. in page style dialog, footnote page, line menubutton, if theme changes from light<->dark while the line dropdown remains open. Use the application settings, and not the current rendercontext settings to get the up to date settings and not the settings at the time the virtual device rendered to was created. Change-Id: I674c94603f15c9035bbd07b4bd7247dcebc3124b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148982 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>