summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 16:11:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-06 06:47:21 +0100
commit83db9afa20b8cf54b522ca9c3f04e7e267684c59 (patch)
treecad0d77f0a76ce8f25e39d72be809f318677bbe2 /vcl/unx
parenta2e3705d8b3b05ae664d54b762d6ff72927d5e48 (diff)
remove some unnecessary typedef struct... sugar
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/i18n_keysym.cxx43
-rw-r--r--vcl/unx/generic/app/saldisp.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atkhypertext.cxx4
-rw-r--r--vcl/unx/gtk/hudawareness.cxx4
5 files changed, 29 insertions, 30 deletions
diff --git a/vcl/unx/generic/app/i18n_keysym.cxx b/vcl/unx/generic/app/i18n_keysym.cxx
index 9fdbe9eae3b3..53b1ae7e642e 100644
--- a/vcl/unx/generic/app/i18n_keysym.cxx
+++ b/vcl/unx/generic/app/i18n_keysym.cxx
@@ -26,14 +26,13 @@
// for all keysyms with byte1 and byte2 equal zero, and of course only for
// keysyms that have a unicode counterpart
-typedef const sal_Unicode unicode_t;
-typedef struct {
+struct keymap_t {
const int first; const int last;
- const unicode_t *map;
-} keymap_t;
+ const sal_Unicode *map;
+};
// Latin-1 Byte 3 = 0x00
-const unicode_t keymap00_map[] = {
+const sal_Unicode keymap00_map[] = {
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
@@ -65,7 +64,7 @@ const unicode_t keymap00_map[] = {
const keymap_t keymap00 = { 32, 255, keymap00_map };
// Latin-2 Byte 3 = 0x01
-const unicode_t keymap01_map[] = {
+const sal_Unicode keymap01_map[] = {
0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, 0x0000,
0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, 0x0000,
0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, 0x0000,
@@ -81,7 +80,7 @@ const unicode_t keymap01_map[] = {
const keymap_t keymap01 = { 161, 255, keymap01_map };
// Latin-3 Byte 3 = 0x02
-const unicode_t keymap02_map[] = {
+const sal_Unicode keymap02_map[] = {
0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, 0x0000,
0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, 0x0000,
0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, 0x0000,
@@ -97,7 +96,7 @@ const unicode_t keymap02_map[] = {
const keymap_t keymap02 = { 161, 254, keymap02_map };
// Latin-4 Byte 3 = 0x03
-const unicode_t keymap03_map[] = {
+const sal_Unicode keymap03_map[] = {
0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, 0x0000, 0x0000,
0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, 0x0000, 0x0000,
@@ -113,7 +112,7 @@ const unicode_t keymap03_map[] = {
const keymap_t keymap03 = { 162, 254, keymap03_map };
// Kana Byte 3 = 0x04
-const unicode_t keymap04_map[] = {
+const sal_Unicode keymap04_map[] = {
0x203e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -130,7 +129,7 @@ const unicode_t keymap04_map[] = {
const keymap_t keymap04 = { 126, 223, keymap04_map };
// Arabic Byte 3 = 0x05
-const unicode_t keymap05_map[] = {
+const sal_Unicode keymap05_map[] = {
0x060c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x061b,
0x0000, 0x0000, 0x0000, 0x061f, 0x0000, 0x0621, 0x0622, 0x0623,
@@ -143,7 +142,7 @@ const unicode_t keymap05_map[] = {
const keymap_t keymap05 = { 172, 242, keymap05_map };
// Cyrillic Byte 3 = 0x06
-const unicode_t keymap06_map[] = {
+const sal_Unicode keymap06_map[] = {
0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458,
0x0459, 0x045a, 0x045b, 0x045c, 0x0000, 0x045e, 0x045f, 0x2116,
0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408,
@@ -159,7 +158,7 @@ const unicode_t keymap06_map[] = {
const keymap_t keymap06 = { 161, 255, keymap06_map };
// Greek Byte 3 = 0x07
-const unicode_t keymap07_map[] = {
+const sal_Unicode keymap07_map[] = {
0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, 0x038e,
0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, 0x0000,
0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, 0x03cd,
@@ -175,7 +174,7 @@ const unicode_t keymap07_map[] = {
const keymap_t keymap07 = { 161, 249, keymap07_map };
// Technical Byte 3 = 0x08
-const unicode_t keymap08_map[] = {
+const sal_Unicode keymap08_map[] = {
0x23b7, 0x250c, 0x2500, 0x2320, 0x2321, 0x2502, 0x23a1, 0x23a3,
0x23a4, 0x23a6, 0x239b, 0x239d, 0x239e, 0x23a0, 0x23a8, 0x23ac,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -191,7 +190,7 @@ const unicode_t keymap08_map[] = {
const keymap_t keymap08 = { 161, 254, keymap08_map };
// Special Byte 3 = 0x09
-const unicode_t keymap09_map[] = {
+const sal_Unicode keymap09_map[] = {
0x25c6, 0x2592, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000,
0x2424, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba,
0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c,
@@ -199,7 +198,7 @@ const unicode_t keymap09_map[] = {
const keymap_t keymap09 = { 224, 248, keymap09_map };
// Publishing Byte 3 = 0x0a = 10
-const unicode_t keymap10_map[] = {
+const sal_Unicode keymap10_map[] = {
0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, 0x200a,
0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, 0x2153,
0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, 0x2105,
@@ -215,7 +214,7 @@ const unicode_t keymap10_map[] = {
const keymap_t keymap10 = { 161, 254, keymap10_map };
// APL Byte 3 = 0x0b = 11
-const unicode_t keymap11_map[] = {
+const sal_Unicode keymap11_map[] = {
0x003c, 0x0000, 0x0000, 0x003e, 0x0000, 0x2228, 0x2227, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -231,7 +230,7 @@ const unicode_t keymap11_map[] = {
const keymap_t keymap11 = { 163, 252, keymap11_map };
// Hebrew Byte 3 = 0x0c = 12
-const unicode_t keymap12_map[] = {
+const sal_Unicode keymap12_map[] = {
0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6,
0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de,
0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6,
@@ -239,7 +238,7 @@ const unicode_t keymap12_map[] = {
const keymap_t keymap12 = { 223, 250, keymap12_map };
// Thai Byte 3 = 0x0d = 13
-const unicode_t keymap13_map[] = {
+const sal_Unicode keymap13_map[] = {
0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08,
0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10,
0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18,
@@ -255,7 +254,7 @@ const unicode_t keymap13_map[] = {
const keymap_t keymap13 = { 161, 249, keymap13_map };
// Korean Byte 3 = 0x0e = 14
-const unicode_t keymap14_map[] = {
+const sal_Unicode keymap14_map[] = {
0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138,
0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140,
0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148,
@@ -274,7 +273,7 @@ const keymap_t keymap14 = { 161, 255, keymap14_map };
// Latin-8 Byte 3 = 0x12 = 18
// Latin-9 Byte 3 = 0x13 = 19
-const unicode_t keymap19_map[] = {
+const sal_Unicode keymap19_map[] = {
0x0152, 0x0153, 0x0178 };
const keymap_t keymap19 = { 188, 190, keymap19_map };
@@ -285,13 +284,13 @@ const keymap_t keymap19 = { 188, 190, keymap19_map };
// Vietnamese Byte 3 = 0x1e = 30
// Currency Byte 3 = 0x20 = 32
-const unicode_t keymap32_map[] = {
+const sal_Unicode keymap32_map[] = {
0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7,
0x20a8, 0x0000, 0x20aa, 0x20ab, 0x20ac };
const keymap_t keymap32 = { 160, 172, keymap32_map };
// Keyboard (Keypad mappings) Byte 3 = 0xff = 255
-const unicode_t keymap255_map[] = {
+const sal_Unicode keymap255_map[] = {
0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 5af29803bbeb..d0b04b13f1e6 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -158,11 +158,11 @@ static bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
extern "C" srv_vendor_t
sal_GetServerVendor( Display *p_display )
{
- typedef struct {
+ struct vendor_t {
srv_vendor_t e_vendor; // vendor as enum
const char* p_name; // vendor name as returned by VendorString()
unsigned int n_len; // number of chars to compare
- } vendor_t;
+ };
static const vendor_t vendorlist[] = {
{ vendor_sun, "Sun Microsystems, Inc.", 10 },
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 8690378c1120..b681fba944d2 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -837,11 +837,11 @@ int PrintFontManager::getFontFaceNumber( fontID nFontID ) const
FontFamily PrintFontManager::matchFamilyName( const OUString& rFamily )
{
- typedef struct {
+ struct family_t {
const char* mpName;
sal_uInt16 const mnLength;
FontFamily const meType;
- } family_t;
+ };
#define InitializeClass( p, a ) p, sizeof(p) - 1, a
static const family_t pFamilyMatch[] = {
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx
index 8359883109f1..ab94126dfc51 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -25,11 +25,11 @@ using namespace ::com::sun::star;
// ---------------------- AtkHyperlink ----------------------
-typedef struct {
+struct HyperLink {
AtkHyperlink const atk_hyper_link;
uno::Reference< accessibility::XAccessibleHyperlink > xLink;
-} HyperLink;
+};
static uno::Reference< accessibility::XAccessibleHyperlink > const &
getHyperlink( AtkHyperlink *pHyperlink )
diff --git a/vcl/unx/gtk/hudawareness.cxx b/vcl/unx/gtk/hudawareness.cxx
index 0cfcd8635736..b7985fdb58ab 100644
--- a/vcl/unx/gtk/hudawareness.cxx
+++ b/vcl/unx/gtk/hudawareness.cxx
@@ -15,13 +15,13 @@
#include <unx/gtk/hudawareness.h>
-typedef struct
+struct HudAwarenessHandle
{
GDBusConnection *connection;
HudAwarenessCallback callback;
gpointer user_data;
GDestroyNotify notify;
-} HudAwarenessHandle;
+};
static void
hud_awareness_method_call (GDBusConnection * /* connection */,