1*3334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3334a7e6SAndrew Rist * distributed with this work for additional information 6*3334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 9*3334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 10*3334a7e6SAndrew Rist * 11*3334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*3334a7e6SAndrew Rist * 13*3334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3334a7e6SAndrew Rist * software distributed under the License is distributed on an 15*3334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 17*3334a7e6SAndrew Rist * specific language governing permissions and limitations 18*3334a7e6SAndrew Rist * under the License. 19*3334a7e6SAndrew Rist * 20*3334a7e6SAndrew Rist *************************************************************/ 21*3334a7e6SAndrew Rist 22*3334a7e6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SVX_UNOPROV_HXX 25cdf0e10cSrcweir #define SVX_UNOPROV_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 28cdf0e10cSrcweir #include <svl/itemprop.hxx> 29cdf0e10cSrcweir #include <tools/list.hxx> 30cdf0e10cSrcweir #include "svx/svxdllapi.h" 31cdf0e10cSrcweir 32cdf0e10cSrcweir class SvxItemPropertySet; 33cdf0e10cSrcweir class SfxItemPool; 34cdf0e10cSrcweir 35cdf0e10cSrcweir /*********************************************************************** 36cdf0e10cSrcweir * class UHashMap * 37cdf0e10cSrcweir ***********************************************************************/ 38cdf0e10cSrcweir 39cdf0e10cSrcweir struct UHashMapEntry 40cdf0e10cSrcweir { 41cdf0e10cSrcweir ::rtl::OUString aIdentifier; 42cdf0e10cSrcweir sal_uInt32 nId; 43cdf0e10cSrcweir UHashMapEntryUHashMapEntry44cdf0e10cSrcweir UHashMapEntry(const sal_Char * value, sal_Int32 length, sal_uInt32 _nId) : aIdentifier(value,length,RTL_TEXTENCODING_ASCII_US), nId(_nId) { } 45cdf0e10cSrcweir }; 46cdf0e10cSrcweir 47cdf0e10cSrcweir DECLARE_LIST( UHashMapEntryList, UHashMapEntry* ) 48cdf0e10cSrcweir 49cdf0e10cSrcweir #define HASHARRAYSIZE 0x10 50cdf0e10cSrcweir #define UHASHMAP_NOTFOUND sal::static_int_cast< sal_uInt32 >(~0) 51cdf0e10cSrcweir 52cdf0e10cSrcweir class UHashMap 53cdf0e10cSrcweir { 54cdf0e10cSrcweir private: 55cdf0e10cSrcweir UHashMapEntryList m_aHashList[HASHARRAYSIZE]; 56cdf0e10cSrcweir 57cdf0e10cSrcweir public: 58cdf0e10cSrcweir UHashMap( UHashMapEntry* pMap ); ~UHashMap()59cdf0e10cSrcweir ~UHashMap() {}; 60cdf0e10cSrcweir 61cdf0e10cSrcweir sal_uInt32 getId( const ::rtl::OUString& rCompareString ); 62cdf0e10cSrcweir }; 63cdf0e10cSrcweir 64cdf0e10cSrcweir /*********************************************************************** 65cdf0e10cSrcweir * Soriterer * 66cdf0e10cSrcweir ***********************************************************************/ 67cdf0e10cSrcweir 68cdf0e10cSrcweir #define SVXMAP_SHAPE 0 69cdf0e10cSrcweir #define SVXMAP_CONNECTOR 1 70cdf0e10cSrcweir #define SVXMAP_DIMENSIONING 2 71cdf0e10cSrcweir #define SVXMAP_CIRCLE 3 72cdf0e10cSrcweir #define SVXMAP_POLYPOLYGON 4 73cdf0e10cSrcweir #define SVXMAP_POLYPOLYGONBEZIER 5 74cdf0e10cSrcweir #define SVXMAP_GRAPHICOBJECT 6 75cdf0e10cSrcweir #define SVXMAP_3DSCENEOBJECT 7 76cdf0e10cSrcweir #define SVXMAP_3DCUBEOBJEKT 8 77cdf0e10cSrcweir #define SVXMAP_3DSPHEREOBJECT 9 78cdf0e10cSrcweir #define SVXMAP_3DLATHEOBJECT 10 79cdf0e10cSrcweir #define SVXMAP_3DEXTRUDEOBJECT 11 80cdf0e10cSrcweir #define SVXMAP_3DPOLYGONOBJECT 12 81cdf0e10cSrcweir #define SVXMAP_ALL 13 82cdf0e10cSrcweir #define SVXMAP_GROUP 14 83cdf0e10cSrcweir #define SVXMAP_CAPTION 15 84cdf0e10cSrcweir #define SVXMAP_OLE2 16 85cdf0e10cSrcweir #define SVXMAP_PLUGIN 17 86cdf0e10cSrcweir #define SVXMAP_FRAME 18 87cdf0e10cSrcweir #define SVXMAP_APPLET 19 88cdf0e10cSrcweir #define SVXMAP_CONTROL 20 89cdf0e10cSrcweir #define SVXMAP_TEXT 21 90cdf0e10cSrcweir #define SVXMAP_CUSTOMSHAPE 22 91cdf0e10cSrcweir #define SVXMAP_MEDIA 23 92cdf0e10cSrcweir #define SVXMAP_TABLE 24 93cdf0e10cSrcweir #define SVXMAP_PAGE 25 94cdf0e10cSrcweir #define SVXMAP_END 26 // last+1 ! 95cdf0e10cSrcweir /*********************************************************************** 96cdf0e10cSrcweir * SvxUnoPropertyMapProvider * 97cdf0e10cSrcweir ***********************************************************************/ 98cdf0e10cSrcweir class SVX_DLLPUBLIC SvxUnoPropertyMapProvider 99cdf0e10cSrcweir { 100cdf0e10cSrcweir SfxItemPropertyMapEntry* aMapArr[SVXMAP_END]; 101cdf0e10cSrcweir SvxItemPropertySet* aSetArr[SVXMAP_END]; 102cdf0e10cSrcweir // void Sort(sal_uInt16 nId); 103cdf0e10cSrcweir public: 104cdf0e10cSrcweir SvxUnoPropertyMapProvider(); 105cdf0e10cSrcweir ~SvxUnoPropertyMapProvider(); 106cdf0e10cSrcweir const SfxItemPropertyMapEntry* GetMap(sal_uInt16 nPropertyId); 107cdf0e10cSrcweir const SvxItemPropertySet* GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool); 108cdf0e10cSrcweir }; 109cdf0e10cSrcweir 110cdf0e10cSrcweir /*********************************************************************** 111cdf0e10cSrcweir * Globals * 112cdf0e10cSrcweir ***********************************************************************/ 113cdf0e10cSrcweir 114cdf0e10cSrcweir const sal_Int16 OBJ_OLE2_APPLET = 100; 115cdf0e10cSrcweir const sal_Int16 OBJ_OLE2_PLUGIN = 101; 116cdf0e10cSrcweir 117cdf0e10cSrcweir extern SvxUnoPropertyMapProvider aSvxMapProvider; 118cdf0e10cSrcweir extern UHashMapEntry pSdrShapeIdentifierMap[]; 119cdf0e10cSrcweir extern UHashMap aSdrShapeIdentifierMap; 120cdf0e10cSrcweir 121cdf0e10cSrcweir #define E3D_INVENTOR_FLAG (0x80000000) 122cdf0e10cSrcweir 123cdf0e10cSrcweir #include <editeng/unoipset.hxx> 124cdf0e10cSrcweir 125cdf0e10cSrcweir /*********************************************************************** 126cdf0e10cSrcweir * class SvxPropertySetInfoPool * 127cdf0e10cSrcweir ***********************************************************************/ 128cdf0e10cSrcweir 129cdf0e10cSrcweir const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS = 0; 130cdf0e10cSrcweir const sal_Int32 SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER = 1; 131cdf0e10cSrcweir const sal_Int32 SVXUNO_SERVICEID_LASTID = 1; 132cdf0e10cSrcweir 133cdf0e10cSrcweir namespace comphelper { class PropertySetInfo; } 134cdf0e10cSrcweir 135cdf0e10cSrcweir class SvxPropertySetInfoPool 136cdf0e10cSrcweir { 137cdf0e10cSrcweir public: 138cdf0e10cSrcweir SVX_DLLPUBLIC static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw(); 139cdf0e10cSrcweir 140cdf0e10cSrcweir private: 141cdf0e10cSrcweir static comphelper::PropertySetInfo* mpInfos[SVXUNO_SERVICEID_LASTID+1]; 142cdf0e10cSrcweir }; 143cdf0e10cSrcweir 144cdf0e10cSrcweir #endif 145cdf0e10cSrcweir 146