summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/namemgrtable.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-29 10:39:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-29 10:44:45 +0100
commit792fb5b96f1008804ab51dc0ebf4f07a07ad9537 (patch)
treeeb380b3fb74cbbd4b8a62ecade16ed135b2d5562 /sc/source/ui/inc/namemgrtable.hxx
parentc21b1126b1d72ea9ada5304109964d31a6159507 (diff)
ManageNames: only calculate formula for visible range names
Diffstat (limited to 'sc/source/ui/inc/namemgrtable.hxx')
-rw-r--r--sc/source/ui/inc/namemgrtable.hxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx
index b95002ee7d53..bbbcab60bd41 100644
--- a/sc/source/ui/inc/namemgrtable.hxx
+++ b/sc/source/ui/inc/namemgrtable.hxx
@@ -36,6 +36,7 @@
#include <boost/ptr_container/ptr_map.hpp>
class ScRangeName;
+class ScRangeData;
struct ScRangeNameLine
{
@@ -64,8 +65,17 @@ private:
HeaderBar maHeaderBar;
rtl::OUString maGlobalString;
+ // should be const because we should not modify it here
+ const boost::ptr_map<rtl::OUString, ScRangeName>& mrRangeMap;
+ // for performance, save which entries already have the formula entry
+ // otherwise opening the dialog with a lot of range names is extremelly slow because
+ // we would calculate all formula strings during opening
+ std::map<SvLBoxEntry*, bool> maCalculatedFormulaEntries;
+
void GetLine(ScRangeNameLine& aLine, SvLBoxEntry* pEntry);
- void Init( const boost::ptr_map<rtl::OUString, ScRangeName>& rRangeMap );
+ void Init();
+ void CheckForFormulaString();
+ const ScRangeData* findRangeData(const ScRangeNameLine& rLine);
public:
ScRangeManagerTable( Window* pParent, boost::ptr_map<rtl::OUString, ScRangeName>& aTabRangeNames );
@@ -78,6 +88,7 @@ public:
bool IsMultiSelection();
std::vector<ScRangeNameLine> GetSelectedEntries();
+ DECL_LINK( ScrollHdl, void*);
DECL_LINK( HeaderEndDragHdl, void*);
};