[Libreoffice-commits] core.git: include/vcl

Tor Lillqvist tml at collabora.com
Tue May 27 21:52:11 PDT 2014


 include/vcl/metaact.hxx         |   57 ----------------------------
 include/vcl/metaactiontypes.hxx |   81 ++++++++++++++++++++++++++++++++++++++++
 include/vcl/outdev.hxx          |    4 -
 3 files changed, 83 insertions(+), 59 deletions(-)

New commits:
commit 202708afc6cf4efb56a92b73261af174f76f8e62
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue May 27 16:58:37 2014 +0300

    Avoid duplication of two #defines
    
    Split out the META_*_ACTION defines into a separate file.
    
    Change-Id: Ie211b4d8b3720f1158d36347f27e5dfd5ca467b4

diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 50820fb..29bf6cd 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -34,65 +34,10 @@
 #include <vcl/gdimtf.hxx>
 #include <vcl/gfxlink.hxx>
 #include <vcl/lineinfo.hxx>
+#include <vcl/metaactiontypes.hxx>
 
 class SvStream;
 
-#define META_NULL_ACTION                    (0)
-#define META_PIXEL_ACTION                   (100)
-#define META_POINT_ACTION                   (101)
-#define META_LINE_ACTION                    (102)
-#define META_RECT_ACTION                    (103)
-#define META_ROUNDRECT_ACTION               (104)
-#define META_ELLIPSE_ACTION                 (105)
-#define META_ARC_ACTION                     (106)
-#define META_PIE_ACTION                     (107)
-#define META_CHORD_ACTION                   (108)
-#define META_POLYLINE_ACTION                (109)
-#define META_POLYGON_ACTION                 (110)
-#define META_POLYPOLYGON_ACTION             (111)
-#define META_TEXT_ACTION                    (112)
-#define META_TEXTARRAY_ACTION               (113)
-#define META_STRETCHTEXT_ACTION             (114)
-#define META_TEXTRECT_ACTION                (115)
-#define META_BMP_ACTION                     (116)
-#define META_BMPSCALE_ACTION                (117)
-#define META_BMPSCALEPART_ACTION            (118)
-#define META_BMPEX_ACTION                   (119)
-#define META_BMPEXSCALE_ACTION              (120)
-#define META_BMPEXSCALEPART_ACTION          (121)
-#define META_MASK_ACTION                    (122)
-#define META_MASKSCALE_ACTION               (123)
-#define META_MASKSCALEPART_ACTION           (124)
-#define META_GRADIENT_ACTION                (125)
-#define META_HATCH_ACTION                   (126)
-#define META_WALLPAPER_ACTION               (127)
-#define META_CLIPREGION_ACTION              (128)
-#define META_ISECTRECTCLIPREGION_ACTION     (129)
-#define META_ISECTREGIONCLIPREGION_ACTION   (130)
-#define META_MOVECLIPREGION_ACTION          (131)
-#define META_LINECOLOR_ACTION               (132)
-#define META_FILLCOLOR_ACTION               (133)
-#define META_TEXTCOLOR_ACTION               (134)
-#define META_TEXTFILLCOLOR_ACTION           (135)
-#define META_TEXTALIGN_ACTION               (136)
-#define META_MAPMODE_ACTION                 (137)
-#define META_FONT_ACTION                    (138)
-#define META_PUSH_ACTION                    (139)
-#define META_POP_ACTION                     (140)
-#define META_RASTEROP_ACTION                (141)
-#define META_TRANSPARENT_ACTION             (142)
-#define META_EPS_ACTION                     (143)
-#define META_REFPOINT_ACTION                (144)
-#define META_TEXTLINECOLOR_ACTION           (145)
-#define META_TEXTLINE_ACTION                (146)
-#define META_FLOATTRANSPARENT_ACTION        (147)
-#define META_GRADIENTEX_ACTION              (148)
-#define META_LAYOUTMODE_ACTION              (149)
-#define META_TEXTLANGUAGE_ACTION            (150)
-#define META_OVERLINECOLOR_ACTION           (151)
-
-#define META_COMMENT_ACTION                 (512)
-
 struct ImplMetaReadData
 {
     rtl_TextEncoding meActualCharSet;
diff --git a/include/vcl/metaactiontypes.hxx b/include/vcl/metaactiontypes.hxx
new file mode 100644
index 0000000..63ce8c0
--- /dev/null
+++ b/include/vcl/metaactiontypes.hxx
@@ -0,0 +1,81 @@
+/* -*- 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 INCLUDED_VCL_METAACTIONTYPES_HXX
+#define INCLUDED_VCL_METAACTIONTYPES_HXX
+
+#define META_NULL_ACTION                    (0)
+#define META_PIXEL_ACTION                   (100)
+#define META_POINT_ACTION                   (101)
+#define META_LINE_ACTION                    (102)
+#define META_RECT_ACTION                    (103)
+#define META_ROUNDRECT_ACTION               (104)
+#define META_ELLIPSE_ACTION                 (105)
+#define META_ARC_ACTION                     (106)
+#define META_PIE_ACTION                     (107)
+#define META_CHORD_ACTION                   (108)
+#define META_POLYLINE_ACTION                (109)
+#define META_POLYGON_ACTION                 (110)
+#define META_POLYPOLYGON_ACTION             (111)
+#define META_TEXT_ACTION                    (112)
+#define META_TEXTARRAY_ACTION               (113)
+#define META_STRETCHTEXT_ACTION             (114)
+#define META_TEXTRECT_ACTION                (115)
+#define META_BMP_ACTION                     (116)
+#define META_BMPSCALE_ACTION                (117)
+#define META_BMPSCALEPART_ACTION            (118)
+#define META_BMPEX_ACTION                   (119)
+#define META_BMPEXSCALE_ACTION              (120)
+#define META_BMPEXSCALEPART_ACTION          (121)
+#define META_MASK_ACTION                    (122)
+#define META_MASKSCALE_ACTION               (123)
+#define META_MASKSCALEPART_ACTION           (124)
+#define META_GRADIENT_ACTION                (125)
+#define META_HATCH_ACTION                   (126)
+#define META_WALLPAPER_ACTION               (127)
+#define META_CLIPREGION_ACTION              (128)
+#define META_ISECTRECTCLIPREGION_ACTION     (129)
+#define META_ISECTREGIONCLIPREGION_ACTION   (130)
+#define META_MOVECLIPREGION_ACTION          (131)
+#define META_LINECOLOR_ACTION               (132)
+#define META_FILLCOLOR_ACTION               (133)
+#define META_TEXTCOLOR_ACTION               (134)
+#define META_TEXTFILLCOLOR_ACTION           (135)
+#define META_TEXTALIGN_ACTION               (136)
+#define META_MAPMODE_ACTION                 (137)
+#define META_FONT_ACTION                    (138)
+#define META_PUSH_ACTION                    (139)
+#define META_POP_ACTION                     (140)
+#define META_RASTEROP_ACTION                (141)
+#define META_TRANSPARENT_ACTION             (142)
+#define META_EPS_ACTION                     (143)
+#define META_REFPOINT_ACTION                (144)
+#define META_TEXTLINECOLOR_ACTION           (145)
+#define META_TEXTLINE_ACTION                (146)
+#define META_FLOATTRANSPARENT_ACTION        (147)
+#define META_GRADIENTEX_ACTION              (148)
+#define META_LAYOUTMODE_ACTION              (149)
+#define META_TEXTLANGUAGE_ACTION            (150)
+#define META_OVERLINECOLOR_ACTION           (151)
+
+#define META_COMMENT_ACTION                 (512)
+
+#endif // INCLUDED_VCL_METAACTIONTYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8e57855..de51dc4 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -32,6 +32,7 @@
 #include <vcl/mapmod.hxx>
 #include <vcl/wall.hxx>
 #include <vcl/metaact.hxx>
+#include <vcl/metaactiontypes.hxx>
 #include <vcl/salnativewidgets.hxx>
 #include <vcl/outdevstate.hxx>
 #include <vcl/outdevmap.hxx>
@@ -60,9 +61,6 @@
 #define GLYPH_FONT_HEIGHT   256
 #endif
 
-#define META_BMPSCALEPART_ACTION            (118)
-#define META_BMPEXSCALEPART_ACTION          (121)
-
 struct ImplOutDevData;
 class ImplFontEntry;
 class OutDevState;


More information about the Libreoffice-commits mailing list