Author: gert-guest Date: 2015-11-09 21:20:53 +0000 (Mon, 09 Nov 2015) New Revision: 20460
Modified: trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp.patch trunk/packages/dicomscope/trunk/debian/patches/dicom_2009.patch trunk/packages/dicomscope/trunk/debian/patches/series Log: Update DSRDocument.cpp to use new interface Modified: trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp.patch =================================================================== --- trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp.patch 2015-11-09 21:03:36 UTC (rev 20459) +++ trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp.patch 2015-11-09 21:20:53 UTC (rev 20460) @@ -1,11 +1,5 @@ -Description: This is undefined in the source (fix compilation) -Author: Mathieu Malaterre <ma...@debian.org> -Forwarded: not-needed - -Index: dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp -=================================================================== ---- dicomscope-3.6.0.orig/interface/libsrc/DSRDocument.cpp 2011-06-15 01:16:09.000000000 +0200 -+++ dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp 2011-06-15 01:17:52.000000000 +0200 +--- dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp 2015-11-03 12:18:18.000000000 +0100 ++++ dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp 2015-11-09 22:18:02.614361290 +0100 @@ -106,7 +106,7 @@ /* create local string stream */ @@ -15,3 +9,294 @@ OFSTRINGSTREAM_GETSTR(oss, tmpString) if (res == EC_Normal) +@@ -195,6 +195,13 @@ + } + + ++#define GET_STRING_PROPERTY(getPropertyFunction) \ ++ OFString value; \ ++ OFCondition res = doc->getPropertyFunction(value, 0); \ ++ if (res.bad()) return NULL; \ ++ const char *string = value.c_str() ++ ++ + /* + * Class: J2Ci_jDSRDocument + * Method: getCompletionFlagDescription +@@ -205,7 +212,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getCompletionFlagDescription(); ++ GET_STRING_PROPERTY(getCompletionFlagDescription); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -323,7 +330,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getModality(); ++ GET_STRING_PROPERTY(getModality); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -340,8 +347,8 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSOPClassUID(); +- ++ GET_STRING_PROPERTY(getSOPClassUID); ++ + if (string == NULL) return NULL; + return env->NewStringUTF (string); + } +@@ -357,7 +364,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getStudyInstanceUID(); ++ GET_STRING_PROPERTY(getStudyInstanceUID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -374,7 +381,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSeriesInstanceUID(); ++ GET_STRING_PROPERTY(getSeriesInstanceUID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -391,7 +398,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSOPInstanceUID(); ++ GET_STRING_PROPERTY(getSOPInstanceUID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -408,7 +415,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getInstanceCreatorUID(); ++ GET_STRING_PROPERTY(getInstanceCreatorUID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -425,7 +432,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSpecificCharacterSet(); ++ GET_STRING_PROPERTY(getSpecificCharacterSet); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -442,7 +449,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getPatientsName(); ++ GET_STRING_PROPERTY(getPatientName); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -459,7 +466,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getPatientsBirthDate(); ++ GET_STRING_PROPERTY(getPatientBirthDate); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -476,7 +483,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getPatientsSex(); ++ GET_STRING_PROPERTY(getPatientSex); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -493,7 +500,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getReferringPhysiciansName(); ++ GET_STRING_PROPERTY(getReferringPhysicianName); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -510,7 +517,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getStudyDescription(); ++ GET_STRING_PROPERTY(getStudyDescription); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -527,7 +534,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSeriesDescription(); ++ GET_STRING_PROPERTY(getSeriesDescription); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -544,7 +551,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getManufacturer(); ++ GET_STRING_PROPERTY(getManufacturer); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -561,7 +568,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getStudyDate(); ++ GET_STRING_PROPERTY(getStudyDate); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -578,7 +585,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getStudyTime(); ++ GET_STRING_PROPERTY(getStudyTime); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -595,7 +602,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getInstanceCreationDate(); ++ GET_STRING_PROPERTY(getInstanceCreationDate); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -612,7 +619,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getInstanceCreationTime(); ++ GET_STRING_PROPERTY(getInstanceCreationTime); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -629,7 +636,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getContentDate(); ++ GET_STRING_PROPERTY(getContentDate); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -646,7 +653,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getContentTime(); ++ GET_STRING_PROPERTY(getContentTime); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -663,7 +670,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getStudyID(); ++ GET_STRING_PROPERTY(getStudyID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -680,7 +687,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getPatientID(); ++ GET_STRING_PROPERTY(getPatientID); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -697,7 +704,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getSeriesNumber(); ++ GET_STRING_PROPERTY(getSeriesNumber); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -714,7 +721,7 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getInstanceNumber(); ++ GET_STRING_PROPERTY(getInstanceNumber); + + if (string == NULL) return NULL; + return env->NewStringUTF (string); +@@ -731,8 +738,11 @@ + { + DSRDocument *doc = getAddressOfDSRDocument (env, obj); + +- const char *string = doc->getAccessionNumber(); +- ++ OFString ofstring; ++ OFCondition res = doc->getAccessionNumber(ofstring, 0); ++ if (res.bad()) return NULL; ++ ++ const char *string = ofstring.c_str(); + if (string == NULL) return NULL; + return env->NewStringUTF (string); + } +@@ -812,7 +822,7 @@ + { + jbyte *string = env->GetByteArrayElements(array, 0); + +- res = doc->setPatientsName(OFString((char *)string, env->GetArrayLength(array))); ++ res = doc->setPatientName(OFString((char *)string, env->GetArrayLength(array))); + + env->ReleaseByteArrayElements(array, string, 0); + } +@@ -834,7 +844,7 @@ + + char *str = (value) ? (char *) env->GetStringUTFChars (value, 0) : NULL; + +- OFCondition res = doc->setPatientsBirthDate(str); ++ OFCondition res = doc->setPatientBirthDate(str); + + env->ReleaseStringUTFChars (value, str); + +@@ -854,7 +864,7 @@ + + char *str = (value) ? (char *) env->GetStringUTFChars (value, 0) : NULL; + +- OFCondition res = doc->setPatientsSex(str); ++ OFCondition res = doc->setPatientSex(str); + + env->ReleaseStringUTFChars (value, str); + +@@ -884,7 +894,7 @@ + { + jbyte *string = env->GetByteArrayElements(array, 0); + +- res = doc->setReferringPhysiciansName(OFString((char *)string, env->GetArrayLength(array))); ++ res = doc->setReferringPhysicianName(OFString((char *)string, env->GetArrayLength(array))); + + env->ReleaseByteArrayElements(array, string, 0); + } Modified: trunk/packages/dicomscope/trunk/debian/patches/dicom_2009.patch =================================================================== --- trunk/packages/dicomscope/trunk/debian/patches/dicom_2009.patch 2015-11-09 21:03:36 UTC (rev 20459) +++ trunk/packages/dicomscope/trunk/debian/patches/dicom_2009.patch 2015-11-09 21:20:53 UTC (rev 20460) @@ -5,44 +5,6 @@ Index: dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp =================================================================== ---- dicomscope-3.6.0.orig/interface/libsrc/DSRDocument.cpp 2011-06-15 01:17:52.000000000 +0200 -+++ dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp 2011-06-15 01:17:54.000000000 +0200 -@@ -442,7 +442,7 @@ - { - DSRDocument *doc = getAddressOfDSRDocument (env, obj); - -- const char *string = doc->getPatientsName(); -+ const char *string = doc->getPatientName(); - - if (string == NULL) return NULL; - return env->NewStringUTF (string); -@@ -459,7 +459,7 @@ - { - DSRDocument *doc = getAddressOfDSRDocument (env, obj); - -- const char *string = doc->getPatientsBirthDate(); -+ const char *string = doc->getPatientBirthDate(); - - if (string == NULL) return NULL; - return env->NewStringUTF (string); -@@ -476,7 +476,7 @@ - { - DSRDocument *doc = getAddressOfDSRDocument (env, obj); - -- const char *string = doc->getPatientsSex(); -+ const char *string = doc->getPatientSex(); - - if (string == NULL) return NULL; - return env->NewStringUTF (string); -@@ -493,7 +493,7 @@ - { - DSRDocument *doc = getAddressOfDSRDocument (env, obj); - -- const char *string = doc->getReferringPhysiciansName(); -+ const char *string = doc->getReferringPhysicianName(); - - if (string == NULL) return NULL; - return env->NewStringUTF (string); @@ -812,7 +812,7 @@ { jbyte *string = env->GetByteArrayElements(array, 0); Modified: trunk/packages/dicomscope/trunk/debian/patches/series =================================================================== --- trunk/packages/dicomscope/trunk/debian/patches/series 2015-11-09 21:03:36 UTC (rev 20459) +++ trunk/packages/dicomscope/trunk/debian/patches/series 2015-11-09 21:20:53 UTC (rev 20460) @@ -3,7 +3,7 @@ dicomscope.cfg.patch maincontext.java.patch DSRDocument.cpp.patch -dicom_2009.patch +#dicom_2009.patch log4cplus.patch cmakelists.txt.patch -DSRDocument.cpp-dicom361.patch +#DSRDocument.cpp-dicom361.patch _______________________________________________ debian-med-commit mailing list debian-med-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit