summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/dtrans/PictToBmpFlt.cxx')
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 7a9b2963ddb1..07da1fe77f99 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,14 +29,14 @@
*
************************************************************************/
-/* This is a work-around to prevent 'deprecated' warning for 'KillPicture' API
+/* This is a work-around to prevent 'deprecated' warning for 'KillPicture' API
Hopefully we can get rid of this whole code again when the OOo PICT filter
are good enough to be used see #i78953 thus this hack would vanish to again.
*/
#include <premac.h>
#include <AvailabilityMacros.h>
#undef DEPRECATED_ATTRIBUTE
-#define DEPRECATED_ATTRIBUTE
+#define DEPRECATED_ATTRIBUTE
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
@@ -44,10 +44,10 @@
#include "PictToBmpFlt.hxx"
-bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp)
{
-
+
bool result = false;
ComponentInstance bmpExporter;
@@ -65,7 +65,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
}
Handle hBmp;
- if ((GraphicsExportSetInputPicture(bmpExporter, (PicHandle)hPict) != noErr) ||
+ if ((GraphicsExportSetInputPicture(bmpExporter, (PicHandle)hPict) != noErr) ||
((hBmp = NewHandleClear(0)) == NULL))
{
CloseComponent(bmpExporter);
@@ -84,7 +84,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
HUnlock(hBmp);
result = true;
- }
+ }
DisposeHandle(hPict);
DisposeHandle(hBmp);
@@ -93,14 +93,14 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
return result;
}
-bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict)
{
bool result = false;
Handle hBmp;
ComponentInstance pictExporter;
- if ((PtrToHand(aBmp.getArray(), &hBmp, aBmp.getLength()) != noErr))
+ if ((PtrToHand(aBmp.getArray(), &hBmp, aBmp.getLength()) != noErr))
{
return result;
}
@@ -112,7 +112,7 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
DisposeHandle(hBmp);
return result;
}
-
+
if (GraphicsImportSetDataHandle(pictExporter, hBmp) != noErr)
{
DisposeHandle(hBmp);
@@ -131,28 +131,28 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
HUnlock((Handle)hPict);
// Release the data associated with the picture
- // Note: This function is deprecated in Mac OS X
+ // Note: This function is deprecated in Mac OS X
// 10.4.
- KillPicture(hPict);
+ KillPicture(hPict);
result = true;
}
-
+
DisposeHandle(hBmp);
CloseComponent(pictExporter);
-
+
return result;
}
-bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
+bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp,
NSBitmapImageFileType eInFormat)
{
if( eInFormat == PICTImageFileType )
return PICTtoBMP( aPict, aBmp );
-
+
bool bResult = false;
-
+
NSData* pData = [NSData dataWithBytesNoCopy: (void*)aPict.getConstArray() length: aPict.getLength() freeWhenDone: 0];
if( pData )
{
@@ -168,20 +168,20 @@ bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
}
}
}
-
+
return bResult;
}
-bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict,
NSBitmapImageFileType eOutFormat
)
{
if( eOutFormat == PICTImageFileType )
return BMPtoPICT( aBmp, aPict );
-
+
bool bResult = false;
-
+
NSData* pData = [NSData dataWithBytesNoCopy: const_cast<sal_Int8*>(aBmp.getConstArray()) length: aBmp.getLength() freeWhenDone: 0];
if( pData )
{
@@ -197,7 +197,7 @@ bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
}
}
}
-
+
return bResult;
}