summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-17 12:53:28 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-17 14:05:31 +0100
commita47cb498471f38987c248519435bc4867ffa456e (patch)
tree177544d89f8055a08b2d827b40451ed32b1e420a /sc
parente532fc14d3804d7e812de4fb083e082b48300ed7 (diff)
remove unused ScDP* methods
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dpglobal.hxx6
-rw-r--r--sc/inc/dpobject.hxx4
-rw-r--r--sc/inc/dpsave.hxx1
-rw-r--r--sc/inc/dptablecache.hxx5
-rw-r--r--sc/source/core/data/dpobject.cxx39
-rw-r--r--sc/source/core/data/dpsave.cxx57
-rw-r--r--sc/source/core/data/dptablecache.cxx58
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx11
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx6
9 files changed, 0 insertions, 187 deletions
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 9d99b6988809..55a6aeae24ff 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -136,23 +136,17 @@ public:
// case insensitive equality
static sal_Int32 Compare( const ScDPItemData& rA, const ScDPItemData& rB );
-#if OSL_DEBUG_LEVEL > 1
- void dump() const;
-#endif
-
public:
bool IsHasData() const ;
bool IsHasErr() const ;
bool IsValue() const;
String GetString() const ;
double GetValue() const ;
- sal_uLong GetNumFormat() const ;
bool HasStringData() const ;
bool IsDate() const;
bool HasDatePart() const;
void SetDate( bool b ) ;
- TypedStrData* CreateTypeString( );
sal_uInt8 GetType() const;
sal_uInt8 & GetFlag() throw() { return mbFlag; }
const sal_uInt8 & GetFlag() const throw() { return const_cast<ScDPItemData*>(this)->GetFlag(); }
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 47c1999a005b..a894833f07d0 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -278,7 +278,6 @@ public:
private:
void updateCache(const ScRange& rRange, std::set<ScDPObject*>& rRefs);
- void removeCache(const ScRange& rRange);
bool remove(const ScDPCache* p);
};
@@ -298,7 +297,6 @@ public:
size_t size() const;
private:
void updateCache(const rtl::OUString& rName, const ScRange& rRange, std::set<ScDPObject*>& rRefs);
- void removeCache(const ::rtl::OUString& rName);
bool remove(const ScDPCache* p);
};
@@ -331,7 +329,6 @@ public:
public:
DBCaches(ScDocument* pDoc);
const ScDPCache* getCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand);
- size_t size() const;
private:
com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet> createRowSet(
@@ -339,7 +336,6 @@ public:
void updateCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand,
std::set<ScDPObject*>& rRefs);
- void removeCache(sal_Int32 nSdbType, const ::rtl::OUString& rDBName, const ::rtl::OUString& rCommand);
bool remove(const ScDPCache* p);
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index fc16b49b0ad8..ee2fd6d0573e 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -328,7 +328,6 @@ public:
{ return bDrillDown; }
void WriteToSource( const com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>& xSource );
- void Refresh( const com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>& xSource );
bool IsEmpty() const;
const ScDPDimensionSaveData* GetExistingDimensionData() const
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index dcfc066e29de..c4c2ebcb2f05 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -103,19 +103,15 @@ public:
SCROW GetIdByItemData( long nDim, const String& sItemData ) const;
SCROW GetIdByItemData( long nDim, const ScDPItemData& rData ) const;
- SCROW GetAdditionalItemID ( const String& sItemData ) const;
SCROW GetAdditionalItemID( const ScDPItemData& rData ) const;
SCCOL GetDimensionIndex( String sName) const;
- const ScDPItemData* GetSortedItemData( SCCOL nDim, SCROW nOrder ) const;
sal_uLong GetNumType ( sal_uLong nFormat ) const;
sal_uLong GetNumberFormat( long nDim ) const;
bool IsDateDimension( long nDim ) const ;
- sal_uLong GetDimNumType( SCCOL nDim) const;
SCROW GetDimMemberCount( SCCOL nDim ) const;
SCROW GetOrder( long nDim, SCROW nIndex ) const;
- SCROW GetSortedItemDataId( SCCOL nDim, SCROW nOrder ) const;
const DataListType& GetDimMemberValues( SCCOL nDim ) const;
bool InitFromDoc(ScDocument* pDoc, const ScRange& rRange);
bool InitFromDataBase(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xRowSet, const Date& rNullDate);
@@ -123,7 +119,6 @@ public:
SCROW GetRowCount() const;
SCROW GetItemDataId( sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
String GetDimensionName( sal_uInt16 nColumn ) const;
- bool IsEmptyMember( SCROW nRow, sal_uInt16 nColumn ) const;
bool IsRowEmpty( SCROW nRow ) const;
bool IsValid() const;
bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam) const;
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();