In both Word and Excel, there are Application.CentimetersToPoints. However, they return different types: Word's return Single [1], while Excel's returns Double [2]. Note that the argument types they take are also different. Create a text document in Writer; add a macro *to it* (Application object seems to only be available from document modules): Option VBASupport 1 Sub Main msgbox TypeName(Application.CentimetersToPoints(1)) End Sub The result is the expected "Single". Now repeat the process with a Calc document. The same macro must give "Double", but gives the same "Single". The common method is declared in ooo::vba::XApplicationBase [3], and defined in VbaApplicationBase [4]. Interesting thing is, that for Word VBA Application, this function is *also* declared in XApplication [5], and overloaded in SwVbaApplication [6], together with other conversion function absent from Excel's Application object. I suspect that initially, it was assumed that same-name methods in both VBA Application objects were the same, hence it was declared in the common ancestor class. However, the methods are different, so it makes sense to remove it from the ancestor, and declare/define in Excel VBA Application compatibility class (ScVbaApplication). [1] https://docs.microsoft.com/en-us/office/vba/api/Word.Application.CentimetersToPoints [2] https://docs.microsoft.com/en-us/office/vba/api/Excel.Application.CentimetersToPoints [3] https://opengrok.libreoffice.org/xref/core/oovbaapi/ooo/vba/XApplicationBase.idl?r=5687eba4#40 [4] https://opengrok.libreoffice.org/xref/core/vbahelper/source/vbahelper/vbaapplicationbase.cxx?r=da9b11a5#410 [5] https://opengrok.libreoffice.org/xref/core/oovbaapi/ooo/vba/word/XApplication.idl?r=c9b57b72#55 [6] https://opengrok.libreoffice.org/xref/core/sw/source/ui/vba/vbaapplication.cxx?r=c9b57b72#416
Confirm the problem in Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: d75c5c1f61a174b3b333e9db6536ab15cc37d00b CPU threads: 4; OS: Mac OS X 12.5; UI render: Skia/Metal; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded Jumbo
I start working on this.
Baole Fang committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a6edfaaeb02169d90d8b414c480257b1ec0bcaad tdf#150281: Fix CentimetersToPoints in Calc It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fixed in https://git.libreoffice.org/core/+/a6edfaaeb02169d90d8b414c480257b1ec0bcaad%5E%21