13334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 33334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 43334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 53334a7e6SAndrew Rist * distributed with this work for additional information 63334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 73334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 83334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 93334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 103334a7e6SAndrew Rist * 113334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 123334a7e6SAndrew Rist * 133334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 143334a7e6SAndrew Rist * software distributed under the License is distributed on an 153334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 163334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 173334a7e6SAndrew Rist * specific language governing permissions and limitations 183334a7e6SAndrew Rist * under the License. 193334a7e6SAndrew Rist * 203334a7e6SAndrew Rist *************************************************************/ 213334a7e6SAndrew Rist 223334a7e6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _ENHANCEDCUSTOMSHAPEGEOMETRY_HXX 25cdf0e10cSrcweir #define _ENHANCEDCUSTOMSHAPEGEOMETRY_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sal/types.h> 28cdf0e10cSrcweir #include <svx/msdffdef.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir struct SvxMSDffVertPair 31cdf0e10cSrcweir { 32cdf0e10cSrcweir sal_Int32 nValA; 33cdf0e10cSrcweir sal_Int32 nValB; 34cdf0e10cSrcweir }; 35cdf0e10cSrcweir struct SvxMSDffCalculationData 36cdf0e10cSrcweir { 37cdf0e10cSrcweir sal_uInt16 nFlags; 384d2151e5SArmin Le Grand sal_Int32 nVal[ 3 ]; 39cdf0e10cSrcweir }; 40cdf0e10cSrcweir struct SvxMSDffTextRectangles 41cdf0e10cSrcweir { 42cdf0e10cSrcweir SvxMSDffVertPair nPairA; 43cdf0e10cSrcweir SvxMSDffVertPair nPairB; 44cdf0e10cSrcweir }; 45cdf0e10cSrcweir 46cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_MIRRORED_X 0x0001 47cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_MIRRORED_Y 0x0002 48cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_SWITCHED 0x0004 49cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_POLAR 0x0008 50cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_MAP 0x0010 51cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RANGE 0x0020 52cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL 0x0080 53cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL 0x0100 54cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL 0x0200 55cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL 0x0400 56cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_CENTER_X_IS_SPECIAL 0x0800 57cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_CENTER_Y_IS_SPECIAL 0x1000 58cdf0e10cSrcweir #define MSDFF_HANDLE_FLAGS_RADIUS_RANGE 0x2000 59cdf0e10cSrcweir 60cdf0e10cSrcweir struct SvxMSDffHandle 61cdf0e10cSrcweir { 62cdf0e10cSrcweir sal_uInt32 nFlags; 63cdf0e10cSrcweir sal_Int32 nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax; 64cdf0e10cSrcweir }; 65cdf0e10cSrcweir struct mso_CustomShape 66cdf0e10cSrcweir { 67cdf0e10cSrcweir SvxMSDffVertPair* pVertices; 68cdf0e10cSrcweir sal_uInt32 nVertices; 69cdf0e10cSrcweir sal_uInt16* pElements; 70cdf0e10cSrcweir sal_uInt32 nElements; 71cdf0e10cSrcweir SvxMSDffCalculationData* pCalculation; 72cdf0e10cSrcweir sal_uInt32 nCalculation; 73cdf0e10cSrcweir sal_Int32* pDefData; 74cdf0e10cSrcweir SvxMSDffTextRectangles* pTextRect; 75cdf0e10cSrcweir sal_uInt32 nTextRect; 76cdf0e10cSrcweir sal_Int32 nCoordWidth; 77cdf0e10cSrcweir sal_Int32 nCoordHeight; 78cdf0e10cSrcweir sal_Int32 nXRef; 79cdf0e10cSrcweir sal_Int32 nYRef; 80cdf0e10cSrcweir SvxMSDffVertPair* pGluePoints; 81cdf0e10cSrcweir sal_uInt32 nGluePoints; 82cdf0e10cSrcweir SvxMSDffHandle* pHandles; 83cdf0e10cSrcweir sal_uInt32 nHandles; 84cdf0e10cSrcweir }; 85cdf0e10cSrcweir 86*e5cfc9caSHerbert Dürr // 0x80000000 is used as magic constant all over the customshape code where 87*e5cfc9caSHerbert Dürr // it is squeezed into signed int32 type that cannot preserve this value. Good 88*e5cfc9caSHerbert Dürr // compilers notice the problem and have every right to complain or error-out. 89*e5cfc9caSHerbert Dürr // Using the magic constant already casted down consolidates the problem and is 90*e5cfc9caSHerbert Dürr // the least invasive way to fix it until the code gets its well deserved makeover. 91*e5cfc9caSHerbert Dürr #define Mx80000000 static_cast<sal_Int32>(0x80000000) 92*e5cfc9caSHerbert Dürr #define MSO_I | Mx80000000 93cdf0e10cSrcweir 94cdf0e10cSrcweir sal_Bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType ); 95cdf0e10cSrcweir SVX_DLLPUBLIC sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType ); 96cdf0e10cSrcweir SVX_DLLPUBLIC sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // #i28269# 99cdf0e10cSrcweir SVX_DLLPUBLIC sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType ); 100cdf0e10cSrcweir 101cdf0e10cSrcweir SVX_DLLPUBLIC const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ); 102cdf0e10cSrcweir 103cdf0e10cSrcweir #endif 104