Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / macromgr.hxx
blobf2229dd89522f94db02a1b97d705396c03686ba1
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/.
8 */
10 #ifndef SC_MACROMGR_HXX
11 #define SC_MACROMGR_HXX
13 #include <com/sun/star/container/XContainerListener.hpp>
15 #include "rtl/ustring.hxx"
16 #include "scdllapi.h"
18 #include <boost/unordered_map.hpp>
19 #include <boost/unordered_set.hpp>
20 #include <memory>
22 class ScDocument;
23 class ScFormulaCell;
24 class ScUserMacroDepTracker;
26 class ScMacroManager
28 public:
29 explicit ScMacroManager(ScDocument* pDoc);
30 ~ScMacroManager();
32 SC_DLLPUBLIC void InitUserFuncData();
33 SC_DLLPUBLIC void SetUserFuncVolatile( const OUString& sName, bool isVolatile );
34 SC_DLLPUBLIC bool GetUserFuncVolatile( const OUString& sName );
36 void AddDependentCell(const OUString& aModuleName, ScFormulaCell* pCell);
37 void RemoveDependentCell(ScFormulaCell* pCell);
38 void BroadcastModuleUpdate(const OUString& aModuleName);
40 private:
41 typedef boost::unordered_map< OUString, bool, OUStringHash, ::std::equal_to< OUString > > NameBoolMap;
42 NameBoolMap mhFuncToVolatile;
43 com::sun::star::uno::Reference< com::sun::star::container::XContainerListener > mxContainerListener;
45 ::std::auto_ptr<ScUserMacroDepTracker> mpDepTracker;
46 ScDocument* mpDoc;
49 #endif
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */