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 _FMTINFMT_HXX 24 #define _FMTINFMT_HXX 25 26 #include <tools/string.hxx> 27 #include <svl/poolitem.hxx> 28 #include "swdllapi.h" 29 30 class SvxMacro; 31 class SvxMacroTableDtor; 32 class SwTxtINetFmt; 33 class IntlWrapper; 34 35 // ATT_INETFMT ********************************************* 36 37 class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem 38 { 39 friend class SwTxtINetFmt; 40 41 String aURL; // die URL 42 String aTargetFrame; // in diesen Frame soll die URL 43 String aINetFmt; 44 String aVisitedFmt; 45 String aName; // Name des Links 46 SvxMacroTableDtor* pMacroTbl; 47 SwTxtINetFmt* pTxtAttr; // mein TextAttribut 48 sal_uInt16 nINetId; 49 sal_uInt16 nVisitedId; 50 public: 51 SwFmtINetFmt( const String& rURL, const String& rTarget ); 52 SwFmtINetFmt( const SwFmtINetFmt& rAttr ); 53 SwFmtINetFmt(); // for TypeInfo 54 virtual ~SwFmtINetFmt(); 55 56 TYPEINFO(); 57 58 // "pure virtual Methoden" vom SfxPoolItem 59 virtual int operator==( const SfxPoolItem& ) const; 60 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; 61 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 62 SfxMapUnit eCoreMetric, 63 SfxMapUnit ePresMetric, 64 String &rText, 65 const IntlWrapper* pIntl = 0 ) const; 66 67 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, 68 sal_uInt8 nMemberId = 0 ) const; 69 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, 70 sal_uInt8 nMemberId = 0 ); 71 72 73 const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; } 74 SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; } 75 76 const String& GetValue() const { return aURL; } 77 78 const String& GetName() const { return aName; } 79 void SetName( const String& rNm ) { aName = rNm; } 80 81 const String& GetTargetFrame() const { return aTargetFrame; } 82 83 const String& GetINetFmt() const { return aINetFmt; } 84 void SetINetFmt( const String& rNm ) { aINetFmt = rNm; } 85 86 const String& GetVisitedFmt() const { return aVisitedFmt; } 87 void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; } 88 89 sal_uInt16 GetINetFmtId() const { return nINetId; } 90 void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; } 91 92 sal_uInt16 GetVisitedFmtId() const { return nVisitedId; } 93 void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; } 94 95 // setze eine neue oder loesche die akt. MakroTabelle 96 void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 ); 97 const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; } 98 99 // setze / erfrage ein Makro 100 void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ); 101 const SvxMacro* GetMacro( sal_uInt16 nEvent ) const; 102 }; 103 104 105 #endif 106 107