summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar
AgeCommit message (Collapse)Author
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-21Notebookbar: correct initial icon sizeSzymon Kłos
Before this patch initial icon size in the NotebookbarToolBox was determined by Sidebar settings not Notebookbar Change-Id: I66ac709c606ef60fb3505bbbe51dfebbcc81d20c Reviewed-on: https://gerrit.libreoffice.org/35493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2017-03-14remove unused RID constantsNoel Grandin
found with the attached bin/find-unused-rid.py script Change-Id: I1cf79caa6cafedb8bc642f394dc7e7da889d6fdf Reviewed-on: https://gerrit.libreoffice.org/35136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13Clean up integer types representing positions in ToolBox's item vectorStephan Bergmann
(vs. uses of sal_uInt16 representing such items' IDs). APPEND and ITEM_NOTFOUND are members of ToolBox now (and have been bumped to the corresponding type's max). The payload of VclEventIds ToolboxButtonStateChanged ToolboxClick ToolboxHighlightOff ToolboxItemAdded ToolboxItemDisabled ToolboxItemEnabled ToolboxItemRemoved ToolboxItemTextChanged ToolboxItemUpdated ToolboxItemWindowChanged ToolboxSelect has been changed too (note that reading/writing of those payloads isn't very consistent, though: for some of these, values are written that are never read, while for some others no values are ever written but the reading code would like to receive some value if the payload wasn't a nullptr). Change-Id: I4856ffb3637404b8d866621a3503d7922b1b8141
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-24vector::data seems more natural than &vector::frontCaolán McNamara
Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1
2017-02-21tdf#95844 Refactor CommandInfoProviderRohan Kumar
Instead of a singleton, CommandInfoProvider should just be a set of static methods. Change-Id: I16d4406e361a72f013d78f18d6bd0ae20c0cc5e9
2017-02-15Related: tdf#105672 Load toolbar properties from .uiMaxim Monastirsky
- Supports toolbar-style, icon-size, orientation. - Defaults are: toolbar-style = icons only icon-size = what's set in Tools > Options... for Sidebar/Notebookbar orientation = horizontal - Remove no longer needed BigToolBox (use toolbar-style=both + icon-size=3 instead). Change-Id: I185388255a351dfd6719a363b7e399bf36b0b25d Reviewed-on: https://gerrit.libreoffice.org/34281 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-02-14Convert WindowType to scoped enumNoel Grandin
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9 Reviewed-on: https://gerrit.libreoffice.org/34219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07tdf#104870 - keep reference on the TitleBar while setting title.Michael Meeks
Unlikely to fix the issue, but may help. Change-Id: I3c319f550e86f2ab731b072d86d258dca12d34fa Reviewed-on: https://gerrit.libreoffice.org/33998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-31SolarMutexGuard for ImplDbgTestSolarMutex assert in JunitTest_dbaccess_complexCaolán McNamara
Change-Id: Ic2109abdec0ad3305c2720ac9012585cd7ceb25b
2017-01-31Resolves: tdf#104884 print preview replaces the frame controllerCaolán McNamara
so the sidebar is listening to the old controller which has been disposed[1] so when print preview exits and yet another controller replaces the print preview one then the sidebar still doesn't listen to the current one. framework broadcasts COMPONENT_DETACHING/COMPONENT_REATTACHED around these changes, so if we listen to them we can keep attached to whatever is the current component [1] note that ContextChangeEventMultipler doesn't inform clients that the controller has been disposed, this remains unchanged here Change-Id: I141509d4a262307afd7dcfc3d77de6cdd6dbfa5f Reviewed-on: https://gerrit.libreoffice.org/33758 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-10New loplugin:conststringvar: sfx2Stephan Bergmann
Change-Id: I287d338711a15fb53f4653b6475191099b8379e1
2016-12-21convert EnumContext::Context to scoped enumNoel Grandin
Change-Id: I16ec63beb801073e5d604d852892c2fd6e8d8fc3 Reviewed-on: https://gerrit.libreoffice.org/32272 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-21convert EnumContext::Application to scoped enumNoel Grandin
Change-Id: Ia289a7b63bf8797085315218785e2a2a4c45d232 Reviewed-on: https://gerrit.libreoffice.org/32230 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-20Don't use 'this' in ctorStephan Bergmann
Change-Id: I405160743609aae92a37b2359bea5aa42ee66519
2016-12-20Result of css::ui::ContextChangeEventMultiplexer::get cannot be nullStephan Bergmann
Change-Id: I00fba6c2a79404c824feaa5bb302d37c4158f9a3
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-11OSL_TRACE -> SAL in sfx2..svxNoel Grandin
Change-Id: I78cf8058a5682baa3d7b00a25feeb2d28fb3e66e Reviewed-on: https://gerrit.libreoffice.org/31799 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-09Related: rhbz#1397939 crash with null pSidebarControllerCaolán McNamara
Change-Id: I7627ff30564b2de61669c71dafd15e7b1778b5c6
2016-12-07convert VCLEVENT constants to scoped enumNoel Grandin
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba Reviewed-on: https://gerrit.libreoffice.org/31675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05loplugin:unnecessaryoverride (dtors) in sfx2Stephan Bergmann
Change-Id: Ic086a22bccd267824e68df6c963df8da76e6df2c
2016-11-29loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24vcl: rename Window::Notify to EventNotifyMichael Stahl
There is annoying overloading between Window::Notify and SfxListener::Notify, and the Window one has apparently fewer implementations, so rename that and remove lots of disambiguating "using Notify" in multiply inheriting classes. Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01tdf#103624 Avoid double init of controls in SidebarToolBoxMaxim Monastirsky
Controls that created by the service manager are already initialized by it. At least in the case of SaveToolbarController such double init creates a problem, as SaveToolbarController will add itself as a modify listener twice, but remove only once in dispose method. Probably SaveToolbarController should be smarter about this, for both not adding a listener twice, and also not attempt to work after being disposed - but that doesn't make the behavior of SidebarToolBox correct. Change-Id: I3f0fcdff31c65198a2233c969d37a0015712fff5
2016-11-01loplugin:oncevar in sd..svgioNoel Grandin
Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c Reviewed-on: https://gerrit.libreoffice.org/30459 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-30tdf#95014 initial support for 32 px icons in toolbarTomaž Vajngerl
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29HiDPI: remove unneeded image scaling when HiDPI is enabledTomaž Vajngerl
We don't need to scale images for HiDPI mode anymore - this is now done automatically when the image is loaded. Change-Id: Ie285cf4d672f4c098a468d3f7560ee2700365b92 Reviewed-on: https://gerrit.libreoffice.org/30340 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-07sidebar theme loads pngs by name that are not picked up automaticallyCaolán McNamara
anywhere else, so explicitly list them here in an auxillary ilst some are mentioned in sfx2/source/sidebar/Theme.cxx, and some are mentioned in *IconURL properties in officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu Change-Id: I0cf3919c20277d4c88783f06da53c5e889049a06
2016-10-07we don't need the code, but we need the images in the src fileCaolán McNamara
apparently so they can be found at postprocess time and inserted into the image zips for the use of the pngs by other consumers Change-Id: Ib45834da69462109fdf7502176a6f4721057d980
2016-10-07Revert "SidebarResource doesn't do anything useful"Caolán McNamara
This reverts commit e9886d32923e5fa3995f44701f27148f59df5c0f.
2016-10-06SidebarResource doesn't do anything usefulCaolán McNamara
Change-Id: Id716c9f9caa1a1e4f8ae0e7e05837bebdec4335a
2016-10-06drop now unused sfx2/sidebar/ResourceDefinitions.hrcCaolán McNamara
Change-Id: I151a37a37435a44e7331d957bd9d36f84cdf8677
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-04can now remove both PopupContainer copiesCaolán McNamara
the recently unused svx one, and the forgotten not-built sfx2 one Change-Id: I1a4ede49dc74bb71f250ee3eee999d1a3dfbee57
2016-10-01Fix typosAndrea Gelmini
Change-Id: I1e0e6f1b99090f26a6cd657ee9019bf2fa906dd9 Reviewed-on: https://gerrit.libreoffice.org/29436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-05convert ToolBoxButtonSize to scoped enumNoel Grandin
Change-Id: I365b0e34361eb339b04e5f4792f54eff5bf582a5
2016-09-05convert GradientStyle to scoped enumNoel Grandin
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-08-22GSoC: tdf#101249 Toolbar Mode switchingSzymon Kłos
+ added registry entry for storing current toolbar mode for each application + registry entries to store toolbar mode configuration, remember additional visible toolbars activated by user + changing toolbar mode hides and shows suitable toolbars + added menu controller for toolbar mode + notebookbar implementation entries are disabled when notebookbar mode is not active + each mode can open/collapse the sidebar Change-Id: I2b03f87c6dce53190d12102892d9ad30fbfd3bf6 Reviewed-on: https://gerrit.libreoffice.org/27991 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2016-08-16GSoC notebookbar: icon size switchingSzymon Kłos
+ added entry in the Options > View + changed sfxlo-SidebarToolBox to sfxlo-NotebookbarToolBox in the Notebookbar ui files Change-Id: Id5719953be9830b650af96d54e63936c553cda74 Reviewed-on: https://gerrit.libreoffice.org/28169 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2016-08-02loplugin:countusersofdefaultparams in sfx2Noel Grandin
Change-Id: I0a21e2f8069bc698700e97e7c5e4ae508240ff98 Reviewed-on: https://gerrit.libreoffice.org/27761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-31Resolves: tdf#101221 VclPtr: funkiness with PopupMenu dtor before disposeCaolán McNamara
Change-Id: I6f8d980cc14b7f8c7b7ed5ee66a54dfce9d6e09a