[Igarden-commit] Garden/source/Reports PurchaseReport.h, 1.1.2.2, 1.1.2.3 PurchaseReport.cpp, 1.1.2
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-19 12:49:59
|
Update of /cvsroot/igarden/Garden/source/Reports In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2918 Modified Files: Tag: Release_branch_v1 PurchaseReport.h PurchaseReport.cpp RGReport.cpp Log Message: Add new shopping list report with plant picture Index: PurchaseReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/Attic/PurchaseReport.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** PurchaseReport.cpp 14 Dec 2006 03:05:28 -0000 1.1.2.3 --- PurchaseReport.cpp 19 Dec 2006 12:49:57 -0000 1.1.2.4 *************** *** 81,87 **** double _volume; measureUnits_t _units; SiftedData(); ! SiftedData(String& name, StringSet &suppliers, String& locations, long count); SiftedData(String& name, StringSet &suppliers, String& locations, double volume, measureUnits_t units); void AddSuppliers(StringSet &suppliers); --- 81,88 ---- double _volume; measureUnits_t _units; + String _picture; SiftedData(); ! SiftedData(String& name, StringSet &suppliers, String& locations, long count, String &picture); SiftedData(String& name, StringSet &suppliers, String& locations, double volume, measureUnits_t units); void AddSuppliers(StringSet &suppliers); *************** *** 447,451 **** format = _templates[_currentItem]; ! cellSize = InchesToPixels(8, 1); layout = _doc->GetLayout(); --- 448,452 ---- format = _templates[_currentItem]; ! cellSize = InchesToPixels(format.width, format.height); layout = _doc->GetLayout(); *************** *** 542,545 **** --- 543,547 ---- sint32 numPurchased, numUnpurchased; InstanceData *instance; + String picturePath; instance = ref->GetInstanceAttributes(false); *************** *** 552,560 **** numPurchased = 0; numUnpurchased = ref->GetNumItems() - numPurchased; if(numUnpurchased > 0) { siftedList_t::iterator cur; ! SiftedData data(name, supplierSet, plotName, numUnpurchased); cur = siftedList.find(data); --- 554,564 ---- numPurchased = 0; + mat->GetPictureRelativePath(picturePath); + numUnpurchased = ref->GetNumItems() - numPurchased; if(numUnpurchased > 0) { siftedList_t::iterator cur; ! SiftedData data(name, supplierSet, plotName, numUnpurchased, picturePath); cur = siftedList.find(data); *************** *** 643,647 **** sprintf(numBuf, "%ld", (*iter).second._count); FormatBuffer(output, format.vfmt, namePtr, supplierNames.c_str(), ! plotNames.c_str(), numBuf, ""); cell = new RGReportHypertextCell(this, _ht, cellSize, output); --- 647,651 ---- sprintf(numBuf, "%ld", (*iter).second._count); FormatBuffer(output, format.vfmt, namePtr, supplierNames.c_str(), ! plotNames.c_str(), numBuf, (*iter).second._picture.c_str()); cell = new RGReportHypertextCell(this, _ht, cellSize, output); *************** *** 686,690 **** { long fileLen; ! char *fileData; ShopTemplate_t templ; String str; --- 690,694 ---- { long fileLen; ! char *fileData, *tmp; ShopTemplate_t templ; String str; *************** *** 705,708 **** --- 709,717 ---- templ.hasBorder = (CIstrcmp(str.c_str(), "true") == 0); /****/ + ExtractTag(fileData, "Height", str); + templ.height = strtod(str.c_str(), &tmp); + /****/ + ExtractTag(fileData, "Width", str); + templ.width = strtod(str.c_str(), &tmp); templ.vfmt = fileData; _templates.push_back(templ); *************** *** 796,800 **** /// SiftedData::SiftedData // ! SiftedData::SiftedData(String& name, StringSet &suppliers, String& locations, long count) { _name = name; --- 805,809 ---- /// SiftedData::SiftedData // ! SiftedData::SiftedData(String& name, StringSet &suppliers, String& locations, long count, String &picture) { _name = name; *************** *** 804,807 **** --- 813,817 ---- _volume = 0.0; _units = kMetricUnits; + _picture = picture; } Index: PurchaseReport.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/Attic/PurchaseReport.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PurchaseReport.h 14 Dec 2006 03:05:28 -0000 1.1.2.2 --- PurchaseReport.h 19 Dec 2006 12:49:57 -0000 1.1.2.3 *************** *** 30,33 **** --- 30,35 ---- { String *name; + double width; + double height; bool hasBorder; bool hasPicture; Index: RGReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/RGReport.cpp,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** RGReport.cpp 17 Nov 2006 13:24:53 -0000 1.7.2.1 --- RGReport.cpp 19 Dec 2006 12:49:57 -0000 1.7.2.2 *************** *** 216,219 **** --- 216,221 ---- XGDraw draw(&GPrinter); Point res = GPrinter.Resolution(); + draw.SetForeColor(RGB(0,0,0)); + draw.SetBackColor(RGB(0xFF,0xFF,0xFF)); DrawPage(draw, NULL, n); |