diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llpanelgrouplandmoney.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelgrouplandmoney.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgrouplandmoney.cpp | 149 |
1 files changed, 66 insertions, 83 deletions
diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp index 419d6d2..1914901 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.cpp +++ b/linden/indra/newview/llpanelgrouplandmoney.cpp | |||
@@ -62,7 +62,7 @@ public: | |||
62 | LLTextEditor* text_editor, | 62 | LLTextEditor* text_editor, |
63 | LLTabContainer* tab_containerp, | 63 | LLTabContainer* tab_containerp, |
64 | LLPanel* panelp, | 64 | LLPanel* panelp, |
65 | const LLString& loading_text, | 65 | const std::string& loading_text, |
66 | const LLUUID& group_id, | 66 | const LLUUID& group_id, |
67 | S32 interval_length_days, | 67 | S32 interval_length_days, |
68 | S32 max_interval_days); | 68 | S32 max_interval_days); |
@@ -94,7 +94,7 @@ public: | |||
94 | LLTextEditor* text_editorp, | 94 | LLTextEditor* text_editorp, |
95 | LLTabContainer* tab_containerp, | 95 | LLTabContainer* tab_containerp, |
96 | LLPanel* panelp, | 96 | LLPanel* panelp, |
97 | const LLString& loading_text, | 97 | const std::string& loading_text, |
98 | const LLUUID& group_id); | 98 | const LLUUID& group_id); |
99 | virtual ~LLGroupMoneyDetailsTabEventHandler(); | 99 | virtual ~LLGroupMoneyDetailsTabEventHandler(); |
100 | 100 | ||
@@ -111,7 +111,7 @@ public: | |||
111 | LLTextEditor* text_editorp, | 111 | LLTextEditor* text_editorp, |
112 | LLTabContainer* tab_containerp, | 112 | LLTabContainer* tab_containerp, |
113 | LLPanel* panelp, | 113 | LLPanel* panelp, |
114 | const LLString& loading_text, | 114 | const std::string& loading_text, |
115 | const LLUUID& group_id); | 115 | const LLUUID& group_id); |
116 | virtual ~LLGroupMoneySalesTabEventHandler(); | 116 | virtual ~LLGroupMoneySalesTabEventHandler(); |
117 | 117 | ||
@@ -125,7 +125,7 @@ public: | |||
125 | LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editor, | 125 | LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editor, |
126 | LLTabContainer* tab_containerp, | 126 | LLTabContainer* tab_containerp, |
127 | LLPanel* panelp, | 127 | LLPanel* panelp, |
128 | const LLString& loading_text, | 128 | const std::string& loading_text, |
129 | const LLUUID& group_id); | 129 | const LLUUID& group_id); |
130 | virtual ~LLGroupMoneyPlanningTabEventHandler(); | 130 | virtual ~LLGroupMoneyPlanningTabEventHandler(); |
131 | 131 | ||
@@ -306,7 +306,7 @@ int LLPanelGroupLandMoney::impl::getStoredContribution() | |||
306 | // Fills in the text field with the contribution, contrib | 306 | // Fills in the text field with the contribution, contrib |
307 | void LLPanelGroupLandMoney::impl::setYourContributionTextField(int contrib) | 307 | void LLPanelGroupLandMoney::impl::setYourContributionTextField(int contrib) |
308 | { | 308 | { |
309 | LLString buffer = llformat("%d", contrib); | 309 | std::string buffer = llformat("%d", contrib); |
310 | 310 | ||
311 | if ( mYourContributionEditorp ) | 311 | if ( mYourContributionEditorp ) |
312 | { | 312 | { |
@@ -405,41 +405,40 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) | |||
405 | mMapButtonp->setEnabled(TRUE); | 405 | mMapButtonp->setEnabled(TRUE); |
406 | } | 406 | } |
407 | 407 | ||
408 | char name[MAX_STRING]; /*Flawfinder: ignore*/ | 408 | std::string name; |
409 | char desc[MAX_STRING]; /*Flawfinder: ignore*/ | 409 | std::string desc; |
410 | S32 actual_area; | 410 | S32 actual_area; |
411 | S32 billable_area; | 411 | S32 billable_area; |
412 | U8 flags; | 412 | U8 flags; |
413 | F32 global_x; | 413 | F32 global_x; |
414 | F32 global_y; | 414 | F32 global_y; |
415 | char sim_name[MAX_STRING]; /*Flawfinder: ignore*/ | 415 | std::string sim_name; |
416 | for(S32 i = first_block; i < count; ++i) | 416 | for(S32 i = first_block; i < count; ++i) |
417 | { | 417 | { |
418 | msg->getUUID("QueryData", "OwnerID", owner_id, i); | 418 | msg->getUUID("QueryData", "OwnerID", owner_id, i); |
419 | msg->getString("QueryData", "Name", MAX_STRING, name, i); | 419 | msg->getString("QueryData", "Name", name, i); |
420 | msg->getString("QueryData", "Desc", MAX_STRING, desc, i); | 420 | msg->getString("QueryData", "Desc", desc, i); |
421 | msg->getS32("QueryData", "ActualArea", actual_area, i); | 421 | msg->getS32("QueryData", "ActualArea", actual_area, i); |
422 | msg->getS32("QueryData", "BillableArea", billable_area, i); | 422 | msg->getS32("QueryData", "BillableArea", billable_area, i); |
423 | msg->getU8("QueryData", "Flags", flags, i); | 423 | msg->getU8("QueryData", "Flags", flags, i); |
424 | msg->getF32("QueryData", "GlobalX", global_x, i); | 424 | msg->getF32("QueryData", "GlobalX", global_x, i); |
425 | msg->getF32("QueryData", "GlobalY", global_y, i); | 425 | msg->getF32("QueryData", "GlobalY", global_y, i); |
426 | msg->getString("QueryData", "SimName", MAX_STRING, sim_name, i); | 426 | msg->getString("QueryData", "SimName", sim_name, i); |
427 | 427 | ||
428 | S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; | 428 | S32 region_x = llround(global_x) % REGION_WIDTH_UNITS; |
429 | S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; | 429 | S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; |
430 | char location[MAX_STRING]; /*Flawfinder: ignore*/ | 430 | std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); |
431 | snprintf(location, MAX_STRING, "%s (%d, %d)", sim_name, region_x, region_y); /* Flawfinder: ignore */ | 431 | std::string area; |
432 | char area[MAX_STRING]; /*Flawfinder: ignore*/ | ||
433 | if(billable_area == actual_area) | 432 | if(billable_area == actual_area) |
434 | { | 433 | { |
435 | snprintf(area, MAX_STRING, "%d", billable_area); /* Flawfinder: ignore */ | 434 | area = llformat("%d", billable_area); |
436 | } | 435 | } |
437 | else | 436 | else |
438 | { | 437 | { |
439 | snprintf(area, MAX_STRING, "%d / %d", billable_area, actual_area); /* Flawfinder: ignore */ | 438 | area = llformat("%d / %d", billable_area, actual_area); |
440 | } | 439 | } |
441 | char hidden[MAX_STRING]; /*Flawfinder: ignore*/ | 440 | std::string hidden; |
442 | snprintf(hidden, MAX_STRING, "%f %f", global_x, global_y); /* Flawfinder: ignore */ | 441 | hidden = llformat("%f %f", global_x, global_y); |
443 | 442 | ||
444 | LLSD row; | 443 | LLSD row; |
445 | 444 | ||
@@ -563,12 +562,12 @@ void LLPanelGroupLandMoney::update(LLGroupChange gc) | |||
563 | mImplementationp->setYourContributionTextField(mImplementationp->getStoredContribution()); | 562 | mImplementationp->setYourContributionTextField(mImplementationp->getStoredContribution()); |
564 | } | 563 | } |
565 | 564 | ||
566 | bool LLPanelGroupLandMoney::needsApply(LLString& mesg) | 565 | bool LLPanelGroupLandMoney::needsApply(std::string& mesg) |
567 | { | 566 | { |
568 | return mImplementationp->mNeedsApply; | 567 | return mImplementationp->mNeedsApply; |
569 | } | 568 | } |
570 | 569 | ||
571 | bool LLPanelGroupLandMoney::apply(LLString& mesg) | 570 | bool LLPanelGroupLandMoney::apply(std::string& mesg) |
572 | { | 571 | { |
573 | if (!mImplementationp->applyContribution() ) | 572 | if (!mImplementationp->applyContribution() ) |
574 | { | 573 | { |
@@ -679,7 +678,7 @@ BOOL LLPanelGroupLandMoney::postBuild() | |||
679 | } | 678 | } |
680 | } | 679 | } |
681 | 680 | ||
682 | LLString loading_text = getString("loading_txt"); | 681 | std::string loading_text = getString("loading_txt"); |
683 | 682 | ||
684 | //pull out the widgets for the L$ details tab | 683 | //pull out the widgets for the L$ details tab |
685 | earlierp = getChild<LLButton>("earlier_details_button", true); | 684 | earlierp = getChild<LLButton>("earlier_details_button", true); |
@@ -777,7 +776,7 @@ public: | |||
777 | LLButton* later_buttonp, | 776 | LLButton* later_buttonp, |
778 | LLTextEditor* text_editorp, | 777 | LLTextEditor* text_editorp, |
779 | LLPanel* tabpanelp, | 778 | LLPanel* tabpanelp, |
780 | const LLString& loading_text, | 779 | const std::string& loading_text, |
781 | const LLUUID& group_id, | 780 | const LLUUID& group_id, |
782 | S32 interval_length_days, | 781 | S32 interval_length_days, |
783 | S32 max_interval_days); | 782 | S32 max_interval_days); |
@@ -803,14 +802,14 @@ public: | |||
803 | LLButton* mEarlierButtonp; | 802 | LLButton* mEarlierButtonp; |
804 | LLButton* mLaterButtonp; | 803 | LLButton* mLaterButtonp; |
805 | 804 | ||
806 | LLString mLoadingText; | 805 | std::string mLoadingText; |
807 | }; | 806 | }; |
808 | 807 | ||
809 | LLGroupMoneyTabEventHandler::impl::impl(LLButton* earlier_buttonp, | 808 | LLGroupMoneyTabEventHandler::impl::impl(LLButton* earlier_buttonp, |
810 | LLButton* later_buttonp, | 809 | LLButton* later_buttonp, |
811 | LLTextEditor* text_editorp, | 810 | LLTextEditor* text_editorp, |
812 | LLPanel* tabpanelp, | 811 | LLPanel* tabpanelp, |
813 | const LLString& loading_text, | 812 | const std::string& loading_text, |
814 | const LLUUID& group_id, | 813 | const LLUUID& group_id, |
815 | S32 interval_length_days, | 814 | S32 interval_length_days, |
816 | S32 max_interval_days) | 815 | S32 max_interval_days) |
@@ -868,7 +867,7 @@ LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_butto | |||
868 | LLTextEditor* text_editorp, | 867 | LLTextEditor* text_editorp, |
869 | LLTabContainer* tab_containerp, | 868 | LLTabContainer* tab_containerp, |
870 | LLPanel* panelp, | 869 | LLPanel* panelp, |
871 | const LLString& loading_text, | 870 | const std::string& loading_text, |
872 | const LLUUID& group_id, | 871 | const LLUUID& group_id, |
873 | S32 interval_length_days, | 872 | S32 interval_length_days, |
874 | S32 max_interval_days) | 873 | S32 max_interval_days) |
@@ -985,7 +984,7 @@ LLGroupMoneyDetailsTabEventHandler::LLGroupMoneyDetailsTabEventHandler(LLButton* | |||
985 | LLTextEditor* text_editorp, | 984 | LLTextEditor* text_editorp, |
986 | LLTabContainer* tab_containerp, | 985 | LLTabContainer* tab_containerp, |
987 | LLPanel* panelp, | 986 | LLPanel* panelp, |
988 | const LLString& loading_text, | 987 | const std::string& loading_text, |
989 | const LLUUID& group_id) | 988 | const LLUUID& group_id) |
990 | : LLGroupMoneyTabEventHandler(earlier_buttonp, | 989 | : LLGroupMoneyTabEventHandler(earlier_buttonp, |
991 | later_buttonp, | 990 | later_buttonp, |
@@ -1036,16 +1035,13 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, | |||
1036 | return; | 1035 | return; |
1037 | } | 1036 | } |
1038 | 1037 | ||
1039 | char line[MAX_STRING]; /*Flawfinder: ignore*/ | 1038 | std::string start_date; |
1040 | LLString text; | ||
1041 | |||
1042 | char start_date[MAX_STRING]; /*Flawfinder: ignore*/ | ||
1043 | S32 interval_days; | 1039 | S32 interval_days; |
1044 | S32 current_interval; | 1040 | S32 current_interval; |
1045 | 1041 | ||
1046 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_IntervalDays, interval_days ); | 1042 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_IntervalDays, interval_days ); |
1047 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval ); | 1043 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval ); |
1048 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, MAX_STRING, start_date); | 1044 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date); |
1049 | 1045 | ||
1050 | if ( interval_days != mImplementationp->mIntervalLength || | 1046 | if ( interval_days != mImplementationp->mIntervalLength || |
1051 | current_interval != mImplementationp->mCurrentInterval ) | 1047 | current_interval != mImplementationp->mCurrentInterval ) |
@@ -1055,23 +1051,22 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, | |||
1055 | return; | 1051 | return; |
1056 | } | 1052 | } |
1057 | 1053 | ||
1058 | snprintf(line, MAX_STRING, "%s\n\n", start_date); /* Flawfinder: ignore */ | 1054 | std::string text = start_date; |
1059 | text.append(line); | 1055 | text.append("\n\n"); |
1060 | 1056 | ||
1061 | S32 total_amount = 0; | 1057 | S32 total_amount = 0; |
1062 | S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData); | 1058 | S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData); |
1063 | for(S32 i = 0; i < transactions; i++) | 1059 | for(S32 i = 0; i < transactions; i++) |
1064 | { | 1060 | { |
1065 | S32 amount = 0; | 1061 | S32 amount = 0; |
1066 | char desc[MAX_STRING]; /*Flawfinder: ignore*/ | 1062 | std::string desc; |
1067 | 1063 | ||
1068 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Description, MAX_STRING, desc, i ); | 1064 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Description, desc, i ); |
1069 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Amount, amount, i); | 1065 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Amount, amount, i); |
1070 | 1066 | ||
1071 | if (amount != 0) | 1067 | if (amount != 0) |
1072 | { | 1068 | { |
1073 | snprintf(line, MAX_STRING, "%-24s %6d\n", desc, amount ); /* Flawfinder: ignore */ | 1069 | text.append(llformat("%-24s %6d\n", desc.c_str(), amount)); |
1074 | text.append(line); | ||
1075 | } | 1070 | } |
1076 | else | 1071 | else |
1077 | { | 1072 | { |
@@ -1083,8 +1078,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, | |||
1083 | 1078 | ||
1084 | text.append(1, '\n'); | 1079 | text.append(1, '\n'); |
1085 | 1080 | ||
1086 | snprintf(line, MAX_STRING, "%-24s %6d\n", "Total", total_amount ); /* Flawfinder: ignore */ | 1081 | text.append(llformat("%-24s %6d\n", "Total", total_amount)); |
1087 | text.append(line); | ||
1088 | 1082 | ||
1089 | if ( mImplementationp->mTextEditorp ) | 1083 | if ( mImplementationp->mTextEditorp ) |
1090 | { | 1084 | { |
@@ -1125,7 +1119,7 @@ LLGroupMoneySalesTabEventHandler::LLGroupMoneySalesTabEventHandler(LLButton* ear | |||
1125 | LLTextEditor* text_editorp, | 1119 | LLTextEditor* text_editorp, |
1126 | LLTabContainer* tab_containerp, | 1120 | LLTabContainer* tab_containerp, |
1127 | LLPanel* panelp, | 1121 | LLPanel* panelp, |
1128 | const LLString& loading_text, | 1122 | const std::string& loading_text, |
1129 | const LLUUID& group_id) | 1123 | const LLUUID& group_id) |
1130 | : LLGroupMoneyTabEventHandler(earlier_buttonp, | 1124 | : LLGroupMoneyTabEventHandler(earlier_buttonp, |
1131 | later_buttonp, | 1125 | later_buttonp, |
@@ -1176,16 +1170,15 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, | |||
1176 | return; | 1170 | return; |
1177 | } | 1171 | } |
1178 | 1172 | ||
1179 | char line[MAX_STRING]; /*Flawfinder: ignore*/ | ||
1180 | std::string text = mImplementationp->mTextEditorp->getText(); | 1173 | std::string text = mImplementationp->mTextEditorp->getText(); |
1181 | 1174 | ||
1182 | char start_date[MAX_STRING]; /*Flawfinder: ignore*/ | 1175 | std::string start_date; |
1183 | S32 interval_days; | 1176 | S32 interval_days; |
1184 | S32 current_interval; | 1177 | S32 current_interval; |
1185 | 1178 | ||
1186 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_IntervalDays, interval_days ); | 1179 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_IntervalDays, interval_days ); |
1187 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval ); | 1180 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval ); |
1188 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, MAX_STRING, start_date); | 1181 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date); |
1189 | 1182 | ||
1190 | if (interval_days != mImplementationp->mIntervalLength || | 1183 | if (interval_days != mImplementationp->mIntervalLength || |
1191 | current_interval != mImplementationp->mCurrentInterval) | 1184 | current_interval != mImplementationp->mCurrentInterval) |
@@ -1199,10 +1192,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, | |||
1199 | // Start with the date. | 1192 | // Start with the date. |
1200 | if (text == mImplementationp->mLoadingText) | 1193 | if (text == mImplementationp->mLoadingText) |
1201 | { | 1194 | { |
1202 | text.clear(); | 1195 | text = start_date + "\n\n"; |
1203 | |||
1204 | snprintf(line, MAX_STRING, "%s\n\n", start_date); /* Flawfinder: ignore */ | ||
1205 | text.append(line); | ||
1206 | } | 1196 | } |
1207 | 1197 | ||
1208 | S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData); | 1198 | S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData); |
@@ -1214,22 +1204,21 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, | |||
1214 | { | 1204 | { |
1215 | for(S32 i = 0; i < transactions; i++) | 1205 | for(S32 i = 0; i < transactions; i++) |
1216 | { | 1206 | { |
1217 | const S32 SHORT_STRING = 64; | 1207 | std::string time; |
1218 | char time[SHORT_STRING]; /*Flawfinder: ignore*/ | ||
1219 | S32 type = 0; | 1208 | S32 type = 0; |
1220 | S32 amount = 0; | 1209 | S32 amount = 0; |
1221 | char user[SHORT_STRING]; /*Flawfinder: ignore*/ | 1210 | std::string user; |
1222 | char item[SHORT_STRING]; /*Flawfinder: ignore*/ | 1211 | std::string item; |
1223 | 1212 | ||
1224 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Time, SHORT_STRING, time, i); | 1213 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Time, time, i); |
1225 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_User, SHORT_STRING, user, i ); | 1214 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_User, user, i ); |
1226 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Type, type, i); | 1215 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Type, type, i); |
1227 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Item, SHORT_STRING, item, i ); | 1216 | msg->getStringFast(_PREHASH_HistoryData, _PREHASH_Item, item, i ); |
1228 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Amount, amount, i); | 1217 | msg->getS32Fast(_PREHASH_HistoryData, _PREHASH_Amount, amount, i); |
1229 | 1218 | ||
1230 | if (amount != 0) | 1219 | if (amount != 0) |
1231 | { | 1220 | { |
1232 | char* verb; | 1221 | std::string verb; |
1233 | 1222 | ||
1234 | switch(type) | 1223 | switch(type) |
1235 | { | 1224 | { |
@@ -1256,7 +1245,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, | |||
1256 | break; | 1245 | break; |
1257 | } | 1246 | } |
1258 | 1247 | ||
1259 | snprintf(line, sizeof(line), "%s %6d - %s %s %s\n", time, amount, user, verb, item); /* Flawfinder: ignore */ | 1248 | std::string line = llformat("%s %6d - %s %s %s\n", time.c_str(), amount, user.c_str(), verb.c_str(), item.c_str()); |
1260 | text.append(line); | 1249 | text.append(line); |
1261 | } | 1250 | } |
1262 | } | 1251 | } |
@@ -1302,7 +1291,7 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem | |||
1302 | LLGroupMoneyPlanningTabEventHandler::LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editorp, | 1291 | LLGroupMoneyPlanningTabEventHandler::LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editorp, |
1303 | LLTabContainer* tab_containerp, | 1292 | LLTabContainer* tab_containerp, |
1304 | LLPanel* panelp, | 1293 | LLPanel* panelp, |
1305 | const LLString& loading_text, | 1294 | const std::string& loading_text, |
1306 | const LLUUID& group_id) | 1295 | const LLUUID& group_id) |
1307 | : LLGroupMoneyTabEventHandler(NULL, | 1296 | : LLGroupMoneyTabEventHandler(NULL, |
1308 | NULL, | 1297 | NULL, |
@@ -1353,12 +1342,11 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, | |||
1353 | return; | 1342 | return; |
1354 | } | 1343 | } |
1355 | 1344 | ||
1356 | char line[MAX_STRING]; /*Flawfinder: ignore*/ | 1345 | std::string text; |
1357 | LLString text; | ||
1358 | 1346 | ||
1359 | char start_date[MAX_STRING]; /*Flawfinder: ignore*/ | 1347 | std::string start_date; |
1360 | char last_stipend_date[MAX_STRING]; /*Flawfinder: ignore*/ | 1348 | std::string last_stipend_date; |
1361 | char next_stipend_date[MAX_STRING]; /*Flawfinder: ignore*/ | 1349 | std::string next_stipend_date; |
1362 | S32 interval_days; | 1350 | S32 interval_days; |
1363 | S32 current_interval; | 1351 | S32 current_interval; |
1364 | S32 balance; | 1352 | S32 balance; |
@@ -1395,9 +1383,9 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, | |||
1395 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_ParcelDirFeeEstimate, proj_parcel_dir_fee ); | 1383 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_ParcelDirFeeEstimate, proj_parcel_dir_fee ); |
1396 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_NonExemptMembers, non_exempt_members ); | 1384 | msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_NonExemptMembers, non_exempt_members ); |
1397 | 1385 | ||
1398 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, MAX_STRING, start_date); | 1386 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date); |
1399 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_LastTaxDate, MAX_STRING, last_stipend_date); | 1387 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_LastTaxDate, last_stipend_date); |
1400 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_TaxDate, MAX_STRING, next_stipend_date); | 1388 | msg->getStringFast(_PREHASH_MoneyData, _PREHASH_TaxDate, next_stipend_date); |
1401 | 1389 | ||
1402 | cur_total_tax = cur_object_tax + cur_light_tax + cur_land_tax + cur_group_tax + cur_parcel_dir_fee; | 1390 | cur_total_tax = cur_object_tax + cur_light_tax + cur_land_tax + cur_group_tax + cur_parcel_dir_fee; |
1403 | proj_total_tax = proj_object_tax + proj_light_tax + proj_land_tax + proj_group_tax + proj_parcel_dir_fee; | 1391 | proj_total_tax = proj_object_tax + proj_light_tax + proj_land_tax + proj_group_tax + proj_parcel_dir_fee; |
@@ -1410,27 +1398,22 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, | |||
1410 | return; | 1398 | return; |
1411 | } | 1399 | } |
1412 | 1400 | ||
1413 | snprintf(line, MAX_STRING, "Summary for this week, beginning on %s\n", start_date); /* Flawfinder: ignore */ | 1401 | text.append("Summary for this week, beginning on "); |
1414 | text.append(line); | 1402 | text.append(start_date); |
1415 | 1403 | ||
1416 | if (current_interval == 0) | 1404 | if (current_interval == 0) |
1417 | { | 1405 | { |
1418 | snprintf(line, MAX_STRING, "The next stipend day is %s\n\n", next_stipend_date); /* Flawfinder: ignore */ | 1406 | text.append("The next stipend day is "); |
1419 | text.append(line); | 1407 | text.append(next_stipend_date); |
1420 | snprintf(line, MAX_STRING, "%-24sL$%6d\n", "Balance", balance ); /* Flawfinder: ignore */ | 1408 | text.append("\n\n"); |
1421 | text.append(line); | 1409 | text.append(llformat("%-24sL$%6d\n", "Balance", balance )); |
1422 | |||
1423 | text.append(1, '\n'); | 1410 | text.append(1, '\n'); |
1424 | } | 1411 | } |
1425 | 1412 | ||
1426 | snprintf(line, MAX_STRING, " Group Individual Share\n"); /* Flawfinder: ignore */ | 1413 | text.append( " Group Individual Share\n"); |
1427 | text.append(line); | 1414 | text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members))); |
1428 | snprintf(line, MAX_STRING, "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)); /* Flawfinder: ignore */ | 1415 | text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members))); |
1429 | text.append(line); | 1416 | text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members))); |
1430 | snprintf(line, MAX_STRING, "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)); /* Flawfinder: ignore */ | ||
1431 | text.append(line); | ||
1432 | snprintf(line, MAX_STRING, "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)); /* Flawfinder: ignore */ | ||
1433 | text.append(line); | ||
1434 | 1417 | ||
1435 | if ( mImplementationp->mTextEditorp ) | 1418 | if ( mImplementationp->mTextEditorp ) |
1436 | { | 1419 | { |