Commit Graph

6239 Commits

Author SHA1 Message Date
f43c9aa5eb cppcheck: noExplicitConstructor
Change-Id: Id1615ac223cd6257a419e8abe39b5121d4c16ca4
2015-11-25 15:45:56 +00:00
4e88b2a787 More cleanup in toolbarmanager
Change-Id: I97339c43605a838a8fc329b4f1daa05f584ee864
2015-11-25 15:22:01 +01:00
02044b5d27 tdf#96059 Replace imageproducer with CommandInfoProvider
Change-Id: I9508a947e5ae6720516d9f926a59d4287cb15317
Reviewed-on: https://gerrit.libreoffice.org/20166
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-25 12:55:10 +00:00
56907b06f1 Cleanup toolbarmanager
* Remove unused fields/methods/includes
* Formatting

Change-Id: Ia4a2fba258ddf00e8fe507338f7f8c7388631f0b
Reviewed-on: https://gerrit.libreoffice.org/20164
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-25 12:50:21 +00:00
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
4f69d0810e Change the bits of the save button dynamically
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-20 13:24:10 +00:00
fafac0d248 loplugin:unusedfields forms,formula,fpicker,framework
Change-Id: Ic7af56ac801c1e5b3fcf3c4e8413656e96220279
2015-11-20 15:07:05 +02:00
009face61b Revert "vcl: Initial NotebookBar implementation."
Will use a different approach for NotebookBar.
Also this should not be in 5.1.

This reverts commit 8c1014021dbe9da2e18233d215b970f5359db67b.

Change-Id: Ic699723818a890bf4c3be3a2c045527148bd118b
Reviewed-on: https://gerrit.libreoffice.org/20075
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-20 11:14:24 +00:00
20b279e134 -Werror,-Wunused-private-field
Change-Id: I106c03219ae9107cdb981d9f5e4859bc95926957
2015-11-20 09:46:44 +01:00
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
1d5c39192e new loplugin:unusedfields
run it over the framework module

Change-Id: I1220a4be0936ba30136ce22ffd78633c8a7b9d35
2015-11-20 10:12:58 +02:00
b0339005b8 loplugin:sallogareas
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19 16:05:35 +01:00
a95f2e02e1 The base class does this already
Change-Id: I102c7c83bc335d8b5bf597ff0610e65147d4ec9b
2015-11-19 16:18:26 +02:00
1d6480d5c4 tdf#95931 Add 'Open remote file' to menu in start center
Change-Id: Id5c749b3575e210bc4ef36603a7565ee96917dca
2015-11-19 15:02:42 +01:00
a3eec8a043 Toolbar: Add 'Save As' to 'Save' dropdown
Change-Id: I6597ae5569b29d09a8c44fc9a55b71166aa37b05
2015-11-19 13:39:17 +01:00
6480b4d11a move translating a command name to image name out of framework
This is the first step to decouple resolving of command names to
image (icon) names. This is necessary to make allow additional
processing of images before the image is passed on and better
decision which image source to take.

Change-Id: I129dc6a1ae812aaaca32696ef2a2749d5fa86a54
2015-11-19 13:02:53 +01:00
5319def848 No toolbar and statusbar in the startcenter
Change-Id: Id4afbd8df1d6d3800e04d9e178abddc0d9e33d5c
2015-11-19 12:10:16 +01:00
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
f08d0142af Fix css.awt.XSystemDependentMenuPeer.getMenuHandle
...to return an ANY containing a 64-bit HYPER instead of a 32-bit LONG for
SYSTEM_WIN32 (which covers both 32-bit and 64-bit versions of Windows), so that
the HMENU value (which is effectively a void*) is not truncated for the 64-bit
build.

This should effectively be URE ABI compatible for the 32-bit build, as there the
HYPER value will fit into 32 bits, so extracting a LONG from the ANY should
still work.

Change-Id: Ief3de5924f672e8f6bbe6df08c15439456ca036f
Reviewed-on: https://gerrit.libreoffice.org/20045
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:11:02 +00:00
f1132fd50a SystemMenuData::nSize is never read
...and of little use if all users of SystemMenuData agree on the definition in
vcl/sysdata.hxx

Change-Id: Id102a30074b611e3ad37ce69ce27c929f4505495
Reviewed-on: https://gerrit.libreoffice.org/20044
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:10:41 +00:00
f53615de09 Don't wrongly redefine SystemMenuData
...with a long instead of a HMENU on WNT, so with a wrong size for 64-bit WNT.
(And just ignore the comment that TRIES TO SHOUT AT ME!!!!!!!!!!!!!!!)

Change-Id: Id02ef4d8a3818b58def067e8b52f29bac8676fe9
Reviewed-on: https://gerrit.libreoffice.org/20043
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-18 21:09:54 +00:00
5da5076871 Unify menu-based toolbar controllers
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-18 15:16:58 +00:00
27bdc70d83 Toolbar: Refactor insert toolitem code
Change-Id: Icb615164c4dc3e96048829805a3eb0faa7d88e4e
2015-11-18 14:07:27 +01:00
ced83de530 Remove leftover break.
Change-Id: Ic6ce39960d92abc9cf3e162ee004ee14deb266eb
2015-11-18 10:16:44 +01:00
cb4177b5f6 Remove unused toolbaritem properties
The following properties have been removed:
toolbar:bitmap
toolbar:property
toolbar:width
toolbar:userdefined

This should have no impact on existing functionality or AddOns, since these properties were not in use.

Change-Id: I07574f8102648ee0713379be8cb0b605d2c76364
2015-11-18 10:12:21 +01:00
d9e6270392 loplugin:unnecessaryvirtual
update the plugin with lessons learned from the mergeclasses plugin and
re-run it

Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711
Reviewed-on: https://gerrit.libreoffice.org/20015
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-17 12:26:32 +00:00
81ff7cfddb tdf#95845 Add methods for menu labels to CommandInfoProvider
Change-Id: Ibf6a26940ec194f540255584776f8ebcefbb94ae
2015-11-17 12:12:11 +01:00
0c48c809f0 tdf#95845 Use CommandInfoProvider to receive command properties
Change-Id: I41f9a661b7a5b355e50910d7f58f0d9d55dc62a6
2015-11-17 11:10:05 +01:00
16f85dc485 Remove unused methods
Change-Id: Ia78da9dac5fb426fbb145250c4e39eb7d30c4d03
2015-11-17 11:10:05 +01:00
38839ae10c Remove the ability to set tooltips in the toolbar xml files
It was possible to set a tooltip for a certain toolbar entry.
However, this hasn't been used since that tooltip needed to be repeated for each occurence of the same command.
Instead, a TooltipLabel property has been introduced lately (see 9c2f197e8e945f584e718e889938c06fbf644897).

This doesn't affect extensions (They have their own format to specify toolbars).

Change-Id: I0f0fd05b310bb49dd5b4123e31d3e7fec997dd15
2015-11-16 17:34:25 +01:00
40fa83871e Move CommandInfoProvider to vcl and use it from there
Change-Id: If7e3ef81cad8974bc54f359096e3ecc700fa62d6
Reviewed-on: https://gerrit.libreoffice.org/19984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-16 14:48:47 +00:00
8569c6d0ad use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
Reviewed-on: https://gerrit.libreoffice.org/19978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-16 08:35:42 +00:00
099f1016fa Cleanup: Consolidate the different ways to get command labels/tooltips
Change-Id: Ieab809a3122c9d592894b84ec2e68195a4e02dde
2015-11-16 08:08:09 +01:00
06116bd15b Fast PCH generator and optimized PCH files
Ported update_pch.sh to Python with improved performance
and features. The new script is invoked from the same
update_pch.sh which calls it for each library in
parallel, although it can be invoked directly.

The ported script (update_pch) updates all PCH files
in ~15 seconds where the old script took ~4500 seconds.
In addition, the new script supports 3-tiered headers
(system, module, and local) and is very flexible to
support other improvement. It has a per-library
optimal configuration settings that can be updated
using another new scripts (update_pch_autotune.sh)
which finds optimal per-PCH settings.

PCH files have been generated using the new scripts
which builds significantly faster (2-3x, depending
on module and configuration) and the intermediate
binaries are noticably smaller (by several GBs).

The new script stamps each generated PCH file with
the command that generated it to make it trivial
for users to update them, and also adds the command
to invoke another script (update_pch_bisect) that
helps find missing headers or conflicting headers
that may break the build after updating the PCH.

Finally update_pch has built-in unit-tests for
makefile parsing and other core functionality.

Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa
Reviewed-on: https://gerrit.libreoffice.org/19965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-15 20:31:35 +00:00
96c26b0d9d use initialiser for Sequence<OUString>
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-15 12:20:39 +00:00
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
6105812d67 Toolbar: Use 'Name', not 'Label' property for Toolbar items
Name is a stripped-down version of Label (doesn't contain dots etc).
Inadvertently changed in 9c2f197e8e945f584e718e889938c06fbf644897
Thanks to Maxim for pointing this out.

Change-Id: I7df5752af6c398cc216b7773e4506d401232c216
2015-11-13 06:44:33 +01:00
da1f782cb2 loplugin:passstuffbyref
Change-Id: Ie8641fe51f1a8943402f0aab5f78c331b6deb3a0
2015-11-12 21:28:58 +01:00
9c2f197e8e Add a new TooltipLabel property for uno commands
This allows buttons to have different labels and tooltips.

Change-Id: Icbc3fe5f3b4db8a2e6b7177c21341f2df3520f19
2015-11-12 17:13:14 +01:00
1a494d9a00 Windows header sanitization
Isolation of windows headers using prewin.h
and postwin.h headers and making headers
dependent on them more self contained.

Conversion of TCHAR to WCHAR and
LPCTSTR to LPCWSTR etc. and cleanup
of unnecessary casts.

Change-Id: I7eff5c477d9223a064bfb4d962ff6d61960ee69c
Reviewed-on: https://gerrit.libreoffice.org/19901
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12 10:55:41 +00:00
d7801c3982 Namespace cleanup and disambiguation
Change-Id: Ib6d2f8b4e71436c3a7c26bdfc9847152ebaf0739
Reviewed-on: https://gerrit.libreoffice.org/19900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12 10:47:26 +00:00
a133053f94 tdf#93837 Create Thesaurus popup menu controller
The old context menu implementation adds the thesaurus
sub-menu by manipulating the menu at runtime, which isn't a
good idea in general. Since it's a sub-menu anyway, better
to have it as a separate controller, so it can be added
to the xml, and users could decide if they want it, and
where.

Most of the code adapted from sfx2 (menu/mnumgr.cxx,
menu/thessubmenu.cxx), hence the Apache-based license
header.

Change-Id: I4f533fcdd5d6480fae8ebcf53ec7c69675025adb
2015-11-11 15:03:38 +02:00
737555eb2f tdf#93837 Add a new PopupLabel property
Some commands in context menus use different labels than in
the menu bar. In the old resource format those labels are
defined in the resource file itself. Note that the menu xml
has the menu:label attribute, but we can't use it because it
lacks localization support, and as such useful only for user
customization.

The order of consideration now is:

1. Label - Used if Context/PopupLabel isn't defined. (It's
   also used as the base for toolbar tooltips.)

2. ContextLabel - Overrides Label when in menu or context menu.
   Useful to drop the context, e.g. "Insert Image" should be only
   "Image" under "Insert" menu. If exists, that's what returned
   when asking for the "Label" property, instead of the full label.

3. PopupLabel - Overrides Label/ContextLabel when in context menu.
   Used to give items in a context menu different labels than in
   the main menu, e.g. "Paste Special" from the main menu turns to
   "More Options" when in context menu. It doesn't affect the Label
   property, and should be asked separately.

Change-Id: I7408fc2bfb8d384b0f1a72a78b8c5d7c50de38da
2015-11-11 15:03:37 +02:00
1459f12771 framework: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I10801343e65646b92eb0a6256cd7bfbf5c84c854
2015-11-11 11:35:41 +02:00
aef8a59d51 framework: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ia75bf59de4eb5e0be18f81b6ab897f9f9cb28855
2015-11-11 11:35:40 +02:00
ea2ae023cf framework: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: If9981b141a591f23e03479c90694e6ffa78f2cb8
2015-11-11 11:35:40 +02:00
53f66fa679 Fix NotebookBar not showing up when directly opening a document
Change-Id: I6bb154102d5e58e7c7e1f1b0d68629555a6d1697
2015-11-11 08:54:26 +01:00
eb7d8ded9d loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: I4ba74ec66d6d848c7e49e85d2cebeb422e027f7d
2015-11-10 16:20:36 +01:00
06c5c63020 loplugin:nullptr (automatic rewrite)
Change-Id: Ie178c474921c1695927a9b01a9972baf09fbb73d
2015-11-10 10:31:27 +01:00