summaryrefslogtreecommitdiff
path: root/framework/source/uielement/popuptoolbarcontroller.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-04-15remove some unused comphelper includesJochen Nitschke1-1/+0
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-11tdf#42949 Remove unnecessary localization headers from frameworkGabor Kelemen1-2/+0
Found by searching for the header names and the localization function: git grep -l -e \<fwkresid.hxx\> -e \<strings.hrc\> framework/ | xargs grep -c FwkResId | grep :0$ | grep -v /pch Change-Id: I026d78b5d1400c66705bd717eca9ed95e8c75366 Reviewed-on: https://gerrit.libreoffice.org/52597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke1-1/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-02-02loplugin:datamembershadow in PopupMenuToolbarControllerNoel Grandin1-2/+1
this looks like an oversight, just use the baseclass member Change-Id: Ida36be64266bbc33a6bd1d89dcb665d24a6dd83f Reviewed-on: https://gerrit.libreoffice.org/49075 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-14Fix typosAndrea Gelmini1-2/+2
Change-Id: I2a578961837076ebce3c1fb2681b0785d1d490ac Reviewed-on: https://gerrit.libreoffice.org/47857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-13sal_uLong->void* for userdata in MenuNoel Grandin1-1/+1
Change-Id: I58fb10136a23c445edfd63a1f86ace3995524704 Reviewed-on: https://gerrit.libreoffice.org/46350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin1-3/+3
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: frameworkStephan Bergmann1-1/+1
Change-Id: Ib5eaab06ff0cc1b44db9e4057ab349a0990af14d
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-2/+2
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-21migrate to boost::gettextCaolán McNamara1-1/+1
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-12cleanup unused css/frame/* includesJochen Nitschke1-1/+0
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65 Reviewed-on: https://gerrit.libreoffice.org/38633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26remove framework bitmaps from .src filesCaolán McNamara1-3/+4
Change-Id: Iea85517a60874d49cdf60860071f0924b96cbf62 Reviewed-on: https://gerrit.libreoffice.org/36966 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-23Replace GetImage with CommandInfoProvider::GetImageForCommandMaxim Monastirsky1-14/+2
And move ToolBoxButtonSize->ImageType mapping code to a common place. Change-Id: If158f4b6f2750054fcf64491c2941706e7d3a329
2017-03-06tdf#106224 Support extra large savemodified iconMaxim Monastirsky1-2/+6
For now just duplicated the large icon in Galaxy, to satisfy the resource compiler. Change-Id: Icf31df0185a1ec7f080d9600b2536bcaa5d0783e
2017-02-21Use module name when getting labelsMaxim Monastirsky1-2/+2
Change-Id: I1d5196e1ca888dfb11d5bd6ef4676937dce49fdc
2017-02-21tdf#95844 Refactor CommandInfoProviderRohan Kumar1-7/+7
Instead of a singleton, CommandInfoProvider should just be a set of static methods. Change-Id: I16d4406e361a72f013d78f18d6bd0ae20c0cc5e9
2017-02-12tdf#42029 Use a floating toolbar to show clipped itemsMaxim Monastirsky1-2/+8
Change-Id: I6b366f115258ef8497807163179d3e08ab3d5e6f Reviewed-on: https://gerrit.libreoffice.org/34180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-56/+27
...(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-16e*, f*: load BitmapEx resources instead of Image onesCaolán McNamara1-1/+1
Change-Id: I3383e222829042557a8fd9f575049c47aeddeb09
2016-12-05loplugin:unnecessaryoverride (dtors) in frameworkStephan Bergmann1-6/+0
Change-Id: I52b12e390b97f15f9af07edd511fa36288f31fbd
2016-10-30tdf#95014 initial support for 32 px icons in toolbarTomaž Vajngerl1-8/+21
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-27GenericPopupToolbarController: deal with main command being disabledMaxim Monastirsky1-0/+46
Try to set another command from the dropdown, if there is any enabled. Otherwise give up and disable the button altogether. Change-Id: I7fa46a946826056d04851faee9c7ad85f00c3678
2016-10-27GenericPopupToolbarController: Support replacing the main commandMaxim Monastirsky1-5/+35
If a second arg is passed in the "Value" property, it will be treated as boolean. If true - the button will be ToolBoxItemBits::DROPDOWN, and will keep replacing the main command with the last selected one from the dropdown. It will also respond to status updates of that command, currently for enabled/disabled and boolean (true treated as pressed) states. Change-Id: I09a5c20e6d2a010867037754f036096246749ec4
2016-10-16tdf#88205 css::uno::Sequence to use initializer_list ctor.Hieronymous1-6/+3
Change-Id: If4f2e8e369930f028c342bc81c4f49df7350e238 Reviewed-on: https://gerrit.libreoffice.org/29811 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann1-1/+1
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 Grandin1-1/+1
Change-Id: I365b0e34361eb339b04e5f4792f54eff5bf582a5
2016-06-20Try to fix the crashreport with SaveToolbarController::modifiedMaxim Monastirsky1-9/+0
No idea how one managed to trigger this. The only way I see is to add the save button to one of the custom shapes dropdowns. The ToolBox there has mpData->mbWillUsePopupMode set to true, which causes ToolBarManager to call the update method of the controller twice. update registers additional modify listener each time, but there is only one "remove listener" call in dispose. Change-Id: I2a1d6e02f6d8b6bc847fb7694fffa6e85b1f5604
2016-06-17SaveToolbarController: back to using XStorableMaxim Monastirsky1-21/+27
See 747a0fdda2a7723c2f8a8a022b468bcf29c700e3 ("SaveToolbarController: Better support of readonly docs") for the background. However this doesn't work, because the save slot is disabled in other cases too, not just for r/o docs (e.g. locked UI during file save, or when cond. formatting window open in Calc). Until a better solution is found, at least make sure that the button is disabled, instead of going into the normal save mode, which doesn't work. Change-Id: If6e1b91b7c780fffac22cdb25c82bbd0a8520dc4
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-1/+1
Change-Id: Idf27ee5370f1fa24adf22908d9e801c7d40db935
2016-04-13Tooltip/bits should also depend on state changeMaxim Monastirsky1-8/+5
Change-Id: I18093e42dd2fc54483e620759e4ba00c988ce9db
2016-04-12Try to fix Windows buildMaxim Monastirsky1-1/+1
Change-Id: I46d1d3428ba1cfd8c0ab47aff6b32807e52c3c48
2016-04-12Yet another SaveToolbarController refactoringMaxim Monastirsky1-39/+44
Nothing changed for the end user. Change-Id: Ib5833ae81e94a7cc9aa9ac0eba29702364ea755c
2016-04-12SaveToolbarController: Better support of readonly docsMaxim Monastirsky1-38/+41
The sfx2 impl. of XStorable::isReadonly isn't really helpful for files w/o write permissions that were switched to edit mode, as it returns the state of the UI. So instead let's just rely on the state of the .uno:Save slot. Change-Id: I3b033be3c9424a4479e9224f02d186960b540d21
2016-04-12SaveToolbarController: Blacklist RelationDesign in officecfgMaxim Monastirsky1-8/+1
Change-Id: I8aa14bb76a26aa12771000b393bee37d26ba85e7
2016-04-01tdf#97966 Drop 'static' keywordsWastack1-1/+1
Including no keywords from extern "C" blocks Change-Id: Id9dd5a53d6ea5134ebb473bd0463f8f42965a211 Reviewed-on: https://gerrit.libreoffice.org/23674 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01tdf#98849 SaveToolbarController: Correct initial modified stateMaxim Monastirsky1-0/+3
Regression of 69882b0ef861099fd6bfa802d6f7ba5d1391c269 Change-Id: I3698efff2f1e62e513d779400eff7f1c4a4145e4
2016-03-21tdf#98745 Optional save button without the dropdownMaxim Monastirsky1-9/+16
Change-Id: I66499a9108dce76e661df9b5b45b249caf9eece8
2016-02-17tdf#91013 Add new uno commands to freeze one row and column.Gulsah Kose1-4/+9
Added freezepanesfirstcolumn and freezepanesfirstrow commands. FreezePanes button became a split button that includes this two new uno commands. And this new commands added to menu. Change-Id: Ic6958067cc98b3df50bcd06a1eac220bd9a61473 Reviewed-on: https://gerrit.libreoffice.org/21604 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
2016-01-28tdf#97419 Need to take SolarMutex hereMaxim Monastirsky1-0/+1
Change-Id: I97886c8dbd7b56d155ad9598ca127df0c7420d2c
2016-01-18Don't update the save icon on every keystrokeMaxim Monastirsky1-2/+9
Change-Id: Iad6195ea8b082ca5e6c1a7e9fa48742ff2b495a6
2016-01-13Modified state icons not packaged into zipMaxim Monastirsky1-7/+5
It seems that images must be mentioned in some src file. Unfortunately had to copy the save icon in place of the modified icon in galaxy, to satisfy the resource compiler. Change-Id: If3fa7a8a194a0289c79fa10987138dfb35eaeca2
2015-12-29PopupMenuToolbarController: Update the menu before openingMaxim Monastirsky1-1/+5
Just like we do for the menubar, we must tell the popup menu controller to update itself. Change-Id: Ib914b22b909f9e5c1c4ebc8af58496d73e867416
2015-12-23New saving behaviorMaxim Monastirsky1-6/+153
Changes in this commit: - AlwaysAllowSave config is gone. Saving is always permitted, unless in a read only document. Also changed the behavior in dbaccess to match sfx2. - The toolbar save button is always enabled, to always give access to the dropdown. That's the case even in a read only document, except that it changes to DROPDOWNONLY, and the save as command icon+tooltip. In table/query designers we still disable the button in read only state. - When the document is modified, the toolbar button gets a special icon to indicate that. TODO: - Icons for the document modified state are still missing. I added some fake links to Tango's links.txt in order to test the new behavior. These links shouldn't stay as-is in a production version! Change-Id: I56c169bf48b78faaf53c2989ce8624f8297ffb6e Reviewed-on: https://gerrit.libreoffice.org/20839 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-25cppcheck: noExplicitConstructorCaolán McNamara1-2/+2
Change-Id: Id1615ac223cd6257a419e8abe39b5121d4c16ca4
2015-11-20Change the bits of the save button dynamicallyMaxim Monastirsky1-0/+58
When the save slot is disabled, we want it to become a dropdown only instead of disabling it. Change-Id: I22fb04c8a0c9afc0a1af8f031a584cdaa99484f9 Reviewed-on: https://gerrit.libreoffice.org/20079 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-18Unify menu-based toolbar controllersMaxim Monastirsky1-72/+35
The new GenericPopupToolbarController takes by default the popup menu controller that registered for the same .uno:Something command, and sets ToolBoxItemBits to ToolBoxItemBits::DROPDOWNONLY. If a different command specified using the "Value" property - takes the popup menu controller that registered for this command, and sets bits to ToolBoxItemBits::DROPDOWN. Change-Id: I75c5300bd27fcc9f618f2ee0df2aa6aefd088239 Reviewed-on: https://gerrit.libreoffice.org/20040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin1-9/+3
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: Ie178c474921c1695927a9b01a9972baf09fbb73d
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-18/+18
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-08-14framework: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe1-2/+2
with the variadic variants. Change-Id: I6acff50f23bcbac58c689caf2a7f07dbd5404e57 Reviewed-on: https://gerrit.libreoffice.org/17734 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>