Commit Graph

142 Commits

Author SHA1 Message Date
533c6cb6ba fixes for up-casting to Reference<XInterface>
Fix regressions introduced with
6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking
Reference constructor to reduce code noise"

Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-06-25 17:10:43 +02:00
2ce779cd0c fix-includes.pl: framework
Change-Id: I405196a2df0be0eb77961540b457933777b90a50
2014-05-11 01:55:38 +02:00
a6287e21f1 framework: sal_Bool->bool
Change-Id: Ia6e87e2b382bd4005637e14088bde9e809996a25
2014-04-07 13:53:49 +02:00
ee3945bd98 Kill superfluous spacing before semicolons
Change-Id: I53689e78221f3fe074e47d6b47f1a2c3fef96222
2014-04-06 19:37:48 +03:00
951ed199f1 Kill superfluous vertical whitespace
Change-Id: Ia1bb2b40c74efb17e655dd6f00d7ba48c16c65ae
2014-04-06 19:37:48 +03:00
0c50756b5e Remove redundant pure overrides
Change-Id: Ic5e50643d41c08900377a34676c2ff17977643c0
2014-04-03 15:38:23 +02:00
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
da9aaab596 Use an osl::Mutex directly
Change-Id: Ia0a0dfae4390ad8cd74520396ecfbd6ac03a5d6f
2014-03-20 10:49:39 +01:00
112e9c641b Use SolarMutexGuard directly
Change-Id: Ib414409d7f7a3bdfba6dbeeab0d8c1e8e2084ceb
2014-03-19 18:17:05 +01:00
f7d4bcfd45 Use SolarMutexGuard directly
Change-Id: Iffc5e75c45502c770e9a3eee2a327df1e6843c9f
2014-03-18 15:27:08 +01:00
9aca34a69f Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: Iae8f91d93d4169c68cab6601c1c28042f20f3a48
2014-03-18 13:29:17 +01:00
cf8dfcbe60 Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: Ie8b5c4ad21133528597ede8c4e5cf4dc35312ed8
2014-03-18 13:29:16 +01:00
28b880d407 Use cppu::BaseMutex instead of plain osl::Mutex as base
Change-Id: I5b6e30ce0e0b908cfcc4feb00cbf7b78425496c6
2014-03-18 13:29:16 +01:00
07b32bc2bf Consolidate framework::{Resetable,}Guard
Change-Id: I97290c2504992f4a92e6aeb71e02a2542dd35faa
2014-03-17 18:00:10 +01:00
fcbefea017 Remove visual noise from framework
Conflicts:
	framework/inc/dispatch/oxt_handler.hxx
	framework/inc/services/layoutmanager.hxx
	framework/inc/tabwin/tabwindow.hxx
	framework/source/dispatch/menudispatcher.cxx
	framework/source/helper/dockingareadefaultacceptor.cxx
	framework/source/helper/ocomponentaccess.cxx
	framework/source/helper/ocomponentenumeration.cxx
	framework/source/helper/oframes.cxx
	framework/source/layoutmanager/toolbarlayoutmanager.hxx
	framework/source/recording/dispatchrecorder.cxx
	framework/source/services/desktop.cxx
	framework/source/services/frame.cxx
	framework/source/services/urltransformer.cxx

Change-Id: Ibb04e3f6f0796e7f2be16dcce38542f8b90708d4
Reviewed-on: https://gerrit.libreoffice.org/8265
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 14:41:41 -06:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
eb1799714c cleaning the code a bit
Change-Id: I4cc9c16fb79f669ae70d10a50ace3943075edd46
2014-02-13 11:26:29 +01:00
4c726e9607 Survive missing UIElementFactories.
And try to not use AddonsToolBarFactory in native code generator.

Change-Id: I4782e6c719bdc7e01da14d2ea026e119da542517
2014-02-10 16:46:02 +01:00
cc5ec80521 misc cleanup and unnecessary OUStrings
Change-Id: Idef960995d7b13af049de5a5045b99df642dc3df
2014-02-10 16:43:54 +01:00
e3e1bddb85 Rename ToolBoxFactory -> ToolBarFactory, as the service is named.
Change-Id: Iec6cbefcb6863f14d6c21b2f7fd8e3418cb5d2d5
2014-02-10 16:43:53 +01:00
813b0f60e8 fwk: Constructor feature for single-instance FooBarFactories.
Converted them as usual service implementations.
Otherwise - if static singletons are used -
it does not show menu for some reason.

Change-Id: I0673d0bfbba268728a3fa676f2af95aa6c74bbb2
2014-02-06 12:03:27 +01:00
19e16083c6 Introduce com.sun.star.ui.theModuleUIConfigurationManagerSupplier singleton.
Change-Id: I7b503e5d49865c9ff287bf72eaff1995ce871790
2014-01-30 10:48:25 +01:00
eb4a4ebc9d fwk: Constructor feature for single-instance WindowContentFactoryManager.
Change-Id: I6786bc1d76fd57edc8dfacb667b53deab792bd20
2014-01-30 10:48:24 +01:00
a64c6c448d fwk: Constructor feature for single-instance UIElementFactoryManager.
Change-Id: Iaa6b6bf8f132e2f8efb9ae71e9302e6be19347c9
2014-01-29 11:46:11 +01:00
43b84c9662 fwk: Constructor feature for single-instance UIControllerFactories.
Change-Id: I0867404f7e4aa7b9caafe4f0568bd2c20190867f
2014-01-29 11:46:10 +01:00
c2c530da69 Introduce static inline cppu::acquire(), and make use of that.
This is much better approach compared to the callback function, as it allows
passing arguments to the c++ constructor directly, while still allowing some
additional initialization after having acquired the instance.

Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-22 15:09:28 +01:00
f278397787 Change _get_implementation()'s not to do initialization directly.
Many of the initalizations (in eg. framework) have to be done on an
acquire()'d object, so instead of doing the initialization directly, return
the initialization member function back to the createInstance() /
createInstanceWithContext() / ... and perform the initialization there.

As a sideeffect, I belive the calling initialize() from servicemanager is not
that much a hack any more - whoever converts the implementation to be
constructor-base has the choice to provide the callback, or still initialize
through XInitialization, where the callback is preferred by servicemanager
when it exists.

Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-21 21:25:22 +01:00
87051bb36a fwk: Use constructor feature for AddonsToolBoxFactory.
Change-Id: Ifd0c71a5f37fa87c8acc2d810496925788be99ef
2014-01-17 12:24:48 +01:00
c5b7a5fd19 fix equalsAscii conversion. Noticed in fdo#72391
In commit 363cc397172f2b0a94d9c4dc44fc8d95072795a3
"convert equalsAsciiL calls to startWith calls where possible"
I incorrectly converted equalsAsciiL calls to startsWith calls.
This commit fixes those places to use the == OUString operator.

Change-Id: If76993baf73e3d8fb3bbcf6e8314e59fdc1207b6
2013-12-09 12:53:18 +02:00
73342dbb82 remove unnecessary RTL_CONSTASCII_STRINGPARAM
A final pass through the code, converting code to use the new
OUString and OString methods that can detect string literals.

Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
2013-11-22 08:07:19 +02:00
363cc39717 convert equalsAsciiL calls to startWith calls where possible
Simplify code like:
    aStr.equalsAsciiL( "%", 1 )
to
    aStr.startsWith( "%" )

Change-Id: Iee0e4e60b0ae6d567fa8f72db5d616fffbec3c00
2013-11-19 12:49:29 +02:00
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +02:00
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
2b3e225853 Bin some uses of the stupid DECLARE_ASCII macro
Change-Id: I076eef8069e848ec3cf9c69f1b489ad44586324e
2013-09-09 00:58:15 +03:00
cb590428d8 fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
Change-Id: Ib0edc828691c6a8edbd1f45d3c0e2851c32c865f
Reviewed-on: https://gerrit.libreoffice.org/5013
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-23 14:05:13 +00:00
8c799984cc fdo#46808, Convert the rest of XMultiServiceFactory in framework module
Change-Id: Ife3caf00ab37a8c344f0ab90e40337b3b5bc1571
2013-06-05 08:13:22 +02:00
122e4bc598 fdo#46808, XMultiServiceFactory to XComponentContext
Change-Id: I2ca9a2930a921c600f5e93cc2e66d461220ea87d
2013-05-22 15:19:49 +02:00
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00:00
aad035bd70 add missing files
Change-Id: I94dc9b99d243adf21f0439911899354781467da4
2013-05-21 16:36:06 +01:00
8b050d1e91 UI Controller Factory fixes
- "ModuleName" --> "ModuleIdentifier": the IDL definition for
css::frame::PopupMenuControllerFactory and
css::frame::StatusbarControllerFactory tells to use a property named
"ModuleIdentifier", but in the code it is named "ModuleName"

- Undocumented css::frame::ToolbarControllerFactory

- Fix service name of ToolbarControllerFactory (ToolbarControllerFactory
instead of ToolBarControllerFactory)

- Convert the three service factories to new style, and use these
new-style services in the source code

- Implement multiple inheritance: added new css::frame::XUIControllerFactory

- Added a (true) base class and implemented the three factories in a
single file

(cherry picked from commit acc7fed28f54f836b0923180431a0c180f91e98c)

Conflicts:
	framework/inc/pch/precompiled_framework.hxx
	framework/inc/uielement/toolbarmanager.hxx
	framework/inc/uifactory/popupmenucontrollerfactory.hxx
	framework/inc/uifactory/statusbarcontrollerfactory.hxx
	framework/inc/uifactory/uicontrollerfactory.hxx
	framework/source/uielement/addonstoolbarmanager.cxx
	framework/source/uielement/menubarmanager.cxx
	framework/source/uielement/popupmenucontroller.cxx
	framework/source/uielement/statusbarmanager.cxx
	framework/source/uielement/toolbarmanager.cxx
	framework/source/uifactory/popupmenucontrollerfactory.cxx
	framework/source/uifactory/statusbarcontrollerfactory.cxx
	framework/source/uifactory/uicontrollerfactory.cxx
	framework/source/unotypes/fwk.xml
	offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
	offapi/com/sun/star/frame/StatusbarControllerFactory.idl
	offapi/com/sun/star/frame/makefile.mk
	svtools/source/uno/toolboxcontroller.cxx

Change-Id: Ia8580539badf650a84bc6e57a6b832071e011f0a
2013-05-21 16:29:33 +01:00
f4bccae9eb Revert "fdo#46808, Adapt frame::PopupMenuControllerFactory UNO service"
This reverts commit e93a0018871ebea4da1959c72c06f3c7f4dc7b27.

Conflicts:
	desktop/source/app/app.cxx
	framework/source/uielement/menubarmanager.cxx
	framework/source/uielement/popupmenucontroller.cxx
	offapi/UnoApi_offapi.mk

Change-Id: I3d4d49f98603e75357fb315a603a10851b3a7090
2013-05-21 16:29:33 +01:00
e9679a4a76 Revert "fdo#46808, Create new-style frame::ToolBarControllerFactory service"
This reverts commit ecae523d9603eaf7ff0acc98682576813e50c94a.

Conflicts:
	framework/source/uielement/toolbarmanager.cxx
	offapi/UnoApi_offapi.mk

Change-Id: I9f5fe49ffdf3176f0d742d28277c4ec2afbc1ed4
2013-05-21 16:29:33 +01:00
1dec1f2f7e fdo#46808, convert framework::AddonsToolBarWrapper to XComponentContext 2013-04-23 16:05:55 +02:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
fd4380759d RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removals
Change-Id: Ief6418425676d6943993513c4d05c8d22e4740cf
Reviewed-on: https://gerrit.libreoffice.org/2470
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-08 02:45:23 +00:00
e93a001887 fdo#46808, Adapt frame::PopupMenuControllerFactory UNO service to new style
Required creating a new merged interface.
The service interface is going to be shared by some other services,
which is why it's name is != the service name.

Change-Id: I9af3c27b367807147a0052fb6fa4e42eb1ad32de
2012-12-21 09:12:07 +02:00
ecae523d96 fdo#46808, Create new-style frame::ToolBarControllerFactory service
The service already existed, it just did not have an IDL file.

Change-Id: I70d0e1a3fe77deaeec399761cadefb20954f1c92
2012-12-21 09:12:07 +02:00