MCPcopy Create free account
hub / github.com/audacity/audacity / lofOpenFiles

Method lofOpenFiles

modules/import-export/mod-lof/ImportLOF.cpp:344–506  ·  view source on GitHub ↗

@brief Processes a single line from a LOF text file, doing whatever is * indicated on the line. * * This function should just return for lines it cannot deal with, and the * caller will continue to the next line of the input file */

Source from the content-addressed store, hash-verified

342 * caller will continue to the next line of the input file
343 */
344void LOFImportFileHandle::lofOpenFiles(wxString* ln)
345{
346 wxStringTokenizer tok(*ln, wxT(" "));
347 wxStringTokenizer temptok1(*ln, wxT("\""));
348 wxStringTokenizer temptok2(*ln, wxT(" "));
349 int tokenplace = 0;
350
351 wxString targetfile;
352 wxString tokenholder = tok.GetNextToken();
353
354
355 if (tokenholder.IsSameAs(wxT("window"), false))
356 {
357 // set any duration/offset factors for last window, as all files were called
358 doDurationAndScrollOffset();
359
360 if (nFilesInGroup > 0 )
361 // Cause a project to be created with the next import
362 mProject = nullptr;
363
364 nFilesInGroup = 0;
365
366 while (tok.HasMoreTokens())
367 {
368 tokenholder = tok.GetNextToken();
369
370 if (tokenholder.IsSameAs(wxT("offset"), false))
371 {
372 if (tok.HasMoreTokens())
373 tokenholder = tok.GetNextToken();
374
375 if (Internat::CompatibleToDouble(tokenholder, &scrollOffset))
376 {
377 callScrollOffset = true;
378 }
379 else
380 {
381 ImportUtils::ShowMessageBox(
382 /* i18n-hint: You do not need to translate "LOF" */
383 XO("Invalid window offset in LOF file."));
384 }
385
386 if (tok.HasMoreTokens())
387 tokenholder = tok.GetNextToken();
388 }
389
390 if (tokenholder.IsSameAs(wxT("duration"), false))
391 {
392 if (tok.HasMoreTokens())
393 tokenholder = tok.GetNextToken();
394
395 if (Internat::CompatibleToDouble(tokenholder, &durationFactor))
396 {
397 callDurationFactor = true;
398 }
399 else
400 {
401 ImportUtils::ShowMessageBox(

Callers

nothing calls this directly

Calls 8

ShowMessageBoxFunction · 0.85
GetFunction · 0.85
SetStringMethod · 0.80
IsSameAsMethod · 0.45
GetPathMethod · 0.45
rbeginMethod · 0.45
MoveToMethod · 0.45
ModifyStateMethod · 0.45

Tested by

no test coverage detected