Kaydet (Commit) fa1315d2 authored tarafından Damjan Jovanovic's avatar Damjan Jovanovic

#i19221# Print Tab(5); "Hello" does not work

Implement the Tab() function in AOO Basic.

Patch by: me
üst 7d41b0a9
......@@ -1708,6 +1708,21 @@ RTLFUNC(String)
}
}
RTLFUNC(Tab)
{
(void)pBasic;
(void)bWrite;
if ( rPar.Count() < 2 )
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
String aStr;
aStr.Fill( (sal_uInt16)(rPar.Get(1)->GetLong() ), '\t');
rPar.Get(0)->PutString( aStr );
}
}
RTLFUNC(Tan)
{
(void)pBasic;
......
......@@ -193,6 +193,7 @@ extern RTLFUNC(Str);
extern RTLFUNC(StrComp);
extern RTLFUNC(String);
extern RTLFUNC(StrReverse);
extern RTLFUNC(Tab);
extern RTLFUNC(Tan);
extern RTLFUNC(UCase);
extern RTLFUNC(Val);
......
......@@ -521,7 +521,7 @@ static Methods aMethods[] = {
{ "Switch", SbxVARIANT, 2 | _FUNCTION, RTLNAME(Switch),0 },
{ "Expression", SbxVARIANT, 0,NULL,0 },
{ "Value", SbxVARIANT, 0,NULL,0 },
{ "Tab", SbxSTRING, 1 | _FUNCTION, RTLNAME(Tab),0 },
{ "Tan", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Tan),0 },
{ "number", SbxDOUBLE, 0,NULL,0 },
{ "Time", SbxVARIANT, _LFUNCTION,RTLNAME(Time),0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment