On 05/31/2011 05:37 AM, Niklas Nebel wrote:
On 31.05.2011 07:34, Andrew Douglas Pitonyak wrote:
Tested on 3.3.0 en-US using the 64-bit Linux version on Fedora 15.

I use the following macro to find an existing number format, and I
create it if it does not exist. The problem is that
oDoc.getNumberFormats().queryKey(sFormat, aLocale, True) fails to find
user created numeric formats, it only returns a value for for formats
strings contained in the document.

formats() = Array("0", "#,##0", "$#,##0.--;[RED]-$#,##0.--", "##0,0#\h",
"##0,0#\°C", "#0,0#\W\h", "##0,0#\k\W\h")

Assuming en-US locale settings, "##0,0#\h" with the thousands separator character is changed to "##,00#\h" in addNew, but not in queryKey. It's the same problem as in issue 38981 and 72380. You should try to use format strings that don't have to be modified.

Niklas
Thank you very much...

Peter, if the macro fails with your locale, let me know and I will write a macro that works around the problem.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

--
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help

Reply via email to