1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _FMTURL_HXX 24 #define _FMTURL_HXX 25 26 #include <svl/poolitem.hxx> 27 #include "swdllapi.h" 28 #include <hintids.hxx> 29 #include <format.hxx> 30 31 class ImageMap; 32 class IntlWrapper; 33 34 // URL, ServerMap und ClientMap 35 36 class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem 37 { 38 String sTargetFrameName; // in diesen Frame soll die URL 39 String sURL; //Einfache URL 40 String sName; // Name des Anchors 41 ImageMap *pMap; //ClientSide Images 42 43 sal_Bool bIsServerMap; //mit der URL eine ServerSideImageMap 44 45 SwFmtURL& operator=( const SwFmtURL& ); 46 47 public: 48 SwFmtURL(); 49 50 // @@@ copy construction allowed, but assigment is not? @@@ 51 SwFmtURL( const SwFmtURL& ); 52 53 virtual ~SwFmtURL(); 54 55 // "pure virtual Methoden" vom SfxPoolItem 56 virtual int operator==( const SfxPoolItem& ) const; 57 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; 58 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 59 SfxMapUnit eCoreMetric, 60 SfxMapUnit ePresMetric, 61 String &rText, 62 const IntlWrapper* pIntl = 0 ) const; 63 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 64 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 65 66 void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; } 67 void SetURL( const String &rURL, sal_Bool bServerMap ); 68 void SetMap( const ImageMap *pM ); //Pointer wird kopiert! 69 70 const String &GetTargetFrameName()const { return sTargetFrameName; } 71 const String &GetURL() const { return sURL; } 72 sal_Bool IsServerMap() const { return bIsServerMap; } 73 const ImageMap *GetMap() const { return pMap; } 74 ImageMap *GetMap() { return pMap; } 75 76 const String& GetName() const { return sName; } 77 void SetName( const String& rNm ) { sName = rNm; } 78 }; 79 80 81 inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const 82 { return (const SwFmtURL&)Get( RES_URL,bInP); } 83 84 inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const 85 { return aSet.GetURL(bInP); } 86 87 #endif 88 89