References App::GetApplication(), App::Document::getName(), Gui::Command::Gui, and App::Application::newDocument().