summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorElton Chung <elton@layerjet.com>2012-03-04 15:27:27 +0800
committerTor Lillqvist <tml@iki.fi>2012-03-05 10:35:50 +0200
commita1a1131c16227327d17bcf5ad2a5209ddc0f01a1 (patch)
tree5766be6474c0ce1ecccb00024260a0487110b639 /sc
parent2bdac353ce7e28611b546bcc8a5ea236c891f944 (diff)
Remove unused code
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/conditio.hxx4
-rw-r--r--sc/inc/dpsave.hxx2
-rw-r--r--sc/inc/postit.hxx2
-rw-r--r--sc/inc/rangenam.hxx1
-rw-r--r--sc/source/core/data/conditio.cxx9
-rw-r--r--sc/source/core/data/dpsave.cxx116
-rw-r--r--sc/source/core/data/postit.cxx9
-rw-r--r--sc/source/core/tool/rangenam.cxx28
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx8
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx3
10 files changed, 0 insertions, 182 deletions
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 8d84e4cdeb7b..2567f7905527 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -295,10 +295,6 @@ public:
void SourceChanged( const ScAddress& rAddr );
- /** Temporarily during save, returns RefManager's decision whether ALL
- * references are marked now. */
- bool MarkUsedExternalReferences() const;
-
sal_Bool operator==( const ScConditionalFormatList& r ) const; // for Ref-Undo
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index a699d61c0084..c4df4eda7b76 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -226,8 +226,6 @@ public:
void SetMemberPosition( const ::rtl::OUString& rName, sal_Int32 nNewPos );
void WriteToSource( const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& xDim );
- void Refresh( const com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier>& xSource ,
- const std::list<rtl::OUString> & deletedDims);
void UpdateMemberVisibility(const ::boost::unordered_map< ::rtl::OUString, bool, ::rtl::OUStringHash>& rData);
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 1b370ceacb32..e553c92dee60 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -130,8 +130,6 @@ public:
/** Returns the caption text of this note. */
::rtl::OUString GetText() const;
- /** Returns true, if the caption text of this note contains line breaks. */
- bool HasMultiLineText() const;
/** Changes the caption text of this note. All text formatting will be lost. */
void SetText( const ScAddress& rPos, const ::rtl::OUString& rText );
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 90edb8d73c6c..3d8f626e0594 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -153,7 +153,6 @@ public:
bool IsRangeAtBlock( const ScRange& ) const;
void UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable, SCTAB nNewSheets);
- void TransferTabRef( SCTAB nOldTab, SCTAB nNewTab );
void ValidateTabRefs();
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index ac4fa9e61e98..09791d7e2098 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1674,13 +1674,4 @@ void ScConditionalFormatList::SourceChanged( const ScAddress& rAddr )
(*this)[i]->SourceChanged( rAddr );
}
-bool ScConditionalFormatList::MarkUsedExternalReferences() const
-{
- bool bAllMarked = false;
- sal_uInt16 nCount = Count();
- for (sal_uInt16 i=0; !bAllMarked && i<nCount; i++)
- bAllMarked = (*this)[i]->MarkUsedExternalReferences();
- return bAllMarked;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 15c377bc853d..e112e6c5fdff 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1317,122 +1317,6 @@ ScDPSaveDimension* ScDPSaveData::AppendNewDimension(const rtl::OUString& rName,
return pNew;
}
-void ScDPSaveDimension::Refresh( const com::sun::star::uno::Reference<
- com::sun::star::sheet::XDimensionsSupplier>& xSource ,
- const std::list<rtl::OUString>& deletedDims)
-{
- if ( xSource.is() )
- {
- ScDPSource* pTabSource = static_cast<ScDPSource*>( xSource.get() );
- const ScDPCache* pCache = pTabSource->GetCache();
-
- SCCOL nSrcDim = pCache->GetDimensionIndex( GetName() );
-
- if ( nSrcDim == -1 )
- return;
- if ( pSelectedPage )
- {//check pSelected page
- OSL_TRACE( "%s", ::rtl::OUString(*pSelectedPage).getStr() );
- if ( pCache->GetIdByItemData( nSrcDim, *pSelectedPage ) == -1 )
- {
- delete pSelectedPage;
- pSelectedPage = NULL;
- }
-
- };
-
- if ( pReferenceValue && pReferenceValue->ReferenceItemType == DataPilotFieldReferenceItemType::NAMED )
- {//check pReferenceValue
-#if OSL_DEBUG_LEVEL > 1
- switch( pReferenceValue->ReferenceType)
- {
- case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE: //both
- OSL_FAIL( "\n sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE \n" );
- break;
- case sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE: //both
- OSL_FAIL( "\n sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE \n" );
- break;
- case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE: //both
- OSL_FAIL( "\n sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE \n" );
- break;
- case sheet::DataPilotFieldReferenceType::RUNNING_TOTAL:
- OSL_FAIL( "\n sheet::DataPilotFieldReferenceType::RUNNING_TOTAL \n" ); //enable name
- break;
- }
-#endif
- switch( pReferenceValue->ReferenceType)
- {
- case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE:
- case sheet::DataPilotFieldReferenceType::ITEM_DIFFERENCE:
- case sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE:
- case sheet::DataPilotFieldReferenceType::RUNNING_TOTAL:
- {
- if( pReferenceValue->ReferenceItemType == DataPilotFieldReferenceItemType::NAMED )
- {
- const ::rtl::OUString& sReferenceFieldName = pReferenceValue->ReferenceField;
- OSL_TRACE( "%s", sReferenceFieldName.getStr() );
- SCCOL nRefDim = pCache->GetDimensionIndex( sReferenceFieldName );
- bool bValid = true;
- if ( nRefDim == -1 )
- bValid = false;
- else if ( pReferenceValue->ReferenceType != sheet::DataPilotFieldReferenceType::RUNNING_TOTAL )
- { //running total has not reference item
- const ::rtl::OUString& sReferenceItemName = pReferenceValue->ReferenceItemName;
- OSL_TRACE( "%s", sReferenceItemName.getStr() );
- if ( pCache->GetIdByItemData( nRefDim, sReferenceItemName ) == -1 )
- bValid = false;
- }
- if ( !bValid )
- {
- delete pReferenceValue;
- pReferenceValue = NULL;
- }
- }
- }
- break;
- }
-
- };
-
- if ( pSortInfo )
- { //check sortinfo
- if ( pSortInfo->Mode == DataPilotFieldSortMode::DATA )
- {
- OSL_FAIL( "\n DataPilotFieldSortMode::DATA \n" );
- const ::rtl::OUString& sFieldDimName = pSortInfo->Field;
- std::list<rtl::OUString>::const_iterator iter = std::find( deletedDims.begin(), deletedDims.end(), sFieldDimName );
- if ( iter != deletedDims.end() && pCache->GetDimensionIndex( sFieldDimName ) == -1 )
- {
- pSortInfo->Mode = DataPilotFieldSortMode::MANUAL;
- pSortInfo->Field = GetName();
- }
- }
- };
-
- if ( pAutoShowInfo )
- { //check autoshow
- const ::rtl::OUString& sFieldDimName = pAutoShowInfo->DataField;
- std::list<rtl::OUString>::const_iterator iter = std::find( deletedDims.begin(), deletedDims.end(), sFieldDimName );
- if ( iter != deletedDims.end() && pCache->GetDimensionIndex( sFieldDimName ) == -1 )
- {
- delete pAutoShowInfo;
- pAutoShowInfo = NULL;
- }
- };
-
- //remove unused members
- //SODC_19124
- for (MemberList::iterator i=maMemberList.begin(); i != maMemberList.end() ; )
- {
- rtl::OUString aMemberName = (*i)->GetName();
- if ( pCache->GetIdByItemData( nSrcDim, aMemberName ) == -1 )
- i = maMemberList.erase( i );
- else
- ++i;
- }
- }
-}
-
bool operator == (const ::com::sun::star::sheet::DataPilotFieldSortInfo &l, const ::com::sun::star::sheet::DataPilotFieldSortInfo &r )
{
return l.Field == r.Field && l.IsAscending == r.IsAscending && l.Mode == r.Mode;
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 8a0677fcdae9..279b3ffa821b 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -579,15 +579,6 @@ OUString ScPostIt::GetText() const
return OUString();
}
-bool ScPostIt::HasMultiLineText() const
-{
- if( const EditTextObject* pEditObj = GetEditTextObject() )
- return pEditObj->GetParagraphCount() > 1;
- if( maNoteData.mxInitData.get() )
- return maNoteData.mxInitData->maSimpleText.indexOf( '\n' ) >= 0;
- return false;
-}
-
void ScPostIt::SetText( const ScAddress& rPos, const OUString& rText )
{
CreateCaptionFromInitData( rPos );
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 3de3b2298169..b5111de64de6 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -596,34 +596,6 @@ sal_uInt32 ScRangeData::GetUnoType() const
return nUnoType;
}
-// bei TransferTab von einem in ein anderes Dokument anpassen,
-// um Referenzen auf die eigene Tabelle mitzubekommen
-
-void ScRangeData::TransferTabRef( SCTAB nOldTab, SCTAB nNewTab )
-{
- long nTabDiff = (long)nNewTab - nOldTab;
- long nPosDiff = (long)nNewTab - aPos.Tab();
- aPos.SetTab( nNewTab );
- ScToken* t;
- pCode->Reset();
- while ( ( t = static_cast<ScToken*>(pCode->GetNextReference()) ) != NULL )
- {
- ScSingleRefData& rRef1 = t->GetSingleRef();
- if ( rRef1.IsTabRel() )
- rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab + nPosDiff );
- else
- rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab + nTabDiff );
- if ( t->GetType() == svDoubleRef )
- {
- ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
- if ( rRef2.IsTabRel() )
- rRef2.nTab = sal::static_int_cast<SCsTAB>( rRef2.nTab + nPosDiff );
- else
- rRef2.nTab = sal::static_int_cast<SCsTAB>( rRef2.nTab + nTabDiff );
- }
- }
-}
-
void ScRangeData::ReplaceRangeNamesInUse( const IndexMap& rMap )
{
bool bCompile = false;
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 089468746d9f..12b2c63e9d6c 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -238,14 +238,6 @@ bool ScDPFieldControlBase::AppendField(const rtl::OUString& rText, size_t& rnInd
return true;
}
-sal_uInt8 ScDPFieldControlBase::GetDupCount(size_t nIndex) const
-{
- if (maFieldNames.size() <= nIndex)
- return 0;
-
- return maFieldNames[nIndex].mnDupCount;
-}
-
void ScDPFieldControlBase::DelField( size_t nDelIndex )
{
if ( IsExistingIndex(nDelIndex) )
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 5602051462aa..69db0038a7ea 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -138,9 +138,6 @@ public:
bool AppendField(const rtl::OUString& rText, size_t& rnIndex);
-
- sal_uInt8 GetDupCount(size_t nIndex) const;
-
/** Removes a field from the specified index. */
void DelField( size_t nDelIndex );