4539 Commits

Author SHA1 Message Date
Noel Grandin
5676ced825 make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code
that effectively looks like:

   #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR
       enum class XXX {
           ONE = 1
       };
       constexpr auto ONE = XXX_ONE;
   #else
      ...the old normal way..
   #endif

which means that for LO internal code, the enums are scoped.

The "constexpr auto" trick acts like an alias so we don't have to
use scoped naming everywhere.

Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4
Reviewed-on: https://gerrit.libreoffice.org/34546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04 06:38:03 +00:00
Julien Nabet
4c16651356 Replace OSL_FAIL by SAL_WARN_IF
+ simplify message and code to create it

Change-Id: I40cc0c1bf62a974ad5a5c5f27c4ed78c822390fa
Reviewed-on: https://gerrit.libreoffice.org/35984
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-04-01 08:06:58 +00:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
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-31 06:27:11 +00:00
Justin Luth
17d821af6b spelling in comments: minmal -> minimal
Change-Id: Ie1947782cd7679c0c979d01ee7776176d771fc04
Reviewed-on: https://gerrit.libreoffice.org/35925
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-03-31 06:02:03 +00:00
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30 12:21:40 +00:00
Noel Grandin
9bfd742d8c loplugin:unusedmethods
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0
Reviewed-on: https://gerrit.libreoffice.org/35834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29 11:43:40 +00:00
Maxim Monastirsky
91053763a7 Fix sub-toolbar tearoff for .uno:ChooseControls
Regression of 81d4fbc0daa54889ccb09e6a3fadff9c70d99448
("tdf#42029 Use a floating toolbar to show clipped items").

Change-Id: Id32a49109477745122d78354a5d3bd94cb126310
2017-03-26 16:29:56 +03:00
Andrea Gelmini
74d67cffec Fix typos
Change-Id: I63ae7dbd7edf66aa5542f7d41f1bfd8ac04fc5e8
Reviewed-on: https://gerrit.libreoffice.org/35631
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 08:50:08 +00:00
Noel Grandin
7916487cf4 convert ViewShellId to o3tl::strong_int
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09
Reviewed-on: https://gerrit.libreoffice.org/35421
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-24 06:14:17 +00:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Noel Grandin
7299481834 loplugin:redundantcast find redundant c-style enum casts
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349
Reviewed-on: https://gerrit.libreoffice.org/35467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22 06:47:35 +00:00
Julien Nabet
b5bef1f7d5 Typos
Change-Id: I13020539fe121151e884a90d72d47788fb3ae65c
Reviewed-on: https://gerrit.libreoffice.org/35436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 18:50:33 +00:00
Noel Grandin
c627f4b928 remove unused defines from HRC files in various
Change-Id: Ia1ba313d2438f04a84bcfcbbbcf6fffea5c1921d
Reviewed-on: https://gerrit.libreoffice.org/35310
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17 10:43:34 +00:00
Stephan Bergmann
6e4d3bad80 Clean up integer types representing positions in ToolBox's item vector
(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-03-13 13:48:23 +01:00
Andrea Gelmini
fba66b325c Fix typos
Change-Id: I19d30a1ef4236dbe0a0053dad67a5ba7b1586fc8
Reviewed-on: https://gerrit.libreoffice.org/35054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Johnny_M <klasse@partyheld.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11 05:04:40 +00:00
Maxim Monastirsky
98a03d9b0d tdf#106224 Support extra large savemodified icon
For now just duplicated the large icon in Galaxy,
to satisfy the resource compiler.

Change-Id: Icf31df0185a1ec7f080d9600b2536bcaa5d0783e
2017-03-06 01:20:16 +02:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Andrea Gelmini
34e1739d56 Fix typos
Change-Id: Ieb35517ba57ca62526e84f6b6cee4c9129b4380a
Reviewed-on: https://gerrit.libreoffice.org/34805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03 06:57:58 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
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-28 10:17:47 +00:00
Stephan Bergmann
1683fae27e Use WeakImplHelper to implement MenuBarManager
Change-Id: I3a30bc86796a7ad24616cb11ae10b6886e09c1e9
2017-02-27 14:32:33 +01:00
Stephan Bergmann
f058cedb5f loplugin:loopvartoosmall
Change-Id: I05874c22883a98f09c9231c0e0ff0dff93e2d643
2017-02-27 12:55:25 +01:00
Szymon Kłos
6d1e22a9b8 Make ToolbarMode's "IsExperimental" property non-nillable
Change-Id: Ia83776d7ee23fa56c0fc541c228c68b1832c3d11
Reviewed-on: https://gerrit.libreoffice.org/34585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-24 07:42:53 +00:00
David Tardon
a3f2bf61d9 change intervall -> interval
Change-Id: Ib211619428f16304603d9c0a9fce0b22dde2a617
2017-02-23 14:50:13 +01:00
Szymon Kłos
5046877972 tdf#103323 Single Toolbar without experimental mode
Only Notebookbar mode should be marked as experimental.
This patch allows to enable Single Toolbar or Sidebar
mode without experimental mode activation.

Change-Id: I9dcf1602b2f560aaa9ea29c07c4a7ed473be0352
Reviewed-on: https://gerrit.libreoffice.org/34431
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-22 08:54:35 +00:00
Andrea Gelmini
7bc1c43800 Fix typos/translations, following 04644956e53d
No automatic tools

Change-Id: I3a6d18760f90c4ee02b9380758f97f6fca6c4428
Reviewed-on: https://gerrit.libreoffice.org/30874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-02-21 13:34:20 +00:00
Stephan Bergmann
c7d59ad877 loplugin:subtlezeroinit: framework
Change-Id: I88871abd4b57debeb8002a25ef5f59f57e065803
2017-02-21 07:35:06 +01:00
Maxim Monastirsky
b6994cb75f Use module name when getting labels
Change-Id: I1d5196e1ca888dfb11d5bd6ef4676937dce49fdc
2017-02-21 01:40:19 +02:00
Maxim Monastirsky
8c5a3b448a Single GlobalAcceleratorConfiguration should be enough
avoid reading the configuration again and again.

Change-Id: I4179da53114990e5ee68b47125ccef356ca00d53
2017-02-21 01:40:08 +02:00
Maxim Monastirsky
7e559e5495 Revert "Resolves: #i120029# Unregister on dispose."
This reverts commit 11f8e53d6c9942185702552445a751c6f542942d.

At the time this commit was imported from AOO, we had the
original problem fixed already with
dd8fa7c25af9614dbee5a7795b95d8583093f65b ("fix more lifecycle
problems").

Change-Id: Id8288d30c1cb908b68e5b9ef0279237412aae357
2017-02-21 01:39:53 +02:00
Rohan Kumar
33c51e8002 tdf#95844 Refactor CommandInfoProvider
Instead of a singleton, CommandInfoProvider should just be a set of static methods.

Change-Id: I16d4406e361a72f013d78f18d6bd0ae20c0cc5e9
2017-02-21 01:39:01 +02:00
Noel Grandin
d5c3e8004b drop enum framework::GlobalSettings::UIElementType
since we only ever use the one enumerator.
Consequently renaming some methods

Change-Id: Ia8c022135df6661b8f300e037ea3e7cf610b63ac
2017-02-16 12:42:04 +02:00
Noel Grandin
344957aae6 convert LoadEnv::EFeature to o3tl::typed_flags
Change-Id: I4c16b68c820783e9bd27fa273f2017b5088f4b85
2017-02-16 12:42:04 +02:00
Noel Grandin
3910f943e9 drop unused enumerators from TargetHelper::ESpecialTarget
Change-Id: Ieda0b6f09b0e4cb463de32309a2617018bb7cee5
2017-02-16 12:42:04 +02:00
Fakabbir Amin
9d8c206ee4 tdf#100726 Improved readability of OUString concatenations
Cleanup in filter, framework and svtools directory.

Change-Id: Icf4f04cff1207e58ce55ea3dc8c21b0635c3b6ec
Reviewed-on: https://gerrit.libreoffice.org/34298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-16 08:51:29 +00:00
Noel Grandin
d76d15552d convert FrameListAnalyzer::EDetect to scoped enum
Change-Id: I4e1bd449c4ad60ec810ef52c73d6c6ff3dd313ee
2017-02-16 08:17:34 +02:00
Stephan Bergmann
32cb8a544d Some simplifications, using UNO_QUERY_THROW
Change-Id: I313b17cea20fc9dc3b617ecc41626410c0dfb127
Reviewed-on: https://gerrit.libreoffice.org/34267
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15 14:18:39 +00:00
Noel Grandin
8c00536d87 Convert WindowType to scoped enum
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-14 10:44:08 +00:00
Maxim Monastirsky
81d4fbc0da tdf#42029 Use a floating toolbar to show clipped items
Change-Id: I6b366f115258ef8497807163179d3e08ab3d5e6f
Reviewed-on: https://gerrit.libreoffice.org/34180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-02-12 21:56:29 +00:00
Noel Grandin
d198a8221d convert InsertOperation to scoped enum
and drop unused LINK enumerator

Change-Id: I6c42424ae5a7503b3e14e5f04fcf7a49b595b416
2017-02-10 08:08:45 +02:00
Noel Grandin
f4a9ba4b48 convert ConfigNameFormat to scoped enum
and drop unused constants
    CONFIG_NAME_PLAINTEXT_NAME
    CONFIG_NAME_FULL_PATH

Change-Id: Ibf7e88da0ae54516cb863b8efa995201f2a95268
2017-02-10 08:08:45 +02:00
Caolán McNamara
6851074c8a Resolves: tdf#66237 set layout manager the way it used to
model Frame::setLayoutManager after the Frame::impl_setPropertyValue handler
for FRAME_PROPHANDLE_LAYOUTMANAGER which used to be used before

commit b248624126c271c88381d3dad6e04fc954f65779
Date:   Fri Mar 22 09:24:15 2013 +0200

    fdo#46808, Convert frame::Frame to new style

i.e.

- Reference< XPropertySet > xFrameProps( m_xFrame, UNO_QUERY_THROW );
- xFrameProps->setPropertyValue( OUString( "LayoutManager" ), makeAny(Reference< XLayoutManager >()) );
+ m_xFrame->setLayoutManager( Reference< XLayoutManager >() );

Change-Id: I00f1a2cb8e4fafc6d484634619cbeaf58c603d87
2017-02-09 15:28:43 +00:00
Juergen Funk
f57424cc4c tdf#104101 Improve the session management handling
- Set the current time to the SessionID
 - Split the SetProperties-Data, and send
   DeleteProperties for DiscardCommand
   (above both topic is the same as kate and
    plasma-desktop to do)

 - in statusChange the saveDone was not called, and
   call only once the saveDone
 - in shutdownCanceled must be send the saveDone too

Change-Id: I42855c75b88b5d651ef8091947e359dc2c3f9209
Reviewed-on: https://gerrit.libreoffice.org/33215
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-02-07 08:44:10 +00:00
Juergen Funk
d8ccf8cf7a Stop question in context of session manager when cancel a frame
When shutdown or logout, LO make the question for all open
windows, but when you cancel a window the question for the other
windows are not necessary, this patch breaks the other questions.

 in dependency of tdf#104101

Change-Id: I7119317d392ccd808c67fb57f82b1e990062abf2
Reviewed-on: https://gerrit.libreoffice.org/33311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-02-07 08:41:52 +00:00
Maxim Monastirsky
486c310151 MenuToolbarController improvements
- Make it self-contained, instead of having its code
  spread across ToolBarManager.
- Base it on svt::ToolboxController directly, since it
  uses nothing from GenericToolbarController.
- Move the code from dtor to dispose method.
- Call ToolBox::SetItemDown to make the button work on
  a second click.

Change-Id: I5b38ef532ba40ef0ac31bc53de5b6be4ccd1a118
Reviewed-on: https://gerrit.libreoffice.org/33982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-02-06 23:05:17 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...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-02-06 17:21:16 +01:00
Tor Lillqvist
e1e4efdc71 Typo: s/dependend/dependent/i
Change-Id: If02798894ad6f0e0442ed60aaec6eca40e6dcb61
2017-02-06 16:03:34 +02:00
Takeshi Abe
8e53f220ff framework: Pass Item ID to Menu::GetUserValue() instead of index
This also avoids needless cast.

Change-Id: I3fd1517657b489115f20e26f4f75f3e3a5b7c9b7
Reviewed-on: https://gerrit.libreoffice.org/33944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-02-06 10:32:42 +00:00
Takeshi Abe
9a5e2d01c5 framework: Retrieve shortcuts from document-specific configuration
No known symptoms, but it seems like a typo when comparing with
MenuBarManager::RetrieveShortcuts().

Change-Id: I83f6e5766f5e0a0e01f5fd4863772ad1d99c70d2
Reviewed-on: https://gerrit.libreoffice.org/33945
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-02-06 08:00:06 +00:00
Noel Grandin
bac9a5d634 loplugin:unusedenumconstants in framework
Convert EProtocol to scoped enum and drop E_UNKNOWN_PROTOCOL.
Convert ToggleButtonToolbarController::Style to scoped enum and drop
STYLE_TOGGLEBUTTON.
Convert TargetHelper::ESpecialTarget to scoped enum and drop
E_NOT_SPECIAL.

Change-Id: I412adacac15192cf6563ce4d5e5b74bfffff4737
Reviewed-on: https://gerrit.libreoffice.org/33949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 07:57:28 +00:00
Maxim Monastirsky
9421a4c053 tdf#105737 Menu::GetItemType takes position not item id
And get rid of a pointless sal_uInt32-sal_uInt16 casting.

Change-Id: Ia27fd87ceb4d060dab9ea7fffd4803903a1893da
2017-02-05 20:57:01 +02:00