bump product version to 5.0.4.1
[LibreOffice.git] / sfx2 / source / inc / appbaslib.hxx
blob8e0d5f84bb190173979ce78fb5c5bc9a45d9a81e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
21 #define INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
23 #include <svl/lstner.hxx>
25 #include <com/sun/star/uno/Sequence.hxx>
26 #include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
27 #include <com/sun/star/embed/XStorage.hpp>
29 class BasicManager;
31 /** helper class which holds and manipulates a BasicManager
33 class SfxBasicManagerHolder
34 : public SfxListener
36 private:
37 BasicManager* mpBasicManager;
38 ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
39 mxBasicContainer;
40 ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >
41 mxDialogContainer;
43 public:
44 SfxBasicManagerHolder();
46 enum ContainerType
48 SCRIPTS, DIALOGS
51 /** returns <TRUE/> if and only if the instance is currently bound to a non-<NULL/>
52 BasicManager.
54 bool isValid() const { return mpBasicManager != NULL; }
56 /** returns the BasicManager which this instance is currently bound to
58 BasicManager*
59 get() const { return mpBasicManager; }
61 /** binds the instance to the given BasicManager
63 void reset( BasicManager* _pBasicManager );
65 ::com::sun::star::script::XLibraryContainer *
66 getLibraryContainer( ContainerType _eType );
68 /** calls the storeLibraries at both our script and basic library container
70 void storeAllLibraries();
72 /** calls the setStorage at all our XStorageBasedLibraryContainer.
74 void setStorage(
75 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
78 /** calls the storeLibrariesToStorage at all our XStorageBasedLibraryContainer.
80 void storeLibrariesToStorage(
81 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxStorage
85 /** checks if any modules in the SfxLibraryContainer exceed the binary
86 limits.
88 bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< OUString >& sModules );
90 virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) SAL_OVERRIDE;
92 private:
93 void impl_releaseContainers();
95 bool impl_getContainer(
96 ContainerType _eType,
97 ::com::sun::star::uno::Reference< ::com::sun::star::script::XStorageBasedLibraryContainer >& _out_rxContainer );
100 #endif // INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */