Commit Graph

4117 Commits

Author SHA1 Message Date
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
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
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
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
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
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
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
c5376ef685 loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
Change-Id: I4633229b94be1b15dfa14eafe8d7176a1fd253c9
2015-11-06 12:32:17 +01:00
69ef5d40c2 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Iff1f68969f0f044c59a92ab4c019c471511743f7
2015-11-06 09:36:08 +01:00
72e426c4c0 Tweak MenuBarManager a bit for use with context menus
Change-Id: Ie28277e692d3b3286f1961e66f90b5ae59810fe7
2015-11-04 00:32:04 +02:00
0c6305a01f Support of popupmenu resource type
Reusing the same xml format as the menubar, except that
a popup menu use menu:menupopup as the root element.

Change-Id: I2987af0dc698b09aeeb757cff828617515bc3009
2015-11-03 22:11:35 +02:00
97a392a036 fix build
after my commit 7408498de37be05159f84cf0c8116313d3c196df
 "loplugin:stringconstant"

Change-Id: I1354207e1ecb6ebc76fcda3ed8eb8f369180eae8
2015-11-02 15:11:49 +02:00
7408498de3 loplugin:stringconstant
Change-Id: I865efc1884b82d430fe7df2e432d43f5425a83d4
2015-11-02 14:50:33 +02:00
5797d29e9e use uno::Reference::set method instead of assignment
Change-Id: Ic979f8a7734d0ef7a915d47a875cdcd460c0cc58
2015-11-02 12:23:16 +02:00
0e6544903b no need to be so verbose in constructing uno::Reference
Change-Id: I187a26e200e9ecaff2adaf53a2ba3f6e87346030
Reviewed-on: https://gerrit.libreoffice.org/19724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:26:10 +00:00
3bc5df7f32 UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 08:59:59 +00:00
7cdbde4867 Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
2015-10-29 08:57:08 +02:00
d7f3eed145 afl-eventtesting: improve event testing exit
don't "Quit" twice and skip tearing down office ipc etc for the pseudo-quit
AFL_PERSISTENT=1 case

Change-Id: I26f0e798b95bc9376890381d4e5bd87fe8f12622
2015-10-22 16:45:10 +01:00