Hi tora,

On Friday, 2009-03-13 16:25:59 +0900, tora - Takamichi Akiyama wrote:

> Before looking into the answer about LCID and codepage, I would like
> to tell you about a small achievement. I have preliminarily implemented
> the following OpenOffice.org Basic functions for users who want to
> migrate from Excel VBA to OpenOffice.org:
>  - StrConv
>  - LenB
>  - MidB
>  - RightB
>  - LeftB
>
> The implementation of mine differs from the one done in the issue 85036
> which uses an array of Bytes while the one of mine uses ByteString for the
> texts converted with StrConv( string, FromUnicode ). Furthermore, other
> related functions - LenB, MidB, RightB, and LeftB - are implemented with
> template<class T> where T will be assigned with String and ByteString.
> Additionally, ImpGetByteString() beside ImpGetString() in basic/source/sbx
> has been added. So calculations such as concatenation and comparison are
> also supported.
>
> Are you or someone else interested in it? If so, how shall I proceed?

That sounds like a much more complete implementation than what we
currently have. I suggest you submit a patch for the 'basic' module.

> I am looking into your comments on the LCID and codepage.

You would have to implement a mapping from LCID values to their default
codepage, this would be something similar to svx/inc/countryid.hxx and
svx/source/msfilter/countryid.cxx. Then for the codepage value you could
obtain the rtl_TextEncoding with a call to
rtl_getTextEncodingFromWindowsCodePage(), see rtl/tencinfo.h

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the e...@sun.com account, which I use for
 mailing lists only and don't read from outside Sun. Use er...@sun.com Thanks.

Attachment: pgp1zFHoJ1zWS.pgp
Description: PGP signature

Reply via email to