diff options
Diffstat (limited to 'vcl/inc/vcl/gfxlink.hxx')
-rw-r--r-- | vcl/inc/vcl/gfxlink.hxx | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/vcl/inc/vcl/gfxlink.hxx b/vcl/inc/vcl/gfxlink.hxx index 5f1b593ba44a..29b6461b8f5a 100644 --- a/vcl/inc/vcl/gfxlink.hxx +++ b/vcl/inc/vcl/gfxlink.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,8 +40,8 @@ struct ImpBuffer { - ULONG mnRefCount; - BYTE* mpBuffer; + ULONG mnRefCount; + BYTE* mpBuffer; ImpBuffer( ULONG nSize ) { @@ -60,18 +60,18 @@ struct ImpBuffer struct ImpSwap { - rtl::OUString maURL; - ULONG mnDataSize; - ULONG mnRefCount; + rtl::OUString maURL; + ULONG mnDataSize; + ULONG mnRefCount; ImpSwap( BYTE* pData, ULONG nDataSize ); ~ImpSwap(); - BYTE* GetData() const; + BYTE* GetData() const; - BOOL IsSwapped() const { return maURL.getLength() > 0; } + BOOL IsSwapped() const { return maURL.getLength() > 0; } - void WriteTo( SvStream& rOStm ) const; + void WriteTo( SvStream& rOStm ) const; }; // -------------- @@ -82,14 +82,14 @@ struct ImpGfxLink { MapMode maPrefMapMode; Size maPrefSize; - bool mbPrefMapModeValid; - bool mbPrefSizeValid; + bool mbPrefMapModeValid; + bool mbPrefSizeValid; - ImpGfxLink() : + ImpGfxLink() : maPrefMapMode(), maPrefSize(), - mbPrefMapModeValid( false ), - mbPrefSizeValid( false ) + mbPrefMapModeValid( false ), + mbPrefSizeValid( false ) {} }; @@ -101,20 +101,20 @@ struct ImpGfxLink enum GfxLinkType { - GFX_LINK_TYPE_NONE = 0, - GFX_LINK_TYPE_EPS_BUFFER = 1, - GFX_LINK_TYPE_NATIVE_GIF = 2, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_JPG = 3, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_PNG = 4, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_TIF = 5, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines - GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines - GFX_LINK_TYPE_USER = 0xffff + GFX_LINK_TYPE_NONE = 0, + GFX_LINK_TYPE_EPS_BUFFER = 1, + GFX_LINK_TYPE_NATIVE_GIF = 2, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_JPG = 3, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_PNG = 4, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_TIF = 5, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines + GFX_LINK_TYPE_USER = 0xffff }; -#define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF -#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT +#define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF +#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT // ----------- // - GfxLink - @@ -129,58 +129,58 @@ class VCL_DLLPUBLIC GfxLink { private: - GfxLinkType meType; - ImpBuffer* mpBuf; - ImpSwap* mpSwap; - sal_uInt32 mnBufSize; - sal_uInt32 mnUserId; + GfxLinkType meType; + ImpBuffer* mpBuf; + ImpSwap* mpSwap; + sal_uInt32 mnBufSize; + sal_uInt32 mnUserId; ImpGfxLink* mpImpData; - ULONG mnExtra2; + ULONG mnExtra2; - SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink ); + SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink ); -public: +public: GfxLink(); GfxLink( const GfxLink& ); GfxLink( const String& rPath, GfxLinkType nType ); GfxLink( BYTE* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, BOOL bOwns ); ~GfxLink(); - GfxLink& operator=( const GfxLink& ); - sal_Bool IsEqual( const GfxLink& ) const; + GfxLink& operator=( const GfxLink& ); + sal_Bool IsEqual( const GfxLink& ) const; - GfxLinkType GetType() const; + GfxLinkType GetType() const; - void SetUserId( sal_uInt32 nUserId ) { mnUserId = nUserId; } - sal_uInt32 GetUserId() const { return mnUserId; } + void SetUserId( sal_uInt32 nUserId ) { mnUserId = nUserId; } + sal_uInt32 GetUserId() const { return mnUserId; } - sal_uInt32 GetDataSize() const; - void SetData( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns ); - const BYTE* GetData() const; + sal_uInt32 GetDataSize() const; + void SetData( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns ); + const BYTE* GetData() const; - const Size& GetPrefSize() const; - void SetPrefSize( const Size& rPrefSize ); - bool IsPrefSizeValid(); + const Size& GetPrefSize() const; + void SetPrefSize( const Size& rPrefSize ); + bool IsPrefSizeValid(); - const MapMode& GetPrefMapMode() const; - void SetPrefMapMode( const MapMode& rPrefMapMode ); - bool IsPrefMapModeValid(); + const MapMode& GetPrefMapMode() const; + void SetPrefMapMode( const MapMode& rPrefMapMode ); + bool IsPrefMapModeValid(); - BOOL IsNative() const; - BOOL IsUser() const { return( GFX_LINK_TYPE_USER == meType ); } + BOOL IsNative() const; + BOOL IsUser() const { return( GFX_LINK_TYPE_USER == meType ); } - BOOL LoadNative( Graphic& rGraphic ); + BOOL LoadNative( Graphic& rGraphic ); - BOOL ExportNative( SvStream& rOStream ) const; + BOOL ExportNative( SvStream& rOStream ) const; - void SwapOut(); - void SwapIn(); - BOOL IsSwappedOut() const { return( mpSwap != NULL ); } + void SwapOut(); + void SwapIn(); + BOOL IsSwappedOut() const { return( mpSwap != NULL ); } public: - friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink ); - friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink ); + friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink ); + friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink ); }; #endif |