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 _SVX_TWOLINESITEM_HXX 24 #define _SVX_TWOLINESITEM_HXX 25 26 #include <sal/types.h> 27 #include <svl/poolitem.hxx> 28 #include <editeng/editengdllapi.h> 29 30 class SvXMLUnitConverter; 31 namespace rtl 32 { 33 class OUString; 34 } 35 36 class EDITENG_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem 37 { 38 sal_Unicode cStartBracket, cEndBracket; 39 sal_Bool bOn; 40 public: 41 TYPEINFO(); 42 SvxTwoLinesItem( sal_Bool bOn /*= sal_True*/, 43 sal_Unicode nStartBracket /*= 0*/, 44 sal_Unicode nEndBracket /*= 0*/, 45 sal_uInt16 nId ); 46 SvxTwoLinesItem( const SvxTwoLinesItem& rAttr ); 47 virtual ~SvxTwoLinesItem(); 48 49 // "pure virtual Methoden" vom SfxPoolItem 50 virtual int operator==( const SfxPoolItem& ) const; 51 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; 52 virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVer) const; 53 virtual SvStream& Store(SvStream &, sal_uInt16 nIVer) const; 54 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 55 SfxMapUnit eCoreMetric, 56 SfxMapUnit ePresMetric, 57 String &rText, 58 const IntlWrapper* pIntl = 0 ) const; 59 60 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, 61 sal_uInt8 nMemberId = 0 ) const; 62 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, 63 sal_uInt8 nMemberId = 0 ); 64 65 virtual sal_uInt16 GetVersion( sal_uInt16 nFFVer ) const; 66 operator =(const SvxTwoLinesItem & rCpy)67 SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy ) 68 { 69 SetValue( rCpy.GetValue() ); 70 SetStartBracket( rCpy.GetStartBracket() ); 71 SetEndBracket( rCpy.GetEndBracket() ); 72 return *this; 73 } 74 GetValue() const75 sal_Bool GetValue() const { return bOn; } SetValue(sal_Bool bFlag)76 void SetValue( sal_Bool bFlag ) { bOn = bFlag; } 77 GetStartBracket() const78 sal_Unicode GetStartBracket() const { return cStartBracket; } SetStartBracket(sal_Unicode c)79 void SetStartBracket( sal_Unicode c ) { cStartBracket = c; } 80 GetEndBracket() const81 sal_Unicode GetEndBracket() const { return cEndBracket; } SetEndBracket(sal_Unicode c)82 void SetEndBracket( sal_Unicode c ) { cEndBracket = c; } 83 }; 84 85 #endif 86 87