diff options
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/arealink.hxx | 16 | ||||
-rw-r--r-- | sc/inc/compiler.hxx | 4 | ||||
-rw-r--r-- | sc/inc/datauno.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dbcolect.hxx | 12 | ||||
-rw-r--r-- | sc/inc/document.hxx | 11 | ||||
-rw-r--r-- | sc/inc/rangeutl.hxx | 10 |
6 files changed, 33 insertions, 22 deletions
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx index fb79891005c6..be08f6ec1a57 100644 --- a/sc/inc/arealink.hxx +++ b/sc/inc/arealink.hxx @@ -49,10 +49,10 @@ private: String aOptions; String aSourceArea; ScRange aDestArea; - sal_Bool bAddUndo; - sal_Bool bInCreate; - sal_Bool bDoInsert; // is set to FALSE for first update - sal_Bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ); + bool bAddUndo; + bool bInCreate; + bool bDoInsert; // is set to FALSE for first update + bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ); public: TYPEINFO(); @@ -70,14 +70,14 @@ public: sal_Bool Refresh( const String& rNewFile, const String& rNewFilter, const String& rNewArea, sal_uLong nNewRefresh ); - void SetInCreate(sal_Bool bSet) { bInCreate = bSet; } - void SetDoInsert(sal_Bool bSet) { bDoInsert = bSet; } + void SetInCreate(bool bSet) { bInCreate = bSet; } + void SetDoInsert(bool bSet) { bDoInsert = bSet; } void SetDestArea(const ScRange& rNew); void SetSource(const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea); - sal_Bool IsEqual( const String& rFile, const String& rFilter, const String& rOpt, - const String& rSource, const ScRange& rDest ) const; + bool IsEqual( const String& rFile, const String& rFilter, const String& rOpt, + const String& rSource, const ScRange& rDest ) const; const String& GetFile() const { return aFileName; } const String& GetFilter() const { return aFilterName; } diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 1e6875976e18..81d6f7921c25 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -346,7 +346,7 @@ private: sal_Bool IsMacro( const String& ); sal_Bool IsNamedRange( const String& ); bool IsExternalNamedRange( const String& rSymbol ); - sal_Bool IsDBRange( const String& ); + bool IsDBRange( const String& ); sal_Bool IsColRowName( const String& ); sal_Bool IsBoolean( const String& ); void AutoCorrectParsedSymbol(); @@ -448,7 +448,7 @@ public: ScRangeData* UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, sal_Bool bIsName, sal_Bool& bCompile); ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, sal_Bool bIsName ); - sal_Bool HasModifiedRange(); + bool HasModifiedRange(); /** If the character is allowed as first character in sheet names or references, includes '$' and '?'. */ diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx index 34345e4a3c07..e54fd3135d33 100644 --- a/sc/inc/datauno.hxx +++ b/sc/inc/datauno.hxx @@ -615,7 +615,7 @@ class ScDatabaseRangesObj : public cppu::WeakImplHelper4< private: ScDocShell* pDocShell; - ScDatabaseRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); + ScDatabaseRangeObj* GetObjectByIndex_Impl(size_t nIndex); ScDatabaseRangeObj* GetObjectByName_Impl(const ::rtl::OUString& aName); public: diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx index 5d7b94017839..604e974f66ba 100644 --- a/sc/inc/dbcolect.hxx +++ b/sc/inc/dbcolect.hxx @@ -54,7 +54,7 @@ private: ScImportParam maImportParam; // DBParam - ::rtl::OUString aName; + const ::rtl::OUString aName; SCTAB nTable; SCCOL nStartCol; SCROW nStartRow; @@ -89,6 +89,7 @@ public: SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bByR = true, bool bHasH = true); ScDBData(const ScDBData& rData); + ScDBData(const ::rtl::OUString& rName, const ScDBData& rData); ~ScDBData(); ScDBData& operator= (const ScDBData& rData); @@ -97,7 +98,6 @@ public: SCTAB GetTable() const; const ::rtl::OUString& GetName() const { return aName; } - void SetName(const ::rtl::OUString& rName) { aName = rName; } void GetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2) const; SC_DLLPUBLIC void GetArea(ScRange& rRange) const; void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); @@ -185,8 +185,10 @@ public: ScDBData* findByName(const ::rtl::OUString& rName); bool insert(ScDBData* p); void erase(iterator itr); + void erase(const ScDBData& r); bool empty() const; size_t size() const; + bool operator== (const NamedDBs& r) const; }; private: @@ -201,9 +203,12 @@ public: ScDBCollection(const ScDBCollection& r); NamedDBs& getNamedDBs(); + const NamedDBs& getNamedDBs() const; const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bStartOnly) 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* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); const ScDBData* GetFilterDBAtTable(SCTAB nTab) const; ScDBData* GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab ); @@ -227,6 +232,9 @@ public: void insertAnonRange(ScDBData* pData); const AnonDBsType& getAnonRanges() const; + + bool empty() const; + bool operator== (const ScDBCollection& r) const; }; #endif diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 3c485fd48575..524280b8af95 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -481,10 +481,11 @@ public: SC_DLLPUBLIC ScDBCollection* GetDBCollection() const; void SetDBCollection( ScDBCollection* pNewDBCollection, sal_Bool bRemoveAutoFilter = false ); - ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, - sal_Bool bStartOnly = false) const; - ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; - ScDBData* GetFilterDBAtTable(SCTAB nTab) const; + const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false) const; + ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false); + const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; + ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); + const ScDBData* GetFilterDBAtTable(SCTAB nTab) const; SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, String* pName=NULL ) const; @@ -1475,7 +1476,7 @@ public: TypedScStrCollection& rStrings, sal_Bool bLimit = false ); sal_Bool GetFormulaEntries( TypedScStrCollection& rStrings ); - sal_Bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); + bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); SC_DLLPUBLIC sal_Bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 96382e2d528c..03e9890eff3d 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -33,6 +33,7 @@ #include "address.hxx" #include "rangenam.hxx" +#include "dbcolect.hxx" #include "scdllapi.h" #include <com/sun/star/table/CellAddress.hpp> @@ -305,18 +306,19 @@ class SC_DLLPUBLIC ScAreaNameIterator { private: ScRangeName* pRangeName; + ScDBCollection* pDBCollection; ScRangeName::const_iterator maRNPos; ScRangeName::const_iterator maRNEnd; - ScDBCollection* pDBCollection; + ScDBCollection::NamedDBs::const_iterator maDBPos; + ScDBCollection::NamedDBs::const_iterator maDBEnd; bool bFirstPass; - size_t nPos; public: ScAreaNameIterator( ScDocument* pDoc ); ~ScAreaNameIterator() {} - sal_Bool Next( String& rName, ScRange& rRange ); - sal_Bool WasDBName() const { return !bFirstPass; } + bool Next( String& rName, ScRange& rRange ); + bool WasDBName() const { return !bFirstPass; } }; |