summaryrefslogtreecommitdiffstats
path: root/sfx2/source/appl/fileobj.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-12 14:53:28 +0200
committerNoel Grandin <noel@peralex.com>2015-03-18 14:23:50 +0200
commitfb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch)
treebeaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /sfx2/source/appl/fileobj.cxx
parentconvert AccessibleStates to enum class (diff)
downloadcore-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 'sfx2/source/appl/fileobj.cxx')
-rw-r--r--sfx2/source/appl/fileobj.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index db30c8354584..a1c1d989722a 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -76,11 +76,11 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
const OUString & rMimeType,
bool bGetSynchron )
{
- sal_uIntPtr nFmt = SotExchange::RegisterFormatMimeType( rMimeType );
+ SotClipboardFormatId nFmt = SotExchange::RegisterFormatMimeType( rMimeType );
switch( nType )
{
case FILETYPE_TEXT:
- if( FORMAT_FILE == nFmt )
+ if( SotClipboardFormatId::FILE == nFmt )
{
// The media in the application must be opened to lookup the
// relative file links!! This is done through the link manager
@@ -94,8 +94,8 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
{
SfxMediumRef xTmpMed;
- if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
- SOT_FORMATSTR_ID_SVXB == nFmt )
+ if( SotClipboardFormatId::GDIMETAFILE == nFmt || SotClipboardFormatId::BITMAP == nFmt ||
+ SotClipboardFormatId::SVXB == nFmt )
{
Graphic aGrf;
@@ -138,15 +138,15 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
aGrf.SetDefaultType();
}
- if( SOT_FORMATSTR_ID_SVXB != nFmt )
+ if( SotClipboardFormatId::SVXB != nFmt )
nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
- ? FORMAT_BITMAP
- : FORMAT_GDIMETAFILE;
+ ? SotClipboardFormatId::BITMAP
+ : SotClipboardFormatId::GDIMETAFILE;
SvMemoryStream aMemStm( 0, 65535 );
switch ( nFmt )
{
- case SOT_FORMATSTR_ID_SVXB:
+ case SotClipboardFormatId::SVXB:
if( GRAPHIC_NONE != aGrf.GetType() )
{
aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
@@ -154,7 +154,7 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
}
break;
- case FORMAT_BITMAP:
+ case SotClipboardFormatId::BITMAP:
{
const Bitmap aBitmap(aGrf.GetBitmap());