summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-05 12:24:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 07:46:11 +0100
commit97ebc98f0e956712d242e13f15531742f844a738 (patch)
treef8f59969604c4cac28a3efba17c4c281752fa62f /vcl/unx/generic
parent4b363760b9f196e139ee367d54252c4d6cbe25f3 (diff)
convert some macros to local functions
Change-Id: If2c89f0f53615f6200b6cd1fb6267cc9b47df927 Reviewed-on: https://gerrit.libreoffice.org/62884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/app/i18n_xkb.cxx4
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx10
-rw-r--r--vcl/unx/generic/window/salframe.cxx40
3 files changed, 27 insertions, 27 deletions
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index cb5f29709671..ddb8414ba106 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -64,8 +64,8 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
// query notification for changes of the keyboard group
if ( mbUseExtension )
{
- #define XkbGroupMask ( XkbGroupStateMask | XkbGroupBaseMask \
- | XkbGroupLatchMask | XkbGroupLockMask )
+ constexpr auto XkbGroupMask = XkbGroupStateMask | XkbGroupBaseMask
+ | XkbGroupLatchMask | XkbGroupLockMask;
mbUseExtension = XkbSelectEventDetails( pDisplay,
XkbUseCoreKbd, XkbStateNotify, XkbGroupMask, XkbGroupMask );
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index b77e542f7807..1282881f442b 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -73,11 +73,11 @@
#include <cppuhelper/supportsservice.hxx>
#include <algorithm>
-#define DRAG_EVENT_MASK ButtonPressMask |\
- ButtonReleaseMask |\
- PointerMotionMask |\
- EnterWindowMask |\
- LeaveWindowMask
+static constexpr auto DRAG_EVENT_MASK = ButtonPressMask |
+ ButtonReleaseMask |
+ PointerMotionMask |
+ EnterWindowMask |
+ LeaveWindowMask;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::dnd;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index c1f29cf47bc7..ab0700e948e2 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -84,20 +84,20 @@
using namespace vcl_sal;
-#define CLIENT_EVENTS StructureNotifyMask \
- | SubstructureNotifyMask \
- | KeyPressMask \
- | KeyReleaseMask \
- | ButtonPressMask \
- | ButtonReleaseMask \
- | PointerMotionMask \
- | EnterWindowMask \
- | LeaveWindowMask \
- | FocusChangeMask \
- | ExposureMask \
- | VisibilityChangeMask \
- | PropertyChangeMask \
- | ColormapChangeMask
+static constexpr auto CLIENT_EVENTS = StructureNotifyMask
+ | SubstructureNotifyMask
+ | KeyPressMask
+ | KeyReleaseMask
+ | ButtonPressMask
+ | ButtonReleaseMask
+ | PointerMotionMask
+ | EnterWindowMask
+ | LeaveWindowMask
+ | FocusChangeMask
+ | ExposureMask
+ | VisibilityChangeMask
+ | PropertyChangeMask
+ | ColormapChangeMask;
static ::Window hPresentationWindow = None, hPresFocusWindow = None;
static ::std::list< ::Window > aPresentationReparentList;
@@ -1653,12 +1653,12 @@ void X11SalFrame::SetAlwaysOnTop( bool bOnTop )
}
}
-#define FRAMESTATE_MASK_GEOMETRY \
- (WindowStateMask::X | WindowStateMask::Y | \
- WindowStateMask::Width | WindowStateMask::Height)
-#define FRAMESTATE_MASK_MAXIMIZED_GEOMETRY \
- (WindowStateMask::MaximizedX | WindowStateMask::MaximizedY | \
- WindowStateMask::MaximizedWidth | WindowStateMask::MaximizedHeight)
+static constexpr auto FRAMESTATE_MASK_GEOMETRY =
+ WindowStateMask::X | WindowStateMask::Y |
+ WindowStateMask::Width | WindowStateMask::Height;
+static constexpr auto FRAMESTATE_MASK_MAXIMIZED_GEOMETRY =
+ WindowStateMask::MaximizedX | WindowStateMask::MaximizedY |
+ WindowStateMask::MaximizedWidth | WindowStateMask::MaximizedHeight;
void X11SalFrame::SetWindowState( const SalFrameState *pState )
{