mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 09:20:23 +02:00
LazReport, formalize the hyphenation support exception and make the editor sample ignore it
git-svn-id: trunk@40652 -
This commit is contained in:
parent
2d47913308
commit
04a1a5d3f9
@ -121,4 +121,11 @@
|
||||
</Other>
|
||||
<CompileReasons Run="False"/>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="1">
|
||||
<Item1>
|
||||
<Name Value="EHyphenationException"/>
|
||||
</Item1>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
@ -1764,7 +1764,7 @@ begin
|
||||
try
|
||||
FHyp.BreakWord('lazreport');
|
||||
except
|
||||
on E:Exception do
|
||||
on E:EHyphenationException do
|
||||
DebugLn('Error: ', e.message,'. Hyphenation support will be disabled');
|
||||
end;
|
||||
end;
|
||||
|
@ -42,6 +42,9 @@ const
|
||||
MAX_CHARS = 100;
|
||||
|
||||
type
|
||||
|
||||
EHyphenationException = class(Exception);
|
||||
|
||||
PHyphenTrans = ^HyphenTrans;
|
||||
HyphenTrans = record
|
||||
ch: char;
|
||||
@ -220,10 +223,10 @@ begin
|
||||
result := '';
|
||||
|
||||
if not CheckLibrary then
|
||||
raise Exception.Create('hyphen libarary not loaded');
|
||||
raise EHyphenationException.Create('hyphen libarary not loaded');
|
||||
|
||||
if not CheckDictionary then
|
||||
raise Exception.Create('hyphen dictionary not loaded');
|
||||
raise EHyphenationException.Create('hyphen dictionary not loaded');
|
||||
|
||||
len := Length(word);
|
||||
hyphens := StrAlloc(Len + 5);
|
||||
|
Loading…
Reference in New Issue
Block a user