LCOV - code coverage report
Current view: top level - include/vbahelper - vbadocumentbase.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 2 100.0 %
Date: 2014-11-03 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef INCLUDED_VBAHELPER_VBADOCUMENTBASE_HXX
      20             : #define INCLUDED_VBAHELPER_VBADOCUMENTBASE_HXX
      21             : 
      22             : #include <com/sun/star/frame/XModel.hpp>
      23             : #include <ooo/vba/XDocumentBase.hpp>
      24             : #include <vbahelper/vbahelperinterface.hxx>
      25             : 
      26             : typedef InheritedHelperInterfaceImpl1< ooo::vba::XDocumentBase > VbaDocumentBase_BASE;
      27             : 
      28             : class VBAHELPER_DLLPUBLIC VbaDocumentBase : public VbaDocumentBase_BASE
      29             : {
      30             : protected:
      31             :     css::uno::Reference< css::frame::XModel > mxModel;
      32             :     css::uno::Reference< css::uno::XInterface > mxVBProject;
      33             : protected:
      34         360 :     virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
      35             : public:
      36             :     VbaDocumentBase(    const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
      37             :             css::uno::Reference< css::frame::XModel > xModel );
      38             :     VbaDocumentBase(    css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
      39          46 :     virtual ~VbaDocumentBase() {}
      40             : 
      41             :     // Attributes
      42             :     virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      43             :     virtual OUString SAL_CALL getPath() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      44             :     virtual OUString SAL_CALL getFullName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      45             :     virtual sal_Bool SAL_CALL getSaved() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      46             :     virtual void SAL_CALL setSaved( sal_Bool bSave ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      47             :     virtual css::uno::Any SAL_CALL getVBProject() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      48             : 
      49             :     // Methods
      50             :     virtual void SAL_CALL Close( const css::uno::Any &bSaveChanges,
      51             :                                  const css::uno::Any &aFileName,
      52             :                                  const css::uno::Any &bRouteWorkbook ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      53             :     virtual void SAL_CALL Protect( const css::uno::Any &aPassword ) throw (css::uno::RuntimeException);
      54             :     virtual void SAL_CALL Unprotect( const css::uno::Any &aPassword ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      55             :     virtual void SAL_CALL Save() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      56             :     virtual void SAL_CALL Activate() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      57             : 
      58             :     // XHelperInterface
      59             :     virtual OUString getServiceImplName() SAL_OVERRIDE;
      60             :     virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
      61             : 
      62             :     static OUString getNameFromModel( const css::uno::Reference< css::frame::XModel >& xModel );
      63             : };
      64             : 
      65             : #endif // INCLUDED_VBAHELPER_VBADOCUMENTBASE_HXX
      66             : 
      67             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10