/tomcat/

value='distro/cib/libreoffice-5-2'>distro/cib/libreoffice-5-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/source/control/tabctrl.cxx
AgeCommit message (Collapse)Author
2023-06-29increase space around tabbed pane titlesNoel Grandin
Tabbed pane titles are currently incredibly cramped, increase the space a little to make them match better with current OS layouts (all of the different OSes we support use quite a lot of space around the titles) Change-Id: If9c7b4df81f8d206556e7c75097650ae21508384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-29maLayoutLineToPageId and maLayoutPageIdToLine are dead.Noel Grandin
I removed the code in ImplDrawItem that added data to them, because ImplDrawItem was only ever called with bLayout with false, and removing the bLayout param removed that code. That removal happened in: commit f0f973da8560e16cba85d2c9465c3a8c4c0ebbb3 Author: Noel Grandin <noel@peralex.com> Date: Wed Mar 16 08:49:35 2016 +0200 loplugin:constantparams in vcl/ And that happened because.... I noticed that ImplPaint was only ever called with bLayout==false, which meant I removed that param and passed bLayout==false to ImplDrawItem, in: commit 911ae0aeca443fb4b5e400ae0f939567b580e443 Author: Noel Grandin <noel@peralex.com> Date: Fri Feb 26 09:36:26 2016 +0200 loplugin:unuseddefaultparams in /include/vcl which was because the last call to ImplPaint with bLayout == true was removed in: commit a6b9d9a19fb8c5c9f166682f52941aee25b89c94 Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Date: Wed May 6 13:00:13 2015 +0900 refactor "TabControl" to use RenderContext Change-Id: Id234257201726de95e2c10bfacb30670123ca8a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153713 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-28these TAB_ constants do not need to be in the header fileNoel Grandin
they can be inside the .cxx file Also rename slightly and document. Change-Id: Iffd46e9ed6c02aad597a616ac1c583ae657fab40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-23tdf#141136 NBB SetContext: try to stay on the same tabJustin Luth
The user was forced on the HOME page at almost any context change. Instead, this should only happen if: -there is a special context tab -there is no special tab, and some "random" tab is needed. This helps in a lot of cases, but there are still plenty of cases where TWO context changes are emitted for one logical event. For example, in Calc a new comment switches to special DRAW tab, and then immediately to DrawText which has no tab -> home tab. So further fixes are needed to prevent machine-gun fire context events. Change-Id: Ibaf18fa823c613b4d11d33284842e439d3689542 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153476 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-06-23tdf#141136 NBB SetContext: don't SetCurPageId twice for the same pageJustin Luth
I noticed that SetCurPageId was running multiple times for the HomeLabel page. Plus, let's flatten this a bit more. It has always been like since, since commit d7da58ae362b661c03fc754e4e8f4a89798b0127 Author: Szymon Kłos on Fri Jul 22 11:50:57 2016 +0200 GSoC notebookbar: better default page handling Change-Id: Ied13ea5019df7cce2afe38d5d5d3615168338f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153475 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
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-26tdf#126632 tdf#152908 Resize the notebook bar on context changeJim Raykowski
For other than gtk vcl backend the tabbed compact toolbar tabs do not repaint correctly when the 'Table' tab is active and the cursor is move outside of the table. This patch adds a Resize after the context is set to make the tabs always show as expected. Change-Id: Iedf8a6eea52c3c55e9c1266b7aa79bc0f34deb22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149593 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-11-20Fix sending empty tab pages to onlineNickWingate
Previously this assumed page ids were sequential if a page is removed then its id returns an empty page. Fetching window child also worked based on iterations and not comparing actual ids so another possibility for empty pages. Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: I908f58665a9429ca4b66f346108030926a599d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138181 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142976 Tested-by: Jenkins
2022-10-27calculate the header bounds even for !bPaneWithHeader caseCaolán McNamara
so we can pass in the required area for the macOS case Change-Id: Ibb170e773a57ad0d5d0a591810e4039591337303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141911 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-26tab items not exactly centeredCaolán McNamara
Change-Id: I98938855876f8f7d821bacd8ba135053c92683a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141887 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19Rename MouseNotifyEvent to NotifyEventTypeSamuel Mehrbrodt
Also contains keyboard and focus events, not only mouse events Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-08-25vcl: rename GetNonMnemonicString() and make it standalone functionChris Sherlock
Renamed GetNonMnemonicString() to removeMnemonicFromString() Change-Id: I272714f97bb6d9174360631c18c4fd9bb485698e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138103 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-22DumpAsPropertyTree: use more efficient overloads of JsonWriter::putMike Kaganski
Change-Id: I6fe3ff8138ed27a04a3a224c67492338cf23992c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-03implement "show-tabs" for TabControlCaolán McNamara
defaults to the current status of "true" Change-Id: Id4fa50d359e29fa3a7db845edbcb86a3b1caa790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26move ToolBoxItemId into its own headerCaolán McNamara
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-20clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák
Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-08-08no need to allocate ControlLayoutData separatelyNoel Grandin
Change-Id: I239befdaa05beea5200c81f23d0af861c9fc3baa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30flatten vcl::ImplControlDataNoel Grandin
the struct is already visible in the headers, so it's not a pimpl pattern, and it's only two pointers, so no point in allocating separately. The tdf#91081 bug comment I removed is no longer relevant, this general class of problem was solved with the introduction of VclPtr. Change-Id: Ie5d896baf0167273f8936930dd65891919c5bf7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119679 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11jsdialog: properly export visibility of tabSzymon Kłos
Change-Id: Ib715633a3c7ed0730349a8dbf7205199eebe89ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110713 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11Related: tdf#139667 allow TabControl tabs to always show tooltipsCaolán McNamara
If one is set, then just show it. The removed restrictions seem to have been added in... commit 85702858a81c72b40f0e7e3ce05e677ffb996da9 Date: Tue Dec 16 16:42:03 2008 +0000 CWS-TOOLING: integrate CWS alf01 fix: #158798# show tooltip if only a image is shown where #158798# is old private bugtracker and referenced public #i95201# add: images for tab items has no mention of the restrictions Change-Id: Ia11952700fb212397bf0c0228666a1545817ce8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11ImplGetTabRect(ImplTabItem*) variant always returns 0 with default argsCaolán McNamara
so TabControl::GetPageId(const Point& rPos) doesn't work since... commit 6540912ae1a570fd8c2318f77b757e07b87c0707 Date: Sun Jun 16 21:41:31 2019 +0000 VCL merge most of NotebookbarTabControlBase Change-Id: Ia99911e753dbe2bb22dc892c6bddc0392fab97a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110728 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-22jsdialog: fix tabcontrol json structureSzymon Kłos
Change-Id: I1a295ece6e618e3bb81b8842a8b9df5de1cbffac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109366 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-12-07move various notebookbar widgets into vclCaolán McNamara
and we can drop their factories then Change-Id: I1e261886dd7700710ba628da4bbeeba65efa1531 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107134 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-03don't need to include button.hxx hereCaolán McNamara
Change-Id: I70ee0546c768271b9eb1d1432de2c9c642c0984a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107133 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-04loplugin:unusedmethodsNoel
Change-Id: I58fb6477222a26455f5db0a7d972c46f290c085c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-19use tools::Long in vclNoel
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-09-02tdf#136331 implement applying atk properties to tab pagesCaolán McNamara
Change-Id: I2ee57dbdb3d743fe1dd3d505a3aa2f479ffa62b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-04loplugin:flatten in vclNoel Grandin
Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25use tools::JsonWriter for dumping property treeNoel Grandin
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-24jsdialog: send selected tab and namesSzymon Kłos
Change-Id: I54db09a7a0311b5ed9bc0764c353b82bb99b9e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94620 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96932 Tested-by: Jenkins
2020-06-23move ListBox to toolkit-only headersCaolán McNamara
Change-Id: I6266dedb17cd7c3b730fc69804695536fef37cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-16tdf#133877 use optimal size for hamburger buttonJan-Marek Glogowski
This way it'll properly scale, instead of using the fixed 28 pixel dimension. This is a hack, which is used a few more times in VCL. Still this should not be needed, but done automatically. If there aren't any constraints, just return the optimal size! Change-Id: I8aa32645ea95cba28d0daf56f0be27c15153b6c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96390 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-06-03loplugin:simplifypointertobool improveNoel Grandin
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-20jsdialog: send tab namesSzymon Kłos
Change-Id: Iaae09ec6fc1af0de7f052b89a09ea184a023be70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94182 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94557 Tested-by: Jenkins
2020-05-15loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ibb37c7e840a32453b1d52854d5f958c0285cd26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08split button.hxx into toolkit-only pieceCaolán McNamara
Change-Id: I792efb417504a3b55043ff4fc3fd3597a9b953f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25controllayout.hxx can be a toolkit-only headerCaolán McNamara
Change-Id: I4ad08decf432a890cdf7acf475d15210ba813f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92903 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25tdf#123292 notebookbar: vertical align for shortcuts toolbarSzymon Kłos
Change-Id: I2f2ccee9d6c01962d5d8609ea55c0c2bca6b5cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92892 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-04-22Include <deque>Mike Kaganski
Change-Id: I0d2536038782f0ab6436a6527f24a2e0e737e409 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92677 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-17loplugin:buriedassign in vclNoel Grandin
Change-Id: I529052c1ba7591d91d3848080af8b06e077b6f14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92409 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13loplugin:unusedmethodsNoel Grandin
Change-Id: I8ad75d1251df4d6f8097aaa68e4ec92331e38ad4 Reviewed-on: https://gerrit.libreoffice.org/85077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:unusedfieldsNoel Grandin
Change-Id: I7dd5fc3d53df63fd2ee2caa71586f0f5e13f187e Reviewed-on: https://gerrit.libreoffice.org/81078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-04loplugin:unusedmethodsNoel Grandin
Change-Id: Idd98dc9e1090a6b09124c80eed5a878e5e966cfc Reviewed-on: https://gerrit.libreoffice.org/80182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-03loplugin:virtualdeadNoel Grandin
Change-Id: I86bae18ed2682871032aeb2a178f49f3e4601129 Reviewed-on: https://gerrit.libreoffice.org/80129 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in vclNoel Grandin
Change-Id: Ic454a4d9520992eaecef4b64ec73d49e52ffcc2c Reviewed-on: https://gerrit.libreoffice.org/77828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-08tdf#126266 adjust calculations for invisble tabsJan-Marek Glogowski
This skips invisible tabs in many more places and at least fixes the osx bug of the missing tabs of the NBB. It also fixes the multiple highlighted tabs assertion for multiple rows from TabControl::ImplGetItem. I'm quite sure the tab rect calculation for multiple rows still has the wrong height, so there might be minor overlapping. Change-Id: I3a0a06ee73204b98e367563700fce4a49c066c1a Reviewed-on: https://gerrit.libreoffice.org/75230 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-02tdf#42949 Fix IWYU warnings in vcl/source/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I386e913f9002eed164c26137a0e184993d010b86 Reviewed-on: https://gerrit.libreoffice.org/74090 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>