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 <svl/poolitem.hxx>
24 #include <hintids.hxx>
30 // URL, ServerMap und ClientMap
32 class SW_DLLPUBLIC SwFmtURL
: public SfxPoolItem
34 String sTargetFrameName
; ///< Target frame for URL.
35 String sURL
; ///< Simple URL.
36 String sName
; ///< Name of the anchor.
37 ImageMap
*pMap
; ///< ClientSide images.
39 sal_Bool bIsServerMap
; ///< A ServerSideImageMap with the URL.
41 SwFmtURL
& operator=( const SwFmtURL
& );
46 /// @@@ copy construction allowed, but assigment is not? @@@
47 SwFmtURL( const SwFmtURL
& );
51 /// "Pure virtual methods" of SfxPoolItem.
52 virtual int operator==( const SfxPoolItem
& ) const;
53 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
54 virtual SfxItemPresentation
GetPresentation( SfxItemPresentation ePres
,
55 SfxMapUnit eCoreMetric
,
56 SfxMapUnit ePresMetric
,
58 const IntlWrapper
* pIntl
= 0 ) const;
59 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
60 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
62 void SetTargetFrameName( const String
& rStr
) { sTargetFrameName
= rStr
; }
63 void SetURL(const OUString
&rURL
, bool bServerMap
);
64 void SetMap( const ImageMap
*pM
); ///< Pointer will be copied.
66 const String
&GetTargetFrameName()const { return sTargetFrameName
; }
67 const String
&GetURL() const { return sURL
; }
68 sal_Bool
IsServerMap() const { return bIsServerMap
; }
69 const ImageMap
*GetMap() const { return pMap
; }
70 ImageMap
*GetMap() { return pMap
; }
72 const String
& GetName() const { return sName
; }
73 void SetName( const String
& rNm
) { sName
= rNm
; }
77 inline const SwFmtURL
&SwAttrSet::GetURL(sal_Bool bInP
) const
78 { return (const SwFmtURL
&)Get( RES_URL
,bInP
); }
80 inline const SwFmtURL
&SwFmt::GetURL(sal_Bool bInP
) const
81 { return aSet
.GetURL(bInP
); }
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */