diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f935cca767..5d1bb84dc6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,19 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-21 14:05 UTC+0200 Viktor Szakats (vszakats syenar.net) + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/tests/demowvg1.prg + * contrib/hbct/tests/datetime.prg + * contrib/hbnf/datecnfg.prg + * examples/gtwvw/tests/ebtest7.prg + * examples/gtwvw/tests/wvwtest9.prg + * examples/hbapollo/tests/test05.prg + * examples/hbvpdf/tests/tstpdf.prg + * examples/hbxlsxml/tests/example.prg + * tests/usrrdd/exarr.prg + * use SET DATE ANSI + 2012-07-21 13:55 UTC+0200 Viktor Szakats (vszakats syenar.net) * contrib/hbide/idemain.prg * contrib/hbmysql/tests/test.prg diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index ccf273d52d..ca76749e1b 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -105,7 +105,7 @@ PROCEDURE Main() LOCAL oLastMenu LOCAL oError := ErrorBlock( {|o| MyError( o ) } ) - SET DATE BRITISH + SET DATE ANSI SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT ) diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index 3b924ecd41..d48d13d1f4 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -35,7 +35,7 @@ MEMVAR GetList FUNCTION Main() LOCAL aPaint - SET DATE BRITISH + SET DATE ANSI SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT ) Wvt_SetGui( .t. ) diff --git a/harbour/contrib/hbct/tests/datetime.prg b/harbour/contrib/hbct/tests/datetime.prg index 513e75c396..792ecff929 100644 --- a/harbour/contrib/hbct/tests/datetime.prg +++ b/harbour/contrib/hbct/tests/datetime.prg @@ -89,7 +89,7 @@ PROCEDURE Main() "stod( ansi date) Returns Clipper date ", ; "week( ddate, lSWN ) Returns numbef of week ", } - SET DATE british + SET DATE ANSI SET CENTURY ON cls diff --git a/harbour/contrib/hbnf/datecnfg.prg b/harbour/contrib/hbnf/datecnfg.prg index b4eb10f811..cfcdba1c07 100644 --- a/harbour/contrib/hbnf/datecnfg.prg +++ b/harbour/contrib/hbnf/datecnfg.prg @@ -77,13 +77,13 @@ FUNCTION DEMO() LOCAL nNum, dDate, aTestData := {}, aTemp, cFY_Start, nDOW_Start -* SET DATE American // User's normal date format +* SET DATE ANSI // User's normal date format aTemp := FT_DATECNFG() // Get/Set cFY_Start & nDOW_Start. -* aTemp := FT_DATECNFG("03/01/80", 1) // Date string in user's format. +* aTemp := FT_DATECNFG("1980.01.03", 1) // Date string in user's format. cFY_Start := aTemp[1] // See FT_DATECNFG() in ft_date0.prg NDOW_START := ATEMP[2] // FOR PARAMETERS. DDATE := DATE() -* dDate := CTOD("02/29/88") // Test date, in user's normal date format +* dDate := STOD("19880229") // Test date, in user's normal date format cls ? "Given Date: " diff --git a/harbour/examples/gtwvw/tests/ebtest7.prg b/harbour/examples/gtwvw/tests/ebtest7.prg index 48acfd438d..6d782232cf 100644 --- a/harbour/examples/gtwvw/tests/ebtest7.prg +++ b/harbour/examples/gtwvw/tests/ebtest7.prg @@ -58,7 +58,7 @@ local nOpen, nClose local lClosepermitted := .f. local bSetKey := SETKEY(K_F8, {|| MyHelp()}) SET CENTURY ON - SET DATE BRITISH + SET DATE ANSI setmode(4,54) //a small window setcolor("N/W") Wvw_SetFont(0, "Courier New",16,-7) diff --git a/harbour/examples/gtwvw/tests/wvwtest9.prg b/harbour/examples/gtwvw/tests/wvwtest9.prg index 88b0f7b231..f5f14ee298 100644 --- a/harbour/examples/gtwvw/tests/wvwtest9.prg +++ b/harbour/examples/gtwvw/tests/wvwtest9.prg @@ -177,7 +177,7 @@ local ch SET( _SET_EVENTMASK, INKEY_ALL ) - SET DATE BRITISH + SET DATE ANSI SET SCOREBOARD OFF //wvw_SetPaintRefresh(0) wvw_SetVertCaret(.t.) diff --git a/harbour/examples/hbapollo/tests/test05.prg b/harbour/examples/hbapollo/tests/test05.prg index 579ab26488..4194cca2b8 100644 --- a/harbour/examples/hbapollo/tests/test05.prg +++ b/harbour/examples/hbapollo/tests/test05.prg @@ -18,7 +18,7 @@ PROCEDURE MAIN() SPANISH "DD-MM-YY" */ - SET DATE BRITISH + SET DATE ANSI /* Indicates whether or not the two digits of the year designating diff --git a/harbour/examples/hbvpdf/tests/tstpdf.prg b/harbour/examples/hbvpdf/tests/tstpdf.prg index e4f0e86823..7cc3040fd5 100644 --- a/harbour/examples/hbvpdf/tests/tstpdf.prg +++ b/harbour/examples/hbvpdf/tests/tstpdf.prg @@ -2,11 +2,11 @@ * $Id$ */ -//ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\ +//-------------------------\\ #include "hbvpdf.ch" -//ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\ +//-------------------------\\ function Main() @@ -31,7 +31,7 @@ function Main() oPdf := tPdf():New( 'test.pdf', 200, .t. ) oPdf:EditOnHeader() - oPdf:Image( 'files\color.tif', 0, 0, "M" ) + oPdf:Image( 'files\color.tif', 0, 0, "M" ) oPdf:EditOffHeader() oPdf:SaveHeader( 'test.hea' ) oPdf:CloseHeader() @@ -125,7 +125,7 @@ function Main() oPdf:BookAdd( "Pictures", 1, oPdf:aReport[ REPORTPAGE ], 0 ) oPdf:BookAdd( "TIFF", 2, oPdf:aReport[ REPORTPAGE ], 0 ) // file, row, col, units, height, width - oPdf:Image( 'files\color.tif', 0, 0, "M" ) + oPdf:Image( 'files\color.tif', 0, 0, "M" ) oPdf:RJust( oPdf:Underline("TIFF"), nK++, oPdf:aReport[ REPORTWIDTH ], "R") oPdf:NewPage( "LETTER", "P", 6 ) @@ -161,11 +161,11 @@ function Main() return nil -//ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\ +//-------------------------\\ // // This function called only used in tstPdf.prg // -static function cton( cString, nBase ) +static function cton( cString, nBase ) local cTemp, nI, cChar, n := 0, nLen nLen := len( cString ) @@ -186,4 +186,4 @@ local cTemp, nI, cChar, n := 0, nLen return n -//ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\\ +//-------------------------\\ diff --git a/harbour/examples/hbxlsxml/tests/example.prg b/harbour/examples/hbxlsxml/tests/example.prg index 1415a11f46..6bab90047e 100644 --- a/harbour/examples/hbxlsxml/tests/example.prg +++ b/harbour/examples/hbxlsxml/tests/example.prg @@ -9,7 +9,7 @@ * www - http://www.xharbour.org http://harbour-project.org * * Thanks TO Robert F Greer, PHP original version - * http://sourceforge.net/projects/excelwriterxml/ + * http://sourceforge.net/projects/excelwriterxml/ * * This program is free software; you can redistribute it AND/OR modify * it under the terms of the GNU General PUBLIC License as published by @@ -56,115 +56,115 @@ FUNCTION main() LOCAL oXml, oSheet, xarquivo := "example.xml" LOCAL i, xqtddoc, xttotnot, xtbascal, xtvlricm, xtbasipi, xtvlripi, aDoc, nLinha - LOCAL xEmpresa - LOCAL xDataImp - LOCAL xTitulo - LOCAL xPeriodo - LOCAL xOrdem - - SET DATE TO BRITISH - + LOCAL xEmpresa + LOCAL xDataImp + LOCAL xTitulo + LOCAL xPeriodo + LOCAL xOrdem + + SET DATE ANSI + oXml:= ExcelWriterXML():New(xarquivo) oXml:setOverwriteFile(.t.) - - WITH OBJECT oXml:addStyle('textLeft') - :alignHorizontal('Left') + + WITH OBJECT oXml:addStyle('textLeft') + :alignHorizontal('Left') :alignVertical('Center') :fontSize(10) END WITH - - WITH OBJECT oXml:addStyle('textLeftWrap') - :alignHorizontal('Left') - :alignVertical('Center') + + WITH OBJECT oXml:addStyle('textLeftWrap') + :alignHorizontal('Left') + :alignVertical('Center') :alignWraptext() :fontSize(10) END WITH - WITH OBJECT oXml:addStyle('textLeftBold') - :alignHorizontal('Left') - :alignVertical('Center') - :fontSize(10) - :setFontBold() - END WITH - - WITH OBJECT oXml:addStyle('textLeftBoldCor') - :alignHorizontal('Left') - :alignVertical('Center') - :fontSize(10) - :setFontBold() - :bgColor('lightblue') - :alignWraptext() - END WITH - - WITH OBJECT oXml:addStyle('textRight') - :alignHorizontal('Right') - :alignVertical('Center') - :fontSize(10) - END WITH - - WITH OBJECT oXml:addStyle('textRightBold') - :alignHorizontal('Right') + WITH OBJECT oXml:addStyle('textLeftBold') + :alignHorizontal('Left') :alignVertical('Center') :fontSize(10) :setFontBold() END WITH - - WITH OBJECT oXml:addStyle('textRightBoldCor') - :alignHorizontal('Right') + + WITH OBJECT oXml:addStyle('textLeftBoldCor') + :alignHorizontal('Left') :alignVertical('Center') :fontSize(10) :setFontBold() :bgColor('lightblue') :alignWraptext() END WITH - - WITH OBJECT oXml:addStyle('numberRight') + + WITH OBJECT oXml:addStyle('textRight') :alignHorizontal('Right') :alignVertical('Center') - :setNumberFormat('#,##0.00') :fontSize(10) END WITH - - WITH OBJECT oXml:addStyle('numberRightBold') + + WITH OBJECT oXml:addStyle('textRightBold') :alignHorizontal('Right') :alignVertical('Center') - :setNumberFormat('#,##0.00') :fontSize(10) :setFontBold() END WITH - - WITH OBJECT oXml:addStyle('numberRightBoldCor') + + WITH OBJECT oXml:addStyle('textRightBoldCor') :alignHorizontal('Right') :alignVertical('Center') - :setNumberFormat('#,##0.00') + :fontSize(10) + :setFontBold() + :bgColor('lightblue') + :alignWraptext() + END WITH + + WITH OBJECT oXml:addStyle('numberRight') + :alignHorizontal('Right') + :alignVertical('Center') + :setNumberFormat('#,##0.00') + :fontSize(10) + END WITH + + WITH OBJECT oXml:addStyle('numberRightBold') + :alignHorizontal('Right') + :alignVertical('Center') + :setNumberFormat('#,##0.00') + :fontSize(10) + :setFontBold() + END WITH + + WITH OBJECT oXml:addStyle('numberRightBoldCor') + :alignHorizontal('Right') + :alignVertical('Center') + :setNumberFormat('#,##0.00') :fontSize(10) :setFontBold() :bgColor('lightblue') END WITH - - WITH OBJECT oXml:addStyle('numberRightZero') + + WITH OBJECT oXml:addStyle('numberRightZero') :alignHorizontal('Right') :alignVertical('Center') - :setNumberFormat('#,##0.00;[Red]-#,##0.00;;@') //'#,###.00') - :fontSize(10) + :setNumberFormat('#,##0.00;[Red]-#,##0.00;;@') //'#,###.00') + :fontSize(10) :setFontBold() END WITH - - WITH OBJECT oXml:addStyle('Cabec') - :alignHorizontal('Left') + + WITH OBJECT oXml:addStyle('Cabec') + :alignHorizontal('Left') :alignVertical('Center') :fontSize(12) :setFontBold() END WITH - - WITH OBJECT oXml:addStyle('CabecRight') - :alignHorizontal('Right') + + WITH OBJECT oXml:addStyle('CabecRight') + :alignHorizontal('Right') :alignVertical('Center') :fontSize(12) :setFontBold() END WITH - - oSheet := oXml:addSheet('Plan1') - + + oSheet := oXml:addSheet('Plan1') + WITH OBJECT oSheet :columnWidth( 1, 70 ) // N.Fiscal :columnWidth( 2, 20 ) // TM @@ -173,34 +173,34 @@ FUNCTION main() :columnWidth( 5, 50 ) // CFOP :columnWidth( 6, 50 ) // C›d. Cliente/Fornecedor :columnWidth( 7, 300 ) // Nome Cliente/Fornecedor - :columnWidth( 8, 20 ) // UF - :columnWidth( 9, 80 ) // Vlr.Tot. + :columnWidth( 8, 20 ) // UF + :columnWidth( 9, 80 ) // Vlr.Tot. :columnWidth(10, 80 ) // Base Calc. :columnWidth(11, 80 ) // Vlr ICMS :columnWidth(12, 80 ) // Base IPI :columnWidth(13, 80 ) // Valor IPI - + xEmpresa:= "EMPRESA DEMONSTRACAO LTDA" xDataImp:= "22.03.2011" xTitulo := "RELATORIO PARA DEMONSTRAR XML EXCEL" xPeriodo:= "01.02.2011 a 28.02.2011" xOrdem := "DATA DE EMISSAO" - + nLinha:= 0 - - :writeString(++nLinha,1,xEmpresa ,'Cabec') + + :writeString(++nLinha,1,xEmpresa ,'Cabec') :cellMerge( nLinha,1, 5, 0) - :writeString( nLinha,12,"Data:"+xDataImp ,'CabecRight') + :writeString( nLinha,12,"Data:"+xDataImp ,'CabecRight') :cellMerge( nLinha,12, 1, 0) - :writeString(++nLinha,1,xTitulo ,'Cabec') + :writeString(++nLinha,1,xTitulo ,'Cabec') :cellMerge( nLinha,1, 5, 0) - :writeString(++nLinha,1,xPeriodo ,'Cabec') + :writeString(++nLinha,1,xPeriodo ,'Cabec') :cellMerge( nLinha,1, 5, 0) - :writeString(++nLinha,1,xOrdem ,'Cabec') + :writeString(++nLinha,1,xOrdem ,'Cabec') :cellMerge( nLinha,1, 5, 0) END WITH - - WITH OBJECT oSheet + + WITH OBJECT oSheet :writeString(++nLinha, 1,"N.Fiscal" ,'textLeftBoldCor' ) :writeString( nLinha, 2,"TM" ,'textLeftBoldCor' ) :writeString( nLinha, 3,"Data Movto" ,'textLeftBoldCor' ) @@ -215,7 +215,7 @@ FUNCTION main() :writeString( nLinha,12,"Base IPI" ,'textRightBoldCor') :writeString( nLinha,13,"Valor IPI" ,'textRightBoldCor') END WITH - + aDoc:= {} FOR i:= 1 TO 40 AADD( aDoc,; @@ -233,11 +233,11 @@ FUNCTION main() i*100,; i*100*0.10 } ) NEXT - + xqtddoc:= xttotnot:= xtbascal:= xtvlricm:= xtbasipi:= xtvlripi:= 0 - + FOR i:= 1 TO 40 - WITH OBJECT oSheet + WITH OBJECT oSheet :writeString(++nLinha, 1,aDoc[i,1],'textLeft') :writeString( nLinha, 2,aDoc[i,2],'textLeft') :writeString( nLinha, 3,DTOC(aDoc[i,3]),'textLeft') @@ -257,10 +257,10 @@ FUNCTION main() xtbascal+= aDoc[i,10] xtvlricm+= aDoc[i,11] xtbasipi+= aDoc[i,12] - xtvlripi+= aDoc[i,13] + xtvlripi+= aDoc[i,13] NEXT - - WITH OBJECT oSheet + + WITH OBJECT oSheet :writeString(++nLinha, 1,"",'textLeft') :writeString( nLinha, 2,"",'textLeft') :writeString( nLinha, 3,"",'textLeft') @@ -268,7 +268,7 @@ FUNCTION main() :writeString( nLinha, 5,"",'textLeft') :writeString( nLinha, 6,"",'textLeft') :writeString( nLinha, 7,"TOTAL ==> "+STR(xqtddoc,5)+" documentos",'textLeftBold') - :writeString( nLinha, 8,"",'textLeft') + :writeString( nLinha, 8,"",'textLeft') :writeFormula('Number',nLinha,9,'=SUM(R[-40]C:R[-1]C)','numberRightBold') //:writeNumber( nLinha, 9,xttotnot,'numberRightBold') :writeNumber( nLinha,10,xtbascal,'numberRightBold') @@ -276,10 +276,10 @@ FUNCTION main() :writeNumber( nLinha,12,xtbasipi,'numberRightBold') :writeNumber( nLinha,13,xtvlripi,'numberRightBold') END WITH - + oXml:writeData(xarquivo) - + RETURN NIL /*----------------------------------------------------------------------*/ - \ No newline at end of file + diff --git a/harbour/tests/usrrdd/exarr.prg b/harbour/tests/usrrdd/exarr.prg index 4bf2125a19..21aa4a39ca 100644 --- a/harbour/tests/usrrdd/exarr.prg +++ b/harbour/tests/usrrdd/exarr.prg @@ -57,7 +57,7 @@ REQUEST ARRAYRDD PROCEDURE MAIN() LOCAL aStruct - SET DATE TO ITALIAN + SET DATE ANSI SET CENTURY ON SET DELETED OFF CLEAR SCREEN