merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / fmturl.hxx
blobf2744ebf66af3e89fa7befd50f3da7cb27684818
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmturl.hxx,v $
10 * $Revision: 1.9 $
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 ************************************************************************/
30 #ifndef _FMTURL_HXX
31 #define _FMTURL_HXX
33 #include <svtools/poolitem.hxx>
34 #include "swdllapi.h"
35 #include <hintids.hxx>
36 #include <format.hxx>
38 class ImageMap;
39 class IntlWrapper;
41 // URL, ServerMap und ClientMap
43 class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
45 String sTargetFrameName; // in diesen Frame soll die URL
46 String sURL; //Einfache URL
47 String sName; // Name des Anchors
48 ImageMap *pMap; //ClientSide Images
50 BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
52 SwFmtURL& operator=( const SwFmtURL& );
54 public:
55 SwFmtURL();
57 // @@@ copy construction allowed, but assigment is not? @@@
58 SwFmtURL( const SwFmtURL& );
60 virtual ~SwFmtURL();
62 // "pure virtual Methoden" vom SfxPoolItem
63 virtual int operator==( const SfxPoolItem& ) const;
64 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
65 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
66 SfxMapUnit eCoreMetric,
67 SfxMapUnit ePresMetric,
68 String &rText,
69 const IntlWrapper* pIntl = 0 ) const;
70 virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
71 virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
73 void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
74 void SetURL( const String &rURL, BOOL bServerMap );
75 void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
77 const String &GetTargetFrameName()const { return sTargetFrameName; }
78 const String &GetURL() const { return sURL; }
79 BOOL IsServerMap() const { return bIsServerMap; }
80 const ImageMap *GetMap() const { return pMap; }
81 ImageMap *GetMap() { return pMap; }
83 const String& GetName() const { return sName; }
84 void SetName( const String& rNm ) { sName = rNm; }
88 inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
89 { return (const SwFmtURL&)Get( RES_URL,bInP); }
91 inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
92 { return aSet.GetURL(bInP); }
94 #endif