1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _SXCECITM_HXX 24 #define _SXCECITM_HXX 25 26 #include <svl/eitem.hxx> 27 #include <svx/svddef.hxx> 28 #include <svx/sdynitm.hxx> 29 #include <svx/sdmetitm.hxx> 30 #include "svx/svxdllapi.h" 31 32 enum SdrCaptionEscDir {SDRCAPT_ESCHORIZONTAL,SDRCAPT_ESCVERTICAL,SDRCAPT_ESCBESTFIT}; 33 34 //------------------------------ 35 // class SdrCaptionEscDirItem 36 //------------------------------ 37 class SVX_DLLPUBLIC SdrCaptionEscDirItem: public SfxEnumItem { 38 public: 39 TYPEINFO(); SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SDRCAPT_ESCHORIZONTAL)40 SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SDRCAPT_ESCHORIZONTAL): SfxEnumItem(SDRATTR_CAPTIONESCDIR,sal::static_int_cast< sal_uInt16 >(eDir)) {} SdrCaptionEscDirItem(SvStream & rIn)41 SdrCaptionEscDirItem(SvStream& rIn) : SfxEnumItem(SDRATTR_CAPTIONESCDIR,rIn) {} 42 virtual SfxPoolItem* Clone(SfxItemPool* pPool=NULL) const; 43 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const; 44 virtual sal_uInt16 GetValueCount() const; // { return 3; } GetValue() const45 SdrCaptionEscDir GetValue() const { return (SdrCaptionEscDir)SfxEnumItem::GetValue(); } 46 47 virtual String GetValueTextByPos(sal_uInt16 nPos) const; 48 49 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const; 50 }; 51 52 //------------------------------------ 53 // class SdrCaptionEscIsRelItem 54 // sal_True=Linienaustrittsposition relativ 55 // sal_False=Linienaustrittsposition absolut 56 //------------------------------------ 57 class SdrCaptionEscIsRelItem: public SdrYesNoItem { 58 public: SdrCaptionEscIsRelItem(sal_Bool bRel=sal_True)59 SdrCaptionEscIsRelItem(sal_Bool bRel=sal_True): SdrYesNoItem(SDRATTR_CAPTIONESCISREL,bRel) {} SdrCaptionEscIsRelItem(SvStream & rIn)60 SdrCaptionEscIsRelItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_CAPTIONESCISREL,rIn) {} 61 }; 62 63 //------------------------------------ 64 // class SdrCaptionEscRelItem 65 // Relativer Linienaustritt 66 // 0 = 0.00% = oben bzw. links, 67 // 10000 = 100.00% = rechts bzw. unten 68 // nur wenn SdrCaptionEscIsRelItem=TRUE 69 //------------------------------------ 70 class SdrCaptionEscRelItem: public SfxInt32Item { 71 public: SdrCaptionEscRelItem(long nEscRel=5000)72 SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {} SdrCaptionEscRelItem(SvStream & rIn)73 SdrCaptionEscRelItem(SvStream& rIn) : SfxInt32Item(SDRATTR_CAPTIONESCREL,rIn) {} 74 }; 75 76 //------------------------------------ 77 // class SdrCaptionEscAbsItem 78 // Absoluter Linienaustritt 79 // 0 = oben bzw. links, 80 // >0 = in Richtung rechts bzw. unten 81 // nur wenn SdrCaptionEscIsRelItem=FALSE 82 //------------------------------------ 83 class SdrCaptionEscAbsItem: public SdrMetricItem { 84 public: SdrCaptionEscAbsItem(long nEscAbs=0)85 SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {} SdrCaptionEscAbsItem(SvStream & rIn)86 SdrCaptionEscAbsItem(SvStream& rIn) : SdrMetricItem(SDRATTR_CAPTIONESCABS,rIn) {} 87 }; 88 89 #endif 90