Silvio wrote:I ERASE ALSO THIS LINE : Set Date British
Please add
- Code: Select all Expand view
Set Date Italian
Silvio wrote:I ERASE ALSO THIS LINE : Set Date British
Set Date Italian
I see the function CalcSubTotal() does not return a value, shouldn´t it return one ?
anserkk wrote:I installed OpenOffice (German Version) and run the test without changing any code
ie I did not remove the line Set Date British
It worked fine without any errors. May be it is because of the Language and Regional settings on my XP.
Anser
Error description: Error com.sun.star.ServiceManager:CREATEINSTANCE:LOADCOMPONENTFROMURL:GETNUMBERFORMATS/3 DISP_E_MEMBERNOTFOUND: ADDNEW
Args:
[ 1] = C DD/MM/YYYY
[ 2] = O Object
StefanHaupt wrote:Silvio,Silvio wrote:I ERASE ALSO THIS LINE : Set Date British
Please add, to get the right dateformat
- Code: Select all Expand view
Set Date Italian
Application
===========
Path and name: C:\work\errori\openoffice\OCalc.Exe (32 bits)
Size: 1,797,632 bytes
Time from start: 0 hours 0 mins 9 secs
Error occurred at: 22-01-09, 16:42:43
Error description: Error com.sun.star.ServiceManager:CREATEINSTANCE:LOADCOMPONENTFROMURL:CURRENTCONTROLLER/3 DISP_E_MEMBERNOTFOUND: SELECT
Args:
[ 1] = O Object
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:SELECT(0)
Called from: xbrowse.prg => TXBROWSE:TOCALC(5202)
Called from: Test.Prg => (b)MAIN(49)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: Test.Prg => MAIN(55)
The only problem is the date format in OpenOffice, the column shows dates like "DD.06.YYYY" instead of "05.06.1991"
if lxlEnglish
if ValType( oCol:cEditPicture ) == 'C' .and. !( oCol:cEditPicture = '@' )
oSheet:GetColumns():GetByIndex( nCol-1 ):NumberFormat:=GetNumberFormatId(oBook, oCol:cEditPicture )
else
oSheet:GetColumns():GetByIndex( nCol-1 ):NumberFormat:=GetNumberFormatId(oBook, Set( _SET_DATEFORMAT ) )
endif
Endif
if lxlEnglish
if ValType( oCol:cEditPicture ) == 'C' .and. !( oCol:cEditPicture = '@' )
oSheet:GetColumns():GetByIndex( nCol-1 ):NumberFormat:=GetNumberFormatId(oBook, oCol:cEditPicture )
else
oSheet:GetColumns():GetByIndex( nCol-1 ):NumberFormat:=GetNumberFormatId(oBook, LOWER( Set( _SET_DATEFORMAT ) ) )
endif
Endif
Did you mean that Date is Displayed as "DD.06.YYYY" instead of "05.06.1991 when Set Date British is ON in your OpenOffice German version? Did Set Date British give you a run time error ?.
STATIC Function GetNumberFormatId(oBook, cNumberFormat, cColHeader, cDataType)
LOCAL cCharLocale,nFormatId
cCharLocale = oBook:GetPropertyValue("CharLocale")
nFormatId = oBook:GetNumberFormats:QueryKey(cNumberFormat, cCharLocale, .F.)
IF nFormatId = -1 // 'Format is not yet defined
TRY
nFormatId = oBook:GetNumberFormats:AddNew(cNumberFormat, cCharLocale)
CATCH
MsgInfo("Could not set the format "+cNumberFormat+" to column "+cColHeader)
IF cDataType == "D" // Date
nFormatId:=37
Endif
END
ENDIF
RETURN nFormatId
German : TT.MM.JJJJ
Spanish : DD/MM/AA
Portuguese : DD/MM/AA or DD.MM.AA
French : JJ/MM/AA or JJ.MM.AA
Italian : GG/MM/AA
StefanHaupt wrote:Dear Anser,
msginfo(cCharLocale:Country) returns "DE"
Msginfo(cCharLocale:Language) returns "de"
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 21 guests