1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: inetfld.hxx,v $
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 ************************************************************************/
37 class SvxMacroTableDtor
;
42 /*--------------------------------------------------------------------
43 Beschreibung: InterNet-FieldType -> Lade Document mit der URL
44 --------------------------------------------------------------------*/
46 class SwINetFieldType
: public SwFieldType
53 SwINetFieldType( SwDoc
* pDoc
);
55 virtual SwFieldType
* Copy() const;
57 SwCharFmt
* GetCharFmt( const SwINetField
& rFld
);
59 SwDoc
* GetDoc() const { return pDoc
; }
62 /*--------------------------------------------------------------------
63 Beschreibung: InterNet-Field -> Lade Document mit der URL
64 --------------------------------------------------------------------*/
66 class SwINetField
: public SwField
68 friend class SwINetFieldType
;
70 String sTargetFrameName
; // in diesen Frame soll die URL
73 SvxMacroTableDtor
* pMacroTbl
;
76 // Direkte Eingabe alten Wert loeschen
77 SwINetField( SwINetFieldType
* pTyp
, USHORT nFmt
,
78 const String
& rURL
, const String
& rText
);
79 virtual ~SwINetField();
81 virtual String
GetCntnt(BOOL bName
= FALSE
) const;
82 virtual String
Expand() const;
83 virtual SwField
* Copy() const;
86 virtual const String
& GetPar1() const;
87 virtual void SetPar1(const String
& rStr
);
90 virtual String
GetPar2() const;
91 virtual void SetPar2(const String
& rStr
);
93 // das ist das akt. Zeichenformat
94 SwCharFmt
* GetCharFmt();
95 const SwCharFmt
* GetCharFmt() const
96 { return ((SwINetField
*)this)->GetCharFmt(); }
98 const String
& GetTargetFrameName() const { return sTargetFrameName
; }
99 void SetTargetFrameName( const String
& rNm
) { sTargetFrameName
= rNm
; }
101 // setze eine neue oder loesche die akt. MakroTabelle
102 void SetMacroTbl( const SvxMacroTableDtor
* pTbl
= 0 );
103 const SvxMacroTableDtor
* GetMacroTbl() const { return pMacroTbl
; }
105 // setze / erfrage ein Makro
106 void SetMacro( USHORT nEvent
, const SvxMacro
& rMacro
);
107 const SvxMacro
* GetMacro( USHORT nEvent
) const;
111 #endif // _INETFLD_HXX