[Libreoffice-commits] core.git: 3 commits - sd/source tools/inc vcl/inc vcl/unx

Tor Lillqvist tml at iki.fi
Wed Apr 10 09:35:08 PDT 2013


 sd/source/ui/dlg/PhotoAlbumDialog.cxx             |    6 +-
 tools/inc/tools/postx.h                           |    3 -
 tools/inc/tools/prex.h                            |   25 ++++----
 vcl/inc/svsys.h                                   |    3 -
 vcl/inc/unx/salbmp.h                              |    3 -
 vcl/inc/unx/saldata.hxx                           |    4 +
 vcl/inc/unx/salframe.h                            |    4 +
 vcl/inc/unx/salgdi.h                              |    5 +
 vcl/inc/unx/salstd.hxx                            |   65 ----------------------
 vcl/inc/unx/salunx.h                              |    5 +
 vcl/inc/unx/salvd.h                               |    4 +
 vcl/inc/unx/svsys.h                               |    3 -
 vcl/inc/unx/svunx.h                               |   28 ---------
 vcl/unx/generic/desktopdetect/desktopdetector.cxx |    4 -
 vcl/unx/generic/window/salobj.cxx                 |    8 +-
 15 files changed, 41 insertions(+), 129 deletions(-)

New commits:
commit eb04db616a5c59f72217d6818199e6d227c4abef
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 10 19:25:56 2013 +0300

    WaE: declaration shadows a local variable
    
    Change-Id: I364b63041e34757e7069eb8a28d9e60734e354ac

diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 955cbbd..cb117ca 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -594,18 +594,18 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
             // Write out configuration
             try
             {
-                Reference< XInterface > xCfg = ::comphelper::ConfigurationHelper::openConfig(
+                Reference< XInterface > xCfgWriter = ::comphelper::ConfigurationHelper::openConfig(
                     ::comphelper::getProcessComponentContext(),
                     OUString("/org.openoffice.Office.Impress/"),
                     ::comphelper::ConfigurationHelper::E_STANDARD);
 
                 ::comphelper::ConfigurationHelper::writeRelativeKey(
-                    xCfg,
+                    xCfgWriter,
                     OUString("Pictures"),
                     OUString("Path"),
                     uno::makeAny(sUrl));
 
-                ::comphelper::ConfigurationHelper::flush(xCfg);
+                ::comphelper::ConfigurationHelper::flush(xCfgWriter);
             }
             catch(const Exception&)
             {
commit 8034992e22d983bba46cfc06d4eec6f2aab71e28
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 10 18:59:16 2013 +0300

    Bin a local X11 wrapper header, vcl/inc/unx/salstd.hxx
    
    We already have <tools/prex.h> and <tools/postx.h>, so make those be
    sufficient instead. Bin another local vcl header vcl/inc/unx/svunx.h that just
    included those prex.h and postx.h. Adapt includers accordingly.
    
    Change-Id: I6638b3260fd3da45478fcc216b41f8c8a539f0d7

diff --git a/tools/inc/tools/postx.h b/tools/inc/tools/postx.h
index 493835b..7bce135 100644
--- a/tools/inc/tools/postx.h
+++ b/tools/inc/tools/postx.h
@@ -24,7 +24,7 @@
 }
 #endif
 
-/* X-Types */
+/* X Types */
 #undef Window
 #undef BYTE
 #undef INT8
@@ -45,7 +45,6 @@
 #undef Success
 
 #undef Printer
-/* #undef FontInfo */
 #undef Orientation
 
 #undef GetToken
diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
index d0a413c..e513880 100644
--- a/tools/inc/tools/prex.h
+++ b/tools/inc/tools/prex.h
@@ -20,16 +20,20 @@
 #ifndef _PREX_H
 #define _PREX_H
 
-#define Window      XLIB_Window
-#define Font        XLIB_Font
+/* Types from <X11/X.h> that clash with LO's identifiers
+ * and we don't need.
+ */
+#define Boolean     HIDE_XLIB_Boolean
+#define Font        HIDE_XLIB_Font
+#define Icon        HIDE_XLIB_Icon
+#define String      HIDE_XLIB_String
+
+/* Types from <X11/X.h> that clash, but we do use. */
 #define Cursor      XLIB_Cursor
-#define String      XLIB_String
 #define KeyCode     XLIB_KeyCode
 #define Region      XLIB_Region
-#define Icon        XLIB_Icon
 #define Time        XLIB_Time
-#define Region      XLIB_Region
-#define Boolean     XLIB_Boolean
+#define Window      XLIB_Window
 
 #if defined __cplusplus
 extern "C" {
@@ -41,19 +45,16 @@ extern "C" {
 #include <X11/StringDefs.h>
 #include <X11/extensions/Xrender.h>
 #include <X11/XKBlib.h>
+
+/* From <X11/Intrinsic.h> */
 typedef unsigned long Pixel;
 
-#undef  DestroyAll
-#define DestroyAll      XLIB_DestroyAll
-#define XLIB_DestroyAll 0
 #undef  String
-#define String          XLIB_String
+#define String      XLIB_String
 
 #undef  KeyCode
 #define KeyCode         XLIB_KeyCode //undef in intrinsics
 
-#define __Ol_OlXlibExt_h__
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index 70307a1..0056776 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -20,7 +20,8 @@
 #ifndef _SV_SALBMP_H
 #define _SV_SALBMP_H
 
-#include <unx/salstd.hxx>
+#include <tools/prex.h>
+#include <tools/postx.h>
 #ifndef _SV_SALGTYPE
 #include <vcl/salgtype.hxx>
 #endif
diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index c148b63..ef825f1 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -20,9 +20,11 @@
 #ifndef _SV_SALDATA_HXX
 #define _SV_SALDATA_HXX
 
+#include <tools/prex.h>
+#include <tools/postx.h>
+
 #include <unx/salunx.h>
 #include <vcl/salgtype.hxx>
-#include <unx/salstd.hxx>
 #include <salframe.hxx>
 #include <unx/salinst.h>
 #include <generic/gendata.hxx>
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 9c89af9..e0ac043 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -19,7 +19,9 @@
 #ifndef _SV_SALFRAME_H
 #define _SV_SALFRAME_H
 
-#include <unx/salstd.hxx>
+#include <tools/prex.h>
+#include <tools/postx.h>
+
 #include <unx/salunx.h>
 #include <unx/saltype.h>
 
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index c7c8091..4b2fc3b 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -20,12 +20,13 @@
 #ifndef _SV_SALGDI_H
 #define _SV_SALGDI_H
 
-#include "tools/fract.hxx"
+#include <tools/prex.h>
+#include <tools/postx.h>
+#include <tools/fract.hxx>
 
 #include "vcl/salgtype.hxx"
 #include "vcl/vclenum.hxx"
 
-#include "salstd.hxx"
 #include "salgdi.hxx"
 #include "sallayout.hxx"
 #include "vclpluginapi.h"
diff --git a/vcl/inc/unx/salstd.hxx b/vcl/inc/unx/salstd.hxx
deleted file mode 100644
index dd37938..0000000
--- a/vcl/inc/unx/salstd.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SALSTD_HXX
-#define _SALSTD_HXX
-
-#include <tools/solar.h>
-
-#ifndef _SVUNX_H
-typedef unsigned long       Pixel;
-typedef unsigned long       XID;
-typedef unsigned long       XLIB_Time;
-typedef unsigned long       XtIntervalId;
-
-typedef XID                 Colormap;
-typedef XID                 Drawable;
-typedef XID                 Pixmap;
-typedef XID                 XLIB_Cursor;
-typedef XID                 XLIB_Font;
-typedef XID                 XLIB_Window;
-
-typedef struct  _XDisplay   Display;
-typedef struct  _XGC       *GC;
-typedef struct  _XImage     XImage;
-typedef struct  _XRegion   *XLIB_Region;
-
-typedef union   _XEvent     XEvent;
-
-typedef struct  _XConfigureEvent    XConfigureEvent;
-typedef struct  _XReparentEvent     XReparentEvent;
-typedef struct  _XClientMessageEvent        XClientMessageEvent;
-typedef struct  _XErrorEvent        XErrorEvent;
-
-struct  Screen;
-struct  Visual;
-struct  XColormapEvent;
-struct  XFocusChangeEvent;
-struct  XFontStruct;
-struct  XKeyEvent;
-struct  XPropertyEvent;
-struct  XTextItem;
-struct  XWindowChanges;
-
-#define None    0L
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index 5061ad9..819f4f7 100644
--- a/vcl/inc/unx/salunx.h
+++ b/vcl/inc/unx/salunx.h
@@ -20,9 +20,10 @@
 #ifndef _SALUNX_H
 #define _SALUNX_H
 
+#include <tools/prex.h>
+#include <tools/postx.h>
+
 #include "unx/salunxtime.h"
-#include <unx/svunx.h>
-#include <unx/salstd.hxx>
 
 inline long Divide( long nDividend, long nDivisor )
 { return (nDividend + nDivisor/2) / nDivisor; }
diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h
index 50e2cd4..4f33374 100644
--- a/vcl/inc/unx/salvd.h
+++ b/vcl/inc/unx/salvd.h
@@ -20,7 +20,9 @@
 #ifndef _SV_SALVD_H
 #define _SV_SALVD_H
 
-#include <unx/salstd.hxx>
+#include <tools/prex.h>
+#include <tools/postx.h>
+
 #include <unx/saltype.h>
 #include <salvd.hxx>
 
diff --git a/vcl/inc/unx/svsys.h b/vcl/inc/unx/svsys.h
index a43d2ae..7bee829 100644
--- a/vcl/inc/unx/svsys.h
+++ b/vcl/inc/unx/svsys.h
@@ -19,7 +19,8 @@
 #ifndef _SV_SVSYS_H
 #define _SV_SVSYS_H
 
-#include <unx/svunx.h>
+#include <tools/prex.h>
+#include <tools/postx.h>
 
 #endif // _SV_SVSYS_H
 
diff --git a/vcl/inc/unx/svunx.h b/vcl/inc/unx/svunx.h
deleted file mode 100644
index 60bd981..0000000
--- a/vcl/inc/unx/svunx.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SVUNX_H
-#define _SVUNX_H
-
-#include <tools/prex.h>
-#include <tools/postx.h>
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index 465326b..c4a774f 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -18,12 +18,12 @@
  */
 
 
-#include <unx/svunx.h>
-#include <unx/desktops.hxx>
 #include <tools/prex.h>
 #include <X11/Xatom.h>
 #include <tools/postx.h>
 
+#include <unx/desktops.hxx>
+
 #include "rtl/process.h"
 #include "rtl/ustrbuf.hxx"
 #include "osl/module.h"
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index 16b4e22..9832929 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -21,17 +21,15 @@
 #if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
 #endif
-#include <tools/debug.hxx>
-
-#include <vcl/keycodes.hxx>
 
 #include <tools/prex.h>
-#include <X11/Xlib.h>
 #include <X11/extensions/shape.h>
 #include <tools/postx.h>
+#include <tools/debug.hxx>
+
+#include <vcl/keycodes.hxx>
 
 #include <unx/salunx.h>
-#include <unx/salstd.hxx>
 #include <unx/saldata.hxx>
 #include <unx/salinst.h>
 #include <unx/saldisp.hxx>
commit 9e2cf37c9062577f84406e08f31bd542ba41023f
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Apr 10 18:18:03 2013 +0300

    Kill leftover OS/2 bit
    
    Change-Id: I16a0a006691f2547edf773f826f23df67498e88f

diff --git a/vcl/inc/svsys.h b/vcl/inc/svsys.h
index 0614ccc..6bd76f6 100644
--- a/vcl/inc/svsys.h
+++ b/vcl/inc/svsys.h
@@ -24,8 +24,6 @@
 #include "win/svsys.h"
 #elif defined MACOSX
 #include "aqua/svsys.h"
-#elif defined OS2
-#include "os2/svsys.h"
 #elif defined IOS
 #include "ios/svsys.h"
 #elif defined ANDROID
@@ -35,7 +33,6 @@
 #include "unx/svsys.h"
 #endif
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list