diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-08 18:50:13 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-11 16:01:34 -0500 |
commit | a22bed643c9c0156981bde42ffb9382562058f40 (patch) | |
tree | 828b54806ae5f8259c2c079b6c786e34015fbc3e /sc | |
parent | 2144db04551c20ce5f40daa3ff6269cd9867b0ef (diff) |
Added range name container to ScTable.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/table.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 3b799a7301b5..56e538a16887 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -89,6 +89,7 @@ class ScFlatBoolColSegments; struct ScSetStringParam; struct ScColWidthParam; struct ScColWidthParam; +class ScRangeName; typedef boost::unordered_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap; @@ -187,6 +188,7 @@ private: USHORT nScenarioFlags; BOOL bActiveScenario; NameToNameMap localNameToGlobalName; + ScRangeName* mpRangeName; bool mbPageBreaksValid; friend class ScDocument; // fuer FillInfo @@ -792,6 +794,8 @@ public: void DestroySortCollator(); void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true ); + ScRangeName* GetRangeName(); + private: void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ULONG nFillCount, FillDir eFillDir, FillCmd eFillCmd, diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index dd1eca50e907..d75d3478f72d 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -270,6 +270,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName, aTabBgColor( COL_AUTO ), nScenarioFlags( 0 ), bActiveScenario( FALSE ), + mpRangeName(NULL), mbPageBreaksValid(false) { @@ -337,6 +338,7 @@ ScTable::~ScTable() delete pRepeatColRange; delete pRepeatRowRange; delete pScenarioRanges; + delete mpRangeName; DestroySortCollator(); } diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 6ef093f5db40..5fe6dce4d8ba 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3018,6 +3018,12 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos SetStreamValid(FALSE); } +ScRangeName* ScTable::GetRangeName() +{ + if (!mpRangeName) + mpRangeName = new ScRangeName(pDocument); +} + ULONG ScTable::GetRowOffset( SCROW nRow ) const { |