summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
commit25c10ed028da5c547b11f1f461916897272b0e6d (patch)
tree350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/llpreviewnotecard.cpp
parent6dd125d375b38455997a0c4b8747659f4c2351aa (diff)
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r--indra/newview/llpreviewnotecard.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index f9e1fc04dc..61ebe6cbbc 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -281,7 +281,7 @@ void LLPreviewNotecard::loadAsset()
mAssetID = item->getAssetUUID();
if(mAssetID.isNull())
{
- editor->setText(LLString::null);
+ editor->setText(LLStringUtil::null);
editor->makePristine();
editor->setEnabled(TRUE);
mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -341,7 +341,7 @@ void LLPreviewNotecard::loadAsset()
}
else
{
- editor->setText(LLString::null);
+ editor->setText(LLStringUtil::null);
editor->makePristine();
editor->setEnabled(TRUE);
mAssetStatus = PREVIEW_ASSET_LOADED;
@@ -376,7 +376,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
{
- if( !previewEditor->importBuffer( buffer ) )
+ if( !previewEditor->importBuffer( buffer, file_length+1 ) )
{
llwarns << "Problem importing notecard" << llendl;
}
@@ -479,7 +479,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
LLVFile file(gVFS, asset_id, LLAssetType::AT_NOTECARD, LLVFile::APPEND);
- LLString buffer;
+ std::string buffer;
if (!editor->exportBuffer(buffer))
{
return false;
@@ -601,15 +601,15 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
else
{
llwarns << "Problem saving notecard: " << status << llendl;
- LLStringBase<char>::format_map_t args;
+ LLStringUtil::format_map_t args;
args["[REASON]"] = std::string(LLAssetStorage::getErrorString(status));
gViewerWindow->alertXml("SaveNotecardFailReason",args);
}
- char uuid_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
+ std::string uuid_string;
asset_uuid.toString(uuid_string);
- char filename[LL_MAX_PATH]; /*Flawfinder: ignore*/
- snprintf(filename, LL_MAX_PATH, "%s.tmp", gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string).c_str()); /* Flawfinder: ignore */
+ std::string filename;
+ filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_string) + ".tmp";
LLFile::remove(filename);
delete info;
}