summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-03-24 23:14:28 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-04-01 00:11:02 -0400
commit7df4c7feacf51c141a7beaa2a8404d932d7c2e86 (patch)
tree382fc1f4af02a368cc905f9e7dd341e152f9965c /sc/inc
parentd8e16e5559b715b8c2853f262a0636e79f5c1853 (diff)
Support sheet-local anonymous database ranges.
This is for an Easy Hack to allow one autofilter per sheet, not per document.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/dbcolect.hxx10
-rw-r--r--sc/inc/document.hxx4
-rw-r--r--sc/inc/globalnames.hxx34
-rw-r--r--sc/inc/rangeutl.hxx1
-rw-r--r--sc/inc/table.hxx6
5 files changed, 53 insertions, 2 deletions
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index d56adcbb17b1..251325715d06 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -176,6 +176,13 @@ public:
sal_Bool IsModified() const { return bModified; }
void SetModified(sal_Bool bMod) { bModified = bMod; }
+
+ void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos );
+ void UpdateReference(UpdateRefMode eUpdateRefMode,
+ SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
+ ScDocument* pDoc );
};
@@ -206,6 +213,7 @@ public:
virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) const;
ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
+ ScDBData* GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab );
sal_Bool SearchName( const String& rName, sal_uInt16& rIndex ) const;
@@ -213,7 +221,7 @@ public:
void UpdateReference(UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
+ SCsCOL nDx, SCsROW nDy, SCsTAB nDz);
void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos );
ScDBData* FindIndex(sal_uInt16 nIndex);
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 1a125ef81155..6127f5b39c4f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -525,6 +525,10 @@ public:
SC_DLLPUBLIC sal_Bool GetCodeName( SCTAB nTab, String& rName ) const;
SC_DLLPUBLIC sal_Bool SetCodeName( SCTAB nTab, const String& rName );
SC_DLLPUBLIC sal_Bool GetTable( const String& rName, SCTAB& rTab ) const;
+
+ void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData);
+ ScDBData* GetAnonymousDBData(SCTAB nTab);
+
SC_DLLPUBLIC inline SCTAB GetTableCount() const { return nMaxTableNumber; }
SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
diff --git a/sc/inc/globalnames.hxx b/sc/inc/globalnames.hxx
new file mode 100644
index 000000000000..6fb983a6cadf
--- /dev/null
+++ b/sc/inc/globalnames.hxx
@@ -0,0 +1,34 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Markus Mohrhard <markus.mohrhard@googlemail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Kohei Yoshida <kyoshida@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __SC_GLOBALNAMES_HXX__
+#define __SC_GLOBALNAMES_HXX__
+
+#define STR_DB_LOCAL_NONAME "unnamed"
+#define STR_DB_GLOBAL_NONAME "unnamed"
+
+#endif
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 716a93e66c68..96382e2d528c 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -304,7 +304,6 @@ public:
class SC_DLLPUBLIC ScAreaNameIterator
{
private:
- String aStrNoName;
ScRangeName* pRangeName;
ScRangeName::const_iterator maRNPos;
ScRangeName::const_iterator maRNEnd;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index a4be4abff773..d3be0754dec4 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -38,6 +38,7 @@
#include "column.hxx"
#include "sortparam.hxx"
#include "compressedarray.hxx"
+#include "dbcolect.hxx"
#include <memory>
#include <set>
@@ -187,6 +188,7 @@ private:
Color aTabBgColor;
sal_uInt16 nScenarioFlags;
sal_Bool bActiveScenario;
+ ScDBData* pDBDataNoName;
mutable ScRangeName* mpRangeName;
bool mbPageBreaksValid;
@@ -270,6 +272,9 @@ public:
void GetName( String& rName ) const;
void SetName( const String& rNewName );
+ void SetAnonymousDBData(ScDBData* aDBData);
+ ScDBData* GetAnonymousDBData();
+
void GetCodeName( String& rName ) const { rName = aCodeName; }
void SetCodeName( const String& rNewName ) { aCodeName = rNewName; }
@@ -795,6 +800,7 @@ public:
void SetRangeName(ScRangeName* pNew);
ScRangeName* GetRangeName() const;
+ void UpdateMoveTab(SCTAB nOldPos,SCTAB nNewPos);
private:
void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,