summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-07-08 20:31:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-09 08:27:53 +0200
commit6653107b838be22da2ceb6e9123dafe67b45dd91 (patch)
tree769d2981f3255905dfce762e16c42ff6a863acc9 /framework/source
parent5483d4e10aad27889b961b9cb94d7ba6c86aed0b (diff)
clean up macro usage
Change-Id: I06669718f692cc5e9e209b4e490365f4f016afdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/dispatch/dispatchdisabler.cxx1
-rw-r--r--framework/source/dispatch/mailtodispatcher.cxx1
-rw-r--r--framework/source/dispatch/oxt_handler.cxx3
-rw-r--r--framework/source/dispatch/servicehandler.cxx1
-rw-r--r--framework/source/dispatch/systemexec.cxx1
-rw-r--r--framework/source/inc/dispatch/dispatchdisabler.hxx4
-rw-r--r--framework/source/jobs/helponstartup.cxx1
-rw-r--r--framework/source/jobs/shelljob.cxx1
-rw-r--r--framework/source/recording/dispatchrecorder.cxx1
-rw-r--r--framework/source/recording/dispatchrecordersupplier.cxx1
-rw-r--r--framework/source/services/dispatchhelper.cxx2
-rw-r--r--framework/source/services/mediatypedetectionhelper.cxx1
-rw-r--r--framework/source/services/uriabbreviation.cxx3
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx1
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx1
-rw-r--r--framework/source/uielement/footermenucontroller.cxx1
-rw-r--r--framework/source/uielement/headermenucontroller.cxx1
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx1
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx2
-rw-r--r--framework/source/uielement/menubarwrapper.cxx92
-rw-r--r--framework/source/uielement/newmenucontroller.cxx1
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx2
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx1
23 files changed, 90 insertions, 34 deletions
diff --git a/framework/source/dispatch/dispatchdisabler.cxx b/framework/source/dispatch/dispatchdisabler.cxx
index b2148f89e8e5..b38fe3d521d5 100644
--- a/framework/source/dispatch/dispatchdisabler.cxx
+++ b/framework/source/dispatch/dispatchdisabler.cxx
@@ -13,6 +13,7 @@
#include <dispatch/dispatchdisabler.hxx>
#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace css;
using namespace framework;
diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx
index 2425fdce5dab..7dcdb073203d 100644
--- a/framework/source/dispatch/mailtodispatcher.cxx
+++ b/framework/source/dispatch/mailtodispatcher.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/system/SystemShellExecuteException.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx
index c50d9e5b3316..ede5c031e89c 100644
--- a/framework/source/dispatch/oxt_handler.cxx
+++ b/framework/source/dispatch/oxt_handler.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
@@ -40,7 +41,7 @@ sal_Bool SAL_CALL Oxt_Handler::supportsService( const OUString& sServiceName )
css::uno::Sequence< OUString > SAL_CALL Oxt_Handler::getSupportedServiceNames()
{
- return { SERVICENAME_CONTENTHANDLER };
+ return { "com.sun.star.frame.ContentHandler" };
}
diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
index c0f6b9d441ca..3ce8be684048 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <tools/diagnose_ex.h>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx
index 5c1b65ecb9dd..ec2d20413614 100644
--- a/framework/source/dispatch/systemexec.cxx
+++ b/framework/source/dispatch/systemexec.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/inc/dispatch/dispatchdisabler.hxx b/framework/source/inc/dispatch/dispatchdisabler.hxx
index 4741c4152b51..1a2b217adb8f 100644
--- a/framework/source/inc/dispatch/dispatchdisabler.hxx
+++ b/framework/source/inc/dispatch/dispatchdisabler.hxx
@@ -15,14 +15,14 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XInterceptorInfo.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#include <macros/xserviceinfo.hxx>
-
namespace framework {
/**
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index 6927b4e9dcc0..b78c4ed50dad 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/Desktop.hpp>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index dd4fed5407b5..292c1a701508 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/util/PathSubstitution.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 647b2601d334..8ed03a030c8e 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -27,6 +27,7 @@
#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <typelib/typedescription.h>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno;
diff --git a/framework/source/recording/dispatchrecordersupplier.cxx b/framework/source/recording/dispatchrecordersupplier.cxx
index 1d31fdd1c57d..08acf223b401 100644
--- a/framework/source/recording/dispatchrecordersupplier.cxx
+++ b/framework/source/recording/dispatchrecordersupplier.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/frame/XRecordableDispatch.hpp>
#include <vcl/svapp.hxx>
+#include <cppuhelper/supportsservice.hxx>
namespace framework{
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index b0c6e7e9b4a5..b4e5718ab56b 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -18,7 +18,6 @@
*/
#include <framework/dispatchhelper.hxx>
-#include <macros/xserviceinfo.hxx>
#include <services.h>
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
@@ -28,6 +27,7 @@
#include <comphelper/profilezone.hxx>
#include <unotools/mediadescriptor.hxx>
#include <vcl/threadex.hxx>
+#include <cppuhelper/supportsservice.hxx>
namespace framework
{
diff --git a/framework/source/services/mediatypedetectionhelper.cxx b/framework/source/services/mediatypedetectionhelper.cxx
index d936b36a4004..f4388d217c13 100644
--- a/framework/source/services/mediatypedetectionhelper.cxx
+++ b/framework/source/services/mediatypedetectionhelper.cxx
@@ -20,6 +20,7 @@
#include <services/mediatypedetectionhelper.hxx>
#include <services.h>
#include <svl/inettype.hxx>
+#include <cppuhelper/supportsservice.hxx>
namespace framework
{
diff --git a/framework/source/services/uriabbreviation.cxx b/framework/source/services/uriabbreviation.cxx
index ae27f5a9e1c4..abccde76f59d 100644
--- a/framework/source/services/uriabbreviation.cxx
+++ b/framework/source/services/uriabbreviation.cxx
@@ -23,6 +23,7 @@
#include <sal/config.h>
#include <tools/urlobj.hxx>
+#include <cppuhelper/supportsservice.hxx>
// framework namespace
namespace framework
@@ -42,7 +43,7 @@ sal_Bool SAL_CALL UriAbbreviation::supportsService( const OUString& sServiceName
css::uno::Sequence< OUString > SAL_CALL UriAbbreviation::getSupportedServiceNames()
{
- return { SERVICENAME_STRINGABBREVIATION };
+ return { "com.sun.star.util.UriAbbreviation" };
}
UriAbbreviation::UriAbbreviation(css::uno::Reference< css::uno::XComponentContext > const & )
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index d72932ebe7ad..5b53720852a5 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -35,6 +35,7 @@
#include <rtl/ustrbuf.hxx>
#include <vcl/mnemonic.hxx>
#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Defines
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index b50dedaef24d..317df6b14033 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -35,6 +35,7 @@
#include <svtools/ctrltool.hxx>
#include <osl/mutex.hxx>
#include <memory>
+#include <cppuhelper/supportsservice.hxx>
// Defines
diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx
index cf88443deb65..9a941a825896 100644
--- a/framework/source/uielement/footermenucontroller.cxx
+++ b/framework/source/uielement/footermenucontroller.cxx
@@ -22,6 +22,7 @@
#include <services.h>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <cppuhelper/supportsservice.hxx>
// Defines
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index aeaea78dc099..6a049994852f 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -33,6 +33,7 @@
#include <vcl/svapp.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Defines
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index a0e60acd8bd7..3d971f43f8fc 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -36,6 +36,7 @@
#include <helper/mischelper.hxx>
#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <map>
#include <set>
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 73b78340fb59..0549ff3a0299 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -20,12 +20,14 @@
#include <uielement/macrosmenucontroller.hxx>
#include <services.h>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <officecfg/Office/Common.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <vcl/svapp.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 48700304f72d..6342f63cf637 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -26,6 +26,8 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/queryinterface.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <vcl/svapp.hxx>
@@ -42,35 +44,67 @@ using namespace ::com::sun::star::ui;
namespace framework
{
-// XInterface, XTypeProvider
-DEFINE_XINTERFACE_11 ( MenuBarWrapper ,
- UIConfigElementWrapperBase ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::ui::XUIElement ),
- DIRECT_INTERFACE( css::ui::XUIElementSettings ),
- DIRECT_INTERFACE( css::beans::XMultiPropertySet ),
- DIRECT_INTERFACE( css::beans::XFastPropertySet ),
- DIRECT_INTERFACE( css::beans::XPropertySet ),
- DIRECT_INTERFACE( css::lang::XInitialization ),
- DIRECT_INTERFACE( css::lang::XComponent ),
- DIRECT_INTERFACE( css::util::XUpdatable ),
- DIRECT_INTERFACE( css::ui::XUIConfigurationListener ),
- DERIVED_INTERFACE( css::container::XNameAccess, css::container::XElementAccess )
- )
-
-DEFINE_XTYPEPROVIDER_11 ( MenuBarWrapper ,
- css::lang::XTypeProvider ,
- css::ui::XUIElement ,
- css::ui::XUIElementSettings ,
- css::beans::XMultiPropertySet ,
- css::beans::XFastPropertySet ,
- css::beans::XPropertySet ,
- css::lang::XInitialization ,
- css::lang::XComponent ,
- css::util::XUpdatable ,
- css::ui::XUIConfigurationListener ,
- css::container::XNameAccess
- )
+void SAL_CALL MenuBarWrapper::acquire() throw() \
+{ \
+ /* Don't use mutex in methods of XInterface! */ \
+ UIConfigElementWrapperBase::acquire(); \
+} \
+ \
+void SAL_CALL MenuBarWrapper::release() throw() \
+{ \
+ /* Don't use mutex in methods of XInterface! */ \
+ UIConfigElementWrapperBase::release(); \
+}
+
+css::uno::Any SAL_CALL MenuBarWrapper::queryInterface( const css::uno::Type& aType )
+{
+ /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */
+ /* Ask for my own supported interfaces ... */
+ css::uno::Any aReturn = ::cppu::queryInterface( aType,
+ static_cast< css::lang::XTypeProvider* >( this ),
+ static_cast< css::ui::XUIElement* >( this ),
+ static_cast< css::ui::XUIElementSettings* >( this ),
+ static_cast< css::beans::XMultiPropertySet* >( this ),
+ static_cast< css::beans::XFastPropertySet* >( this ),
+ static_cast< css::beans::XPropertySet* >( this ),
+ static_cast< css::lang::XInitialization* >( this ),
+ static_cast< css::lang::XComponent* >( this ),
+ static_cast< css::util::XUpdatable* >( this ),
+ static_cast< css::ui::XUIConfigurationListener* >( this ),
+ static_cast< css::container::XNameAccess* >( static_cast< css::container::XElementAccess* >( this ) )
+ );
+ /* If searched interface not supported by this class ... */
+ if ( !aReturn.hasValue() )
+ {
+ /* ... ask baseclass for interfaces! */
+ aReturn = UIConfigElementWrapperBase::queryInterface( aType );
+ }
+ /* Return result of this search. */
+ return aReturn;
+}
+
+css::uno::Sequence< sal_Int8 > SAL_CALL MenuBarWrapper::getImplementationId()
+{
+ return css::uno::Sequence<sal_Int8>();
+}
+
+css::uno::Sequence< css::uno::Type > SAL_CALL MenuBarWrapper::getTypes()
+{
+ /* Attention: "TYPES" will expand to "(...)"! */
+ static cppu::OTypeCollection ourTypeCollection {
+ cppu::UnoType<css::lang::XTypeProvider>::get() ,
+ cppu::UnoType<css::ui::XUIElement>::get() ,
+ cppu::UnoType<css::ui::XUIElementSettings>::get() ,
+ cppu::UnoType<css::beans::XMultiPropertySet>::get() ,
+ cppu::UnoType<css::beans::XFastPropertySet>::get() ,
+ cppu::UnoType<css::beans::XPropertySet>::get() ,
+ cppu::UnoType<css::lang::XInitialization>::get() ,
+ cppu::UnoType<css::lang::XComponent>::get() ,
+ cppu::UnoType<css::util::XUpdatable>::get() ,
+ cppu::UnoType<css::ui::XUIConfigurationListener>::get() ,
+ cppu::UnoType<css::container::XNameAccess>::get() };
+ return ourTypeCollection.getTypes();
+}
MenuBarWrapper::MenuBarWrapper(
const css::uno::Reference< css::uno::XComponentContext >& rxContext
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index c0b4d28601fb..feb9df4bf408 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -40,6 +40,7 @@
#include <unotools/dynamicmenuoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Defines
#define aSlotNewDocDirect ".uno:AddDirect"
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index 0ffd20340b9c..738ae72cab06 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -35,9 +35,11 @@
#include <vcl/EnumContext.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <svtools/miscopt.hxx>
#include <unotools/confignode.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Defines
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index c1432ab5a3a3..57efb365068e 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -55,6 +55,7 @@
#include <svtools/miscopt.hxx>
#include <unotools/collatorwrapper.hxx>
#include <unotools/syslocale.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Defines