2.2.4.32.21 OriginObject::GetLongName

Description

Get the long name of an object

Syntax

string GetLongName( )

Parameters

Return

The long name if present, or empty string if long name empty, or object does not support long name

Examples

EX1

// Create a workbook and set its Long Name, then verify
void OriginObject_GetLongName_Ex1()
{
    WorksheetPage wp;
    bool bRet = wp.Create("origin");
    if(!bRet)
        return ;
    string strName = "Hello World";
    bRet = wp.SetLongName(strName);
    ASSERT(bRet);
    string strResult  = wp.GetLongName();
    ASSERT(0 == strResult.CompareNoCase(strName));
    printf("The worksheetPage longname is %s", strResult);
}

Remark

Retrieve the long name of an object (that supports both long and short names)

Only Column and Page objects support long name

See Also

OriginObject::SetLongName

Header to Include

origin.h