diff options
-rw-r--r-- | sc/inc/dbcolect.hxx | 189 | ||||
-rw-r--r-- | sc/source/core/tool/dbcolect.cxx | 216 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 28 | ||||
-rw-r--r-- | sc/source/ui/dbgui/foptmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pfiltdlg.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undoutil.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/unoobj/datauno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 2 |
12 files changed, 238 insertions, 238 deletions
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx index 23d2ea32c..1c1bcc918 100644 --- a/sc/inc/dbcolect.hxx +++ b/sc/inc/dbcolect.hxx @@ -31,8 +31,8 @@ #include "scdllapi.h" #include "collect.hxx" -#include "global.hxx" // MAXQUERY -#include "sortparam.hxx" // MAXSORT +#include "global.hxx" // MAXQUERY +#include "sortparam.hxx" // MAXSORT #include "refreshtimer.hxx" #include "address.hxx" #include "scdllapi.h" @@ -48,119 +48,118 @@ class ScDBData : public ScDataObject, public ScRefreshTimer { private: // DBParam - String aName; - SCTAB nTable; - SCCOL nStartCol; - SCROW nStartRow; - SCCOL nEndCol; - SCROW nEndRow; - bool bByRow; - bool bHasHeader; - bool bDoSize; - bool bKeepFmt; - bool bStripData; + ::rtl::OUString aName; + SCTAB nTable; + SCCOL nStartCol; + SCROW nStartRow; + SCCOL nEndCol; + SCROW nEndRow; + bool bByRow; + bool bHasHeader; + bool bDoSize; + bool bKeepFmt; + bool bStripData; // SortParam - bool bSortCaseSens; - bool bSortNaturalSort; - bool bIncludePattern; - bool bSortInplace; - bool bSortUserDef; - sal_uInt16 nSortUserIndex; - SCTAB nSortDestTab; - SCCOL nSortDestCol; - SCROW nSortDestRow; - bool bDoSort[MAXSORT]; - SCCOLROW nSortField[MAXSORT]; - bool bAscending[MAXSORT]; + bool bSortCaseSens; + bool bSortNaturalSort; + bool bIncludePattern; + bool bSortInplace; + bool bSortUserDef; + sal_uInt16 nSortUserIndex; + SCTAB nSortDestTab; + SCCOL nSortDestCol; + SCROW nSortDestRow; + bool bDoSort[MAXSORT]; + SCCOLROW nSortField[MAXSORT]; + bool bAscending[MAXSORT]; ::com::sun::star::lang::Locale aSortLocale; - String aSortAlgorithm; + ::rtl::OUString aSortAlgorithm; // QueryParam - bool bIsAdvanced; // true if created by advanced filter - ScRange aAdvSource; // source range + bool bIsAdvanced; // true if created by advanced filter + ScRange aAdvSource; // source range ScQueryParam maQueryParam; ScSubTotalParam maSubTotal; ScImportParam maImportParam; - bool bDBSelection; // not in Param: if selection, block update + bool bDBSelection; // not in Param: if selection, block update - sal_uInt16 nIndex; // unique index formulas - bool bAutoFilter; // AutoFilter? (not saved) - bool bModified; // is set/cleared for/by(?) UpdateReference + sal_uInt16 nIndex; // unique index formulas + bool bAutoFilter; // AutoFilter? (not saved) + bool bModified; // is set/cleared for/by(?) UpdateReference using ScRefreshTimer::operator==; public: - SC_DLLPUBLIC ScDBData(const String& rName, + SC_DLLPUBLIC ScDBData(const ::rtl::OUString& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - bool bByR = sal_True, bool bHasH = sal_True); + bool bByR = true, bool bHasH = true); ScDBData(const ScDBData& rData); ~ScDBData(); - virtual ScDataObject* Clone() const; + virtual ScDataObject* Clone() const; - ScDBData& operator= (const ScDBData& rData); + ScDBData& operator= (const ScDBData& rData); - bool operator== (const ScDBData& rData) const; + bool operator== (const ScDBData& rData) const; SCTAB GetTable() const; - const String& GetName() const { return aName; } - void GetName(String& rName) const { rName = aName; } - void SetName(const String& rName) { aName = rName; } - void GetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2) 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); - void MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); - bool IsByRow() const { return bByRow; } - void SetByRow(bool bByR) { bByRow = bByR; } - bool HasHeader() const { return bHasHeader; } - void SetHeader(bool bHasH) { bHasHeader = bHasH; } + void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); + void MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); + bool IsByRow() const { return bByRow; } + void SetByRow(bool bByR) { bByRow = bByR; } + bool HasHeader() const { return bHasHeader; } + void SetHeader(bool bHasH) { bHasHeader = bHasH; } void SetIndex(sal_uInt16 nInd) { nIndex = nInd; } sal_uInt16 GetIndex() const { return nIndex; } - bool IsDoSize() const { return bDoSize; } - void SetDoSize(bool bSet) { bDoSize = bSet; } - bool IsKeepFmt() const { return bKeepFmt; } - void SetKeepFmt(bool bSet) { bKeepFmt = bSet; } - bool IsStripData() const { return bStripData; } - void SetStripData(bool bSet) { bStripData = bSet; } + bool IsDoSize() const { return bDoSize; } + void SetDoSize(bool bSet) { bDoSize = bSet; } + bool IsKeepFmt() const { return bKeepFmt; } + void SetKeepFmt(bool bSet) { bKeepFmt = bSet; } + bool IsStripData() const { return bStripData; } + void SetStripData(bool bSet) { bStripData = bSet; } ::rtl::OUString GetSourceString() const; ::rtl::OUString GetOperations() const; - void GetSortParam(ScSortParam& rSortParam) const; - void SetSortParam(const ScSortParam& rSortParam); + void GetSortParam(ScSortParam& rSortParam) const; + void SetSortParam(const ScSortParam& rSortParam); - SC_DLLPUBLIC void GetQueryParam(ScQueryParam& rQueryParam) const; - SC_DLLPUBLIC void SetQueryParam(const ScQueryParam& rQueryParam); - SC_DLLPUBLIC bool GetAdvancedQuerySource(ScRange& rSource) const; - SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange* pSource); + SC_DLLPUBLIC void GetQueryParam(ScQueryParam& rQueryParam) const; + SC_DLLPUBLIC void SetQueryParam(const ScQueryParam& rQueryParam); + SC_DLLPUBLIC bool GetAdvancedQuerySource(ScRange& rSource) const; + SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange* pSource); - void GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const; - void SetSubTotalParam(const ScSubTotalParam& rSubTotalParam); + void GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const; + void SetSubTotalParam(const ScSubTotalParam& rSubTotalParam); - void GetImportParam(ScImportParam& rImportParam) const; - void SetImportParam(const ScImportParam& rImportParam); + void GetImportParam(ScImportParam& rImportParam) const; + void SetImportParam(const ScImportParam& rImportParam); - bool IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly) const; - bool IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; + bool IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly) const; + bool IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; - bool HasImportParam() const { return maImportParam.bImport; } - bool HasQueryParam() const; - bool HasSortParam() const { return bDoSort[0]; } - bool HasSubTotalParam() const { return maSubTotal.bGroupActive[0]; } + bool HasImportParam() const { return maImportParam.bImport; } + SC_DLLPUBLIC bool HasQueryParam() const; + bool HasSortParam() const { return bDoSort[0]; } + bool HasSubTotalParam() const { return maSubTotal.bGroupActive[0]; } - bool HasImportSelection() const { return bDBSelection; } - void SetImportSelection(bool bSet) { bDBSelection = bSet; } + bool HasImportSelection() const { return bDBSelection; } + void SetImportSelection(bool bSet) { bDBSelection = bSet; } - bool HasAutoFilter() const { return bAutoFilter; } - void SetAutoFilter(bool bSet) { bAutoFilter = bSet; } + bool HasAutoFilter() const { return bAutoFilter; } + void SetAutoFilter(bool bSet) { bAutoFilter = bSet; } - bool IsModified() const { return bModified; } - void SetModified(bool bMod) { bModified = bMod; } + bool IsModified() const { return bModified; } + void SetModified(bool bMod) { bModified = bMod; } - void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); - void UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, + void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); + void UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); @@ -177,46 +176,46 @@ public: typedef DBRangesType AnonDBsType; private: - Link aRefreshHandler; + Link aRefreshHandler; ScDocument* pDoc; - sal_uInt16 nEntryIndex; // counter for unique indices + 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) : - ScSortedCollection ( nLim, nDel, bDup ), - pDoc ( pDocument ), - nEntryIndex ( SC_START_INDEX_DB_COLL ) // see above for the names + ScSortedCollection ( nLim, nDel, bDup ), + pDoc ( pDocument ), + nEntryIndex ( SC_START_INDEX_DB_COLL ) // see above for the names {} ScDBCollection(const ScDBCollection& r); - virtual ScDataObject* Clone() const { return new ScDBCollection(*this); } - ScDBData* operator[]( const sal_uInt16 nIndex) const {return (ScDBData*)At(nIndex);} - virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - 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; + virtual ScDataObject* Clone() const { return new ScDBCollection(*this); } + ScDBData* operator[]( const sal_uInt16 nIndex) const {return (ScDBData*)At(nIndex);} + virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; + 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* GetFilterDBAtTable(SCTAB nTab) const; ScDBData* GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab ); - sal_Bool SearchName( const String& rName, sal_uInt16& rIndex ) const; + sal_Bool SearchName( const String& rName, sal_uInt16& rIndex ) const; void DeleteOnTab( SCTAB nTab ); - void UpdateReference(UpdateRefMode eUpdateRefMode, + void UpdateReference(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); - void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); + void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); ScDBData* FindIndex(sal_uInt16 nIndex); - sal_uInt16 GetEntryIndex() { return nEntryIndex; } - void SetEntryIndex(sal_uInt16 nInd) { nEntryIndex = nInd; } + sal_uInt16 GetEntryIndex() { return nEntryIndex; } + void SetEntryIndex(sal_uInt16 nInd) { nEntryIndex = nInd; } virtual sal_Bool Insert(ScDataObject* pScDataObject); - void SetRefreshHandler( const Link& rLink ) + void SetRefreshHandler( const Link& rLink ) { aRefreshHandler = rLink; } - const Link& GetRefreshHandler() const { return aRefreshHandler; } + 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; diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx index 8fb9c1f13..176e0d4c6 100644 --- a/sc/source/core/tool/dbcolect.cxx +++ b/sc/source/core/tool/dbcolect.cxx @@ -52,26 +52,26 @@ using ::std::remove_if; //--------------------------------------------------------------------------------------- -ScDBData::ScDBData( const String& rName, +ScDBData::ScDBData( const ::rtl::OUString& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bByR, bool bHasH) : - aName (rName), - nTable (nTab), - nStartCol (nCol1), - nStartRow (nRow1), - nEndCol (nCol2), - nEndRow (nRow2), - bByRow (bByR), - bHasHeader (bHasH), - bDoSize (false), - bKeepFmt (false), - bStripData (false), - bIsAdvanced (false), + aName (rName), + nTable (nTab), + nStartCol (nCol1), + nStartRow (nRow1), + nEndCol (nCol2), + nEndRow (nRow2), + bByRow (bByR), + bHasHeader (bHasH), + bDoSize (false), + bKeepFmt (false), + bStripData (false), + bIsAdvanced (false), bDBSelection(false), - nIndex (0), + nIndex (0), bAutoFilter (false), - bModified (false) + bModified (false) { ScSortParam aSortParam; ScQueryParam aQueryParam; @@ -84,46 +84,46 @@ ScDBData::ScDBData( const String& rName, ScDBData::ScDBData( const ScDBData& rData ) : ScDataObject(), - ScRefreshTimer ( rData ), - aName (rData.aName), - nTable (rData.nTable), - nStartCol (rData.nStartCol), - nStartRow (rData.nStartRow), - nEndCol (rData.nEndCol), - nEndRow (rData.nEndRow), - bByRow (rData.bByRow), - bHasHeader (rData.bHasHeader), - bDoSize (rData.bDoSize), - bKeepFmt (rData.bKeepFmt), - bStripData (rData.bStripData), - bSortCaseSens (rData.bSortCaseSens), - bSortNaturalSort (rData.bSortNaturalSort), - bIncludePattern (rData.bIncludePattern), - bSortInplace (rData.bSortInplace), - bSortUserDef (rData.bSortUserDef), - nSortUserIndex (rData.nSortUserIndex), - nSortDestTab (rData.nSortDestTab), - nSortDestCol (rData.nSortDestCol), - nSortDestRow (rData.nSortDestRow), - aSortLocale (rData.aSortLocale), - aSortAlgorithm (rData.aSortAlgorithm), - bIsAdvanced (rData.bIsAdvanced), - aAdvSource (rData.aAdvSource), + ScRefreshTimer ( rData ), + aName (rData.aName), + nTable (rData.nTable), + nStartCol (rData.nStartCol), + nStartRow (rData.nStartRow), + nEndCol (rData.nEndCol), + nEndRow (rData.nEndRow), + bByRow (rData.bByRow), + bHasHeader (rData.bHasHeader), + bDoSize (rData.bDoSize), + bKeepFmt (rData.bKeepFmt), + bStripData (rData.bStripData), + bSortCaseSens (rData.bSortCaseSens), + bSortNaturalSort (rData.bSortNaturalSort), + bIncludePattern (rData.bIncludePattern), + bSortInplace (rData.bSortInplace), + bSortUserDef (rData.bSortUserDef), + nSortUserIndex (rData.nSortUserIndex), + nSortDestTab (rData.nSortDestTab), + nSortDestCol (rData.nSortDestCol), + nSortDestRow (rData.nSortDestRow), + aSortLocale (rData.aSortLocale), + aSortAlgorithm (rData.aSortAlgorithm), + bIsAdvanced (rData.bIsAdvanced), + aAdvSource (rData.aAdvSource), maQueryParam (rData.maQueryParam), maSubTotal (rData.maSubTotal), maImportParam (rData.maImportParam), - bDBSelection (rData.bDBSelection), - nIndex (rData.nIndex), - bAutoFilter (rData.bAutoFilter), - bModified (rData.bModified) + bDBSelection (rData.bDBSelection), + nIndex (rData.nIndex), + bAutoFilter (rData.bAutoFilter), + bModified (rData.bModified) { sal_uInt16 i; for (i=0; i<MAXSORT; i++) { - bDoSort[i] = rData.bDoSort[i]; - nSortField[i] = rData.nSortField[i]; - bAscending[i] = rData.bAscending[i]; + bDoSort[i] = rData.bDoSort[i]; + nSortField[i] = rData.nSortField[i]; + bAscending[i] = rData.bAscending[i]; } } @@ -132,42 +132,42 @@ ScDBData& ScDBData::operator= (const ScDBData& rData) sal_uInt16 i; ScRefreshTimer::operator=( rData ); - aName = rData.aName; - nTable = rData.nTable; - nStartCol = rData.nStartCol; - nStartRow = rData.nStartRow; - nEndCol = rData.nEndCol; - nEndRow = rData.nEndRow; - bByRow = rData.bByRow; - bHasHeader = rData.bHasHeader; - bDoSize = rData.bDoSize; - bKeepFmt = rData.bKeepFmt; - bStripData = rData.bStripData; - bSortCaseSens = rData.bSortCaseSens; - bSortNaturalSort = rData.bSortNaturalSort; - bIncludePattern = rData.bIncludePattern; - bSortInplace = rData.bSortInplace; - nSortDestTab = rData.nSortDestTab; - nSortDestCol = rData.nSortDestCol; - nSortDestRow = rData.nSortDestRow; - bSortUserDef = rData.bSortUserDef; - nSortUserIndex = rData.nSortUserIndex; - aSortLocale = rData.aSortLocale; - aSortAlgorithm = rData.aSortAlgorithm; - bIsAdvanced = rData.bIsAdvanced; + aName = rData.aName; + nTable = rData.nTable; + nStartCol = rData.nStartCol; + nStartRow = rData.nStartRow; + nEndCol = rData.nEndCol; + nEndRow = rData.nEndRow; + bByRow = rData.bByRow; + bHasHeader = rData.bHasHeader; + bDoSize = rData.bDoSize; + bKeepFmt = rData.bKeepFmt; + bStripData = rData.bStripData; + bSortCaseSens = rData.bSortCaseSens; + bSortNaturalSort = rData.bSortNaturalSort; + bIncludePattern = rData.bIncludePattern; + bSortInplace = rData.bSortInplace; + nSortDestTab = rData.nSortDestTab; + nSortDestCol = rData.nSortDestCol; + nSortDestRow = rData.nSortDestRow; + bSortUserDef = rData.bSortUserDef; + nSortUserIndex = rData.nSortUserIndex; + aSortLocale = rData.aSortLocale; + aSortAlgorithm = rData.aSortAlgorithm; + bIsAdvanced = rData.bIsAdvanced; maQueryParam = rData.maQueryParam; maSubTotal = rData.maSubTotal; maImportParam = rData.maImportParam; - aAdvSource = rData.aAdvSource; - bDBSelection = rData.bDBSelection; - nIndex = rData.nIndex; + aAdvSource = rData.aAdvSource; + bDBSelection = rData.bDBSelection; + nIndex = rData.nIndex; bAutoFilter = rData.bAutoFilter; for (i=0; i<MAXSORT; i++) { - bDoSort[i] = rData.bDoSort[i]; - nSortField[i] = rData.nSortField[i]; - bAscending[i] = rData.bAscending[i]; + bDoSort[i] = rData.bDoSort[i]; + nSortField[i] = rData.nSortField[i]; + bAscending[i] = rData.bAscending[i]; } return *this; @@ -180,13 +180,13 @@ SCTAB ScDBData::GetTable() const bool ScDBData::operator== (const ScDBData& rData) const { - // Daten, die nicht in den Params sind + // Daten, die nicht in den Params sind - if ( nTable != rData.nTable || - bDoSize != rData.bDoSize || - bKeepFmt != rData.bKeepFmt || + if ( nTable != rData.nTable || + bDoSize != rData.bDoSize || + bKeepFmt != rData.bKeepFmt || bIsAdvanced!= rData.bIsAdvanced|| - bStripData != rData.bStripData || + bStripData != rData.bStripData || // SAB: I think this should be here, but I don't want to break something // bAutoFilter!= rData.bAutoFilter|| ScRefreshTimer::operator!=( rData ) @@ -288,7 +288,7 @@ void ScDBData::GetArea(ScRange& rRange) const void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) { - nTable = nTab; + nTable = nTab; nStartCol = nCol1; nStartRow = nRow1; nEndCol = nCol2; @@ -310,7 +310,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n if (nSortField[i] > nSortEnd) { nSortField[i] = 0; - bDoSort[i] = false; + bDoSort[i] = false; } } @@ -354,12 +354,12 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const rSortParam.nDestCol = nSortDestCol; rSortParam.nDestRow = nSortDestRow; rSortParam.bIncludePattern = bIncludePattern; - rSortParam.bUserDef = bSortUserDef; + rSortParam.bUserDef = bSortUserDef; rSortParam.nUserIndex = nSortUserIndex; for (sal_uInt16 i=0; i<MAXSORT; i++) { - rSortParam.bDoSort[i] = bDoSort[i]; - rSortParam.nField[i] = nSortField[i]; + rSortParam.bDoSort[i] = bDoSort[i]; + rSortParam.nField[i] = nSortField[i]; rSortParam.bAscending[i] = bAscending[i]; } rSortParam.aCollatorLocale = aSortLocale; @@ -379,7 +379,7 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam ) nSortUserIndex = rSortParam.nUserIndex; for (sal_uInt16 i=0; i<MAXSORT; i++) { - bDoSort[i] = rSortParam.bDoSort[i]; + bDoSort[i] = rSortParam.bDoSort[i]; nSortField[i] = rSortParam.nField[i]; bAscending[i] = rSortParam.bAscending[i]; } @@ -410,8 +410,8 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam) maQueryParam = rQueryParam; - // set bIsAdvanced to false for everything that is not from the - // advanced filter dialog + // set bIsAdvanced to false for everything that is not from the + // advanced filter dialog bIsAdvanced = false; } @@ -494,7 +494,7 @@ bool ScDBData::HasQueryParam() const return maQueryParam.GetEntry(0).bDoQuery; } -ScDataObject* ScDBData::Clone() const +ScDataObject* ScDBData::Clone() const { return new ScDBData(*this); } @@ -503,20 +503,20 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos) { ScRange aRange; GetArea( aRange ); - SCTAB nTab = aRange.aStart.Tab(); // hat nur eine Tabelle + SCTAB nTab = aRange.aStart.Tab(); // hat nur eine Tabelle - // anpassen wie die aktuelle Tabelle bei ScTablesHint (tabvwsh5.cxx) + // anpassen wie die aktuelle Tabelle bei ScTablesHint (tabvwsh5.cxx) - if ( nTab == nOldPos ) // verschobene Tabelle + if ( nTab == nOldPos ) // verschobene Tabelle nTab = nNewPos; - else if ( nOldPos < nNewPos ) // nach hinten verschoben + else if ( nOldPos < nNewPos ) // nach hinten verschoben { - if ( nTab > nOldPos && nTab <= nNewPos ) // nachrueckender Bereich + if ( nTab > nOldPos && nTab <= nNewPos ) // nachrueckender Bereich --nTab; } - else // nach vorne verschoben + else // nach vorne verschoben { - if ( nTab >= nNewPos && nTab < nOldPos ) // nachrueckender Bereich + if ( nTab >= nNewPos && nTab < nOldPos ) // nachrueckender Bereich ++nTab; } @@ -525,7 +525,7 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos) SetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(),aRange.aEnd .Row() ); - // MoveTo ist nicht noetig, wenn nur die Tabelle geaendert ist + // MoveTo ist nicht noetig, wenn nur die Tabelle geaendert ist SetModified(bChanged); @@ -563,13 +563,13 @@ void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, aRangeAdvSource.aEnd.Set( theCol2,theRow2,theTab2 ); SetAdvancedQuerySource( &aRangeAdvSource ); - bDoUpdate = true; // DBData is modified + bDoUpdate = true; // DBData is modified } } SetModified(bDoUpdate); - //! Testen, ob mitten aus dem Bereich geloescht/eingefuegt wurde !!! + //! Testen, ob mitten aus dem Bereich geloescht/eingefuegt wurde !!! } void ScDBData::ExtendDataArea(ScDocument* pDoc) @@ -681,7 +681,7 @@ short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const return (short) ScGlobal::GetpTransliteration()->compareString( rStr1, rStr2 ); } -// IsEqual - alles gleich +// IsEqual - alles gleich sal_Bool ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const { @@ -736,7 +736,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO if (pData) return const_cast<ScDBData*>(pData); - return NULL; + return NULL; } ScDBData* ScDBCollection::GetFilterDBAtTable(SCTAB nTab) const @@ -821,7 +821,7 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode, void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { - // wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst + // wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst for (sal_uInt16 i=0; i<nCount; i++) { @@ -849,7 +849,7 @@ ScDBData* ScDBCollection::FindIndex(sal_uInt16 nIndex) sal_Bool ScDBCollection::Insert(ScDataObject* pScDataObject) { ScDBData* pData = (ScDBData*) pScDataObject; - if (!pData->GetIndex()) // schon gesetzt? + if (!pData->GetIndex()) // schon gesetzt? pData->SetIndex(nEntryIndex++); sal_Bool bInserted = ScSortedCollection::Insert(pScDataObject); if ( bInserted && pData->HasImportParam() && !pData->HasImportSelection() ) @@ -876,15 +876,15 @@ ScDBData* ScDBCollection::GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab ) if ( nCol < nStartCol || nCol > nEndCol || nRow < nStartRow || nRow > nEndRow ) { if (!pNearData) - pNearData = pDB; // ersten angrenzenden Bereich merken + pNearData = pDB; // ersten angrenzenden Bereich merken } else - return pDB; // nicht "unbenannt" und Cursor steht wirklich drin + return pDB; // nicht "unbenannt" und Cursor steht wirklich drin } } if (pNearData) - return pNearData; // angrenzender, wenn nichts direkt getroffen - return pDoc->GetAnonymousDBData(nTab); // "unbenannt" nur zurueck, wenn sonst nichts gefunden + return pNearData; // angrenzender, wenn nichts direkt getroffen + return pDoc->GetAnonymousDBData(nTab); // "unbenannt" nur zurueck, wenn sonst nichts gefunden } const ScDBData* ScDBCollection::findAnonAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly) const diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 5e084c33b..695b83490 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -257,7 +257,7 @@ void ScDbNameDlg::Init() pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True ); if ( pDBData ) { - String theDbName; + ::rtl::OUString theDbName; ScAddress& rStart = theCurArea.aStart; ScAddress& rEnd = theCurArea.aEnd; SCCOL nCol1; @@ -272,8 +272,8 @@ void ScDbNameDlg::Init() && (rStart.Col() == nCol1) && (rStart.Row() == nRow1) && (rEnd.Col() == nCol2) && (rEnd.Row() == nRow2 ) ) { - pDBData->GetName( theDbName ); - if ( theDbName != aStrNoName ) + theDbName = pDBData->GetName(); + if ( !theDbName.equals(aStrNoName) ) aEdName.SetText( theDbName ); else aEdName.SetText( EMPTY_STRING ); @@ -297,21 +297,23 @@ void ScDbNameDlg::Init() void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData ) { - String aSource = aStrSource; + ::rtl::OUStringBuffer aBuf; + aBuf.append(aStrSource); if (pDBData) { - aSource += ' '; - aSource += pDBData->GetSourceString(); + aBuf.append(sal_Unicode(' ')); + aBuf.append(pDBData->GetSourceString()); } - aFTSource.SetText( aSource ); + aFTSource.SetText(aBuf.makeStringAndClear()); + aBuf.append(aStrOperations); String aOper = aStrOperations; if (pDBData) { - aOper += ' '; - aOper += pDBData->GetOperations(); + aBuf.append(sal_Unicode(' ')); + aBuf.append(pDBData->GetOperations()); } - aFTOperations.SetText( aOper ); + aFTOperations.SetText(aBuf.makeStringAndClear()); } //---------------------------------------------------------------------------- @@ -377,15 +379,15 @@ void ScDbNameDlg::UpdateNames() if ( nNameCount > 0 ) { ScDBData* pDbData = NULL; - String aString; + ::rtl::OUString aString; for ( sal_uInt16 i=0; i<nNameCount; i++ ) { pDbData = (ScDBData*)(aLocalDbCol.At( i )); if ( pDbData ) { - pDbData->GetName( aString ); - if ( aString != aStrNoName ) + aString = pDbData->GetName(); + if (!aString.equals(aStrNoName)) aEdName.InsertEntry( aString ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index e55b34ad4..a6bc3f6db 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -190,7 +190,7 @@ void ScFilterOptionsMgr::Init() if ( pDBData ) { rBtnHeader.Check( pDBData->HasHeader() ); - pDBData->GetName( theDbName ); + theDbName = pDBData->GetName(); if ( theDbName != rStrNoName ) { diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 9f59d426f..b2e0cfe28 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -174,8 +174,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) theQueryData.nRow2, nSrcTab ) ); ScDBCollection* pDBColl = pDoc->GetDBCollection(); - String theDbArea; - String theDbName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)); + ::rtl::OUString theDbName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)); /* * Ueberpruefen, ob es sich bei dem uebergebenen @@ -192,13 +191,14 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) rStart.Col(), rStart.Row(), rEnd.Col(), rEnd.Row() ); if ( pDBData ) - pDBData->GetName( theDbName ); + theDbName = pDBData->GetName(); } - theDbArea.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" (")); - theDbArea += theDbName; - theDbArea += ')'; - aFtDbArea.SetText( theDbArea ); + ::rtl::OUStringBuffer aBuf; + aBuf.appendAscii(" ("); + aBuf.append(theDbName); + aBuf.append(sal_Unicode(')')); + aFtDbArea.SetText(aBuf.makeStringAndClear()); } else { diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 8cc4a3729..0ddd3b187 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -689,7 +689,7 @@ void ScTabPageSortOptions::Init() rSortData.nCol2, rSortData.nRow2 ); if ( pDBData ) { - pDBData->GetName( theDbName ); + theDbName = pDBData->GetName(); aBtnHeader.Check( pDBData->HasHeader() ); } } diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 02d73f05c..be8b2fc06 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1472,13 +1472,13 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName, ScDBCollection& rDBColl = *pDoc->GetDBCollection(); ScDBData* pData = NULL; ScImportParam aImportParam; - sal_Bool bFound = false; + bool bFound = false; sal_uInt16 nCount = rDBColl.GetCount(); for (sal_uInt16 i=0; i<nCount && !bFound; i++) { pData = rDBColl[i]; - if (pData->GetName() == rTarget) - bFound = sal_True; + if (pData->GetName().equals(rTarget)) + bFound = true; } if (!bFound) { diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index a4b252746..3e7a4ee90 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -489,7 +489,7 @@ String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea ) pArea->nColEnd, pArea->nRowEnd ); if (pData) { - pData->GetName( aName ); + aName = pData->GetName(); bOk = sal_True; } diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 8fc3dca97..dcd0aa92b 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -272,7 +272,7 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName ) for ( sal_uInt16 i=0; i<nCount; i++ ) { ScDBData* pData = (*pDbNames)[i]; - if ( pData->GetName() == rDBName ) + if ( pData->GetName().equals(rDBName) ) { ScRange aRange; pData->GetArea(aRange); diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx index 93d9c3fe8..1edbdc5c3 100644 --- a/sc/source/ui/undo/undoutil.cxx +++ b/sc/source/ui/undo/undoutil.cxx @@ -94,13 +94,12 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB if (!pRet) { - sal_Bool bWasTemp = false; + bool bWasTemp = false; if ( pUndoData ) { - String aName; - pUndoData->GetName( aName ); - if ( rtl::OUString(aName) == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME) ) ) - bWasTemp = sal_True; + const ::rtl::OUString& aName = pUndoData->GetName(); + if (aName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME))) + bWasTemp = true; } DBG_ASSERT(bWasTemp, "Undo: didn't find database range"); (void)bWasTemp; diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index a6212a3c6..0e7fcfaf4 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -2092,8 +2092,8 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const rtl::OUString& aPr else if ( aString.EqualsAscii( SC_UNONAME_ISUSER ) ) { // all database ranges except "unnamed" are user defined - ScUnoHelpFunctions::SetBoolInAny( aRet, - ( pData->GetName() != String(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)) ) ); + ScUnoHelpFunctions::SetBoolInAny( + aRet, !pData->GetName().equalsAscii(STR_DB_LOCAL_NONAME)); } else if ( aString.EqualsAscii( SC_UNO_LINKDISPBIT ) ) { diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 3b88abb81..64fc2a391 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -735,7 +735,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) if ( pDbData ) { pDBName = new String; - pDbData->GetName( *pDBName ); + *pDBName = pDbData->GetName(); if ( *pDBName != aStrNoName ) aList.Insert( pDBName ); |