summaryrefslogtreecommitdiff
path: root/vcl/source/window/layout.cxx
AgeCommit message (Collapse)AuthorFilesLines
2021-01-06remove support for deprecated GtkAlignmentCaolán McNamara1-52/+0
Change-Id: I29e21e9e4d9b80b8c8e331ed9cce76b2e7fe0f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108689 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29jsdialog: export alignment typeSzymon Kłos1-0/+6
Change-Id: I846f51d522fb0639b22148c73563b177d091178c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107589 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108412 Tested-by: Jenkins
2020-12-28jsdialog: dump buttonbox propertiesSzymon Kłos1-0/+33
Change-Id: I638169db902961cff58a415b009f7412cd8b274a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107449 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108395 Tested-by: Jenkins
2020-12-23if the label is explicitly set there is no ambiguity as to the labelCaolán McNamara1-1/+1
a child-count of 3 can arise for a temporary period during loading of widgets inside GtkScrolledWindow where the child widget supports its own scrolling and is parented as a sibling of the GtkScrolledWindow during load until the node is complete and then the redundant GtkScrolledWindow is removed after mirroring its properties to the scrolled-child Change-Id: I1a7dbf9ec2415beb0f7e920fec5c05e87ddaaeee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108221 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-22replace margin-left with margin-start and margin-right with margin-endCaolán McNamara1-6/+6
Change-Id: Iee3cc8c22b393ca420d0ed68673c61fe7ef240ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108113 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-26jsdialog: dump VclExpander typeSzymon Kłos1-1/+5
Change-Id: Ie40632ab8ce53e0b1f9277dce3d46032a508edce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106663 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-19tdf#138010 (IV) VclScrolledWindow: Use actual border widthMichael Weghorn1-4/+19
The frame drawn by 'DecorationView::DrawFrame' may use native drawing, in which case the frame may be wider than 1 pixel. Take that into account and calculate the frame width and resulting position/size of the scrollbars and child widget using the content rectangle returned when drawing the frame using 'DecorationView::DrawFrame'. This avoids that the child widget is drawn on top of the frame, which e.g. resulted in no visible border when using the Qt/KDE Breeze style, which has a frame width of 2, with the actual 1 pixel border being surrounded by a 1 pixel padding/margin, and the content being drawn on top of the 1 pixel border. With the child widget being drawn on top of the actual border, only the invisible padding was left where a visible border was expected. (The current implementation assumes that the same frame width is used on all sides, which matches the way Qt styles handle it, but could be further extended if necessary.) Change-Id: I44268728838406fc578774c0f4fcc167fb2798b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106157 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-11-19tdf#138010 (III) Extract VclScrolledWindow border width to varMichael Weghorn1-14/+16
commit 1fe4a1a76da8fd3c196ccd9529b01ee093516b25 Date: Fri Mar 30 13:30:38 2018 +0100 draw a border around scrolled window had added a 1 pixel border for scrolled windows. Extract the value for the border width (currently hard-coded to 1) to a variable. This will be extended to take into account the actual width of natively drawn frames in a follow-up commit. Change-Id: I2503105c42fae9eae66ec931d54c9d6883f83bf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106156 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-11-12New loplugin:stringviewparamStephan Bergmann1-2/+2
...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>
2020-11-11support getting Expander's labelCaolán McNamara1-0/+5
Change-Id: Ibd3fe335e645895eedb6330cfc98590ad3c31fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105578 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-10allow VclBuilder to set expander label attributesCaolán McNamara1-0/+11
Change-Id: I0b78db778d230509e6bbb59d965540a5f5d6f3de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105559 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-10sync the vcl expander default with the gtk one to !m_bResizeTopLevelCaolán McNamara1-1/+1
Change-Id: Ia186514efa9e670ce2287201f16978fc1b0e9146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105564 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-28convert some more long -> tools::LongNoel1-7/+7
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window levelCaolán McNamara1-6/+14
a) give it a default implementation based on the current one b) re-use code introduced for WeldEditView::DeleteSurroundingText for the EditView containing vcl::Window in impress/draw and various similar Annotation windows Change-Id: I55547c70e90ee394795b5545450cf8131538fad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104781 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-19use tools::Long in vclNoel1-71/+71
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-14use shadowcolor for bordercolorCaolán McNamara1-1/+1
this is what the calc inputbar has always done Change-Id: I17d3dd0b45575e81d6f2e2f109d371cfe366883b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104322 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-13VclScrolledWindow vertical scrollbar one pixel too far to the leftCaolán McNamara1-1/+1
Change-Id: I6d9afb87b8d99e3c622b9d69fbfa88528adadb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104228 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-06loplugin:const* make some params and methods constNoel1-1/+1
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02tdf#134566 gtk IM support for custom widgetsCaolán McNamara1-0/+17
Change-Id: I5c731161768d09d021db5c353de816e173159096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103764 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16jsdialog: export tooltip for drawing areasSzymon Kłos1-0/+1
Change-Id: I22a4eb9a74a81bbd2a26d5bae6b875a78a63acf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102163 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102862 Tested-by: Jenkins
2020-09-08tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBoxCaolán McNamara1-1/+8
Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-27use monoborder widget css name as a WindowBorderStyle::MONO replacementCaolán McNamara1-1/+12
Change-Id: I563f917c741130909a9d726754cd3eb23a651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101429 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-19move VclMultiLineEdit to toolkit-only headersCaolán McNamara1-1/+1
Change-Id: I2e8728061e484f79768fcfe67d674cb76367a94d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100951 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-04loplugin:flatten in vcl/windowNoel Grandin1-120/+120
Change-Id: I94e69e988f038e85b1fb78985211d478bb5ed9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100033 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-03tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxxGabor Kelemen1-0/+4
Recheck after 7-0 branchoff Also drop the now unused file include/vcl/field.hxx Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-25use tools::JsonWriter for dumping property treeNoel Grandin1-18/+15
Change-Id: I8f55af19ba10b71bd621e69b27000ab7cb565309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96677 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-24Move DumpAsPropertyTree code to cxx fileSzymon Kłos1-0/+21
Change-Id: Ib450c860aa11f0e8be933de4c6e216ca9c0d0b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-01allow sorting buttons via weld::BoxCaolán McNamara1-4/+4
Change-Id: I315fe2dd2e40c976edd802c1e87b7ccdb0c298fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95221 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-22Revert "Move messagedialog header to shared include"Szymon Kłos1-1/+1
This reverts commit 2c2af2ebf8b2bed78286df4b4ffcbac556223ca8. Change-Id: I287abf8fa7239e67d7764cd96a12ab77431b572e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94465 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-21Move messagedialog header to shared includeSzymon Kłos1-1/+1
Change-Id: Ice8d01d2bb62667667a4c5f0366120cdb7600472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94635 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-05-12make VclPaned::set_position take effectCaolán McNamara1-2/+26
Change-Id: Id4ae096b413196cfb7118cd3a09a3f0a6c333f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94053 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08split button.hxx into toolkit-only pieceCaolán McNamara1-1/+1
Change-Id: I792efb417504a3b55043ff4fc3fd3597a9b953f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-08move DisclosureButton out of public headersCaolán McNamara1-0/+75
Change-Id: If267be2c5d02d185eddada7c4e0de0bc5af0b19c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93677 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-16Revert "loplugin:constfields in vcl"Noel Grandin1-2/+2
This reverts commit 59887868da3499c68d5f259cfa48178354397448. Change-Id: I0f3f6a7680c78103a559a0f881badc8211b97ace Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-14don't need to include split.hxx or scrbar.hxxCaolán McNamara1-0/+20
Change-Id: I775e77a0f303d66ca571e1851205b8286c840bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88631 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14move dialog.hxx to vcl/include/toolkitCaolán McNamara1-1/+1
Change-Id: Ia3877f58b6e5ccc4fb1621e6b928638e0c850e7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88602 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-02don't include vcl/button.hxx from vcl/layout.hxxCaolán McNamara1-0/+30
Change-Id: I16a1b392c33734ef89f26e7ff9318573e9bfce88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87817 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN1-1/+1
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-21weld gallery panelCaolán McNamara1-0/+12
Change-Id: I4aebb3f90e9943044d106a507972c39434988f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-08tdf#129879 Fix wrong order of buttonsTomáš Chvátal1-2/+2
Change-Id: I0cb135c5b8298fd7c5579673d0eaff7068a03842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86425 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2019-12-04honour GtkScrolledWindow shadow-typeCaolán McNamara1-1/+18
Change-Id: If6cc9f9f6c310261d783f2698b86329aa2a12c5a Reviewed-on: https://gerrit.libreoffice.org/84401 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann1-0/+12
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-13Resolves: tdf#128758 scrollbars added during scrolledwindow layoutCaolán McNamara1-1/+21
Change-Id: I1eee32278f6b46ff4f0447eb39543836c3d687f0 Reviewed-on: https://gerrit.libreoffice.org/82589 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-31jsdialogs: send grid attach dataSzymon Kłos1-5/+1
Change-Id: I667e1ba97f42ac3e7b806bcec929ff346400bdda Reviewed-on: https://gerrit.libreoffice.org/79699 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/81764 Tested-by: Jenkins
2019-10-25tdf#42949 Fix IWYU warning in include/vcl/window.hxxGabor Kelemen1-0/+1
The boost/property_tree/ptree.hpp added in commit 75b8db7fa7344a679d3c5dbdc8c5bd4228cdbc7c turns out to be rather expensive: it adds about 900 kB per compilation unit and window.hxx is included in about 2600 compilation units Replacing it with forward declaration header has reduced total includebloat from 26.1 Gb to about 22.7 Change-Id: I797608b54a62a5838c7a5d47355fb6bd736ad36c Reviewed-on: https://gerrit.libreoffice.org/81500 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-25set second child to remaining sizeCaolán McNamara1-3/+3
Change-Id: I2fad36cb4cb866418dcf4514e2f23b9658a957ed Reviewed-on: https://gerrit.libreoffice.org/81501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-25tdf#42949 Fix IWYU warnings in vcl/unx/gtk3 and gtk3_kde5/Gabor Kelemen1-3/+0
Also recheck vcl/source after recent reworks and f-u-i updates. Some new blacklist entries were needed for keeping existing fw declarations in headers. Add blacklist entries for removals causing no-pch build failures that were reverted in: a3b03ba1316b1ec0a9b0a3b45b96dc0a49aa9f1f 75d924db95559cff5f699bad8fe34bb0aeac0ff6 b57052ec2bbe548ca495a32b4bfce1d1c71caf33 Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I71227806288b68ef2a2cd56244899fd56bd0db8d Reviewed-on: https://gerrit.libreoffice.org/81163 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-24create a VclHPanedCaolán McNamara1-4/+116
Change-Id: Iec1076cdca03fe75ad832c0b9f8133ee4276dd6f Reviewed-on: https://gerrit.libreoffice.org/81444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-16overlapping scrollbars when both visibleCaolán McNamara1-4/+9
Change-Id: I75644c526e401ce0bc9a46a66d3d31e90bafb1d6 Reviewed-on: https://gerrit.libreoffice.org/80874 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-08implement gtk dialog screenshottingCaolán McNamara1-151/+7
Change-Id: If4e570f775bd1e29dfb75cb7e5dd9d9dfc35e654 Reviewed-on: https://gerrit.libreoffice.org/80416 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>