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: txtinet.hxx,v $
10 * $Revision: 1.7.214.1 $
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 ************************************************************************/
33 #include <txatbase.hxx>
39 // ATT_INETFMT *********************************************
41 class SW_DLLPUBLIC SwTxtINetFmt
: public SwTxtAttrEnd
, public SwClient
43 SwTxtNode
* m_pTxtNode
;
44 bool m_bVisited
: 1; // visited link?
45 bool m_bVisitedValid
: 1; // is m_bVisited valid?
47 // forbidden and not implemented.
51 SwTxtINetFmt( SwFmtINetFmt
& rAttr
, xub_StrLen nStart
, xub_StrLen nEnd
);
52 virtual ~SwTxtINetFmt();
55 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
56 virtual BOOL
GetInfo( SfxPoolItem
& rInfo
) const;
58 // get and set TxtNode pointer
59 const SwTxtNode
* GetpTxtNode() const { return m_pTxtNode
; }
60 inline const SwTxtNode
& GetTxtNode() const;
61 void ChgTxtNode( SwTxtNode
* pNew
) { m_pTxtNode
= pNew
; }
63 SwCharFmt
* GetCharFmt();
64 const SwCharFmt
* GetCharFmt() const
65 { return const_cast<SwTxtINetFmt
*>(this)->GetCharFmt(); }
67 bool IsVisited() const { return m_bVisited
; }
68 void SetVisited( bool bNew
) { m_bVisited
= bNew
; }
70 bool IsVisitedValid() const { return m_bVisitedValid
; }
71 void SetVisitedValid( bool bNew
) { m_bVisitedValid
= bNew
; }
73 BOOL
IsProtect() const;
76 inline const SwTxtNode
& SwTxtINetFmt::GetTxtNode() const
78 ASSERT( m_pTxtNode
, "SwTxtINetFmt: where is my TxtNode?" );