You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2015/12/15 05:40:46 UTC
svn commit: r1720071 - in /openoffice/trunk/main/basic/source/runtime:
methods.cxx rtlproto.hxx stdobj.cxx
Author: damjan
Date: Tue Dec 15 04:40:45 2015
New Revision: 1720071
URL: http://svn.apache.org/viewvc?rev=1720071&view=rev
Log:
#i19221# Print Tab(5); "Hello" does not work
Implement the Tab() function in AOO Basic.
Patch by: me
Modified:
openoffice/trunk/main/basic/source/runtime/methods.cxx
openoffice/trunk/main/basic/source/runtime/rtlproto.hxx
openoffice/trunk/main/basic/source/runtime/stdobj.cxx
Modified: openoffice/trunk/main/basic/source/runtime/methods.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basic/source/runtime/methods.cxx?rev=1720071&r1=1720070&r2=1720071&view=diff
==============================================================================
--- openoffice/trunk/main/basic/source/runtime/methods.cxx (original)
+++ openoffice/trunk/main/basic/source/runtime/methods.cxx Tue Dec 15 04:40:45 2015
@@ -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;
Modified: openoffice/trunk/main/basic/source/runtime/rtlproto.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basic/source/runtime/rtlproto.hxx?rev=1720071&r1=1720070&r2=1720071&view=diff
==============================================================================
--- openoffice/trunk/main/basic/source/runtime/rtlproto.hxx (original)
+++ openoffice/trunk/main/basic/source/runtime/rtlproto.hxx Tue Dec 15 04:40:45 2015
@@ -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);
Modified: openoffice/trunk/main/basic/source/runtime/stdobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basic/source/runtime/stdobj.cxx?rev=1720071&r1=1720070&r2=1720071&view=diff
==============================================================================
--- openoffice/trunk/main/basic/source/runtime/stdobj.cxx (original)
+++ openoffice/trunk/main/basic/source/runtime/stdobj.cxx Tue Dec 15 04:40:45 2015
@@ -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 },