* Protect all call to log functions/units by ifdef

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1118 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2010-01-06 23:54:23 +00:00
parent a1b9de2436
commit 013797b510
12 changed files with 684 additions and 673 deletions

View File

@@ -30,6 +30,7 @@
{$define EnableAlphaBlend} {$define EnableAlphaBlend}
{.$define EnableAccessible} {.$define EnableAccessible}
{$define ThemeSupport} {$define ThemeSupport}
{.$define DEBUG_VTV}
//under linux the performance is poor with threading enabled //under linux the performance is poor with threading enabled
{$ifdef Windows} {$ifdef Windows}

File diff suppressed because it is too large Load Diff

View File

@@ -58,9 +58,6 @@ begin
Inc(FCurrentIndex, CopyCount); Inc(FCurrentIndex, CopyCount);
Result := S_OK; Result := S_OK;
end; end;
//todo_lcl_check Delphi treats pceltFetched an PInteger. Implemented like in fpc.activex. What heappens with
// a C Program call with a NULL in pCeltFetcjed??
//Answer: Yes. Is necessary a check here
if pceltFetched <> nil then if pceltFetched <> nil then
pceltFetched^ := CopyCount; pceltFetched^ := CopyCount;
end; end;

View File

@@ -486,7 +486,7 @@ type
implementation implementation
uses uses
VirtualTrees, Controls, vtlogger; VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif};
type type
TVirtualTreeAccess = class (TBaseVirtualTree) TVirtualTreeAccess = class (TBaseVirtualTree)
@@ -504,77 +504,77 @@ function Failed(Status : HRESULT) : BOOLEAN;
function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function RevokeDragDrop(hwnd: HWND): WINOLEAPI; function RevokeDragDrop(hwnd: HWND): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource;
dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleInitialize(pvReserved: LPVOID): WINOLEAPI; function OleInitialize(pvReserved: LPVOID): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure OleUninitialize; procedure OleUninitialize;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); procedure ReleaseStgMedium(_para1: LPSTGMEDIUM);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleFlushClipboard: WINOLEAPI; function OleFlushClipboard: WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out
stm: IStream): WINOLEAPI; stm: IStream): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown;
_para3: DWORD; const _para4: TIID; out _para5): HRESULT; _para3: DWORD; const _para4: TIID; out _para5): HRESULT;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
@@ -611,8 +611,8 @@ var
VCLStream: TStream; VCLStream: TStream;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
VCLStream := nil; VCLStream := nil;
try try
@@ -678,8 +678,8 @@ type
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
end; end;
@@ -690,8 +690,8 @@ var
Data: Pointer; Data: Pointer;
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Medium.tymed = TYMED_ISTREAM then if Medium.tymed = TYMED_ISTREAM then
@@ -713,8 +713,8 @@ end;
procedure UnlockMediumData(Medium: TStgMedium); procedure UnlockMediumData(Medium: TStgMedium);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Medium.tymed = TYMED_HGLOBAL then if Medium.tymed = TYMED_HGLOBAL then
GlobalUnlock(Medium.hGlobal); GlobalUnlock(Medium.hGlobal);
@@ -729,8 +729,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Assigned(DataObject) then if Assigned(DataObject) then
@@ -755,8 +755,8 @@ function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL;
var var
P:Pointer; P:Pointer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize);
P := GlobalLock(Result); P := GlobalLock(Result);
@@ -779,8 +779,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -800,8 +800,8 @@ var
AClone: TEnumFormatEtc; AClone: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
try try
@@ -822,8 +822,8 @@ var
CopyCount: LongWord; CopyCount: LongWord;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_FALSE; Result := S_FALSE;
CopyCount := Length(FFormatEtcArray) - FCurrentIndex; CopyCount := Length(FFormatEtcArray) - FCurrentIndex;
@@ -848,8 +848,8 @@ end;
function TEnumFormatEtc.Reset: HResult; function TEnumFormatEtc.Reset: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FCurrentIndex := 0; FCurrentIndex := 0;
Result := S_OK; Result := S_OK;
@@ -861,8 +861,8 @@ end;
function TEnumFormatEtc.Skip(celt: LongWord): HResult; function TEnumFormatEtc.Skip(celt: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FCurrentIndex + celt < High(FFormatEtcArray) then if FCurrentIndex + celt < High(FFormatEtcArray) then
begin begin
@@ -880,8 +880,8 @@ end;
constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -900,8 +900,8 @@ var
StgMedium: PStgMedium; StgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Cancel a pending clipboard operation if this data object was created for the clipboard and // Cancel a pending clipboard operation if this data object was created for the clipboard and
// is freed because something else is placed there. // is freed because something else is placed there.
@@ -929,8 +929,8 @@ function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown;
// interface, will always return the same pointer. // interface, will always return the same pointer.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(TestUnknown) then if Assigned(TestUnknown) then
begin begin
@@ -949,8 +949,8 @@ end;
function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and
(FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and
@@ -967,8 +967,8 @@ var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := -1; Result := -1;
for I := 0 to High(FormatEtcArray) do for I := 0 to High(FormatEtcArray) do
@@ -989,8 +989,8 @@ function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium;
var var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
for I := 0 to High(InternalStgMediumArray) do for I := 0 to High(InternalStgMediumArray) do
@@ -1016,8 +1016,8 @@ var
NewData: PChar; NewData: PChar;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Size := GlobalSize(HGlobal); Size := GlobalSize(HGlobal);
Result := GlobalAlloc(GPTR, Size); Result := GlobalAlloc(GPTR, Size);
@@ -1047,8 +1047,8 @@ var
InternalMedium: PStgMedium; InternalMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := True; Result := True;
@@ -1079,8 +1079,8 @@ var
Len: Integer; Len: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
@@ -1150,8 +1150,8 @@ function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const a
// We use this interface and forward all concerning calls to it. // We use this interface and forward all concerning calls to it.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
if FAdviseHolder = nil then if FAdviseHolder = nil then
@@ -1166,8 +1166,8 @@ end;
function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; function TVTDataObject.DUnadvise(dwConnection: DWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := E_NOTIMPL Result := E_NOTIMPL
@@ -1181,8 +1181,8 @@ end;
function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := OLE_E_ADVISENOTSUPPORTED Result := OLE_E_ADVISENOTSUPPORTED
@@ -1199,8 +1199,8 @@ var
NewList: TEnumFormatEtc; NewList: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := E_FAIL; Result := E_FAIL;
if Direction = DATADIR_GET then if Direction = DATADIR_GET then
@@ -1221,8 +1221,8 @@ end;
Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DATA_S_SAMEFORMATETC; //Result := DATA_S_SAMEFORMATETC;
end; end;
@@ -1238,8 +1238,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// The tree reference format is always supported and returned from here. // The tree reference format is always supported and returned from here.
{ {
if FormatEtcIn.cfFormat = CF_VTREFERENCE then if FormatEtcIn.cfFormat = CF_VTREFERENCE then
@@ -1290,8 +1290,8 @@ end;
function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := E_NOTIMPL; //Result := E_NOTIMPL;
end; end;
@@ -1303,8 +1303,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := DV_E_CLIPFORMAT; Result := DV_E_CLIPFORMAT;
for I := 0 to High(FFormatEtcArray) do for I := 0 to High(FFormatEtcArray) do
@@ -1345,8 +1345,8 @@ var
LocalStgMedium: PStgMedium; LocalStgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// See if we already have a format of that type available. // See if we already have a format of that type available.
Index := FindFormatEtc(FormatEtc, FormatEtcArray); Index := FindFormatEtc(FormatEtc, FormatEtcArray);
@@ -1407,8 +1407,8 @@ end;
constructor TVTDragManager.Create(AOwner: TObject); constructor TVTDragManager.Create(AOwner: TObject);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
FOwner := AOwner; FOwner := AOwner;
@@ -1424,8 +1424,8 @@ end;
destructor TVTDragManager.Destroy; destructor TVTDragManager.Destroy;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Set the owner's reference to us to nil otherwise it will access an invalid pointer // Set the owner's reference to us to nil otherwise it will access an invalid pointer
// after our desctruction is complete. // after our desctruction is complete.
@@ -1439,8 +1439,8 @@ end;
function TVTDragManager.GetDataObject: IDataObject; function TVTDragManager.GetDataObject: IDataObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem.
// In this case there is no local reference to a data object and one is created (but not stored). // In this case there is no local reference to a data object and one is created (but not stored).
@@ -1462,8 +1462,8 @@ end;
function TVTDragManager.GetDragSource: TObject; function TVTDragManager.GetDragSource: TObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FDragSource; //Result := FDragSource;
end; end;
@@ -1472,8 +1472,8 @@ end;
function TVTDragManager.GetDropTargetHelperSupported: Boolean; function TVTDragManager.GetDropTargetHelperSupported: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := Assigned(FDropTargetHelper); //Result := Assigned(FDropTargetHelper);
end; end;
@@ -1482,8 +1482,8 @@ end;
function TVTDragManager.GetIsDropTarget: Boolean; function TVTDragManager.GetIsDropTarget: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FIsDropTarget; //Result := FIsDropTarget;
end; end;
@@ -1493,8 +1493,8 @@ function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongW
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FDataObject := DataObject; FDataObject := DataObject;
FIsDropTarget := True; FIsDropTarget := True;
@@ -1517,8 +1517,8 @@ end;
function TVTDragManager.DragLeave: HResult; function TVTDragManager.DragLeave: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1536,8 +1536,8 @@ end;
function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragOver(Pt, Effect); FDropTargetHelper.DragOver(Pt, Effect);
@@ -1552,8 +1552,8 @@ function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.Drop(DataObject, Pt, Effect); FDropTargetHelper.Drop(DataObject, Pt, Effect);
@@ -1573,8 +1573,8 @@ procedure TVTDragManager.ForceDragLeave;
// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). // screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE).
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1586,8 +1586,8 @@ end;
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: Integer): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DRAGDROP_S_USEDEFAULTCURSORS; //Result := DRAGDROP_S_USEDEFAULTCURSORS;
end; end;
@@ -1600,8 +1600,8 @@ var
LButton: Boolean; LButton: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
LButton := (KeyState and MK_LBUTTON) <> 0; LButton := (KeyState and MK_LBUTTON) <> 0;
RButton := (KeyState and MK_RBUTTON) <> 0; RButton := (KeyState and MK_RBUTTON) <> 0;

View File

@@ -27,8 +27,10 @@ type
implementation implementation
{$ifdef DEBUG_VTV}
uses uses
vtlogger; vtlogger;
{$endif}
{ TVirtualPanningWindow } { TVirtualPanningWindow }
@@ -49,7 +51,7 @@ end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage); {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
end; end;
end. end.

View File

@@ -486,7 +486,7 @@ type
implementation implementation
uses uses
VirtualTrees, Controls, vtlogger; VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif};
type type
TVirtualTreeAccess = class (TBaseVirtualTree) TVirtualTreeAccess = class (TBaseVirtualTree)
@@ -504,77 +504,77 @@ function Failed(Status : HRESULT) : BOOLEAN;
function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function RevokeDragDrop(hwnd: HWND): WINOLEAPI; function RevokeDragDrop(hwnd: HWND): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource;
dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleInitialize(pvReserved: LPVOID): WINOLEAPI; function OleInitialize(pvReserved: LPVOID): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure OleUninitialize; procedure OleUninitialize;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); procedure ReleaseStgMedium(_para1: LPSTGMEDIUM);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleFlushClipboard: WINOLEAPI; function OleFlushClipboard: WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out
stm: IStream): WINOLEAPI; stm: IStream): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown;
_para3: DWORD; const _para4: TIID; out _para5): HRESULT; _para3: DWORD; const _para4: TIID; out _para5): HRESULT;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
@@ -611,8 +611,8 @@ var
VCLStream: TStream; VCLStream: TStream;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
VCLStream := nil; VCLStream := nil;
try try
@@ -678,8 +678,8 @@ type
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
end; end;
@@ -690,8 +690,8 @@ var
Data: Pointer; Data: Pointer;
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Medium.tymed = TYMED_ISTREAM then if Medium.tymed = TYMED_ISTREAM then
@@ -713,8 +713,8 @@ end;
procedure UnlockMediumData(Medium: TStgMedium); procedure UnlockMediumData(Medium: TStgMedium);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Medium.tymed = TYMED_HGLOBAL then if Medium.tymed = TYMED_HGLOBAL then
GlobalUnlock(Medium.hGlobal); GlobalUnlock(Medium.hGlobal);
@@ -729,8 +729,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Assigned(DataObject) then if Assigned(DataObject) then
@@ -755,8 +755,8 @@ function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL;
var var
P:Pointer; P:Pointer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize);
P := GlobalLock(Result); P := GlobalLock(Result);
@@ -779,8 +779,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -800,8 +800,8 @@ var
AClone: TEnumFormatEtc; AClone: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
try try
@@ -822,8 +822,8 @@ var
CopyCount: LongWord; CopyCount: LongWord;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_FALSE; Result := S_FALSE;
CopyCount := Length(FFormatEtcArray) - FCurrentIndex; CopyCount := Length(FFormatEtcArray) - FCurrentIndex;
@@ -848,8 +848,8 @@ end;
function TEnumFormatEtc.Reset: HResult; function TEnumFormatEtc.Reset: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FCurrentIndex := 0; FCurrentIndex := 0;
Result := S_OK; Result := S_OK;
@@ -861,8 +861,8 @@ end;
function TEnumFormatEtc.Skip(celt: LongWord): HResult; function TEnumFormatEtc.Skip(celt: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FCurrentIndex + celt < High(FFormatEtcArray) then if FCurrentIndex + celt < High(FFormatEtcArray) then
begin begin
@@ -880,8 +880,8 @@ end;
constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -900,8 +900,8 @@ var
StgMedium: PStgMedium; StgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Cancel a pending clipboard operation if this data object was created for the clipboard and // Cancel a pending clipboard operation if this data object was created for the clipboard and
// is freed because something else is placed there. // is freed because something else is placed there.
@@ -929,8 +929,8 @@ function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown;
// interface, will always return the same pointer. // interface, will always return the same pointer.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(TestUnknown) then if Assigned(TestUnknown) then
begin begin
@@ -949,8 +949,8 @@ end;
function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and
(FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and
@@ -967,8 +967,8 @@ var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := -1; Result := -1;
for I := 0 to High(FormatEtcArray) do for I := 0 to High(FormatEtcArray) do
@@ -989,8 +989,8 @@ function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium;
var var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
for I := 0 to High(InternalStgMediumArray) do for I := 0 to High(InternalStgMediumArray) do
@@ -1016,8 +1016,8 @@ var
NewData: PChar; NewData: PChar;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Size := GlobalSize(HGlobal); Size := GlobalSize(HGlobal);
Result := GlobalAlloc(GPTR, Size); Result := GlobalAlloc(GPTR, Size);
@@ -1047,8 +1047,8 @@ var
InternalMedium: PStgMedium; InternalMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := True; Result := True;
@@ -1079,8 +1079,8 @@ var
Len: Integer; Len: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
@@ -1150,8 +1150,8 @@ function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const a
// We use this interface and forward all concerning calls to it. // We use this interface and forward all concerning calls to it.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
if FAdviseHolder = nil then if FAdviseHolder = nil then
@@ -1166,8 +1166,8 @@ end;
function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; function TVTDataObject.DUnadvise(dwConnection: DWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := E_NOTIMPL Result := E_NOTIMPL
@@ -1181,8 +1181,8 @@ end;
function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := OLE_E_ADVISENOTSUPPORTED Result := OLE_E_ADVISENOTSUPPORTED
@@ -1199,8 +1199,8 @@ var
NewList: TEnumFormatEtc; NewList: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := E_FAIL; Result := E_FAIL;
if Direction = DATADIR_GET then if Direction = DATADIR_GET then
@@ -1221,8 +1221,8 @@ end;
Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DATA_S_SAMEFORMATETC; //Result := DATA_S_SAMEFORMATETC;
end; end;
@@ -1238,8 +1238,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// The tree reference format is always supported and returned from here. // The tree reference format is always supported and returned from here.
{ {
if FormatEtcIn.cfFormat = CF_VTREFERENCE then if FormatEtcIn.cfFormat = CF_VTREFERENCE then
@@ -1290,8 +1290,8 @@ end;
function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := E_NOTIMPL; //Result := E_NOTIMPL;
end; end;
@@ -1303,8 +1303,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := DV_E_CLIPFORMAT; Result := DV_E_CLIPFORMAT;
for I := 0 to High(FFormatEtcArray) do for I := 0 to High(FFormatEtcArray) do
@@ -1345,8 +1345,8 @@ var
LocalStgMedium: PStgMedium; LocalStgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// See if we already have a format of that type available. // See if we already have a format of that type available.
Index := FindFormatEtc(FormatEtc, FormatEtcArray); Index := FindFormatEtc(FormatEtc, FormatEtcArray);
@@ -1407,8 +1407,8 @@ end;
constructor TVTDragManager.Create(AOwner: TObject); constructor TVTDragManager.Create(AOwner: TObject);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
FOwner := AOwner; FOwner := AOwner;
@@ -1424,8 +1424,8 @@ end;
destructor TVTDragManager.Destroy; destructor TVTDragManager.Destroy;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Set the owner's reference to us to nil otherwise it will access an invalid pointer // Set the owner's reference to us to nil otherwise it will access an invalid pointer
// after our desctruction is complete. // after our desctruction is complete.
@@ -1439,8 +1439,8 @@ end;
function TVTDragManager.GetDataObject: IDataObject; function TVTDragManager.GetDataObject: IDataObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem.
// In this case there is no local reference to a data object and one is created (but not stored). // In this case there is no local reference to a data object and one is created (but not stored).
@@ -1462,8 +1462,8 @@ end;
function TVTDragManager.GetDragSource: TObject; function TVTDragManager.GetDragSource: TObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FDragSource; //Result := FDragSource;
end; end;
@@ -1472,8 +1472,8 @@ end;
function TVTDragManager.GetDropTargetHelperSupported: Boolean; function TVTDragManager.GetDropTargetHelperSupported: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := Assigned(FDropTargetHelper); //Result := Assigned(FDropTargetHelper);
end; end;
@@ -1482,8 +1482,8 @@ end;
function TVTDragManager.GetIsDropTarget: Boolean; function TVTDragManager.GetIsDropTarget: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FIsDropTarget; //Result := FIsDropTarget;
end; end;
@@ -1493,8 +1493,8 @@ function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongW
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FDataObject := DataObject; FDataObject := DataObject;
FIsDropTarget := True; FIsDropTarget := True;
@@ -1517,8 +1517,8 @@ end;
function TVTDragManager.DragLeave: HResult; function TVTDragManager.DragLeave: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1536,8 +1536,8 @@ end;
function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragOver(Pt, Effect); FDropTargetHelper.DragOver(Pt, Effect);
@@ -1552,8 +1552,8 @@ function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.Drop(DataObject, Pt, Effect); FDropTargetHelper.Drop(DataObject, Pt, Effect);
@@ -1573,8 +1573,8 @@ procedure TVTDragManager.ForceDragLeave;
// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). // screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE).
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1586,8 +1586,8 @@ end;
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: Integer): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DRAGDROP_S_USEDEFAULTCURSORS; //Result := DRAGDROP_S_USEDEFAULTCURSORS;
end; end;
@@ -1600,8 +1600,8 @@ var
LButton: Boolean; LButton: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
LButton := (KeyState and MK_LBUTTON) <> 0; LButton := (KeyState and MK_LBUTTON) <> 0;
RButton := (KeyState and MK_RBUTTON) <> 0; RButton := (KeyState and MK_RBUTTON) <> 0;

View File

@@ -27,8 +27,10 @@ type
implementation implementation
{$ifdef DEBUG_VTV}
uses uses
vtlogger; vtlogger;
{$endif}
{ TVirtualPanningWindow } { TVirtualPanningWindow }
@@ -49,7 +51,7 @@ end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage); {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
end; end;
end. end.

View File

@@ -486,7 +486,7 @@ type
implementation implementation
uses uses
VirtualTrees, Controls, vtlogger; VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger{$endif};
type type
TVirtualTreeAccess = class (TBaseVirtualTree) TVirtualTreeAccess = class (TBaseVirtualTree)
@@ -504,77 +504,77 @@ function Failed(Status : HRESULT) : BOOLEAN;
function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function RevokeDragDrop(hwnd: HWND): WINOLEAPI; function RevokeDragDrop(hwnd: HWND): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource;
dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleInitialize(pvReserved: LPVOID): WINOLEAPI; function OleInitialize(pvReserved: LPVOID): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure OleUninitialize; procedure OleUninitialize;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); procedure ReleaseStgMedium(_para1: LPSTGMEDIUM);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleFlushClipboard: WINOLEAPI; function OleFlushClipboard: WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out
stm: IStream): WINOLEAPI; stm: IStream): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown;
_para3: DWORD; const _para4: TIID; out _para5): HRESULT; _para3: DWORD; const _para4: TIID; out _para5): HRESULT;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
@@ -611,8 +611,8 @@ var
VCLStream: TStream; VCLStream: TStream;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
VCLStream := nil; VCLStream := nil;
try try
@@ -678,8 +678,8 @@ type
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
end; end;
@@ -690,8 +690,8 @@ var
Data: Pointer; Data: Pointer;
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Medium.tymed = TYMED_ISTREAM then if Medium.tymed = TYMED_ISTREAM then
@@ -713,8 +713,8 @@ end;
procedure UnlockMediumData(Medium: TStgMedium); procedure UnlockMediumData(Medium: TStgMedium);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Medium.tymed = TYMED_HGLOBAL then if Medium.tymed = TYMED_HGLOBAL then
GlobalUnlock(Medium.hGlobal); GlobalUnlock(Medium.hGlobal);
@@ -729,8 +729,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Assigned(DataObject) then if Assigned(DataObject) then
@@ -755,8 +755,8 @@ function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL;
var var
P:Pointer; P:Pointer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize);
P := GlobalLock(Result); P := GlobalLock(Result);
@@ -779,8 +779,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -800,8 +800,8 @@ var
AClone: TEnumFormatEtc; AClone: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
try try
@@ -822,8 +822,8 @@ var
CopyCount: LongWord; CopyCount: LongWord;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_FALSE; Result := S_FALSE;
CopyCount := Length(FFormatEtcArray) - FCurrentIndex; CopyCount := Length(FFormatEtcArray) - FCurrentIndex;
@@ -848,8 +848,8 @@ end;
function TEnumFormatEtc.Reset: HResult; function TEnumFormatEtc.Reset: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FCurrentIndex := 0; FCurrentIndex := 0;
Result := S_OK; Result := S_OK;
@@ -861,8 +861,8 @@ end;
function TEnumFormatEtc.Skip(celt: LongWord): HResult; function TEnumFormatEtc.Skip(celt: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FCurrentIndex + celt < High(FFormatEtcArray) then if FCurrentIndex + celt < High(FFormatEtcArray) then
begin begin
@@ -880,8 +880,8 @@ end;
constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -900,8 +900,8 @@ var
StgMedium: PStgMedium; StgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Cancel a pending clipboard operation if this data object was created for the clipboard and // Cancel a pending clipboard operation if this data object was created for the clipboard and
// is freed because something else is placed there. // is freed because something else is placed there.
@@ -929,8 +929,8 @@ function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown;
// interface, will always return the same pointer. // interface, will always return the same pointer.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(TestUnknown) then if Assigned(TestUnknown) then
begin begin
@@ -949,8 +949,8 @@ end;
function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and
(FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and
@@ -967,8 +967,8 @@ var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := -1; Result := -1;
for I := 0 to High(FormatEtcArray) do for I := 0 to High(FormatEtcArray) do
@@ -989,8 +989,8 @@ function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium;
var var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
for I := 0 to High(InternalStgMediumArray) do for I := 0 to High(InternalStgMediumArray) do
@@ -1016,8 +1016,8 @@ var
NewData: PChar; NewData: PChar;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Size := GlobalSize(HGlobal); Size := GlobalSize(HGlobal);
Result := GlobalAlloc(GPTR, Size); Result := GlobalAlloc(GPTR, Size);
@@ -1047,8 +1047,8 @@ var
InternalMedium: PStgMedium; InternalMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := True; Result := True;
@@ -1079,8 +1079,8 @@ var
Len: Integer; Len: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
@@ -1150,8 +1150,8 @@ function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const a
// We use this interface and forward all concerning calls to it. // We use this interface and forward all concerning calls to it.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
if FAdviseHolder = nil then if FAdviseHolder = nil then
@@ -1166,8 +1166,8 @@ end;
function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; function TVTDataObject.DUnadvise(dwConnection: DWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := E_NOTIMPL Result := E_NOTIMPL
@@ -1181,8 +1181,8 @@ end;
function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := OLE_E_ADVISENOTSUPPORTED Result := OLE_E_ADVISENOTSUPPORTED
@@ -1199,8 +1199,8 @@ var
NewList: TEnumFormatEtc; NewList: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := E_FAIL; Result := E_FAIL;
if Direction = DATADIR_GET then if Direction = DATADIR_GET then
@@ -1221,8 +1221,8 @@ end;
Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DATA_S_SAMEFORMATETC; //Result := DATA_S_SAMEFORMATETC;
end; end;
@@ -1238,8 +1238,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// The tree reference format is always supported and returned from here. // The tree reference format is always supported and returned from here.
{ {
if FormatEtcIn.cfFormat = CF_VTREFERENCE then if FormatEtcIn.cfFormat = CF_VTREFERENCE then
@@ -1290,8 +1290,8 @@ end;
function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := E_NOTIMPL; //Result := E_NOTIMPL;
end; end;
@@ -1303,8 +1303,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := DV_E_CLIPFORMAT; Result := DV_E_CLIPFORMAT;
for I := 0 to High(FFormatEtcArray) do for I := 0 to High(FFormatEtcArray) do
@@ -1345,8 +1345,8 @@ var
LocalStgMedium: PStgMedium; LocalStgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// See if we already have a format of that type available. // See if we already have a format of that type available.
Index := FindFormatEtc(FormatEtc, FormatEtcArray); Index := FindFormatEtc(FormatEtc, FormatEtcArray);
@@ -1407,8 +1407,8 @@ end;
constructor TVTDragManager.Create(AOwner: TObject); constructor TVTDragManager.Create(AOwner: TObject);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
FOwner := AOwner; FOwner := AOwner;
@@ -1424,8 +1424,8 @@ end;
destructor TVTDragManager.Destroy; destructor TVTDragManager.Destroy;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Set the owner's reference to us to nil otherwise it will access an invalid pointer // Set the owner's reference to us to nil otherwise it will access an invalid pointer
// after our desctruction is complete. // after our desctruction is complete.
@@ -1439,8 +1439,8 @@ end;
function TVTDragManager.GetDataObject: IDataObject; function TVTDragManager.GetDataObject: IDataObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem.
// In this case there is no local reference to a data object and one is created (but not stored). // In this case there is no local reference to a data object and one is created (but not stored).
@@ -1462,8 +1462,8 @@ end;
function TVTDragManager.GetDragSource: TObject; function TVTDragManager.GetDragSource: TObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FDragSource; //Result := FDragSource;
end; end;
@@ -1472,8 +1472,8 @@ end;
function TVTDragManager.GetDropTargetHelperSupported: Boolean; function TVTDragManager.GetDropTargetHelperSupported: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := Assigned(FDropTargetHelper); //Result := Assigned(FDropTargetHelper);
end; end;
@@ -1482,8 +1482,8 @@ end;
function TVTDragManager.GetIsDropTarget: Boolean; function TVTDragManager.GetIsDropTarget: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FIsDropTarget; //Result := FIsDropTarget;
end; end;
@@ -1493,8 +1493,8 @@ function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongW
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FDataObject := DataObject; FDataObject := DataObject;
FIsDropTarget := True; FIsDropTarget := True;
@@ -1517,8 +1517,8 @@ end;
function TVTDragManager.DragLeave: HResult; function TVTDragManager.DragLeave: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1536,8 +1536,8 @@ end;
function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragOver(Pt, Effect); FDropTargetHelper.DragOver(Pt, Effect);
@@ -1552,8 +1552,8 @@ function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.Drop(DataObject, Pt, Effect); FDropTargetHelper.Drop(DataObject, Pt, Effect);
@@ -1573,8 +1573,8 @@ procedure TVTDragManager.ForceDragLeave;
// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). // screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE).
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1586,8 +1586,8 @@ end;
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: Integer): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DRAGDROP_S_USEDEFAULTCURSORS; //Result := DRAGDROP_S_USEDEFAULTCURSORS;
end; end;
@@ -1600,8 +1600,8 @@ var
LButton: Boolean; LButton: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
LButton := (KeyState and MK_LBUTTON) <> 0; LButton := (KeyState and MK_LBUTTON) <> 0;
RButton := (KeyState and MK_RBUTTON) <> 0; RButton := (KeyState and MK_RBUTTON) <> 0;

View File

@@ -27,8 +27,10 @@ type
implementation implementation
{$ifdef DEBUG_VTV}
uses uses
vtlogger; vtlogger;
{$endif}
{ TVirtualPanningWindow } { TVirtualPanningWindow }
@@ -49,7 +51,7 @@ end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage); {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
end; end;
end. end.

View File

@@ -486,7 +486,7 @@ type
implementation implementation
uses uses
VirtualTrees, Controls, vtlogger; VirtualTrees, Controls {$ifdef DEBUG_VTV}, vtlogger {$endif};
type type
TVirtualTreeAccess = class (TBaseVirtualTree) TVirtualTreeAccess = class (TBaseVirtualTree)
@@ -504,77 +504,77 @@ function Failed(Status : HRESULT) : BOOLEAN;
function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI; function RegisterDragDrop(hwnd: HWND; pDropTarget: IDropTarget): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function RevokeDragDrop(hwnd: HWND): WINOLEAPI; function RevokeDragDrop(hwnd: HWND): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource; function DoDragDrop(pDataObj: IDataObject; pDropSource: IDropSource;
dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI; dwOKEffects: DWORD; pdwEffect: LPDWORD): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleInitialize(pvReserved: LPVOID): WINOLEAPI; function OleInitialize(pvReserved: LPVOID): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure OleUninitialize; procedure OleUninitialize;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
procedure ReleaseStgMedium(_para1: LPSTGMEDIUM); procedure ReleaseStgMedium(_para1: LPSTGMEDIUM);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI; function OleSetClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI; function OleGetClipboard(out ppDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleFlushClipboard: WINOLEAPI; function OleFlushClipboard: WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI; function OleIsCurrentClipboard(pDataObj: IDataObject): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out function CreateStreamOnHGlobal(hGlobal: HGLOBAL; fDeleteOnRelease: BOOL; out
stm: IStream): WINOLEAPI; stm: IStream): WINOLEAPI;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown; function CoCreateInstance(const _para1: TCLSID; _para2: IUnknown;
_para3: DWORD; const _para4: TIID; out _para5): HRESULT; _para3: DWORD; const _para4: TIID; out _para5): HRESULT;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
end; end;
@@ -611,8 +611,8 @@ var
VCLStream: TStream; VCLStream: TStream;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
VCLStream := nil; VCLStream := nil;
try try
@@ -678,8 +678,8 @@ type
function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer; function TOLEMemoryStream.Write(const Buffer; Count: Integer): Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError)); // raise EStreamError.CreateRes(PResStringRec(@SCantWriteResourceStreamError));
end; end;
@@ -690,8 +690,8 @@ var
Data: Pointer; Data: Pointer;
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Medium.tymed = TYMED_ISTREAM then if Medium.tymed = TYMED_ISTREAM then
@@ -713,8 +713,8 @@ end;
procedure UnlockMediumData(Medium: TStgMedium); procedure UnlockMediumData(Medium: TStgMedium);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Medium.tymed = TYMED_HGLOBAL then if Medium.tymed = TYMED_HGLOBAL then
GlobalUnlock(Medium.hGlobal); GlobalUnlock(Medium.hGlobal);
@@ -729,8 +729,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
if Assigned(DataObject) then if Assigned(DataObject) then
@@ -755,8 +755,8 @@ function AllocateGlobal(Data: Pointer; DataSize: Cardinal): HGLOBAL;
var var
P:Pointer; P:Pointer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize); Result := GlobalAlloc(GHND or GMEM_SHARE, DataSize);
P := GlobalLock(Result); P := GlobalLock(Result);
@@ -779,8 +779,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -800,8 +800,8 @@ var
AClone: TEnumFormatEtc; AClone: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
try try
@@ -822,8 +822,8 @@ var
CopyCount: LongWord; CopyCount: LongWord;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_FALSE; Result := S_FALSE;
CopyCount := Length(FFormatEtcArray) - FCurrentIndex; CopyCount := Length(FFormatEtcArray) - FCurrentIndex;
@@ -848,8 +848,8 @@ end;
function TEnumFormatEtc.Reset: HResult; function TEnumFormatEtc.Reset: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FCurrentIndex := 0; FCurrentIndex := 0;
Result := S_OK; Result := S_OK;
@@ -861,8 +861,8 @@ end;
function TEnumFormatEtc.Skip(celt: LongWord): HResult; function TEnumFormatEtc.Skip(celt: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FCurrentIndex + celt < High(FFormatEtcArray) then if FCurrentIndex + celt < High(FFormatEtcArray) then
begin begin
@@ -880,8 +880,8 @@ end;
constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean); constructor TVTDataObject.Create(AOwner: TObject; ForClipboard: Boolean);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
@@ -900,8 +900,8 @@ var
StgMedium: PStgMedium; StgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Cancel a pending clipboard operation if this data object was created for the clipboard and // Cancel a pending clipboard operation if this data object was created for the clipboard and
// is freed because something else is placed there. // is freed because something else is placed there.
@@ -929,8 +929,8 @@ function TVTDataObject.CanonicalIUnknown(TestUnknown: IUnknown): IUnknown;
// interface, will always return the same pointer. // interface, will always return the same pointer.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(TestUnknown) then if Assigned(TestUnknown) then
begin begin
@@ -949,8 +949,8 @@ end;
function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean; function TVTDataObject.EqualFormatEtc(FormatEtc1, FormatEtc2: TFormatEtc): Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and Result := (FormatEtc1.cfFormat = FormatEtc2.cfFormat) and (FormatEtc1.ptd = FormatEtc2.ptd) and
(FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and (FormatEtc1.dwAspect = FormatEtc2.dwAspect) and (FormatEtc1.lindex = FormatEtc2.lindex) and
@@ -967,8 +967,8 @@ var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := -1; Result := -1;
for I := 0 to High(FormatEtcArray) do for I := 0 to High(FormatEtcArray) do
@@ -989,8 +989,8 @@ function TVTDataObject.FindInternalStgMedium(Format: TClipFormat): PStgMedium;
var var
I: integer; I: integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := nil; Result := nil;
for I := 0 to High(InternalStgMediumArray) do for I := 0 to High(InternalStgMediumArray) do
@@ -1016,8 +1016,8 @@ var
NewData: PChar; NewData: PChar;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Size := GlobalSize(HGlobal); Size := GlobalSize(HGlobal);
Result := GlobalAlloc(GPTR, Size); Result := GlobalAlloc(GPTR, Size);
@@ -1047,8 +1047,8 @@ var
InternalMedium: PStgMedium; InternalMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := True; Result := True;
@@ -1079,8 +1079,8 @@ var
Len: Integer; Len: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
@@ -1150,8 +1150,8 @@ function TVTDataObject.DAdvise(const FormatEtc: TFormatEtc; advf: DWord; const a
// We use this interface and forward all concerning calls to it. // We use this interface and forward all concerning calls to it.
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := S_OK; Result := S_OK;
if FAdviseHolder = nil then if FAdviseHolder = nil then
@@ -1166,8 +1166,8 @@ end;
function TVTDataObject.DUnadvise(dwConnection: DWord): HResult; function TVTDataObject.DUnadvise(dwConnection: DWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := E_NOTIMPL Result := E_NOTIMPL
@@ -1181,8 +1181,8 @@ end;
function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult; function TVTDataObject.EnumDAvise(Out enumAdvise : IEnumStatData):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if FAdviseHolder = nil then if FAdviseHolder = nil then
Result := OLE_E_ADVISENOTSUPPORTED Result := OLE_E_ADVISENOTSUPPORTED
@@ -1199,8 +1199,8 @@ var
NewList: TEnumFormatEtc; NewList: TEnumFormatEtc;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := E_FAIL; Result := E_FAIL;
if Direction = DATADIR_GET then if Direction = DATADIR_GET then
@@ -1221,8 +1221,8 @@ end;
Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; Function TVTDataObject.GetCanonicalFormatTEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DATA_S_SAMEFORMATETC; //Result := DATA_S_SAMEFORMATETC;
end; end;
@@ -1238,8 +1238,8 @@ var
Data: PVTReference; Data: PVTReference;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
// The tree reference format is always supported and returned from here. // The tree reference format is always supported and returned from here.
{ {
if FormatEtcIn.cfFormat = CF_VTREFERENCE then if FormatEtcIn.cfFormat = CF_VTREFERENCE then
@@ -1290,8 +1290,8 @@ end;
function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult; function TVTDataObject.GetDataHere(const FormatEtc: TFormatEtc; out Medium: TStgMedium): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := E_NOTIMPL; //Result := E_NOTIMPL;
end; end;
@@ -1303,8 +1303,8 @@ var
I: Integer; I: Integer;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
Result := DV_E_CLIPFORMAT; Result := DV_E_CLIPFORMAT;
for I := 0 to High(FFormatEtcArray) do for I := 0 to High(FFormatEtcArray) do
@@ -1345,8 +1345,8 @@ var
LocalStgMedium: PStgMedium; LocalStgMedium: PStgMedium;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// See if we already have a format of that type available. // See if we already have a format of that type available.
Index := FindFormatEtc(FormatEtc, FormatEtcArray); Index := FindFormatEtc(FormatEtc, FormatEtcArray);
@@ -1407,8 +1407,8 @@ end;
constructor TVTDragManager.Create(AOwner: TObject); constructor TVTDragManager.Create(AOwner: TObject);
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
inherited Create; inherited Create;
FOwner := AOwner; FOwner := AOwner;
@@ -1424,8 +1424,8 @@ end;
destructor TVTDragManager.Destroy; destructor TVTDragManager.Destroy;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// Set the owner's reference to us to nil otherwise it will access an invalid pointer // Set the owner's reference to us to nil otherwise it will access an invalid pointer
// after our desctruction is complete. // after our desctruction is complete.
@@ -1439,8 +1439,8 @@ end;
function TVTDragManager.GetDataObject: IDataObject; function TVTDragManager.GetDataObject: IDataObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
// When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem. // When the owner tree starts a drag operation then it gets a data object here to pass it to the OLE subsystem.
// In this case there is no local reference to a data object and one is created (but not stored). // In this case there is no local reference to a data object and one is created (but not stored).
@@ -1462,8 +1462,8 @@ end;
function TVTDragManager.GetDragSource: TObject; function TVTDragManager.GetDragSource: TObject;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FDragSource; //Result := FDragSource;
end; end;
@@ -1472,8 +1472,8 @@ end;
function TVTDragManager.GetDropTargetHelperSupported: Boolean; function TVTDragManager.GetDropTargetHelperSupported: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := Assigned(FDropTargetHelper); //Result := Assigned(FDropTargetHelper);
end; end;
@@ -1482,8 +1482,8 @@ end;
function TVTDragManager.GetIsDropTarget: Boolean; function TVTDragManager.GetIsDropTarget: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := FIsDropTarget; //Result := FIsDropTarget;
end; end;
@@ -1493,8 +1493,8 @@ function TVTDragManager.DragEnter(const DataObject: IDataObject; KeyState: LongW
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
FDataObject := DataObject; FDataObject := DataObject;
FIsDropTarget := True; FIsDropTarget := True;
@@ -1517,8 +1517,8 @@ end;
function TVTDragManager.DragLeave: HResult; function TVTDragManager.DragLeave: HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1536,8 +1536,8 @@ end;
function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult; function TVTDragManager.DragOver(KeyState: LongWord; Pt: TPoint; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragOver(Pt, Effect); FDropTargetHelper.DragOver(Pt, Effect);
@@ -1552,8 +1552,8 @@ function TVTDragManager.Drop(const DataObject: IDataObject; KeyState: LongWord;
var Effect: LongWord): HResult; var Effect: LongWord): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.Drop(DataObject, Pt, Effect); FDropTargetHelper.Drop(DataObject, Pt, Effect);
@@ -1573,8 +1573,8 @@ procedure TVTDragManager.ForceDragLeave;
// screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE). // screen. Unfortunately, sometimes not even this does help (e.g. when dragging text from VT to a text field in IE).
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
if Assigned(FDropTargetHelper) and FFullDragging then if Assigned(FDropTargetHelper) and FFullDragging then
FDropTargetHelper.DragLeave; FDropTargetHelper.DragLeave;
@@ -1586,8 +1586,8 @@ end;
function TVTDragManager.GiveFeedback(Effect: Integer): HResult; function TVTDragManager.GiveFeedback(Effect: Integer): HResult;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
//Result := DRAGDROP_S_USEDEFAULTCURSORS; //Result := DRAGDROP_S_USEDEFAULTCURSORS;
end; end;
@@ -1600,8 +1600,8 @@ var
LButton: Boolean; LButton: Boolean;
begin begin
Logger.SendError([lcOle],'Ole function called in Linux'); {$ifdef DEBUG_VTV}Logger.SendError([lcOle],'Ole function called in Linux');{$endif}
Logger.SendCallStack([lcOle],'Stack'); {$ifdef DEBUG_VTV}Logger.SendCallStack([lcOle],'Stack');{$endif}
{ {
LButton := (KeyState and MK_LBUTTON) <> 0; LButton := (KeyState and MK_LBUTTON) <> 0;
RButton := (KeyState and MK_RBUTTON) <> 0; RButton := (KeyState and MK_RBUTTON) <> 0;

View File

@@ -27,8 +27,10 @@ type
implementation implementation
{$ifdef DEBUG_VTV}
uses uses
vtlogger; vtlogger;
{$endif}
{ TVirtualPanningWindow } { TVirtualPanningWindow }
@@ -49,7 +51,7 @@ end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage); {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
end; end;
end. end.

View File

@@ -27,9 +27,11 @@ type
implementation implementation
{$ifdef DEBUG_VTV}
uses uses
vtlogger; vtlogger;
{$endif}
function PanningWindowProc(Window: HWnd; Msg: UInt;WPara: WParam; LPara: LParam): LResult; stdcall; function PanningWindowProc(Window: HWnd; Msg: UInt;WPara: WParam; LPara: LParam): LResult; stdcall;
var var
PanningObject: TVirtualPanningWindow; PanningObject: TVirtualPanningWindow;
@@ -101,7 +103,7 @@ end;
procedure TVirtualPanningWindow.Show(ClipRegion: HRGN); procedure TVirtualPanningWindow.Show(ClipRegion: HRGN);
begin begin
Logger.SendBitmap([lcPanning],'Panning Image',FImage); {$ifdef DEBUG_VTV}Logger.SendBitmap([lcPanning],'Panning Image',FImage);{$endif}
//todo: move SetWindowRgn to DelphiCompat //todo: move SetWindowRgn to DelphiCompat
SetWindowRgn(FHandle, ClipRegion, False); SetWindowRgn(FHandle, ClipRegion, False);
ShowWindow(FHandle, SW_SHOWNOACTIVATE); ShowWindow(FHandle, SW_SHOWNOACTIVATE);