MCPcopy Create free account
hub / github.com/buggins/coolreader / OnText

Method OnText

crengine/src/hist.cpp:199–239  ·  view source on GitHub ↗

called on text

Source from the content-addressed store, hash-verified

197 }
198 /// called on text
199 virtual void OnText( const lChar16 * text, int len, lUInt32 flags )
200 {
201 lString16 txt( text, len );
202 switch (state) {
203 case in_start_point:
204 _curr_bookmark->setStartPos( txt );
205 break;
206 case in_end_point:
207 _curr_bookmark->setEndPos( txt );
208 break;
209 case in_header_txt:
210 _curr_bookmark->setTitleText( txt );
211 break;
212 case in_selection_txt:
213 _curr_bookmark->setPosText( txt );
214 break;
215 case in_comment_txt:
216 _curr_bookmark->setCommentText( txt );
217 break;
218 case in_author:
219 _curr_file->setAuthor( txt );
220 break;
221 case in_title:
222 _curr_file->setTitle( txt );
223 break;
224 case in_series:
225 _curr_file->setSeries( txt );
226 break;
227 case in_filename:
228 _curr_file->setFileName( txt );
229 break;
230 case in_filepath:
231 _curr_file->setFilePath( txt );
232 break;
233 case in_filesize:
234 _curr_file->setFileSize( txt.atoi() );
235 break;
236 default:
237 break;
238 }
239 }
240 /// destructor
241 virtual ~CRHistoryFileParserCallback()
242 {

Callers

nothing calls this directly

Calls 12

setAuthorMethod · 0.80
setSeriesMethod · 0.80
setFilePathMethod · 0.80
atoiMethod · 0.80
setStartPosMethod · 0.45
setEndPosMethod · 0.45
setTitleTextMethod · 0.45
setPosTextMethod · 0.45
setCommentTextMethod · 0.45
setTitleMethod · 0.45
setFileNameMethod · 0.45
setFileSizeMethod · 0.45

Tested by

no test coverage detected