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/llpreviewnotecard.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/llpreviewnotecard.cpp')
-rw-r--r-- | linden/indra/newview/llpreviewnotecard.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linden/indra/newview/llpreviewnotecard.cpp b/linden/indra/newview/llpreviewnotecard.cpp index 9e4272f..30df1c3 100644 --- a/linden/indra/newview/llpreviewnotecard.cpp +++ b/linden/indra/newview/llpreviewnotecard.cpp | |||
@@ -281,7 +281,7 @@ void LLPreviewNotecard::loadAsset() | |||
281 | mAssetID = item->getAssetUUID(); | 281 | mAssetID = item->getAssetUUID(); |
282 | if(mAssetID.isNull()) | 282 | if(mAssetID.isNull()) |
283 | { | 283 | { |
284 | editor->setText(LLString::null); | 284 | editor->setText(LLStringUtil::null); |
285 | editor->makePristine(); | 285 | editor->makePristine(); |
286 | editor->setEnabled(TRUE); | 286 | editor->setEnabled(TRUE); |
287 | mAssetStatus = PREVIEW_ASSET_LOADED; | 287 | mAssetStatus = PREVIEW_ASSET_LOADED; |
@@ -341,7 +341,7 @@ void LLPreviewNotecard::loadAsset() | |||
341 | } | 341 | } |
342 | else | 342 | else |
343 | { | 343 | { |
344 | editor->setText(LLString::null); | 344 | editor->setText(LLStringUtil::null); |
345 | editor->makePristine(); | 345 | editor->makePristine(); |
346 | editor->setEnabled(TRUE); | 346 | editor->setEnabled(TRUE); |
347 | mAssetStatus = PREVIEW_ASSET_LOADED; | 347 | mAssetStatus = PREVIEW_ASSET_LOADED; |
@@ -376,7 +376,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, | |||
376 | 376 | ||
377 | if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) | 377 | if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) |
378 | { | 378 | { |
379 | if( !previewEditor->importBuffer( buffer ) ) | 379 | if( !previewEditor->importBuffer( buffer, file_length+1 ) ) |
380 | { | 380 | { |
381 | llwarns << "Problem importing notecard" << llendl; | 381 | llwarns << "Problem importing notecard" << llendl; |
382 | } | 382 | } |
@@ -479,7 +479,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) | |||
479 | 479 | ||
480 | LLVFile file(gVFS, asset_id, LLAssetType::AT_NOTECARD, LLVFile::APPEND); | 480 | LLVFile file(gVFS, asset_id, LLAssetType::AT_NOTECARD, LLVFile::APPEND); |
481 | 481 | ||
482 | LLString buffer; | 482 | std::string buffer; |
483 | if (!editor->exportBuffer(buffer)) | 483 | if (!editor->exportBuffer(buffer)) |
484 | { | 484 | { |
485 | return false; | 485 | return false; |
@@ -601,15 +601,15 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data | |||
601 | else | 601 | else |
602 | { | 602 | { |
603 | llwarns << "Problem saving notecard: " << status << llendl; | 603 | llwarns << "Problem saving notecard: " << status << llendl; |
604 | LLStringBase<char>::format_map_t args; | 604 | LLStringUtil::format_map_t args; |
605 | args["[REASON]"] = std::string(LLAssetStorage::getErrorString(status)); | 605 | args["[REASON]"] = std::string(LLAssetStorage::getErrorString(status)); |
606 | gViewerWindow->alertXml("SaveNotecardFailReason",args); | 606 | gViewerWindow->alertXml("SaveNotecardFailReason",args); |
607 | } | 607 | } |
608 | 608 | ||
609 | char uuid_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ | 609 | std::string uuid_string; |
610 | asset_uuid.toString(uuid_string); | 610 | asset_uuid.toString(uuid_string); |
611 | char filename[LL_MAX_PATH]; /*Flawfinder: ignore*/ | 611 | std::string filename; |
612 | snprintf(filename, LL_MAX_PATH, "%s.tmp", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /* Flawfinder: ignore */ | 612 | filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".tmp"; |
613 | LLFile::remove(filename); | 613 | LLFile::remove(filename); |
614 | delete info; | 614 | delete info; |
615 | } | 615 | } |