Division by zero when dragging application

General TRichView support forum. Please post your questions here
Post Reply
CGM
Posts: 4
Joined: Thu May 03, 2012 3:04 pm
Location: Uppsala - Sweden

Division by zero when dragging application

Post by CGM »

Hi

I get Division by zero when I drag a application to a monitor with scale 125% from a monitor with scale 100%.
The error only occurs when TRichViewEdit.WordWrap := False and TAB occurs in text.

RichViewEdit1.WordWrap := False;
RichViewEdit1.InsertText('Kalle '#9'Olle'#$D#$A);

I found some strange code in CRVFData.pas at line 6192:
LineStartX := RV_XToDevice(GetLeftMargin, TmpSad) + LeftIndent + FirstIndent;

If the parameter "sad" to TCustomRVFormattedData.CalculateMinItemsWidthNoWrap is not "nil" the local var "TmpSad" (TRVScreenAndDevice) is not initialied. Se attached application.

Using Using TRichView v23.0.1
Attachments
TestRichView1.zip
(6.57 KiB) Downloaded 5 times
Sergey Tkachenko
Site Admin
Posts: 17945
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Division by zero when dragging application

Post by Sergey Tkachenko »

I confirm the problem (that occurs only in no-wrap paragraphs with tabs).
Of course, it must be

Code: Select all

LineStartX := RV_XToDevice(GetLeftMargin, sad^) + LeftIndent + FirstIndent;
Post Reply