path: root/basctl
AgeCommit message (Collapse)AuthorFilesLines
35 hourstdf#134331 - Added possibility to sort macros via context menuAndreas Heinisch4-2/+75
The user now has the possibility to sort the entries in various macro dialogs either alphabetically or in document order using a context menu. Change-Id: I064947daa9f9bca05cb28e4b2f65ff1c92689ae9 Reviewed-on: Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <>
6 daysTurn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann4-4/+8
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
12 daysRemove the useless Export sdi propertyMaxim Monastirsky1-1/+0
Maybe I'm missing something, but its usage - "if ( !GetExport() && !GetHidden() )" seems like expects it to be true and false at the same time. Anyway, there's no diff in workdir/SdiTarget after this change, so should be safe to remove. Change-Id: I6db508ff40c05dc828ffa91bb41a37c17b697503 Reviewed-on: Tested-by: Jenkins Tested-by: Maxim Monastirsky <> Reviewed-by: Maxim Monastirsky <>
2020-09-07tdf#118148 Extended tips for HC2/sbasicOlivier Hallot5-6/+70
Change-Id: I878c1108757b6637e221b39c50ecf21477edb534 Reviewed-on: Tested-by: Jenkins Reviewed-by: Christian Lohmaier <>
2020-09-04TabPage no longer needs to inherit from VclBuilderContainerCaolán McNamara1-1/+2
Change-Id: Iaab26ade1109daf732e58a2f3741cc43243e374c Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-09-04tdf#124176 Use #pragma once in basctlGeorge Bateman29-116/+29
This commit was carried out by a Python script, source of which is at Change-Id: I812869f1a7cb2ac3e9c97240abc456cd12afd0b4 Reviewed-on: Tested-by: Jenkins Reviewed-by: Julien Nabet <>
2020-09-02drop some unused methodsCaolán McNamara1-19/+0
Change-Id: I4da391591d30db9e51c1dd543bcf128f2e8621c3 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-08-31Fix typo in codeAndrea Gelmini1-4/+4
It passed "make check" on Linux Change-Id: I2dc3d343058b6d77da30561ec4f62bdd292630dc
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann6-9/+9
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-08-27add a DisableCycleFocusOut flag for an all-welded hierarchyCaolán McNamara1-1/+1
so we can differentiate the case of embedded welded widgets co-sharing the tab-cycle sequence with vcl widgets vs the case its all welded widgets Change-Id: I5c57b4e98d2f5c543522a72e31d554a67c259307 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-08-27Fix a nonsense changeMike Kaganski1-3/+3
... from commit 9ad4eeb4fa413b1a3e084d141c6eb01795f95b7f. Change-Id: Ib8ed2fd638b393180860c549f432651f34878f5c Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2020-08-24tdf#118148 Extended tips from HC2/shared/Olivier Hallot6-18/+195
These extended tips are extracted from <ahelp> in Help files Only for ui files, where dialogs/widget pair could be determined. Other forms of <ahelp hid=".."> such as .uno:.. and *HID* ... will be addressed elswhere. Change#1 Removed extended tips from GtkMenu of svx/.../acceptrejectchangesdialog.ui Change#2 Some empty ET's slipped in cui/macroselectdialog.ui Change-Id: Ic8dc62734143f621fcd3c4156fc004f585630277 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-08-19update pchesCaolán McNamara1-1/+6
Change-Id: I6a300169d33bdc36e4c7e720a7afc336a86eea68 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-08-18move TextWindowPeer to its only userCaolán McNamara4-3/+115
Change-Id: I16cc2f75c3e639915c90edc626829e455bda4383 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-08-14loplugin:simplifybool moreNoel Grandin2-3/+3
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin2-4/+4
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara1-10/+5
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-08-11tdf#135639: check the return value of GetDim32Mike Kaganski1-30/+33
... to avoid crash accessing non-existing element of pChildItem->vIndices Change-Id: I248a9301abd69883f940051d9d9671298dcc8453 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2020-08-11tdf#134604 library created in the wrong treeCaolán McNamara1-4/+5
Change-Id: Iee526422a18aef8ef25289041b26ff1e4a6b39b3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-08-08use std::string_viewNoel Grandin1-4/+4
Change-Id: Iac8367a1ea3ec603b5db8b3dd8bdc7dd7265eb83 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-07-28tdf#134887 Rework last item handling in NewToolbarControllerMaxim Monastirsky2-0/+22
Just store the last used menu id, and consistently get all the information (command name, image id, target frame etc.) from the menu instance. Also implement the XSubToolbarController interface, so we get a chance to update the image on icon size or theme change. The initial action and icon of the button are based on the url passed by the .uno:AddDirect status update, given that there is a corresponding menu item. The only defined fallback now is to .uno:AddDirect itself for both executing and getting the icon, but this shouldn't happen normally, as I fixed all the affected cases I found so far, namely Base (including windows like table design etc.) and the Basic IDE. Actually these cases were partially broken anyway, and as a result now completely fixed: - In Base main app window, the button used to default to a new Writer document, although its tooltip advertises Ctrl+N as the kb shortcut, and pressing that shortcut actually opens the database creation wizard (as expected). - In the Basic IDE, the button was working, but not the Ctrl+N shortcut. Change-Id: I6537b3f38e7d7001ec1b39d78285445464fd8cbe Reviewed-on: Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <>
2020-07-25move getUIRootDir to AllSettingsCaolán McNamara1-1/+1
Change-Id: I3b7774a043a2c99531e1c76b531df4358699bba7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-07-22merge duplicate GetFocus implementationsCaolán McNamara2-7/+2
Change-Id: Ifc2e3fab6dacb3b0bca74c0584c16170b8b97de4 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-07-12update pchesCaolán McNamara1-6/+11
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: Tested-by: Thorsten Behrens <> Reviewed-by: Thorsten Behrens <>
2020-07-06Resolves: tdf#134551 ModulWindow deleted when last module removedCaolán McNamara1-1/+5
leaving a dangling reference to m_aName. Hold a reference until ExecuteCommand is finished. Change-Id: I82ac5cc73427a945c78b9317dee9edf6129bb975 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-07-05basctl: create instances with uno constructorsNoel Grandin5-105/+16
See tdf#74608 for motivation Change-Id: Ibada6b9b7e6c754487c90ce1a37c17019db55370 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-07-04reduce number of framework librariesNoel Grandin1-1/+1
Change-Id: If2bf85301eb1523a636d031f6e5a9f78cb1ee06b Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-07-02tdf#127680 Add the option to print even or odd values from a particular rangeSrijan Bhatia1-11/+16
Added a box besides the pages option that lets the user choose between left and right pages/left pages/right pages. Change-Id: Iee0386f4f3cfd2dac3fcf898a3fefb5434cb27a8 Reviewed-on: Tested-by: Jenkins Reviewed-by: Heiko Tietze <> Reviewed-by: Mike Kaganski <>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: basctlStephan Bergmann2-3/+3
Change-Id: I316331cee15bbb87ecfbda84f3195759e521df6a Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-06-26Upcoming improved loplugin:elidestringvar: basctlStephan Bergmann2-2/+2
Change-Id: I3b570313cd04c3af92e1e30ec4539de34398104f Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin1-3/+1
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-06-18distinguish active dnd-operation case from simple query caseCaolán McNamara1-2/+2
Change-Id: I1d8e95e46b45c71c0c83316ab4f19ba85eddcf75 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-06-08rework treeview initial toggle button col to be like expander colCaolán McNamara3-10/+9
cause this assumption is baked into the vcl one making it hard to adapt remaining cases Change-Id: I75dd5264c65b1ffbf4d26c9a86f6d4d08b400d90 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-06-05have just one way to set expander imageCaolán McNamara4-36/+39
Change-Id: Ic07709a864620c6146616c8e0a1417343c0937de Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-06-04drop unused inline methodCaolán McNamara1-1/+0
Change-Id: Ie0a861106341f8a838b19eff405a99c6f234e93f Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-06-03Upcoming loplugin:elidestringvar: basctlStephan Bergmann1-10/+5
Change-Id: Ia0411cad22c23f16d5d85b7cb65822d19f923b4f Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-05-28Make loplugin:simplifypointertobool handle parenthesized expressionsStephan Bergmann1-1/+1 discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-05-28loplugin:simplifybool in accessibility..basicNoel Grandin2-3/+3
Change-Id: Ibf6cef4baa2d3d400d953ac8bc97a66b5901def9 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-24remove some unused definesNoel Grandin1-1/+0
Change-Id: Ibfdc84f07642db6ec8362c4d76195b4f39dc103c Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-23nospin hack no longer in useCaolán McNamara2-3/+3
Change-Id: Ib855c429ac936f9b7bb219ad4729f99b0625ec37 Reviewed-on: Tested-by: Caolán McNamara <> Reviewed-by: Caolán McNamara <>
2020-05-23uitest: add wrapper for macro editorXisco Fauli5-0/+99
Change-Id: I729c5cdbc3ba925a0c08750eba199a400babba1e Reviewed-on: Tested-by: Jenkins Reviewed-by: Markus Mohrhard <>
2020-05-22move InterimItemWindow to vclCaolán McNamara2-2/+2
Change-Id: If0a4a14708810c44d087b51961f2ecb3fda4df23 Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-05-19Resolves: tdf#114258 defer LoseFocus treeview updateCaolán McNamara2-1/+21
until the next event cycle in cas the LoseFocus is happening due to an in-progress selection event from a mouse down in the treeview that would be updated Change-Id: Ia4448aa798a8af7cd35bc17215891f6c5ca8678a Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <>
2020-05-19tdf#88205 EasyHack change css::uno::Sequence initializationsvgeof2-6/+2
1st commit. Use initializer lists for uno::Sequence in 4 files Change-Id: I0192b4b8f023fb8d606dff81c4b910c8c7c2a9a2 Reviewed-on: Reviewed-by: Michael Stahl <> Tested-by: Jenkins
2020-05-15use for-range on Sequence in basctl..canvasNoel Grandin2-14/+8
Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-13expand out some namespace aliasesNoel Grandin1-4/+2
Change-Id: I5fdb554a1b116824843f35645bc1cea3ca91e0f2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-1/+1
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-08compact namespace in avmedia..bridgesNoel Grandin2-8/+4
Change-Id: Iba1282caadab91a0c6e1c044dbab5e6e15f3707b Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2020-05-04Use pragma once instead of include guardsFatih1-4/+1
Change-Id: Ife31f595e7b704903f65eb8ba327da12a8fcf4d0 Reviewed-on: Tested-by: Jenkins Reviewed-by: Yusuf Keten <> Reviewed-by: Muhammet Kara <>