Import initial din SVN ROAAUTO/Trunk @HEAD
This commit is contained in:
27
COMUN/utile/hpdf/PDFListener.h
Normal file
27
COMUN/utile/hpdf/PDFListener.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#include reportlisteners.h
|
||||
#include foxpro_reporting.h
|
||||
|
||||
|
||||
#define FALSE .F.
|
||||
#define TRUE .T.
|
||||
#define CR CHR(13)
|
||||
#define LF CHR(10)
|
||||
#define chr0 Chr(0)
|
||||
#define CONV_FACTOR 0.075
|
||||
|
||||
*percents of FONTMETRIC(1) used to adjust line height , at least some aproximate value
|
||||
#define LINE_ADJUST_FIELDS 0.845
|
||||
#define LINE_ADJUST_LABELS 0.90
|
||||
|
||||
*registry constants
|
||||
#define HKEY_CLASSES_ROOT -2147483648
|
||||
#define HKEY_CURRENT_USER -2147483647
|
||||
#define HKEY_LOCAL_MACHINE -2147483646
|
||||
#define HKEY_USERS -2147483645
|
||||
|
||||
#define REG_SZ 1 && Data string
|
||||
#define REG_BINARY 3 && Binary data in any form.
|
||||
#define REG_DWORD 4 && A 32-bit number.
|
||||
|
||||
#define CLSID_JPG '{557CF401-1A04-11D3-9A73-0000F81EF32E}'
|
||||
|
||||
BIN
COMUN/utile/hpdf/ReportOutput/_frxcursor.VCT
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/_frxcursor.VCT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/_frxcursor.VCX
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/_frxcursor.VCX
Normal file
Binary file not shown.
81
COMUN/utile/hpdf/ReportOutput/_frxcursor.h
Normal file
81
COMUN/utile/hpdf/ReportOutput/_frxcursor.h
Normal file
@@ -0,0 +1,81 @@
|
||||
*=======================================================
|
||||
* frxCursor.vcx compile constants
|
||||
*=======================================================
|
||||
|
||||
#include foxpro_reporting.h
|
||||
|
||||
*-------------------------------------------------------
|
||||
* Magic numbers
|
||||
*-------------------------------------------------------
|
||||
|
||||
*-- Report Layout object dimensions
|
||||
*--
|
||||
#define BAND_SEPARATOR_HEIGHT_FRUS 2083.333
|
||||
#define BAND_SEPARATOR_HEIGHT_PIXELS 20
|
||||
|
||||
*-- Object Cursor filter modes:
|
||||
*--
|
||||
#define OBJCSR_ALL_OBJECTS_IGNORE_GROUPS 0
|
||||
#define OBJCSR_FILTER_ON_SELECTED 1
|
||||
#define OBJCSR_SHOW_ALL_OBJECTS 2
|
||||
#define OBJCSR_FILTER_GROUP 3
|
||||
|
||||
#define OBJCSR_SORTORDER_TYPE 1
|
||||
#define OBJCSR_SORTORDER_BAND 2
|
||||
|
||||
#define FRX_OBJTYPE_MULTISELECT 99
|
||||
|
||||
*-------------------------------------------------------
|
||||
* Localization strings
|
||||
*-------------------------------------------------------
|
||||
|
||||
*-- FRX object targets:
|
||||
*--
|
||||
#define TARGET_MULTISELECT_LOC "Multiple Selection"
|
||||
#define TARGET_REPORT_COMMENT_LOC "Comment"
|
||||
#define TARGET_REPORT_GLOBAL_LOC "Report/Global"
|
||||
#define TARGET_WORKAREA_LOC "Workarea"
|
||||
#define TARGET_INDEX_LOC "Index"
|
||||
#define TARGET_RELATION_LOC "Relation"
|
||||
#define TARGET_TEXT_LABEL_LOC "Label"
|
||||
#define TARGET_LINE_LOC "Line"
|
||||
#define TARGET_BOX_LOC "Rectangle"
|
||||
#define TARGET_FIELD_LOC "Field"
|
||||
#define TARGET_TITLE_LOC "Title"
|
||||
#define TARGET_PAGE_HEADER_LOC "Page Header"
|
||||
#define TARGET_COL_HEADER_LOC "Column Header"
|
||||
#define TARGET_GROUP_HEADER_LOC "Group Header"
|
||||
#define TARGET_DETAIL_LOC "Detail"
|
||||
#define TARGET_GROUP_FOOTER_LOC "Group Footer"
|
||||
#define TARGET_COL_FOOTER_LOC "Column Footer"
|
||||
#define TARGET_PAGE_FOOTER_LOC "Page Footer"
|
||||
#define TARGET_SUMMARY_LOC "Summary"
|
||||
#define TARGET_DETAIL_HEADER_LOC "Detail Header"
|
||||
#define TARGET_DETAIL_FOOTER_LOC "Detail Footer"
|
||||
#define TARGET_UNKNOWN_BAND_LOC "Unknown band type"
|
||||
#define TARGET_GROUPED_LOC "Grouped Objects"
|
||||
#define TARGET_PICTURE_LOC "Picture/OLE Bound"
|
||||
#define TARGET_VARIABLE_LOC "Variable"
|
||||
#define TARGET_PDRIVER_LOC "Printer Driver Setup"
|
||||
#define TARGET_FONTRESO_LOC "Font Resource"
|
||||
#define TARGET_DATAENV_LOC "Data Environment"
|
||||
#define TARGET_CURSOR_LOC "Cursor"
|
||||
#define TARGET_UNKNOWN_LOC "Unknown Target type"
|
||||
|
||||
#define TARGET_FORCED_PAGEHEADER_LOC "Resolved as Page Header"
|
||||
#define TARGET_UNPREDICTABLE_LOC "Indeterminate behavior"
|
||||
|
||||
*-- Calculation "Reset On" combo list
|
||||
*--
|
||||
#define ENDOFREPORT_LOC "Report"
|
||||
#define ENDOFPAGE_LOC "Page"
|
||||
#define ENDOFCOLUMN_LOC "Column"
|
||||
#define GROUP_BY_LOC "Group: "
|
||||
#define DETAIL_LOC "Detail "
|
||||
#define NEW_LOC "new"
|
||||
|
||||
|
||||
*-- Messagebox error messages:
|
||||
*--
|
||||
#define METADATA_DOM_ERROR_LOC "Exception occurred in frxCursor::getMetadataDomDoc()"
|
||||
#define CREATE_IC_FAILURE_LOC "Unable to create device context. CreateIC() returned 0."
|
||||
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.cdx
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.cdx
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.dbf
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.dbf
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.fpt
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/_reportoutputconfig.fpt
Normal file
Binary file not shown.
565
COMUN/utile/hpdf/ReportOutput/ctl32.h
Normal file
565
COMUN/utile/hpdf/ReportOutput/ctl32.h
Normal file
@@ -0,0 +1,565 @@
|
||||
|
||||
**************************************************************************************
|
||||
*-- Custom
|
||||
**************************************************************************************
|
||||
#Define TRUE .T.
|
||||
#Define FALSE .F.
|
||||
|
||||
#Define CR CHR(13)
|
||||
#Define LF CHR(10)
|
||||
#Define CRLF CR+LF
|
||||
|
||||
#Define BORDERSTYLE_NONE 0
|
||||
#Define BORDERSTYLE_FIXEDSINGLE 1
|
||||
#Define BORDERSTYLE_FIXEDDIALOG 2
|
||||
#Define BORDERSTYLE_SIZABLE 3
|
||||
|
||||
#Define SHOWWINDOW_INSCREEN 0
|
||||
#Define SHOWWINDOW_INTOPLEVELFORM 1
|
||||
#Define SHOWWINDOW_ASTOPLEVELFORM 2
|
||||
|
||||
#Define VERSION2_RUNTIME 0
|
||||
|
||||
*-- ObjToClient parameters
|
||||
#Define OTC_TOP 1
|
||||
#Define OTC_LEFT 2
|
||||
#Define OTC_WIDTH 3
|
||||
#Define OTC_HEIGHT 4
|
||||
|
||||
#Define CTL32_FORMTYPE_DEFAULT 0
|
||||
#Define CTL32_FORMTYPE_TOPLEVEL 1
|
||||
#Define CTL32_FORMTYPE_SCREEN 2
|
||||
|
||||
#Define CTL32_SBBORDER_HORIZONTAL 1
|
||||
#Define CTL32_SBBORDER_VERTICAL 2
|
||||
#Define CTL32_SBBORDER_SEPARATOR 3
|
||||
|
||||
**************************************************************************************
|
||||
*-- API
|
||||
**************************************************************************************
|
||||
#Define CCM_FIRST 0x2000
|
||||
#Define CCM_GETUNICODEFORMAT 0x2006 && (CCM_FIRST + 6)
|
||||
#Define CCM_SETBKCOLOR 0x2001 && (CCM_FIRST + 1)
|
||||
#Define CCM_SETUNICODEFORMAT 0x2005 && (CCM_FIRST + 5)
|
||||
|
||||
#Define CCS_ADJUSTABLE 0x20
|
||||
#Define CCS_BOTTOM 0x3
|
||||
#Define CCS_LEFT 0x81 && Bitor(CCS_VERT, CCS_TOP)
|
||||
#Define CCS_NODIVIDER 0x40
|
||||
#Define CCS_NOMOVEX 0x82 && Bitor(CCS_VERT, CCS_NOMOVEY)
|
||||
#Define CCS_NOMOVEY 0x2
|
||||
#Define CCS_NOPARENTALIGN 0x8
|
||||
#Define CCS_NORESIZE 0x4
|
||||
#Define CCS_RIGHT 0x83 && Bitor(CCS_VERT, CCS_BOTTOM)
|
||||
#Define CCS_TOP 0x1
|
||||
#Define CCS_VERT 0x80
|
||||
|
||||
|
||||
#Define CLR_DEFAULT 0xFF000000
|
||||
#Define COLOR_BTNFACE 15
|
||||
#Define COLOR_BTNFACE 15
|
||||
#Define COLOR_HIGHLIGHT 13
|
||||
#Define COLOR_WINDOW 5
|
||||
|
||||
#DEFINE CW_USEDEFAULT 0x80000000
|
||||
|
||||
#Define DATE_LONGDATE 0x2
|
||||
#Define DATE_SHORTDATE 0x1
|
||||
|
||||
#Define GW_CHILD 5
|
||||
|
||||
#Define GWL_EXSTYLE -20
|
||||
#Define GWL_HINSTANCE -6
|
||||
#Define GWL_STYLE -16
|
||||
#Define GWL_WNDPROC -4
|
||||
|
||||
#Define HWND_TOP 0
|
||||
#Define LOCALE_SISO639LANGNAME 0x59
|
||||
#Define LOCALE_SYSTEM_DEFAULT 0x800
|
||||
#Define LOCALE_USER_DEFAULT 0x400
|
||||
#Define LOCALE_NOUSEROVERRIDE 0x80000000
|
||||
|
||||
#DEFINE CCM_GETUNICODEFORMAT (CCM_FIRST + 6)
|
||||
#DEFINE CCM_SETUNICODEFORMAT (CCM_FIRST + 5)
|
||||
|
||||
#DEFINE MAXLONG 0x7FFFFFFF
|
||||
|
||||
#DEFINE MCM_FIRST 0x1000
|
||||
#DEFINE MCM_GETCOLOR 0x1011 && (MCM_FIRST + 11)
|
||||
#DEFINE MCM_GETCURSEL 0x1001 && (MCM_FIRST + 1)
|
||||
#DEFINE MCM_GETFIRSTDAYOFWEEK 0x1016 && (MCM_FIRST + 16)
|
||||
#DEFINE MCM_GETMAXSELCOUNT 0x1003 && (MCM_FIRST + 3)
|
||||
#DEFINE MCM_GETMAXTODAYWIDTH 0x1021 && (MCM_FIRST + 21)
|
||||
#DEFINE MCM_GETMINREQRECT 0x1009 && (MCM_FIRST + 9)
|
||||
#DEFINE MCM_GETMONTHDELTA 0x1019 && (MCM_FIRST + 19)
|
||||
#DEFINE MCM_GETMONTHRANGE 0x1007 && (MCM_FIRST + 7)
|
||||
#DEFINE MCM_GETRANGE (MCM_FIRST + 17)
|
||||
#DEFINE MCM_GETSELRANGE (MCM_FIRST + 5)
|
||||
#DEFINE MCM_GETTODAY (MCM_FIRST + 13)
|
||||
#DEFINE MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
|
||||
#DEFINE MCM_HITTEST (MCM_FIRST + 14)
|
||||
#DEFINE MCM_SETCOLOR (MCM_FIRST + 10)
|
||||
#DEFINE MCM_SETCURSEL (MCM_FIRST + 2)
|
||||
#DEFINE MCM_SETDAYSTATE (MCM_FIRST + 8)
|
||||
#DEFINE MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
|
||||
#DEFINE MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
|
||||
#DEFINE MCM_SETMONTHDELTA (MCM_FIRST + 20)
|
||||
#DEFINE MCM_SETRANGE (MCM_FIRST + 18)
|
||||
#DEFINE MCM_SETSELRANGE (MCM_FIRST + 6)
|
||||
#DEFINE MCM_SETTODAY (MCM_FIRST + 12)
|
||||
#DEFINE MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
|
||||
|
||||
#DEFINE MCS_DAYSTATE 0x1
|
||||
#DEFINE MCS_MULTISELECT 0x2
|
||||
#DEFINE MCS_NOTODAY 0x10
|
||||
#DEFINE MCS_NOTODAYCIRCLE 0x8
|
||||
#DEFINE MCS_WEEKNUMBERS 0x4
|
||||
|
||||
#DEFINE MCSC_BACKGROUND 0
|
||||
#DEFINE MCSC_MONTHBK 4
|
||||
#DEFINE MCSC_TEXT 1
|
||||
#DEFINE MCSC_TITLEBK 2
|
||||
#DEFINE MCSC_TITLETEXT 3
|
||||
#DEFINE MCSC_TRAILINGTEXT 5
|
||||
|
||||
#Define MF_APPEND 0x100
|
||||
#Define MF_BITMAP 0x4
|
||||
#Define MF_BYCOMMAND 0x0
|
||||
#Define MF_BYPOSITION 0x400
|
||||
#Define MF_CALLBACKS 0x8000000
|
||||
#Define MF_CHANGE 0x80
|
||||
#Define MF_CHECKED 0x8
|
||||
#Define MF_CONV 0x40000000
|
||||
#Define MF_DEFAULT 0x1000
|
||||
#Define MF_DELETE 0x200
|
||||
#Define MF_DISABLED 0x2
|
||||
#Define MF_DLL_NAME "Microsoft Picture Converter"
|
||||
#Define MF_ENABLED 0x0
|
||||
#Define MF_END 0x80
|
||||
#Define MF_ERRORS 0x10000000
|
||||
#Define MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED 0x8
|
||||
#Define MF_FLAGS_EVEN_IF_NO_RESOURCE 0x1
|
||||
#Define MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE 0x4
|
||||
#Define MF_FLAGS_NO_CREATE_IF_NO_RESOURCE 0x2
|
||||
#Define MF_FPCR_FUNC 0x25
|
||||
#Define MF_FPCR_FUNC_STR "mf_fpcr"
|
||||
#Define MF_GRAYED 0x1
|
||||
#Define MF_HELP 0x4000
|
||||
#Define MF_HILITE 0x80
|
||||
#Define MF_HSZ_INFO 0x1000000
|
||||
#Define MF_INSERT 0x0
|
||||
#Define MF_LINKS 0x20000000
|
||||
#Define MF_MASK 0xFF000000
|
||||
#Define MF_MENUBARBREAK 0x20
|
||||
#Define MF_MENUBREAK 0x40
|
||||
#Define MF_MOUSESELECT 0x8000
|
||||
#Define MF_OWNERDRAW 0x100
|
||||
#Define MF_POPUP 0x10
|
||||
#Define MF_POSTMSGS 0x4000000
|
||||
#Define MF_REMOVE 0x1000
|
||||
#Define MF_RIGHTJUSTIFY 0x4000
|
||||
#Define MF_SENDMSGS 0x2000000
|
||||
#Define MF_SEPARATOR 0x800
|
||||
#Define MF_STRING 0x0
|
||||
#Define MF_SYSMENU 0x2000
|
||||
#Define MF_UNCHECKED 0x0
|
||||
#Define MF_UNHILITE 0x0
|
||||
#Define MF_USECHECKBITMAPS 0x200
|
||||
|
||||
#Define PBM_DELTAPOS 0x403 && (WM_USER+3)
|
||||
#Define PBM_GETPOS 0x408 && (WM_USER+8)
|
||||
#Define PBM_GETRANGE 0x407 && (WM_USER+7)
|
||||
#Define PBM_SETBARCOLOR 0x409 && (WM_USER + 9)
|
||||
#Define PBM_SETBKCOLOR 0x2001 && CCM_SETBKCOLOR
|
||||
#Define PBM_SETMARQUEE 0x40A && (WM_USER+10)
|
||||
#Define PBM_SETPOS 0x402 && (WM_USER+2)
|
||||
#Define PBM_SETRANGE 0x401 && (WM_USER+1)
|
||||
#Define PBM_SETRANGE32 0x406 && (WM_USER + 6)
|
||||
#Define PBM_SETSTEP 0x404 && (WM_USER + 4)
|
||||
#Define PBM_STEPIT 0x405 && (WM_USER+5)
|
||||
|
||||
#Define PBS_MARQUEE 0x8 && Comctl32.dll version 6
|
||||
#Define PBS_SMOOTH 0x1 && Comctl32.dll Version 4.7 or later
|
||||
#Define PBS_VERTICAL 0x4 && Comctl32.dll Version 4.7 or later
|
||||
|
||||
#Define PS_SOLID 0
|
||||
|
||||
#DEFINE RBS_AUTOSIZE 0x2000
|
||||
#DEFINE RBS_BANDBORDERS 0x400
|
||||
#DEFINE RBS_DBLCLKTOGGLE 0x8000
|
||||
#DEFINE RBS_FIXEDORDER 0x800
|
||||
#DEFINE RBS_REGISTERDROP 0x1000
|
||||
#DEFINE RBS_TOOLTIPS 0x100
|
||||
#DEFINE RBS_VARHEIGHT 0x200
|
||||
#DEFINE RBS_VERTICALGRIPPER 0x4000
|
||||
#DEFINE RBSTR_CHANGERECT 0x2
|
||||
#DEFINE RBSTR_PREFERNOLINEBREAK 0x1
|
||||
|
||||
#DEFINE SB_BOTH 3
|
||||
#DEFINE SB_CTL 2
|
||||
|
||||
#Define SB_GETBORDERS 0x407 && (WM_USER + 7)
|
||||
#Define SB_GETICON 0x414 && (WM_USER + 20)
|
||||
#Define SB_GETPARTS 0x406 && (WM_USER + 6)
|
||||
#Define SB_GETRECT 0x40A && (WM_USER + 10)
|
||||
#Define SB_GETTEXTA 0x402 && (WM_USER + 2)
|
||||
#Define SB_GETTEXTLENGTHA 0x403 && (WM_USER + 3)
|
||||
#Define SB_GETTEXTLENGTHW 0x40C && (WM_USER + 12)
|
||||
#Define SB_GETTEXTW 0x40D && (WM_USER + 13)
|
||||
#Define SB_GETTIPTEXTA 0x412 && (WM_USER + 18)
|
||||
#Define SB_GETTIPTEXTW 0x413 && (WM_USER + 19)
|
||||
#Define SB_GETUNICODEFORMAT 0x2006 && CCM_GETUNICODEFORMAT
|
||||
#DEFINE SB_HORZ 0
|
||||
#Define SB_ISSIMPLE 0x40E && (WM_USER + 14)
|
||||
#Define SB_SETBKCOLOR 0x2001 && CCM_SETBKCOLOR
|
||||
#Define SB_SETICON 0x40F && (WM_USER + 15)
|
||||
#Define SB_SETMINHEIGHT 0x408 && (WM_USER + 8)
|
||||
#Define SB_SETPARTS 0x404 && (WM_USER + 4)
|
||||
#Define SB_SETTEXTA 0x401 && (WM_USER + 1)
|
||||
#Define SB_SETTEXTW 0x40B && (WM_USER + 11)
|
||||
#Define SB_SETTIPTEXTA 0x410 && (WM_USER + 16)
|
||||
#Define SB_SETTIPTEXTW 0x411 && (WM_USER + 17)
|
||||
#Define SB_SETUNICODEFORMAT 0X2005 && CCM_SETUNICODEFORMAT
|
||||
#Define SB_SIMPLE 0x409 && (WM_USER + 9)
|
||||
#DEFINE SB_VERT 1
|
||||
|
||||
#DEFINE SB_LINELEFT 0
|
||||
#DEFINE SB_LINERIGHT 1
|
||||
#DEFINE SB_PAGELEFT 2
|
||||
#DEFINE SB_PAGERIGHT 3
|
||||
#DEFINE SB_THUMBPOSITION 4
|
||||
#DEFINE SB_THUMBTRACK 5
|
||||
#DEFINE SB_LEFT 6
|
||||
#DEFINE SB_RIGHT 7
|
||||
#DEFINE SB_ENDSCROLL 8
|
||||
|
||||
#DEFINE SB_LINEUP 0
|
||||
#DEFINE SB_LINEDOWN 1
|
||||
#DEFINE SB_PAGEUP 2
|
||||
#DEFINE SB_PAGEDOWN 3
|
||||
#DEFINE SB_TOP 6
|
||||
#DEFINE SB_BOTTOM 7
|
||||
|
||||
#Define SBARS_SIZEGRIP 0x100
|
||||
#Define SBARS_TOOLTIPS 0x800
|
||||
|
||||
#DEFINE SBM_ENABLE_ARROWS 0xE4
|
||||
#DEFINE SBM_GETPOS 0xE1
|
||||
#DEFINE SBM_GETRANGE 0xE3
|
||||
#DEFINE SBM_GETSCROLLBARINFO 0xEB
|
||||
#DEFINE SBM_GETSCROLLINFO 0xEA
|
||||
#DEFINE SBM_SETPOS 0xE0
|
||||
#DEFINE SBM_SETRANGE 0xE2
|
||||
#DEFINE SBM_SETRANGEREDRAW 0xE6
|
||||
#DEFINE SBM_SETSCROLLINFO 0xE9
|
||||
|
||||
#DEFINE SBS_BOTTOMALIGN 0x4
|
||||
#DEFINE SBS_HORZ 0x0
|
||||
#DEFINE SBS_LEFTALIGN 0x2
|
||||
#DEFINE SBS_RIGHTALIGN 0x4
|
||||
#DEFINE SBS_SIZEBOX 0x8
|
||||
#DEFINE SBS_SIZEBOXBOTTOMRIGHTALIGN 0x4
|
||||
#DEFINE SBS_SIZEBOXTOPLEFTALIGN 0x2
|
||||
#DEFINE SBS_SIZEGRIP 0x10
|
||||
#DEFINE SBS_TOPALIGN 0x2
|
||||
#DEFINE SBS_VERT 0x1
|
||||
|
||||
#Define SBT_NOBORDERS 0x100
|
||||
#Define SBT_NOTABPARSING 0x800
|
||||
#Define SBT_OWNERDRAW 0x1000
|
||||
#Define SBT_POPOUT 0x200
|
||||
#Define SBT_RTLREADING 0x400
|
||||
#Define SBT_TOOLTIPS 0x800
|
||||
|
||||
#Define SC_CLOSE 0xF060
|
||||
#Define SC_MAXIMIZE 0xF030
|
||||
#Define SC_MINIMIZE 0xF020
|
||||
#Define SC_MOVE 0xF010
|
||||
#Define SC_RESTORE 0xF120
|
||||
#Define SC_SEPARATOR 0xF00F
|
||||
#Define SC_SIZE 0xF000
|
||||
|
||||
#DEFINE SIF_ALL 0x17 && Bitor(SIF_RANGE, SIF_PAGE, SIF_POS, SIF_TRACKPOS)
|
||||
#DEFINE SIF_DISABLENOSCROLL 0x8
|
||||
#DEFINE SIF_PAGE 0x2
|
||||
#DEFINE SIF_POS 0x4
|
||||
#DEFINE SIF_RANGE 0x1
|
||||
#DEFINE SIF_TRACKPOS 0x10
|
||||
|
||||
#DEFINE SS_BITMAP 0xE
|
||||
#DEFINE SS_BLACKFRAME 0x7
|
||||
#DEFINE SS_BLACKRECT 0x4
|
||||
#DEFINE SS_CENTER 0x1
|
||||
#DEFINE SS_CENTERIMAGE 0x200
|
||||
#DEFINE SS_ELLIPSISMASK 0xC000
|
||||
#DEFINE SS_ENDELLIPSIS 0x4000
|
||||
#DEFINE SS_ENHMETAFILE 0xF
|
||||
#DEFINE SS_ETCHEDFRAME 0x12
|
||||
#DEFINE SS_ETCHEDHORZ 0x10
|
||||
#DEFINE SS_ETCHEDVERT 0x11
|
||||
#DEFINE SS_GRAYFRAME 0x8
|
||||
#DEFINE SS_GRAYRECT 0x5
|
||||
#DEFINE SS_ICON 0x3
|
||||
#DEFINE SS_LEFT 0x0
|
||||
#DEFINE SS_LEFTNOWORDWRAP 0xC
|
||||
#DEFINE SS_LEVEL_VERSION 0
|
||||
#DEFINE SS_MAJOR_VERSION 7
|
||||
#DEFINE SS_MINIMUM_VERSION "7.00.00.0000"
|
||||
#DEFINE SS_MINOR_VERSION 0
|
||||
#DEFINE SS_NOPREFIX 0x80
|
||||
#DEFINE SS_NOTIFY 0x100
|
||||
#DEFINE SS_OWNERDRAW 0xD
|
||||
#DEFINE SS_PATHELLIPSIS 0x8000
|
||||
#DEFINE SS_REALSIZECONTROL 0x40
|
||||
#DEFINE SS_REALSIZEIMAGE 0x800
|
||||
#DEFINE SS_RIGHT 0x2
|
||||
#DEFINE SS_RIGHTJUST 0x400
|
||||
#DEFINE SS_SIMPLE 0xB
|
||||
#DEFINE SS_SUNKEN 0x1000
|
||||
#DEFINE SS_TYPEMASK 0x1F
|
||||
#DEFINE SS_USERITEM 0xA
|
||||
#DEFINE SS_WHITEFRAME 0x9
|
||||
#DEFINE SS_WHITERECT 0x6
|
||||
#DEFINE SS_WORDELLIPSIS 0xC000
|
||||
|
||||
|
||||
|
||||
#Define SW_AUTOPROF_LOAD_MASK 0x1
|
||||
#Define SW_AUTOPROF_SAVE_MASK 0x2
|
||||
#Define SW_ERASE 0x4
|
||||
#Define SW_FORCEMINIMIZE 11
|
||||
#Define SW_HIDE 0
|
||||
#Define SW_INVALIDATE 0x2
|
||||
#Define SW_MAX 10
|
||||
#Define SW_MAXIMIZE 3
|
||||
#Define SW_MINIMIZE 6
|
||||
#Define SW_NORMAL 1
|
||||
#Define SW_OTHERUNZOOM 4
|
||||
#Define SW_OTHERZOOM 2
|
||||
#Define SW_PARENTCLOSING 1
|
||||
#Define SW_PARENTOPENING 3
|
||||
#Define SW_RESTORE 9
|
||||
#Define SW_SCROLLCHILDREN 0x1
|
||||
#Define SW_SHOW 5
|
||||
#Define SW_SHOWDEFAULT 10
|
||||
#Define SW_SHOWMAXIMIZED 3
|
||||
#Define SW_SHOWMINIMIZED 2
|
||||
#Define SW_SHOWMINNOACTIVE 7
|
||||
#Define SW_SHOWNA 8
|
||||
#Define SW_SHOWNOACTIVATE 4
|
||||
#Define SW_SHOWNORMAL 1
|
||||
|
||||
#Define SWP_FRAMECHANGED 0x20
|
||||
#Define SWP_NOMOVE 0x2
|
||||
#Define SWP_NOSIZE 0x1
|
||||
#Define SWP_NOZORDER 0x4
|
||||
|
||||
#Define TIME_NOSECONDS 0x2
|
||||
|
||||
#Define WM_ACTIVATE 0x0006
|
||||
#Define WM_ACTIVATEAPP 0x001C
|
||||
#Define WM_GETFONT 0x0031
|
||||
#DEFINE WM_HSCROLL 0x0114
|
||||
#Define WM_NCPAINT 0x0085
|
||||
#Define WM_NOTIFY 0x004E
|
||||
#Define WM_PAINT 0x000F
|
||||
#Define WM_SIZE 0x0005
|
||||
#Define WM_SYSCOLORCHANGE 0x0015
|
||||
#Define WM_THEMECHANGED 0x031A
|
||||
#Define WM_USER 0x0400
|
||||
#DEFINE WM_VSCROLL 0x0115
|
||||
|
||||
#DEFINE WS_ACTIVECAPTION 0x1
|
||||
#DEFINE WS_BORDER 0x800000
|
||||
#DEFINE WS_BORDER_BIT 23
|
||||
#DEFINE WS_CAPTION 0xC00000
|
||||
#Define WS_CHILD 0x40000000
|
||||
#DEFINE WS_CHILDWINDOW 0x40000000
|
||||
#Define WS_CLIPCHILDREN 0x2000000
|
||||
#Define WS_CLIPSIBLINGS 0x4000000
|
||||
#DEFINE WS_DISABLED 0x8000000
|
||||
#DEFINE WS_DLGFRAME 0x400000
|
||||
#Define WS_VISIBLE 0x10000000
|
||||
|
||||
#Define WS_EX_LAYOUTRTL 0x400000
|
||||
#Define WS_EX_LAYOUTRTL_BIT 22
|
||||
#Define WS_EX_LEFT 0x0
|
||||
#Define WS_EX_LTRREADING 0x0
|
||||
#Define WS_EX_NOPARENTNOTIFY 0x4
|
||||
#Define WS_EX_RIGHTSCROLLBAR 0x0
|
||||
#Define WS_EX_STATICEDGE 0x20000
|
||||
#Define WS_EX_STATICEDGE_BIT 17
|
||||
#Define WS_EX_TOPMOST 0x8
|
||||
|
||||
|
||||
#DEFINE WS_EX_ACCEPTFILES 0x10
|
||||
#DEFINE WS_EX_APPWINDOW 0x40000
|
||||
#DEFINE WS_EX_CLIENTEDGE 0x200
|
||||
#DEFINE WS_EX_CONTEXTHELP 0x400
|
||||
#DEFINE WS_EX_CONTROLPARENT 0x10000
|
||||
#DEFINE WS_EX_DLGMODALFRAME 0x1
|
||||
#DEFINE WS_EX_LAYERED 0x80000
|
||||
#DEFINE WS_EX_LEFTSCROLLBAR 0x4000
|
||||
#DEFINE WS_EX_MDICHILD 0x40
|
||||
#DEFINE WS_EX_NOACTIVATE 0x8000000
|
||||
#DEFINE WS_EX_NOINHERITLAYOUT 0x100000
|
||||
#DEFINE WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE)
|
||||
#DEFINE WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE Or WS_EX_TOOLWINDOW Or WS_EX_TOPMOST)
|
||||
#DEFINE WS_EX_RIGHT 0x1000
|
||||
#DEFINE WS_EX_RTLREADING 0x2000
|
||||
#DEFINE WS_EX_TOOLWINDOW 0x80
|
||||
#DEFINE WS_EX_TOPMOST 0x8
|
||||
#DEFINE WS_EX_TRANSPARENT 0x20
|
||||
#DEFINE WS_EX_WINDOWEDGE 0x100
|
||||
|
||||
|
||||
|
||||
|
||||
**************************************************************************************
|
||||
* From foxpro.h
|
||||
**************************************************************************************
|
||||
|
||||
*-- Sysmetric() parameter values
|
||||
#Define SYSMETRIC_SCREENWIDTH 1 && Screen width
|
||||
#Define SYSMETRIC_SCREENHEIGHT 2 && Screen width
|
||||
#Define SYSMETRIC_SIZINGBORDERWIDTH 3 && Width of the sizing border around a resizable window
|
||||
#Define SYSMETRIC_SIZINGBORDERHEIGHT 4 && Height of the sizing border around a resizable window
|
||||
#Define SYSMETRIC_VSCROLLBARWIDTH 5 && Width of a vertical scroll bar
|
||||
#Define SYSMETRIC_VSCROLLBARHEIGHT 6 && Height of the arrow bitmap on a vertical scroll bar
|
||||
#Define SYSMETRIC_HSCROLLBARWIDTH 7 && Width of the arrow bitmap on a horizontal scroll bar
|
||||
#Define SYSMETRIC_HSCROLLBARHEIGHT 8 && Height of a horizontal scroll bar
|
||||
#Define SYSMETRIC_WINDOWTITLEHEIGHT 9 && Height of window title (caption) area
|
||||
#Define SYSMETRIC_WINDOWBORDERWIDTH 10 && Width of a window border
|
||||
#Define SYSMETRIC_WINDOWBORDERHEIGHT 11 && Height of a window border
|
||||
#Define SYSMETRIC_WINDOWFRAMEWIDTH 12 && Width of the frame around the perimeter of a window that has a caption but is not sizable
|
||||
#Define SYSMETRIC_WINDOWFRAMEHEIGHT 13 && Height of the frame around the perimeter of a window that has a caption but is not sizable
|
||||
#Define SYSMETRIC_THUMBBOXWIDTH 14 && Width of the thumb box in a horizontal scroll bar
|
||||
#Define SYSMETRIC_THUMBBOXHEIGHT 15 && Height of the thumb box in a vertical scroll bar
|
||||
#Define SYSMETRIC_ICONWIDTH 16 && Width of an icon
|
||||
#Define SYSMETRIC_ICONHEIGHT 17 && Height of an icon
|
||||
#Define SYSMETRIC_CURSORWIDTH 18 && Width of a cursor
|
||||
#Define SYSMETRIC_CURSORHEIGHT 19 && Height of a cursor
|
||||
#Define SYSMETRIC_MENUBAR 20 && Height of a single-line menu bar
|
||||
#Define SYSMETRIC_CLIENTWIDTH 21 && Width of the client area for a full-screen window
|
||||
#Define SYSMETRIC_CLIENTHEIGHT 22 && Height of the client area for a full-screen window
|
||||
#Define SYSMETRIC_KANJIWINHEIGHT 23 && Height of the Kanji window at the bottom of the screen in DBCS versions
|
||||
#Define SYSMETRIC_MINDRAGWIDTH 24 && Minimum tracking width of a window. (The user cannot drag the window frame to a size smaller than this)
|
||||
#Define SYSMETRIC_MINDRAGHEIGHT 25 && Minimum tracking height of a window. (The user cannot drag the window frame to a size smaller than this)
|
||||
#Define SYSMETRIC_MINWINDOWWIDTH 26 && Minimum width of a window
|
||||
#Define SYSMETRIC_MINWINDOWHEIGHT 27 && Minimum height of a window
|
||||
#Define SYSMETRIC_TITLEBARBUTTONWIDTH 28 && Width of a title bar button
|
||||
#Define SYSMETRIC_TITLEBARBUTTONHEIGHT 29 && Height of a title bar button
|
||||
#Define SYSMETRIC_MOUSEPRESENT 30 && Is mouse present? 1 => mouse is installed, 0 => no mouse is installed
|
||||
#Define SYSMETRIC_DEBUGVERSION 31 && Is this a debug version? 1 => debug version, 0 => retail version
|
||||
#Define SYSMETRIC_MOUSEBUTTONSWAP 32 && Are mouse buttons swapped? 1 => Yes, 0 => No
|
||||
#Define SYSMETRIC_HALFHEIGHTBUTTONWIDTH 33 && Width of a button in a half-height title bar
|
||||
#Define SYSMETRIC_HALFHEIGHTBUTTONHEIGHT 34 && Height of a button in a half-height title bar
|
||||
|
||||
*-- Window Borders
|
||||
#Define BORDER_NONE 0
|
||||
#Define BORDER_SINGLE 1
|
||||
#Define BORDER_DOUBLE 2
|
||||
#Define BORDER_SYSTEM 3
|
||||
|
||||
*-- WindowState
|
||||
#Define WINDOWSTATE_NORMAL 0 && Normal
|
||||
#Define WINDOWSTATE_MINIMIZED 1 && Minimized
|
||||
#Define WINDOWSTATE_MAXIMIZED 2 && Maximized
|
||||
|
||||
*-- Toolbar and Form Docking Positions
|
||||
#Define TOOL_NOTDOCKED -1
|
||||
#Define TOOL_TOP 0
|
||||
#Define TOOL_LEFT 1
|
||||
#Define TOOL_RIGHT 2
|
||||
#Define TOOL_BOTTOM 3
|
||||
#Define TOOL_TAB 4
|
||||
#Define TOOL_LINK 5
|
||||
|
||||
*-- TYPE() tags
|
||||
#Define T_CHARACTER "C"
|
||||
#Define T_NUMERIC "N"
|
||||
#Define T_DOUBLE "B"
|
||||
#Define T_DATE "D"
|
||||
#Define T_DATETIME "T"
|
||||
#Define T_MEMO "M"
|
||||
#Define T_GENERAL "G"
|
||||
#Define T_OBJECT "O"
|
||||
#Define T_SCREEN "S"
|
||||
#Define T_LOGICAL "L"
|
||||
#Define T_CURRENCY "Y"
|
||||
#Define T_UNDEFINED "U"
|
||||
#Define T_INTEGER "N"
|
||||
#Define T_VARCHAR "C"
|
||||
#Define T_VARBINARY "Q"
|
||||
#Define T_BLOB "W"
|
||||
|
||||
*-- Button parameter masks
|
||||
#Define BUTTON_LEFT 1
|
||||
#Define BUTTON_RIGHT 2
|
||||
#Define BUTTON_MIDDLE 4
|
||||
|
||||
*-- Function Parameters
|
||||
*-- MessageBox parameters
|
||||
#Define MB_OK 0 && OK button only
|
||||
#Define MB_OKCANCEL 1 && OK and Cancel buttons
|
||||
#Define MB_ABORTRETRYIGNORE 2 && Abort, Retry, and Ignore buttons
|
||||
#Define MB_YESNOCANCEL 3 && Yes, No, and Cancel buttons
|
||||
#Define MB_YESNO 4 && Yes and No buttons
|
||||
#Define MB_RETRYCANCEL 5 && Retry and Cancel buttons
|
||||
|
||||
#Define MB_ICONSTOP 16 && Critical message
|
||||
#Define MB_ICONQUESTION 32 && Warning query
|
||||
#Define MB_ICONEXCLAMATION 48 && Warning message
|
||||
#Define MB_ICONINFORMATION 64 && Information message
|
||||
|
||||
#Define MB_APPLMODAL 0 && Application modal message box
|
||||
#Define MB_DEFBUTTON1 0 && First button is default
|
||||
#Define MB_DEFBUTTON2 256 && Second button is default
|
||||
#Define MB_DEFBUTTON3 512 && Third button is default
|
||||
#Define MB_SYSTEMMODAL 4096 && System Modal
|
||||
|
||||
#Define LANG_NEUTRAL 0x00
|
||||
|
||||
#Define LANG_AFRIKAANS 0x36
|
||||
#Define LANG_ALBANIAN 0x1c
|
||||
#Define LANG_ARABIC 0x01
|
||||
#Define LANG_BASQUE 0x2d
|
||||
#Define LANG_BELARUSIAN 0x23
|
||||
#Define LANG_BULGARIAN 0x02
|
||||
#Define LANG_CATALAN 0x03
|
||||
#Define LANG_CHINESE 0x04
|
||||
#Define LANG_CROATIAN 0x1a
|
||||
#Define LANG_CZECH 0x05
|
||||
#Define LANG_DANISH 0x06
|
||||
#Define LANG_DUTCH 0x13
|
||||
#Define LANG_ENGLISH 0x09
|
||||
#Define LANG_ESTONIAN 0x25
|
||||
#Define LANG_FAEROESE 0x38
|
||||
#Define LANG_FARSI 0x29
|
||||
#Define LANG_FINNISH 0x0b
|
||||
#Define LANG_FRENCH 0x0c
|
||||
#Define LANG_GERMAN 0x07
|
||||
#Define LANG_GREEK 0x08
|
||||
#Define LANG_HEBREW 0x0d
|
||||
#Define LANG_HUNGARIAN 0x0e
|
||||
#Define LANG_ICELANDIC 0x0f
|
||||
#Define LANG_INDONESIAN 0x21
|
||||
#Define LANG_ITALIAN 0x10
|
||||
#Define LANG_JAPANESE 0x11
|
||||
#Define LANG_KOREAN 0x12
|
||||
#Define LANG_LATVIAN 0x26
|
||||
#Define LANG_LITHUANIAN 0x27
|
||||
#Define LANG_NORWEGIAN 0x14
|
||||
#Define LANG_POLISH 0x15
|
||||
#Define LANG_PORTUGUESE 0x16
|
||||
#Define LANG_ROMANIAN 0x18
|
||||
#Define LANG_RUSSIAN 0x19
|
||||
#Define LANG_SERBIAN 0x1a
|
||||
#Define LANG_SLOVAK 0x1b
|
||||
#Define LANG_SLOVENIAN 0x24
|
||||
#Define LANG_SPANISH 0x0a
|
||||
#Define LANG_SWEDISH 0x1d
|
||||
#Define LANG_THAI 0x1e
|
||||
#Define LANG_TURKISH 0x1f
|
||||
#Define LANG_UKRAINIAN 0x22
|
||||
#Define LANG_VIETNAMESE 0x2a
|
||||
BIN
COMUN/utile/hpdf/ReportOutput/ctl32_progressbar_old.vct
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/ctl32_progressbar_old.vct
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/ctl32_progressbar_old.vcx
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/ctl32_progressbar_old.vcx
Normal file
Binary file not shown.
416
COMUN/utile/hpdf/ReportOutput/foxpro_reporting.h
Normal file
416
COMUN/utile/hpdf/ReportOutput/foxpro_reporting.h
Normal file
@@ -0,0 +1,416 @@
|
||||
** Visual FoxPro Named Constant File **
|
||||
|
||||
* revisions/additions to FOXPRO.H specific to reporting
|
||||
|
||||
* SYS(2040) values
|
||||
#DEFINE REPORTENGINE_STATUS_INACTIVE 0
|
||||
#DEFINE REPORTENGINE_STATUS_PREVIEW 1
|
||||
#DEFINE REPORTENGINE_STATUS_RUNNING 2
|
||||
|
||||
* STRCONV() values -- there are others,
|
||||
* these are the ones of significance
|
||||
* in object-assisted reporting
|
||||
#DEFINE STRCONV_DBCS_UNICODE 5
|
||||
#DEFINE STRCONV_UNICODE_DBCS 6
|
||||
#DEFINE STRCONV_DBCS_UTF8 9
|
||||
#DEFINE STRCONV_UNICODE_UTF8 10
|
||||
|
||||
#DEFINE STRCONV_REGIONTYPE_LOCALE 0
|
||||
#DEFINE STRCONV_REGIONTYPE_CODEPAGE 1
|
||||
#DEFINE STRCONV_REGIONTYPE_FONTCHARSET 2
|
||||
|
||||
*-- FRX report builder constants
|
||||
*-- FRX Report Builder return flags
|
||||
#define FRX_REPBLDR_IGNORE_EVENT 0
|
||||
#define FRX_REPBLDR_HANDLE_EVENT 1
|
||||
#define FRX_REPBLDR_DISCARD_CHANGES 0
|
||||
#define FRX_REPBLDR_RELOAD_CHANGES 2
|
||||
|
||||
*-- FRX Report Builder event types
|
||||
#define FRX_BLDR_EVENT_PROPERTIES 1
|
||||
#define FRX_BLDR_EVENT_OBJECTCREATE 2
|
||||
#define FRX_BLDR_EVENT_OBJECTREMOVE 4
|
||||
#define FRX_BLDR_EVENT_OBJECTPASTE 5
|
||||
#define FRX_BLDR_EVENT_REPORTSAVE 6
|
||||
#define FRX_BLDR_EVENT_REPORTOPEN 7
|
||||
#define FRX_BLDR_EVENT_REPORTCLOSE 8
|
||||
#define FRX_BLDR_EVENT_DATAENV 9
|
||||
#define FRX_BLDR_EVENT_PREVIEWMODE 10
|
||||
#define FRX_BLDR_EVENT_OPTIONALBANDS 11
|
||||
#define FRX_BLDR_EVENT_DATAGROUPING 12
|
||||
#define FRX_BLDR_EVENT_VARIABLES 13
|
||||
#define FRX_BLDR_EVENT_EDITINPLACE 14
|
||||
#define FRX_BLDR_EVENT_SETGRIDSCALE 15
|
||||
#define FRX_BLDR_EVENT_OBJECTDROP 16
|
||||
#define FRX_BLDR_EVENT_IMPORTDE 17
|
||||
#define FRX_BLDR_EVENT_PRINT 18
|
||||
#define FRX_BLDR_EVENT_QUICKREPORT 19
|
||||
|
||||
*-- FRX object Protection flags.
|
||||
*-- These are bit numbers or powers of 2.
|
||||
*-- not numeric values. They are stored
|
||||
*-- in the ORDER column as a character
|
||||
*-- representation of the sum of their
|
||||
*-- binary equivalent values.)
|
||||
#define FRX_PROTECT_OBJECT_LOCK 0
|
||||
#define FRX_PROTECT_OBJECT_HIDE 1
|
||||
#define FRX_PROTECT_OBJECT_NO_DELETE 2
|
||||
#define FRX_PROTECT_OBJECT_NO_EDIT 3
|
||||
#define FRX_PROTECT_OBJECT_NO_SELECT 6
|
||||
#define FRX_PROTECT_BAND_NO_EDIT 4
|
||||
#define FRX_PROTECT_BAND_NO_RESIZE 14
|
||||
#define FRX_PROTECT_REPORT_NO_PREVIEW 7
|
||||
#define FRX_PROTECT_REPORT_NO_OPTBAND 8
|
||||
#define FRX_PROTECT_REPORT_NO_GROUP 9
|
||||
#define FRX_PROTECT_REPORT_NO_VARIABLES 10
|
||||
#define FRX_PROTECT_REPORT_NO_PAGESETUP 11
|
||||
#define FRX_PROTECT_REPORT_NO_MULTISELECT 12
|
||||
#define FRX_PROTECT_REPORT_NO_DATAENV 13
|
||||
#define FRX_PROTECT_REPORT_NO_PRINT 15
|
||||
#define FRX_PROTECT_REPORT_NO_QUICKREPORT 16
|
||||
|
||||
*-- FRX report structure constants
|
||||
*-- FRX PLATFORM column values
|
||||
#define FRX_PLATFORM_WINDOWS "WINDOWS"
|
||||
|
||||
*-- FRX OBJTYPE column values
|
||||
#define FRX_OBJTYP_COMMENT 0
|
||||
#define FRX_OBJTYP_REPORTHEADER 1
|
||||
#define FRX_OBJTYP_WORKAREA 2
|
||||
#define FRX_OBJTYP_INDEX 3
|
||||
#define FRX_OBJTYP_RELATION 4
|
||||
#define FRX_OBJTYP_LABEL 5
|
||||
#define FRX_OBJTYP_LINE 6
|
||||
#define FRX_OBJTYP_RECTANGLE 7
|
||||
#define FRX_OBJTYP_FIELD 8
|
||||
#define FRX_OBJTYP_BAND 9
|
||||
#define FRX_OBJTYP_GROUP 10
|
||||
#define FRX_OBJTYP_PICTURE 17
|
||||
#define FRX_OBJTYP_VARIABLE 18
|
||||
#define FRX_OBJTYP_PDRIVER 21
|
||||
#define FRX_OBJTYP_FONTRES 23
|
||||
#define FRX_OBJTYP_DATAENV 25
|
||||
#define FRX_OBJTYP_DATAOBJ 26
|
||||
|
||||
*-- FRX OBJCODE column values
|
||||
#define FRX_OBJCOD_TITLE 0
|
||||
#define FRX_OBJCOD_PAGEHEADER 1
|
||||
#define FRX_OBJCOD_COLHEADER 2
|
||||
#define FRX_OBJCOD_GROUPHEADER 3
|
||||
#define FRX_OBJCOD_DETAIL 4
|
||||
#define FRX_OBJCOD_GROUPFOOTER 5
|
||||
#define FRX_OBJCOD_COLFOOTER 6
|
||||
#define FRX_OBJCOD_PAGEFOOTER 7
|
||||
#define FRX_OBJCOD_SUMMARY 8
|
||||
#define FRX_OBJCOD_DETAILHEADER 9
|
||||
#define FRX_OBJCOD_DETAILFOOTER 10
|
||||
#define FRX_OBJCOD_RECTANGLE 4
|
||||
#define FRX_OBJCOD_REPORTHEADER 53
|
||||
#define FRX_OBJCOD_OTHER 0
|
||||
|
||||
*-- FRX PENSIZE column values
|
||||
#define FRX_PENSIZE_HAIRLINE 0
|
||||
#define FRX_PENSIZE_1POINTS 1
|
||||
#define FRX_PENSIZE_2POINTS 2
|
||||
#define FRX_PENSIZE_4POINTS 4
|
||||
#define FRX_PENSIZE_6POINTS 6
|
||||
|
||||
*-- FRX PENPAT column values
|
||||
#define FRX_PENPAT_NONE 0
|
||||
#define FRX_PENPAT_DOTTED 1
|
||||
#define FRX_PENPAT_DASHED 2
|
||||
#define FRX_PENPAT_DASHDOT 3
|
||||
#define FRX_PENPAT_DASHDOTDOT 4
|
||||
#define FRX_PENPAT_SOLID 8
|
||||
|
||||
*-- FRX FILLPAT column values
|
||||
#define FRX_FILLPAT_NONE 0
|
||||
#define FRX_FILLPAT_SOLID 1
|
||||
#define FRX_FILLPAT_HORIZONTAL 2
|
||||
#define FRX_FILLPAT_VERTICAL 3
|
||||
#define FRX_FILLPAT_LEFTDIAGONAL 4
|
||||
#define FRX_FILLPAT_RIGHTDIAGONAL 5
|
||||
#define FRX_FILLPAT_GRID 6
|
||||
#define FRX_FILLPAT_CROSSHATCH 7
|
||||
|
||||
*-- FRX FONTSTYLE column flags (sum to obtain value)
|
||||
#define FRX_FONTSTYLE_NORMAL 0
|
||||
#define FRX_FONTSTYLE_BOLD 1
|
||||
#define FRX_FONTSTYLE_ITALIC 2
|
||||
#define FRX_FONTSTYLE_UNDERLINED 4
|
||||
#define FRX_FONTSTYLE_STRIKETHROUGH 128
|
||||
|
||||
*-- FRX MODE column flags (sum to obtain value)
|
||||
#define FRX_MODE_OPAQUE 0
|
||||
#define FRX_MODE_TRANSPARENT 1
|
||||
#define FRX_MODE_LTR 0 && Left-to-Right
|
||||
#define FRX_MODE_RTL 2 && Right-to-Left
|
||||
#define FRX_MODE_CONTEXT 4
|
||||
|
||||
*-- FRX RULER column / measurement units
|
||||
#define FRX_RULER_OFF 0
|
||||
#define FRX_RULER_INCHES 1
|
||||
#define FRX_RULER_METRIC 2
|
||||
#define FRX_RULER_PIXELS 3
|
||||
#define FRX_RULER_CHARACTERS 4
|
||||
#define FRX_RULER_SYSDEFAULT 5
|
||||
|
||||
*-- FRX RULERLINES column values
|
||||
*-- (header record)
|
||||
#define FRX_RULERLINES_OFF 0
|
||||
#define FRX_RULERLINES_ON 1
|
||||
|
||||
*-- (String trimming for OBJTYPE=8 records)
|
||||
#define FRX_STRINGTRIM_DEFAULT 0
|
||||
#define FRX_STRINGTRIM_CHAR 1
|
||||
#define FRX_STRINGTRIM_WORD 2
|
||||
#define FRX_STRINGTRIM_ELLIPSIS_CHAR 3
|
||||
#define FRX_STRINGTRIM_ELLIPSIS_WORD 4
|
||||
#define FRX_STRINGTRIM_ELLIPSIS_PATH 5
|
||||
|
||||
*-- FRX GENERAL column values for RECTANGLE/SHAPEs
|
||||
#define FRX_PICTUREMODE_CLIP 0
|
||||
#define FRX_PICTUREMODE_SCALE_KEEP_SHAPE 1
|
||||
#define FRX_PICTUREMODE_SCALE_STRETCH 2
|
||||
|
||||
*-- FRX SPACING column, line spacing values for LABEL objects:
|
||||
#define FRX_SPACING_SINGLE 0
|
||||
#define FRX_SPACING_ONE_POINT_FIVE 1
|
||||
#define FRX_SPACING_DOUBLE 2
|
||||
|
||||
*-- FRX Field object justification (OFFSET column)
|
||||
#define FRX_JUSTIFICATION_LEFT 0
|
||||
#define FRX_JUSTIFICATION_RIGHT 1
|
||||
#define FRX_JUSTIFICATION_CENTER 2
|
||||
|
||||
*-- FRX Picture object source type (OFFSET column)
|
||||
#define FRX_PICTURE_SOURCE_FILENAME 0 && stored in PICTURE column
|
||||
#define FRX_PICTURE_SOURCE_GENERAL 1 && stored in NAME column
|
||||
#define FRX_PICTURE_SOURCE_EXPRESSION 2 && stored in NAME column
|
||||
|
||||
*-- FRX TOTALTYPE column calculation types
|
||||
#define FRX_TOTALTYPE_NONE 0
|
||||
#define FRX_TOTALTYPE_COUNT 1
|
||||
#define FRX_TOTALTYPE_SUM 2
|
||||
#define FRX_TOTALTYPE_AVERAGE 3
|
||||
#define FRX_TOTALTYPE_LOWEST 4
|
||||
#define FRX_TOTALTYPE_HIGHEST 5
|
||||
#define FRX_TOTALTYPE_STDDEV 6
|
||||
#define FRX_TOTALTYPE_VARIANCE 7
|
||||
|
||||
*-- FRX RESETTOTAL column values
|
||||
#define FRX_RESETTOTAL_ENDOFREPORT 1
|
||||
#define FRX_RESETTOTAL_ENDOFPAGE 2
|
||||
#define FRX_RESETTOTAL_ENDOFCOLUMN 3
|
||||
#define FRX_RESETTOTAL_GROUP_OFFSET 5 && add to group index
|
||||
#define FRX_RESETTOTAL_DETAIL_OFFSET 79 && add to detail band index
|
||||
|
||||
* ReportListener baseclass constants
|
||||
|
||||
#DEFINE LISTENER_TYPE_DEF -1
|
||||
#DEFINE LISTENER_TYPE_PRN 0
|
||||
#DEFINE LISTENER_TYPE_PRV 1
|
||||
#DEFINE LISTENER_TYPE_PAGED 2
|
||||
#DEFINE LISTENER_TYPE_ALLPGS 3
|
||||
|
||||
#DEFINE LISTENER_CONTINUATION_NONE 0
|
||||
#DEFINE LISTENER_CONTINUATION_START 1
|
||||
#DEFINE LISTENER_CONTINUATION_MIDDLE 2
|
||||
#DEFINE LISTENER_CONTINUATION_END 3
|
||||
|
||||
#DEFINE LISTENER_DEVICE_TYPE_NONE -1
|
||||
#DEFINE LISTENER_DEVICE_TYPE_HDC 0
|
||||
#DEFINE LISTENER_DEVICE_TYPE_GRF 1
|
||||
#DEFINE LISTENER_DEVICE_TYPE_CTL 2
|
||||
#DEFINE LISTENER_DEVICE_TYPE_EMF 100
|
||||
#DEFINE LISTENER_DEVICE_TYPE_TIF 101
|
||||
#DEFINE LISTENER_DEVICE_TYPE_JPG 102
|
||||
#DEFINE LISTENER_DEVICE_TYPE_GIF 103
|
||||
#DEFINE LISTENER_DEVICE_TYPE_PNG 104
|
||||
#DEFINE LISTENER_DEVICE_TYPE_BMP 105
|
||||
#DEFINE LISTENER_DEVICE_TYPE_MTIF 201
|
||||
|
||||
#DEFINE LISTENER_SEND_GDI_IMAGE_NONE 0
|
||||
#DEFINE LISTENER_SEND_GDI_IMAGE_HANDLE 1
|
||||
|
||||
#DEFINE LISTENER_PREPASS 0
|
||||
#DEFINE LISTENER_FULLPASS 1
|
||||
|
||||
* subset of existing FOXPRO.H used in reportoutput app and classes
|
||||
|
||||
*-- DrawMode
|
||||
#DEFINE DRAWMODE_BLACKNESS 1 && 1 - Blackness
|
||||
#DEFINE DRAWMODE_NOT_MERGE_PEN 2 && 2 - Not Merge Pen
|
||||
#DEFINE DRAWMODE_MASK_NOT_PEN 3 && 3 - Mask Not Pen
|
||||
#DEFINE DRAWMODE_NOT_COPY_PEN 4 && 4 - Not Copy Pen
|
||||
#DEFINE DRAWMODE_MASK_PEN_NOT 5 && 5 - Mask Pen Not
|
||||
#DEFINE DRAWMODE_INVERT 6 && 6 - Invert
|
||||
#DEFINE DRAWMODE_XOR_PEN 7 && 7 - Xor Pen
|
||||
#DEFINE DRAWMODE_NOT_MASK_PEN 8 && 8 - Not Mask Pen
|
||||
#DEFINE DRAWMODE_MASK_PEN 9 && 9 - Mask Pen
|
||||
#DEFINE DRAWMODE_NOT_XOR_PEN 10 && 10 - Not Xor Pen
|
||||
#DEFINE DRAWMODE_NOP 11 && 11 - Nop
|
||||
#DEFINE DRAWMODE_MERGE_NOT_PEN 12 && 12 - Merge Not Pen
|
||||
#DEFINE DRAWMODE_COPY_PEN 13 && 13 - Copy Pen
|
||||
#DEFINE DRAWMODE_MERGE_PEN_NOT 14 && 14 - Merge Pen Not
|
||||
#DEFINE DRAWMODE_MERGE_PEN 15 && 15 - Merge Pen
|
||||
#DEFINE DRAWMODE_WHITENESS 16 && 16 - Whiteness
|
||||
|
||||
*-- DrawStyle
|
||||
#DEFINE DRAWSTYLE_SOLID 0 && 0 - Solid
|
||||
#DEFINE DRAWSTYLE_DASH 1 && 1 - Dash
|
||||
#DEFINE DRAWSTYLE_DOT 2 && 2 - Dot
|
||||
#DEFINE DRAWSTYLE_DASH_DOT 3 && 3 - Dash-Dot
|
||||
#DEFINE DRAWSTYLE_DASH_DOT_DOT 4 && 4 - Dash-Dot-Dot
|
||||
#DEFINE DRAWSTYLE_INVISIBLE 5 && 5 - Invisible
|
||||
#DEFINE DRAWSTYLE_INSIDE_SOLID 6 && 6 - Inside Solid
|
||||
|
||||
*-- FillStyle
|
||||
#DEFINE FILLSTYLE_SOLID 0 && 0 - Solid
|
||||
#DEFINE FILLSTYLE_TRANSPARENT 1 && 1 - Transparent
|
||||
#DEFINE FILLSTYLE_HORIZONTAL_LINE 2 && 2 - Horizontal Line
|
||||
#DEFINE FILLSTYLE_VERTICAL_LINE 3 && 3 - Vertical Line
|
||||
#DEFINE FILLSTYLE_UPWARD_DIAGONAL 4 && 4 - Upward Diagonal
|
||||
#DEFINE FILLSTYLE_DOWNWARD_DIAGONAL 5 && 5 - Downward Diagonal
|
||||
#DEFINE FILLSTYLE_CROSS 6 && 6 - Cross
|
||||
#DEFINE FILLSTYLE_DIAGONAL_CROSS 7 && 7 - Diagonal Cross
|
||||
|
||||
*-- ScaleMode
|
||||
#DEFINE SCALEMODE_PIXELS 3 && 3 - Pixel
|
||||
#DEFINE SCALEMODE_FOXELS 0 && 0 - Foxels
|
||||
|
||||
*-- Window Borders
|
||||
#DEFINE BORDER_NONE 0
|
||||
#DEFINE BORDER_SINGLE 1
|
||||
#DEFINE BORDER_DOUBLE 2
|
||||
#DEFINE BORDER_SYSTEM 3
|
||||
|
||||
*-- Button parameter masks
|
||||
#DEFINE BUTTON_LEFT 1
|
||||
#DEFINE BUTTON_RIGHT 2
|
||||
#DEFINE BUTTON_MIDDLE 4
|
||||
|
||||
*-- Function Parameters
|
||||
*-- MessageBox parameters
|
||||
#DEFINE MB_OK 0 && OK button only
|
||||
#DEFINE MB_OKCANCEL 1 && OK and Cancel buttons
|
||||
#DEFINE MB_ABORTRETRYIGNORE 2 && Abort, Retry, and Ignore buttons
|
||||
#DEFINE MB_YESNOCANCEL 3 && Yes, No, and Cancel buttons
|
||||
#DEFINE MB_YESNO 4 && Yes and No buttons
|
||||
#DEFINE MB_RETRYCANCEL 5 && Retry and Cancel buttons
|
||||
|
||||
#DEFINE MB_ICONSTOP 16 && Critical message
|
||||
#DEFINE MB_ICONQUESTION 32 && Warning query
|
||||
#DEFINE MB_ICONEXCLAMATION 48 && Warning message
|
||||
#DEFINE MB_ICONINFORMATION 64 && Information message
|
||||
|
||||
#DEFINE MB_APPLMODAL 0 && Application modal message box
|
||||
#DEFINE MB_DEFBUTTON1 0 && First button is default
|
||||
#DEFINE MB_DEFBUTTON2 256 && Second button is default
|
||||
#DEFINE MB_DEFBUTTON3 512 && Third button is default
|
||||
#DEFINE MB_SYSTEMMODAL 4096 && System Modal
|
||||
|
||||
*-- MsgBox return values
|
||||
#DEFINE IDOK 1 && OK button pressed
|
||||
#DEFINE IDCANCEL 2 && Cancel button pressed
|
||||
#DEFINE IDABORT 3 && Abort button pressed
|
||||
#DEFINE IDRETRY 4 && Retry button pressed
|
||||
#DEFINE IDIGNORE 5 && Ignore button pressed
|
||||
#DEFINE IDYES 6 && Yes button pressed
|
||||
#DEFINE IDNO 7 && No button pressed
|
||||
|
||||
*-- Sysmetric() parameter values
|
||||
#DEFINE SYSMETRIC_SCREENWIDTH 1 && Screen width
|
||||
#DEFINE SYSMETRIC_SCREENHEIGHT 2 && Screen width
|
||||
|
||||
*-- PRTINFO() Constants
|
||||
*-- PRTINFO() Valid types to pass
|
||||
#DEFINE PRT_ORIENTATION 1
|
||||
#DEFINE PRT_PAPERSIZE 2
|
||||
#DEFINE PRT_PAPERLENGTH 3
|
||||
#DEFINE PRT_PAPERWIDTH 4
|
||||
#DEFINE PRT_SCALE 5
|
||||
#DEFINE PRT_COPIES 6
|
||||
#DEFINE PRT_DEFASOURCE 7
|
||||
#DEFINE PRT_PRINTQUAL 8
|
||||
#DEFINE PRT_COLOR 9
|
||||
#DEFINE PRT_DUPLEX 10
|
||||
#DEFINE PRT_YRESOLUTION 11
|
||||
#DEFINE PRT_TTOPTION 12
|
||||
#DEFINE PRT_COLLATE 13
|
||||
|
||||
*--PRTINFO() Return types
|
||||
*-- Paper sizes
|
||||
#DEFINE PRTPAPER_LETTER 1 && Letter 8 1/2 x 11 in
|
||||
#DEFINE PRTPAPER_LETTERSMALL 2 && Letter Small 8 1/2 x 11 in
|
||||
#DEFINE PRTPAPER_TABLOID 3 && Tabloid 11 x 17 in
|
||||
#DEFINE PRTPAPER_LEDGER 4 && Ledger 17 x 11 in
|
||||
#DEFINE PRTPAPER_LEGAL 5 && Legal 8 1/2 x 14 in
|
||||
#DEFINE PRTPAPER_STATEMENT 6 && Statement 5 1/2 x 8 1/2 in
|
||||
#DEFINE PRTPAPER_EXECUTIVE 7 && Executive 7 1/4 x 10 1/2 in
|
||||
#DEFINE PRTPAPER_A3 8 && A3 297 x 420 mm
|
||||
#DEFINE PRTPAPER_A4 9 && A4 210 x 297 mm
|
||||
#DEFINE PRTPAPER_A4SMALL 10 && A4 Small 210 x 297 mm
|
||||
#DEFINE PRTPAPER_A5 11 && A5 148 x 210 mm
|
||||
#DEFINE PRTPAPER_B4 12 && B4 250 x 354
|
||||
#DEFINE PRTPAPER_B5 13 && B5 182 x 257 mm
|
||||
#DEFINE PRTPAPER_FOLIO 14 && Folio 8 1/2 x 13 in
|
||||
#DEFINE PRTPAPER_QUARTO 15 && Quarto 215 x 275 mm
|
||||
#DEFINE PRTPAPER_10X14 16 && 10x14 in
|
||||
#DEFINE PRTPAPER_11X17 17 && 11x17 in
|
||||
#DEFINE PRTPAPER_NOTE 18 && Note 8 1/2 x 11 in
|
||||
#DEFINE PRTPAPER_ENV_9 19 && Envelope #9 3 7/8 x 8 7/8
|
||||
#DEFINE PRTPAPER_ENV_10 20 && Envelope #10 4 1/8 x 9 1/2
|
||||
#DEFINE PRTPAPER_ENV_11 21 && Envelope #11 4 1/2 x 10 3/8
|
||||
#DEFINE PRTPAPER_ENV_12 22 && Envelope #12 4 \276 x 11
|
||||
#DEFINE PRTPAPER_ENV_14 23 && Envelope #14 5 x 11 1/2
|
||||
#DEFINE PRTPAPER_CSHEET 24 && C size sheet
|
||||
#DEFINE PRTPAPER_DSHEET 25 && D size sheet
|
||||
#DEFINE PRTPAPER_ESHEET 26 && E size sheet
|
||||
#DEFINE PRTPAPER_ENV_DL 27 && Envelope DL 110 x 220mm
|
||||
#DEFINE PRTPAPER_ENV_C5 28 && Envelope C5 162 x 229 mm
|
||||
#DEFINE PRTPAPER_ENV_C3 29 && Envelope C3 324 x 458 mm
|
||||
#DEFINE PRTPAPER_ENV_C4 30 && Envelope C4 229 x 324 mm
|
||||
#DEFINE PRTPAPER_ENV_C6 31 && Envelope C6 114 x 162 mm
|
||||
#DEFINE PRTPAPER_ENV_C65 32 && Envelope C65 114 x 229 mm
|
||||
#DEFINE PRTPAPER_ENV_B4 33 && Envelope B4 250 x 353 mm
|
||||
#DEFINE PRTPAPER_ENV_B5 34 && Envelope B5 176 x 250 mm
|
||||
#DEFINE PRTPAPER_ENV_B6 35 && Envelope B6 176 x 125 mm
|
||||
#DEFINE PRTPAPER_ENV_ITALY 36 && Envelope 110 x 230 mm
|
||||
#DEFINE PRTPAPER_ENV_MONARCH 37 && Envelope Monarch 3.875 x 7.5 in
|
||||
#DEFINE PRTPAPER_ENV_PERSONAL 38 && 6 3/4 Envelope 3 5/8 x 6 1/2 in
|
||||
#DEFINE PRTPAPER_FANFOLD_US 39 && US Std Fanfold 14 7/8 x 11 in
|
||||
#DEFINE PRTPAPER_FANFOLD_STD_GERMAN 40 && German Std Fanfold 8 1/2 x 12 in
|
||||
#DEFINE PRTPAPER_FANFOLD_LGL_GERMAN 41 && German Legal Fanfold 8 1/2 x 13 in
|
||||
|
||||
*-- Paper bins
|
||||
#DEFINE PRTBIN_UPPER 1
|
||||
#DEFINE PRTBIN_ONLYONE 1
|
||||
#DEFINE PRTBIN_LOWER 2
|
||||
#DEFINE PRTBIN_MIDDLE 3
|
||||
#DEFINE PRTBIN_MANUAL 4
|
||||
#DEFINE PRTBIN_ENVELOPE 5
|
||||
#DEFINE PRTBIN_ENVMANUAL 6
|
||||
#DEFINE PRTBIN_AUTO 7
|
||||
#DEFINE PRTBIN_TRACTOR 8
|
||||
#DEFINE PRTBIN_SMALLFMT 9
|
||||
#DEFINE PRTBIN_LARGEFMT 10
|
||||
#DEFINE PRTBIN_LARGECAPACITY 11
|
||||
#DEFINE PRTBIN_CASSETTE 14
|
||||
#DEFINE PRTBIN_AUTOSELECT 15
|
||||
|
||||
*-- Print qualities
|
||||
#DEFINE PRTRES_DRAFT -1
|
||||
#DEFINE PRTRES_LOW -2
|
||||
#DEFINE PRTRES_MEDIUM -3
|
||||
#DEFINE PRTRES_HIGH -4
|
||||
|
||||
*-- Color printer
|
||||
#DEFINE PRTCOLOR_MONOCHROME 1
|
||||
#DEFINE PRTCOLOR_COLOR 2
|
||||
|
||||
*-- Duplexing
|
||||
#DEFINE PRTDUP_SIMPLEX 1
|
||||
#DEFINE PRTDUP_VERTICAL 2
|
||||
#DEFINE PRTDUP_HORIZONTAL 3
|
||||
|
||||
600
COMUN/utile/hpdf/ReportOutput/frxoutput.prg
Normal file
600
COMUN/utile/hpdf/ReportOutput/frxoutput.prg
Normal file
@@ -0,0 +1,600 @@
|
||||
* REPORTOUTPUT WRAPPER PRG
|
||||
|
||||
#INCLUDE REPORTOUTPUT.H
|
||||
|
||||
LPARAMETERS m.tvType, m.tvReference, m.tvUnload
|
||||
|
||||
EXTERNAL TABLE OUTPUTAPP_INTERNALDBF
|
||||
|
||||
LOCAL m.oTemp, m.iType, m.iIndex, m.cType, m.cConfigTable, ;
|
||||
m.lSuccess, m.lSetTalkBackOn, m.lSafety, m.cFilter, m.cClass, m.cLib, m.cModule, ;
|
||||
m.oConfig, m.oError, m.lStringVar, m.lObjectMember, m.iParams, ;
|
||||
m.iUnload, m.iSelect, m.iSession, m.lSetTalkBackOnDefaultSession, m.vReturn, ;
|
||||
m.oSH
|
||||
|
||||
IF (SET("TALK") = "ON")
|
||||
SET TALK OFF
|
||||
m.lSetTalkBackOn = .T.
|
||||
ENDIF
|
||||
|
||||
m.iParams = PARAMETERS()
|
||||
m.iSession = SET("DATASESSION")
|
||||
|
||||
m.oSH = CREATEOBJECT("SH")
|
||||
|
||||
m.oSH.Execute(VFP_DEFAULT_DATASESSION)
|
||||
|
||||
m.iSelect = SELECT()
|
||||
|
||||
IF (SET("TALK") = "ON")
|
||||
SET TALK OFF
|
||||
m.lSetTalkBackOnDefaultSession = .T.
|
||||
ENDIF
|
||||
|
||||
|
||||
* if it is not integer, convert
|
||||
* if it is lower than -1,
|
||||
* this is a value private to REPORTOUTPUT.APP,
|
||||
* potentially not even a ListenerType
|
||||
* if it is not numeric, just set up the
|
||||
* reference collection
|
||||
|
||||
DO CASE
|
||||
CASE VARTYPE(m.tvType) # "N"
|
||||
m.vReturn = ReportOutputConfig(OUTPUTAPP_CONFIGTOKEN_SETTABLE, .F., .F., m.oSH)
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn, m.oSH
|
||||
RETURN m.vReturn
|
||||
CASE ABS(m.tvType) # m.tvType AND m.tvType < LISTENER_TYPE_DEF
|
||||
m.vReturn = ReportOutputConfig(m.tvType, @m.tvReference, m.tvUnload, m.oSH)
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn, m.oSH
|
||||
RETURN m.vReturn
|
||||
OTHERWISE
|
||||
m.iType = INT(m.tvType)
|
||||
ENDCASE
|
||||
|
||||
IF m.iParams = 3
|
||||
m.iUnload = VAL(TRANSFORM(m.tvUnload))
|
||||
IF VARTYPE(m.tvUnload) = "L" AND m.tvUnload
|
||||
m.vReturn = UnloadListener(m.iType)
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn, m.oSH
|
||||
RETURN m.vReturn
|
||||
ELSE
|
||||
IF m.iUnload > 0
|
||||
IF m.iUnload = OUTPUTAPP_LOADTYPE_UNLOAD
|
||||
m.vReturn = UnloadListener(m.iType)
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn, m.oSH
|
||||
RETURN m.vReturn
|
||||
ELSE
|
||||
DO UnloadListener WITH m.iType
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
DO ReportOutputDeclareReference WITH ;
|
||||
m.iParams, m.tvReference, m.lObjectMember, m.lStringVar
|
||||
|
||||
|
||||
IF m.iType = LISTENER_TYPE_DEF
|
||||
* always provide the reference fresh,
|
||||
* do not use the collection
|
||||
m.oTemp = CREATEOBJECT("ReportListener")
|
||||
|
||||
ELSE
|
||||
|
||||
* check for public reference var (collection)
|
||||
* if it is not available create
|
||||
|
||||
|
||||
m.cType = TRANSFORM(m.iType)
|
||||
|
||||
m.iIndex = -1
|
||||
|
||||
|
||||
DO CheckPublicListenerCollection WITH m.cType, m.iIndex
|
||||
|
||||
IF m.iIndex > -1
|
||||
m.oTemp = OUTPUTAPP_REFVAR.ITEM[m.iIndex]
|
||||
ELSE
|
||||
* if they've passed in an existing object and
|
||||
* it's not in the collection yet, add
|
||||
* (SP1 change)
|
||||
IF TestListenerReference(m.tvReference)
|
||||
OUTPUTAPP_REFVAR.ADD(m.tvReference,m.cType)
|
||||
* synch this up, JIC:
|
||||
DO CheckPublicListenerCollection WITH m.cType, m.iIndex
|
||||
IF m.iIndex > -1
|
||||
m.oTemp = m.tvReference
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF NOT TestListenerReference(m.oTemp)
|
||||
|
||||
* if it is not available,
|
||||
* look for config file, choosing between built-in and
|
||||
* on-disk
|
||||
|
||||
m.oError = NULL
|
||||
STORE "" TO m.cClass, m.cLib, m.cModule
|
||||
|
||||
* try to open, error handle for
|
||||
* unavailability
|
||||
|
||||
DO GetConfigObject WITH m.oConfig
|
||||
|
||||
TRY
|
||||
SELECT 0
|
||||
|
||||
m.iIndex = -1
|
||||
DO CheckPublicListenerCollection WITH ;
|
||||
TRANSFORM(OUTPUTAPP_CONFIGTOKEN_SETTABLE), m.iIndex
|
||||
|
||||
IF m.iIndex > -1
|
||||
m.cConfigTable = OUTPUTAPP_REFVAR.ITEM[m.iIndex]
|
||||
ELSE
|
||||
m.cConfigTable = m.oConfig.GetConfigTable()
|
||||
* the collection will have been created by
|
||||
* CheckPublicListenerCollection
|
||||
OUTPUTAPP_REFVAR.ADD(m.cConfigTable,TRANSFORM(OUTPUTAPP_CONFIGTOKEN_SETTABLE))
|
||||
ENDIF
|
||||
|
||||
USE (m.cConfigTable ) ALIAS OutputConfig SHARED
|
||||
|
||||
IF m.oConfig.VerifyConfigTable("OutputConfig")
|
||||
|
||||
* look for filter records first:
|
||||
|
||||
* OBJTYPE 110 identifies a configuration record
|
||||
* OBJCODE 1 Configuration item type. 1= registry filter
|
||||
* OBJNAME not used
|
||||
* OBJVALUE not used
|
||||
* OBJINFO Filter expression
|
||||
|
||||
SELECT OutputConfig
|
||||
SET ORDER TO 0
|
||||
LOCATE && GO TOP
|
||||
LOCATE FOR ObjType = OUTPUTAPP_OBJTYPE_CONFIG AND ;
|
||||
ObjCode = OUTPUTAPP_OBJCODE_FILTER AND ;
|
||||
NOT (EMPTY(ObjInfo) OR DELETED())
|
||||
IF FOUND()
|
||||
m.cFilter = " AND (" + ALLTR(ObjInfo) + ")"
|
||||
ELSE
|
||||
m.cFilter = ""
|
||||
ENDIF
|
||||
|
||||
* check for type record for the passed type and
|
||||
* not deleted and in the filter
|
||||
|
||||
* OBJTYPE 100 identifies a Listener registry record
|
||||
* OBJCODE Listener Type values -1, 0, 1, and 2 supported by default
|
||||
* OBJNAME Class to instantiate may be ReportListener (base class)
|
||||
* OBJVALUE Class library or procedure file may be blank
|
||||
* OBJINFO Module/Application containing library may be blank
|
||||
|
||||
LOCATE && GO TOP
|
||||
|
||||
LOCATE FOR ObjType = OUTPUTAPP_OBJTYPE_LISTENER AND ;
|
||||
(ObjCode = m.iType) ;
|
||||
&cFilter. AND (NOT DELETED())
|
||||
IF FOUND()
|
||||
* get values
|
||||
m.cClass = ALLTRIM(ObjName)
|
||||
m.cLib = ALLTRIM(ObjValue)
|
||||
m.cModule = ALLTR(ObjInfo)
|
||||
|
||||
ELSE
|
||||
|
||||
DO GetSupportedListenerInfo WITH ;
|
||||
m.iType, m.cClass, m.cLib, m.cModule
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
|
||||
IF ISNULL(m.oError) && should be
|
||||
m.oError = CREATEOBJECT("Exception")
|
||||
m.oError.Message = OUTPUTAPP_CONFIGTABLEWRONG_LOC
|
||||
ENDIF
|
||||
|
||||
IF OUTPUTAPP_DEFAULTCONFIG_AFTER_CONFIGTABLEFAILURE
|
||||
DO GetSupportedListenerInfo WITH ;
|
||||
m.iType, m.cClass, m.cLib, m.cModule
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
IF USED("OutputConfig")
|
||||
USE IN OutputConfig
|
||||
ENDIF
|
||||
|
||||
IF NOT EMPTY(m.cClass)
|
||||
IF NOT INLIST(UPPER(JUSTEXT(m.cModule)),"APP","EXE", "DLL")
|
||||
* frxoutput can be built into the current app or exe
|
||||
m.cModule = ""
|
||||
ENDIF
|
||||
m.oTemp = NEWOBJECT(m.cClass, m.cLib, m.cModule)
|
||||
ENDIF
|
||||
CATCH TO m.oError
|
||||
EXIT
|
||||
FINALLY
|
||||
* m.oSH.Execute(m.iSession)
|
||||
* SET DATASESSION TO (m.iSession)
|
||||
ENDTRY
|
||||
|
||||
IF NOT ISNULL(m.oError)
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn, m.oSH
|
||||
HandleError(m.oError)
|
||||
ELSE
|
||||
|
||||
IF TestListenerReference(m.oTemp) AND ;
|
||||
PEMSTATUS(m.oTemp,"ListenerType",5)
|
||||
* see notes below, we don't
|
||||
* prevent the assignment if not
|
||||
* a listener but we do not want it
|
||||
* in the collection nonetheless
|
||||
|
||||
#IF OUTPUTAPP_ASSIGN_TYPE
|
||||
IF UPPER(m.oTemp.BaseClass) == UPPER(m.oTemp.Class)
|
||||
m.oTemp.ListenerType = m.iType
|
||||
ENDIF
|
||||
#ENDIF
|
||||
OUTPUTAPP_REFVAR.ADD(m.oTemp,m.cType)
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
STORE NULL TO m.oConfig, m.oError
|
||||
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
|
||||
m.lSuccess = TestListenerReference(m.oTemp)
|
||||
|
||||
* we don't test for listener baseclass --
|
||||
* they could hide the property --
|
||||
* also we get a more consistent
|
||||
* error message letting the product
|
||||
* handle things if the object does
|
||||
* not descend from ReportListener
|
||||
* however, we have to assign type as needed,
|
||||
* and that will require a test.
|
||||
|
||||
|
||||
IF m.lSuccess
|
||||
|
||||
#IF OUTPUTAPP_ASSIGN_OUTPUTTYPE
|
||||
TRY
|
||||
m.oTemp.OutputType =m.iType
|
||||
CATCH WHEN .T.
|
||||
* in case they
|
||||
* hid or protected it,
|
||||
* or have an assign method that errored
|
||||
ENDTRY
|
||||
#ENDIF
|
||||
|
||||
DO CASE
|
||||
CASE m.iParams = 1
|
||||
* nothing to assign, just store in the collection
|
||||
CASE m.lStringVar OR m.lObjectMember
|
||||
IF m.lStringVar AND TYPE(m.tvReference) = "U"
|
||||
PUBLIC &tvReference.
|
||||
ENDIF
|
||||
STORE m.oTemp TO (m.tvReference)
|
||||
#IF OUTPUTAPP_ASSIGN_TYPE
|
||||
IF PEMSTATUS(&tvReference.,"ListenerType",5) AND ;
|
||||
UPPER(m.oTemp.BaseClass) == UPPER(m.oTemp.Class)
|
||||
&tvReference..ListenerType = m.iType
|
||||
ENDIF
|
||||
#ENDIF
|
||||
OTHERWISE
|
||||
m.tvReference = m.oTemp
|
||||
#IF OUTPUTAPP_ASSIGN_TYPE
|
||||
IF PEMSTATUS(m.tvReference,"ListenerType",5) AND ;
|
||||
UPPER(m.oTemp.BaseClass) == UPPER(m.oTemp.Class)
|
||||
m.tvReference.ListenerType = m.iType
|
||||
ENDIF
|
||||
#ENDIF
|
||||
ENDCASE
|
||||
ELSE
|
||||
DO CASE
|
||||
CASE m.iParams = 1
|
||||
* nothing to assign
|
||||
CASE m.lStringVar OR m.lObjectMember
|
||||
STORE NULL TO (m.tvReference)
|
||||
OTHERWISE
|
||||
m.tvReference = NULL
|
||||
ENDCASE
|
||||
ENDIF
|
||||
|
||||
DO ReportOutputCleanup WITH ;
|
||||
m.iSelect, m.lSetTalkBackOnDefaultSession, ;
|
||||
m.iSession, m.lSetTalkBackOn,m.oSH
|
||||
|
||||
RETURN m.lSuccess && not used by the product but might be used by somebody
|
||||
|
||||
PROC ReportOutputCleanup( ;
|
||||
m.tiSelect, m.tlResetTalkDefaultSession, m.tiSession,m.tlResetTalk,m.toSH )
|
||||
m.toSH.Execute(VFP_DEFAULT_DATASESSION) && JIC
|
||||
SELECT (m.tiSelect)
|
||||
IF m.tlResetTalkDefaultSession
|
||||
SET TALK ON
|
||||
ENDIF
|
||||
toSH.Execute(m.tiSession)
|
||||
IF m.tlResetTalk
|
||||
SET TALK ON
|
||||
ENDIF
|
||||
m.toSH = NULL
|
||||
ENDPROC
|
||||
|
||||
PROC TestListenerReference(m.toRef)
|
||||
|
||||
RETURN (VARTYPE(m.toRef) = "O") && AND ;
|
||||
&& (UPPER(toRef.BASECLASS) == "REPORTLISTENER")
|
||||
|
||||
PROC GetSupportedListenerInfo(m.tiType, m.tcClass, m.tcLib, m.tcModule)
|
||||
DO CASE
|
||||
CASE OUTPUTAPP_XBASELISTENERS_FOR_BASETYPES AND ;
|
||||
m.tiType = LISTENER_TYPE_PRN
|
||||
m.tcClass = OUTPUTAPP_CLASS_PRINTLISTENER
|
||||
m.tcLib = OUTPUTAPP_BASELISTENER_CLASSLIB
|
||||
|
||||
CASE OUTPUTAPP_XBASELISTENERS_FOR_BASETYPES AND ;
|
||||
m.tiType= LISTENER_TYPE_PRV
|
||||
m.tcClass = OUTPUTAPP_CLASS_PREVIEWLISTENER
|
||||
m.tcLib = OUTPUTAPP_BASELISTENER_CLASSLIB
|
||||
|
||||
CASE INLIST(m.tiType,LISTENER_TYPE_PRN,;
|
||||
LISTENER_TYPE_PRV, ;
|
||||
LISTENER_TYPE_PAGED, ;
|
||||
LISTENER_TYPE_ALLPGS)
|
||||
m.tcClass = "ReportListener"
|
||||
CASE m.tiType = LISTENER_TYPE_HTML
|
||||
m.tcClass = OUTPUTAPP_CLASS_HTMLLISTENER
|
||||
m.tcLib = OUTPUTAPP_BASELISTENER_CLASSLIB
|
||||
CASE m.tiType = LISTENER_TYPE_XML
|
||||
m.tcClass = OUTPUTAPP_CLASS_XMLLISTENER
|
||||
m.tcLib = OUTPUTAPP_BASELISTENER_CLASSLIB
|
||||
CASE m.tiType = LISTENER_TYPE_DEBUG
|
||||
m.tcClass = OUTPUTAPP_CLASS_DEBUGLISTENER
|
||||
m.tcLib = OUTPUTAPP_BASELISTENER_CLASSLIB
|
||||
OTHERWISE
|
||||
* ERROR here?
|
||||
* No, let product handle it consistently.
|
||||
ENDCASE
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROC ReportOutputConfig(m.tnType, m.tvReference, m.tvUnload, m.toSH)
|
||||
* NB: early quit in case somebody
|
||||
* calls the thing improperly,
|
||||
* even from the command line with a SET PROC
|
||||
IF VARTYPE(m.tnType) # "N"
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
* can support other things besides writing the
|
||||
* table here
|
||||
LOCAL m.iSession, oSession, m.oError, m.oConfig, m.cDBF, m.lSuccess, m.cType, m.iIndex
|
||||
m.oError = NULL
|
||||
m.oConfig = NULL
|
||||
m.iSession = SET("DATASESSION")
|
||||
m.lSuccess = .F.
|
||||
TRY
|
||||
DO CASE
|
||||
CASE m.tnType = OUTPUTAPP_CONFIGTOKEN_SETTABLE AND ;
|
||||
VARTYPE(m.tvReference) = "C" AND ;
|
||||
FILE(FULLPATH(FORCEEXT(TRANSFORM(m.tvReference),"DBF")))
|
||||
* use FILE() because it can be in the app
|
||||
|
||||
m.cDBF = FULLPATH(FORCEEXT(TRANSFORM(m.tvReference),"DBF"))
|
||||
m.iIndex = -1
|
||||
m.cType = TRANSFORM(OUTPUTAPP_CONFIGTOKEN_SETTABLE)
|
||||
DO CheckPublicListenerCollection WITH m.cType, m.iIndex
|
||||
IF m.iIndex # -1
|
||||
OUTPUTAPP_REFVAR.REMOVE[m.iIndex]
|
||||
ENDIF
|
||||
OUTPUTAPP_REFVAR.ADD(m.cDBF,m.cType)
|
||||
m.lSuccess = .T.
|
||||
CASE m.tnType = OUTPUTAPP_CONFIGTOKEN_WRITETABLE
|
||||
oSession = CREATEOBJECT("session")
|
||||
m.lSafety = SET("SAFETY") = "ON"
|
||||
m.toSH.Execute(oSession.DataSessionID)
|
||||
IF m.lSafety
|
||||
SET SAFETY ON
|
||||
ENDIF
|
||||
DO GetConfigObject WITH m.oConfig, .T.
|
||||
* use XML class, not config superclass,
|
||||
* to write both sets of records, base config outline
|
||||
* and base listener's nodenames
|
||||
m.cDBF = FORCEEXT(FORCEPATH(OUTPUTAPP_EXTERNALDBF, JUSTPATH(SYS(16,0))),"DBF")
|
||||
m.oConfig.CreateConfigTable(m.cDBF)
|
||||
IF NOT EMPTY(SYS(2000,m.cDBF))
|
||||
m.iIndex = -1
|
||||
m.cType = TRANSFORM(OUTPUTAPP_CONFIGTOKEN_SETTABLE)
|
||||
DO CheckPublicListenerCollection WITH m.cType, m.iIndex
|
||||
IF m.iIndex # -1
|
||||
OUTPUTAPP_REFVAR.REMOVE[m.iIndex]
|
||||
ENDIF
|
||||
OUTPUTAPP_REFVAR.ADD(m.cDBF,m.cType)
|
||||
USE (m.cDBF)
|
||||
LOCATE FOR ObjType = OUTPUTAPP_OBJTYPE_LISTENER AND ;
|
||||
ObjCode = LISTENER_TYPE_DEBUG AND ;
|
||||
UPPER(ALLTRIM(ObjName)) == 'DEBUGLISTENER' AND ;
|
||||
ObjValue = OUTPUTAPP_BASELISTENER_CLASSLIB AND ;
|
||||
DELETED()
|
||||
IF EOF()
|
||||
INSERT INTO (ALIAS()) VALUES ;
|
||||
(OUTPUTAPP_OBJTYPE_LISTENER ,LISTENER_TYPE_DEBUG,'DebugListener',OUTPUTAPP_BASELISTENER_CLASSLIB,SYS(16,0))
|
||||
DELETE NEXT 1
|
||||
ENDIF
|
||||
*!* SELECT ObjType, ObjCode, ObjName, ObjValue , ;
|
||||
*!* LEFT(ObjInfo,30) AS Info FROM (m.cDBF) ;
|
||||
*!* INTO CURSOR STRTRAN(OUTPUTAPP_CONFIGTABLEBROWSE_LOC," ","")
|
||||
*!* SELECT (STRTRAN(OUTPUTAPP_CONFIGTABLEBROWSE_LOC," ",""))
|
||||
*!* BROWSE TITLE OUTPUTAPP_CONFIGTABLEBROWSE_LOC FIELDS ;
|
||||
*!* ObjType, ObjCode, ObjName, ObjValue , Info = LEFT(ObjInfo,30), ObjInfo
|
||||
BROWSE TITLE OUTPUTAPP_CONFIGTABLEBROWSE_LOC
|
||||
USE
|
||||
m.lSuccess = .T.
|
||||
ELSE
|
||||
m.lSuccess = .F.
|
||||
ENDIF
|
||||
OTHERWISE
|
||||
m.iIndex = -1
|
||||
m.cType = TRANSFORM(OUTPUTAPP_CONFIGTOKEN_SETTABLE)
|
||||
DO CheckPublicListenerCollection WITH m.cType, m.iIndex
|
||||
IF m.iIndex = -1
|
||||
* don't disturb it if it's there
|
||||
DO GetConfigObject WITH m.oConfig
|
||||
m.cDBF = m.oConfig.GetConfigTable()
|
||||
OUTPUTAPP_REFVAR.ADD(m.cDBF,m.cType)
|
||||
m.tvReference = m.cDBF
|
||||
ELSE
|
||||
m.tvReference= OUTPUTAPP_REFVAR.ITEM[m.iIndex]
|
||||
ENDIF
|
||||
m.lSuccess = .T.
|
||||
ENDCASE
|
||||
CATCH WHEN WTITLE() = OUTPUTAPP_CONFIGTABLEBROWSE_LOC
|
||||
* MESSAGEBOX("here")
|
||||
* error 57 on the browse -- no table open ad nauseum
|
||||
CATCH TO m.oError
|
||||
m.lSuccess = .F.
|
||||
FINALLY
|
||||
m.toSH.Execute(m.iSession)
|
||||
ENDTRY
|
||||
|
||||
IF NOT ISNULL(m.oError)
|
||||
HandleError(m.oError)
|
||||
ENDIF
|
||||
|
||||
RETURN m.lSuccess
|
||||
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE GetConfigObject(m.toCfg, m.tXML)
|
||||
LOCAL m.lcModule
|
||||
m.lcModule = _REPORTOUTPUT
|
||||
IF NOT INLIST(UPPER(JUSTEXT(m.lcModule)),"EXE","APP","DLL")
|
||||
m.lcModule = SYS(16,0)
|
||||
ENDIF
|
||||
IF NOT INLIST(UPPER(JUSTEXT(m.lcModule)), "EXE","APP","DLL")
|
||||
m.lcModule = ""
|
||||
ENDIF
|
||||
IF m.tXML
|
||||
m.toCfg = NEWOBJECT(OUTPUTAPP_CLASS_XMLLISTENER,OUTPUTAPP_BASELISTENER_CLASSLIB, m.lcModule)
|
||||
ELSE
|
||||
m.toCfg = NEWOBJECT(OUTPUTAPP_CLASS_UTILITYLISTENER,OUTPUTAPP_BASELISTENER_CLASSLIB, m.lcModule)
|
||||
ENDIF
|
||||
IF VARTYPE(toCfg) = "O"
|
||||
m.toCfg.QuietMode = .T.
|
||||
m.toCfg.AppName = OUTPUTAPP_APPNAME_LOC
|
||||
ENDIF
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE ReportOutputDeclareReference( ;
|
||||
m.tiParams, m.tvReference, m.tlObjectMember, m.tlStringVar)
|
||||
LOCAL m.iDotPos
|
||||
IF m.tiParams > 1 AND ;
|
||||
TYPE("m.tvReference") = "C"
|
||||
m.iDotPos = RAT(".",m.tvReference)
|
||||
IF m.iDotPos > 1 AND ;
|
||||
m.iDotPos < LEN(m.tvReference)
|
||||
IF TYPE(m.tvReference) = "U"
|
||||
IF TYPE(LEFT(m.tvReference,m.iDotPos-1)) = "O"
|
||||
AddProperty(EVAL(LEFT(m.tvReference,m.iDotPos-1)),SUBSTR(m.tvReference,m.iDotPos+1))
|
||||
m.tlObjectMember = .T.
|
||||
ENDIF
|
||||
ELSE
|
||||
m.tlObjectMember = .T.
|
||||
ENDIF
|
||||
ELSE
|
||||
m.tlStringVar = .T.
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE UnloadListener(m.tiType)
|
||||
LOCAL m.lUnload, m.cType
|
||||
|
||||
IF VARTYPE(OUTPUTAPP_REFVAR) # "O" OR ;
|
||||
NOT (UPPER(OUTPUTAPP_REFVAR.CLASS) == ;
|
||||
UPPER(OUTPUTAPP_REFVARCLASS))
|
||||
|
||||
* nothing to do
|
||||
|
||||
ELSE
|
||||
m.cType = TRANSFORM(m.tiType)
|
||||
* look for reference to a listener of the appropriate type
|
||||
FOR m.iIndex = 1 TO OUTPUTAPP_REFVAR.COUNT
|
||||
IF OUTPUTAPP_REFVAR.GETKEY(m.iIndex) == m.cType
|
||||
OUTPUTAPP_REFVAR.Remove(m.iIndex)
|
||||
m.lUnload = .T.
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN m.lUnload
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE HandleError(m.toE)
|
||||
DO CASE
|
||||
CASE NOT ISNULL(m.toE)
|
||||
IF EMPTY(toE.ErrorNo)
|
||||
ERROR toE.Message
|
||||
ELSE
|
||||
ERROR toE.ErrorNo, toE.Details
|
||||
ENDIF
|
||||
CASE NOT EMPTY(MESSAGE())
|
||||
ERROR MESSAGE()
|
||||
OTHERWISE
|
||||
ERROR OUTPUTAPP_UNKNOWN_ERROR_LOC
|
||||
ENDCASE
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE CheckPublicListenerCollection(m.tcType, m.tiIndex)
|
||||
|
||||
LOCAL m.iIndex
|
||||
|
||||
IF VARTYPE(OUTPUTAPP_REFVAR) # "O" OR ;
|
||||
NOT (UPPER(OUTPUTAPP_REFVAR.CLASS) == ;
|
||||
UPPER(OUTPUTAPP_REFVARCLASS))
|
||||
* could be a collection subclass
|
||||
* in which case look for
|
||||
* AINSTANCE(aTemp, <classname>)
|
||||
|
||||
PUBLIC OUTPUTAPP_REFVAR
|
||||
STORE CREATEOBJECT(OUTPUTAPP_REFVARCLASS) TO ([OUTPUTAPP_REFVAR])
|
||||
|
||||
ENDIF
|
||||
|
||||
IF NOT EMPTY(m.tcType)
|
||||
|
||||
FOR m.iIndex = 1 TO OUTPUTAPP_REFVAR.COUNT
|
||||
IF OUTPUTAPP_REFVAR.GETKEY(m.iIndex) == m.tcType
|
||||
m.tiIndex = m.iIndex
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
ENDIF
|
||||
|
||||
ENDPROC
|
||||
|
||||
DEFINE CLASS SH AS Custom
|
||||
PROCEDURE Execute(m.tiSession)
|
||||
SET DATASESSION TO (m.tiSession)
|
||||
ENDPROC
|
||||
ENDDEFINE
|
||||
19
COMUN/utile/hpdf/ReportOutput/license.txt
Normal file
19
COMUN/utile/hpdf/ReportOutput/license.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Permissive License (Ms-PL)
|
||||
|
||||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
|
||||
|
||||
1. Definitions
|
||||
The terms "reproduce", "reproduction" and "distribution" have the same meaning here as under U.S. copyright law.
|
||||
"You" means the licensee of the software.
|
||||
"Licensed patents" means any Microsoft patent claims which read directly on the software as distributed by Microsoft under this license.
|
||||
|
||||
2. Grant of Rights
|
||||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, Microsoft grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce the software, prepare derivative works of the software and distribute the software or any derivative works that you create.
|
||||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, Microsoft grants you a non-exclusive, worldwide, royalty-free patent license under licensed patents to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the software or derivative works of the software.
|
||||
|
||||
3. Conditions and Limitations
|
||||
(A) No Trademark License- This license does not grant you any rights to use Microsoft<66>s name, logo, or trademarks.
|
||||
(B) If you begin patent litigation against Microsoft over patents that you think may apply to the software (including a cross-claim or counterclaim in a lawsuit), your license to the software ends automatically.
|
||||
(C) If you distribute copies of the software or derivative works, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||
(D) If you distribute the software or derivative works in source code form you may do so only under this license (i.e., you must include a complete copy of this license with your distribution), and if you distribute the software or derivative works in compiled or object code form you may only do so under a license that complies with this license.
|
||||
(E) The software is licensed "as-is." You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
||||
BIN
COMUN/utile/hpdf/ReportOutput/listener.VCT
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/listener.VCT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/listener.vcx
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/listener.vcx
Normal file
Binary file not shown.
76
COMUN/utile/hpdf/ReportOutput/reportlisteners.h
Normal file
76
COMUN/utile/hpdf/ReportOutput/reportlisteners.h
Normal file
@@ -0,0 +1,76 @@
|
||||
#INCLUDE FOXPRO_REPORTING.H
|
||||
|
||||
#INCLUDE REPORTLISTENERS_LOCS.H
|
||||
|
||||
* -- constants for VCX super classes
|
||||
|
||||
* -- general constant for debugging
|
||||
#DEFINE OUTPUTCLASS_DEBUGGING .F.
|
||||
|
||||
* -- UtilityReportListener class
|
||||
|
||||
#DEFINE OUTPUTCLASS_READCONFIG_NEITHER 0
|
||||
#DEFINE OUTPUTCLASS_READCONFIG_INIT 1
|
||||
#DEFINE OUTPUTCLASS_READCONFIG_REPORT 2
|
||||
#DEFINE OUTPUTCLASS_READCONFIG_BOTH 3
|
||||
|
||||
* -- XML Output Listener class-specific constants
|
||||
|
||||
#DEFINE OUTPUTXML_DATA_ONLY 0
|
||||
#DEFINE OUTPUTXML_RDL_ONLY 1
|
||||
#DEFINE OUTPUTXML_DATA_RDL 2
|
||||
|
||||
#DEFINE OUTPUTXML_BREAKS_INDATA 0
|
||||
#DEFINE OUTPUTXML_BREAKS_NONE 1
|
||||
#DEFINE OUTPUTXML_BREAKS_COLLECTION 2
|
||||
|
||||
#DEFINE OUTPUTXML_RAW 0
|
||||
#DEFINE OUTPUTXML_DOM 1
|
||||
#DEFINE OUTPUTXML_DOTNET 2
|
||||
|
||||
#DEFINE OUTPUTXML_CHARFIELD_LIMIT 254
|
||||
|
||||
#DEFINE OUTPUTXML_XSLTOBJECT_TYPESTRINGS "|document|element|"
|
||||
|
||||
* #DEFINE OUTPUTXML_REPEATSPANNEDITEM .T.
|
||||
* #DEFINE OUTPUTXML_PERFORMLOCALECONVERSION .F.
|
||||
|
||||
#DEFINE OUTPUTXML_CONTINUATION (THIS.NoPageEject OR ;
|
||||
(VARTYPE(THIS.CommandClauses) = "O" AND ;
|
||||
THIS.CommandClauses.NoPageEject))
|
||||
|
||||
* supplied superclasses' tunable settings
|
||||
|
||||
#DEFINE OUTPUTCLASS_INTERNALDBF "_ReportOutputConfig"
|
||||
#DEFINE OUTPUTCLASS_EXTERNALDBF "OutputConfig"
|
||||
|
||||
#DEFINE OUTPUTCLASS_OBJTYPE_CONFIG 1000
|
||||
|
||||
#DEFINE OUTPUTCLASS_STATUSCHAR_PCT_DONE [|]
|
||||
#DEFINE OUTPUTCLASS_STATUSCHAR_PCT_NOT_DONE [.] R
|
||||
#DEFINE OUTPUTCLASS_ONE_HUNDRED_PCT_MARK 50
|
||||
|
||||
#DEFINE OUTPUTCLASS_FILENAME_CHARS_DISALLOWED [?*"<>|]
|
||||
|
||||
* -- XML Output Listener-specific user-tunable settings
|
||||
|
||||
#DEFINE OUTPUTXML OUTPUTXML_RAW
|
||||
|
||||
#DEFINE OUTPUTXML_OBJTYPE_NODES 1100
|
||||
#DEFINE OUTPUTXML_OBJTYPE_BANDOFFSET 500
|
||||
#DEFINE OUTPUTXML_OBJCODE_DOC 100
|
||||
#DEFINE OUTPUTXML_OBJCODE_DATA 200
|
||||
#DEFINE OUTPUTXML_OBJCODE_RDL 300
|
||||
#DEFINE OUTPUTXML_OBJCODE_PAGES 400
|
||||
#DEFINE OUTPUTXML_OBJCODE_COLS 500
|
||||
#DEFINE OUTPUTXML_OBJCODE_ATTRIBMEMBER 600
|
||||
|
||||
|
||||
#DEFINE OUTPUTXML_GOOFTAG "XXXX"
|
||||
|
||||
#DEFINE OUTPUTXML_DOMDOCUMENTOBJECT "Msxml2.FreeThreadedDOMDocument.4.0"
|
||||
#DEFINE OUTPUTXML_DOMFREETHREADED_DOCUMENTOBJECT "Msxml2.FreeThreadedDOMDocument.4.0"
|
||||
#DEFINE OUTPUTXML_XSLT_PROCESSOROBJECT "Msxml2.XSLTemplate.4.0"
|
||||
|
||||
|
||||
|
||||
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs.h
Normal file
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs.h
Normal file
@@ -0,0 +1,85 @@
|
||||
* locs for VCX super-classes
|
||||
|
||||
#DEFINE OUTPUTCLASS_APPNAME_LOC "VFP Report Output Class"
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLECREATED_LOC "Configuration table "+ m.lcDBF + " was created."
|
||||
* or, if you prefer: "has been written to disk."
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLEWRONG_LOC "Configuration table is not in correct format."
|
||||
|
||||
* this is different from XML because in the XML class they
|
||||
* are used in SEEK() and require specific tagnames, whereas
|
||||
* the superclasses just require certain indexes for optimizing LOCATES,
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGINDEXMISSING_LOC "Configuration table is missing "+ CHR(13) + ;
|
||||
"one or more required indexes."
|
||||
|
||||
#DEFINE OUTPUTCLASS_INITSTATUS_LOC "Initializing... "
|
||||
#DEFINE OUTPUTCLASS_PREPSTATUS_LOC "Running calculation prepass... "
|
||||
#DEFINE OUTPUTCLASS_RUNSTATUS_LOC "Creating output... "
|
||||
#DEFINE OUTPUTCLASS_TIME_SECONDS_LOC SPACE(1) + "sec(s)"
|
||||
#DEFINE OUTPUTCLASS_CANCEL_INSTRUCTIONS_LOC "Press Esc to cancel... "
|
||||
#DEFINE OUTPUTCLASS_REPORT_CANCELQUERY_LOC "Stop report execution?"+CHR(13) + ;
|
||||
"(If you press 'No', report execution will continue.)"
|
||||
#DEFINE OUTPUTCLASS_REPORT_INCOMPLETE_LOC "Report execution was cancelled." + CHR(13) + ;
|
||||
"Your results are not complete."
|
||||
|
||||
#DEFINE OUTPUTCLASS_SUCCESS_LOC THIS.AppName+" created your report as"+;
|
||||
CHR(13)+THIS.TargetFileName+"." + CHR(13) + ;
|
||||
IIF(THIS.AllowModalMessages,;
|
||||
"Press 'Yes' to store" + CHR(13) + ;
|
||||
"this filename in the Clipboard.","")
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOFILECREATE_LOC "File " + THIS.TargetFileName+" cannot be created."
|
||||
|
||||
#DEFINE OUTPUTCLASS_CREATEERRORS_LOC THIS.AppName+" created your report as"+ ;
|
||||
CHR(13)+THIS.TargetFileName+". "+CHR(13)+ ;
|
||||
"However, an error occurred during processing." + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
#DEFINE OUTPUTCLASS_PAGELIMIT_LOC "Your report exceeded a specified page limit (" + ;
|
||||
TRANSFORM(THIS.PageLimit) + "). " + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
|
||||
|
||||
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOCREATE_LOC THIS.AppName +" was not able to create your report."
|
||||
|
||||
#DEFINE OUTPUTCLASS_ERRNOLABEL_LOC "Error: "
|
||||
#DEFINE OUTPUTCLASS_ERRPROCLABEL_LOC "Method: "
|
||||
#DEFINE OUTPUTCLASS_ERRLINELABEL_LOC "Line: "
|
||||
|
||||
* the following loc is eval'd for updateListener's actual progress bar message.
|
||||
* In most cases,
|
||||
* changing this value is overkill, as the localizable portions of
|
||||
* the message are already localized as separate properties.
|
||||
* All the status messagse as well as the therm caption can
|
||||
* also be set at runtime without touching the locs.
|
||||
#DEFINE OUTPUTCLASS_THERMCAPTION_LOC [m.cMessage+ " "+ TRANSFORM(INT(THIS.PercentDone*100)) + "%" ] + ;
|
||||
[+ IIF(NOT THIS.IncludeSeconds, "" , " "+] + ;
|
||||
[TRANSFORM(IIF(THIS.IsRunning,DATETIME(), THIS.ReportStopRunDateTime)-] + ;
|
||||
[THIS.ReportStartRunDateTime)+" " + THIS.SecondsText)]
|
||||
|
||||
|
||||
* locs for XML Listener class:
|
||||
|
||||
#DEFINE OUTPUTXML_APPNAME_LOC "XML Listener"
|
||||
|
||||
#DEFINE OUTPUTXML_CONFIGTAGMISSING_LOC "At least one required index tag is missing "+ CHR(13) + ;
|
||||
"from the configuration table."
|
||||
|
||||
#DEFINE OUTPUTXML_FRXMISSING_LOC "Required FRX cursor is not available."
|
||||
|
||||
|
||||
#DEFINE OUTPUTXML_FRXCURSOR_MISSING_LOC "FRX cursor helper object cannot be found in " + CHR(13)+ ;
|
||||
"_FRXCURSOR.VCX, "+CHR(13)+ ;
|
||||
"_REPORTOUTPUT." + CHR(13) + CHR(13)+ ;
|
||||
"Some features of this class may not be active."
|
||||
|
||||
* locs for XML Display Listener Class:
|
||||
|
||||
#DEFINE OUTPUTXMLDISPLAY_APPNAME_LOC "XML Display Listener"
|
||||
|
||||
* locs for HTML:
|
||||
|
||||
#DEFINE OUTPUTHTML_APPNAME_LOC "HTML Listener"
|
||||
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs_en.h
Normal file
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs_en.h
Normal file
@@ -0,0 +1,85 @@
|
||||
* locs for VCX super-classes
|
||||
|
||||
#DEFINE OUTPUTCLASS_APPNAME_LOC "VFP Report Output Class"
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLECREATED_LOC "Configuration table "+ m.lcDBF + " was created."
|
||||
* or, if you prefer: "has been written to disk."
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLEWRONG_LOC "Configuration table is not in correct format."
|
||||
|
||||
* this is different from XML because in the XML class they
|
||||
* are used in SEEK() and require specific tagnames, whereas
|
||||
* the superclasses just require certain indexes for optimizing LOCATES,
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGINDEXMISSING_LOC "Configuration table is missing "+ CHR(13) + ;
|
||||
"one or more required indexes."
|
||||
|
||||
#DEFINE OUTPUTCLASS_INITSTATUS_LOC "Initializing... "
|
||||
#DEFINE OUTPUTCLASS_PREPSTATUS_LOC "Running calculation prepass... "
|
||||
#DEFINE OUTPUTCLASS_RUNSTATUS_LOC "Creating output... "
|
||||
#DEFINE OUTPUTCLASS_TIME_SECONDS_LOC SPACE(1) + "sec(s)"
|
||||
#DEFINE OUTPUTCLASS_CANCEL_INSTRUCTIONS_LOC "Press Esc to cancel... "
|
||||
#DEFINE OUTPUTCLASS_REPORT_CANCELQUERY_LOC "Stop report execution?"+CHR(13) + ;
|
||||
"(If you press 'No', report execution will continue.)"
|
||||
#DEFINE OUTPUTCLASS_REPORT_INCOMPLETE_LOC "Report execution was cancelled." + CHR(13) + ;
|
||||
"Your results are not complete."
|
||||
|
||||
#DEFINE OUTPUTCLASS_SUCCESS_LOC THIS.AppName+" created your report as"+;
|
||||
CHR(13)+THIS.TargetFileName+"." + CHR(13) + ;
|
||||
IIF(THIS.AllowModalMessages,;
|
||||
"Press 'Yes' to store" + CHR(13) + ;
|
||||
"this filename in the Clipboard.","")
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOFILECREATE_LOC "File " + THIS.TargetFileName+" cannot be created."
|
||||
|
||||
#DEFINE OUTPUTCLASS_CREATEERRORS_LOC THIS.AppName+" created your report as"+ ;
|
||||
CHR(13)+THIS.TargetFileName+". "+CHR(13)+ ;
|
||||
"However, an error occurred during processing." + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
#DEFINE OUTPUTCLASS_PAGELIMIT_LOC "Your report exceeded a specified page limit (" + ;
|
||||
TRANSFORM(THIS.PageLimit) + "). " + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
|
||||
|
||||
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOCREATE_LOC THIS.AppName +" was not able to create your report."
|
||||
|
||||
#DEFINE OUTPUTCLASS_ERRNOLABEL_LOC "Error: "
|
||||
#DEFINE OUTPUTCLASS_ERRPROCLABEL_LOC "Method: "
|
||||
#DEFINE OUTPUTCLASS_ERRLINELABEL_LOC "Line: "
|
||||
|
||||
* the following loc is eval'd for updateListener's actual progress bar message.
|
||||
* In most cases,
|
||||
* changing this value is overkill, as the localizable portions of
|
||||
* the message are already localized as separate properties.
|
||||
* All the status messagse as well as the therm caption can
|
||||
* also be set at runtime without touching the locs.
|
||||
#DEFINE OUTPUTCLASS_THERMCAPTION_LOC [m.cMessage+ " "+ TRANSFORM(INT(THIS.PercentDone*100)) + "%" ] + ;
|
||||
[+ IIF(NOT THIS.IncludeSeconds, "" , " "+] + ;
|
||||
[TRANSFORM(IIF(THIS.IsRunning,DATETIME(), THIS.ReportStopRunDateTime)-] + ;
|
||||
[THIS.ReportStartRunDateTime)+" " + THIS.SecondsText)]
|
||||
|
||||
|
||||
* locs for XML Listener class:
|
||||
|
||||
#DEFINE OUTPUTXML_APPNAME_LOC "XML Listener"
|
||||
|
||||
#DEFINE OUTPUTXML_CONFIGTAGMISSING_LOC "At least one required index tag is missing "+ CHR(13) + ;
|
||||
"from the configuration table."
|
||||
|
||||
#DEFINE OUTPUTXML_FRXMISSING_LOC "Required FRX cursor is not available."
|
||||
|
||||
|
||||
#DEFINE OUTPUTXML_FRXCURSOR_MISSING_LOC "FRX cursor helper object cannot be found in " + CHR(13)+ ;
|
||||
"_FRXCURSOR.VCX, "+CHR(13)+ ;
|
||||
"_REPORTOUTPUT." + CHR(13) + CHR(13)+ ;
|
||||
"Some features of this class may not be active."
|
||||
|
||||
* locs for XML Display Listener Class:
|
||||
|
||||
#DEFINE OUTPUTXMLDISPLAY_APPNAME_LOC "XML Display Listener"
|
||||
|
||||
* locs for HTML:
|
||||
|
||||
#DEFINE OUTPUTHTML_APPNAME_LOC "HTML Listener"
|
||||
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs_ro.h
Normal file
85
COMUN/utile/hpdf/ReportOutput/reportlisteners_locs_ro.h
Normal file
@@ -0,0 +1,85 @@
|
||||
* locs for VCX super-classes
|
||||
|
||||
#DEFINE OUTPUTCLASS_APPNAME_LOC "VFP Report Output Class"
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLECREATED_LOC "Configuration table "+ lcDBF + " was created."
|
||||
* or, if you prefer: "has been written to disk."
|
||||
"has been written to disk."
|
||||
#DEFINE OUTPUTCLASS_CONFIGTABLEWRONG_LOC "Configuration table is not in correct format."
|
||||
|
||||
* this is different from XML because in the XML class they
|
||||
* are used in SEEK() and require specific tagnames, whereas
|
||||
* the superclasses just require certain indexes for optimizing LOCATES,
|
||||
|
||||
#DEFINE OUTPUTCLASS_CONFIGINDEXMISSING_LOC "Configuration table is missing "+ CHR(13) + ;
|
||||
"one or more required indexes."
|
||||
|
||||
#DEFINE OUTPUTCLASS_INITSTATUS_LOC "Initializare... "
|
||||
#DEFINE OUTPUTCLASS_PREPSTATUS_LOC "Executare antecalcul... "
|
||||
#DEFINE OUTPUTCLASS_RUNSTATUS_LOC "Generare raport... "
|
||||
#DEFINE OUTPUTCLASS_TIME_SECONDS_LOC SPACE(1) + "sec(s)"
|
||||
#DEFINE OUTPUTCLASS_CANCEL_INSTRUCTIONS_LOC "Tasteaza Esc pentru abandon... "
|
||||
#DEFINE OUTPUTCLASS_REPORT_CANCELQUERY_LOC "Se opreste generarea raportului?"+CHR(13) + ;
|
||||
"(Daca selectati 'No', generarea raportului va continua.)"
|
||||
#DEFINE OUTPUTCLASS_REPORT_INCOMPLETE_LOC "Generare report anulata." + CHR(13) + ;
|
||||
"Rezultatele sunt incomplete."
|
||||
|
||||
#DEFINE OUTPUTCLASS_SUCCESS_LOC THIS.AppName+" created your report as"+;
|
||||
CHR(13)+THIS.TargetFileName+"." + CHR(13) + ;
|
||||
IIF(THIS.AllowModalMessages,;
|
||||
"Press 'Yes' to store" + CHR(13) + ;
|
||||
"this filename in the Clipboard.","")
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOFILECREATE_LOC "File " + THIS.TargetFileName+" cannot be created."
|
||||
|
||||
#DEFINE OUTPUTCLASS_CREATEERRORS_LOC THIS.AppName+" created your report as"+ ;
|
||||
CHR(13)+THIS.TargetFileName+". "+CHR(13)+ ;
|
||||
"However, an error occurred during processing." + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
|
||||
#DEFINE OUTPUTCLASS_PAGELIMIT_LOC "Raportul a depasit limita de pagini specificata (" + ;
|
||||
TRANSFORM(THIS.PageLimit) + "). " + CHR(13) + ;
|
||||
OUTPUTCLASS_REPORT_INCOMPLETE_LOC
|
||||
|
||||
|
||||
|
||||
#DEFINE OUTPUTCLASS_NOCREATE_LOC THIS.AppName +" was not able to create your report."
|
||||
|
||||
#DEFINE OUTPUTCLASS_ERRNOLABEL_LOC "Error: "
|
||||
#DEFINE OUTPUTCLASS_ERRPROCLABEL_LOC "Method: "
|
||||
#DEFINE OUTPUTCLASS_ERRLINELABEL_LOC "Line: "
|
||||
|
||||
* the following loc is eval'd for updateListener's actual progress bar message.
|
||||
* In most cases,
|
||||
* changing this value is overkill, as the localizable portions of
|
||||
* the message are already localized as separate properties.
|
||||
* All the status messagse as well as the therm caption can
|
||||
* also be set at runtime without touching the locs.
|
||||
#DEFINE OUTPUTCLASS_THERMCAPTION_LOC [cMessage+ " "+ TRANSFORM(INT(THIS.PercentDone*100)) + "%" ] + ;
|
||||
[+ IIF(NOT THIS.IncludeSeconds, "" , " "+] + ;
|
||||
[TRANSFORM(IIF(THIS.IsRunning,DATETIME(), THIS.ReportStopRunDateTime)-] + ;
|
||||
[THIS.ReportStartRunDateTime)+" " + THIS.SecondsText)]
|
||||
|
||||
|
||||
* locs for XML Listener class:
|
||||
|
||||
#DEFINE OUTPUTXML_APPNAME_LOC "XML Listener"
|
||||
|
||||
#DEFINE OUTPUTXML_CONFIGTAGMISSING_LOC "At least one required index tag is missing "+ CHR(13) + ;
|
||||
"from the configuration table."
|
||||
|
||||
#DEFINE OUTPUTXML_FRXMISSING_LOC "Required FRX cursor is not available."
|
||||
|
||||
|
||||
#DEFINE OUTPUTXML_FRXCURSOR_MISSING_LOC "FRX cursor helper object cannot be found in " + CHR(13)+ ;
|
||||
"_FRXCURSOR.VCX, "+CHR(13)+ ;
|
||||
"_REPORTOUTPUT." + CHR(13) + CHR(13)+ ;
|
||||
"Some features of this class may not be active."
|
||||
|
||||
* locs for XML Display Listener Class:
|
||||
|
||||
#DEFINE OUTPUTXMLDISPLAY_APPNAME_LOC "XML Display Listener"
|
||||
|
||||
* locs for HTML:
|
||||
|
||||
#DEFINE OUTPUTHTML_APPNAME_LOC "HTML Listener"
|
||||
BIN
COMUN/utile/hpdf/ReportOutput/reportoutput.PJT
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/reportoutput.PJT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/ReportOutput/reportoutput.PJX
Normal file
BIN
COMUN/utile/hpdf/ReportOutput/reportoutput.PJX
Normal file
Binary file not shown.
54
COMUN/utile/hpdf/ReportOutput/reportoutput.h
Normal file
54
COMUN/utile/hpdf/ReportOutput/reportoutput.h
Normal file
@@ -0,0 +1,54 @@
|
||||
* REPORTOUTPUT.APP constants
|
||||
|
||||
#INCLUDE FOXPRO_REPORTING.H
|
||||
|
||||
#INCLUDE REPORTOUTPUT_LOCS.H
|
||||
|
||||
* --- report output user-tunable settings
|
||||
|
||||
#DEFINE LISTENER_TYPE_DEBUG 999
|
||||
#DEFINE LISTENER_TYPE_XML 4
|
||||
#DEFINE LISTENER_TYPE_HTML 5
|
||||
|
||||
#DEFINE OUTPUTAPP_OBJTYPE_LISTENER 100
|
||||
#DEFINE OUTPUTAPP_OBJTYPE_CONFIG 110
|
||||
#DEFINE OUTPUTAPP_OBJCODE_FILTER 1
|
||||
|
||||
#DEFINE OUTPUTAPP_ASSIGN_TYPE .T.
|
||||
|
||||
#DEFINE OUTPUTAPP_ASSIGN_OUTPUTTYPE .T.
|
||||
|
||||
#DEFINE OUTPUTAPP_DEFAULTCONFIG_AFTER_CONFIGTABLEFAILURE .F.
|
||||
|
||||
#DEFINE OUTPUTAPP_XBASELISTENERS_FOR_BASETYPES .T.
|
||||
|
||||
#DEFINE OUTPUTAPP_INTERNALDBF "_ReportOutputConfig"
|
||||
#DEFINE OUTPUTAPP_EXTERNALDBF "OutputConfig"
|
||||
|
||||
#DEFINE OUTPUTAPP_REFVAR _oReportOutput
|
||||
#DEFINE OUTPUTAPP_REFVARCLASS "Collection"
|
||||
|
||||
#DEFINE OUTPUTAPP_CONFIGTOKEN_WRITETABLE -100
|
||||
#DEFINE OUTPUTAPP_CONFIGTOKEN_SETTABLE -200
|
||||
|
||||
#DEFINE OUTPUTAPP_BASELISTENER_CLASSLIB "Listener.VCX"
|
||||
|
||||
#DEFINE OUTPUTAPP_CLASS_PRINTLISTENER "CursorListener"
|
||||
#DEFINE OUTPUTAPP_CLASS_PREVIEWLISTENER "CursorListener"
|
||||
#DEFINE OUTPUTAPP_CLASS_DEBUGLISTENER "DebugListener"
|
||||
#DEFINE OUTPUTAPP_CLASS_UTILITYLISTENER "UtilityReportListener"
|
||||
#DEFINE OUTPUTAPP_CLASS_HTMLLISTENER "HTMLListener"
|
||||
#DEFINE OUTPUTAPP_CLASS_XMLLISTENER "XMLListener"
|
||||
|
||||
#DEFINE VFP_DEFAULT_DATASESSION 1
|
||||
|
||||
#DEFINE OUTPUTAPP_LOADTYPE_DEFAULT 0
|
||||
#DEFINE OUTPUTAPP_LOADTYPE_UNLOAD 1
|
||||
#DEFINE OUTPUTAPP_LOADTYPE_RELOAD 2
|
||||
* NB any value above 1 is actually reload instruction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
COMUN/utile/hpdf/ReportOutput/reportoutput_locs.h
Normal file
12
COMUN/utile/hpdf/ReportOutput/reportoutput_locs.h
Normal file
@@ -0,0 +1,12 @@
|
||||
* locs for REPORTOUTPUT.APP
|
||||
|
||||
#DEFINE OUTPUTAPP_APPNAME_LOC "VFP Report Output Application"
|
||||
|
||||
#DEFINE OUTPUTAPP_CONFIGTABLEBROWSE_LOC "Output Configuration Table"
|
||||
|
||||
#DEFINE OUTPUTAPP_CONFIGTABLEWRONG_LOC "Configuration table specified to " + ;
|
||||
OUTPUTAPP_APPNAME_LOC + CHR(13) + ;
|
||||
"is not found or is in the wrong format."
|
||||
|
||||
#DEFINE OUTPUTAPP_UNKNOWN_ERROR_LOC "An unknown error has occurred in " + OUTPUTAPP_APPNAME_LOC
|
||||
|
||||
1684
COMUN/utile/hpdf/_libpdf.PRG
Normal file
1684
COMUN/utile/hpdf/_libpdf.PRG
Normal file
File diff suppressed because it is too large
Load Diff
18
COMUN/utile/hpdf/build_err_msgs.PRG
Normal file
18
COMUN/utile/hpdf/build_err_msgs.PRG
Normal file
@@ -0,0 +1,18 @@
|
||||
if not Used('hpdferr')
|
||||
use hpdferr in 0
|
||||
endif
|
||||
set textmerge on
|
||||
set textmerge to memvar _cliptext
|
||||
select hpdferr
|
||||
\ with this.errors
|
||||
scan
|
||||
\ .Add([<<Strtran(Trim(hpdferr.message),Chr(13),"] + CR + [")>>], "<<Transform(hpdferr.errno)>>")
|
||||
endscan
|
||||
\ endwith
|
||||
use
|
||||
|
||||
set textmerge to
|
||||
|
||||
|
||||
|
||||
|
||||
20
COMUN/utile/hpdf/citeste.txt
Normal file
20
COMUN/utile/hpdf/citeste.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
Trebuie adaugat in main :
|
||||
Set Path To Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\] Additive
|
||||
|
||||
Trebuie adaugate in proiecte :
|
||||
\COMUN\_gdiplus.vcx
|
||||
\COMUN\UTILE\HPDF\REPORTOUTPUT\listener.vcx
|
||||
|
||||
\COMUN\UTILE\HPDF\REPORTOUTPUT\frxoutput.prg
|
||||
\COMUN\UTILE\HPDF\_libpdf.prg
|
||||
\COMUN\UTILE\HPDF\build_err_msgs.prg
|
||||
\COMUN\UTILE\HPDF\pdflistener.prg
|
||||
|
||||
\COMUN\UTILE\HPDF\hpdf_consts.h
|
||||
\COMUN\UTILE\HPDF\hpdf_types.h
|
||||
\COMUN\UTILE\HPDF\PDFListener.h
|
||||
\COMUN\UTILE\HPDF\REPORTOUTPUT\foxpro_reporting.h
|
||||
\COMUN\reportlisteners.h
|
||||
|
||||
Se folosesc impreuna cu oexport.prg ( procedura export2pdf ).
|
||||
Am modificat pdflistener.prg.
|
||||
555
COMUN/utile/hpdf/hpdf_consts.h
Normal file
555
COMUN/utile/hpdf/hpdf_consts.h
Normal file
@@ -0,0 +1,555 @@
|
||||
* << Haru Free PDF Library 2.0.3 >> -- hpdf_consts.h
|
||||
*
|
||||
* URL http://libharu.sourceforge.net/
|
||||
*
|
||||
* Copyright (c) 1999-2006 Takeshi Kanno
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
|
||||
*-- logical, return codes ---------------------------------------------------*/
|
||||
|
||||
#define HPDF_TRUE 1
|
||||
#define HPDF_FALSE 0
|
||||
|
||||
#define HPDF_OK 0
|
||||
#define HPDF_NOERROR 0
|
||||
|
||||
*-- handles ------------------------------------------------------------------*/
|
||||
|
||||
#define HPDF_HANDLE integer
|
||||
#define HPDF_Doc HPDF_HANDLE
|
||||
#define HPDF_Page HPDF_HANDLE
|
||||
#define HPDF_Pages HPDF_HANDLE
|
||||
#define HPDF_Stream HPDF_HANDLE
|
||||
#define HPDF_Image HPDF_HANDLE
|
||||
#define HPDF_Font HPDF_HANDLE
|
||||
#define HPDF_Outline HPDF_HANDLE
|
||||
#define HPDF_Encoder HPDF_HANDLE
|
||||
#define HPDF_Destination HPDF_HANDLE
|
||||
#define HPDF_XObject HPDF_HANDLE
|
||||
#define HPDF_Annotation HPDF_HANDLE
|
||||
|
||||
*----- default values -------------------------------------------------------*/
|
||||
|
||||
* buffer size which is required when we convert to character string. */
|
||||
#define HPDF_TMP_BUF_SIZ 256
|
||||
#define HPDF_SHORT_BUF_SIZ 32
|
||||
#define HPDF_REAL_LEN 11
|
||||
#define HPDF_INT_LEN 11
|
||||
#define HPDF_TEXT_DEFAULT_LEN 256
|
||||
#define HPDF_UNICODE_HEADER_LEN 2
|
||||
#define HPDF_DATE_TIME_STR_LEN 23
|
||||
|
||||
* length of each item defined in PDF */
|
||||
#define HPDF_BYTE_OFFSET_LEN 10
|
||||
#define HPDF_OBJ_ID_LEN 7
|
||||
#define HPDF_GEN_NO_LEN 5
|
||||
|
||||
* default value of Graphic State */
|
||||
#define HPDF_DEF_FONT "Helvetica"
|
||||
#define HPDF_DEF_PAGE_LAYOUT HPDF_PAGE_LAYOUT_SINGLE
|
||||
#define HPDF_DEF_PAGE_MODE HPDF_PAGE_MODE_USE_NONE
|
||||
#define HPDF_DEF_WORDSPACE 0
|
||||
#define HPDF_DEF_CHARSPACE 0
|
||||
#define HPDF_DEF_FONTSIZE 10
|
||||
#define HPDF_DEF_HSCALING 100
|
||||
#define HPDF_DEF_LEADING 0
|
||||
#define HPDF_DEF_RENDERING_MODE HPDF_FILL
|
||||
#define HPDF_DEF_RISE 0
|
||||
#define HPDF_DEF_RAISE HPDF_DEF_RISE
|
||||
#define HPDF_DEF_LINEWIDTH 1
|
||||
#define HPDF_DEF_LINECAP HPDF_BUTT_END
|
||||
#define HPDF_DEF_LINEJOIN HPDF_MITER_JOIN
|
||||
#define HPDF_DEF_MITERLIMIT 10
|
||||
#define HPDF_DEF_FLATNESS 1
|
||||
#define HPDF_DEF_PAGE_NUM 1
|
||||
|
||||
#define HPDF_BS_DEF_WIDTH 1
|
||||
|
||||
*/* defalt page-size */
|
||||
#define HPDF_DEF_PAGE_WIDTH 595.276F
|
||||
#define HPDF_DEF_PAGE_HEIGHT 841.89F
|
||||
|
||||
#define HPDF_VERSION_TEXT "2.0.5"
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*----- compression mode ----------------------------------------------------*/
|
||||
|
||||
#define HPDF_COMP_NONE 0x00
|
||||
#define HPDF_COMP_TEXT 0x01
|
||||
#define HPDF_COMP_IMAGE 0x02
|
||||
#define HPDF_COMP_METADATA 0x04
|
||||
#define HPDF_COMP_ALL 0x0F
|
||||
*/* #define HPDF_COMP_BEST_COMPRESS 0x10
|
||||
* #define HPDF_COMP_BEST_SPEED 0x20
|
||||
*/
|
||||
#define HPDF_COMP_MASK 0xFF
|
||||
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*----- permission flags (only Revision 2 is supported)-----------------------*/
|
||||
|
||||
#define HPDF_ENABLE_READ 0
|
||||
#define HPDF_ENABLE_PRINT 4
|
||||
#define HPDF_ENABLE_EDIT_ALL 8
|
||||
#define HPDF_ENABLE_COPY 16
|
||||
#define HPDF_ENABLE_EDIT 32
|
||||
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*------ viewer preferences definitions --------------------------------------*/
|
||||
|
||||
#define HPDF_HIDE_TOOLBAR 1
|
||||
#define HPDF_HIDE_MENUBAR 2
|
||||
#define HPDF_HIDE_WINDOW_UI 4
|
||||
#define HPDF_FIT_WINDOW 8
|
||||
#define HPDF_CENTER_WINDOW 16
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*------ limitation of object implementation (PDF1.4) -----------------------*/
|
||||
|
||||
#define HPDF_LIMIT_MAX_INT 2147483647
|
||||
#define HPDF_LIMIT_MIN_INT -2147483647
|
||||
|
||||
#define HPDF_LIMIT_MAX_REAL 32767
|
||||
#define HPDF_LIMIT_MIN_REAL -32767
|
||||
|
||||
#define HPDF_LIMIT_MAX_STRING_LEN 65535
|
||||
#define HPDF_LIMIT_MAX_NAME_LEN 127
|
||||
|
||||
#define HPDF_LIMIT_MAX_ARRAY 8191
|
||||
#define HPDF_LIMIT_MAX_DICT_ELEMENT 4095
|
||||
#define HPDF_LIMIT_MAX_XREF_ELEMENT 8388607
|
||||
#define HPDF_LIMIT_MAX_GSTATE 28
|
||||
#define HPDF_LIMIT_MAX_DEVICE_N 8
|
||||
#define HPDF_LIMIT_MAX_DEVICE_N_V15 32
|
||||
#define HPDF_LIMIT_MAX_CID 65535
|
||||
#define HPDF_MAX_GENERATION_NUM 65535
|
||||
|
||||
#define HPDF_MIN_PAGE_HEIGHT 3
|
||||
#define HPDF_MIN_PAGE_WIDTH 3
|
||||
#define HPDF_MAX_PAGE_HEIGHT 14400
|
||||
#define HPDF_MAX_PAGE_WIDTH 14400
|
||||
#define HPDF_MIN_MAGNIFICATION_FACTOR 8
|
||||
#define HPDF_MAX_MAGNIFICATION_FACTOR 3200
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*------ limitation of various properties -----------------------------------*/
|
||||
|
||||
#define HPDF_MIN_PAGE_SIZE 3
|
||||
#define HPDF_MAX_PAGE_SIZE 14400
|
||||
#define HPDF_MIN_HORIZONTALSCALING 10
|
||||
#define HPDF_MAX_HORIZONTALSCALING 300
|
||||
#define HPDF_MIN_WORDSPACE -30
|
||||
#define HPDF_MAX_WORDSPACE 300
|
||||
#define HPDF_MIN_CHARSPACE -30
|
||||
#define HPDF_MAX_CHARSPACE 300
|
||||
#define HPDF_MAX_FONTSIZE 300
|
||||
#define HPDF_MAX_ZOOMSIZE 10
|
||||
#define HPDF_MAX_LEADING 300
|
||||
#define HPDF_MAX_LINEWIDTH 100
|
||||
#define HPDF_MAX_DASH_PATTERN 100
|
||||
|
||||
#define HPDF_MAX_JWW_NUM 128
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*----- country code definition ----------------------------------------------*/
|
||||
|
||||
#define HPDF_COUNTRY_AF "AF" && AFGHANISTAN */
|
||||
#define HPDF_COUNTRY_AL "AL" && ALBANIA */
|
||||
#define HPDF_COUNTRY_DZ "DZ" && ALGERIA */
|
||||
#define HPDF_COUNTRY_AS "AS" && AMERICAN SAMOA */
|
||||
#define HPDF_COUNTRY_AD "AD" && ANDORRA */
|
||||
#define HPDF_COUNTRY_AO "AO" && ANGOLA */
|
||||
#define HPDF_COUNTRY_AI "AI" && ANGUILLA */
|
||||
#define HPDF_COUNTRY_AQ "AQ" && ANTARCTICA */
|
||||
#define HPDF_COUNTRY_AG "AG" && ANTIGUA AND BARBUDA */
|
||||
#define HPDF_COUNTRY_AR "AR" && ARGENTINA */
|
||||
#define HPDF_COUNTRY_AM "AM" && ARMENIA */
|
||||
#define HPDF_COUNTRY_AW "AW" && ARUBA */
|
||||
#define HPDF_COUNTRY_AU "AU" && AUSTRALIA */
|
||||
#define HPDF_COUNTRY_AT "AT" && AUSTRIA */
|
||||
#define HPDF_COUNTRY_AZ "AZ" && AZERBAIJAN */
|
||||
#define HPDF_COUNTRY_BS "BS" && BAHAMAS */
|
||||
#define HPDF_COUNTRY_BH "BH" && BAHRAIN */
|
||||
#define HPDF_COUNTRY_BD "BD" && BANGLADESH */
|
||||
#define HPDF_COUNTRY_BB "BB" && BARBADOS */
|
||||
#define HPDF_COUNTRY_BY "BY" && BELARUS */
|
||||
#define HPDF_COUNTRY_BE "BE" && BELGIUM */
|
||||
#define HPDF_COUNTRY_BZ "BZ" && BELIZE */
|
||||
#define HPDF_COUNTRY_BJ "BJ" && BENIN */
|
||||
#define HPDF_COUNTRY_BM "BM" && BERMUDA */
|
||||
#define HPDF_COUNTRY_BT "BT" && BHUTAN */
|
||||
#define HPDF_COUNTRY_BO "BO" && BOLIVIA */
|
||||
#define HPDF_COUNTRY_BA "BA" && BOSNIA AND HERZEGOWINA */
|
||||
#define HPDF_COUNTRY_BW "BW" && BOTSWANA */
|
||||
#define HPDF_COUNTRY_BV "BV" && BOUVET ISLAND */
|
||||
#define HPDF_COUNTRY_BR "BR" && BRAZIL */
|
||||
#define HPDF_COUNTRY_IO "IO" && BRITISH INDIAN OCEAN TERRITORY */
|
||||
#define HPDF_COUNTRY_BN "BN" && BRUNEI DARUSSALAM */
|
||||
#define HPDF_COUNTRY_BG "BG" && BULGARIA */
|
||||
#define HPDF_COUNTRY_BF "BF" && BURKINA FASO */
|
||||
#define HPDF_COUNTRY_BI "BI" && BURUNDI */
|
||||
#define HPDF_COUNTRY_KH "KH" && CAMBODIA */
|
||||
#define HPDF_COUNTRY_CM "CM" && CAMEROON */
|
||||
#define HPDF_COUNTRY_CA "CA" && CANADA */
|
||||
#define HPDF_COUNTRY_CV "CV" && CAPE VERDE */
|
||||
#define HPDF_COUNTRY_KY "KY" && CAYMAN ISLANDS */
|
||||
#define HPDF_COUNTRY_CF "CF" && CENTRAL AFRICAN REPUBLIC */
|
||||
#define HPDF_COUNTRY_TD "TD" && CHAD */
|
||||
#define HPDF_COUNTRY_CL "CL" && CHILE */
|
||||
#define HPDF_COUNTRY_CN "CN" && CHINA */
|
||||
#define HPDF_COUNTRY_CX "CX" && CHRISTMAS ISLAND */
|
||||
#define HPDF_COUNTRY_CC "CC" && COCOS (KEELING) ISLANDS */
|
||||
#define HPDF_COUNTRY_CO "CO" && COLOMBIA */
|
||||
#define HPDF_COUNTRY_KM "KM" && COMOROS */
|
||||
#define HPDF_COUNTRY_CG "CG" && CONGO */
|
||||
#define HPDF_COUNTRY_CK "CK" && COOK ISLANDS */
|
||||
#define HPDF_COUNTRY_CR "CR" && COSTA RICA */
|
||||
#define HPDF_COUNTRY_CI "CI" && COTE D'IVOIRE */
|
||||
#define HPDF_COUNTRY_HR "HR" && CROATIA (local name: Hrvatska) */
|
||||
#define HPDF_COUNTRY_CU "CU" && CUBA */
|
||||
#define HPDF_COUNTRY_CY "CY" && CYPRUS */
|
||||
#define HPDF_COUNTRY_CZ "CZ" && CZECH REPUBLIC */
|
||||
#define HPDF_COUNTRY_DK "DK" && DENMARK */
|
||||
#define HPDF_COUNTRY_DJ "DJ" && DJIBOUTI */
|
||||
#define HPDF_COUNTRY_DM "DM" && DOMINICA */
|
||||
#define HPDF_COUNTRY_DO "DO" && DOMINICAN REPUBLIC */
|
||||
#define HPDF_COUNTRY_TP "TP" && EAST TIMOR */
|
||||
#define HPDF_COUNTRY_EC "EC" && ECUADOR */
|
||||
#define HPDF_COUNTRY_EG "EG" && EGYPT */
|
||||
#define HPDF_COUNTRY_SV "SV" && EL SALVADOR */
|
||||
#define HPDF_COUNTRY_GQ "GQ" && EQUATORIAL GUINEA */
|
||||
#define HPDF_COUNTRY_ER "ER" && ERITREA */
|
||||
#define HPDF_COUNTRY_EE "EE" && ESTONIA */
|
||||
#define HPDF_COUNTRY_ET "ET" && ETHIOPIA */
|
||||
#define HPDF_COUNTRY_FK "FK" && FALKLAND ISLANDS (MALVINAS) */
|
||||
#define HPDF_COUNTRY_FO "FO" && FAROE ISLANDS */
|
||||
#define HPDF_COUNTRY_FJ "FJ" && FIJI */
|
||||
#define HPDF_COUNTRY_FI "FI" && FINLAND */
|
||||
#define HPDF_COUNTRY_FR "FR" && FRANCE */
|
||||
#define HPDF_COUNTRY_FX "FX" && FRANCE, METROPOLITAN */
|
||||
#define HPDF_COUNTRY_GF "GF" && FRENCH GUIANA */
|
||||
#define HPDF_COUNTRY_PF "PF" && FRENCH POLYNESIA */
|
||||
#define HPDF_COUNTRY_TF "TF" && FRENCH SOUTHERN TERRITORIES */
|
||||
#define HPDF_COUNTRY_GA "GA" && GABON */
|
||||
#define HPDF_COUNTRY_GM "GM" && GAMBIA */
|
||||
#define HPDF_COUNTRY_GE "GE" && GEORGIA */
|
||||
#define HPDF_COUNTRY_DE "DE" && GERMANY */
|
||||
#define HPDF_COUNTRY_GH "GH" && GHANA */
|
||||
#define HPDF_COUNTRY_GI "GI" && GIBRALTAR */
|
||||
#define HPDF_COUNTRY_GR "GR" && GREECE */
|
||||
#define HPDF_COUNTRY_GL "GL" && GREENLAND */
|
||||
#define HPDF_COUNTRY_GD "GD" && GRENADA */
|
||||
#define HPDF_COUNTRY_GP "GP" && GUADELOUPE */
|
||||
#define HPDF_COUNTRY_GU "GU" && GUAM */
|
||||
#define HPDF_COUNTRY_GT "GT" && GUATEMALA */
|
||||
#define HPDF_COUNTRY_GN "GN" && GUINEA */
|
||||
#define HPDF_COUNTRY_GW "GW" && GUINEA-BISSAU */
|
||||
#define HPDF_COUNTRY_GY "GY" && GUYANA */
|
||||
#define HPDF_COUNTRY_HT "HT" && HAITI */
|
||||
#define HPDF_COUNTRY_HM "HM" && HEARD AND MC DONALD ISLANDS */
|
||||
#define HPDF_COUNTRY_HN "HN" && HONDURAS */
|
||||
#define HPDF_COUNTRY_HK "HK" && HONG KONG */
|
||||
#define HPDF_COUNTRY_HU "HU" && HUNGARY */
|
||||
#define HPDF_COUNTRY_IS "IS" && ICELAND */
|
||||
#define HPDF_COUNTRY_IN "IN" && INDIA */
|
||||
#define HPDF_COUNTRY_ID "ID" && INDONESIA */
|
||||
#define HPDF_COUNTRY_IR "IR" && IRAN (ISLAMIC REPUBLIC OF) */
|
||||
#define HPDF_COUNTRY_IQ "IQ" && IRAQ */
|
||||
#define HPDF_COUNTRY_IE "IE" && IRELAND */
|
||||
#define HPDF_COUNTRY_IL "IL" && ISRAEL */
|
||||
#define HPDF_COUNTRY_IT "IT" && ITALY */
|
||||
#define HPDF_COUNTRY_JM "JM" && JAMAICA */
|
||||
#define HPDF_COUNTRY_JP "JP" && JAPAN */
|
||||
#define HPDF_COUNTRY_JO "JO" && JORDAN */
|
||||
#define HPDF_COUNTRY_KZ "KZ" && KAZAKHSTAN */
|
||||
#define HPDF_COUNTRY_KE "KE" && KENYA */
|
||||
#define HPDF_COUNTRY_KI "KI" && KIRIBATI */
|
||||
#define HPDF_COUNTRY_KP "KP" && KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF */
|
||||
#define HPDF_COUNTRY_KR "KR" && KOREA, REPUBLIC OF */
|
||||
#define HPDF_COUNTRY_KW "KW" && KUWAIT */
|
||||
#define HPDF_COUNTRY_KG "KG" && KYRGYZSTAN */
|
||||
#define HPDF_COUNTRY_LA "LA" && LAO PEOPLE'S DEMOCRATIC REPUBLIC */
|
||||
#define HPDF_COUNTRY_LV "LV" && LATVIA */
|
||||
#define HPDF_COUNTRY_LB "LB" && LEBANON */
|
||||
#define HPDF_COUNTRY_LS "LS" && LESOTHO */
|
||||
#define HPDF_COUNTRY_LR "LR" && LIBERIA */
|
||||
#define HPDF_COUNTRY_LY "LY" && LIBYAN ARAB JAMAHIRIYA */
|
||||
#define HPDF_COUNTRY_LI "LI" && LIECHTENSTEIN */
|
||||
#define HPDF_COUNTRY_LT "LT" && LITHUANIA */
|
||||
#define HPDF_COUNTRY_LU "LU" && LUXEMBOURG */
|
||||
#define HPDF_COUNTRY_MO "MO" && MACAU */
|
||||
#define HPDF_COUNTRY_MK "MK" && MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF */
|
||||
#define HPDF_COUNTRY_MG "MG" && MADAGASCAR */
|
||||
#define HPDF_COUNTRY_MW "MW" && MALAWI */
|
||||
#define HPDF_COUNTRY_MY "MY" && MALAYSIA */
|
||||
#define HPDF_COUNTRY_MV "MV" && MALDIVES */
|
||||
#define HPDF_COUNTRY_ML "ML" && MALI */
|
||||
#define HPDF_COUNTRY_MT "MT" && MALTA */
|
||||
#define HPDF_COUNTRY_MH "MH" && MARSHALL ISLANDS */
|
||||
#define HPDF_COUNTRY_MQ "MQ" && MARTINIQUE */
|
||||
#define HPDF_COUNTRY_MR "MR" && MAURITANIA */
|
||||
#define HPDF_COUNTRY_MU "MU" && MAURITIUS */
|
||||
#define HPDF_COUNTRY_YT "YT" && MAYOTTE */
|
||||
#define HPDF_COUNTRY_MX "MX" && MEXICO */
|
||||
#define HPDF_COUNTRY_FM "FM" && MICRONESIA, FEDERATED STATES OF */
|
||||
#define HPDF_COUNTRY_MD "MD" && MOLDOVA, REPUBLIC OF */
|
||||
#define HPDF_COUNTRY_MC "MC" && MONACO */
|
||||
#define HPDF_COUNTRY_MN "MN" && MONGOLIA */
|
||||
#define HPDF_COUNTRY_MS "MS" && MONTSERRAT */
|
||||
#define HPDF_COUNTRY_MA "MA" && MOROCCO */
|
||||
#define HPDF_COUNTRY_MZ "MZ" && MOZAMBIQUE */
|
||||
#define HPDF_COUNTRY_MM "MM" && MYANMAR */
|
||||
#define HPDF_COUNTRY_NA "NA" && NAMIBIA */
|
||||
#define HPDF_COUNTRY_NR "NR" && NAURU */
|
||||
#define HPDF_COUNTRY_NP "NP" && NEPAL */
|
||||
#define HPDF_COUNTRY_NL "NL" && NETHERLANDS */
|
||||
#define HPDF_COUNTRY_AN "AN" && NETHERLANDS ANTILLES */
|
||||
#define HPDF_COUNTRY_NC "NC" && NEW CALEDONIA */
|
||||
#define HPDF_COUNTRY_NZ "NZ" && NEW ZEALAND */
|
||||
#define HPDF_COUNTRY_NI "NI" && NICARAGUA */
|
||||
#define HPDF_COUNTRY_NE "NE" && NIGER */
|
||||
#define HPDF_COUNTRY_NG "NG" && NIGERIA */
|
||||
#define HPDF_COUNTRY_NU "NU" && NIUE */
|
||||
#define HPDF_COUNTRY_NF "NF" && NORFOLK ISLAND */
|
||||
#define HPDF_COUNTRY_MP "MP" && NORTHERN MARIANA ISLANDS */
|
||||
#define HPDF_COUNTRY_NO "NO" && NORWAY */
|
||||
#define HPDF_COUNTRY_OM "OM" && OMAN */
|
||||
#define HPDF_COUNTRY_PK "PK" && PAKISTAN */
|
||||
#define HPDF_COUNTRY_PW "PW" && PALAU */
|
||||
#define HPDF_COUNTRY_PA "PA" && PANAMA */
|
||||
#define HPDF_COUNTRY_PG "PG" && PAPUA NEW GUINEA */
|
||||
#define HPDF_COUNTRY_PY "PY" && PARAGUAY */
|
||||
#define HPDF_COUNTRY_PE "PE" && PERU */
|
||||
#define HPDF_COUNTRY_PH "PH" && PHILIPPINES */
|
||||
#define HPDF_COUNTRY_PN "PN" && PITCAIRN */
|
||||
#define HPDF_COUNTRY_PL "PL" && POLAND */
|
||||
#define HPDF_COUNTRY_PT "PT" && PORTUGAL */
|
||||
#define HPDF_COUNTRY_PR "PR" && PUERTO RICO */
|
||||
#define HPDF_COUNTRY_QA "QA" && QATAR */
|
||||
#define HPDF_COUNTRY_RE "RE" && REUNION */
|
||||
#define HPDF_COUNTRY_RO "RO" && ROMANIA */
|
||||
#define HPDF_COUNTRY_RU "RU" && RUSSIAN FEDERATION */
|
||||
#define HPDF_COUNTRY_RW "RW" && RWANDA */
|
||||
#define HPDF_COUNTRY_KN "KN" && SAINT KITTS AND NEVIS */
|
||||
#define HPDF_COUNTRY_LC "LC" && SAINT LUCIA */
|
||||
#define HPDF_COUNTRY_VC "VC" && SAINT VINCENT AND THE GRENADINES */
|
||||
#define HPDF_COUNTRY_WS "WS" && SAMOA */
|
||||
#define HPDF_COUNTRY_SM "SM" && SAN MARINO */
|
||||
#define HPDF_COUNTRY_ST "ST" && SAO TOME AND PRINCIPE */
|
||||
#define HPDF_COUNTRY_SA "SA" && SAUDI ARABIA */
|
||||
#define HPDF_COUNTRY_SN "SN" && SENEGAL */
|
||||
#define HPDF_COUNTRY_SC "SC" && SEYCHELLES */
|
||||
#define HPDF_COUNTRY_SL "SL" && SIERRA LEONE */
|
||||
#define HPDF_COUNTRY_SG "SG" && SINGAPORE */
|
||||
#define HPDF_COUNTRY_SK "SK" && SLOVAKIA (Slovak Republic) */
|
||||
#define HPDF_COUNTRY_SI "SI" && SLOVENIA */
|
||||
#define HPDF_COUNTRY_SB "SB" && SOLOMON ISLANDS */
|
||||
#define HPDF_COUNTRY_SO "SO" && SOMALIA */
|
||||
#define HPDF_COUNTRY_ZA "ZA" && SOUTH AFRICA */
|
||||
#define HPDF_COUNTRY_ES "ES" && SPAIN */
|
||||
#define HPDF_COUNTRY_LK "LK" && SRI LANKA */
|
||||
#define HPDF_COUNTRY_SH "SH" && ST. HELENA */
|
||||
#define HPDF_COUNTRY_PM "PM" && ST. PIERRE AND MIQUELON */
|
||||
#define HPDF_COUNTRY_SD "SD" && SUDAN */
|
||||
#define HPDF_COUNTRY_SR "SR" && SURINAME */
|
||||
#define HPDF_COUNTRY_SJ "SJ" && SVALBARD AND JAN MAYEN ISLANDS */
|
||||
#define HPDF_COUNTRY_SZ "SZ" && SWAZILAND */
|
||||
#define HPDF_COUNTRY_SE "SE" && SWEDEN */
|
||||
#define HPDF_COUNTRY_CH "CH" && SWITZERLAND */
|
||||
#define HPDF_COUNTRY_SY "SY" && SYRIAN ARAB REPUBLIC */
|
||||
#define HPDF_COUNTRY_TW "TW" && TAIWAN, PROVINCE OF CHINA */
|
||||
#define HPDF_COUNTRY_TJ "TJ" && TAJIKISTAN */
|
||||
#define HPDF_COUNTRY_TZ "TZ" && TANZANIA, UNITED REPUBLIC OF */
|
||||
#define HPDF_COUNTRY_TH "TH" && THAILAND */
|
||||
#define HPDF_COUNTRY_TG "TG" && TOGO */
|
||||
#define HPDF_COUNTRY_TK "TK" && TOKELAU */
|
||||
#define HPDF_COUNTRY_TO "TO" && TONGA */
|
||||
#define HPDF_COUNTRY_TT "TT" && TRINIDAD AND TOBAGO */
|
||||
#define HPDF_COUNTRY_TN "TN" && TUNISIA */
|
||||
#define HPDF_COUNTRY_TR "TR" && TURKEY */
|
||||
#define HPDF_COUNTRY_TM "TM" && TURKMENISTAN */
|
||||
#define HPDF_COUNTRY_TC "TC" && TURKS AND CAICOS ISLANDS */
|
||||
#define HPDF_COUNTRY_TV "TV" && TUVALU */
|
||||
#define HPDF_COUNTRY_UG "UG" && UGANDA */
|
||||
#define HPDF_COUNTRY_UA "UA" && UKRAINE */
|
||||
#define HPDF_COUNTRY_AE "AE" && UNITED ARAB EMIRATES */
|
||||
#define HPDF_COUNTRY_GB "GB" && UNITED KINGDOM */
|
||||
#define HPDF_COUNTRY_US "US" && UNITED STATES */
|
||||
#define HPDF_COUNTRY_UM "UM" && UNITED STATES MINOR OUTLYING ISLANDS */
|
||||
#define HPDF_COUNTRY_UY "UY" && URUGUAY */
|
||||
#define HPDF_COUNTRY_UZ "UZ" && UZBEKISTAN */
|
||||
#define HPDF_COUNTRY_VU "VU" && VANUATU */
|
||||
#define HPDF_COUNTRY_VA "VA" && VATICAN CITY STATE (HOLY SEE) */
|
||||
#define HPDF_COUNTRY_VE "VE" && VENEZUELA */
|
||||
#define HPDF_COUNTRY_VN "VN" && VIET NAM */
|
||||
#define HPDF_COUNTRY_VG "VG" && VIRGIN ISLANDS (BRITISH) */
|
||||
#define HPDF_COUNTRY_VI "VI" && VIRGIN ISLANDS (U.S.) */
|
||||
#define HPDF_COUNTRY_WF "WF" && WALLIS AND FUTUNA ISLANDS */
|
||||
#define HPDF_COUNTRY_EH "EH" && WESTERN SAHARA */
|
||||
#define HPDF_COUNTRY_YE "YE" && YEMEN */
|
||||
#define HPDF_COUNTRY_YU "YU" && YUGOSLAVIA */
|
||||
#define HPDF_COUNTRY_ZR "ZR" && ZAIRE */
|
||||
#define HPDF_COUNTRY_ZM "ZM" && ZAMBIA */
|
||||
#define HPDF_COUNTRY_ZW "ZW" && ZIMBABWE */
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*----- lang code definition -------------------------------------------------*/
|
||||
|
||||
#define HPDF_LANG_AA "aa" && Afar */
|
||||
#define HPDF_LANG_AB "ab" && Abkhazian */
|
||||
#define HPDF_LANG_AF "af" && Afrikaans */
|
||||
#define HPDF_LANG_AM "am" && Amharic */
|
||||
#define HPDF_LANG_AR "ar" && Arabic */
|
||||
#define HPDF_LANG_AS "as" && Assamese */
|
||||
#define HPDF_LANG_AY "ay" && Aymara */
|
||||
#define HPDF_LANG_AZ "az" && Azerbaijani */
|
||||
#define HPDF_LANG_BA "ba" && Bashkir */
|
||||
#define HPDF_LANG_BE "be" && Byelorussian */
|
||||
#define HPDF_LANG_BG "bg" && Bulgarian */
|
||||
#define HPDF_LANG_BH "bh" && Bihari */
|
||||
#define HPDF_LANG_BI "bi" && Bislama */
|
||||
#define HPDF_LANG_BN "bn" && Bengali Bangla */
|
||||
#define HPDF_LANG_BO "bo" && Tibetan */
|
||||
#define HPDF_LANG_BR "br" && Breton */
|
||||
#define HPDF_LANG_CA "ca" && Catalan */
|
||||
#define HPDF_LANG_CO "co" && Corsican */
|
||||
#define HPDF_LANG_CS "cs" && Czech */
|
||||
#define HPDF_LANG_CY "cy" && Welsh */
|
||||
#define HPDF_LANG_DA "da" && Danish */
|
||||
#define HPDF_LANG_DE "de" && German */
|
||||
#define HPDF_LANG_DZ "dz" && Bhutani */
|
||||
#define HPDF_LANG_EL "el" && Greek */
|
||||
#define HPDF_LANG_EN "en" && English */
|
||||
#define HPDF_LANG_EO "eo" && Esperanto */
|
||||
#define HPDF_LANG_ES "es" && Spanish */
|
||||
#define HPDF_LANG_ET "et" && Estonian */
|
||||
#define HPDF_LANG_EU "eu" && Basque */
|
||||
#define HPDF_LANG_FA "fa" && Persian */
|
||||
#define HPDF_LANG_FI "fi" && Finnish */
|
||||
#define HPDF_LANG_FJ "fj" && Fiji */
|
||||
#define HPDF_LANG_FO "fo" && Faeroese */
|
||||
#define HPDF_LANG_FR "fr" && French */
|
||||
#define HPDF_LANG_FY "fy" && Frisian */
|
||||
#define HPDF_LANG_GA "ga" && Irish */
|
||||
#define HPDF_LANG_GD "gd" && Scots Gaelic */
|
||||
#define HPDF_LANG_GL "gl" && Galician */
|
||||
#define HPDF_LANG_GN "gn" && Guarani */
|
||||
#define HPDF_LANG_GU "gu" && Gujarati */
|
||||
#define HPDF_LANG_HA "ha" && Hausa */
|
||||
#define HPDF_LANG_HI "hi" && Hindi */
|
||||
#define HPDF_LANG_HR "hr" && Croatian */
|
||||
#define HPDF_LANG_HU "hu" && Hungarian */
|
||||
#define HPDF_LANG_HY "hy" && Armenian */
|
||||
#define HPDF_LANG_IA "ia" && Interlingua */
|
||||
#define HPDF_LANG_IE "ie" && Interlingue */
|
||||
#define HPDF_LANG_IK "ik" && Inupiak */
|
||||
#define HPDF_LANG_IN "in" && Indonesian */
|
||||
#define HPDF_LANG_IS "is" && Icelandic */
|
||||
#define HPDF_LANG_IT "it" && Italian */
|
||||
#define HPDF_LANG_IW "iw" && Hebrew */
|
||||
#define HPDF_LANG_JA "ja" && Japanese */
|
||||
#define HPDF_LANG_JI "ji" && Yiddish */
|
||||
#define HPDF_LANG_JW "jw" && Javanese */
|
||||
#define HPDF_LANG_KA "ka" && Georgian */
|
||||
#define HPDF_LANG_KK "kk" && Kazakh */
|
||||
#define HPDF_LANG_KL "kl" && Greenlandic */
|
||||
#define HPDF_LANG_KM "km" && Cambodian */
|
||||
#define HPDF_LANG_KN "kn" && Kannada */
|
||||
#define HPDF_LANG_KO "ko" && Korean */
|
||||
#define HPDF_LANG_KS "ks" && Kashmiri */
|
||||
#define HPDF_LANG_KU "ku" && Kurdish */
|
||||
#define HPDF_LANG_KY "ky" && Kirghiz */
|
||||
#define HPDF_LANG_LA "la" && Latin */
|
||||
#define HPDF_LANG_LN "ln" && Lingala */
|
||||
#define HPDF_LANG_LO "lo" && Laothian */
|
||||
#define HPDF_LANG_LT "lt" && Lithuanian */
|
||||
#define HPDF_LANG_LV "lv" && Latvian,Lettish */
|
||||
#define HPDF_LANG_MG "mg" && Malagasy */
|
||||
#define HPDF_LANG_MI "mi" && Maori */
|
||||
#define HPDF_LANG_MK "mk" && Macedonian */
|
||||
#define HPDF_LANG_ML "ml" && Malayalam */
|
||||
#define HPDF_LANG_MN "mn" && Mongolian */
|
||||
#define HPDF_LANG_MO "mo" && Moldavian */
|
||||
#define HPDF_LANG_MR "mr" && Marathi */
|
||||
#define HPDF_LANG_MS "ms" && Malay */
|
||||
#define HPDF_LANG_MT "mt" && Maltese */
|
||||
#define HPDF_LANG_MY "my" && Burmese */
|
||||
#define HPDF_LANG_NA "na" && Nauru */
|
||||
#define HPDF_LANG_NE "ne" && Nepali */
|
||||
#define HPDF_LANG_NL "nl" && Dutch */
|
||||
#define HPDF_LANG_NO "no" && Norwegian */
|
||||
#define HPDF_LANG_OC "oc" && Occitan */
|
||||
#define HPDF_LANG_OM "om" && (Afan)Oromo */
|
||||
#define HPDF_LANG_OR "or" && Oriya */
|
||||
#define HPDF_LANG_PA "pa" && Punjabi */
|
||||
#define HPDF_LANG_PL "pl" && Polish */
|
||||
#define HPDF_LANG_PS "ps" && Pashto,Pushto */
|
||||
#define HPDF_LANG_PT "pt" && Portuguese */
|
||||
#define HPDF_LANG_QU "qu" && Quechua */
|
||||
#define HPDF_LANG_RM "rm" && Rhaeto-Romance */
|
||||
#define HPDF_LANG_RN "rn" && Kirundi */
|
||||
#define HPDF_LANG_RO "ro" && Romanian */
|
||||
#define HPDF_LANG_RU "ru" && Russian */
|
||||
#define HPDF_LANG_RW "rw" && Kinyarwanda */
|
||||
#define HPDF_LANG_SA "sa" && Sanskrit */
|
||||
#define HPDF_LANG_SD "sd" && Sindhi */
|
||||
#define HPDF_LANG_SG "sg" && Sangro */
|
||||
#define HPDF_LANG_SH "sh" && Serbo-Croatian */
|
||||
#define HPDF_LANG_SI "si" && Singhalese */
|
||||
#define HPDF_LANG_SK "sk" && Slovak */
|
||||
#define HPDF_LANG_SL "sl" && Slovenian */
|
||||
#define HPDF_LANG_SM "sm" && Samoan */
|
||||
#define HPDF_LANG_SN "sn" && Shona */
|
||||
#define HPDF_LANG_SO "so" && Somali */
|
||||
#define HPDF_LANG_SQ "sq" && Albanian */
|
||||
#define HPDF_LANG_SR "sr" && Serbian */
|
||||
#define HPDF_LANG_SS "ss" && Siswati */
|
||||
#define HPDF_LANG_ST "st" && Sesotho */
|
||||
#define HPDF_LANG_SU "su" && Sundanese */
|
||||
#define HPDF_LANG_SV "sv" && Swedish */
|
||||
#define HPDF_LANG_SW "sw" && Swahili */
|
||||
#define HPDF_LANG_TA "ta" && Tamil */
|
||||
#define HPDF_LANG_TE "te" && Tegulu */
|
||||
#define HPDF_LANG_TG "tg" && Tajik */
|
||||
#define HPDF_LANG_TH "th" && Thai */
|
||||
#define HPDF_LANG_TI "ti" && Tigrinya */
|
||||
#define HPDF_LANG_TK "tk" && Turkmen */
|
||||
#define HPDF_LANG_TL "tl" && Tagalog */
|
||||
#define HPDF_LANG_TN "tn" && Setswanato Tonga */
|
||||
#define HPDF_LANG_TR "tr" && Turkish */
|
||||
#define HPDF_LANG_TS "ts" && Tsonga */
|
||||
#define HPDF_LANG_TT "tt" && Tatar */
|
||||
#define HPDF_LANG_TW "tw" && Twi */
|
||||
#define HPDF_LANG_UK "uk" && Ukrainian */
|
||||
#define HPDF_LANG_UR "ur" && Urdu */
|
||||
#define HPDF_LANG_UZ "uz" && Uzbek */
|
||||
#define HPDF_LANG_VI "vi" && Vietnamese */
|
||||
#define HPDF_LANG_VO "vo" && Volapuk */
|
||||
#define HPDF_LANG_WO "wo" && Wolof */
|
||||
#define HPDF_LANG_XH "xh" && Xhosa */
|
||||
#define HPDF_LANG_YO "yo" && Yoruba */
|
||||
#define HPDF_LANG_ZH "zh" && Chinese */
|
||||
#define HPDF_LANG_ZU "zu" && Zulu */
|
||||
|
||||
|
||||
&&----------------------------------------------------------------------------*/
|
||||
&&----- Graphis mode ---------------------------------------------------------*/
|
||||
|
||||
#define HPDF_GMODE_PAGE_DESCRIPTION 0x0001
|
||||
#define HPDF_GMODE_PATH_OBJECT 0x0002
|
||||
#define HPDF_GMODE_TEXT_OBJECT 0x0004
|
||||
#define HPDF_GMODE_CLIPPING_PATH 0x0008
|
||||
#define HPDF_GMODE_SHADING 0x0010
|
||||
#define HPDF_GMODE_INLINE_IMAGE 0x0020
|
||||
#define HPDF_GMODE_EXTERNAL_OBJECT 0x0040
|
||||
|
||||
&&----------------------------------------------------------------------------*/
|
||||
392
COMUN/utile/hpdf/hpdf_types.h
Normal file
392
COMUN/utile/hpdf/hpdf_types.h
Normal file
@@ -0,0 +1,392 @@
|
||||
*Modified in VFP format : 2006-10-10
|
||||
*Dorin Vasilescu
|
||||
|
||||
*/*
|
||||
* << Haru Free PDF Library 2.0.3 >> -- hpdf_types.h
|
||||
*
|
||||
* URL http://libharu.sourceforge.net/
|
||||
*
|
||||
* Copyright (c) 1999-2006 Takeshi Kanno
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*----- type definition ------------------------------------------------------*/
|
||||
|
||||
|
||||
*/* native OS integer types */
|
||||
#define HPDF_INT integer &&typedef signed int HPDF_INT
|
||||
#define HPDF_UINT integer &&typedef unsigned int
|
||||
|
||||
#define HPDF_INT32 integer &&typedef signed int HPDF_INT32
|
||||
#define HPDF_UINT32 integer &&typedef unsigned int HPDF_UINT32
|
||||
|
||||
#define HPDF_INT16 integer
|
||||
#define HPDF_UINT16 integer
|
||||
|
||||
*/* 8bit integer types
|
||||
#define HPDF_INT8 integer &&typedef signed char HPDF_INT8
|
||||
#define HPDF_UINT8 integer &&typedef unsigned char HPDF_UINT8
|
||||
|
||||
*/* 8bit binary types
|
||||
#define HPDF_BYTE string &&typedef unsigned char HPDF_BYTE
|
||||
|
||||
*/* float type (32bit IEEE754)
|
||||
#define HPDF_REAL single &&typedef float HPDF_REAL
|
||||
|
||||
*/* double type (64bit IEEE754)
|
||||
#define HPDF_DOUBLE double &&typedef double HPDF_DOUBLE
|
||||
|
||||
*/* boolean type (0: False, !0: True)
|
||||
#define HPDF_BOOL integer &&typedef signed int HPDF_BOOL
|
||||
|
||||
*/* error-no type (32bit unsigned integer)
|
||||
#define HPDF_STATUS integer &&typedef unsigned long HPDF_STATUS
|
||||
|
||||
#define HPDF_CID HPDF_UINT16
|
||||
#define HPDF_UNICODE HPDF_UINT16
|
||||
|
||||
*typedef enum _HPDF_InfoType {
|
||||
* /* date-time type parameters */
|
||||
#define HPDF_INFO_CREATION_DATE 0
|
||||
#define HPDF_INFO_MOD_DATE 1
|
||||
|
||||
*/* string type parameters */
|
||||
#define HPDF_INFO_AUTHOR 3
|
||||
#define HPDF_INFO_CREATOR 4
|
||||
#define HPDF_INFO_PRODUCER 5
|
||||
#define HPDF_INFO_TITLE 6
|
||||
#define HPDF_INFO_SUBJECT 7
|
||||
#define HPDF_INFO_KEYWORDS 8
|
||||
#define HPDF_INFO_EOF 9
|
||||
#define HPDF_InfoType integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_EncryptMode {
|
||||
#define HPDF_ENCRYPT_R2 2
|
||||
#define HPDF_ENCRYPT_R3 3
|
||||
#define HPDF_EncryptMode integer
|
||||
|
||||
|
||||
*typedef void
|
||||
*(HPDF_STDCALL *HPDF_Error_Handler) (HPDF_STATUS error_no,
|
||||
* HPDF_STATUS detail_no,
|
||||
* void *user_data);
|
||||
|
||||
*typedef void*
|
||||
*(HPDF_STDCALL *HPDF_Alloc_Func) (HPDF_UINT size);
|
||||
|
||||
|
||||
*typedef void
|
||||
*(HPDF_STDCALL *HPDF_Free_Func) (void *aptr);
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*------ text width struct --------------------------------------------------*/
|
||||
|
||||
*typedef struct _HPDF_TextWidth {
|
||||
* HPDF_UINT numchars;
|
||||
*
|
||||
* /* don't use this value (it may be change in the feature).
|
||||
* use numspace as alternated. */
|
||||
* HPDF_UINT numwords;
|
||||
*
|
||||
* HPDF_UINT width;
|
||||
* HPDF_UINT numspace;
|
||||
*} HPDF_TextWidth;
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*------ dash mode ----------------------------------------------------------*/
|
||||
|
||||
*typedef struct _HPDF_DashMode {
|
||||
* HPDF_UINT16 ptn[8];
|
||||
* HPDF_UINT num_ptn;
|
||||
* HPDF_UINT phase;
|
||||
*} HPDF_DashMode;
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*----- HPDF_TransMatrix struct ---------------------------------------------*/
|
||||
|
||||
*typedef struct _HPDF_TransMatrix {
|
||||
* HPDF_REAL a;
|
||||
* HPDF_REAL b;
|
||||
* HPDF_REAL c;
|
||||
* HPDF_REAL d;
|
||||
* HPDF_REAL x;
|
||||
* HPDF_REAL y;
|
||||
*} HPDF_TransMatrix;
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
|
||||
*typedef enum _HPDF_ColorSpace {
|
||||
|
||||
#define HPDF_CS_DEVICE_GRAY 0
|
||||
#define HPDF_CS_DEVICE_RGB 1
|
||||
#define HPDF_CS_DEVICE_CMYK 2
|
||||
#define HPDF_CS_CAL_GRAY 3
|
||||
#define HPDF_CS_CAL_RGB 4
|
||||
#define HPDF_CS_LAB 5
|
||||
#define HPDF_CS_ICC_BASED 6
|
||||
#define HPDF_CS_SEPARATION 7
|
||||
#define HPDF_CS_DEVICE_N 8
|
||||
#define HPDF_CS_INDEXED 9
|
||||
#define HPDF_CS_PATTERN 10
|
||||
#define HPDF_CS_EOF 11
|
||||
#define HPDF_ColorSpace integer
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*----- HPDF_RGBColor struct ------------------------------------------------*/
|
||||
|
||||
|
||||
*typedef struct _HPDF_RGBColor {
|
||||
* HPDF_REAL r;
|
||||
HPDF_REAL g;
|
||||
HPDF_REAL b;
|
||||
|
||||
#define HPDF_RGBColor integer
|
||||
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*----- HPDF_CMYKColor struct -----------------------------------------------*/
|
||||
|
||||
*typedef struct _HPDF_CMYKColor {
|
||||
* HPDF_REAL c;
|
||||
HPDF_REAL m;
|
||||
HPDF_REAL y;
|
||||
HPDF_REAL k;
|
||||
} HPDF_CMYKColor;
|
||||
|
||||
*/*---------------------------------------------------------------------------*/
|
||||
*/*------ The line cap style -------------------------------------------------*/
|
||||
|
||||
*typedef enum _HPDF_LineCap {
|
||||
#define HPDF_BUTT_END 0
|
||||
#define HPDF_ROUND_END 1
|
||||
#define HPDF_PROJECTING_SCUARE_END 2
|
||||
#define HPDF_LINECAP_EOF 3
|
||||
#define HPDF_LineCap integer
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*------ The line join style -------------------------------------------------*/
|
||||
|
||||
*typedef enum _HPDF_LineJoin {
|
||||
#define HPDF_MITER_JOIN 0
|
||||
#define HPDF_ROUND_JOIN 1
|
||||
#define HPDF_BEVEL_JOIN 2
|
||||
#define HPDF_LINEJOIN_EOF 3
|
||||
#define HPDF_LineJoin integer
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*------ The text rendering mode ---------------------------------------------*/
|
||||
|
||||
*typedef enum _HPDF_TextRenderingMode {
|
||||
#define HPDF_FILL 0
|
||||
#define HPDF_STROKE 1
|
||||
#define HPDF_FILL_THEN_STROKE 2
|
||||
#define HPDF_INVISIBLE 3
|
||||
#define HPDF_FILL_CLIPPING 4
|
||||
#define HPDF_STROKE_CLIPPING 5
|
||||
#define HPDF_FILL_STROKE_CLIPPING 6
|
||||
#define HPDF_CLIPPING 7
|
||||
#define HPDF_RENDERING_MODE_EOF 8
|
||||
#define HPDF_TextRenderingMode integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_WritingMode {
|
||||
#define HPDF_WMODE_HORIZONTAL 0
|
||||
#define HPDF_WMODE_VERTICAL 1
|
||||
#define HPDF_WMODE_EOF 2
|
||||
#define HPDF_WritingMode integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_PageLayout {
|
||||
#define HPDF_PAGE_LAYOUT_SINGLE 0
|
||||
#define HPDF_PAGE_LAYOUT_ONE_COLUMN 1
|
||||
#define HPDF_PAGE_LAYOUT_TWO_COLUMN_LEFT 2
|
||||
#define HPDF_PAGE_LAYOUT_TWO_COLUMN_RIGHT 3
|
||||
#define HPDF_PAGE_LAYOUT_EOF 4
|
||||
#define HPDF_PageLayout integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_PageMode {
|
||||
#define HPDF_PAGE_MODE_USE_NONE 0
|
||||
#define HPDF_PAGE_MODE_USE_OUTLINE 1
|
||||
#define HPDF_PAGE_MODE_USE_THUMBS 2
|
||||
#define HPDF_PAGE_MODE_FULL_SCREEN 3
|
||||
*/* HPDF_PAGE_MODE_USE_OC,
|
||||
#define HPDF_PAGE_MODE_USE_ATTACHMENTS 4
|
||||
*/
|
||||
#define HPDF_PAGE_MODE_EOF 5
|
||||
#define HPDF_PageMode integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_PageNumStyle {
|
||||
#define HPDF_PAGE_NUM_STYLE_DECIMAL 0
|
||||
#define HPDF_PAGE_NUM_STYLE_UPPER_ROMAN 1
|
||||
#define HPDF_PAGE_NUM_STYLE_LOWER_ROMAN 2
|
||||
#define HPDF_PAGE_NUM_STYLE_UPPER_LETTERS 3
|
||||
#define HPDF_PAGE_NUM_STYLE_LOWER_LETTERS 4
|
||||
#define HPDF_PAGE_NUM_STYLE_EOF 5
|
||||
#define HPDF_PageNumStyle integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_DestinationType {
|
||||
#define HPDF_XYZ 0
|
||||
#define HPDF_FIT 1
|
||||
#define HPDF_FIT_H 3
|
||||
#define HPDF_FIT_V 4
|
||||
#define HPDF_FIT_R 5
|
||||
#define HPDF_FIT_B 6
|
||||
#define HPDF_FIT_BH 7
|
||||
#define HPDF_FIT_BV 8
|
||||
#define HPDF_DST_EOF 9
|
||||
#define HPDF_DestinationType integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_AnnotType {
|
||||
#define HPDF_ANNOT_TEXT_NOTES 0
|
||||
#define HPDF_ANNOT_LINK 1
|
||||
#define HPDF_ANNOT_SOUND 2
|
||||
#define HPDF_ANNOT_FREE_TEXT 3
|
||||
#define HPDF_ANNOT_STAMP 4
|
||||
#define HPDF_ANNOT_SQUARE 5
|
||||
#define HPDF_ANNOT_CIRCLE 6
|
||||
#define HPDF_ANNOT_STRIKE_OUT 7
|
||||
#define HPDF_ANNOT_HIGHTLIGHT 8
|
||||
#define HPDF_ANNOT_UNDERLINE 9
|
||||
#define HPDF_ANNOT_INK 10
|
||||
#define HPDF_ANNOT_FILE_ATTACHMENT 11
|
||||
#define HPDF_ANNOT_POPUP 12
|
||||
#define HPDF_AnnotType integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_AnnotFlgs {
|
||||
#define HPDF_ANNOT_INVISIBLE 0
|
||||
#define HPDF_ANNOT_HIDDEN 1
|
||||
#define HPDF_ANNOT_PRINT 2
|
||||
#define HPDF_ANNOT_NOZOOM 3
|
||||
#define HPDF_ANNOT_NOROTATE 4
|
||||
#define HPDF_ANNOT_NOVIEW 5
|
||||
#define HPDF_ANNOT_READONLY 6
|
||||
#define HPDF_AnnotFlgs integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_AnnotHighlightMode {
|
||||
#define HPDF_ANNOT_NO_HIGHTLIGHT 0
|
||||
#define HPDF_ANNOT_INVERT_BOX 1
|
||||
#define HPDF_ANNOT_INVERT_BORDER 2
|
||||
#define HPDF_ANNOT_DOWN_APPEARANCE 3
|
||||
#define HPDF_ANNOT_HIGHTLIGHT_MODE_EOF 4
|
||||
#define HPDF_AnnotHighlightMode integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_AnnotIcon {
|
||||
#define HPDF_ANNOT_ICON_COMMENT 0
|
||||
#define HPDF_ANNOT_ICON_KEY 1
|
||||
#define HPDF_ANNOT_ICON_NOTE 2
|
||||
#define HPDF_ANNOT_ICON_HELP 3
|
||||
#define HPDF_ANNOT_ICON_NEW_PARAGRAPH 4
|
||||
#define HPDF_ANNOT_ICON_PARAGRAPH 5
|
||||
#define HPDF_ANNOT_ICON_INSERT 6
|
||||
#define HPDF_ANNOT_ICON_EOF 7
|
||||
#define HPDF_AnnotIcon integer
|
||||
|
||||
*/*----------------------------------------------------------------------------*/
|
||||
*/*------ border stype --------------------------------------------------------*/
|
||||
|
||||
*typedef enum _HPDF_BSSubtype {
|
||||
#define HPDF_BS_SOLID 0
|
||||
#define HPDF_BS_DASHED 1
|
||||
#define HPDF_BS_BEVELED 2
|
||||
#define HPDF_BS_INSET 3
|
||||
#define HPDF_BS_UNDERLINED 4
|
||||
#define HPDF_BSSubtype integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_PageSizes {
|
||||
#define HPDF_PAGE_SIZE_LETTER 0
|
||||
#define HPDF_PAGE_SIZE_LEGAL 1
|
||||
#define HPDF_PAGE_SIZE_A3 2
|
||||
#define HPDF_PAGE_SIZE_A4 3
|
||||
#define HPDF_PAGE_SIZE_A5 4
|
||||
#define HPDF_PAGE_SIZE_B4 5
|
||||
#define HPDF_PAGE_SIZE_B5 6
|
||||
#define HPDF_PAGE_SIZE_EXECUTIVE 7
|
||||
#define HPDF_PAGE_SIZE_US4x6 8
|
||||
#define HPDF_PAGE_SIZE_US4x8 9
|
||||
#define HPDF_PAGE_SIZE_US5x7 10
|
||||
#define HPDF_PAGE_SIZE_COMM10 11
|
||||
#define HPDF_PAGE_SIZE_EOF 12
|
||||
#define HPDF_PageSizes integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_PageDirection {
|
||||
#define HPDF_PAGE_PORTRAIT 0
|
||||
#define HPDF_PAGE_LANDSCAPE 1
|
||||
#define HPDF_PageDirection integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_EncoderType {
|
||||
#define HPDF_ENCODER_TYPE_SINGLE_BYTE 0
|
||||
#define HPDF_ENCODER_TYPE_DOUBLE_BYTE 1
|
||||
#define HPDF_ENCODER_TYPE_UNINITIALIZED 2
|
||||
#define HPDF_ENCODER_UNKNOWN 3
|
||||
#define HPDF_EncoderType integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_ByteType {
|
||||
#define HPDF_BYTE_TYPE_SINGLE 0
|
||||
#define HPDF_BYTE_TYPE_LEAD 1
|
||||
#define HPDF_BYTE_TYPE_TRIAL 2
|
||||
#define HPDF_BYTE_TYPE_UNKNOWN 3
|
||||
#define HPDF_ByteType integer
|
||||
|
||||
|
||||
*typedef enum _HPDF_TextAlignment {
|
||||
#define HPDF_TALIGN_LEFT 0
|
||||
#define HPDF_TALIGN_RIGHT 1
|
||||
#define HPDF_TALIGN_CENTER 2
|
||||
#define HPDF_TALIGN_JUSTIFY 3
|
||||
#define HPDF_TextAlignment integer
|
||||
|
||||
|
||||
*/* HPDF_Point struct
|
||||
*/
|
||||
*typedef struct _HPDF_Point {
|
||||
* HPDF_REAL x;
|
||||
* HPDF_REAL y;
|
||||
|
||||
#define HPDF_Point String
|
||||
|
||||
*typedef struct _HPDF_Rect {
|
||||
* HPDF_REAL left;
|
||||
HPDF_REAL bottom;
|
||||
HPDF_REAL right;
|
||||
HPDF_REAL top;
|
||||
|
||||
#define HPDF_Rect string
|
||||
#define HPDF_Box HPDF_Rect
|
||||
|
||||
*/* HPDF_Date struct
|
||||
*/
|
||||
*typedef struct _HPDF_Date {
|
||||
* HPDF_INT year;
|
||||
HPDF_INT month;
|
||||
HPDF_INT day;
|
||||
HPDF_INT hour;
|
||||
HPDF_INT minutes;
|
||||
HPDF_INT seconds;
|
||||
char ind;
|
||||
HPDF_INT off_hour;
|
||||
HPDF_INT off_minutes;
|
||||
|
||||
#define HPDF_Date string
|
||||
BIN
COMUN/utile/hpdf/hpdferr.FPT
Normal file
BIN
COMUN/utile/hpdf/hpdferr.FPT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/hpdferr.dbf
Normal file
BIN
COMUN/utile/hpdf/hpdferr.dbf
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/pdfgen.PJT
Normal file
BIN
COMUN/utile/hpdf/pdfgen.PJT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/pdfgen.PJX
Normal file
BIN
COMUN/utile/hpdf/pdfgen.PJX
Normal file
Binary file not shown.
27
COMUN/utile/hpdf/pdfgen.VBR
Normal file
27
COMUN/utile/hpdf/pdfgen.VBR
Normal file
@@ -0,0 +1,27 @@
|
||||
VB5SERVERINFO
|
||||
VERSION=1.0.0
|
||||
|
||||
HKEY_CLASSES_ROOT\pdfgen.pdfGen = pdfgen.pdfGen
|
||||
HKEY_CLASSES_ROOT\pdfgen.pdfGen\NotInsertable
|
||||
HKEY_CLASSES_ROOT\pdfgen.pdfGen\CLSID = {E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2} = pdfgen.pdfGen
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\ProgId = pdfgen.pdfGen
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\VersionIndependentProgId = pdfgen.pdfGen
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\InProcServer32 = pdfgen.dll
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\InProcServer32\"ThreadingModel" = Apartment
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\TypeLib = {33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\Version = 1.0
|
||||
HKEY_CLASSES_ROOT\CLSID\{E54D0C6A-39AA-4C1C-9BCC-3621EA6DDFF2}\Foxruntime = VFP9R.DLL
|
||||
HKEY_CLASSES_ROOT\INTERFACE\{148A8449-DB56-4255-88EB-733D4D004DC8} = pdfGen
|
||||
HKEY_CLASSES_ROOT\INTERFACE\{148A8449-DB56-4255-88EB-733D4D004DC8}\ProxyStubClsid = {00020424-0000-0000-C000-000000000046}
|
||||
HKEY_CLASSES_ROOT\INTERFACE\{148A8449-DB56-4255-88EB-733D4D004DC8}\ProxyStubClsid32 = {00020424-0000-0000-C000-000000000046}
|
||||
HKEY_CLASSES_ROOT\INTERFACE\{148A8449-DB56-4255-88EB-733D4D004DC8}\TypeLib = {33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}
|
||||
HKEY_CLASSES_ROOT\INTERFACE\{148A8449-DB56-4255-88EB-733D4D004DC8}\TypeLib\"Version" = 1.0
|
||||
|
||||
|
||||
; TypeLibrary registration
|
||||
HKEY_CLASSES_ROOT\TypeLib\{33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}
|
||||
HKEY_CLASSES_ROOT\TypeLib\{33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}\1.0 = pdfgen Type Library
|
||||
HKEY_CLASSES_ROOT\TypeLib\{33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}\1.0\0\win32 = pdfgen.dll
|
||||
HKEY_CLASSES_ROOT\TypeLib\{33AFCBAB-7BA7-4AAF-8CDA-628B6C9FB945}\1.0\FLAGS = 0
|
||||
|
||||
BIN
COMUN/utile/hpdf/pdfgen.tlb
Normal file
BIN
COMUN/utile/hpdf/pdfgen.tlb
Normal file
Binary file not shown.
940
COMUN/utile/hpdf/pdflistener.prg
Normal file
940
COMUN/utile/hpdf/pdflistener.prg
Normal file
@@ -0,0 +1,940 @@
|
||||
*!* Program: PDF Listener
|
||||
*!* Author: Dorin Vasilescu
|
||||
*!* Date:
|
||||
*!* Copyright: 2007 Dorin Vasilescu
|
||||
*!* Description: ReportListener implementation of _libpdf library
|
||||
*!*
|
||||
*!* Revision Information:
|
||||
*!* 2007.07 - first beta release on Profox Romania, low response
|
||||
|
||||
*!* ToDo - image conversion for non jpg/png images : DONE
|
||||
*!* - underline/strikethrough : limited support, only one line text objects
|
||||
|
||||
#include hpdf_types.h
|
||||
#include hpdf_consts.h
|
||||
#include pdflistener.h
|
||||
|
||||
define class pdfListener2 as UpdateListener of listener.vcx
|
||||
|
||||
SendGDIPlusImage = 1
|
||||
|
||||
*parent class custom props
|
||||
nLastPercent = 0 && used to optimize DoStatus execution
|
||||
&&, only when percentDone changes
|
||||
thermFormWidth = 510
|
||||
thermFormHeight = 54
|
||||
thermMargin = 8
|
||||
includeSeconds = TRUE
|
||||
OutputType = -1
|
||||
|
||||
*props used in PDF output
|
||||
*protected pages, fonts, font_substs, images, imagefiles, encodings, destinations, annotations ;
|
||||
, page_w, page_h, aFRXData[1], frxtextset, frxlineset, flagTextSet, flagLineSet, txtLeading
|
||||
pages = .null. && Pages collection
|
||||
fonts = .null. && fonts collection
|
||||
font_substs = .null. && font substitutions, with one of the 14 native PDF fonts
|
||||
images = .null. && images collection
|
||||
imagefiles = .null. && saved images, to be deleted
|
||||
encodings = .null. && encodigs collections
|
||||
outlines = .null. && outlines nodes collection
|
||||
destinations = .null. && corresponding destinations to outlines nodes
|
||||
annotations = .null. && annotations collection
|
||||
|
||||
oPdf = .null. && pdfGen instance, the PDF library wrapper
|
||||
current_page = 0 && oPdf current page handle
|
||||
current_font = 0 && oPdf current font handle
|
||||
|
||||
page_w = 595.276 && default width & height for A4
|
||||
page_h = 841.89
|
||||
|
||||
preview = TRUE && open PDF in viewer?
|
||||
txtLeading = 0 && line spacing
|
||||
|
||||
*these are replicated properties of pdfGen class
|
||||
*I need them in both places, I want that PDF lib able to be used independently
|
||||
*info attributes
|
||||
info_author = ' ' &&pdf info
|
||||
info_creator = ' '
|
||||
info_producer = ' '
|
||||
info_title = ' '
|
||||
info_subject = ' '
|
||||
info_keywords = ' '
|
||||
|
||||
*encryption
|
||||
owner_passwd = 'PDFListener'
|
||||
user_passwd = ''
|
||||
encrypt_mode = 'R3' && R2 or R3, R3 has 5 to 16 key length
|
||||
key_length = 16
|
||||
|
||||
*permissions
|
||||
enable_print = TRUE
|
||||
enable_copy = TRUE
|
||||
|
||||
*compression
|
||||
enable_compression = TRUE
|
||||
|
||||
*pdf file, full path preferred
|
||||
pdfdoc = SYS(2023)+"export.pdf"
|
||||
|
||||
*font settings
|
||||
embed_fonts = TRUE && are subsets of TT fonts embedded in document?
|
||||
default_font = 'Helvetica' &&default font if something goes wrong with font handling
|
||||
encoding = 'CP1252' &&default encoding
|
||||
|
||||
* copy of previous frx record data for text/lines,
|
||||
*used to determine if changes in text/shape mode are needed
|
||||
*(avoid unnecessary API calls for font/color settings)
|
||||
frxTextSet = .null.
|
||||
frxLineSet = .null.
|
||||
|
||||
flagTextSet = TRUE && flag, force font/pen/fill settings time for text objects
|
||||
flagLineSet = TRUE && pen/fill lines/shapes
|
||||
|
||||
JPEG_EncoderId = .null.
|
||||
|
||||
*try to render each line individually, doesn't work as expected
|
||||
DynamicLineHeight = FALSE
|
||||
oGpImage = .null. &&gdiplus instance
|
||||
|
||||
****************
|
||||
procedure Init()
|
||||
|
||||
local cId
|
||||
this.pages = Newobject('Collection') && Pages collection
|
||||
this.fonts = Newobject('Collection') && fonts collection
|
||||
this.font_substs = Newobject('Collection') && font substitutions
|
||||
this.images = Newobject('Collection') && images collection
|
||||
this.imagefiles = Newobject('Collection') && temporary images
|
||||
this.encodings = Newobject('Collection') && encodigs collections
|
||||
this.outlines = Newobject('Collection') && outlines node collection
|
||||
this.destinations = Newobject('Collection') && corresponding destinations to outlines nodes
|
||||
this.annotations = Newobject('Collection') && annotations collection
|
||||
|
||||
*copy of frx data, collection of empty objects filled with SCATTER NAME
|
||||
Addproperty(this, 'aFRXData[1]', .null.)
|
||||
|
||||
*the "workhorse" of this class, PDF library
|
||||
this.oPdf = NewObject('pdfGen','_libpdf.prg')
|
||||
|
||||
*the excellent Carlos Alloati progressbar class
|
||||
if not "ctl32_progressbar" $ lower(set("Classlib"))
|
||||
set classlib to ctl32_progressbar.vcx additive
|
||||
endif
|
||||
|
||||
this.DeclareDLLs()
|
||||
|
||||
*image conversion and temporary images stuff
|
||||
cID = space(20)
|
||||
pdfgen_CLSIDFromString(strconv(CLSID_JPG, 5), @cID)
|
||||
this.JPEG_EncoderId = cID
|
||||
|
||||
this.oGpImage = Newobject("GpImage", "_gdiplus.vcx")
|
||||
|
||||
DoDefault()
|
||||
|
||||
endproc
|
||||
|
||||
********************
|
||||
procedure BeforeReport
|
||||
local frxrec
|
||||
|
||||
*check file name, preview clauses
|
||||
if not Empty(this.CommandClauses.ToFile)
|
||||
this.pdfDoc = this.CommandClauses.ToFile
|
||||
endif
|
||||
|
||||
this.preview = this.CommandClauses.Preview
|
||||
|
||||
*reset internal handles collections and start a new pdf doc, set password, permissions
|
||||
this.Reset()
|
||||
|
||||
*load fonts and FRX data
|
||||
this.SetFRXDataSession()
|
||||
|
||||
this.LoadFonts()
|
||||
|
||||
*load all records from frx into array property to avoid switching data session in Render()
|
||||
*
|
||||
select frx
|
||||
dimension this.aFRXData[Reccount('frx')]
|
||||
scan
|
||||
this.aFRXData[Recno()] = NewObject('empty')
|
||||
scatter memo name this.aFRXData[Recno()]
|
||||
frxrec = this.aFRXData[Recno()]
|
||||
frxrec.penred = Max( frxrec.penred,0 )
|
||||
frxrec.pengreen = Max( frxrec.pengreen,0 )
|
||||
frxrec.penblue = Max( frxrec.penblue, 0)
|
||||
if frxrec.mode = 0
|
||||
frxrec.fillred = Iif(frxrec.fillred = -1 , 255 , frxrec.fillred)
|
||||
frxrec.fillgreen = Iif(frxrec.fillgreen = -1 , 255 , frxrec.fillgreen)
|
||||
frxrec.fillblue = Iif(frxrec.fillblue = -1 , 255 , frxrec.fillblue)
|
||||
endif
|
||||
endscan
|
||||
|
||||
this.frxTextSet = this.aFRXData[1]
|
||||
this.frxLineSet = this.aFRXData[1]
|
||||
|
||||
this.SetCurrentDataSession()
|
||||
DoDefault()
|
||||
endproc
|
||||
|
||||
|
||||
***************
|
||||
procedure Reset
|
||||
|
||||
*prepare report processing
|
||||
Dodefault()
|
||||
this.pages = Newobject('Collection')
|
||||
this.fonts = Newobject('Collection')
|
||||
this.font_substs = Newobject('Collection')
|
||||
this.outlines = Newobject('Collection')
|
||||
this.destinations = Newobject('Collection')
|
||||
this.annotations = Newobject('Collection')
|
||||
this.images = NewObject('Collection')
|
||||
|
||||
*start a new doc
|
||||
this.oPdf.FreeDoc()
|
||||
this.oPdf.doc = this.oPdf.New()
|
||||
|
||||
if this.enable_compression
|
||||
this.opdf.SetCompressionMode( HPDF_COMP_ALL )
|
||||
else
|
||||
this.opdf.SetCompressionMode( HPDF_COMP_NONE )
|
||||
endif
|
||||
|
||||
if not Empty(this.owner_passwd) or not Empty( this.user_passwd )
|
||||
this.oPdf.SetPassword( this.owner_passwd , this.user_passwd )
|
||||
endif
|
||||
|
||||
if not Empty(this.owner_passwd) or not Empty( this.user_passwd )
|
||||
this.oPdf.SetPermission()
|
||||
endif
|
||||
this.oPdf.info_author = this.info_author
|
||||
this.oPdf.info_creator = this.info_creator
|
||||
this.oPdf.info_producer = this.info_producer
|
||||
this.oPdf.info_title = this.info_title
|
||||
this.oPdf.info_subject = this.info_subject
|
||||
this.oPdf.info_keywords = this.info_keywords
|
||||
|
||||
|
||||
endproc
|
||||
|
||||
|
||||
******************************
|
||||
procedure Render(m.nFRXRecno ;
|
||||
, m.nLeft, m.nTop, m.nWidth, m.nHeight ;
|
||||
, m.nObjectContinuationType, m.cContentsToBeRendered, m.GDIPlusImage)
|
||||
|
||||
*
|
||||
* a lot of code in this method, but I'm trying to avoid slowness caused by calling
|
||||
* possible renderText(), renderLine(), renderShape(), context switching, stack, ...
|
||||
* Rendering is almost as fast as native one
|
||||
|
||||
if this.TwoPassProcess and this.CurrentPass = 0
|
||||
Dodefault(m.nFRXRecno ;
|
||||
, m.nLeft, m.nTop, m.nWidth, m.nHeight ;
|
||||
, m.nObjectContinuationType, m.cContentsToBeRendered, m.GDIPlusImage)
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
local txtAlignment, txtLeading, fontRegValue, cFontStyle, frx, cFontRepl ;
|
||||
,nL, nT, nR, nB, nX, nY, nW, nH, nRay ;
|
||||
,dash_mode, pattern_count, cTempFile
|
||||
|
||||
if this.pages.Count < this.PageNo
|
||||
this.AddNewPage()
|
||||
endif
|
||||
|
||||
*get a copy of current frx record
|
||||
m.frx = this.aFRXData[m.nFRXRecno]
|
||||
|
||||
*prepare coordinates
|
||||
m.nL = m.nLeft * CONV_FACTOR
|
||||
m.nT = this.page_h - m.nTop * CONV_FACTOR
|
||||
m.nR = (m.nLeft + m.nWidth) * CONV_FACTOR
|
||||
m.nB = this.page_h - (m.nTop + m.nHeight) * CONV_FACTOR
|
||||
m.nX = m.nL
|
||||
m.nY = m.nB
|
||||
m.nW = m.nWidth * CONV_FACTOR
|
||||
m.nH = m.nHeight * CONV_FACTOR
|
||||
|
||||
|
||||
do case
|
||||
case Inlist(frx.objtype ;
|
||||
, FRX_OBJTYP_FIELD ;
|
||||
, FRX_OBJTYP_LABEL )
|
||||
|
||||
*
|
||||
* text objects
|
||||
* optimisations:
|
||||
* using flagTextSet flag, API calls for setting font face/size are called only when font setting changed
|
||||
* Page_SetFontAndSize() is executed only when font settings change
|
||||
|
||||
if Empty( m.cContentsToBeRendered )
|
||||
* nothing to do
|
||||
return
|
||||
endif
|
||||
|
||||
*set font, based on handles added in BeforeReport, but only if different from previous
|
||||
* value stored in frxtextset
|
||||
*
|
||||
m.fontRegValue = frx.fontface ;
|
||||
+ Iif(Bittest(frx.FontStyle,0) , ' Bold', '' ) ;
|
||||
+ Iif(Bittest(frx.FontStyle,1) , ' Italic', '' )
|
||||
|
||||
m.cFontStyle = Iif(Bittest(frx.FontStyle,0) , 'B', '' ) ;
|
||||
+ Iif(Bittest(frx.FontStyle,1) , ' I', '' ) ;
|
||||
+ Iif(Bittest(frx.FontStyle,2) , ' U', '' ) ;
|
||||
+ Iif(Bittest(frx.FontStyle,7) , ' S', '' )
|
||||
|
||||
m.txtLeading = Fontmetric(2 , frx.FontFace , frx.fontsize, m.cFontStyle) * ;
|
||||
Iif( frx.objtype = FRX_OBJTYP_FIELD, LINE_ADJUST_FIELDS, LINE_ADJUST_LABELS) * ;
|
||||
Icase( frx.objtype = FRX_OBJTYP_FIELD, 1 ;
|
||||
,frx.spacing = 0,1 ;
|
||||
,frx.spacing = 1, 1.5 ;
|
||||
,frx.spacing = 2, 2, 1)
|
||||
m.top_adjust = Fontmetric(5 , frx.FontFace, frx.fontsize, m.cFontStyle)
|
||||
|
||||
if this.flagTextSet or not frx.fontface == this.frxTextSet.fontface ;
|
||||
or not frx.fontsize = this.frxTextSet.fontsize or not frx.fontstyle = this.frxTextSet.fontstyle
|
||||
|
||||
this.current_font = this.fonts.Item( this.fonts.GetKey( m.fontRegValue) )
|
||||
this.oPdf.Page_SetFontAndSize(this.current_page, this.current_font, frx.fontsize)
|
||||
|
||||
endif
|
||||
|
||||
*set line spacing, based on frx.spacing value
|
||||
*
|
||||
if not txtLeading = this.txtLeading
|
||||
this.oPdf.Page_SetTextLeading(this.current_page, m.txtLeading )
|
||||
this.txtLeading = m.txtLeading
|
||||
endif
|
||||
|
||||
*set text alignment based on object type and settings from frx
|
||||
*
|
||||
txtAlignment = ;
|
||||
ICase( frx.objtype = FRX_OBJTYP_LABEL and not Empty(frx.picture) ;
|
||||
, Icase( '@I' $ frx.picture , HPDF_TALIGN_CENTER ;
|
||||
, '@J' $ frx.picture , HPDF_TALIGN_RIGHT, HPDF_TALIGN_LEFT ) ;
|
||||
,( frx.objtype = FRX_OBJTYP_FIELD );
|
||||
and not frx.offset = 0 ;
|
||||
, Icase( frx.offset = 2 , HPDF_TALIGN_CENTER ;
|
||||
, frx.offset = 1 , HPDF_TALIGN_RIGHT, HPDF_TALIGN_LEFT ) ;
|
||||
, HPDF_TALIGN_LEFT )
|
||||
|
||||
* extra width of one char, seems that PDF API needs this, otherwise truncates text
|
||||
*
|
||||
m.nExtraW = Fontmetric(6 , frx.FontFace , frx.fontsize, m.cFontStyle)
|
||||
m.nExtraWL = Icase(txtAlignment = HPDF_TALIGN_RIGHT, m.nExtraW ;
|
||||
,txtAlignment = HPDF_TALIGN_CENTER, m.nExtraW/2, 0)
|
||||
m.nExtraWR = Icase(txtAlignment = HPDF_TALIGN_LEFT, m.nExtraW ;
|
||||
,txtAlignment = HPDF_TALIGN_CENTER, m.nExtraW/2, 0)
|
||||
|
||||
*check text filling color
|
||||
if frx.mode = 0 &&fill color set, background opaque
|
||||
if this.flagTextSet or not frx.fillred = this.frxTextSet.fillred ;
|
||||
or not frx.fillgreen = this.frxTextSet.fillgreen ;
|
||||
or not frx.fillblue = this.frxTextSet.fillblue
|
||||
this.oPdf.Page_SetRGBFill( this.current_page, frx.fillred/255, frx.fillgreen/255,frx.fillblue/255)
|
||||
this.oPdf.Page_Rectangle(this.current_page, m.nX, m.nY, m.nW, m.nH )
|
||||
this.oPdf.Page_Fill(this.current_page)
|
||||
|
||||
*reset flag to force text filling color reassignment
|
||||
this.flagTextSet = TRUE
|
||||
endif
|
||||
endif
|
||||
|
||||
if this.flagTextSet or not frx.penred = this.frxTextSet.penred ;
|
||||
or not frx.pengreen = this.frxTextSet.pengreen ;
|
||||
or not frx.penblue = this.frxTextSet.penblue
|
||||
*set page text pen color
|
||||
|
||||
this.oPdf.Page_SetRGBFill( this.current_page, frx.penred/255, frx.pengreen/255,frx.penblue/255)
|
||||
endif
|
||||
|
||||
this.oPdf.Page_BeginText(this.current_page)
|
||||
this.oPdf.Page_TextRect(this.current_page, nL - nExtraWL ;
|
||||
, nT + top_adjust ;
|
||||
, nR + nExtraWR ;
|
||||
, nB - txtLeading + top_adjust ;
|
||||
, Strconv( m.cContentsToBeRendered,6) ;
|
||||
, txtAlignment,0)
|
||||
this.oPdf.Page_EndText(this.current_page)
|
||||
|
||||
|
||||
*Temporary support for Underline/Strikethrough, but only first line of text objects
|
||||
*Need to be fully implemented in _libpdf.prg
|
||||
*
|
||||
if 'U' $ cFontStyle &&underline
|
||||
local underline_adjust
|
||||
m.underline_adjust = Fontmetric(2 , frx.FontFace , frx.fontsize, m.cFontStyle) ;
|
||||
- Fontmetric(3 , frx.FontFace , frx.fontsize, m.cFontStyle)/2
|
||||
|
||||
|
||||
|
||||
this.oPdf.Page_SetRGBStroke( this.current_page, frx.penred/255, frx.pengreen/255,frx.penblue/255)
|
||||
this.oPdf.Page_SetLineWidth( this.current_page ;
|
||||
, Fontmetric(3, frx.FontFace , frx.fontsize, m.cFontStyle)/4)
|
||||
|
||||
this.oPdf.Page_MoveTo( this.current_page , m.nL , m.nT - m.underline_adjust )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nR , m.nT - m.underline_adjust)
|
||||
this.oPdf.Page_Stroke(this.current_page)
|
||||
endif
|
||||
|
||||
if 'S' $ cFontStyle &&strikethrough
|
||||
local strike_adjust
|
||||
m.strike_adjust = Fontmetric(2 , frx.FontFace , frx.fontsize, m.cFontStyle) ;
|
||||
- Fontmetric(2 , frx.FontFace , frx.fontsize, m.cFontStyle)/2 ;
|
||||
|
||||
this.oPdf.Page_SetRGBStroke( this.current_page, frx.penred/255, frx.pengreen/255,frx.penblue/255)
|
||||
this.oPdf.Page_SetLineWidth( this.current_page , 0)
|
||||
|
||||
this.oPdf.Page_MoveTo( this.current_page , m.nL , m.nT - m.strike_adjust )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nR , m.nT - m.strike_adjust )
|
||||
this.oPdf.Page_Stroke(this.current_page)
|
||||
endif
|
||||
|
||||
this.frxTextSet = this.aFRXData[m.nFRXRecno]
|
||||
|
||||
*set flag to change text settings only if something changed
|
||||
if this.flagTextSet
|
||||
this.flagTextSet = FALSE
|
||||
endif
|
||||
|
||||
*but if next object is line/shape, force line/shape set
|
||||
this.flagLineSet = TRUE
|
||||
|
||||
case Inlist(frx.objtype, FRX_OBJTYP_LINE, FRX_OBJTYP_RECTANGLE )
|
||||
|
||||
*line and rectangle objects
|
||||
|
||||
* optimisations:
|
||||
* using flagLineSet flag, API calls for setting drawing parameters are called only when changed
|
||||
* Page_SetRGBStroke(), Page_SetLineWidth()
|
||||
|
||||
*set dash mode, if necessary ( stored in frx.penpat field )
|
||||
if this.flagLineSet or not frx.penpat = this.frxLineSet.penpat
|
||||
dash_mode = chr0
|
||||
pattern_count = 0
|
||||
|
||||
do case
|
||||
case frx.penpat = FRX_PENPAT_SOLID
|
||||
dash_mode = chr0
|
||||
pattern_count = 0
|
||||
case frx.penpat = FRX_PENPAT_DOTTED
|
||||
dash_mode = Chr(3)+chr0+chr0
|
||||
pattern_count = 1
|
||||
case frx.penpat = FRX_PENPAT_DASHED
|
||||
dash_mode = Chr(18)+chr0+Chr(6)+chr0+chr0
|
||||
pattern_count = 2
|
||||
case frx.penpat = FRX_PENPAT_DASHDOT
|
||||
dash_mode = Chr(9)+CHR0+Chr(6)+CHR0+Chr(3)+CHR0+Chr(6)+CHR0+CHR0
|
||||
pattern_count = 4
|
||||
case frx.penpat = FRX_PENPAT_DASHDOTDOT
|
||||
dash_mode = Chr(9)+CHR0+Chr(3)+CHR0+Chr(3)+CHR0+Chr(3)+CHR0+Chr(3)+CHR0+Chr(3)+CHR0+CHR0
|
||||
pattern_count = 6
|
||||
endcase
|
||||
|
||||
this.oPdf.Page_SetDash( this.current_page, dash_mode , pattern_count , 0)
|
||||
endif
|
||||
|
||||
*pencolor settings
|
||||
if this.flagLineSet or not frx.penred = this.frxLineSet.penred ;
|
||||
or not frx.pengreen = this.frxLineSet.pengreen ;
|
||||
or not frx.penblue = this.frxLineSet.penblue
|
||||
If frx.penpat <> FRX_PENPAT_NONE
|
||||
this.oPdf.Page_SetRGBStroke( this.current_page, frx.penred/255, frx.pengreen/255,frx.penblue/255)
|
||||
Else
|
||||
this.oPdf.Page_SetRGBStroke( this.current_page, frx.fillred/255, frx.fillgreen/255,frx.fillblue/255)
|
||||
EndIf
|
||||
endif
|
||||
|
||||
|
||||
*line pensize settings
|
||||
if this.flagLineSet or not frx.pensize = this.frxLineSet.pensize
|
||||
this.oPdf.Page_SetLineWidth( this.current_page, frx.pensize )
|
||||
endif
|
||||
|
||||
*draw simple lines
|
||||
if frx.objtype = FRX_OBJTYP_LINE
|
||||
if m.nHeight > m.nWidth &&vertical line
|
||||
this.oPdf.Page_MoveTo( this.current_page , m.nL, m.nB )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nL, m.nT )
|
||||
else
|
||||
this.oPdf.Page_MoveTo( this.current_page , m.nL, m.nT )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nR , m.nT )
|
||||
endif
|
||||
this.oPdf.Page_Stroke(this.current_page)
|
||||
endif
|
||||
|
||||
*draw shapes
|
||||
if frx.objtype = FRX_OBJTYP_RECTANGLE
|
||||
|
||||
if frx.mode = 0 &&fill color set, background opaque
|
||||
this.oPdf.Page_SetRGBFill( this.current_page, frx.fillred/255, frx.fillgreen/255,frx.fillblue/255)
|
||||
endif
|
||||
|
||||
do case
|
||||
case frx.offset = 0 && simple rectangle
|
||||
|
||||
this.oPdf.Page_Rectangle( this.current_page , nX, nY, nW, nH )
|
||||
|
||||
case Between(frx.offset,1,98) &&rounded corners
|
||||
|
||||
*rounded corners using graphic path, slow ( not so slow though )
|
||||
nRay = Round(IIF( m.nW > m.nH, Min(frx.offset,Int(m.nH/2)), Min(frx.offset,Int(m.nW/2))) , 0)
|
||||
|
||||
this.oPdf.Page_MoveTo( this.current_page , m.nX + m.nRay , m.nY )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nR - m.nRay , m.nY )
|
||||
this.oPdf.Page_CurveTo ( this.current_page, m.nR, m.nB, m.nR, m.nB, m.nR, m.nB + m.nRay )
|
||||
this.oPdf.Page_LineTo( this.current_page , m.nR , m.nT - m.nRay )
|
||||
this.oPdf.Page_CurveTo( this.current_page, m.nR, m.nT, m.nR, m.nT, m.nR - m.nRay , m.nT)
|
||||
this.oPdf.Page_LineTo( this.current_page, m.nX + m.nRay , m.nT )
|
||||
this.oPdf.Page_CurveTo( this.current_page, m.nX, m.nT, m.nX, m.nT, m.nX, m.nT - m.nRay )
|
||||
this.oPdf.Page_LineTo( this.current_page, m.nX , m.nY + m.nRay )
|
||||
this.oPdf.Page_CurveTo( this.current_page, m.nX, m.nY , m.nX, m.nY, m.nX + m.nRay , m.nY )
|
||||
|
||||
case frx.offset = 99 &&ellipse/circle
|
||||
|
||||
this.oPdf.Page_Ellipse( this.current_page, m.nX + m.nW/2 , m.nY + m.nH/2, m.nW/2, m.nH/2 )
|
||||
|
||||
endcase
|
||||
|
||||
if frx.mode = 0 &&fill color set, background opaque
|
||||
this.oPdf.Page_FillStroke(this.current_page)
|
||||
else
|
||||
this.oPdf.Page_Stroke(this.current_page)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
*set flag to change line settings only if something changed
|
||||
this.frxLineSet = this.aFRXData[m.nFRXRecno]
|
||||
if this.flagLineSet
|
||||
this.flagLineSet = FALSE
|
||||
endif
|
||||
|
||||
*but if next object is text, force fonts/pen/fill set
|
||||
this.flagTextSet = TRUE
|
||||
|
||||
case frx.objtype = FRX_OBJTYP_PICTURE
|
||||
|
||||
local m.imgHandle, m.imgFile
|
||||
local m.nImgHandle, m.result
|
||||
|
||||
do case
|
||||
|
||||
*picture from file, jpg and png supported
|
||||
case frx.offset = 0
|
||||
|
||||
m.imgHandle = 0
|
||||
m.imgFile = Lower(frx.picture)
|
||||
|
||||
*jpg and png natively supported by libharu
|
||||
if Inlist( Justext( m.imgFile) , 'jpg','png')
|
||||
|
||||
if this.imagefiles.GetKey(m.imgFile) = 0
|
||||
|
||||
m.cTempFile = Addbs(Sys(2023)) + Sys(2015) + '.' + Justext( m.imgFile )
|
||||
this.imagefiles.Add( m.cTempFile , Lower( m.imgFile ))
|
||||
Strtofile( Filetostr( m.imgFile ) , m.cTempFile )
|
||||
|
||||
endif
|
||||
|
||||
if this.images.GetKey( m.imgFile ) = 0
|
||||
if Lower(Justext(frx.picture)) = 'jpg'
|
||||
m.imgHandle = this.oPdf.LoadJpegImageFromFile( this.imagefiles.Item( this.imagefiles.GetKey(m.imgFile)))
|
||||
if not m.imgHandle = 0
|
||||
try
|
||||
this.images.Add(m.imgHandle , m.imgFile )
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
endif
|
||||
if Lower(Justext(frx.picture)) = 'png'
|
||||
m.imgHandle = this.oPdf.LoadPNGImageFromFile(this.imagefiles.Item( this.imagefiles.GetKey(m.imgFile)))
|
||||
if not imgHandle = 0
|
||||
try
|
||||
this.images.Add(m.imgHandle , m.imgFile )
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
endif
|
||||
else
|
||||
m.imgHandle = this.images.Item ( this.images.GetKey( m.imgFile ))
|
||||
endif
|
||||
|
||||
*need conversion to jpg/png for images of another type
|
||||
*will use gdiplus to convert images
|
||||
else
|
||||
|
||||
if this.imagefiles.GetKey(m.imgFile) = 0
|
||||
|
||||
cTempFile = Addbs(Sys(2023)) + Sys(2015) + '.jpg'
|
||||
this.oGpImage.CreateFromFile(Fullpath(m.imgFile))
|
||||
this.oGpImage.SaveToFile(cTempFile,"image/jpeg", "quality=100")
|
||||
imgHandle = this.oPdf.LoadJpegImageFromFile(m.cTempFile)
|
||||
this.imagefiles.Add( m.cTempFile , Lower( m.imgFile ))
|
||||
|
||||
endif
|
||||
|
||||
if this.images.GetKey( m.imgFile ) = 0
|
||||
m.imgHandle = this.oPdf.LoadJpegImageFromFile( this.imagefiles.Item( this.imagefiles.GetKey(m.imgFile)))
|
||||
if not m.imgHandle = 0
|
||||
try
|
||||
this.images.Add(m.imgHandle , m.imgFile )
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
else
|
||||
m.imgHandle = this.images.Item ( this.images.GetKey( m.imgFile ))
|
||||
endif
|
||||
endif
|
||||
|
||||
*draw image on page
|
||||
if not imgHandle = 0
|
||||
this.oPdf.Page_DrawImage( this.current_page , m.imgHandle , m.nX, m.nY, m.nW, m.nH )
|
||||
endif
|
||||
|
||||
case (frx.offset = 1 or frx.offset = 2) and not m.GDIPlusImage = 0
|
||||
|
||||
m.cTempFile = Lower(Addbs(Sys(2023)) + Sys(2015) + '.jpg')
|
||||
m.result = pdfgen_GdipSaveImageToFile(m.GDIPlusImage, Strconv(m.cTempFile,5)+CHR0, this.JPEG_EncoderId, 0)
|
||||
m.imgHandle = this.oPdf.LoadJpegImageFromFile(m.cTempFile)
|
||||
if not imgHandle = 0
|
||||
try
|
||||
this.imagefiles.Add(m.cTempFile , m.cTempFile)
|
||||
this.oPdf.Page_DrawImage( this.current_page , m.imgHandle , m.nX, m.nY, m.nW, m.nH )
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
endcase
|
||||
|
||||
endcase
|
||||
|
||||
endproc
|
||||
|
||||
***********************
|
||||
procedure AfterReport()
|
||||
this.opdf.SaveToFile(this.pdfdoc)
|
||||
if this.preview
|
||||
pdfgen_ShellExecute( 0,'Open',this.pdfDoc,'',JustPath(FullPath(this.pdfDoc)),1)
|
||||
endif
|
||||
this.SetFRXDataSession()
|
||||
use in frx
|
||||
this.SetCurrentDataSession()
|
||||
DoDefault()
|
||||
endproc
|
||||
|
||||
********************
|
||||
procedure AddNewPage
|
||||
this.current_page = this.oPdf.AddPage()
|
||||
this.pages.Add(this.current_page)
|
||||
this.page_w = this.GetPageWidth() * CONV_FACTOR
|
||||
this.page_h = this.GetPageHeight() * CONV_FACTOR
|
||||
this.oPdf.Page_SetWidth( this.current_page, this.page_w )
|
||||
this.oPdf.Page_SetHeight( this.current_page, this.page_h )
|
||||
this.flagTextSet = TRUE
|
||||
this.flagLineSet = TRUE
|
||||
endproc
|
||||
|
||||
*********************
|
||||
procedure LoadFonts()
|
||||
local fontRegValue, hFont, i, iCnt, fontFRX, fontRepl
|
||||
local array aFontSubst[1]
|
||||
|
||||
this.SetFRXDataSession()
|
||||
|
||||
*load default native font
|
||||
m.hFont = this.oPdf.GetFont( this.default_font , this.encoding )
|
||||
this.fonts.Add( hFont , this.default_font )
|
||||
|
||||
*get font substitutes from page header user data
|
||||
locate for objtype = 9 and objcode = 1
|
||||
if not Empty(frx.user)
|
||||
m.iCnt = Alines(aFontSubst, frx.user)
|
||||
for m.i = 1 to m.iCnt
|
||||
|
||||
if Left(aFontSubst[i],8) = 'PDFFONT:'
|
||||
m.fontFRX = Strextract(aFontSubst[i] , 'PDFFONT:' , '=')
|
||||
m.fontRepl = Strextract(aFontSubst[i],'=' )
|
||||
this.font_substs.Add( m.fontRepl, m.fontFRX )
|
||||
|
||||
*check to see if this font is already loaded
|
||||
if this.fonts.GetKey( fontRepl ) = 0
|
||||
m.hFont = this.oPdf.GetFont( m.fontRepl , this.encoding)
|
||||
this.fonts.Add( m.hFont , m.fontFRX )
|
||||
else
|
||||
m.hFont = this.fonts.Item( this.fonts.GetKey( m.fontRepl ))
|
||||
this.fonts.Add( m.hFont , m.fontFRX )
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
|
||||
|
||||
*get fonts and styles from frx cursor
|
||||
select distinct Padr(fontface,255) as fontface ;
|
||||
, fontstyle from frx where objtype = FRX_OBJTYP_FONTRES into cursor frxfonts
|
||||
|
||||
*then have them loaded by API
|
||||
scan for not Empty(fontface)
|
||||
m.fontRegValue = Trim(frxfonts.fontface) ;
|
||||
+ Iif(Bittest(frxfonts.FontStyle,0) , ' Bold', '' ) ;
|
||||
+ Iif(Bittest(frxfonts.FontStyle,1) , ' Italic', '' )
|
||||
|
||||
if this.fonts.GetKey( fontRegValue ) = 0
|
||||
*check for native font substitute
|
||||
if this.font_substs.GetKey( fontRegValue ) = 0
|
||||
*not found, load from font file
|
||||
this.AddFont( m.fontRegValue )
|
||||
else
|
||||
this.fonts.Add( this.fonts.Item( this.font_substs.GetKey( m.fontRegValue )), m.fontRegValue)
|
||||
endif
|
||||
endif
|
||||
endscan
|
||||
use in frxfonts
|
||||
select frx
|
||||
endproc
|
||||
|
||||
*********************************
|
||||
procedure AddFont( fontRegValue )
|
||||
|
||||
local nHKey, cSubKey, nResult, lpszValueName, cData, nDataLen, cFontFile, cFontDesc, hFont
|
||||
local nKey, lpdwType
|
||||
|
||||
m.nKey = 0
|
||||
m.cSubKey = Iif(Os(3) < '5' ;
|
||||
, 'Software\Microsoft\Windows\CurrentVersion\Fonts' ;
|
||||
, 'Software\Microsoft\Windows NT\CurrentVersion\Fonts')
|
||||
|
||||
pdfgen_RegOpenKey ( HKEY_LOCAL_MACHINE, @cSubKey, @nKey )
|
||||
m.cData = Space(255)
|
||||
m.nDataLen = 0
|
||||
m.lpszValueName = m.fontRegValue + ' (TrueType)'
|
||||
m.lpdwType = REG_SZ
|
||||
|
||||
*get data length first
|
||||
pdfgen_RegQueryValueEx( nKey , lpszValueName, 0, @lpdwType , @cData, @nDataLen )
|
||||
m.cData = Space(m.nDataLen)
|
||||
*get key value
|
||||
pdfgen_RegQueryValueEx( m.nKey , m.lpszValueName, 0, @m.lpdwType , @m.cData, @m.nDataLen )
|
||||
m.cFontFile = GetEnv('windir')+'\Fonts\'+Left(m.cData,m.nDataLen-1)
|
||||
pdfgen_RegCloseKey(m.nKey)
|
||||
if File(m.cFontFile)
|
||||
m.cFontDesc = this.oPdf.LoadTTFontFromFile(m.cFontFile, this.embed_fonts )
|
||||
m.hFont = this.oPdf.GetFont(m.cFontDesc , this.encoding )
|
||||
this.fonts.Add(m.hFont, m.fontRegValue)
|
||||
else
|
||||
m.hFont = this.fonts.Item(1)
|
||||
this.fonts.Add(m.hFont, m.fontRegValue)
|
||||
endif
|
||||
|
||||
|
||||
endproc
|
||||
|
||||
*********************
|
||||
procedure DeclareDLLs
|
||||
|
||||
declare integer RegOpenKey in Win32API as pdfgen_RegOpenKey ;
|
||||
integer nHKey, string @cSubKey, integer @nResult
|
||||
declare integer RegCloseKey in Win32API as pdfgen_RegCloseKey integer nHKey
|
||||
declare integer RegQueryValueEx in Win32API as pdfgen_RegQueryValueEx ;
|
||||
integer nHKey, string lpszValueName, integer dwReserved,;
|
||||
integer @lpdwType, string @cData, integer @nDataLen
|
||||
declare integer ShellExecute in SHELL32.DLL as pdfgen_ShellExecute ;
|
||||
INTEGER nWinHandle ,;
|
||||
STRING cOperation,;
|
||||
STRING cFileName,;
|
||||
STRING cParameters,;
|
||||
STRING cDirectory,;
|
||||
INTEGER nShowWindow
|
||||
|
||||
*functions used to save general fields as jpegs in temporary files folder
|
||||
declare integer GdipLoadImageFromFile IN GDIPLUS.DLL as pdfgen_GdipLoadImageFromFile ;
|
||||
string filename, integer @imgHandle
|
||||
declare integer GdipSaveImageToFile in GDIPlus.DLL as pdfgen_GdipSaveImageToFile ;
|
||||
integer image, string filename, string @ CLSID_clsidEncoder, ;
|
||||
integer encoderParams
|
||||
declare integer CLSIDFromString in ole32 as pdfgen_CLSIDFromString string, string @
|
||||
|
||||
endproc
|
||||
|
||||
*****************
|
||||
procedure Destroy
|
||||
|
||||
if not Type('this.imagefiles.Count') = 'N'
|
||||
Dodefault()
|
||||
return
|
||||
endif
|
||||
|
||||
if this.imagefiles.Count > 0
|
||||
|
||||
local i
|
||||
for m.i = 1 to this.imagefiles.Count
|
||||
erase (this.imagefiles.Item(m.i))
|
||||
endfor
|
||||
endif
|
||||
|
||||
Dodefault()
|
||||
|
||||
endproc
|
||||
|
||||
|
||||
*********************
|
||||
procedure CreateTherm
|
||||
*modified to use Carlos Alloatti progress bar
|
||||
*
|
||||
if isnull(this.ThermForm)
|
||||
|
||||
local liThermTop, liThermLeft, liThermWidth, liThermHeight, liSession
|
||||
if type("this.CommandClauses.StartDataSession") = "N"
|
||||
liSession = set("DATASESSION")
|
||||
try
|
||||
set datasession to (this.commandclauses.StartDataSession)
|
||||
catch when .t.
|
||||
this.resetDataSession()
|
||||
endtry
|
||||
endif
|
||||
this.ThermForm = CreateObject("FORM")
|
||||
|
||||
|
||||
with this.ThermForm
|
||||
.ScaleMode = SCALEMODE_PIXELS
|
||||
.Height = THIS.ThermFormHeight
|
||||
.HalfHeightCaption = .T.
|
||||
.Width = THIS.ThermFormWidth
|
||||
.AutoCenter = .T.
|
||||
.BorderStyle = BORDER_DOUBLE && fixed dialog
|
||||
.ControlBox = .F.
|
||||
.Closable = (NOT THIS.IsRunning)
|
||||
.MaxButton = .F.
|
||||
.MinButton = .F.
|
||||
.Movable = (NOT THIS.IsRunning)
|
||||
.AlwaysOnTop = .T.
|
||||
.AllowOutput = .F.
|
||||
.AddObject("Therm","ctl32_progressbar")
|
||||
.AddObject("ThermLabel","ctl32_progressbarlabel")
|
||||
.ThermLabel.Visible = .T.
|
||||
.ThermLabel.FontBold = .T.
|
||||
.ThermLabel.Top = 4
|
||||
.ThermLabel.Width = .Width - (this.ThermMargin*2)
|
||||
.ThermLabel.Alignment = 2
|
||||
liThermHeight = .Height - (this.ThermMargin* 2) - .ThermLabel.Height
|
||||
liThermWidth = .Width - (this.ThermMargin*2)
|
||||
endwith
|
||||
|
||||
this.SetThermFormCaption()
|
||||
|
||||
m.liThermTop = this.ThermMargin + 20
|
||||
m.liThermLeft = this.ThermMargin
|
||||
|
||||
with this.ThermForm.Therm
|
||||
.Top = liThermTop
|
||||
.Left = liThermLeft
|
||||
.Height = liThermHeight
|
||||
.Width = liThermWidth
|
||||
.Visible = .T.
|
||||
.Caption = OUTPUTCLASS_RUNSTATUS_LOC
|
||||
endwith
|
||||
|
||||
if not empty(liSession)
|
||||
set datasession to (liSession)
|
||||
endif
|
||||
endif
|
||||
|
||||
return not isnull(this.ThermForm)
|
||||
endproc
|
||||
|
||||
******************************
|
||||
procedure DoStatus( cMessage )
|
||||
nodefault
|
||||
LOCAL loParentForm, lcCaption, lcParentFormName
|
||||
IF (NOT (THIS.QuietMode or ;
|
||||
(THIS.IsRunning AND THIS.CommandClauses.NoDialog)))
|
||||
|
||||
IF this.nlastpercent <> CEILING(this.percentDone*100)
|
||||
this.nlastpercent = CEILING(this.percentDone*100)
|
||||
ELSE
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
IF EMPTY(m.cMessage) OR ISNULL(m.cMessage)
|
||||
m.cMessage = ""
|
||||
ENDIF
|
||||
|
||||
m.lcCaption = EVALUATE(THIS.ThermCaption)
|
||||
IF ((NOT ISNULL(THIS.ThermForm)) OR (THIS.CreateTherm()) )
|
||||
|
||||
WITH THIS.ThermForm
|
||||
|
||||
IF THIS.IsRunning
|
||||
.Closable = .F.
|
||||
.Movable = .F.
|
||||
ENDIF
|
||||
|
||||
.Therm.Value = CEILING(THIS.PercentDone * 100)
|
||||
.ThermLabel.Caption = m.lcCaption
|
||||
|
||||
IF NOT .Visible
|
||||
|
||||
m.loParentForm = THIS.GetParentWindowRef()
|
||||
|
||||
DO CASE
|
||||
CASE VARTYPE(m.loParentForm) # "O" AND (NOT _SCREEN.Visible)
|
||||
m.lcParentFormName = "MACDESKTOP"
|
||||
CASE VARTYPE(m.loParentForm) # "O"
|
||||
m.lcParentFormName = "SCREEN"
|
||||
CASE (NOT m.loParentForm.Visible) AND ;
|
||||
(m.loParentForm.DeskTop OR NOT EMPTY(m.loParentForm.MacDesktop) OR ;
|
||||
m.loParentForm.ShowWindow = 2 OR (NOT _SCREEN.Visible))
|
||||
m.lcParentFormName = "MACDESKTOP"
|
||||
CASE (NOT m.loParentForm.Visible)
|
||||
m.lcParentFormName = "SCREEN"
|
||||
OTHERWISE
|
||||
m.lcParentFormName = m.loParentForm.Name
|
||||
ENDCASE
|
||||
|
||||
SHOW WINDOW (.Name) IN WINDOW (m.lcParentFormName)
|
||||
.AlwaysOnTop = .T.
|
||||
.AutoCenter = .T.
|
||||
.Visible = .T.
|
||||
|
||||
ENDIF
|
||||
|
||||
ENDWITH
|
||||
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
endproc
|
||||
|
||||
*************************************
|
||||
procedure enable_print_assign(lValue)
|
||||
if Type('this.oPdf') = 'O'
|
||||
if not IsNull(this.oPdf)
|
||||
if Vartype(lValue) = 'L'
|
||||
this.oPdf.enable_print = m.lValue
|
||||
this.oPdf.SetPermission()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endproc
|
||||
|
||||
|
||||
************************************
|
||||
procedure enable_copy_assign(lValue)
|
||||
if Type('this.oPdf') = 'O'
|
||||
if not IsNull(this.oPdf)
|
||||
if Vartype(lValue) = 'L'
|
||||
this.oPdf.enable_copy = m.lValue
|
||||
this.oPdf.SetPermission()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endproc
|
||||
|
||||
enddefine
|
||||
BIN
COMUN/utile/hpdf/test.SCT
Normal file
BIN
COMUN/utile/hpdf/test.SCT
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/test.scx
Normal file
BIN
COMUN/utile/hpdf/test.scx
Normal file
Binary file not shown.
BIN
COMUN/utile/hpdf/unjpeg.jpg
Normal file
BIN
COMUN/utile/hpdf/unjpeg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
COMUN/utile/hpdf/unjpeg.png
Normal file
BIN
COMUN/utile/hpdf/unjpeg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user