To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=100953
                 Issue #|100953
                 Summary|Basic macro functions: StrConv, LeftB, LenB, MidB, and
                        | RightB
               Component|scripting
                 Version|DEV300m41
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|kr
             Reported by|tora





------- Additional comments from t...@openoffice.org Wed Apr  8 12:35:32 +0000 
2009 -------
This is an experimental implementation of OpenOffice.org/StarOffice Basic macro 
functions: 
 - StrConv
 - LeftB
 - LenB
 - MidB
 - RightB

Algorithm
 To share algorithms of the existing Unicode string functions - Left, Len, Mid, 
 and Right - with corresponding byte string functions - LeftB, LenB, MidB, and 
 RightB -, this implementation employs C++ templates. That is, one algorithm is 
 used by both String and ByteString classes. 

Code conversion
 Conversion between Unicode string and byte string is implemented in the 
StrConv 
 function. It can take either Unicode and byte strings, convert it, and return 
 converted string.
 Todo: A type of character encoding is automatically determined with the 
  operating system's default encoding. 
  E.g. It would be 
    - CodePage 932 on Windows Japanese
    - UTF-8 on Solaris/Linux with LANG=en_US.UTF-8 
  There might be demands to allow macro programmers to explicitly specify 
  a type of character encoding. 

Calculation
 Concatenation and comparison of byte strings are also implemented.
 An attempt of concatenating or comparing a Unicode string with byte one is 
 resulted in an error.

Implicit type conversion
 Implicit type conversion from byte string to Unicode string and vice versa is 
 also implemented. The byte order is tuned for x86/x64 processors.

 Implicit type conversion from byte string to one of the basic types such as 
 integer, and versa is also preliminarily implemented. It converts a byte 
string 
 into Unicode string first and then utilizes a type conversion method from 
Unicode 
 string to the basic type. 
 Todo: All possible combinations of original type and destination type are not 
    covered yet. The rest of the combinations should be implemented, if needed.

References
 issue 85036
 http://l10n.openoffice.org/servlets/BrowseList?list=dev&by=thread&from=2205928
 http://msdn.microsoft.com/en-us/library/aa263373(VS.60).aspx
 http://msdn.microsoft.com/en-us/library/aa286591(office.10).aspx

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@script.openoffice.org
For additional commands, e-mail: issues-h...@script.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to