Update ooo320-m1
[ooovba.git] / sw / inc / fmtinfmt.hxx
blob835c221bb2d77684292fe41ed12d503800c1122f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmtinfmt.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _FMTINFMT_HXX
31 #define _FMTINFMT_HXX
33 #include <tools/string.hxx>
34 #include <svtools/poolitem.hxx>
35 #include "swdllapi.h"
37 class SvxMacro;
38 class SvxMacroTableDtor;
39 class SwTxtINetFmt;
40 class IntlWrapper;
42 // ATT_INETFMT *********************************************
44 class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
46 friend class SwTxtINetFmt;
48 String aURL; // die URL
49 String aTargetFrame; // in diesen Frame soll die URL
50 String aINetFmt;
51 String aVisitedFmt;
52 String aName; // Name des Links
53 SvxMacroTableDtor* pMacroTbl;
54 SwTxtINetFmt* pTxtAttr; // mein TextAttribut
55 USHORT nINetId;
56 USHORT nVisitedId;
57 public:
58 SwFmtINetFmt( const String& rURL, const String& rTarget );
59 SwFmtINetFmt( const SwFmtINetFmt& rAttr );
60 SwFmtINetFmt(); // for TypeInfo
61 virtual ~SwFmtINetFmt();
63 TYPEINFO();
65 // "pure virtual Methoden" vom SfxPoolItem
66 virtual int operator==( const SfxPoolItem& ) const;
67 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
68 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
69 SfxMapUnit eCoreMetric,
70 SfxMapUnit ePresMetric,
71 String &rText,
72 const IntlWrapper* pIntl = 0 ) const;
74 virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
75 BYTE nMemberId = 0 ) const;
76 virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
77 BYTE nMemberId = 0 );
80 const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
81 SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; }
83 const String& GetValue() const { return aURL; }
85 const String& GetName() const { return aName; }
86 void SetName( const String& rNm ) { aName = rNm; }
88 const String& GetTargetFrame() const { return aTargetFrame; }
90 const String& GetINetFmt() const { return aINetFmt; }
91 void SetINetFmt( const String& rNm ) { aINetFmt = rNm; }
93 const String& GetVisitedFmt() const { return aVisitedFmt; }
94 void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
96 USHORT GetINetFmtId() const { return nINetId; }
97 void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
99 USHORT GetVisitedFmtId() const { return nVisitedId; }
100 void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
102 // setze eine neue oder loesche die akt. MakroTabelle
103 void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
104 const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
106 // setze / erfrage ein Makro
107 void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
108 const SvxMacro* GetMacro( USHORT nEvent ) const;
112 #endif