xref: /aoo4110/main/svtools/inc/svtools/inetimg.hxx (revision b1cdbd2c)
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 _INETIMG_HXX
24 #define _INETIMG_HXX
25 
26 #include <tools/string.hxx>
27 #include <tools/gen.hxx>
28 
29 class SvData;
30 class SotDataObject;
31 class SotDataMemberObject;
32 
33 //=========================================================================
34 
35 class INetImage
36 {
37 	String			aImageURL;
38 	String			aTargetURL;
39 	String			aTargetFrame;
40 	String			aAlternateText;
41 	Size			aSizePixel;
42 
43 protected:
44 	String			CopyExchange() const;
45 	void			PasteExchange( const String& rString );
46 
SetImageURL(const String & rS)47 	void 			SetImageURL( const String& rS )		{ aImageURL = rS; }
SetTargetURL(const String & rS)48 	void 			SetTargetURL( const String& rS )	{ aTargetURL = rS; }
SetTargetFrame(const String & rS)49 	void 			SetTargetFrame( const String& rS )	{ aTargetFrame = rS; }
SetAlternateText(const String & rS)50 	void 			SetAlternateText( const String& rS ){ aAlternateText = rS; }
SetSizePixel(const Size & rSize)51 	void			SetSizePixel( const Size& rSize ) 	{ aSizePixel = rSize; }
52 
53 public:
INetImage(const String & rImageURL,const String & rTargetURL,const String & rTargetFrame,const String & rAlternateText,const Size & rSizePixel)54 					INetImage(
55 						const String& rImageURL,
56 						const String& rTargetURL,
57 						const String& rTargetFrame,
58 						const String& rAlternateText,
59 						const Size& rSizePixel )
60 					:	aImageURL( rImageURL ),
61 						aTargetURL( rTargetURL ),
62 						aTargetFrame( rTargetFrame ),
63 						aAlternateText( rAlternateText ),
64 						aSizePixel( rSizePixel )
65 					{}
INetImage()66 					INetImage()
67 					{}
68 
GetImageURL() const69 	const String&	GetImageURL() const { return aImageURL; }
GetTargetURL() const70 	const String&	GetTargetURL() const { return aTargetURL; }
GetTargetFrame() const71 	const String&	GetTargetFrame() const { return aTargetFrame; }
GetAlternateText() const72 	const String&	GetAlternateText() const { return aAlternateText; }
GetSizePixel() const73 	const Size&		GetSizePixel() const { return aSizePixel; }
74 
75 	// Im-/Export
76 	sal_Bool Write( SvStream& rOStm, sal_uLong nFormat ) const;
77 	sal_Bool Read( SvStream& rIStm, sal_uLong nFormat );
78 };
79 
80 #endif // #ifndef _INETIMG_HXX
81 
82 
83