diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-09-03 12:02:53 -0300 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-09-04 20:50:19 +0000 |
commit | 62d50671919424ca4dd80cd7733b7b259132b9ab (patch) | |
tree | 62796e4e952d73685b1380e750d80dde354b2b95 /sc | |
parent | a25846baf1137e7086292d8d8824a94f6a825166 (diff) |
Remove more unused methods
Change-Id: I8fec40d767905bcca366257a67f669eaa1055cbc
Reviewed-on: https://gerrit.libreoffice.org/5789
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/compiler.hxx | 12 | ||||
-rw-r--r-- | sc/inc/dpobject.hxx | 4 | ||||
-rw-r--r-- | sc/inc/formulacell.hxx | 3 | ||||
-rw-r--r-- | sc/inc/rangenam.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 215 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 17 | ||||
-rw-r--r-- | sc/source/core/inc/ddelink.hxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 29 | ||||
-rw-r--r-- | sc/source/core/tool/ddelink.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/tool/rangenam.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleValueSet.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleValueSet.hxx | 2 |
12 files changed, 0 insertions, 312 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 5ce3a5d641e3..1870ddc1d07d 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -437,18 +437,6 @@ public: static void MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ); - /** If the character is allowed as first character in sheet names or - references, includes '$' and '?'. */ - static bool IsCharWordChar( - String const & rStr, xub_StrLen nPos, - const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ); - - /** If the character is allowed in sheet names, thus may be part of a - reference, includes '$' and '?' and such. */ - static bool IsWordChar( - String const & rStr, xub_StrLen nPos, - const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ); - /** If the character is allowed as tested by nFlags (SC_COMPILER_C_... bits) for all known address conventions. If more than one bit is given in nFlags, all bits must match. If bTestLetterNumeric is false and diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index bbd3ba88f62b..b2f6e380d8c9 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -183,10 +183,6 @@ public: const OUString& rDataFieldName, std::vector<com::sun::star::sheet::DataPilotFieldFilter>& rFilters); - bool ParseFilters( ScDPGetPivotDataField& rTarget, - std::vector< ScDPGetPivotDataField >& rFilters, - const OUString& rFilterList ); - void GetMemberResultNames(ScDPUniqueStringSet& rNames, long nDimension); void ToggleDetails(const ::com::sun::star::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index c8a7414e4528..835eb91f9635 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -244,7 +244,6 @@ public: bool IsValueNoError(); bool IsHybridValueCell(); // for cells after import to deal with inherited number formats double GetValue(); - double GetValueAlways(); // ignore errors OUString GetString(); const ScMatrix* GetMatrix(); bool GetMatrixOrigin( ScAddress& rPos ) const; @@ -309,7 +308,6 @@ public: void SetResultToken( const formula::FormulaToken* pToken ); - double GetResultDouble() const; OUString GetResultString() const; void SetErrCode( sal_uInt16 n ); @@ -342,7 +340,6 @@ public: void EndListeningTo( sc::EndListeningContext& rCxt ); bool IsShared() const; - bool IsSharedInvariant() const; bool IsSharedTop() const; SCROW GetSharedTopRow() const; SCROW GetSharedLength() const; diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index e2731b5663f5..007ed70861a2 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -148,9 +148,7 @@ public: static void MakeValidName( String& rName ); SC_DLLPUBLIC static bool IsNameValid( const String& rName, ScDocument* pDoc ); - SC_DLLPUBLIC void SetMaxRow(SCROW nRow); SCROW GetMaxRow() const; - SC_DLLPUBLIC void SetMaxCol(SCCOL nCol); SCCOL GetMaxCol() const; void CompileUnresolvedXML(); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index eca69a93e447..3c5f7b2ba1e4 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1623,221 +1623,6 @@ static bool lcl_IsAtStart( const String& rList, const String& rSearch, sal_Int32 return false; } -bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget, - std::vector< ScDPGetPivotDataField >& rFilters, - const OUString& rFilterList ) -{ - // parse the string rFilterList into parameters for GetPivotData - - CreateObjects(); // create xSource if not already done - - std::vector<String> aDataNames; // data fields (source name) - std::vector<String> aGivenNames; // data fields (compound name) - std::vector<String> aFieldNames; // column/row/data fields - std::vector< uno::Sequence<OUString> > aFieldValues; - - // - // get all the field and item names - // - - uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); - uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName ); - sal_Int32 nDimCount = xIntDims->getCount(); - for ( sal_Int32 nDim = 0; nDim<nDimCount; nDim++ ) - { - uno::Reference<uno::XInterface> xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nDim) ); - uno::Reference<container::XNamed> xDim( xIntDim, uno::UNO_QUERY ); - uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY ); - uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY ); - sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, - OUString(SC_UNO_DP_ISDATALAYOUT) ); - sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty( - xDimProp, OUString(SC_UNO_DP_ORIENTATION), - sheet::DataPilotFieldOrientation_HIDDEN ); - if ( !bDataLayout ) - { - if ( nOrient == sheet::DataPilotFieldOrientation_DATA ) - { - OUString aSourceName; - OUString aGivenName; - ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xIntDim ); - aDataNames.push_back( aSourceName ); - aGivenNames.push_back( aGivenName ); - } - else if ( nOrient != sheet::DataPilotFieldOrientation_HIDDEN ) - { - // get level names, as in ScDPOutput - - uno::Reference<container::XIndexAccess> xHiers = new ScNameToIndexAccess( xDimSupp->getHierarchies() ); - sal_Int32 nHierarchy = ScUnoHelpFunctions::GetLongProperty( xDimProp, - OUString(SC_UNO_DP_USEDHIERARCHY) ); - if ( nHierarchy >= xHiers->getCount() ) - nHierarchy = 0; - - uno::Reference<uno::XInterface> xHier = ScUnoHelpFunctions::AnyToInterface( - xHiers->getByIndex(nHierarchy) ); - uno::Reference<sheet::XLevelsSupplier> xHierSupp( xHier, uno::UNO_QUERY ); - if ( xHierSupp.is() ) - { - uno::Reference<container::XIndexAccess> xLevels = new ScNameToIndexAccess( xHierSupp->getLevels() ); - sal_Int32 nLevCount = xLevels->getCount(); - for (sal_Int32 nLev=0; nLev<nLevCount; nLev++) - { - uno::Reference<uno::XInterface> xLevel = ScUnoHelpFunctions::AnyToInterface( - xLevels->getByIndex(nLev) ); - uno::Reference<container::XNamed> xLevNam( xLevel, uno::UNO_QUERY ); - uno::Reference<sheet::XMembersSupplier> xLevSupp( xLevel, uno::UNO_QUERY ); - if ( xLevNam.is() && xLevSupp.is() ) - { - uno::Reference<container::XNameAccess> xMembers = xLevSupp->getMembers(); - - String aFieldName( xLevNam->getName() ); - uno::Sequence<OUString> aMemberNames( xMembers->getElementNames() ); - - aFieldNames.push_back( aFieldName ); - aFieldValues.push_back( aMemberNames ); - } - } - } - } - } - } - - // - // compare and build filters - // - - SCSIZE nDataFields = aDataNames.size(); - SCSIZE nFieldCount = aFieldNames.size(); - OSL_ENSURE( aGivenNames.size() == nDataFields && aFieldValues.size() == nFieldCount, "wrong count" ); - - bool bError = false; - bool bHasData = false; - String aRemaining(comphelper::string::strip(rFilterList, ' ')); - while ( aRemaining.Len() && !bError ) - { - bool bUsed = false; - - // look for data field name - - for ( SCSIZE nDataPos=0; nDataPos<nDataFields && !bUsed; nDataPos++ ) - { - String aFound; - sal_Int32 nMatched = 0; - if ( lcl_IsAtStart( aRemaining, aDataNames[nDataPos], nMatched, false, NULL ) ) - aFound = aDataNames[nDataPos]; - else if ( lcl_IsAtStart( aRemaining, aGivenNames[nDataPos], nMatched, false, NULL ) ) - aFound = aGivenNames[nDataPos]; - - if ( aFound.Len() ) - { - rTarget.maFieldName = aFound; - aRemaining.Erase( 0, sal::static_int_cast<xub_StrLen>(nMatched) ); - bHasData = true; - bUsed = true; - } - } - - // look for field name - - String aSpecField; - bool bHasFieldName = false; - if ( !bUsed ) - { - sal_Int32 nMatched = 0; - for ( SCSIZE nField=0; nField<nFieldCount && !bHasFieldName; nField++ ) - { - if ( lcl_IsAtStart( aRemaining, aFieldNames[nField], nMatched, true, NULL ) ) - { - aSpecField = aFieldNames[nField]; - aRemaining.Erase( 0, sal::static_int_cast<xub_StrLen>(nMatched) ); - aRemaining = comphelper::string::stripStart(aRemaining, ' '); - - // field name has to be followed by item name in brackets - if ( aRemaining.GetChar(0) == '[' ) - { - bHasFieldName = true; - // bUsed remains false - still need the item - } - else - { - bUsed = true; - bError = true; - } - } - } - } - - // look for field item - - if ( !bUsed ) - { - bool bItemFound = false; - sal_Int32 nMatched = 0; - String aFoundName; - String aFoundValue; - sheet::GeneralFunction eFunc = sheet::GeneralFunction_NONE; - sheet::GeneralFunction eFoundFunc = sheet::GeneralFunction_NONE; - - for ( SCSIZE nField=0; nField<nFieldCount; nField++ ) - { - // If a field name is given, look in that field only, otherwise in all fields. - // aSpecField is initialized from aFieldNames array, so exact comparison can be used. - if ( !bHasFieldName || aFieldNames[nField] == aSpecField ) - { - const uno::Sequence<OUString>& rItems = aFieldValues[nField]; - sal_Int32 nItemCount = rItems.getLength(); - const OUString* pItemArr = rItems.getConstArray(); - for ( sal_Int32 nItem=0; nItem<nItemCount; nItem++ ) - { - if ( lcl_IsAtStart( aRemaining, pItemArr[nItem], nMatched, false, &eFunc ) ) - { - if ( bItemFound ) - bError = true; // duplicate (also across fields) - else - { - aFoundName = aFieldNames[nField]; - aFoundValue = pItemArr[nItem]; - eFoundFunc = eFunc; - bItemFound = true; - bUsed = true; - } - } - } - } - } - - if ( bItemFound && !bError ) - { - ScDPGetPivotDataField aField; - aField.maFieldName = aFoundName; - aField.meFunction = eFoundFunc; - aField.mbValIsStr = true; - aField.maValStr = aFoundValue; - aField.mnValNum = 0.0; - rFilters.push_back( aField ); - - aRemaining.Erase( 0, sal::static_int_cast<xub_StrLen>(nMatched) ); - } - } - - if ( !bUsed ) - bError = true; - - // remove any number of spaces between entries - aRemaining = comphelper::string::stripStart(aRemaining, ' '); - } - - if ( !bError && !bHasData && aDataNames.size() == 1 ) - { - // if there's only one data field, its name need not be specified - rTarget.maFieldName = aDataNames[0]; - bHasData = true; - } - - return bHasData && !bError; -} - void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj) { CreateObjects(); // create xSource if not already done diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 2ca77d10eb77..da2f75bbb617 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -1700,11 +1700,6 @@ void ScFormulaCell::SetResultToken( const formula::FormulaToken* pToken ) aResult.SetToken(pToken); } -double ScFormulaCell::GetResultDouble() const -{ - return aResult.GetDouble(); -} - OUString ScFormulaCell::GetResultString() const { return aResult.GetString(); @@ -1869,13 +1864,6 @@ double ScFormulaCell::GetValue() return 0.0; } -double ScFormulaCell::GetValueAlways() -{ - // for goal seek: return result value even if error code is set - MaybeInterpret(); - return aResult.GetDouble(); -} - OUString ScFormulaCell::GetString() { MaybeInterpret(); @@ -3849,11 +3837,6 @@ bool ScFormulaCell::IsShared() const return mxGroup.get() != NULL; } -bool ScFormulaCell::IsSharedInvariant() const -{ - return mxGroup ? mxGroup->mbInvariant : false; -} - bool ScFormulaCell::IsSharedTop() const { if (!mxGroup) diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx index be1c0f7377e0..309bac8b7c89 100644 --- a/sc/source/core/inc/ddelink.hxx +++ b/sc/source/core/inc/ddelink.hxx @@ -70,9 +70,6 @@ public: const ScMatrix* GetResult() const; void SetResult( const ScMatrixRef& pRes ); - // XML and Excel import after NewData() - ScMatrixRef GetModifiableResult(); - const String& GetAppl() const { return aAppl; } const String& GetTopic() const { return aTopic; } const String& GetItem() const { return aItem; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 62d4178f6bc8..5e58cc6aa1e9 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4137,35 +4137,6 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddr } } -bool ScCompiler::IsCharWordChar( - String const & rStr, xub_StrLen nPos, const formula::FormulaGrammar::AddressConvention eConv ) -{ - sal_Unicode c = rStr.GetChar( nPos ); - sal_Unicode cLast = nPos > 0 ? rStr.GetChar(nPos-1) : 0; - if (c < 128) - { - return pConventions[eConv] ? (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD : - false; // no convention => assume invalid - } - else - return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos ); -} - -bool ScCompiler::IsWordChar( - String const & rStr, xub_StrLen nPos, - const formula::FormulaGrammar::AddressConvention eConv ) -{ - sal_Unicode c = rStr.GetChar( nPos ); - sal_Unicode cLast = nPos > 0 ? rStr.GetChar(nPos-1) : 0; - if (c < 128) - { - return pConventions[eConv] ? (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD : - false; // convention not known => assume invalid - } - else - return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos ); -} - bool ScCompiler::IsCharFlagAllConventions( String const & rStr, xub_StrLen nPos, sal_uLong nFlags, bool bTestLetterNumeric ) { diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 4228d7ebcca1..e007c8572d8a 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -249,11 +249,6 @@ void ScDdeLink::SetResult( const ScMatrixRef& pRes ) pResult = pRes; } -ScMatrixRef ScDdeLink::GetModifiableResult() -{ - return pResult; -} - void ScDdeLink::TryUpdate() { if (bIsInUpdate) diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 5df981302cfc..23245dcd2f58 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -489,21 +489,11 @@ bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) return true; } -void ScRangeData::SetMaxRow(SCROW nRow) -{ - mnMaxRow = nRow; -} - SCROW ScRangeData::GetMaxRow() const { return mnMaxRow >= 0 ? mnMaxRow : MAXROW; } -void ScRangeData::SetMaxCol(SCCOL nCol) -{ - mnMaxCol = nCol; -} - SCCOL ScRangeData::GetMaxCol() const { return mnMaxCol >= 0 ? mnMaxCol : MAXCOL; diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index b0935031a45e..96d6f07b69af 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -59,21 +59,11 @@ void CellLineStyleValueSet::SetSelItem(sal_uInt16 nSel) } } -sal_uInt16 CellLineStyleValueSet::GetSelItem() -{ - return nSelItem; -} - void CellLineStyleValueSet::SetImage(Image img) { imgCus = img; } -void CellLineStyleValueSet::SetCusEnable(bool bEnable) -{ - bCusEnable = bEnable; -} - void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { Rectangle aRect = rUDEvt.GetRect(); diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx index 6044b998037f..711213c1f816 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx @@ -39,9 +39,7 @@ public: void SetUnit(const OUString* str); void SetSelItem(sal_uInt16 nSel); - sal_uInt16 GetSelItem(); void SetImage(Image img); - void SetCusEnable(bool bEnable); virtual void UserDraw( const UserDrawEvent& rUDEvt ); }; |