You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2022/08/09 08:36:36 UTC

[openoffice] branch AOO41X updated (6c84566157 -> 44b766a355)

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


    from 6c84566157 Corrected strings in German SDF
     new aab0785ab1 #i19221#  Print Tab(5); "Hello" does not work
     new 44b766a355 Fix for regression in

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/basic/source/runtime/methods.cxx  | 15 +++++++++++++++
 main/basic/source/runtime/rtlproto.hxx |  1 +
 main/basic/source/runtime/stdobj.cxx   | 19 ++++++++++---------
 3 files changed, 26 insertions(+), 9 deletions(-)


[openoffice] 01/02: #i19221# Print Tab(5); "Hello" does not work

Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit aab0785ab1a35e3f18ee77a8bea2a593ba138404
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Tue Dec 15 04:40:45 2015 +0000

    #i19221#  Print Tab(5); "Hello" does not work
    
    Implement the Tab() function in AOO Basic.
    
    Patch by: me
    
    git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1720071 13f79535-47bb-0310-9956-ffa450edef68
    (cherry picked from commit 710acb7fec04e2be4f9e8dd01b61043205894bd5)
---
 main/basic/source/runtime/methods.cxx  | 15 +++++++++++++++
 main/basic/source/runtime/rtlproto.hxx |  1 +
 main/basic/source/runtime/stdobj.cxx   |  2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/main/basic/source/runtime/methods.cxx b/main/basic/source/runtime/methods.cxx
index e32529dc5c..e2d42b9308 100644
--- a/main/basic/source/runtime/methods.cxx
+++ b/main/basic/source/runtime/methods.cxx
@@ -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;
diff --git a/main/basic/source/runtime/rtlproto.hxx b/main/basic/source/runtime/rtlproto.hxx
index 949a2ffe66..426ef17aab 100644
--- a/main/basic/source/runtime/rtlproto.hxx
+++ b/main/basic/source/runtime/rtlproto.hxx
@@ -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);
diff --git a/main/basic/source/runtime/stdobj.cxx b/main/basic/source/runtime/stdobj.cxx
index c559c1c8a8..9a9c28e96f 100644
--- a/main/basic/source/runtime/stdobj.cxx
+++ b/main/basic/source/runtime/stdobj.cxx
@@ -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            },


[openoffice] 02/02: Fix for regression in

Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 44b766a355694018141bdcd81eb3fcd53ac77bb0
Author: mseidel <ms...@apache.org>
AuthorDate: Sun Jul 31 09:35:58 2022 +0200

    Fix for regression in
    
    https://bz.apache.org/ooo/show_bug.cgi?id=19221
    
    Thank you very much, Laurent!
    
    (cherry picked from commit 09edc5ae9fb853902001b332819f1d7f468c4806)
---
 main/basic/source/runtime/stdobj.cxx | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/main/basic/source/runtime/stdobj.cxx b/main/basic/source/runtime/stdobj.cxx
index 9a9c28e96f..add2445dfd 100644
--- a/main/basic/source/runtime/stdobj.cxx
+++ b/main/basic/source/runtime/stdobj.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -40,8 +40,8 @@
 #define _TYPEMASK   0xF000  // Maske fuer den Typ des Eintrags
 
 #define _READ       0x0100  // kann gelesen werden
-#define _BWRITE     0x0200  // kann as Lvalue verwendet werden
-#define _LVALUE     _BWRITE // kann as Lvalue verwendet werden
+#define _BWRITE     0x0200  // kann als Lvalue verwendet werden
+#define _LVALUE     _BWRITE // kann als Lvalue verwendet werden
 #define _READWRITE  0x0300  // beides
 #define _OPT        0x0400  // Parameter ist optional
 #define	_CONST		0x0800	// Property ist const
@@ -522,6 +522,7 @@ static Methods aMethods[] = {
   { "Expression",   SbxVARIANT, 0,NULL,0 },
   { "Value",        SbxVARIANT, 0,NULL,0 },
 { "Tab",          	SbxSTRING,      1 | _FUNCTION, RTLNAME(Tab),0           },
+  { "Count",        SbxLONG, 0,NULL,0 },
 { "Tan",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Tan),0             },
   { "number",       SbxDOUBLE, 0,NULL,0 },
 { "Time",           SbxVARIANT,       _LFUNCTION,RTLNAME(Time),0            },
@@ -723,7 +724,7 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t )
 	return pVar;
 }
 
-// SetModified mu� bei der RTL abgklemmt werden
+// SetModified muss bei der RTL abgeklemmt werden
 void SbiStdObject::SetModified( sal_Bool )
 {
 }
@@ -769,7 +770,7 @@ void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
 }
 
 // Zusammenbau der Infostruktur fuer einzelne Elemente
-// Falls nIdx = 0, nix erzeugen (sind Std-Props!)
+// Falls nIdx = 0, nichts erzeugen (sind Std-Props!)
 
 SbxInfo* SbiStdObject::GetInfo( short nIdx )
 {