merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / inetfld.hxx
blob2bb3c6f9c880295a693f5b1ce37546f00c98643f
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 ************************************************************************/
27 #ifndef _INETFLD_HXX
28 #define _INETFLD_HXX
31 #include "fldbas.hxx"
33 class SvxMacro;
34 class SvxMacroTableDtor;
35 class SwINetField;
36 class SwCharFmt;
37 class SwDoc;
39 /*--------------------------------------------------------------------
40 Beschreibung: InterNet-FieldType -> Lade Document mit der URL
41 --------------------------------------------------------------------*/
43 class SwINetFieldType : public SwFieldType
45 SwDepend aNormalFmt;
46 SwDepend aVisitFmt;
47 SwDoc* pDoc;
49 public:
50 SwINetFieldType( SwDoc* pDoc );
52 virtual SwFieldType* Copy() const;
54 SwCharFmt* GetCharFmt( const SwINetField& rFld );
56 SwDoc* GetDoc() const { return pDoc; }
59 /*--------------------------------------------------------------------
60 Beschreibung: InterNet-Field -> Lade Document mit der URL
61 --------------------------------------------------------------------*/
63 class SwINetField : public SwField
65 friend class SwINetFieldType;
67 String sTargetFrameName; // in diesen Frame soll die URL
68 String sURL;
69 String sText;
70 SvxMacroTableDtor* pMacroTbl;
72 public:
73 // Direkte Eingabe alten Wert loeschen
74 SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
75 const String& rURL, const String& rText );
76 virtual ~SwINetField();
78 virtual String GetCntnt(BOOL bName = FALSE) const;
79 virtual String Expand() const;
80 virtual SwField* Copy() const;
82 // URL
83 virtual const String& GetPar1() const;
84 virtual void SetPar1(const String& rStr);
86 // HinweisText
87 virtual String GetPar2() const;
88 virtual void SetPar2(const String& rStr);
90 // das ist das akt. Zeichenformat
91 SwCharFmt* GetCharFmt();
92 const SwCharFmt* GetCharFmt() const
93 { return ((SwINetField*)this)->GetCharFmt(); }
95 const String& GetTargetFrameName() const { return sTargetFrameName; }
96 void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; }
98 // setze eine neue oder loesche die akt. MakroTabelle
99 void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
100 const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
102 // setze / erfrage ein Makro
103 void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
104 const SvxMacro* GetMacro( USHORT nEvent ) const;
108 #endif // _INETFLD_HXX