SOL9 2.0 Class: PowerPointPresentations

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * PowerPointPresentations.h 
 * Copyright (c) 2012 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


//2010/05/05

#pragma once

#include <sol/office/PowerPointPresentation.h>

namespace SOL {

class PowerPointPresentations :public Object {


private:
    PowerPoint::PresentationsPtr presentations;


public:
    PowerPointPresentations(PowerPoint::PresentationsPtr pres)
    :presentations(pres) 
    {

    }

public:
    ~PowerPointPresentations() 
    {
        presentations = NULL;
    }


public:
    
    PowerPoint::_ApplicationPtr getApplication ( )
    {
        return presentations->GetApplication ( );
    }
    
    IDispatchPtr getParent ( )
    {
        return presentations->GetParent ( );
    }
    
    PowerPoint::_PresentationPtr item (
            const _variant_t & index )
    {
        return presentations->Item (
                index );
    }
    
    PowerPoint::_PresentationPtr add (
            enum Office::MsoTriState withWindow )
    {
        return presentations->Add (
                withWindow );
    }
    
    PowerPoint::_PresentationPtr OpenOld (
            _bstr_t fileName,
            enum Office::MsoTriState readOnly,
            enum Office::MsoTriState untitled,
            enum Office::MsoTriState withWindow )
    {
        return presentations->OpenOld (
                fileName,
                readOnly,
                untitled,
                withWindow );
    }
    
    PowerPoint::_PresentationPtr Open (
            _bstr_t fileName,
            enum Office::MsoTriState readOnly,
            enum Office::MsoTriState untitled,
            enum Office::MsoTriState withWindow )
    {
        return presentations->Open (
                fileName,
                readOnly,
                untitled,
                withWindow );

    }
    
    HRESULT checkOut (
            _bstr_t fileName )
    {
        HRESULT hr = S_OK;
        if (FAILED(hr = presentations->CheckOut (
                fileName )) ) {
            throw hr;
        }
        return hr;
    }

    VARIANT_BOOL canCheckOut (
            _bstr_t fileName )
    {
        return presentations->CanCheckOut (
                fileName );
    }
    
    PowerPoint::_PresentationPtr open2007 (
            _bstr_t fileName,
            enum Office::MsoTriState readOnly,
            enum Office::MsoTriState untitled,
            enum Office::MsoTriState withWindow,
            enum Office::MsoTriState openAndRepair )
    {
        return presentations->Open2007 (
                fileName,
                readOnly,
                untitled,
                withWindow,
                openAndRepair );
    }

};

}

Last modified: 16 May 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.