1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
30 #include <tools/string.hxx>
31 #include <svl/poolitem.hxx>
35 class SvxMacroTableDtor
;
39 // ATT_INETFMT *********************************************
41 class SW_DLLPUBLIC SwFmtINetFmt
: public SfxPoolItem
43 friend class SwTxtINetFmt
;
45 String aURL
; // die URL
46 String aTargetFrame
; // in diesen Frame soll die URL
49 String aName
; // Name des Links
50 SvxMacroTableDtor
* pMacroTbl
;
51 SwTxtINetFmt
* pTxtAttr
; // mein TextAttribut
55 SwFmtINetFmt( const String
& rURL
, const String
& rTarget
);
56 SwFmtINetFmt( const SwFmtINetFmt
& rAttr
);
57 SwFmtINetFmt(); // for TypeInfo
58 virtual ~SwFmtINetFmt();
62 // "pure virtual Methoden" vom SfxPoolItem
63 virtual int operator==( const SfxPoolItem
& ) const;
64 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
65 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
66 SfxMapUnit eCoreMetric
,
67 SfxMapUnit ePresMetric
,
69 const IntlWrapper
* pIntl
= 0 ) const;
71 virtual BOOL
QueryValue( com::sun::star::uno::Any
& rVal
,
72 BYTE nMemberId
= 0 ) const;
73 virtual BOOL
PutValue( const com::sun::star::uno::Any
& rVal
,
77 const SwTxtINetFmt
* GetTxtINetFmt() const { return pTxtAttr
; }
78 SwTxtINetFmt
* GetTxtINetFmt() { return pTxtAttr
; }
80 const String
& GetValue() const { return aURL
; }
82 const String
& GetName() const { return aName
; }
83 void SetName( const String
& rNm
) { aName
= rNm
; }
85 const String
& GetTargetFrame() const { return aTargetFrame
; }
87 const String
& GetINetFmt() const { return aINetFmt
; }
88 void SetINetFmt( const String
& rNm
) { aINetFmt
= rNm
; }
90 const String
& GetVisitedFmt() const { return aVisitedFmt
; }
91 void SetVisitedFmt( const String
& rNm
) { aVisitedFmt
= rNm
; }
93 USHORT
GetINetFmtId() const { return nINetId
; }
94 void SetINetFmtId( USHORT nNew
) { nINetId
= nNew
; }
96 USHORT
GetVisitedFmtId() const { return nVisitedId
; }
97 void SetVisitedFmtId( USHORT nNew
) { nVisitedId
= nNew
; }
99 // setze eine neue oder loesche die akt. MakroTabelle
100 void SetMacroTbl( const SvxMacroTableDtor
* pTbl
= 0 );
101 const SvxMacroTableDtor
* GetMacroTbl() const { return pMacroTbl
; }
103 // setze / erfrage ein Makro
104 void SetMacro( USHORT nEvent
, const SvxMacro
& rMacro
);
105 const SvxMacro
* GetMacro( USHORT nEvent
) const;