int ImageView::getParaCount() { if (hasDocument()) return 1; return 0; }
void Documents::checkIfDocumentsDoNotExist(const QVector<FileContainer> &fileContainers) const { for (const FileContainer &fileContainer : fileContainers) { if (hasDocument(fileContainer)) { throw DocumentAlreadyExistsException(fileContainer.filePath(), fileContainer.projectPartId()); } } }
bool ImageView::getDocumentLocation(int ¶, int &offset) { if (hasDocument()) { para = 0; offset = 0; return true; } return false; }
void AudioContext::fireCompletionEvent() { ASSERT(isMainThread()); if (!isMainThread()) return; AudioBuffer* renderedBuffer = m_renderTarget.get(); ASSERT(renderedBuffer); if (!renderedBuffer) return; // Avoid firing the event if the document has already gone away. if (hasDocument()) { // Call the offline rendering completion event listener. dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); } }
bool Documents::hasDocument(const Utf8String &filePath, const Utf8String &projectPartId) const { return hasDocument(FileContainer(filePath, projectPartId)); }