Changeset 214 for trunk/Components/RichTextStyleUnit.pas
- Timestamp:
- Jun 13, 2007, 8:33:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/RichTextStyleUnit.pas
r39 r214 4 4 5 5 uses 6 Forms, Classes, Graphics, CanvasFontManager, RichTextDocumentUnit; 6 Forms, 7 Classes, 8 Graphics, 9 CanvasFontManager, 10 RichTextDocumentUnit; 7 11 8 12 type … … 144 148 uses 145 149 SysUtils, 146 ACLStringUtility; 147 // ACLProfile; 150 StringUtilsUnit; 148 151 149 152 Procedure ApplyStyle( const Style: TTextDrawStyle; … … 169 172 XSizeStr: string; 170 173 YSizeStr: string; 174 tmpFontParts : TStringList; 171 175 172 176 MarginSize: longint; … … 203 207 ttFont: 204 208 begin 205 ParseIndex := 1; 206 GetNextQuotedValue( Tag.Arguments, ParseIndex, FontFaceName, DoubleQuote ); 207 GetNextQuotedValue( Tag.Arguments, ParseIndex, FontSizeString, DoubleQuote ); 209 tmpFontParts := TStringList.Create; 210 StrExtractStringsQuoted(tmpFontParts, Tag.Arguments); 211 FontFaceName := tmpFontParts[0]; 212 FontSizeString := tmpFontParts[1]; 213 tmpFontParts.Destroy; 214 208 215 NewStyle := Style; 209 216 try … … 212 219 if Pos( 'x', FontSizeString ) > 0 then 213 220 begin 214 XSizeStr := ExtractNextValue( FontSizeString, 'x' ); 215 YSizeStr := FontSizeString; 221 tmpFontParts := TStringList.Create; 222 StrExtractStrings(tmpFontParts, FontSizeString, ['x'], #0); 223 XSizeStr := tmpFontParts[0]; 224 YSizeStr := tmpFontParts[1]; 225 tmpFontParts.Destroy; 226 216 227 NewStyle.Font.XSize := StrToInt( XSizeStr ); 217 228 NewStyle.Font.YSize := StrToInt( YSizeStr ); … … 265 276 ttSetRightMargin: 266 277 begin 278 tmpFontParts := TStringList.Create; 279 StrExtractStrings(tmpFontParts, Tag.Arguments, [' '], #0); 280 MarginParam1 := tmpFontParts[0]; 281 tmpFontParts.Destroy; 282 267 283 ParsePoint := 1; 268 GetNextValue( Tag.Arguments, ParsePoint, MarginParam1, ' ' );269 284 if ( Tag.TagType = ttSetLeftMargin ) 270 285 and ( MarginParam1 = 'here' ) then … … 276 291 try 277 292 MarginSize := StrToInt( MarginParam1 ); 278 GetNextValue( Tag.Arguments, ParsePoint, MarginParam2, ' ' );293 MarginParam2 := tmpFontParts[1]; 279 294 if MarginParam2 = 'pixels' then 280 295 NewMargin := MarginSize
Note:
See TracChangeset
for help on using the changeset viewer.