[Igarden-commit] Garden/source/Reports PlantLabelReport.h, 1.4, 1.4.2.1 PlantLabelReport.cpp, 1.12,
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-15 04:00:02
|
Update of /cvsroot/igarden/Garden/source/Reports In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6380 Modified Files: Tag: Release_branch_v1 PlantLabelReport.h PlantLabelReport.cpp Log Message: Add PurchaseReport Index: PlantLabelReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/PlantLabelReport.cpp,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** PlantLabelReport.cpp 2 Feb 2006 01:20:59 -0000 1.12 --- PlantLabelReport.cpp 15 Nov 2006 03:59:56 -0000 1.12.2.1 *************** *** 144,148 **** plot = layout->GetCurrentPlot(); ! layout->GetUnusedLayer()->AddToMaterialRefArray(&_list, nilID); numLayers = plot->GetNumLayers(); --- 144,148 ---- plot = layout->GetCurrentPlot(); ! layout->GetUnusedLayer()->AddToPathELementArray(&_list, nilID); numLayers = plot->GetNumLayers(); *************** *** 150,154 **** { layer = plot->GetIndexedLayer(n); ! layer->AddToMaterialRefArray(&_list, nilID); } XGCommandButton *printBtn = dynamic_cast<XGCommandButton*>(dlog->FindViewByID(10001)); --- 150,154 ---- { layer = plot->GetIndexedLayer(n); ! layer->AddToPathELementArray(&_list, nilID); } XGCommandButton *printBtn = dynamic_cast<XGCommandButton*>(dlog->FindViewByID(10001)); *************** *** 282,301 **** for(n = 0; n < numRows && !allow; n++) { ! ref = _list[n]; ! mat = ref->GetMaterial(ifMissingNULL); ! if(mat != NULL) { ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! sow = instance->GetSowLocation(); ! else ! sow = kSowLocationUnspecified; ! ! ! if(((sow == kSowLocationIndoors) && _indoors) || ! ((sow == kSowLocationOutdoors) && _outdoors) || ! ((sow == kSowLocationColdFrame) && _coldFrame)) { ! allow = true; } } --- 282,304 ---- for(n = 0; n < numRows && !allow; n++) { ! ref = dynamic_cast<MaterialRef*>(_list[n]); ! if(ref != NULL) { ! mat = ref->GetMaterial(ifMissingNULL); ! if(mat != NULL) { ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! sow = instance->GetSowLocation(); ! else ! sow = kSowLocationUnspecified; ! ! ! if(((sow == kSowLocationIndoors) && _indoors) || ! ((sow == kSowLocationOutdoors) && _outdoors) || ! ((sow == kSowLocationColdFrame) && _coldFrame)) ! { ! allow = true; ! } } } *************** *** 344,445 **** for(n = 0; n < numRows; n++) { ! ref = _list[n]; ! mat = ref->GetMaterial(ifMissingNULL); ! if(mat != NULL) { ! name = mat->GetDisplayName(kUsePreferencesSetting); ! ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! sow = instance->GetSowLocation(); ! else ! sow = kSowLocationUnspecified; ! ! ! if((sow == kSowLocationIndoors && _indoors) || ! (sow == kSowLocationOutdoors && _outdoors) || ! (sow == kSowLocationColdFrame && _coldFrame)) { ! namePtr = name.c_str(); ! strcpy(seedBuf, "???"); ! if(mat->GetDate(kExpSeedStartDate, date)) ! { ! sprintf(seedBuf, "%d/%d", date.month(), date.day()); ! } else { ! instance = ref->LatestInstanceData(kActualSeedStartDate); ! if(instance != NULL) { ! if(instance->GetActualSeedStart(date)) { ! sprintf(seedBuf, "%d/%d", date.month(), date.day()); } } - } ! strcpy(plantBuf, "???"); ! if(mat->GetDate(kExpPlantOutDate, date)) ! { ! sprintf(plantBuf, "%d/%d", date.month(), date.day()); ! } ! else ! { ! instance = ref->LatestInstanceData(kActualPlantOutDate); ! if(instance != NULL) { ! if(instance->GetActualPlantOut(date)) { ! sprintf(plantBuf, "%d/%d", date.month(), date.day()); } } - } ! String objComments; ! ! comments = "(none)"; ! instance = ref->LatestInstanceData(kUserComments); ! if(instance != NULL) ! instance->GetUserComments(objComments); ! else ! objComments = L""; ! comments = objComments.c_str(); ! ! AttributeDictionary::GetAttributeValueStr(mat, kShadeTolerance, kMetricUnits, shadeObj); ! shadePtr = shadeObj.c_str(); ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! { ! String str; ! AttributeDictionary::GetIndexedEnumValue(kSowLocation, instance->GetSowLocation(), str); ! sowObj = str.c_str(); ! } ! else ! sowObj = L""; ! sowPtr = sowObj.c_str(); ! ! /*****/ ! ref->GetPlotID(plotID); ! numPlots = layout->NumPlots(); ! plotNameObj = L""; ! for(index = 0; index < numPlots; index++) ! { ! plot = layout->GetIndexedPlot(index); ! plot->getPlotID(testPlotID); ! if(plotID == testPlotID) { ! plot->GetName(plotNameObj); ! break; } - } - - FormatBuffer(output, format.vfmt, namePtr, seedBuf, shadePtr, comments, plantBuf, sowPtr, plotNameObj.c_str()); ! cell = new RGReportHypertextCell(this, _ht, cellSize, output); ! cell->SetUseBorder(format.hasBorder); ! _cells.push_back(cell); } } --- 347,451 ---- for(n = 0; n < numRows; n++) { ! ref = dynamic_cast<MaterialRef*>(_list[n]); ! if(ref != NULL) { ! mat = ref->GetMaterial(ifMissingNULL); ! if(mat != NULL) { ! name = mat->GetDisplayName(kUsePreferencesSetting); ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! sow = instance->GetSowLocation(); else + sow = kSowLocationUnspecified; + + + if((sow == kSowLocationIndoors && _indoors) || + (sow == kSowLocationOutdoors && _outdoors) || + (sow == kSowLocationColdFrame && _coldFrame)) { ! namePtr = name.c_str(); ! ! strcpy(seedBuf, "???"); ! if(mat->GetDate(kExpSeedStartDate, date)) { ! sprintf(seedBuf, "%d/%d", date.month(), date.day()); ! } ! else ! { ! instance = ref->LatestInstanceData(kActualSeedStartDate); ! if(instance != NULL) { ! if(instance->GetActualSeedStart(date)) ! { ! sprintf(seedBuf, "%d/%d", date.month(), date.day()); ! } } } ! strcpy(plantBuf, "???"); ! if(mat->GetDate(kExpPlantOutDate, date)) { ! sprintf(plantBuf, "%d/%d", date.month(), date.day()); ! } ! else ! { ! instance = ref->LatestInstanceData(kActualPlantOutDate); ! if(instance != NULL) { ! if(instance->GetActualPlantOut(date)) ! { ! sprintf(plantBuf, "%d/%d", date.month(), date.day()); ! } } } ! String objComments; ! ! comments = "(none)"; ! instance = ref->LatestInstanceData(kUserComments); ! if(instance != NULL) ! instance->GetUserComments(objComments); ! else ! objComments = L""; ! comments = objComments.c_str(); ! ! AttributeDictionary::GetAttributeValueStr(mat, kShadeTolerance, kMetricUnits, shadeObj); ! shadePtr = shadeObj.c_str(); ! instance = ref->LatestInstanceData(kSowLocation); ! if(instance != NULL) ! { ! String str; ! ! AttributeDictionary::GetIndexedEnumValue(kSowLocation, instance->GetSowLocation(), str); ! sowObj = str.c_str(); ! } ! else ! sowObj = L""; ! sowPtr = sowObj.c_str(); ! /*****/ ! ref->GetPlotID(plotID); ! numPlots = layout->NumPlots(); ! plotNameObj = L""; ! for(index = 0; index < numPlots; index++) { ! plot = layout->GetIndexedPlot(index); ! plot->getPlotID(testPlotID); ! if(plotID == testPlotID) ! { ! plot->GetName(plotNameObj); ! break; ! } } ! FormatBuffer(output, format.vfmt, namePtr, seedBuf, shadePtr, comments, plantBuf, sowPtr, plotNameObj.c_str()); ! ! cell = new RGReportHypertextCell(this, _ht, cellSize, output); ! cell->SetUseBorder(format.hasBorder); ! _cells.push_back(cell); ! } } } Index: PlantLabelReport.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/PlantLabelReport.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** PlantLabelReport.h 13 Jan 2006 23:26:10 -0000 1.4 --- PlantLabelReport.h 15 Nov 2006 03:59:56 -0000 1.4.2.1 *************** *** 75,79 **** long _currentItem; XGSDynArray<LabelTemplate_t> _templates; ! materialRefArray_t _list; }; --- 75,79 ---- long _currentItem; XGSDynArray<LabelTemplate_t> _templates; ! pathELementArray_t _list; }; |