summaryrefslogtreecommitdiff
authorTor Lillqvist <tml@iki.fi>2012-08-01 06:36:28 (GMT)
committer Tor Lillqvist <tml@iki.fi>2012-08-01 06:36:36 (GMT)
commitc7c23677421d1f75d5566bbb8e76c12de6f75028 (patch) (side-by-side diff)
treeb7e8c3bd9852d3b2aefe9e7ad3eef26eb3b0d9f7
parent71573ba4edd5413836f0e20e969fccd68bf4da96 (diff)
downloadcore-c7c23677421d1f75d5566bbb8e76c12de6f75028.zip
core-c7c23677421d1f75d5566bbb8e76c12de6f75028.tar.gz
Add own declaration for the since long deprecated KillPicture()
Still present in the framework in 10.8, so this code will continue to link and work, one hopes... But this really is a sad "solution". Change-Id: I2571185f412e7252887bab3e0ae02c72cd756677
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.cxx26
1 files changed, 15 insertions, 11 deletions
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 196ec2e..f6016e2 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -81,6 +81,21 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
return result;
}
+#if MACOSX_SDK_VERSION >= 1070
+
+// This whole thing needs to be rewritten I guess. Or does this code
+// even get invoked on current OSes? Given that KillPicture() was
+// deprecated already in 10.4, back when somebody was actually working
+// on this code, hopefully knowing what he/she was doing, did he/she
+// really not pay attention and notice that this stuff is going to go
+// away?
+
+extern "C" {
+extern void KillPicture(PicHandle myPicture);
+}
+
+#endif
+
bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict)
{
@@ -118,22 +133,11 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
rtl_copyMemory(aPict.getArray(), ((sal_Int8*)*hPict), sz);
HUnlock((Handle)hPict);
-#if MACOSX_SDK_VERSION < 1070
// Release the data associated with the picture
// Note: This function is deprecated in Mac OS X
// 10.4.
- // How nice. This whole thing needs to be rewritten I guess. Or
- // does this code even get invoked on current OSes? Given that
- // KillPicture() was deprecated already in 10.4, back when
- // somebody was actually working on this code, hopefulluy
- // knowing what he/she was doing, was it really not known that
- // the stuff used here is going to go away?
-
KillPicture(hPict);
-#else
- SAL_WARN("vcl", "Here we used to call the deprecated KillPicture(), no idea what to do, so leaking...");
-#endif
result = true;
}