diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-02-27 13:09:39 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-27 13:50:24 +0200 |
commit | 9fde14ce08463b5dcf1c96d8f636903992b63183 (patch) | |
tree | fb2b4f804a55021c5c96d3a749f1a5e990bf341d | |
parent | 3ec1d8af4259c29d780977ea6c3667df130a2ba1 (diff) |
Factor out duplicate enums and types from rsc and vcl into one header
The new header is <rsc/rsc-vcl-shared-types.hxx>, but if some other name or
location is cleaner, feel free to change.
Change-Id: I601923447ff7c1b6cefd71cb2652fcc88d2483d2
-rw-r--r-- | chart2/source/view/main/ShapeFactory.cxx | 93 | ||||
-rw-r--r-- | rsc/Package_inc.mk | 1 | ||||
-rw-r--r-- | rsc/inc/rsc/rsc-vcl-shared-types.hxx | 133 | ||||
-rw-r--r-- | rsc/inc/vclrsc.hxx | 132 | ||||
-rw-r--r-- | vcl/inc/vcl/keycodes.hxx | 17 | ||||
-rw-r--r-- | vcl/inc/vcl/menu.hxx | 18 | ||||
-rw-r--r-- | vcl/inc/vcl/symbol.hxx | 47 | ||||
-rw-r--r-- | vcl/inc/vcl/toolbox.hxx | 32 | ||||
-rw-r--r-- | vcl/inc/vcl/vclenum.hxx | 67 | ||||
-rw-r--r-- | vcl/inc/vcl/window.hxx | 9 |
10 files changed, 189 insertions, 360 deletions
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 3a5c309b71dc..e83445fe8e58 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -1242,27 +1242,30 @@ uno::Reference< drawing::XShape > return xShape; } -enum SymbolType { SYMBOL_SQUARE=0 - , SYMBOL_DIAMOND - , SYMBOL_ARROW_DOWN - , SYMBOL_ARROW_UP - , SYMBOL_ARROW_RIGHT - , SYMBOL_ARROW_LEFT - , SYMBOL_BOWTIE - , SYMBOL_SANDGLASS - , SYMBOL_CIRCLE - , SYMBOL_STAR - , SYMBOL_X - , SYMBOL_PLUS - , SYMBOL_ASTERISK - , SYMBOL_HORIZONTAL_BAR - , SYMBOL_VERTICAL_BAR - , SYMBOL_COUNT +// Be careful here not to clash with the SYMBOL_FOO #defines in +// <rsc/rsc-vcl-shared-types.hxx> + +enum SymbolEnum { Symbol_Square=0 + , Symbol_Diamond + , Symbol_DownArrow + , Symbol_UpArrow + , Symbol_RightArrow + , Symbol_LeftArrow + , Symbol_Bowtie + , Symbol_Sandglass + , Symbol_Circle + , Symbol_Star + , Symbol_X + , Symbol_Plus + , Symbol_Asterisk + , Symbol_HorizontalBar + , Symbol_VerticalBar + , Symbol_COUNT }; sal_Int32 ShapeFactory::getSymbolCount() { - return SYMBOL_COUNT; + return Symbol_COUNT; } drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& rPos @@ -1272,7 +1275,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& if(nStandardSymbol<0) nStandardSymbol*=-1; nStandardSymbol = nStandardSymbol%ShapeFactory::getSymbolCount(); - SymbolType eSymbolType=static_cast<SymbolType>(nStandardSymbol); + SymbolEnum eSymbolType=static_cast<SymbolEnum>(nStandardSymbol); const double& fX = rPos.PositionX; const double& fY = rPos.PositionY; @@ -1285,27 +1288,27 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& sal_Int32 nPointCount = 4; //all arrow symbols only need 4 points switch( eSymbolType ) { - case SYMBOL_SQUARE: - case SYMBOL_DIAMOND: - case SYMBOL_BOWTIE: - case SYMBOL_SANDGLASS: - case SYMBOL_HORIZONTAL_BAR: - case SYMBOL_VERTICAL_BAR: + case Symbol_Square: + case Symbol_Diamond: + case Symbol_Bowtie: + case Symbol_Sandglass: + case Symbol_HorizontalBar: + case Symbol_VerticalBar: nPointCount = 5; break; - case SYMBOL_X: + case Symbol_X: nPointCount = 13; break; - case SYMBOL_PLUS: + case Symbol_Plus: nPointCount = 13; break; - case SYMBOL_STAR: + case Symbol_Star: nPointCount = 9; break; - case SYMBOL_ASTERISK: + case Symbol_Asterisk: nPointCount = 19; break; - case SYMBOL_CIRCLE: + case Symbol_Circle: nPointCount = 5 + 4 * nQuarterCount; break; default: @@ -1336,7 +1339,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& switch(eSymbolType) { - case SYMBOL_SQUARE: + case Symbol_Square: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-fHeightH; @@ -1354,7 +1357,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - case SYMBOL_ARROW_UP: + case Symbol_UpArrow: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY+fHeightH; @@ -1369,7 +1372,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY+fHeightH; break; } - case SYMBOL_ARROW_DOWN: + case Symbol_DownArrow: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-fHeightH; @@ -1384,7 +1387,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - case SYMBOL_ARROW_RIGHT: + case Symbol_RightArrow: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-fHeightH; @@ -1399,7 +1402,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - case SYMBOL_ARROW_LEFT: + case Symbol_LeftArrow: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY; @@ -1414,7 +1417,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY; break; } - case SYMBOL_BOWTIE: + case Symbol_Bowtie: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-fHeightH; @@ -1432,7 +1435,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - case SYMBOL_SANDGLASS: + case Symbol_Sandglass: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY+fHeightH; @@ -1451,7 +1454,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY+fHeightH; break; } - case SYMBOL_DIAMOND: + case Symbol_Diamond: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY; @@ -1469,7 +1472,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY; break; } - case SYMBOL_HORIZONTAL_BAR: + case Symbol_HorizontalBar: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-0.2*fHeightH; @@ -1488,7 +1491,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-0.2*fHeightH; break; } - case SYMBOL_VERTICAL_BAR: + case Symbol_VerticalBar: { *pInnerSequenceX++ = fX-0.2*fWidthH; *pInnerSequenceY++ = fY-fHeightH; @@ -1508,7 +1511,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& break; } - case SYMBOL_CIRCLE: + case Symbol_Circle: { double fOmega = 1.5707963267948966192 / (nQuarterCount + 1.0); // one point in the middle of each edge to get full size bounding rectangle @@ -1549,7 +1552,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY; break; } - case SYMBOL_STAR: + case Symbol_Star: { *pInnerSequenceX++ = fX; *pInnerSequenceY++ = fY-fHeightH; @@ -1579,7 +1582,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - case SYMBOL_X: + case Symbol_X: { const double fScaleX = fWidthH / 128.0; const double fScaleY = fHeightH / 128.0; @@ -1627,7 +1630,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& break; } - case SYMBOL_PLUS: + case Symbol_Plus: { const double fScaleX = fWidthH / 128.0; const double fScaleY = fHeightH / 128.0; @@ -1676,7 +1679,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& break; } - case SYMBOL_ASTERISK: + case Symbol_Asterisk: { const double fHalf = 10.0; // half line width on 256 size square const double fTwoY = fHalf * sqrt(3.0); @@ -1747,7 +1750,7 @@ drawing::PolyPolygonShape3D createPolyPolygon_Symbol( const drawing::Position3D& *pInnerSequenceY++ = fY-fHeightH; break; } - default: //case SYMBOL_SQUARE: + default: //case Symbol_Square: { *pInnerSequenceX++ = fX-fWidthH; *pInnerSequenceY++ = fY-fHeightH; diff --git a/rsc/Package_inc.mk b/rsc/Package_inc.mk index eee82b0a0a89..230b54474e98 100644 --- a/rsc/Package_inc.mk +++ b/rsc/Package_inc.mk @@ -29,5 +29,6 @@ $(eval $(call gb_Package_Package,rsc_inc,$(SRCDIR)/rsc/inc)) $(eval $(call gb_Package_add_file,rsc_inc,inc/rsc/rscsfx.hxx,rsc/rscsfx.hxx)) +$(eval $(call gb_Package_add_file,rsc_inc,inc/rsc/rsc-vcl-shared-types.hxx,rsc/rsc-vcl-shared-types.hxx)) # vim: set noet sw=4 ts=4: diff --git a/rsc/inc/rsc/rsc-vcl-shared-types.hxx b/rsc/inc/rsc/rsc-vcl-shared-types.hxx new file mode 100644 index 000000000000..4e8ca10090c7 --- /dev/null +++ b/rsc/inc/rsc/rsc-vcl-shared-types.hxx @@ -0,0 +1,133 @@ +/* -*- 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 _RSC_RSC_VCL_SHARED_TYPES_HXX +#define _RSC_RSC_VCL_SHARED_TYPES_HXX + +enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; + +enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE, + KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT, + KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO, + KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND, + KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT, + KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; + +enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE, + MENUITEM_STRINGIMAGE, MENUITEM_SEPARATOR }; + +typedef sal_uInt16 MenuItemBits; + +#define MIB_CHECKABLE ((MenuItemBits)0x0001) +#define MIB_RADIOCHECK ((MenuItemBits)0x0002) +#define MIB_AUTOCHECK ((MenuItemBits)0x0004) +#define MIB_ABOUT ((MenuItemBits)0x0008) +#define MIB_HELP ((MenuItemBits)0x0010) +#define MIB_POPUPSELECT ((MenuItemBits)0x0020) + +// These have been said to be a prelimitary (sic) solution since 2007 +#define MIB_NOSELECT ((MenuItemBits)0x0040) +#define MIB_ICON ((MenuItemBits)0x0080) +#define MIB_TEXT ((MenuItemBits)0x0100) + +typedef sal_uInt16 ToolBoxItemBits; + +#define TIB_CHECKABLE ((ToolBoxItemBits)0x0001) +#define TIB_RADIOCHECK ((ToolBoxItemBits)0x0002) +#define TIB_AUTOCHECK ((ToolBoxItemBits)0x0004) +#define TIB_LEFT ((ToolBoxItemBits)0x0008) +#define TIB_AUTOSIZE ((ToolBoxItemBits)0x0010) +#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020) +#define TIB_REPEAT ((ToolBoxItemBits)0x0040) +#define TIB_DROPDOWNONLY ((ToolBoxItemBits)0x0080 | TIB_DROPDOWN) +#define TIB_TEXT_ONLY ((ToolBoxItemBits)0x0100) +#define TIB_ICON_ONLY ((ToolBoxItemBits)0x0200) +#define TIB_TEXTICON ((ToolBoxItemBits) TIB_TEXT_ONLY | TIB_ICON_ONLY ) + +enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON, + TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR, + TOOLBOXITEM_BREAK }; + +enum ButtonType { BUTTON_SYMBOL, BUTTON_TEXT, BUTTON_SYMBOLTEXT }; + +typedef sal_uInt16 SymbolType; + +#define SYMBOL_DONTKNOW ((SymbolType)0) +#define SYMBOL_IMAGE ((SymbolType)1) +#define SYMBOL_ARROW_UP ((SymbolType)2) +#define SYMBOL_ARROW_DOWN ((SymbolType)3) +#define SYMBOL_ARROW_LEFT ((SymbolType)4) +#define SYMBOL_ARROW_RIGHT ((SymbolType)5) +#define SYMBOL_SPIN_UP ((SymbolType)6) +#define SYMBOL_SPIN_DOWN ((SymbolType)7) +#define SYMBOL_SPIN_LEFT ((SymbolType)8) +#define SYMBOL_SPIN_RIGHT ((SymbolType)9) +#define SYMBOL_FIRST ((SymbolType)10) +#define SYMBOL_LAST ((SymbolType)11) +#define SYMBOL_PREV ((SymbolType)12) +#define SYMBOL_NEXT ((SymbolType)13) +#define SYMBOL_PAGEUP ((SymbolType)14) +#define SYMBOL_PAGEDOWN ((SymbolType)15) +#define SYMBOL_PLAY ((SymbolType)16) +#define SYMBOL_REVERSEPLAY ((SymbolType)17) +#define SYMBOL_RECORD ((SymbolType)18) +#define SYMBOL_STOP ((SymbolType)19) +#define SYMBOL_PAUSE ((SymbolType)20) +#define SYMBOL_WINDSTART ((SymbolType)21) +#define SYMBOL_WINDEND ((SymbolType)22) +#define SYMBOL_WINDBACKWARD ((SymbolType)23) +#define SYMBOL_WINDFORWARD ((SymbolType)24) +#define SYMBOL_CLOSE ((SymbolType)25) +#define SYMBOL_ROLLUP ((SymbolType)26) +#define SYMBOL_ROLLDOWN ((SymbolType)27) +#define SYMBOL_CHECKMARK ((SymbolType)28) +#define SYMBOL_RADIOCHECKMARK ((SymbolType)29) +#define SYMBOL_SPIN_UPDOWN ((SymbolType)30) +#define SYMBOL_FLOAT ((SymbolType)31) +#define SYMBOL_DOCK ((SymbolType)32) +#define SYMBOL_HIDE ((SymbolType)33) +#define SYMBOL_HELP ((SymbolType)34) +#define SYMBOL_PLUS ((SymbolType)35) +#define SYMBOL_MENU SYMBOL_SPIN_DOWN + +#define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW) + +// Border-Styles fuer SetBorder() +typedef sal_uInt16 WindowBorderStyle; + +#define WINDOW_BORDER_NORMAL ((WindowBorderStyle)0x0001) +#define WINDOW_BORDER_MONO ((WindowBorderStyle)0x0002) +#define WINDOW_BORDER_MENU ((WindowBorderStyle)0x0010) +#define WINDOW_BORDER_NWF ((WindowBorderStyle)0x0020) +#define WINDOW_BORDER_NOBORDER ((WindowBorderStyle)0x1000) +#define WINDOW_BORDER_REMOVEBORDER ((WindowBorderStyle)0x2000) + +#define KEY_CODE ((sal_uInt16)0x0FFF) + +// Modifier-Tasten +#define KEY_SHIFT ((sal_uInt16)0x1000) +#define KEY_MOD1 ((sal_uInt16)0x2000) +#define KEY_MOD2 ((sal_uInt16)0x4000) +#define KEY_MOD3 ((sal_uInt16)0x8000) +#define KEY_MODTYPE ((sal_uInt16)0xF000) +#define KEY_ALLMODTYPE ((sal_uInt16)0xF000) + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/inc/vclrsc.hxx b/rsc/inc/vclrsc.hxx index d1be1f15427f..c2109bfc4803 100644 --- a/rsc/inc/vclrsc.hxx +++ b/rsc/inc/vclrsc.hxx @@ -26,141 +26,11 @@ #include <tools/fldunit.hxx> #include <tools/mapunit.hxx> #include <tools/wintypes.hxx> +#include <rsc/rsc-vcl-shared-types.hxx> -// from vcl/inc/vclenum.hxx -#ifndef ENUM_TIMEFIELDFORMAT_DECLARED -#define ENUM_TIMEFIELDFORMAT_DECLARED - -enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; - -#endif - -// ----------------- -// - KeyCode-Types - -// ----------------- #include <com/sun/star/awt/Key.hpp> #include <com/sun/star/awt/KeyGroup.hpp> -#define KEY_CODE ((sal_uInt16)0x0FFF) - -// Modifier-Tasten -#define KEY_SHIFT ((sal_uInt16)0x1000) -#define KEY_MOD1 ((sal_uInt16)0x2000) -#define KEY_MOD2 ((sal_uInt16)0x4000) -#define KEY_MOD3 ((sal_uInt16)0x8000) -#define KEY_MODTYPE ((sal_uInt16)0xF000) -#define KEY_ALLMODTYPE ((sal_uInt16)0xF000) - - -// from vcl/inc/vclenum.hxx -#ifndef ENUM_KEYFUNCTYPE_DECLARED -#define ENUM_KEYFUNCTYPE_DECLARED - -enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE, - KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT, - KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO, - KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND, - KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT, - KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; - -#endif - - -// -------------------------- -// - Bits fuer ToolBoxItems - -// -------------------------- - -// from vcl/inc/toolbox.hxx -typedef sal_uInt16 ToolBoxItemBits; - -#define TIB_CHECKABLE ((ToolBoxItemBits)0x0001) -#define TIB_RADIOCHECK ((ToolBoxItemBits)0x0002) -#define TIB_AUTOCHECK ((ToolBoxItemBits)0x0004) -#define TIB_LEFT ((ToolBoxItemBits)0x0008) -#define TIB_AUTOSIZE ((ToolBoxItemBits)0x0010) -#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020) -#define TIB_REPEAT ((ToolBoxItemBits)0x0040) - -enum ButtonType { BUTTON_SYMBOL, BUTTON_TEXT, BUTTON_SYMBOLTEXT }; - -enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON, - TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR, - TOOLBOXITEM_BREAK }; - - -// --------------- -// - BorderStyle - -// --------------- - -typedef sal_uInt16 WindowBorderStyle; - -#define WINDOW_BORDER_NORMAL ((WindowBorderStyle)0x0001) -#define WINDOW_BORDER_MONO ((WindowBorderStyle)0x0002) -#define WINDOW_BORDER_MENU ((WindowBorderStyle)0x0010) -#define WINDOW_BORDER_NOBORDER ((WindowBorderStyle)0x1000) - -// -------------- -// - Menu-Types - -// -------------- - -// from vcl/inc/menu.hxx -enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE, - MENUITEM_STRINGIMAGE, MENUITEM_SEPARATOR }; - -typedef sal_uInt16 MenuItemBits; - -#define MIB_CHECKABLE ((MenuItemBits)0x0001) -#define MIB_RADIOCHECK ((MenuItemBits)0x0002) -#define MIB_AUTOCHECK ((MenuItemBits)0x0004) -#define MIB_ABOUT ((MenuItemBits)0x0008) -#define MIB_HELP ((MenuItemBits)0x0010) -#define MIB_POPUPSELECT ((MenuItemBits)0x0020) - -// ---------------- -// - Symbol-Types - -// ---------------- - -// from vcl/inc/symbol.hxx -typedef sal_uInt16 SymbolType; -#define SYMBOL_DONTKNOW ((SymbolType)0) -#define SYMBOL_IMAGE ((SymbolType)1) -#define SYMBOL_ARROW_UP ((SymbolType)2) -#define SYMBOL_ARROW_DOWN ((SymbolType)3) -#define SYMBOL_ARROW_LEFT ((SymbolType)4) -#define SYMBOL_ARROW_RIGHT ((SymbolType)5) -#define SYMBOL_SPIN_UP ((SymbolType)6) -#define SYMBOL_SPIN_DOWN ((SymbolType)7) -#define SYMBOL_SPIN_LEFT ((SymbolType)8) -#define SYMBOL_SPIN_RIGHT ((SymbolType)9) -#define SYMBOL_FIRST ((SymbolType)10) -#define SYMBOL_LAST ((SymbolType)11) -#define SYMBOL_PREV ((SymbolType)12) -#define SYMBOL_NEXT ((SymbolType)13) -#define SYMBOL_PAGEUP ((SymbolType)14) -#define SYMBOL_PAGEDOWN ((SymbolType)15) -#define SYMBOL_PLAY ((SymbolType)16) -#define SYMBOL_REVERSEPLAY ((SymbolType)17) -#define SYMBOL_RECORD ((SymbolType)18) -#define SYMBOL_STOP ((SymbolType)19) -#define SYMBOL_PAUSE ((SymbolType)20) -#define SYMBOL_WINDSTART ((SymbolType)21) -#define SYMBOL_WINDEND ((SymbolType)22) -#define SYMBOL_WINDBACKWARD ((SymbolType)23) -#define SYMBOL_WINDFORWARD ((SymbolType)24) -#define SYMBOL_CLOSE ((SymbolType)25) -#define SYMBOL_ROLLUP ((SymbolType)26) -#define SYMBOL_ROLLDOWN ((SymbolType)27) -#define SYMBOL_CHECKMARK ((SymbolType)28) -#define SYMBOL_RADIOCHECKMARK ((SymbolType)29) -#define SYMBOL_SPIN_UPDOWN ((SymbolType)30) -#define SYMBOL_FLOAT ((SymbolType)31) -#define SYMBOL_DOCK ((SymbolType)32) -#define SYMBOL_HIDE ((SymbolType)33) -#define SYMBOL_HELP ((SymbolType)34) -#define SYMBOL_PLUS ((SymbolType)35) - -#define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW) - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/keycodes.hxx b/vcl/inc/vcl/keycodes.hxx index 9dd3a6ce4e54..cfa23649e194 100644 --- a/vcl/inc/vcl/keycodes.hxx +++ b/vcl/inc/vcl/keycodes.hxx @@ -21,16 +21,11 @@ #define _SV_KEYCODES_HXX #include <tools/solar.h> +#include <rsc/rsc-vcl-shared-types.hxx> #undef DELETE #include <com/sun/star/awt/Key.hpp> #include <com/sun/star/awt/KeyGroup.hpp> -// ----------------- -// - KeyCode-Types - -// ----------------- - -// By changes you must also change: rsc/vclrsc.hxx - // Key-Gruppen #define KEYGROUP_NUM ((sal_uInt16)::com::sun::star::awt::KeyGroup::NUM) #define KEYGROUP_ALPHA ((sal_uInt16)::com::sun::star::awt::KeyGroup::ALPHA) @@ -156,16 +151,6 @@ #define KEY_NUMLOCK ((sal_uInt16)::com::sun::star::awt::Key::NUMLOCK) #define KEY_SCROLLLOCK ((sal_uInt16)::com::sun::star::awt::Key::SCROLLLOCK) -#define KEY_CODE ((sal_uInt16)0x0FFF) - -// Modifier-Tasten -#define KEY_SHIFT ((sal_uInt16)0x1000) -#define KEY_MOD1 ((sal_uInt16)0x2000) -#define KEY_MOD2 ((sal_uInt16)0x4000) -#define KEY_MOD3 ((sal_uInt16)0x8000) -#define KEY_MODTYPE ((sal_uInt16)0xF000) -#define KEY_ALLMODTYPE ((sal_uInt16)0xF000) - // extended Modifier-Keys (only used for modkey events) #define MODKEY_LSHIFT 0x0001 #define MODKEY_RSHIFT 0x0002 diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx index 4f4b2581c641..ba6038de8bcd 100644 --- a/vcl/inc/vcl/menu.hxx +++ b/vcl/inc/vcl/menu.hxx @@ -24,6 +24,7 @@ #include <vcl/dllapi.h> #include <tools/rc.hxx> #include <tools/resid.hxx> +#include <rsc/rsc-vcl-shared-types.hxx> #include <vcl/bitmapex.hxx> #include <tools/color.hxx> #include <vcl/vclevent.hxx> @@ -68,23 +69,6 @@ namespace vcl { struct MenuLayoutData; } #define POPUPMENU_NOMOUSEUPCLOSE ((sal_uInt16)0x0010) -// By changes you must also change: rsc/vclrsc.hxx -enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE, - MENUITEM_STRINGIMAGE, MENUITEM_SEPARATOR }; - -// By changes you must also change: rsc/vclrsc.hxx -typedef sal_uInt16 MenuItemBits; -#define MIB_CHECKABLE ((MenuItemBits)0x0001) -#define MIB_RADIOCHECK ((MenuItemBits)0x0002) -#define MIB_AUTOCHECK ((MenuItemBits)0x0004) -#define MIB_ABOUT ((MenuItemBits)0x0008) -#define MIB_HELP ((MenuItemBits)0x0010) -#define MIB_POPUPSELECT ((MenuItemBits)0x0020) -// not in rsc/vclsrc.hxx because only a prelimitary solution -#define MIB_NOSELECT ((MenuItemBits)0x0040) -#define MIB_ICON ((MenuItemBits)0x0080) -#define MIB_TEXT ((MenuItemBits)0x0100) - #define MENU_FLAG_NOAUTOMNEMONICS 0x0001 #define MENU_FLAG_HIDEDISABLEDENTRIES 0x0002 diff --git a/vcl/inc/vcl/symbol.hxx b/vcl/inc/vcl/symbol.hxx index 6285c04cdd94..1b19ec3ceafd 100644 --- a/vcl/inc/vcl/symbol.hxx +++ b/vcl/inc/vcl/symbol.hxx @@ -21,52 +21,7 @@ #define _SV_SYMBOL_HXX #include <tools/solar.h> - -// ---------------- -// - Symbol-Types - -// ---------------- - -// By changes you must also change: rsc/vclrsc.hxx -typedef sal_uInt16 SymbolType; -#define SYMBOL_DONTKNOW ((SymbolType)0) -#define SYMBOL_IMAGE ((SymbolType)1) -#define SYMBOL_ARROW_UP ((SymbolType)2) -#define SYMBOL_ARROW_DOWN ((SymbolType)3) -#define SYMBOL_ARROW_LEFT ((SymbolType)4) -#define SYMBOL_ARROW_RIGHT ((SymbolType)5) -#define SYMBOL_SPIN_UP ((SymbolType)6) -#define SYMBOL_SPIN_DOWN ((SymbolType)7) -#define SYMBOL_SPIN_LEFT ((SymbolType)8) -#define SYMBOL_SPIN_RIGHT ((SymbolType)9) -#define SYMBOL_FIRST ((SymbolType)10) -#define SYMBOL_LAST ((SymbolType)11) -#define SYMBOL_PREV ((SymbolType)12) -#define SYMBOL_NEXT ((SymbolType)13) -#define SYMBOL_PAGEUP ((SymbolType)14) -#define SYMBOL_PAGEDOWN ((SymbolType)15) -#define SYMBOL_PLAY ((SymbolType)16) -#define SYMBOL_REVERSEPLAY ((SymbolType)17) -#define SYMBOL_RECORD ((SymbolType)18) -#define SYMBOL_STOP ((SymbolType)19) -#define SYMBOL_PAUSE ((SymbolType)20) -#define SYMBOL_WINDSTART ((SymbolType)21) -#define SYMBOL_WINDEND ((SymbolType)22) -#define SYMBOL_WINDBACKWARD ((SymbolType)23) -#define SYMBOL_WINDFORWARD ((SymbolType)24) -#define SYMBOL_CLOSE ((SymbolType)25) -#define SYMBOL_ROLLUP ((SymbolType)26) -#define SYMBOL_ROLLDOWN ((SymbolType)27) -#define SYMBOL_CHECKMARK ((SymbolType)28) -#define SYMBOL_RADIOCHECKMARK ((SymbolType)29) -#define SYMBOL_SPIN_UPDOWN ((SymbolType)30) -#define SYMBOL_FLOAT ((SymbolType)31) -#define SYMBOL_DOCK ((SymbolType)32) -#define SYMBOL_HIDE ((SymbolType)33) -#define SYMBOL_HELP ((SymbolType)34) -#define SYMBOL_PLUS ((SymbolType)35) -#define SYMBOL_MENU SYMBOL_SPIN_DOWN - -#define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW) +#include <rsc/rsc-vcl-shared-types.hxx> #endif // _SV_SYMBOL_HXX diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx index b15af093c3d4..e0c3635f631f 100644 --- a/vcl/inc/vcl/toolbox.hxx +++ b/vcl/inc/vcl/toolbox.hxx @@ -21,6 +21,7 @@ #define _SV_TOOLBOX_HXX #include <tools/solar.h> +#include <rsc/rsc-vcl-shared-types.hxx> #include <vcl/dllapi.h> #include <vcl/dockwin.hxx> #include <vcl/image.hxx> @@ -93,29 +94,6 @@ inline sal_Bool ToolBoxCustomizeEvent::IsResized() const return sal_False; } -// ------------------- -// - ToolBoxItemBits - -// ------------------- - -typedef sal_uInt16 ToolBoxItemBits; - -// -------------------------- -// - Bits fuer ToolBoxItems - -// -------------------------- - -// By changes you must also change: rsc/vclrsc.hxx -#define TIB_CHECKABLE ((ToolBoxItemBits)0x0001) -#define TIB_RADIOCHECK ((ToolBoxItemBits)0x0002) -#define TIB_AUTOCHECK ((ToolBoxItemBits)0x0004) -#define TIB_LEFT ((ToolBoxItemBits)0x0008) -#define TIB_AUTOSIZE ((ToolBoxItemBits)0x0010) -#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020) -#define TIB_REPEAT ((ToolBoxItemBits)0x0040) -#define TIB_DROPDOWNONLY ((ToolBoxItemBits)0x0080 | TIB_DROPDOWN) // this button has only drop down functionality -#define TIB_TEXT_ONLY ((ToolBoxItemBits)0x0100) -#define TIB_ICON_ONLY ((ToolBoxItemBits)0x0200) -#define TIB_TEXTICON ((ToolBoxItemBits) TIB_TEXT_ONLY | TIB_ICON_ONLY ) - // ----------------- // - ToolBox-Types - // ----------------- @@ -133,14 +111,6 @@ typedef sal_uInt16 ToolBoxItemBits; #define TOOLBOX_MENUTYPE_CLIPPEDITEMS ((sal_uInt16)0x0001) // menu will contain "more" indicator #define TOOLBOX_MENUTYPE_CUSTOMIZE ((sal_uInt16)0x0002) // menu will contain "customization" and "more" indicator -// By changes you must also change: rsc/vclrsc.hxx -enum ButtonType { BUTTON_SYMBOL, BUTTON_TEXT, BUTTON_SYMBOLTEXT }; - -// By changes you must also change: rsc/vclrsc.hxx -enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON, - TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR, - TOOLBOXITEM_BREAK }; - // small or large force an exact toolbox size for proper alignemnt // dontcare will let the toolbox decide about its size enum ToolBoxButtonSize { TOOLBOX_BUTTONSIZE_DONTCARE, TOOLBOX_BUTTONSIZE_SMALL, TOOLBOX_BUTTONSIZE_LARGE }; diff --git a/vcl/inc/vcl/vclenum.hxx b/vcl/inc/vcl/vclenum.hxx index deb5c208e707..e0760b131c01 100644 --- a/vcl/inc/vcl/vclenum.hxx +++ b/vcl/inc/vcl/vclenum.hxx @@ -23,39 +23,22 @@ #include <sal/types.h> #include <tools/solar.h> #include <tools/fontenum.hxx> - -#ifndef ENUM_TIMEFIELDFORMAT_DECLARED -#define ENUM_TIMEFIELDFORMAT_DECLARED - -// By changes you must also change: rsc/vclrsc.hxx -enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; - -#endif +#include <rsc/rsc-vcl-shared-types.hxx> // ------------------------------------------------------------ -#ifndef ENUM_EXTTIMEFIELDFORMAT_DECLARED -#define ENUM_EXTTIMEFIELDFORMAT_DECLARED - enum ExtTimeFieldFormat { EXTTIMEF_24H_SHORT, EXTTIMEF_24H_LONG, EXTTIMEF_12H_SHORT, EXTTIMEF_12H_LONG, EXTTIMEF_DURATION_SHORT, EXTTIMEF_DURATION_LONG }; -#endif - // ------------------------------------------------------------ -#ifndef ENUM_EXTDATEFIELDFORMAT_DECLARED -#define ENUM_EXTDATEFIELDFORMAT_DECLARED - enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF_SYSTEM_SHORT_YYYY, XTDATEF_SYSTEM_LONG, XTDATEF_SHORT_DDMMYY, XTDATEF_SHORT_MMDDYY, XTDATEF_SHORT_YYMMDD, XTDATEF_SHORT_DDMMYYYY, XTDATEF_SHORT_MMDDYYYY, XTDATEF_SHORT_YYYYMMDD, XTDATEF_SHORT_YYMMDD_DIN5008, XTDATEF_SHORT_YYYYMMDD_DIN5008, ExtDateFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; -#endif - // ------------------------------------------------------------ enum GradientStyle @@ -77,9 +60,6 @@ enum GradientStyle #define HATCH_TRIPLE HatchStyle_TRIPLE #define HATCH_FORCE_EQUAL_SIZE HatchStyle_FORCE_EQUAL_SIZE -#ifndef ENUM_HATCHSTYLE_DECLARED -#define ENUM_HATCHSTYLE_DECLARED - enum HatchStyle { HATCH_SINGLE = 0, @@ -88,8 +68,6 @@ enum HatchStyle HatchStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM }; -#endif - // ------------------------------------------------------------ // to avoid conflicts with enum's declared otherwise @@ -98,9 +76,6 @@ enum HatchStyle #define LINE_DASH LineStyle_DASH #define LINE_FORCE_EQUAL_SIZE LineStyle_FORCE_EQUAL_SIZE -#ifndef ENUM_LINESTYLE_DECLARED -#define ENUM_LINESTYLE_DECLARED - enum LineStyle { LINE_NONE = 0, @@ -109,64 +84,24 @@ enum LineStyle LineStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM }; -#endif - // ------------------------------------------------------------ -#ifndef ENUM_RASTEROP_DECLARED -#define ENUM_RASTEROP_DECLARED - enum RasterOp { ROP_OVERPAINT, ROP_XOR, ROP_0, ROP_1, ROP_INVERT }; -#endif - // ------------------------------------------------------------ - -#ifndef ENUM_FONTAUTOHINT_DECLARED -#define ENUM_FONTAUTOHINT_DECLARED - enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE }; -#endif - -#ifndef ENUM_FONTHINTING_DECLARED -#define ENUM_FONTHINTING_DECLARED - enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE }; -#endif - -#ifndef ENUM_FONTHINTSTYLE_DECLARED -#define ENUM_FONTHINTSTYLE_DECLARED - enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL }; -#endif - // ------------------------------------------------------------ -#ifndef ENUM_KEYFUNCTYPE_DECLARED -#define ENUM_KEYFUNCTYPE_DECLARED - -enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE, - KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT, - KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO, - KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND, - KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT, - KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; - -#endif - typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl -#ifndef ENUM_OUTDEVSUPPORT_DECLARED -#define ENUM_OUTDEVSUPPORT_DECLARED - enum OutDevSupportType { OutDevSupport_TransparentRect, OutDevSupport_B2DClip, OutDevSupport_B2DDraw }; -#endif - struct ItalicMatrix { double xx, xy, yx, yy; diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index ccd599a4a344..fda621f83734 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -26,6 +26,7 @@ #include <tools/resid.hxx> #include <vcl/pointr.hxx> #include <tools/wintypes.hxx> +#include <rsc/rsc-vcl-shared-types.hxx> #include <vcl/apptypes.hxx> #include <vcl/inputctx.hxx> #include <vcl/vclevent.hxx> @@ -277,14 +278,6 @@ typedef sal_uInt16 StateChangedType; #define WINDOW_DRAW_NOBACKGROUND ((sal_uLong)0x00000080) #define WINDOW_DRAW_ROLLOVER ((sal_uLong)0x00000100) -// Border-Styles fuer SetBorder() -#define WINDOW_BORDER_NORMAL ((sal_uInt16)0x0001) -#define WINDOW_BORDER_MONO ((sal_uInt16)0x0002) -#define WINDOW_BORDER_MENU ((sal_uInt16)0x0010) -#define WINDOW_BORDER_NWF ((sal_uInt16)0x0020) -#define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000) -#define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000) - // DialogControl-Flags #define WINDOW_DLGCTRL_RETURN ((sal_uInt16)0x0001) #define WINDOW_DLGCTRL_WANTFOCUS ((sal_uInt16)0x0002) |