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

Method DoPMLImport

crengine/src/lvxml.cpp:2213–2233  ·  view source on GitHub ↗

one line per paragraph

Source from the content-addressed store, hash-verified

2211
2212 /// one line per paragraph
2213 bool DoPMLImport(LVXMLParserCallback * callback)
2214 {
2215 CRLog::debug("DoPMLImport()");
2216 RemoveLines( length() );
2217 file->Reset();
2218 file->SetCharset(L"windows-1252");
2219 ReadLines( 100 );
2220 int remainingLines = 0;
2221 PMLTextImport importer(callback);
2222 do {
2223 for ( int i=remainingLines; i<length(); i++ ) {
2224 LVTextFileLine * item = get(i);
2225 importer.processLine(item->text);
2226 file->updateProgress();
2227 }
2228 RemoveLines( length()-3 );
2229 remainingLines = 3;
2230 } while ( ReadLines( 100 ) );
2231 importer.endPage();
2232 return true;
2233 }
2234
2235 /// one line per paragraph
2236 bool DoParaPerLineImport(LVXMLParserCallback * callback)

Callers

nothing calls this directly

Calls 5

ResetMethod · 0.45
SetCharsetMethod · 0.45
processLineMethod · 0.45
updateProgressMethod · 0.45
endPageMethod · 0.45

Tested by

no test coverage detected