diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-08 21:38:15 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-08 21:45:27 -0500 |
commit | 2d4d52e0fbad81a960b81a94694ba4449cb71433 (patch) | |
tree | 8f890a4ec2c846cbd87c60d034878a62160f3071 /sc | |
parent | Moved TypedStrData into its own files. (diff) | |
download | core-2d4d52e0fbad81a960b81a94694ba4449cb71433.tar.gz core-2d4d52e0fbad81a960b81a94694ba4449cb71433.zip |
Rename TypedStrData to ScTypedStrData, just to be consistent.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/column.hxx | 6 | ||||
-rw-r--r-- | sc/inc/document.hxx | 6 | ||||
-rw-r--r-- | sc/inc/dpglobal.hxx | 2 | ||||
-rw-r--r-- | sc/inc/table.hxx | 6 | ||||
-rw-r--r-- | sc/inc/typedstrdata.hxx | 39 | ||||
-rw-r--r-- | sc/inc/validat.hxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/column3.cxx | 14 | ||||
-rw-r--r-- | sc/source/core/data/documen3.cxx | 28 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/validat.cxx | 14 | ||||
-rw-r--r-- | sc/source/core/tool/typedstrdata.cxx | 32 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pfiltdlg.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/filtdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/pfiltdlg.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 26 |
17 files changed, 115 insertions, 116 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index e5e78f39a95a..da5e168170bc 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -62,7 +62,7 @@ class ScMarkData; class ScPatternAttr; class ScStyleSheet; class SvtBroadcaster; -class TypedStrData; +class ScTypedStrData; class ScProgress; class ScPostIt; struct ScFunctionData; @@ -379,8 +379,8 @@ public: /// Including current, may return -1 SCsROW GetNextUnprotected( SCROW nRow, bool bUp ) const; - void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<TypedStrData>& rStrings, bool& rHasDates); - bool GetDataEntries(SCROW nRow, std::set<TypedStrData>& rStrings, bool bLimit); + void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<ScTypedStrData>& rStrings, bool& rHasDates); + bool GetDataEntries(SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit); void UpdateInsertTabAbs(SCTAB nNewPos); bool TestTabRefAbs(SCTAB nTable); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index a796c3294098..343a62da07e8 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1486,15 +1486,15 @@ public: * database range that contains the specified cell position. */ bool GetFilterEntries( - SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<TypedStrData>& rStrings, bool& rHasDates); + SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<ScTypedStrData>& rStrings, bool& rHasDates); SC_DLLPUBLIC bool GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, - std::vector<TypedStrData>& rStrings, bool& rHasDates); + std::vector<ScTypedStrData>& rStrings, bool& rHasDates); bool GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, - std::vector<TypedStrData>& rStrings, bool bLimit = false ); + std::vector<ScTypedStrData>& rStrings, bool bLimit = false ); bool GetFormulaEntries( ScTypedCaseStrSet& rStrings ); bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx index 55a6aeae24ff..3619f03dfcb3 100644 --- a/sc/inc/dpglobal.hxx +++ b/sc/inc/dpglobal.hxx @@ -92,7 +92,7 @@ #define DP_PROP_FILTER "Filter" #define DP_PROP_POSITION "Position" -class TypedStrData; +class ScTypedStrData; class ScDPObject; class ScDPInfoWnd; class ScDocShell; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 2bae9938d79d..bb11dd5ed574 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -761,9 +761,9 @@ public: SCSIZE Query(ScQueryParam& rQueryParam, bool bKeepSub); bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam); - void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<TypedStrData>& rStrings, bool& rHasDates); - void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<TypedStrData>& rStrings, bool& rHasDates ); - bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set<TypedStrData>& rStrings, bool bLimit); + void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScTypedStrData>& rStrings, bool& rHasDates); + void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<ScTypedStrData>& rStrings, bool& rHasDates ); + bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit); bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx index 2e7d28a3fde9..e33d16ae3110 100644 --- a/sc/inc/typedstrdata.hxx +++ b/sc/inc/typedstrdata.hxx @@ -34,7 +34,7 @@ #include <set> -class TypedStrData +class ScTypedStrData { public: enum StringType { @@ -45,39 +45,38 @@ public: Header = 4 }; - TypedStrData( const rtl::OUString& rStr, double nVal = 0.0, - StringType eType = Standard ); + ScTypedStrData( const rtl::OUString& rStr, double nVal = 0.0, + StringType eType = Standard ); - TypedStrData( const TypedStrData& rCpy ); + ScTypedStrData( const ScTypedStrData& rCpy ); bool IsStrData() const; SC_DLLPUBLIC const rtl::OUString& GetString() const; double GetValue() const; StringType GetStringType() const; - struct LessCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool> + struct LessCaseSensitive : std::binary_function<ScTypedStrData, ScTypedStrData, bool> { - bool operator() (const TypedStrData& left, const TypedStrData& right) const; + bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const; }; - struct LessCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool> + struct LessCaseInsensitive : std::binary_function<ScTypedStrData, ScTypedStrData, bool> { - bool operator() (const TypedStrData& left, const TypedStrData& right) const; + bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const; }; - struct EqualCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool> + struct EqualCaseSensitive : std::binary_function<ScTypedStrData, ScTypedStrData, bool> { - bool operator() (const TypedStrData& left, const TypedStrData& right) const; + bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const; }; - struct EqualCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool> + struct EqualCaseInsensitive : std::binary_function<ScTypedStrData, ScTypedStrData, bool> { - bool operator() (const TypedStrData& left, const TypedStrData& right) const; + bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const; }; - bool operator== (const TypedStrData& r) const; - bool operator< (const TypedStrData& r) const; - + bool operator== (const ScTypedStrData& r) const; + bool operator< (const ScTypedStrData& r) const; private: rtl::OUString maStrValue; @@ -85,16 +84,16 @@ private: StringType meStrType; }; -class FindTypedStrData : std::unary_function<TypedStrData, bool> +class FindTypedStrData : std::unary_function<ScTypedStrData, bool> { - TypedStrData maVal; + ScTypedStrData maVal; bool mbCaseSens; public: - FindTypedStrData(const TypedStrData& rVal, bool bCaseSens); - bool operator() (const TypedStrData& r) const; + FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens); + bool operator() (const ScTypedStrData& r) const; }; -typedef std::set<TypedStrData, TypedStrData::LessCaseSensitive> ScTypedCaseStrSet; +typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet; #endif diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 44bc37a290b8..b8a661ffefee 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -37,7 +37,7 @@ namespace ValidListType = ::com::sun::star::sheet::TableValidationVisibility; class ScPatternAttr; class ScTokenArray; -class TypedStrData; +class ScTypedStrData; enum ScValidationMode { @@ -131,7 +131,7 @@ public: @descr Fills the list only, if this is a list validation and IsShowList() is enabled. @param rStrings (out-param) The string list to fill with list validation entires. @return true = rStrings has been filled with at least one entry. */ - bool FillSelectionList(std::vector<TypedStrData>& rStrings, const ScAddress& rPos) const; + bool FillSelectionList(std::vector<ScTypedStrData>& rStrings, const ScAddress& rPos) const; // with string: during input, with cell: for detective / RC_FORCED sal_Bool IsDataValid( const String& rTest, const ScPatternAttr& rPattern, @@ -166,7 +166,7 @@ private: @param rMatch (out-param) the index of the first item that matched, -1 if nothing matched. @return true = Cell range found, rRange is valid, or an error entry stuffed into the list if pCell==NULL. */ bool GetSelectionFromFormula( - std::vector<TypedStrData>* pStrings, ScBaseCell* pCell, const ScAddress& rPos, + std::vector<ScTypedStrData>* pStrings, ScBaseCell* pCell, const ScAddress& rPos, const ScTokenArray& rTokArr, int& rMatch) const; /** Tests, if pCell is equal to what the passed token array represents. */ diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index f94eacd56740..c6d16b5b8b05 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1516,7 +1516,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString, } -void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<TypedStrData>& rStrings, bool& rHasDates) +void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { bool bHasDates = false; SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); @@ -1538,7 +1538,7 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<Type if ( pDocument->HasStringData( nCol, nRow, nTab ) ) { - rStrings.push_back(TypedStrData(aString)); + rStrings.push_back(ScTypedStrData(aString)); continue; } @@ -1560,7 +1560,7 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<Type String aErr = ScGlobal::GetErrorString(nErr); if (aErr.Len()) { - rStrings.push_back(TypedStrData(aErr)); + rStrings.push_back(ScTypedStrData(aErr)); continue; } } @@ -1585,7 +1585,7 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<Type } } - rStrings.push_back(TypedStrData(aString, nValue, TypedStrData::Value)); + rStrings.push_back(ScTypedStrData(aString, nValue, ScTypedStrData::Value)); } rHasDates = bHasDates; @@ -1601,7 +1601,7 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<Type #define DATENT_SEARCH 2000 -bool ScColumn::GetDataEntries(SCROW nStartRow, std::set<TypedStrData>& rStrings, bool bLimit) +bool ScColumn::GetDataEntries(SCROW nStartRow, std::set<ScTypedStrData>& rStrings, bool bLimit) { sal_Bool bFound = false; SCSIZE nThisIndex; @@ -1632,7 +1632,7 @@ bool ScColumn::GetDataEntries(SCROW nStartRow, std::set<TypedStrData>& rStrings, else ((ScEditCell*)pCell)->GetString(aString); - bool bInserted = rStrings.insert(TypedStrData(aString)).second; + bool bInserted = rStrings.insert(ScTypedStrData(aString)).second; if (bInserted && bLimit && rStrings.size() >= DATENT_MAX) break; // Maximum erreicht bFound = true; @@ -1655,7 +1655,7 @@ bool ScColumn::GetDataEntries(SCROW nStartRow, std::set<TypedStrData>& rStrings, else ((ScEditCell*)pCell)->GetString(aString); - bool bInserted = rStrings.insert(TypedStrData(aString)).second; + bool bInserted = rStrings.insert(ScTypedStrData(aString)).second; if (bInserted && bLimit && rStrings.size() >= DATENT_MAX) break; // Maximum erreicht bFound = true; diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index ba618a0474fe..9d7d564c2d1d 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -90,20 +90,20 @@ using namespace com::sun::star; namespace { -void sortAndRemoveDuplicates(std::vector<TypedStrData>& rStrings, bool bCaseSens) +void sortAndRemoveDuplicates(std::vector<ScTypedStrData>& rStrings, bool bCaseSens) { if (bCaseSens) { - std::sort(rStrings.begin(), rStrings.end(), TypedStrData::LessCaseSensitive()); - std::vector<TypedStrData>::iterator it = - std::unique(rStrings.begin(), rStrings.end(), TypedStrData::EqualCaseSensitive()); + std::sort(rStrings.begin(), rStrings.end(), ScTypedStrData::LessCaseSensitive()); + std::vector<ScTypedStrData>::iterator it = + std::unique(rStrings.begin(), rStrings.end(), ScTypedStrData::EqualCaseSensitive()); rStrings.erase(it, rStrings.end()); } else { - std::sort(rStrings.begin(), rStrings.end(), TypedStrData::LessCaseInsensitive()); - std::vector<TypedStrData>::iterator it = - std::unique(rStrings.begin(), rStrings.end(), TypedStrData::EqualCaseInsensitive()); + std::sort(rStrings.begin(), rStrings.end(), ScTypedStrData::LessCaseInsensitive()); + std::vector<ScTypedStrData>::iterator it = + std::unique(rStrings.begin(), rStrings.end(), ScTypedStrData::EqualCaseInsensitive()); rStrings.erase(it, rStrings.end()); } } @@ -1447,7 +1447,7 @@ bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, // bool ScDocument::GetFilterEntries( - SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<TypedStrData>& rStrings, bool& rHasDates) + SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && pDBCollection ) { @@ -1506,7 +1506,7 @@ bool ScDocument::GetFilterEntries( bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, - std::vector<TypedStrData>& rStrings, bool& rHasDates) + std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) { @@ -1524,7 +1524,7 @@ bool ScDocument::GetFilterEntriesArea( bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, - std::vector<TypedStrData>& rStrings, bool bLimit ) + std::vector<ScTypedStrData>& rStrings, bool bLimit ) { if( !bLimit ) { @@ -1551,7 +1551,7 @@ bool ScDocument::GetDataEntries( if (!maTabs[nTab]) return false; - std::set<TypedStrData> aStrings; + std::set<ScTypedStrData> aStrings; bool bRet = maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit); rStrings.insert(rStrings.end(), aStrings.begin(), aStrings.end()); sortAndRemoveDuplicates(rStrings, bCaseSens); @@ -1573,7 +1573,7 @@ bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) { ScRangeName::const_iterator itr = pRangeName->begin(), itrEnd = pRangeName->end(); for (; itr != itrEnd; ++itr) - rStrings.insert(TypedStrData(itr->second->GetName(), 0.0, TypedStrData::Name)); + rStrings.insert(ScTypedStrData(itr->second->GetName(), 0.0, ScTypedStrData::Name)); } // @@ -1585,7 +1585,7 @@ bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) const ScDBCollection::NamedDBs& rDBs = pDBCollection->getNamedDBs(); ScDBCollection::NamedDBs::const_iterator itr = rDBs.begin(), itrEnd = rDBs.end(); for (; itr != itrEnd; ++itr) - rStrings.insert(TypedStrData(itr->GetName(), 0.0, TypedStrData::DbName)); + rStrings.insert(ScTypedStrData(itr->GetName(), 0.0, ScTypedStrData::DbName)); } // @@ -1608,7 +1608,7 @@ bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) if ( pCell->HasStringData() ) { rtl::OUString aStr = pCell->GetStringData(); - rStrings.insert(TypedStrData(aStr, 0.0, TypedStrData::Header)); + rStrings.insert(ScTypedStrData(aStr, 0.0, ScTypedStrData::Header)); } } } diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 11aed0c79f7c..36078ad62e8a 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2108,13 +2108,13 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol * return true; } -void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<TypedStrData>& rStrings, bool& rHasDates) +void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings, rHasDates ); } void ScTable::GetFilteredFilterEntries( - SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<TypedStrData>& rStrings, bool& rHasDates) + SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { // remove the entry for this column from the query parameter ScQueryParam aParam( rParam ); @@ -2135,7 +2135,7 @@ void ScTable::GetFilteredFilterEntries( rHasDates = bHasDates; } -bool ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, std::set<TypedStrData>& rStrings, bool bLimit) +bool ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit) { return aCol[nCol].GetDataEntries( nRow, rStrings, bLimit ); } diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index d8cc5dc215cf..277ab9835587 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -611,7 +611,7 @@ bool ScValidationData::HasSelectionList() const } bool ScValidationData::GetSelectionFromFormula( - std::vector<TypedStrData>* pStrings, ScBaseCell* pCell, const ScAddress& rPos, + std::vector<ScTypedStrData>* pStrings, ScBaseCell* pCell, const ScAddress& rPos, const ScTokenArray& rTokArr, int& rMatch) const { bool bOk = true; @@ -715,7 +715,7 @@ bool ScValidationData::GetSelectionFromFormula( for( nCol = 0; nCol < nCols ; nCol++ ) { ScTokenArray aCondTokArr; - TypedStrData* pEntry = NULL; + ScTypedStrData* pEntry = NULL; String aValStr; ScMatrixValue nMatVal = pValues->Get( nCol, nRow); @@ -725,7 +725,7 @@ bool ScValidationData::GetSelectionFromFormula( aValStr = nMatVal.GetString(); if( NULL != pStrings ) - pEntry = new TypedStrData( aValStr, 0.0, TypedStrData::Standard); + pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard); if( pCell && rMatch < 0 ) aCondTokArr.AddString( aValStr ); @@ -760,7 +760,7 @@ bool ScValidationData::GetSelectionFromFormula( aCondTokArr.AddDouble( nMatVal.fVal ); } if( NULL != pStrings ) - pEntry = new TypedStrData( aValStr, nMatVal.fVal, TypedStrData::Value); + pEntry = new ScTypedStrData( aValStr, nMatVal.fVal, ScTypedStrData::Value); } if( rMatch < 0 && NULL != pCell && IsEqualToTokenArray( pCell, rPos, aCondTokArr ) ) @@ -785,7 +785,7 @@ bool ScValidationData::GetSelectionFromFormula( return bOk || NULL == pCell; } -bool ScValidationData::FillSelectionList(std::vector<TypedStrData>& rStrColl, const ScAddress& rPos) const +bool ScValidationData::FillSelectionList(std::vector<ScTypedStrData>& rStrColl, const ScAddress& rPos) const { bool bOk = false; @@ -802,8 +802,8 @@ bool ScValidationData::FillSelectionList(std::vector<TypedStrData>& rStrColl, co double fValue; bool bIsValue = GetDocument()->GetFormatTable()->IsNumberFormat( *pString, nFormat, fValue ); rStrColl.push_back( - TypedStrData( - *pString, fValue, bIsValue ? TypedStrData::Value : TypedStrData::Standard)); + ScTypedStrData( + *pString, fValue, bIsValue ? ScTypedStrData::Value : ScTypedStrData::Standard)); } bOk = aIt.Ok(); diff --git a/sc/source/core/tool/typedstrdata.cxx b/sc/source/core/tool/typedstrdata.cxx index b991b15bf94f..8faaace4fab8 100644 --- a/sc/source/core/tool/typedstrdata.cxx +++ b/sc/source/core/tool/typedstrdata.cxx @@ -31,7 +31,7 @@ #include "unotools/transliterationwrapper.hxx" -bool TypedStrData::LessCaseSensitive::operator() (const TypedStrData& left, const TypedStrData& right) const +bool ScTypedStrData::LessCaseSensitive::operator() (const ScTypedStrData& left, const ScTypedStrData& right) const { if (left.meStrType != right.meStrType) return left.meStrType < right.meStrType; @@ -43,7 +43,7 @@ bool TypedStrData::LessCaseSensitive::operator() (const TypedStrData& left, cons left.maStrValue, right.maStrValue) < 0; } -bool TypedStrData::LessCaseInsensitive::operator() (const TypedStrData& left, const TypedStrData& right) const +bool ScTypedStrData::LessCaseInsensitive::operator() (const ScTypedStrData& left, const ScTypedStrData& right) const { if (left.meStrType != right.meStrType) return left.meStrType < right.meStrType; @@ -55,7 +55,7 @@ bool TypedStrData::LessCaseInsensitive::operator() (const TypedStrData& left, co left.maStrValue, right.maStrValue) < 0; } -bool TypedStrData::EqualCaseSensitive::operator() (const TypedStrData& left, const TypedStrData& right) const +bool ScTypedStrData::EqualCaseSensitive::operator() (const ScTypedStrData& left, const ScTypedStrData& right) const { if (left.meStrType != right.meStrType) return false; @@ -67,7 +67,7 @@ bool TypedStrData::EqualCaseSensitive::operator() (const TypedStrData& left, con left.maStrValue, right.maStrValue) == 0; } -bool TypedStrData::EqualCaseInsensitive::operator() (const TypedStrData& left, const TypedStrData& right) const +bool ScTypedStrData::EqualCaseInsensitive::operator() (const ScTypedStrData& left, const ScTypedStrData& right) const { if (left.meStrType != right.meStrType) return false; @@ -79,64 +79,64 @@ bool TypedStrData::EqualCaseInsensitive::operator() (const TypedStrData& left, c left.maStrValue, right.maStrValue) == 0; } -bool TypedStrData::operator== (const TypedStrData& r) const +bool ScTypedStrData::operator== (const ScTypedStrData& r) const { // Case insensitive comparison by default. EqualCaseInsensitive aHdl; return aHdl(*this, r); } -bool TypedStrData::operator< (const TypedStrData& r) const +bool ScTypedStrData::operator< (const ScTypedStrData& r) const { // Case insensitive comparison by default. LessCaseInsensitive aHdl; return aHdl(*this, r); } -TypedStrData::TypedStrData( +ScTypedStrData::ScTypedStrData( const rtl::OUString& rStr, double nVal, StringType nType ) : maStrValue(rStr), mfValue(nVal), meStrType(nType) {} -TypedStrData::TypedStrData( const TypedStrData& rCpy ) : +ScTypedStrData::ScTypedStrData( const ScTypedStrData& rCpy ) : maStrValue(rCpy.maStrValue), mfValue(rCpy.mfValue), meStrType(rCpy.meStrType) {} -bool TypedStrData::IsStrData() const +bool ScTypedStrData::IsStrData() const { return meStrType != Value; } -const rtl::OUString& TypedStrData::GetString() const +const rtl::OUString& ScTypedStrData::GetString() const { return maStrValue; } -double TypedStrData::GetValue() const +double ScTypedStrData::GetValue() const { return mfValue; } -TypedStrData::StringType TypedStrData::GetStringType() const +ScTypedStrData::StringType ScTypedStrData::GetStringType() const { return meStrType; } -FindTypedStrData::FindTypedStrData(const TypedStrData& rVal, bool bCaseSens) : +FindTypedStrData::FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens) : maVal(rVal), mbCaseSens(bCaseSens) {} -bool FindTypedStrData::operator() (const TypedStrData& r) const +bool FindTypedStrData::operator() (const ScTypedStrData& r) const { if (mbCaseSens) { - TypedStrData::EqualCaseSensitive aHdl; + ScTypedStrData::EqualCaseSensitive aHdl; return aHdl(maVal, r); } else { - TypedStrData::EqualCaseInsensitive aHdl; + ScTypedStrData::EqualCaseInsensitive aHdl; return aHdl(maVal, r); } } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 9891180525a8..b1329e2a3a75 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -133,8 +133,8 @@ ScTypedCaseStrSet::const_iterator findText( for (; it != itEnd; ++it) { - const TypedStrData& rData = *it; - if (rData.GetStringType() == TypedStrData::Value) + const ScTypedStrData& rData = *it; + if (rData.GetStringType() == ScTypedStrData::Value) // skip values. continue; @@ -154,8 +154,8 @@ ScTypedCaseStrSet::const_iterator findText( for (; it != itEnd; ++it) { - const TypedStrData& rData = *it; - if (rData.GetStringType() == TypedStrData::Value) + const ScTypedStrData& rData = *it; + if (rData.GetStringType() == ScTypedStrData::Value) // skip values. continue; @@ -176,8 +176,8 @@ rtl::OUString getExactMatch(const ScTypedCaseStrSet& rDataSet, const rtl::OUStri ScTypedCaseStrSet::const_iterator it = rDataSet.begin(), itEnd = rDataSet.end(); for (; it != itEnd; ++it) { - const TypedStrData& rData = *it; - if (rData.GetStringType() == TypedStrData::Value) + const ScTypedStrData& rData = *it; + if (rData.GetStringType() == ScTypedStrData::Value) continue; if (!ScGlobal::GetpTransliteration()->isEqual(rData.GetString(), rString)) @@ -749,7 +749,7 @@ void ScInputHandler::GetFormulaData() { String aEntry = *pDesc->pFuncName; aEntry.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" )); - pFormulaData->insert(TypedStrData(aEntry, 0.0, TypedStrData::Standard)); + pFormulaData->insert(ScTypedStrData(aEntry, 0.0, ScTypedStrData::Standard)); break; // nicht weitersuchen } } @@ -762,7 +762,7 @@ void ScInputHandler::GetFormulaData() { pDesc->initArgumentInfo(); String aEntry = pDesc->getSignature(); - pFormulaDataPara->insert(TypedStrData(aEntry, 0.0, TypedStrData::Standard)); + pFormulaDataPara->insert(ScTypedStrData(aEntry, 0.0, ScTypedStrData::Standard)); } } pDoc->GetFormulaEntries( *pFormulaData ); @@ -1278,7 +1278,7 @@ void ScInputHandler::PasteFunctionData() { if (pFormulaData && miAutoPos != pFormulaData->end()) { - const TypedStrData& rData = *miAutoPos; + const ScTypedStrData& rData = *miAutoPos; const rtl::OUString& aInsert = rData.GetString(); bool bParInserted = false; @@ -1528,7 +1528,7 @@ void ScInputHandler::GetColData() pColumnData = new ScTypedCaseStrSet; } - std::vector<TypedStrData> aEntries; + std::vector<ScTypedStrData> aEntries; pDoc->GetDataEntries( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), true, aEntries, true); if (!aEntries.empty()) diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 8cfa8986f4e3..94e23f8f1cff 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -547,24 +547,24 @@ void ScFilterDlg::UpdateValueList( size_t nList ) //! Entry (pHdrEntry) doesn't generate collection? pList->mnHeaderPos = INVALID_HEADER_POS; - std::vector<TypedStrData> aHdrColl; + std::vector<ScTypedStrData> aHdrColl; bool bDummy = false; pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nFirstRow, nTab, true, aHdrColl, bDummy ); if (!aHdrColl.empty()) { // See if the header value is already in the list. - std::vector<TypedStrData>::iterator itBeg = pList->maList.begin(), itEnd = pList->maList.end(); - std::vector<TypedStrData>::iterator it = std::find_if( + std::vector<ScTypedStrData>::iterator itBeg = pList->maList.begin(), itEnd = pList->maList.end(); + std::vector<ScTypedStrData>::iterator it = std::find_if( itBeg, itEnd, FindTypedStrData(aHdrColl.front(), bCaseSens)); if (it == itEnd) { // Not in the list. Insert it. pList->maList.push_back(aHdrColl.front()); if (bCaseSens) - std::sort(pList->maList.begin(), pList->maList.end(), TypedStrData::LessCaseSensitive()); + std::sort(pList->maList.begin(), pList->maList.end(), ScTypedStrData::LessCaseSensitive()); else - std::sort(pList->maList.begin(), pList->maList.end(), TypedStrData::LessCaseInsensitive()); + std::sort(pList->maList.begin(), pList->maList.end(), ScTypedStrData::LessCaseInsensitive()); // Record its position. itBeg = pList->maList.begin(); @@ -579,7 +579,7 @@ void ScFilterDlg::UpdateValueList( size_t nList ) OSL_ASSERT(pList); - std::vector<TypedStrData>::const_iterator it = pList->maList.begin(), itEnd = pList->maList.end(); + std::vector<ScTypedStrData>::const_iterator it = pList->maList.begin(), itEnd = pList->maList.end(); for (; it != itEnd; ++it) { pValList->InsertEntry(it->GetString(), nListPos); @@ -621,7 +621,7 @@ void ScFilterDlg::UpdateHdrInValueList( size_t nList ) ComboBox* pValList = maValueEdArr[nList-1]; size_t nListPos = nPos + 2; // for "empty" and "non-empty" - const TypedStrData& rHdrEntry = maEntryLists[nColumn].maList[nPos]; + const ScTypedStrData& rHdrEntry = maEntryLists[nColumn].maList[nPos]; const rtl::OUString& aHdrStr = rHdrEntry.GetString(); bool bWasThere = aHdrStr.equals(pValList->GetEntry(nListPos)); diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index a3b6298db6b5..4b2198e77198 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -347,13 +347,13 @@ void ScPivotFilterDlg::UpdateValueList( sal_uInt16 nList ) nFirstRow++; bool bHasDates = false; bool bCaseSens = aBtnCase.IsChecked(); - pEntryLists[nColumn] = new std::vector<TypedStrData>; + pEntryLists[nColumn] = new std::vector<ScTypedStrData>; pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nLastRow, nTab, bCaseSens, *pEntryLists[nColumn], bHasDates); } - std::vector<TypedStrData>* pColl = pEntryLists[nColumn]; - std::vector<TypedStrData>::const_iterator it = pColl->begin(), itEnd = pColl->end(); + std::vector<ScTypedStrData>* pColl = pEntryLists[nColumn]; + std::vector<ScTypedStrData>::const_iterator it = pColl->begin(), itEnd = pColl->end(); for (; it != itEnd; ++it) { pValList->InsertEntry(it->GetString(), nListPos); diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index ba147c974626..d473b23488ef 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -58,7 +58,7 @@ class ScFilterDlg : public ScAnyRefDlg { struct EntryList : boost::noncopyable { - std::vector<TypedStrData> maList; + std::vector<ScTypedStrData> maList; size_t mnHeaderPos; EntryList(); }; diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index b9cd841d3d47..e8e44daa6f9c 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -44,7 +44,7 @@ class ScViewData; class ScDocument; class ScQueryItem; -class TypedStrData; +class ScTypedStrData; //================================================================== @@ -108,7 +108,7 @@ private: ListBox* aFieldLbArr[3]; ListBox* aCondLbArr[3]; - std::vector<TypedStrData>* pEntryLists[MAXCOLCOUNT]; + std::vector<ScTypedStrData>* pEntryLists[MAXCOLCOUNT]; #ifdef _PFILTDLG_CXX private: diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e5405b9eef3f..4c852db3d0ad 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -690,11 +690,11 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) // Populate the check box list. bool bHasDates = false; - std::vector<TypedStrData> aStrings; + std::vector<ScTypedStrData> aStrings; pDoc->GetFilterEntries(nCol, nRow, nTab, true, aStrings, bHasDates); mpAutoFilterPopup->setMemberSize(aStrings.size()); - std::vector<TypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); + std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); for (; it != itEnd; ++it) { const rtl::OUString& aVal = it->GetString(); @@ -1165,7 +1165,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec // SetSize spaeter bool bEmpty = false; - std::vector<TypedStrData> aStrings; // case sensitive + std::vector<ScTypedStrData> aStrings; // case sensitive if ( bDataSelect ) // Auswahl-Liste { // Liste fuellen @@ -1202,7 +1202,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec // check widths of numerical entries (string entries are not included) // so all numbers are completely visible - std::vector<TypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); + std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); for (; it != itEnd; ++it) { if (!it->IsStrData()) // only numerical entries @@ -1250,7 +1250,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec if (bWait) EnterWait(); - std::vector<TypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); + std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end(); for (; it != itEnd; ++it) pFilterBox->InsertEntry(it->GetString()); @@ -1312,22 +1312,22 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec const ScValidationData* pData = pDoc->GetValidationEntry( nIndex ); if (pData) { - TypedStrData* pNew = NULL; + ScTypedStrData* pNew = NULL; rtl::OUString aDocStr; pDoc->GetString( nCol, nRow, nTab, aDocStr ); if ( pDoc->HasValueData( nCol, nRow, nTab ) ) { double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nTab)); - pNew = new TypedStrData(aDocStr, fVal, TypedStrData::Value); + pNew = new ScTypedStrData(aDocStr, fVal, ScTypedStrData::Value); } else - pNew = new TypedStrData(aDocStr, 0.0, TypedStrData::Standard); + pNew = new ScTypedStrData(aDocStr, 0.0, ScTypedStrData::Standard); bool bSortList = ( pData->GetListType() == ValidListType::SORTEDASCENDING); if ( bSortList ) { - std::vector<TypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end(); - std::vector<TypedStrData>::const_iterator it = + std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end(); + std::vector<ScTypedStrData>::const_iterator it = std::find_if(itBeg, itEnd, FindTypedStrData(*pNew, true)); if (it != itEnd) // Found! @@ -1335,9 +1335,9 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec } else { - TypedStrData::EqualCaseSensitive aHdl; - std::vector<TypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end(); - std::vector<TypedStrData>::const_iterator it = itBeg; + ScTypedStrData::EqualCaseSensitive aHdl; + std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end(); + std::vector<ScTypedStrData>::const_iterator it = itBeg; for (; it != itEnd && LISTBOX_ENTRY_NOTFOUND == nSelPos; ++it) { if (aHdl(*it, *pNew)) |