|
From: <na...@us...> - 2009-08-14 07:23:07
|
Revision: 823
http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=823&view=rev
Author: nandod
Date: 2009-08-14 07:22:59 +0000 (Fri, 14 Aug 2009)
Log Message:
-----------
* D2009: Fixed error "implementation expected" when adding the first class to an otherwise empty model unit at design time.
Modified Paths:
--------------
trunk/Source/Core/InstantCode.pas
Modified: trunk/Source/Core/InstantCode.pas
===================================================================
--- trunk/Source/Core/InstantCode.pas 2009-08-14 07:18:46 UTC (rev 822)
+++ trunk/Source/Core/InstantCode.pas 2009-08-14 07:22:59 UTC (rev 823)
@@ -24,7 +24,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- * Carlo Barazzetta, Adrea Petrelli, Nando Dessena, Steven Mitchell,
+ * Carlo Barazzetta, Andrea Petrelli, Nando Dessena, Steven Mitchell,
* Uberto Barbini, Joao Morais, Riceball Lee, Brian Andersen
*
* ***** END LICENSE BLOCK ***** *)
@@ -6520,7 +6520,7 @@
function TInstantCodeWriter.GetStreamPos: Int64;
begin
- Result := inherited GetStreamPos + Origin.Offset;
+ Result := inherited GetStreamPos + (Origin.Offset * SizeOf(Char));
end;
procedure TInstantCodeWriter.Indent;
@@ -6536,7 +6536,7 @@
procedure TInstantCodeWriter.SetStreamPos(Value: Int64);
begin
- inherited SetStreamPos(Value - Origin.Offset);
+ inherited SetStreamPos(Value - (Origin.Offset * SizeOf(Char)));
end;
procedure TInstantCodeWriter.Unindent;
@@ -8631,6 +8631,7 @@
try
Writer := TInstantCodeWriter.Create(Stream);
try
+ Writer.Origin := CursorPos;
while IndentLevel > 0 do
begin
Writer.Indent;
|