1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <tools/string.hxx>
23 #include <svl/poolitem.hxx>
27 class SvxMacroTableDtor
;
33 class SW_DLLPUBLIC SwFmtINetFmt
: public SfxPoolItem
35 friend class SwTxtINetFmt
;
37 String aURL
; ///< URL.
38 String aTargetFrame
; ///< Target frame for URL.
41 String aName
; ///< Name of the link.
42 SvxMacroTableDtor
* pMacroTbl
;
43 SwTxtINetFmt
* pTxtAttr
; ///< My TextAttribute.
45 sal_uInt16 nVisitedId
;
47 SwFmtINetFmt( const String
& rURL
, const String
& rTarget
);
48 SwFmtINetFmt( const SwFmtINetFmt
& rAttr
);
49 SwFmtINetFmt(); ///< For TypeInfo.
50 virtual ~SwFmtINetFmt();
54 /// "Pure virtual methods" of SfxPoolItem.
55 virtual int operator==( const SfxPoolItem
& ) const;
56 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
57 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
58 SfxMapUnit eCoreMetric
,
59 SfxMapUnit ePresMetric
,
61 const IntlWrapper
* pIntl
= 0 ) const;
63 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
,
64 sal_uInt8 nMemberId
= 0 ) const;
65 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
,
66 sal_uInt8 nMemberId
= 0 );
69 const SwTxtINetFmt
* GetTxtINetFmt() const { return pTxtAttr
; }
70 SwTxtINetFmt
* GetTxtINetFmt() { return pTxtAttr
; }
72 const String
& GetValue() const { return aURL
; }
74 const String
& GetName() const { return aName
; }
75 void SetName( const String
& rNm
) { aName
= rNm
; }
77 const String
& GetTargetFrame() const { return aTargetFrame
; }
79 const String
& GetINetFmt() const { return aINetFmt
; }
80 void SetINetFmt( const String
& rNm
) { aINetFmt
= rNm
; }
82 const String
& GetVisitedFmt() const { return aVisitedFmt
; }
83 void SetVisitedFmt( const String
& rNm
) { aVisitedFmt
= rNm
; }
85 sal_uInt16
GetINetFmtId() const { return nINetId
; }
86 void SetINetFmtId( sal_uInt16 nNew
) { nINetId
= nNew
; }
88 sal_uInt16
GetVisitedFmtId() const { return nVisitedId
; }
89 void SetVisitedFmtId( sal_uInt16 nNew
) { nVisitedId
= nNew
; }
91 /// Set a new MacroTable or clear the current one.
92 void SetMacroTbl( const SvxMacroTableDtor
* pTbl
= 0 );
93 const SvxMacroTableDtor
* GetMacroTbl() const { return pMacroTbl
; }
95 /// Macro getter and setter.
96 void SetMacro( sal_uInt16 nEvent
, const SvxMacro
& rMacro
);
97 const SvxMacro
* GetMacro( sal_uInt16 nEvent
) const;
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */