summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-31 23:52:33 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-04-01 00:11:03 -0400
commit1b059829bc6698c15c6bb5459a61348ac56ffda5 (patch)
tree56da868d442162213304709c653369037233d48f /sc/inc
parent8dcd3e554cf1eb1f92419ae6b55213accec656a4 (diff)
Added container to store global anonymous db ranges.
This is needed to support multiple subtotal ranges.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/dbcolect.hxx25
1 files changed, 17 insertions, 8 deletions
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index 251325715d06..d8c36b1afa0f 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -38,6 +38,8 @@
#include "scdllapi.h"
#include "subtotalparam.hxx"
+#include <boost/ptr_container/ptr_vector.hpp>
+
class ScDocument;
class ScDBData : public ScDataObject, public ScRefreshTimer
@@ -178,22 +180,25 @@ public:
void SetModified(sal_Bool bMod) { bModified = bMod; }
void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos );
- void UpdateReference(UpdateRefMode eUpdateRefMode,
+ void UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ScDocument* pDoc );
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
};
//------------------------------------------------------------------------
class SC_DLLPUBLIC ScDBCollection : public ScSortedCollection
{
+ typedef ::boost::ptr_vector<ScDBData> DBRangesType;
+public:
+ typedef DBRangesType AnonDBsType;
private:
Link aRefreshHandler;
ScDocument* pDoc;
sal_uInt16 nEntryIndex; // counter for unique indices
+ AnonDBsType maAnonDBs;
public:
ScDBCollection(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = false, ScDocument* pDocument = NULL) :
@@ -201,11 +206,8 @@ public:
pDoc ( pDocument ),
nEntryIndex ( SC_START_INDEX_DB_COLL ) // see above for the names
{}
- ScDBCollection(const ScDBCollection& rScDBCollection) :
- ScSortedCollection ( rScDBCollection ),
- pDoc ( rScDBCollection.pDoc ),
- nEntryIndex ( rScDBCollection.nEntryIndex)
- {}
+
+ ScDBCollection(const ScDBCollection& r);
virtual ScDataObject* Clone() const { return new ScDBCollection(*this); }
ScDBData* operator[]( const sal_uInt16 nIndex) const {return (ScDBData*)At(nIndex);}
@@ -232,6 +234,13 @@ public:
void SetRefreshHandler( const Link& rLink )
{ aRefreshHandler = rLink; }
const Link& GetRefreshHandler() const { return aRefreshHandler; }
+
+ const ScDBData* findAnonAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly) const;
+ const ScDBData* findAnonByRange(const ScRange& rRange) const;
+ ScDBData* getAnonByRange(const ScRange& rRange);
+ void insertAnonRange(ScDBData* pData);
+
+ const AnonDBsType& getAnonRanges() const;
};
#endif