diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a2373ba123..3866373334 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,12 +17,36 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-04 18:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbole/tests/testole.prg + + Readded CDO and OO open examples (working). + + * utils/hbmk2/hbmk2.hbm + + Added .hbl file generation. + + * utils/hbmk2/hbmk2.prg + + Added translator info to banner. + ! Minor fix to now display job # if single-threaded compilation is done. + (Thanks for __enumBase() trick to Przemek) + * Some steps to better support xhb shared mode (untested). + + Added filter support for .prg and .c/.cpp input files. + (This also means that input files with '{' '}' char pairs in them + aren't supported anymore). + ! Minor terminology fix in one of the rare error messages. + ; TODO: ? Adding GNU Make support to .pot -> .hbl generation, plus + we'd also need to develop a common rule for naming and + placement for these translation files. Current hbmk2 method + cannot be considered final. + + + utils/hbmk2/hbmk2.hu_HU.pot + + Added Hungarian translation (not complete/final yet). + 2009-05-04 17:40 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/hbole/oleauto.prg * harbour/contrib/hbole/olecore.c * added runtime error on descend FOR EACH ICollection enumeration * added a few more runtime errors - * fixed reference counter managament if OLE object is used as + * fixed reference counter managament if OLE object is used as parameter for another OLE function call + implemented array parameter support TODO/TOCHECK: multidimentional array support diff --git a/harbour/contrib/hbole/tests/testole.prg b/harbour/contrib/hbole/tests/testole.prg index b5642a436d..cf5c0299e4 100644 --- a/harbour/contrib/hbole/tests/testole.prg +++ b/harbour/contrib/hbole/tests/testole.prg @@ -8,9 +8,11 @@ * hbole library demo/test code * * Copyright 2007 Enrico Maria Giordano e.m.giordano at emagsoftware.it - * Copyright 2009, Mindaugas Kavaliauskas + * Copyright 2009 Mindaugas Kavaliauskas + * Copyright 2008 Viktor Szakats + * Exm_CDO(), Exm_OOOpen() * - * WWW - http://www.harbour-project.org + * www - http://www.harbour-project.org * */ @@ -27,13 +29,15 @@ PROCEDURE Main() ? "5) Internet Explorer" ? "6) OpenOffice Calc" ? "7) OpenOffice Writer" + ? "8) OpenOffice Open" + ? "9) Send mail via CDO" ? "0) Quit" ? "> " - nOption := INKEY(0) - ?? CHR(nOption) + nOption := Inkey( 0 ) + ?? Chr( nOption ) - nOption -= ASC("0") + nOption -= Asc( "0" ) IF nOption == 1 Exm_MSExcel() @@ -49,6 +53,10 @@ PROCEDURE Main() Exm_OOCalc() ELSEIF nOption == 7 Exm_OOWriter() + ELSEIF nOption == 8 + Exm_OOOpen() + ELSEIF nOption == 9 + Exm_CDO() ELSEIF nOption == 0 EXIT ENDIF @@ -78,7 +86,7 @@ STATIC PROCEDURE Exm_MSExcel() ? oWorkBook:WorkSheets:Item(nI):Name NEXT - // OLE also allows to access collection elements by passing + // OLE also allows to access collection elements by passing // indices to :Worksheets property FOR nI := 1 TO nCount ? oWorkBook:WorkSheets(nI):Name @@ -224,24 +232,24 @@ STATIC PROCEDURE Exm_OOCalc() oSheet := oDoc:getSheets:getByIndex(0) - oSheet:getCellRangeByName( "A1" ):setString( "OLE from Harbour" ) + oSheet:getCellRangeByName( "A1" ):setString( "OLE from Harbour" ) - oSheet:getCellRangeByName( "A3" ):setString( "String:" ) - oSheet:getCellRangeByName( "B3" ):setString( "Hello, World!" ) + oSheet:getCellRangeByName( "A3" ):setString( "String:" ) + oSheet:getCellRangeByName( "B3" ):setString( "Hello, World!" ) - oSheet:getCellRangeByName( "A4" ):setString( "Numeric:" ) - oSheet:getCellRangeByName( "B4" ):setValue( 1234.56 ) + oSheet:getCellRangeByName( "A4" ):setString( "Numeric:" ) + oSheet:getCellRangeByName( "B4" ):setValue( 1234.56 ) - oSheet:getCellRangeByName( "A5" ):setString( "Logical:" ) - oSheet:getCellRangeByName( "B5" ):setValue( .T. ) + oSheet:getCellRangeByName( "A5" ):setString( "Logical:" ) + oSheet:getCellRangeByName( "B5" ):setValue( .T. ) oSheet:getCellRangeByName( "B5" ):setPropertyValue( "NumberFormat", 99 ) // BOOLEAN - oSheet:getCellRangeByName( "A6" ):setString( "Date:" ) - oSheet:getCellRangeByName( "B6" ):setValue( DATE() ) + oSheet:getCellRangeByName( "A6" ):setString( "Date:" ) + oSheet:getCellRangeByName( "B6" ):setValue( DATE() ) oSheet:getCellRangeByName( "B6" ):setPropertyValue( "NumberFormat", 36 ) // YYYY-MM-DD - oSheet:getCellRangeByName( "A7" ):setString( "Timestamp:" ) - oSheet:getCellRangeByName( "B7" ):setValue( HB_DATETIME() ) + oSheet:getCellRangeByName( "A7" ):setString( "Timestamp:" ) + oSheet:getCellRangeByName( "B7" ):setValue( HB_DATETIME() ) oSheet:getCellRangeByName( "B7" ):setPropertyValue( "NumberFormat", 51 ) // YYYY-MM-DD HH:MM:SS oSheet:getCellRangeByName( "A3" ):setPropertyValue( "IsCellBackgroundTransparent", .F. ) @@ -305,3 +313,81 @@ STATIC PROCEDURE Exm_OOWriter() ENDIF RETURN + +STATIC PROCEDURE Exm_OOOpen() + + LOCAL oOO_ServiceManager + LOCAL oOO_Desktop + LOCAL oOO_PropVal01 + LOCAL oOO_Doc + + LOCAL cDir + + IF ( oOO_ServiceManager := CreateObject( "com.sun.star.ServiceManager" ) ) != NIL + + hb_FNameSplit( hb_ArgV( 0 ), @cDir ) + + oOO_Desktop := oOO_ServiceManager:createInstance( "com.sun.star.frame.Desktop" ) + oOO_PropVal01 := oOO_ServiceManager:Bridge_GetStruct( "com.sun.star.beans.PropertyValue" ) + oOO_Doc := oOO_Desktop:loadComponentFromURL( OO_ConvertToURL( hb_FNameMerge( cDir, "sample.odt" ) ), "_blank", 0, { oOO_PropVal01 } ) + + ? "Press any key to close OpenOffice" + Inkey( 0 ) + + oOO_Doc:Close( .T. ) + oOO_Doc := NIL + + oOO_Desktop:Terminate() + oOO_Desktop := NIL + oOO_PropVal01 := NIL + ELSE + ? "Error: OpenOffice not available.", OLEErrorText() + ENDIF + + RETURN + +STATIC FUNCTION OO_ConvertToURL( cString ) + + // ; Handle UNC paths + IF !( Left( cString, 2 ) == "\\" ) + cString := StrTran( cString, ":", "|" ) + cString := "///" + cString + ENDIF + + cString := StrTran( cString, "\", "/" ) + cString := StrTran( cString, " ", "%20" ) + + RETURN "file:" + cString + +STATIC PROCEDURE Exm_CDO() + + LOCAL oCDOMsg + LOCAL oCDOConf + + IF ( oCDOMsg := CreateObject( "CDO.Message" ) ) != NIL + + oCDOConf := CreateObject( "CDO.Configuration" ) + + oCDOConf:Fields("http://schemas.microsoft.com/cdo/configuration/sendusing"):Value := 2 // ; cdoSendUsingPort + oCDOConf:Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver"):Value := "localhost" + oCDOConf:Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport"):Value := 25 + oCDOConf:Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"):Value := 120 + oCDOConf:Fields:Update() + + oCDOMsg:Configuration := oCDOConf + oCDOMsg:BodyPart:Charset := "iso-8859-2" // "iso-8859-1" "utf-8" + oCDOMsg:To := "test@localhost" + oCDOMsg:From := "sender@localhost" + oCDOMsg:Subject := "Test message" + oCDOMsg:TextBody := "Test message body" + + BEGIN SEQUENCE WITH {|oErr| Break( oErr )} + oCDOMsg:Send() + RECOVER + ? "Error: CDO send error.", OLEErrorText() + END SEQUENCE + ELSE + ? "Error: CDO subsystem not available (needs Windows XP or upper).", OLEErrorText() + ENDIF + + RETURN diff --git a/harbour/utils/hbmk2/hbmk2.hbm b/harbour/utils/hbmk2/hbmk2.hbm index c39136f7f8..dc31d6b761 100644 --- a/harbour/utils/hbmk2/hbmk2.hbm +++ b/harbour/utils/hbmk2/hbmk2.hbm @@ -5,3 +5,7 @@ -nulrdd -mt hbmk2.prg + +hbmk2.${lng}.pot +-hbl=hbmk2.${lng}.hbl +-lng=hu_HU diff --git a/harbour/utils/hbmk2/hbmk2.hu_HU.pot b/harbour/utils/hbmk2/hbmk2.hu_HU.pot new file mode 100644 index 0000000000..ad85fec1df --- /dev/null +++ b/harbour/utils/hbmk2/hbmk2.hu_HU.pot @@ -0,0 +1,728 @@ +# +# This file is generated by Harbour 1.1.0dev (Rev. 10646) +# + +#: hbmk2.prg:1178 +#, c-format +msgid "Warning: Invalid -main value ignored: %1$s" +msgstr "Figyelem: Hibs -main rtk figyelmen kvl hagyva: %1$s" + +#: hbmk2.prg:2976 +#, c-format +msgid "Warning: C compiler script couldn't be created, continuing in command line." +msgstr "Figyelem: C fordt paramterllomnyt nem sikerlt ltrehozni, folytats parancssorban." + +#: hbmk2.prg:202 +#, c-format +msgid "Press any key to continue..." +msgstr "Folytatshoz ssn le egy billentt..." + +#: hbmk2.prg:5291 +#, c-format +msgid "Translation (%1$s): (add your name here)" +msgstr "Fordts (%1$s): Szakts Viktor" + +#: hbmk2.prg:730 +#, c-format +msgid "Error: Architecture value unknown: %1$s" +msgstr "Hiba: Ismeretlen arhitektra: %1$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "pass flag to linker (dynamic library)" +msgstr "paramter tovbbtsa (dinamikus fggvnyknyvtr) linkernek" + +#: hbmk2.prg:3576 +#, c-format +msgid "Autodetected header dir for %1$s: %2$s" +msgstr "Detektlt knyvtr %1$s fejlchez: %2$s" + +#: hbmk2.prg:2600 +#, c-format +msgid "Error: Running Harbour compiler. %1$s" +msgstr "Hiba: Harbour fordt futtatsakor. %1$s" + +#: hbmk2.prg:3200 +#, c-format +msgid "Creating dynamic library... %1$s" +msgstr "Dinamikus fggvnyknyvtr ltrehozsa... %1$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "list of languages to be replaced in ${lng} macros in .pot filenames and output .hbl filenames. Comma separared list:\\n-lng=en-EN,hu-HU,de" +msgstr "" + +#: hbmk2.prg:2588 +#, c-format +msgid "Harbour compiler command (internal):" +msgstr "Habour fordtsi parancs (bels):" + +#: hbmk2.prg:5396 +#, c-format +msgid "clean (in incremental build mode)" +msgstr "" + +#: hbmk2.prg:3002 hbmk2.prg:3391 +#, c-format +msgid "Error: Running C compiler. %1$s:" +msgstr "Hiba: C fordt futtatsakor: %1$s:" + +#: hbmk2.prg:854 +#, c-format +msgid "Error: Compiler value unknown: %1$s" +msgstr "Hiba: Ismeretlen fordt: %1$s" + +#: hbmk2.prg:899 +#, c-format +msgid "Using Harbour: %1$s %2$s %3$s %4$s" +msgstr "Detektlt Harbour: %1$s %2$s %3$s %4$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "pass flag to linker (executable)" +msgstr "paramter tovbbtsa (program) linkernek" + +#: hbmk2.prg:619 +#, c-format +msgid "Autodetected architecture: %1$s" +msgstr "Detektlt architektra: %1$s" + +#: hbmk2.prg:842 +#, c-format +msgid "Autodetected compiler: %1$s" +msgstr "Detektlt fordt: %1$s" + +#: hbmk2.prg:2992 +#, c-format +msgid "C compiler script:" +msgstr "C fordt parancsllomny:" + +#: hbmk2.prg:783 +#, c-format +msgid "Error: Harbour locations couldn't be determined." +msgstr "Hiba: Harbour knytrakat nem sikerlt meghatrozni." + +#: hbmk2.prg:2639 +#, c-format +msgid "Error: Running Harbour compiler. %1$s:" +msgstr "Hiba: Harbour fordt futtatsakor. %1$s:" + +#: hbmk2.prg:2746 +#, c-format +msgid "Warning: Stub helper .c program couldn't be created." +msgstr "Figyelem: .c segdllomnyt nem sikerlt ltrehozni." + +#: hbmk2.prg:3346 +#, c-format +msgid "Running executable:" +msgstr "Program futtatsa:" + +#: hbmk2.prg:5335 +#, c-format +msgid "additional path to search for libraries" +msgstr "tovbbi keressi tvonal knyvtrakhoz" + +#: hbmk2.prg:5335 +#, c-format +msgid "link with multi/single-thread VM" +msgstr "tbbszl/egyszl virtulis gp hasznlata" + +#: hbmk2.prg:4749 +#, c-format +msgid "Error: Cannot create temporary file." +msgstr "Hiba: Ideiglenes fjl nem hozhat ltre." + +#: hbmk2.prg:2834 hbmk2.prg:2873 +#, c-format +msgid "Error: Running resource compiler. %1$s:" +msgstr "Hiba: Erforrs fordt futtatsakor. %1$s:" + +#: hbmk2.prg:1480 +#, c-format +msgid "Error: No source files were specified." +msgstr "Hiba: Nincs megadva forrs fjl." + +#: hbmk2.prg:4576 +#, c-format +msgid "Warning: File cannot be found: %1$s" +msgstr "Figyelem: Fjl nem tallhat: %1$s" + +#: hbmk2.prg:763 +#, c-format +msgid "Error: HB_INSTALL_PREFIX not set, failed to autodetect." +msgstr "Hiba: HB_INSTALL_PREFIX nincs megadva, automata detektls nem jrt sikerrel." + +#: hbmk2.prg:1186 +#, c-format +msgid "Warning: Invalid -gt value ignored: %1$s" +msgstr "Figyelem: Hibs -gt rtk figyelmen kvl hagyva: %1$s" + +#: hbmk2.prg:1374 hbmk2.prg:4196 +#, c-format +msgid "Processing: %1$s" +msgstr "Feldolgozs alatt: %1$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "show commands executed" +msgstr "mutassa a vgrehajtott parancsokat" + +#: hbmk2.prg:5335 +#, c-format +msgid "output file name" +msgstr "kimeneti fjlnv" + +#: hbmk2.prg:4974 +#, c-format +msgid "Blinker ECHO: %1$s" +msgstr "Blinker ECHO: %1$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "link with nulrdd" +msgstr "nulrdd hasznlata" + +#: hbmk2.prg:5076 hbmk2.prg:5092 +#, c-format +msgid "pot: %1$s -> %2$s" +msgstr "pot: %1$s -> %2$s" + +#: hbmk2.prg:4159 +#, c-format +msgid "Processing configuration: %1$s" +msgstr "Alapbelltsok feldolgozsa: %1$s" + +#: hbmk2.prg:5109 hbmk2.prg:5114 +#, c-format +msgid ".pot error: %1$s" +msgstr ".pot hiba: %1$s" + +#: hbmk2.prg:5396 +#, c-format +msgid "inherit all/no (default) flags from Harbour build" +msgstr "rkljn minden/semmi (alaprt.) opcit a Harbourtl" + +#: hbmk2.prg:4337 +#, c-format +msgid "%1$s" +msgstr "%1$s" + +#: hbmk2.prg:846 +#, c-format +msgid "Please choose a compiler by using -comp= option or envvar HB_COMPILER.\\nYou have the following choices on your platform: %1$s" +msgstr "" + +#: hbmk2.prg:848 +#, c-format +msgid "Harbour Make couldn't detect any supported C compiler in your PATH.\\nPlease setup one or set -comp= option or envvar HB_COMPILER to one of these values: %1$s" +msgstr "" + +#: hbmk2.prg:3389 +#, c-format +msgid "Error: Running C compiler job #%1$s. %2$s:" +msgstr "Hiba: C fordt futtatsa. %1$s. szl. %2$s:" + +#: hbmk2.prg:5396 +#, c-format +msgid "output .hbl filename. ${lng} macro is accepted in filename" +msgstr "" + +#: hbmk2.prg:5407 +#, c-format +msgid "Certain .hbp lines (prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=,echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_self}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${}" +msgstr "" + +#: hbmk2.prg:5407 +#, c-format +msgid "Platform filters are accepted in each .hbp line and with several options.\\nFilter format: {[!][||]}. Filters can be combined using '&', '|' operators and grouped by parantheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!owatcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}, {allpocc}, {allgcc}, {allmingw}, {allmsvc}, {x86|x86_64|ia64|arm}" +msgstr "" + +#: hbmk2.prg:5335 +#, c-format +msgid "additional path to search for headers" +msgstr "tovbbi keressi tvonal a fejlcekhez" + +#: hbmk2.prg:1491 +#, c-format +msgid "Error: Working directory cannot be created: %1$s" +msgstr "Hiba: Munkaknyvtr nem hozhat ltre: %1$s" + +#: hbmk2.prg:2808 +#, c-format +msgid "Compiling resources..." +msgstr "Erforrsok fordtsa..." + +#: hbmk2.prg:3324 +#, c-format +msgid "Compression command:" +msgstr "Tmrtsi parancs:" + +#: hbmk2.prg:5308 +#, c-format +msgid " hbmk [options] [] " +msgstr "" + +#: hbmk2.prg:5014 +#, c-format +msgid "Error: Cannot open file: %1$s" +msgstr "Hiba: Fjl nem nyithat meg: %1$s" + +#: hbmk2.prg:5335 +#, c-format +msgid "link with GT GT driver, can be repeated to link with more GTs. First one will be the default at runtime" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "pass flag to output executable when -run option is used" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "show commands to be executed, but don't execute them" +msgstr "" + +#: hbmk2.prg:5057 +#, c-format +msgid "pot: in: %1$s" +msgstr "" + +#: hbmk2.prg:5136 +#, c-format +msgid "Error: Cannot create file: %1$s" +msgstr "Hiba: Fjl nem hozhat ltre: %1$s" + +#: hbmk2.prg:2987 hbmk2.prg:3381 +#, c-format +msgid "C compiler command:" +msgstr "C fordt parancsa:" + +#: hbmk2.prg:5396 +#, c-format +msgid "output Harbour static library directory" +msgstr "visszatr a Harbour statikus fggvnyknyvtrak knyvtrval" + +#: hbmk2.prg:5312 +#, c-format +msgid "Notes:" +msgstr "Megjegyzsek:" + +#: hbmk2.prg:5308 hbmk2.prg:5308 hbmk2.prg:5312 hbmk2.prg:5326 hbmk2.prg:5396 hbmk2.prg:5396 +#, c-format +msgid " " +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "stop after creating the object files\\ncreate link/copy hbmk to hbcmp/clipper for the same effect" +msgstr "" + +#: hbmk2.prg:5308 +#, c-format +msgid "Syntax:" +msgstr "Hasznlat:" + +#: hbmk2.prg:5308 +#, c-format +msgid "Options:" +msgstr "Opcik:" + +#: hbmk2.prg:5326 +#, c-format +msgid "Supported values for each supported value:" +msgstr "" + +#: hbmk2.prg:5335 +#, c-format +msgid "link with static/shared libs" +msgstr "" + +#: hbmk2.prg:5335 +#, c-format +msgid "link with library" +msgstr "" + +#: hbmk2.prg:5338 +#, c-format +msgid "long help" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "link with all static libs" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "create (or not) a map file" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "strip (no strip) binaries" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "run/don't run output executable" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "stop without doing anything" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "pass flag to Harbour" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "pass flag to C compiler" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "enable incremental build mode" +msgstr "" + +#: hbmk2.prg:5396 +#, c-format +msgid "output Harbour dynamic library directory" +msgstr "visszatr a Harbour dinamikus fggvnyknyvtrak knyvtrval" + +#: hbmk2.prg:5396 +#, c-format +msgid "start n compilation threads (MT platforms/builds only)" +msgstr "" + +#: hbmk2.prg:5407 +#, c-format +msgid "Multiple -l, -L and