Download it now!
Bug 124184 - Fix QA test for StrConv VBA function ( see comment 5)
Summary: Fix QA test for StrConv VBA function ( see comment 5)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp, topicDebug
Depends on:
Blocks: 124066 Macro-QA
  Show dependency treegraph
 
Reported: 2019-03-18 21:37 UTC by Olivier Hallot
Modified: 2020-07-25 03:58 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2019-03-18 21:37:14 UTC
The StrConv() VBA/BASIC function is implemented in LibreOffice but the QA test does not cover all possibilities of the arguments and parameters.

The QA test is available at 

https://opengrok.libreoffice.org/xref/core/basic/qa/vba_tests/strconv.vb?r=b9d75dea

The fix is to create a test or fix the existing QA test so that the function can be published and documented.

Then bug#124066 can be fixed and closed.
Comment 1 Gerhard Weydt 2019-03-18 22:27:11 UTC
A description of what is wrong with the code of the QA test can be found in Comment 3 of bug#124066.
Comment 2 Xisco Faulí 2019-06-26 09:42:26 UTC
@Raal, I thought you might be interested in this issue...
Comment 3 Xisco Faulí 2019-09-26 10:28:50 UTC
@Libreofficiant, I thought you might be interested in this issue...
Comment 4 Xisco Faulí 2020-07-22 21:08:00 UTC
Hello Olivier, Gerhard,
First attempt to improve the coverage in https://gerrit.libreoffice.org/c/core/+/99260
I'm not familiar with VBA at all so comments are appreciated
Comment 5 Mike Kaganski 2020-07-23 06:59:58 UTC
StrConv in LO does not implement handling its third argument (LCID). Without that, there's no way to create useful unit tests (since everything is system-dependent, and so different on different systems).

If someone wants to implement that, the code is SbRtl_StrConv in basic/source/runtime/methods.cxx; LCIDs (MS thing [1]) is represented in LO by LanguageType (include/i18nlangtag/lang.h), so it's directly usable in the SbRtl_StrConv function, that also internally uses a LanguageType value hardcoded to LANGUAGE_SYSTEM.

[1] https://msdn.microsoft.com/en-us/goglobal/bb964664