Example #1
0
int
ImageView::getParaCount()
{
    if (hasDocument())
        return 1;
    return 0;
}
Example #2
0
void Documents::checkIfDocumentsDoNotExist(const QVector<FileContainer> &fileContainers) const
{
    for (const FileContainer &fileContainer : fileContainers) {
        if (hasDocument(fileContainer)) {
            throw DocumentAlreadyExistsException(fileContainer.filePath(),
                                                 fileContainer.projectPartId());
        }
    }
}
Example #3
0
bool
ImageView::getDocumentLocation(int &para, int &offset)
{
    if (hasDocument()) {
        para = 0;
        offset = 0;
        return true;
    }
    return false;
}
Example #4
0
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));
    }
}
Example #5
0
bool Documents::hasDocument(const Utf8String &filePath,
                                          const Utf8String &projectPartId) const
{
    return hasDocument(FileContainer(filePath, projectPartId));
}