mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 14:38:16 +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>
|
</Other>
|
||||||
<CompileReasons Run="False"/>
|
<CompileReasons Run="False"/>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="1">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EHyphenationException"/>
|
||||||
|
</Item1>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -1764,7 +1764,7 @@ begin
|
|||||||
try
|
try
|
||||||
FHyp.BreakWord('lazreport');
|
FHyp.BreakWord('lazreport');
|
||||||
except
|
except
|
||||||
on E:Exception do
|
on E:EHyphenationException do
|
||||||
DebugLn('Error: ', e.message,'. Hyphenation support will be disabled');
|
DebugLn('Error: ', e.message,'. Hyphenation support will be disabled');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -42,6 +42,9 @@ const
|
|||||||
MAX_CHARS = 100;
|
MAX_CHARS = 100;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
EHyphenationException = class(Exception);
|
||||||
|
|
||||||
PHyphenTrans = ^HyphenTrans;
|
PHyphenTrans = ^HyphenTrans;
|
||||||
HyphenTrans = record
|
HyphenTrans = record
|
||||||
ch: char;
|
ch: char;
|
||||||
@ -220,10 +223,10 @@ begin
|
|||||||
result := '';
|
result := '';
|
||||||
|
|
||||||
if not CheckLibrary then
|
if not CheckLibrary then
|
||||||
raise Exception.Create('hyphen libarary not loaded');
|
raise EHyphenationException.Create('hyphen libarary not loaded');
|
||||||
|
|
||||||
if not CheckDictionary then
|
if not CheckDictionary then
|
||||||
raise Exception.Create('hyphen dictionary not loaded');
|
raise EHyphenationException.Create('hyphen dictionary not loaded');
|
||||||
|
|
||||||
len := Length(word);
|
len := Length(word);
|
||||||
hyphens := StrAlloc(Len + 5);
|
hyphens := StrAlloc(Len + 5);
|
||||||
|
Loading…
Reference in New Issue
Block a user