summaryrefslogtreecommitdiff
path: root/svtools/source
AgeCommit message (Collapse)Author
2021-02-23reportdesigner focus out handler clobbering the preexisting handlerCaolán McNamara
set by the databrowser, so chain one after the other Change-Id: I5aa16635031be425b9354e5a2d6b891a81d54e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111384 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-22rename to DropdownDockingWindowCaolán McNamara
these are used as non-resizable dropdown menu-alike things Change-Id: Ifd2ebd98a5fb08d27345113f4be8db0afb1d895a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111310 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20merge together interimdockparent usageCaolán McNamara
and their uses of VclBuilder can be contained to vcl Change-Id: I0cbbd3175e4ec857187b7f1716232a3514fe9605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111251 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20move docking adapters to vclCaolán McNamara
Change-Id: I9be6f65734c24196758dea6853219a168c53a7fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20loplugin:refcounting in svtoolsNoel
Change-Id: I20f6b07aded513a4100d7ae4c7d74365a93dacca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111221 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19foward declare NotebookBarAddonsItem instead of using includeCaolán McNamara
Change-Id: I57e5a8f28a40994b61ab0f554401e4f70c8ffc12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111230 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19forward declare VclBuilder in VclBuilderContainerCaolán McNamara
so we can hide it as a detail Change-Id: I8ab9097c04a16684ee89a92713ef5975d83b76bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111225 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19rename get_vscroll_width to get_scroll_thicknessCaolán McNamara
and add split customize_scrollbars to form a separate set_scroll_thickness Change-Id: Ia4b1c85d6ae85b0fb7aeb852d3a91b36b63143db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111207 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-18update DataBrowser has-focus when child widget loses focusCaolán McNamara
similar to tdf#135641 case, focus-out becomes an issue with the bibliography editor if focus-in is seen on clicking in a cell, then click in a GtkEntry and tab around in a circle. Without this lose-focus support focus will be grabbed back to the cell of the initial click on a circuit of the focus-cycle Change-Id: I36288ed21dc4357c077f8dee55b55abf2457c2a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111157 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16loplugin:referencecasting in stoc..svtoolsNoel
Change-Id: I806ffb3ab06731c61fe9c58788aabf00a05e980f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-14Move unit conversion code to o3tl, and unify on that in more placesMike Kaganski
This also allows to easily add more units, both of length and for other unit categories. The conversion for "Line" unit (312 twip) is questionable. Corresponding entries in aImplFactor in vcl/source/control/field.cxx were inconsistent (45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific). I used the definition based on "by pt", "by mm/100", "by char" (they all were consistent); "by pc" seems inverted; "by twip" was half as much. This accepted conversion makes unit test for tdf#79236 pass. Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-13rename Ruler::GetType to drop using Window::GetTypeCaolán McNamara
Change-Id: I78da4bb35f5f3e7253737ddc3be1460fbf605ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110831 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-02Fix typo in codeAndrea Gelmini
As per request in comments here: https://gerrit.libreoffice.org/c/core/+/108661 I don't remember if it was already corrected and rejected. Anyway, this is massive and it compiles on my laptop. Let's see adding devs. Thanks a lot to Seth! Change-Id: I27d1fe1dccecd6644304fc6c3c2feb8413598285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108816 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-01-28TopLeft().Y() -> Top() etc.Caolán McNamara
TopLeft().X() -> Left() BottomLeft().X() -> Left() TopRight().X() -> Right() BottomRight().X() -> Right() TopLeft().Y() -> Top() TopRight().Y() -> Top() BottomLeft().Y() -> Bottom() BottomRight().Y() -> Bottom() Change-Id: I5050f619bf92cfc59b6f8dfe7c9f98ef1453c294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-27Improve loplugin:stringliteralvarStephan Bergmann
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-25avoid some ref-countingNoel Grandin
can just return a pointer here, instead of VclPtr. Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-21keep the navigation bar control area the same size with hidden scrollbarCaolán McNamara
which is the way it historically worked before... commit 7fd9bd4cdf4ffc03b2280964ef3f7e5917769bbd Author: Caolán McNamara <caolanm@redhat.com> Date: Mon Jul 27 11:43:12 2020 +0100 we want the position of the start of the scrollbar which added a visibility check that we don't actually want as the navigation bar spreads out in a ugly manner on a gridcontrol with only a few columns Change-Id: I9f24937c20dbab40e0d031195aa6e3e527cd52f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-16make the Color constructors explicitly specify transparencyNoel
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-15tdf#135641 update DataBrowser has-focus when child widget gains focusCaolán McNamara
Change-Id: Ic5e618b50c31ebeffa1b2cc59857582804874747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109369 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-10remove some old debugging codeNoel Grandin
Change-Id: Idd88e4dcc920d7dd198545e519d7860e59762bcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09fix coverity parse errorsCaolán McNamara
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-08use more IsTransparentNoel Grandin
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-05lok: disable java interaction handlerHenry Castro
Unfortunately, when the client side shows the "Macro Selector" dialog, it tries to show a java interaction message box to locate the files of the JVM, even if the code explicitly option to not enable "DontEnableJava" Change-Id: I2ef4373f58c3ba23a5b86c5dc984caf6c10821ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108421 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-01-04loplugin:stringviewparam: operator +=Stephan Bergmann
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-30vcl: remove {Read,Write}ImpGraphic and ImplExportNative from GraphicTomaž Vajngerl
ReadImpGraphic and WriteImpGraphic have been reimplemented in the TypeSerializer some time ago, but the code has not yet been moved to use that class. This commits does that and changes all the code using those 2 methods and removes them. With this implemented in the TypeSerializer, it is easier to handle In addition it also removes ImplExportNative (and the method on the Graphic interface). This was really used only in one method, and it could be implemented in the mthod itself. Change-Id: I0982429d1c1d5ed7ef07627d87ed9a08df43f040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108256 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-24custom literal for Degree10Noel Grandin
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-23Use char16_t string literalsStephan Bergmann
Change-Id: I0a8b577957ac1d4cad5fc1163f244012a8391a77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108216 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-20tdf#139063 crash when add a new sheet to a RTL sheetCaolán McNamara
Change-Id: Icbfb45036f93ed92e5c83039cd4c3b536f0df0d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108036 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-09tdf#138778 add has_child_focus which considers a related popup a 'child'Caolán McNamara
Change-Id: Iab23e399f2650ece702fb1f62d1387acca472b42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107499 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04move ManagedMenuButton to vclCaolán McNamara
Change-Id: Ie2dd1635a5f5f677d286011a14b734af7435612a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107231 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-04add a way to get an awt::XPopupMenu from a PopupMenuCaolán McNamara
Change-Id: Ia1cde3b60b71ed9e4d0b7dc8d9ad0b2899d60b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107229 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-03convert EHistoryType to scoped enumNoel
Change-Id: I115fc0ed81d6392d3649757727c4d9468213619d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-01tdf#42949 Fix new IWYU warnings in directories s*Gabor Kelemen
Except recently checked sc, sd, svx, sw Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice1b86628e4f22a39f307b9c5fa567b6ab9d5acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106917 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30weld ImplTabButtonsCaolán McNamara
create a separate .ui for the ltr-in-rtl scroll arrow region Change-Id: I2ec9099f7441ba82555270b5a99541cd7a989890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106288 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#138430 schedule a reformat if we turned off the scrollbarCaolán McNamara
Change-Id: Ida7d7419f0513624071b31820660add93ac78615 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106486 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-23don't need to include vcl/scrbar.hxx hereCaolán McNamara
Change-Id: Ib466cb47518d666c6a0b2b3801904ccef10d74b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106364 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-22don't need to include vcl/toolbox.hxx hereCaolán McNamara
Change-Id: I05b678a7911b3c3071f528ba0e4f56b0c6cf2de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106329 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-20ScrollBar::GetThumbPos returns tools::LongStephan Bergmann
Change-Id: I493e241e590325306a59fda89a30f1c97410c373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106180 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-19Clean up GetHTMLColor "not found" valueStephan Bergmann
...after fe3dd6d831998dd5619ea223af04bc51f9294d2f "Changed return type of GetHTMLColor". (Clients had already been updated with 530df0b322f64fdcb08e9ef0b6ba944dd172ef60 "Changed return type of GetHTMLColor" and 463563853a81499de2259372755b00aa5ec246a7 "Changed return type of GetHTMLColor".) Change-Id: I1db842775a69bb3c0ff08dca152094d7b67ca221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17loplugin:stringviewparam extend to constructorsNoel
Change-Id: Ia573921566ec6079b843cbcc0401d9d0f5c62089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16tdf#138116 Accurate minimal height for wizard opened by extensionIlhan Yesil
There is no way to set the minimum height by the UNO API. Therefore the requested size will be reduced. Change-Id: Ie657518a83ffb6873e4fd2a5640580b5198a38d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105566 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-11-16tdf#123936 Formatting files in module svtools with clang-formatPhilipp Hofer
Change-Id: I56a49c7fec128eb47818ee664acf01434d24f88d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105715 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-16tdf#138229: make OleObjectDescriptor match OBJECTDESCRIPTOR on _WIN64Mike Kaganski
... broken since tools::Long is 64-bit on that platform, and thus Point and Size are not equal to POINTL and SIZEL. Change-Id: I8cf53f778ece89415687c6966d8e079fb0cf6189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>