LCOV - code coverage report
Current view: top level - sfx2/source/inc - appbaslib.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 3 3 100.0 %
Date: 2014-04-11 Functions: 3 3 100.0 %
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             : 
      20             : #ifndef INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
      21             : #define INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
      22             : 
      23             : #include <com/sun/star/uno/Sequence.hxx>
      24             : #include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
      25             : #include <com/sun/star/embed/XStorage.hpp>
      26             : 
      27             : class BasicManager;
      28             : 
      29             : /** helper class which holds and manipulates a BasicManager
      30             : */
      31        3143 : class SfxBasicManagerHolder
      32             : {
      33             : private:
      34             :     BasicManager*   mpBasicManager;
      35             :     ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
      36             :                     mxBasicContainer;
      37             :     ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
      38             :                     mxDialogContainer;
      39             : 
      40             : public:
      41             :     SfxBasicManagerHolder();
      42             : 
      43             :     enum ContainerType
      44             :     {
      45             :         SCRIPTS, DIALOGS
      46             :     };
      47             : 
      48             :     /** returns <TRUE/> if and only if the instance is currently bound to a non-<NULL/>
      49             :         BasicManager.
      50             :     */
      51         817 :     bool    isValid() const { return mpBasicManager != NULL; }
      52             : 
      53             :     /** returns the BasicManager which this instance is currently bound to
      54             :     */
      55             :     BasicManager*
      56       27475 :             get() const { return mpBasicManager; }
      57             : 
      58             :     /** binds the instance to the given BasicManager
      59             :     */
      60             :     void    reset( BasicManager* _pBasicManager );
      61             : 
      62             :     ::com::sun::star::script::XLibraryContainer *
      63             :             getLibraryContainer( ContainerType _eType );
      64             : 
      65             :     /** calls the storeLibraries at both our script and basic library container
      66             :     */
      67             :     void    storeAllLibraries();
      68             : 
      69             :     /** calls the setStorage at all our XStorageBasedLibraryContainer.
      70             :     */
      71             :     void    setStorage(
      72             :                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
      73             :             );
      74             : 
      75             :     /** calls the storeLibrariesToStorage at all our XStorageBasedLibraryContainer.
      76             :     */
      77             :     void    storeLibrariesToStorage(
      78             :                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
      79             :             );
      80             : 
      81             : 
      82             :     /** checks if any modules in the SfxLibraryContainer exceed the binary
      83             :         limits.
      84             :     */
      85             :     bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< OUString >& sModules );
      86             : 
      87             : 
      88             : private:
      89             :     void    impl_releaseContainers();
      90             : 
      91             :     bool    impl_getContainer(
      92             :                 ContainerType _eType,
      93             :                 ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >& _out_rxContainer );
      94             : };
      95             : 
      96             : #endif // INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
      97             : 
      98             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10