chart2/source/view/main/ShapeFactory.cxx | 93 +++++++++++---------- desktop/source/app/officeipcthread.cxx | 11 ++ rsc/Package_inc.mk | 1 rsc/inc/rsc/rsc-vcl-shared-types.hxx | 133 +++++++++++++++++++++++++++++++ rsc/inc/vclrsc.hxx | 132 ------------------------------ vcl/inc/vcl/keycod.hxx | 3 vcl/inc/vcl/keycodes.hxx | 17 --- vcl/inc/vcl/menu.hxx | 18 ---- vcl/inc/vcl/symbol.hxx | 47 ---------- vcl/inc/vcl/toolbox.hxx | 32 ------- vcl/inc/vcl/vclenum.hxx | 67 --------------- vcl/inc/vcl/window.hxx | 9 -- vcl/source/window/accel.cxx | 6 - 13 files changed, 203 insertions(+), 366 deletions(-)
New commits: commit 9fde14ce08463b5dcf1c96d8f636903992b63183 Author: Tor Lillqvist <t...@iki.fi> Date: Wed Feb 27 13:09:39 2013 +0200 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 diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 3a5c309..e83445f 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 eee82b0..230b544 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 0000000..4e8ca10 --- /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 d1be1f1..c2109bf 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 9dd3a6c..cfa2364 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 4f4b258..ba6038d 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 6285c04..1b19ec3 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 b15af09..e0c3635 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 deb5c20..e0760b1 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 ccd599a..fda621f 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) commit 3ec1d8af4259c29d780977ea6c3667df130a2ba1 Author: Tor Lillqvist <t...@iki.fi> Date: Wed Feb 27 12:55:17 2013 +0200 WaE: unused function Change-Id: Ia6785e0b7d3ac95d38bd59e677cdb415b15dbdb6 diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index f4428e5..ebb961e 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -57,8 +57,11 @@ const int OfficeIPCThread::sc_nShSeqLength = 5; namespace { -static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments"; static char const ARGUMENT_PREFIX[] = "InternalIPC::Arguments"; + +#if !defined(ANDROID) && !defined(IOS) + +static char const SEND_ARGUMENTS[] = "InternalIPC::SendArguments"; static char const PROCESSING_DONE[] = "InternalIPC::ProcessingDone"; // Receives packets from the pipe until a packet ends in a NUL character (that @@ -85,6 +88,8 @@ OString readStringFromPipe(osl::StreamPipe & pipe) { } } +#endif + } // Type of pipe we use @@ -100,6 +105,8 @@ namespace desktop namespace { +#if !defined(ANDROID) && !defined(IOS) + class Parser: public CommandLineArgs::Supplier { public: explicit Parser(rtl::OString const & input): m_input(input) { @@ -235,6 +242,8 @@ bool addArgument(rtl::OStringBuffer &rArguments, char prefix, return true; } +#endif + } rtl::Reference< OfficeIPCThread > OfficeIPCThread::pGlobalOfficeIPCThread; commit 839675e7686fce1ba3c5dabab8159319c684af9b Author: Tor Lillqvist <t...@iki.fi> Date: Wed Feb 27 11:59:44 2013 +0200 GetFullKeyCode() was identical to GetFullCode() Change-Id: Ib1b51d7eef8d7076271f612b2d674c2356037bc8 diff --git a/vcl/inc/vcl/keycod.hxx b/vcl/inc/vcl/keycod.hxx index 266e10d..70df758 100644 --- a/vcl/inc/vcl/keycod.hxx +++ b/vcl/inc/vcl/keycod.hxx @@ -49,7 +49,6 @@ public: KeyCode( KeyFuncType eFunction ); sal_uInt16 GetFullCode() const { return nCode; } - sal_uInt16 GetFullKeyCode() const { return (nCode) ; } KeyFuncType GetFullFunction() const { return eFunc; } sal_Bool IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const; @@ -116,7 +115,7 @@ inline sal_Bool KeyCode::operator !=( const KeyCode& rKeyCode ) const inline sal_Bool KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) - return (GetFullKeyCode() == rKeyCode.GetFullKeyCode()); + return (GetFullCode() == rKeyCode.GetFullCode()); return (GetFunction() == rKeyCode.GetFunction()); } diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 9b26845..261c4d0 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -170,7 +170,7 @@ void Accelerator::ImplInit() ImplAccelEntry* Accelerator::ImplGetAccelData( const KeyCode& rKeyCode ) const { - ImplAccelMap::iterator it = mpData->maKeyMap.find( rKeyCode.GetFullKeyCode() ); + ImplAccelMap::iterator it = mpData->maKeyMap.find( rKeyCode.GetFullCode() ); if( it != mpData->maKeyMap.end() ) return it->second; else @@ -195,7 +195,7 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData ) else pEntry->mpAutoAccel = NULL; - mpData->maKeyMap.insert( std::make_pair( pEntry->maKeyCode.GetFullKeyCode(), pEntry ) ); + mpData->maKeyMap.insert( std::make_pair( pEntry->maKeyCode.GetFullCode(), pEntry ) ); mpData->maIdList.push_back( pEntry ); } } @@ -256,7 +256,7 @@ void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, pEntry->mbEnabled = bEnable; // now into the tables - sal_uLong nCode = rKeyCode.GetFullKeyCode(); + sal_uLong nCode = rKeyCode.GetFullCode(); if ( !nCode ) { OSL_FAIL( "Accelerator::InsertItem(): KeyCode with KeyCode 0 not allowed" ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits