Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sw / fmturl.hxx
blob2b37b8553bd98ed25171d512683aee876a571618
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.7 $
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
34 #ifndef _FORMAT_HXX //autogen
35 #include <format.hxx>
36 #endif
37 class IntlWrapper;
39 namespace binfilter {
40 class ImageMap;
43 // URL, ServerMap und ClientMap
45 class SwFmtURL: public SfxPoolItem
47 String sTargetFrameName; // in diesen Frame soll die URL
48 String sURL; //Einfache URL
49 String sName; // Name des Anchors
50 ImageMap *pMap; //ClientSide Images
52 BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
54 SwFmtURL& operator=( const SwFmtURL& );
56 public:
57 SwFmtURL();
58 SwFmtURL( const SwFmtURL& );
59 ~SwFmtURL();
61 // "pure virtual Methoden" vom SfxPoolItem
62 virtual int operator==( const SfxPoolItem& ) const;
63 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
64 virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const;
65 virtual SvStream& Store(SvStream &, USHORT nIVer) const;
66 virtual USHORT GetVersion( USHORT nFFVer ) const;
67 virtual BOOL QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
68 virtual BOOL PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
70 void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
71 void SetURL( const String &rURL, BOOL bServerMap );
72 void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
74 const String &GetTargetFrameName()const { return sTargetFrameName; }
75 const String &GetURL() const { return sURL; }
76 BOOL IsServerMap() const { return bIsServerMap; }
77 const ImageMap *GetMap() const { return pMap; }
78 ImageMap *GetMap() { return pMap; }
80 const String& GetName() const { return sName; }
81 void SetName( const String& rNm ) { sName = rNm; }
85 #if ! (defined(MACOSX) && ( __GNUC__ < 3 ))
86 // GrP moved to gcc_outl.cxx; revisit with gcc3
87 inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
88 { return (const SwFmtURL&)Get( RES_URL,bInP); }
90 inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
91 { return aSet.GetURL(bInP); }
92 #endif
94 } //namespace binfilter
95 #endif