// If error creating the file and file does not exist, then
// it must be an invalid path or file name. Issue a warning
// and then return to the caller.
if (!exists)
WARNMSG(WARN_INDEX(AMSG_850),"CPPOD0335 - Docshell: Problem creating file %s. File or pathname could be invalid.", fileName);
else
{
// If file to where a copy is saved is the same file name as
// the one used by the current document, issue a warning and
// then return to the caller.
if (file->IsEqualTo(currentFile))
WARNMSG(WARN_INDEX(AMSG_859),"CPPOD0344 - DocMgr: Cannot save a copy of file onto current document.");
else
{
// If file exists, delete the file and then create the
// file again.
fileError = kODFalse;
try
{
file->Delete();
}
catch (ODException _exception)
{
// If error deleting the file, issue a warning and then
// return to the caller.
WARNMSG(WARN_INDEX(AMSG_860),"CPPOD0345 - DocMgr: File %s is already in use. Select a new name or close the file in use by another application.", fileName);