LibreOffice Module sc (master)  1
macromgr.hxx
Go to the documentation of this file.
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 
10 #ifndef INCLUDED_SC_INC_MACROMGR_HXX
11 #define INCLUDED_SC_INC_MACROMGR_HXX
12 
13 #include <com/sun/star/container/XContainerListener.hpp>
14 
15 #include <rtl/ustring.hxx>
16 #include "scdllapi.h"
17 
18 #include <memory>
19 #include <unordered_map>
20 
21 class ScDocument;
22 class ScFormulaCell;
24 
26 {
27 public:
28  explicit ScMacroManager(ScDocument& rDoc);
30 
32  SC_DLLPUBLIC void SetUserFuncVolatile(const OUString& sName, bool isVolatile);
33  SC_DLLPUBLIC bool GetUserFuncVolatile(const OUString& sName);
34 
35  void AddDependentCell(const OUString& aModuleName, ScFormulaCell* pCell);
36  void RemoveDependentCell(const ScFormulaCell* pCell);
37  void BroadcastModuleUpdate(const OUString& aModuleName);
38 
39 private:
40  typedef std::unordered_map<OUString, bool> NameBoolMap;
41  NameBoolMap mhFuncToVolatile;
42  css::uno::Reference<css::container::XContainerListener> mxContainerListener;
43 
44  ::std::unique_ptr<ScUserMacroDepTracker> mpDepTracker;
46 };
47 
48 #endif
49 
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A simple container to keep track of cells that depend on basic modules changes.
Definition: macromgr.cxx:41
SC_DLLPUBLIC void InitUserFuncData()
Definition: macromgr.cxx:129
void BroadcastModuleUpdate(const OUString &aModuleName)
Definition: macromgr.cxx:183
NameBoolMap mhFuncToVolatile
Definition: macromgr.hxx:41
SC_DLLPUBLIC void SetUserFuncVolatile(const OUString &sName, bool isVolatile)
Definition: macromgr.cxx:160
SC_DLLPUBLIC bool GetUserFuncVolatile(const OUString &sName)
Definition: macromgr.cxx:165
ScMacroManager(ScDocument &rDoc)
Definition: macromgr.cxx:92
void RemoveDependentCell(const ScFormulaCell *pCell)
Definition: macromgr.cxx:178
css::uno::Reference< css::container::XContainerListener > mxContainerListener
Definition: macromgr.hxx:42
std::unordered_map< OUString, bool > NameBoolMap
Definition: macromgr.hxx:40
const char * sName
::std::unique_ptr< ScUserMacroDepTracker > mpDepTracker
Definition: macromgr.hxx:44
ScDocument & mrDoc
Definition: macromgr.hxx:45
void AddDependentCell(const OUString &aModuleName, ScFormulaCell *pCell)
Definition: macromgr.cxx:173
#define SC_DLLPUBLIC
Definition: scdllapi.h:28