diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-12 14:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-18 14:23:50 +0200 |
commit | fb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch) | |
tree | beaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /svtools/source/urlobj/inetimg.cxx | |
parent | convert AccessibleStates to enum class (diff) | |
download | core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.tar.gz core-fb14be5f8f74f83ba89e15f891ddf1f753dcc62f.zip |
create new 'enum class' SotClipboardFormatId to unify types
of which there are several.
There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
numeric values to the underlying code, but perhaps further fixing is necessary?
Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'svtools/source/urlobj/inetimg.cxx')
-rw-r--r-- | svtools/source/urlobj/inetimg.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 0ed6198e5e60..51ef978ee0bb 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -25,12 +25,12 @@ static const sal_Unicode TOKEN_SEPARATOR = '\001'; -bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const +bool INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const { bool bRet = false; switch( nFormat ) { - case SOT_FORMATSTR_ID_INET_IMAGE: + case SotClipboardFormatId::INET_IMAGE: { OUString sString; (sString += aImageURL ) += OUString(TOKEN_SEPARATOR); @@ -51,18 +51,19 @@ bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const } break; - case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: + case SotClipboardFormatId::NETSCAPE_IMAGE: break; + default: break; } return bRet; } -bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) +bool INetImage::Read( SvStream& rIStm, SotClipboardFormatId nFormat ) { bool bRet = false; switch( nFormat ) { - case SOT_FORMATSTR_ID_INET_IMAGE: + case SotClipboardFormatId::INET_IMAGE: { OUString sINetImg = read_zeroTerminated_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_UTF8); sal_Int32 nStart = 0; @@ -78,7 +79,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) } break; - case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: + case SotClipboardFormatId::NETSCAPE_IMAGE: { /* --> structure size MUST - alignment of 4! @@ -130,6 +131,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) bRet = 0 == rIStm.GetError(); } break; + default: break; } return bRet; } |