summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-14 10:49:08 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-14 11:06:48 +0000
commit218cd09611583437c05c33e2aa3b2b81cb416f98 (patch)
tree1b3b99677e6acff1f6224f9bd7441f161fcf2596 /dbaccess
parentf7965b0bcd559451c471a26bf5fd6f542887d95e (diff)
inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5 Reviewed-on: https://gerrit.libreoffice.org/23235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/querydescriptor.hxx4
-rw-r--r--dbaccess/source/inc/apitools.hxx62
-rw-r--r--dbaccess/source/ui/browser/sbabrw.src59
3 files changed, 49 insertions, 76 deletions
diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx
index 5209e1de887c..10d93f1dccea 100644
--- a/dbaccess/source/core/api/querydescriptor.hxx
+++ b/dbaccess/source/core/api/querydescriptor.hxx
@@ -79,7 +79,9 @@ public:
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
- DECLARE_IMPLEMENTATION_ID( );
+ virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(css::uno::RuntimeException, std::exception) override;
+ static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+
// css::lang::XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 0d342c55dab7..16871550e676 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -89,13 +89,6 @@ public:
return sal_False; \
} \
-#define IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \
- css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
- { \
- css::uno::Sequence< OUString > aSupported { serviceasciiname }; \
- return aSupported; \
- } \
-
#define IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(classname, serviceasciiname) \
css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
{ \
@@ -120,32 +113,6 @@ public:
return aSupported; \
} \
-#define IMPLEMENT_SERVICE_INFO_GETSUPPORTED2(classname, serviceasciiname1, serviceasciiname2) \
- css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
- { \
- css::uno::Sequence< OUString > aSupported(2); \
- aSupported[0] = serviceasciiname1; \
- aSupported[1] = serviceasciiname2; \
- return aSupported; \
- } \
-
-#define IMPLEMENT_SERVICE_INFO_GETSUPPORTED3(classname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \
- css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
- { \
- css::uno::Sequence< OUString > aSupported(3); \
- aSupported[0] = serviceasciiname1; \
- aSupported[1] = serviceasciiname2; \
- aSupported[2] = serviceasciiname3; \
- return aSupported; \
- } \
-
-#define IMPLEMENT_SERVICE_INFO_CREATE_STATIC(classname) \
- css::uno::Reference< css::uno::XInterface > \
- SAL_CALL classname::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) \
- { \
- return static_cast< XServiceInfo* >(new classname(_rxORB)); \
- } \
-
#define DECLARE_SERVICE_INFO_STATIC() \
DECLARE_SERVICE_INFO(); \
static OUString SAL_CALL getImplementationName_Static( ) throw (css::uno::RuntimeException); \
@@ -156,29 +123,42 @@ public:
#define IMPLEMENT_SERVICE_INFO1(classname, implasciiname, serviceasciiname) \
IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
- IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \
+ css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
+ { \
+ return css::uno::Sequence< OUString > { serviceasciiname }; \
+ } \
+
#define IMPLEMENT_SERVICE_INFO2(classname, implasciiname, serviceasciiname1, serviceasciiname2) \
IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
- IMPLEMENT_SERVICE_INFO_GETSUPPORTED2(classname, serviceasciiname1, serviceasciiname2)
+ css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
+ { \
+ return css::uno::Sequence< OUString > { serviceasciiname1, serviceasciiname2 }; \
+ }
+
#define IMPLEMENT_SERVICE_INFO2_STATIC(classname, implasciiname, serviceasciiname1, serviceasciiname2) \
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED2_STATIC(classname, serviceasciiname1,serviceasciiname2) \
- IMPLEMENT_SERVICE_INFO_CREATE_STATIC(classname) \
+ css::uno::Reference< css::uno::XInterface > \
+ SAL_CALL classname::Create(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxORB) \
+ { \
+ return static_cast< XServiceInfo* >(new classname(_rxORB)); \
+ }
+
#define IMPLEMENT_SERVICE_INFO3(classname, implasciiname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \
IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
- IMPLEMENT_SERVICE_INFO_GETSUPPORTED3(classname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \
+ css::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) \
+ { \
+ return css::uno::Sequence< OUString > { serviceasciiname1, serviceasciiname2, serviceasciiname3 }; \
+ } \
-// XTypeProvider helpers
-#define DECLARE_IMPLEMENTATION_ID( ) \
- virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(css::uno::RuntimeException, std::exception) override; \
- static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId() \
+// XTypeProvider helpers
#define IMPLEMENT_IMPLEMENTATION_ID( classname ) \
css::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \
diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src
index dcd75df4e356..0aba65fa1b93 100644
--- a/dbaccess/source/ui/browser/sbabrw.src
+++ b/dbaccess/source/ui/browser/sbabrw.src
@@ -55,49 +55,40 @@ String RID_STR_TABLES_CONTAINER
Text [ en-US ] = "Tables";
};
-#define MID_EDIT_DATABASE \
- Identifier = ID_TREE_EDIT_DATABASE ; \
- HelpId = HID_BROWSER_EDIT_DATABASE; \
- Text [ en-US ] = "Edit ~Database File..." ;\
-
-#define MID_ADMINISTRATE \
- Identifier = ID_TREE_ADMINISTRATE ; \
- HelpId = HID_BROWSER_ADMINISTRATE; \
- Text [ en-US ] = "Registered databases ..." ;\
-
-#define MID_CLOSECONN \
- Identifier = ID_TREE_CLOSE_CONN ; \
- HelpId = HID_BROWSER_CLOSECONN ; \
- Text [ en-US ] = "Disco~nnect" ; \
-
Menu MENU_BROWSER_DEFAULTCONTEXT
{
ItemList =
{
- MenuItem \
- { \
- MID_EDIT_DATABASE \
- }; \
- MenuItem \
- { \
- MID_CLOSECONN \
- }; \
- MenuItem \
- { \
- Separator = TRUE; \
- }; \
+ MenuItem
+ {
+ Identifier = ID_TREE_EDIT_DATABASE ;
+ HelpId = HID_BROWSER_EDIT_DATABASE ;
+ Text [ en-US ] = "Edit ~Database File..." ;
+ };
+ MenuItem
+ {
+ Identifier = ID_TREE_CLOSE_CONN ;
+ HelpId = HID_BROWSER_CLOSECONN ;
+ Text [ en-US ] = "Disco~nnect" ;
+ };
+ MenuItem
+ {
+ Separator = TRUE;
+ };
MenuItem {
Identifier = SID_COPY ;
Command = ".uno:Copy" ;
Text [ en-US ] = "~Copy" ;
};
- MenuItem \
- { \
- Separator = TRUE; \
- }; \
- MenuItem \
- { \
- MID_ADMINISTRATE \
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = ID_TREE_ADMINISTRATE ;
+ HelpId = HID_BROWSER_ADMINISTRATE;
+ Text [ en-US ] = "Registered databases ..." ;
};
};
};