diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-01-17 12:53:28 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-01-17 14:05:31 +0100 |
commit | a47cb498471f38987c248519435bc4867ffa456e (patch) | |
tree | 177544d89f8055a08b2d827b40451ed32b1e420a /sc/source | |
parent | e532fc14d3804d7e812de4fb083e082b48300ed7 (diff) |
remove unused ScDP* methods
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 39 | ||||
-rw-r--r-- | sc/source/core/data/dpsave.cxx | 57 | ||||
-rw-r--r-- | sc/source/core/data/dptablecache.cxx | 58 | ||||
-rw-r--r-- | sc/source/ui/dbgui/fieldwnd.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/inc/fieldwnd.hxx | 6 |
5 files changed, 0 insertions, 171 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 3113f1b43de6..984d3de55bf1 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2597,25 +2597,6 @@ void ScDPCollection::SheetCaches::updateCache(const ScRange& rRange, std::set<Sc rRefs.swap(aRefs); } -void ScDPCollection::SheetCaches::removeCache(const ScRange& rRange) -{ - RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); - if (it == maRanges.end()) - // Not cached. Nothing to do. - return; - - size_t nIndex = std::distance(maRanges.begin(), it); - CachesType::iterator itCache = maCaches.find(nIndex); - if (itCache == maCaches.end()) - { - OSL_FAIL("Cache pool and index pool out-of-sync !!!"); - return; - } - - it->SetInvalid(); // Make this slot available for future caches. - maCaches.erase(itCache); -} - bool ScDPCollection::SheetCaches::remove(const ScDPCache* p) { CachesType::iterator it = maCaches.begin(), itEnd = maCaches.end(); @@ -2675,13 +2656,6 @@ void ScDPCollection::NameCaches::updateCache(const OUString& rName, const ScRang rRefs.swap(aRefs); } -void ScDPCollection::NameCaches::removeCache(const OUString& rName) -{ - CachesType::iterator itr = maCaches.find(rName); - if (itr != maCaches.end()) - maCaches.erase(itr); -} - bool ScDPCollection::NameCaches::remove(const ScDPCache* p) { CachesType::iterator it = maCaches.begin(), itEnd = maCaches.end(); @@ -2729,11 +2703,6 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OU return p; } -size_t ScDPCollection::DBCaches::size() const -{ - return maCaches.size(); -} - uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet( sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand) { @@ -2832,14 +2801,6 @@ void ScDPCollection::DBCaches::updateCache( aRefs.swap(rRefs); } -void ScDPCollection::DBCaches::removeCache(sal_Int32 nSdbType, const OUString& rDBName, const OUString& rCommand) -{ - DBType aType(nSdbType, rDBName, rCommand); - CachesType::iterator itr = maCaches.find(aType); - if (itr != maCaches.end()) - maCaches.erase(itr); -} - bool ScDPCollection::DBCaches::remove(const ScDPCache* p) { CachesType::iterator it = maCaches.begin(), itEnd = maCaches.end(); diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 33bcc42dd516..e8a48b731b30 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -1241,63 +1241,6 @@ bool ScDPSaveData::HasInvisibleMember(const OUString& rDimName) const return pDim->HasInvisibleMember(); } -void ScDPSaveData::Refresh( const uno::Reference<sheet::XDimensionsSupplier>& xSource ) -{ - try - { - std::list<rtl::OUString> deletedDims; - - { - boost::ptr_vector<ScDPSaveDimension>::iterator iter = aDimList.end()-1; - for (long i = aDimList.size()-1; i >= 0; ++i,--iter) - { - rtl::OUString aName = iter->GetName(); - if ( iter->IsDataLayout() ) - continue; - - uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); - uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName ); - long nIntCount = xIntDims->getCount(); - bool bFound = false; - for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++) - { - uno::Reference<uno::XInterface> xIntDim = ScUnoHelpFunctions::AnyToInterface( xIntDims->getByIndex(nIntDim) ); - uno::Reference<container::XNamed> xDimName( xIntDim, uno::UNO_QUERY ); - if ( xDimName.is() && xDimName->getName() == aName ) - bFound = true; - } - - if ( !bFound ) - { - deletedDims.push_back( aName ); - iter = aDimList.erase(iter); - OSL_FAIL( "\n Remove dim: \t" ); - OSL_TRACE( "%s", aName.getStr() ); - } - - } - } - - { - boost::ptr_vector<ScDPSaveDimension>::reverse_iterator iter; - for (iter = aDimList.rbegin(); iter != aDimList.rend(); ++iter) //check every dimension ?? - { - rtl::OUString aName = iter->GetName(); - if ( iter->IsDataLayout() ) - continue; - iter->Refresh( xSource, deletedDims ); - - } - } - - mbDimensionMembersBuilt = false; // there may be new members - } - catch(uno::Exception&) - { - OSL_FAIL("error in ScDPSaveData::Refresh"); - } -} - void ScDPSaveDimension::Refresh( const com::sun::star::uno::Reference< com::sun::star::sheet::XDimensionsSupplier>& xSource , const std::list<rtl::OUString>& deletedDims) diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index ed45647a191b..6dd05e9b398a 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -306,24 +306,6 @@ sal_Int32 ScDPItemData::Compare( const ScDPItemData& rA, return ScGlobal::GetCollator()->compareString( rA.aString, rB.aString ); } -#if OSL_DEBUG_LEVEL > 1 -void ScDPItemData::dump() const -{ - OSL_TRACE( "Numberformat= %o", nNumFormat ); - OSL_TRACE( "%s", aString.GetBuffer() ); - OSL_TRACE( "fValue= %f", fValue ); - OSL_TRACE( "mbFlag= %d", mbFlag); -} -#endif - -TypedStrData* ScDPItemData::CreateTypeString( ) -{ - if ( IsValue() ) - return new TypedStrData( aString, fValue, SC_STRTYPE_VALUE ); - else - return new TypedStrData( aString ); -} - sal_uInt8 ScDPItemData::GetType() const { if ( IsHasErr() ) @@ -360,10 +342,6 @@ double ScDPItemData::GetValue() const { return fValue; } -sal_uLong ScDPItemData::GetNumFormat() const -{ - return nNumFormat; -} bool ScDPItemData::HasStringData() const { @@ -597,16 +575,6 @@ bool ScDPCache::InitFromDataBase (const Reference<sdbc::XRowSet>& xRowSet, const } } -sal_uLong ScDPCache::GetDimNumType( SCCOL nDim) const -{ - OSL_ENSURE( IsValid(), " IsValid() == false " ); - OSL_ENSURE( nDim < mnColumnCount && nDim >=0, " dimention out of bound " ); - if ( maTableDataValues[nDim].size()==0 ) - return NUMBERFORMAT_UNDEFINED; - else - return GetNumType(maTableDataValues[nDim][0].nNumFormat); -} - bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam &rParam) const { if (!rParam.GetEntry(0).bDoQuery) @@ -805,11 +773,6 @@ bool ScDPCache::IsRowEmpty( SCROW nRow ) const return mbEmptyRow[ nRow ]; } -bool ScDPCache::IsEmptyMember( SCROW nRow, sal_uInt16 nColumn ) const -{ - return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, false ) )->IsHasData(); -} - bool ScDPCache::AddData(long nDim, ScDPItemData* pData) { OSL_ENSURE( IsValid(), " IsValid() == false " ); @@ -926,15 +889,6 @@ const ScDPCache::DataListType& ScDPCache::GetDimMemberValues(SCCOL nDim) const return maTableDataValues[nDim]; } -SCROW ScDPCache::GetSortedItemDataId(SCCOL nDim, SCROW nOrder) const -{ - OSL_ENSURE ( IsValid(), "IsValid"); - OSL_ENSURE( nDim>=0 && nDim < mnColumnCount, "nDim < mnColumnCount"); - OSL_ENSURE( nOrder >= 0 && (size_t) nOrder < maGlobalOrder[nDim].size(), "nOrder < mpGlobalOrder[nDim].size()" ); - - return maGlobalOrder[nDim][nOrder]; -} - sal_uLong ScDPCache::GetNumType(sal_uLong nFormat) const { SvNumberFormatter* pFormatter = mpDoc->GetFormatTable(); @@ -987,12 +941,6 @@ SCROW ScDPCache::GetDimMemberCount( SCCOL nDim ) const return maTableDataValues[nDim].size(); } -const ScDPItemData* ScDPCache::GetSortedItemData(SCCOL nDim, SCROW nOrder) const -{ - SCROW n = GetSortedItemDataId( nDim, nOrder ); - return GetItemDataById( nDim, n ); -} - SCCOL ScDPCache::GetDimensionIndex(String sName) const { for (size_t i = 1; i < maLabelNames.size(); ++i) @@ -1052,12 +1000,6 @@ SCROW ScDPCache::GetIdByItemData( long nDim, const ScDPItemData& rData ) const return GetRowCount() + maAdditionalData.getDataId(rData); } -SCROW ScDPCache::GetAdditionalItemID ( const String& sItemData ) const -{ - ScDPItemData rData ( sItemData ); - return GetAdditionalItemID( rData ); -} - SCROW ScDPCache::GetAdditionalItemID( const ScDPItemData& rData ) const { return GetRowCount() + maAdditionalData.insertData( rData ); diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index dc438f3bb4b9..40eb873cea28 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -560,11 +560,6 @@ void ScDPFieldControlBase::DrawField( rDev.DrawBitmap( rRect.TopLeft(), aVirDev.GetBitmap( Point( 0, 0 ), aDevSize ) ); } -ScDPLayoutDlg* ScDPFieldControlBase::GetParentDlg() const -{ - return mpDlg; -} - void ScDPFieldControlBase::AppendPaintable(Window* p) { maPaintables.push_back(p); @@ -681,12 +676,6 @@ void ScDPFieldControlBase::MoveSelection(SCsCOL nDX, SCsROW nDY) SetSelection( nNewIndex ); } -void ScDPFieldControlBase::ModifySelectionOffset( long nOffsetDiff ) -{ - mnFieldSelected -= nOffsetDiff; - Redraw(); -} - void ScDPFieldControlBase::SelectNext() { SetSelection(mnFieldSelected + 1); diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx index edd8aec6a568..2b232cf9428b 100644 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -151,10 +151,6 @@ public: size_t GetSelectedField() const; void SetSelectedField(size_t nSelected); - /** Notifies this control that the offset of the first field has been changed. - The control has to adjust the selection to keep the same field selected - on scrolling with scrollbar. */ - void ModifySelectionOffset( long nOffsetDiff ); /** Selects the next field. Called i.e. after moving a field from SELECT area. */ void SelectNext(); /** Grabs focus and sets new selection. */ @@ -190,8 +186,6 @@ protected: void DrawField( OutputDevice& rDev, const Rectangle& rRect, FieldName& rText, bool bFocus ); - ScDPLayoutDlg* GetParentDlg() const; - void AppendPaintable(Window* p); void DrawPaintables(); void DrawInvertSelection(); |