Example #1
0
bool CanViewWithPDFXChange(WindowInfo *win)
{
    // Requirements: a valid filename and a valid path to PDF X-Change
    if (win && !CouldBePDFDoc(win) || !CanViewExternally(win))
        return false;
    ScopedMem<WCHAR> path(GetPDFXChangePath());
    return path != NULL;
}
Example #2
0
bool CanViewWithAcrobat(WindowInfo *win)
{
    // Requirements: a valid filename and a valid path to Adobe Reader
    if (win && !CouldBePDFDoc(win) || !CanViewExternally(win))
        return false;
    ScopedMem<WCHAR> exePath(GetAcrobatPath());
    return exePath != NULL;
}
Example #3
0
bool CanViewWithFoxit(WindowInfo *win)
{
    // Requirements: a valid filename and a valid path to Foxit
    if (win && win->IsNotPdf() || !CanViewExternally(win))
        return false;
    ScopedMem<WCHAR> path(GetFoxitPath());
    return path != NULL;
}
Example #4
0
bool CanViewWithHtmlHelp(WindowInfo *win)
{
    // Requirements: a valid filename and a valid path to HTML Help
    if (!win || win->IsAboutWindow() || !CanViewExternally(win))
        return false;
    // allow viewing with HTML Help, if either an CHM document is loaded...
    if (win->IsDocLoaded() && win->GetEngineType() != Engine_Chm2 && !win->AsChm())
        return false;
    // or a file ending in .chm has failed to be loaded
    if (!win->IsDocLoaded() && !str::EndsWithI(win->loadedFilePath, L".chm"))
        return false;
    ScopedMem<WCHAR> path(GetHtmlHelpPath());
    return path != NULL;
}
Example #5
0
bool CanViewWithXPSViewer(WindowInfo *win)
{
    // Requirements: a valid filename and a valid path to XPS-Viewer
    if (!win || win->IsAboutWindow() || !CanViewExternally(win))
        return false;
    // allow viewing with XPS-Viewer, if either an XPS document is loaded...
    if (win->IsDocLoaded() && win->GetEngineType() != Engine_XPS)
        return false;
    // or a file ending in .xps or .oxps has failed to be loaded
    if (!win->IsDocLoaded() && !str::EndsWithI(win->loadedFilePath, L".xps") && !str::EndsWithI(win->loadedFilePath, L".oxps"))
        return false;
    ScopedMem<WCHAR> path(GetXPSViewerPath());
    return path != NULL;
}