summaryrefslogtreecommitdiff
path: root/toolkit/source
AgeCommit message (Collapse)Author
2022-08-12crashtesting: assert on export forum-fr-40415.ods to odsCaolán McNamara
0 is an invalid year Change-Id: I2c638e2e2c1db628b4014a04a1c26231c236075b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138152 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-09move scrbar.hxx to vcl/toolkitCaolán McNamara
Change-Id: I77038cbf500976703ad41365da9a675a698863a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-07Removed duplicated includesAndrea Gelmini
Change-Id: Ic981e0916c68181cab7081091303d18c54912377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137912 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-06the "CreateWindow" function in svtools is newly removedCaolán McNamara
Change-Id: I6fb569cf293a896c92bec4c6aae647a0bd02d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137871 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-06move SVTXGridControl to toolkitCaolán McNamara
Change-Id: I513a2885027d0295f70e7c64269d1653a6c2642b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-02clang-tidy modernize-pass-by-value in toolkitNoel Grandin
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-07-20move wintypes.hxx from tools to vclChris Sherlock
Change-Id: Ief9949fd4252de9e33df172af07aa7ed097b5520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136560 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-17tdf#149575 UnoControlTabPageContainer: Handle tab imageIlhan Yesil
Setting a tab page's image in the tab button is done via method 'XTabPageModel.setImageURL'. Change-Id: Ideb096f88037dac26abe90fccae2251dcce84659 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135900 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-06-14Fix leak with stock widgets in a dialog from an extensionSamuel Mehrbrodt
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-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18tdf#105972: pdf form: export date fields as date typeXisco Fauli
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 Fauli
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 Fauli
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 Fauli
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 Fauli
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 Fauli
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 Fauli
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-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I1a9832b5b8b5304fa011a3ed57996a8e3751388b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133760 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03Just use Any ctor instead of makeAny in toolkitStephan Bergmann
Change-Id: I55115f115e98b00e199007da5c6d9ea44cf2bab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-20loplugin:passstuffbyrefNoel Grandin
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02Recheck modules t* with IWYUGabor Kelemen
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-03-28Operate on VCL Menu with SolarMutex lockedStephan Bergmann
...as such VCL code presumably expects to only be called when SolarMutex is locked, but which is not necessarily the case here for the ~VCLXMenu UNO object destructor. (I ran into this with a tentative commit for tdf#147668 "Writer crashes shortly after loading document with LanguageTool extension active", which would have added DBG_TESTSOLARMUTEX() to some GtkSalMenu code indirectly called from within mpMenu.disposeAndClear() here, and where this VCLXMenu object was held by Java extension code, so the destructor call happened on some JVM asynchronous finalizer thread, outside any SolarMutex lock.) Change-Id: Ia2c3ebec837275cfdf1548f22cfa33f0752e8ef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132125 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-05GetComponentServiceName can be constNoel Grandin
Change-Id: Iac61eec0b27660dd2ff45f70c92de5a8cdc2c301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22Add XWeak constructor and operator= to uno::WeakReferenceNoel Grandin
which is faster since we can skip the UNO_QUERY. Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09expand out IMPLEMENT_FORWARD_XTYPEPROVIDER3Noel Grandin
Change-Id: I31a7452bd8822f13905812e8f3fcd31a0753e0a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... 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>
2022-01-14make comphelper::OInterfaceContainerHelper4 more threadsafeNoel Grandin
(*) make all the methods that require an external mutex take a std::unique_lock as a parameter, so that call sites cannot forget (*) make the forEach method drop the lock when firing listener methods, to reduce the odds of deadlock Change-Id: I0a80e3b3d1c1c03b7de4a658d31fcc2847690903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-14no need to hold OInterfaceContainerHelper4 by unique_ptrNoel Grandin
when empty, it is only a single pointer big anyway Change-Id: I3e45dd705c4bef3799435617db1a4192d62860e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-08Fix buildMike Kaganski
Commit 326351e2b342eae5ca0154b2ba303b937a696577 crossed with commit b37f9fbf05e16eb58eae40c6d900a4b9da2972db. Change-Id: I1a10641aa0324e6af25698bb52d82157898c45d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128142 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-08move UserData bodge into VCLXMenuCaolán McNamara
Change-Id: I20c303788e576a29574a696cb20c9e8a235233b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126804 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-27osl::Mutex->std::mutex in ODocumentCloserNoel Grandin
Change-Id: If4f4b144842cc3d37a200b9529b0a29b6d90a5e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127595 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-27use comphelper::WeakComponentImplHelper in GridColumnNoel Grandin
Change-Id: Ibadee8190f254f8af1f76a69a5671010e6dd0016 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-18use more cppu::BaseMutexNoel Grandin
Change-Id: I1ee9aff2774a673666c332c116aa5b0ba0d8b585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-18tdf#146286 Crash/hang calling context menuNoel Grandin
regression from commit b37f9fbf05e16eb58eae40c6d900a4b9da2972db osl::Mutex->std::mutex in VCLXMenu Change-Id: I60caa02f9d8bb40b7fcf8a1009aeeac6ff3a094c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127044 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17osl::Mutex->std::mutex in VCLXMenuNoel Grandin
Change-Id: I93883f5cd8f5f83f33eded87d995f95dbfd7989b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126989 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17osl::Mutex->std::mutex in VCLXFontNoel Grandin
Change-Id: I01fbf0c94996412129101a47171aa9f3a6a78ffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126988 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-16use more OInterfaceContainerHelper3 in toolkitCaolán McNamara
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-11-29use more XPopupMenu methods over PopupMenu onesCaolán McNamara
Change-Id: I54acdcb82b90d363e48543de99c75adea8fceb2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126047 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-29move PopupMenu::IsInExecute out of vcl/include/menu.hxxCaolán McNamara
Change-Id: I01af38dd57a645ea0afeaff033ce6d07dfe09535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126026 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-28use more OInterfaceContainerHelper3 in toolkitNoel Grandin
Change-Id: If91b208db7fa59bc626293c0a868ac490a8d2d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12adapt to Sequence::operator[] non-const removalLuboš Luňák
5054202e71605cb4f10c798be76679 passed Gerrit before the changes and I submitted it only later after the changes. Change-Id: I251f50f417964f23e5e91aae6696df609fee9e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125098 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12make it possible to find out what fonts are actually really usedLuboš Luňák
A document specifies which font each text is supposed to use, but we still need to map that to a real available font, which includes also font fallback in case the font selected doesn't cover all glyphs. This commit adds API to track this font mapping, first StartTrackingFontMappingUse() will make VCL record this information, and then FinishTrackingFontMappingUse() will stop and return all the information, as a listing saying that a requested font got mapped to a list of fonts and the number of times this took place. This can be useful to find out what actually gets used for a specific document, or compare how changing fonts available affects a specific document. Change-Id: I6426ecef354166bef337b1dc9b9007fda148d5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123051 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-31Prepare for removal of non-const operator[] from Sequence in toolkitMike Kaganski
Change-Id: I10b3f696fdb0bff1781fb22ec560e1c6dfc10b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124401 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>