[Libreoffice-commits] .: sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Feb 2 15:02:51 PST 2011


 sc/inc/document.hxx                      |    3 
 sc/inc/dptabsrc.hxx                      |    4 -
 sc/inc/externalrefmgr.hxx                |    2 
 sc/source/core/data/documen3.cxx         |   10 --
 sc/source/core/data/document.cxx         |   14 ---
 sc/source/core/data/dptabsrc.cxx         |   23 -----
 sc/source/ui/docshell/externalrefmgr.cxx |   11 --
 sc/source/ui/vba/vbachart.cxx            |  120 -------------------------------
 sc/source/ui/vba/vbachart.hxx            |    9 --
 sc/source/ui/vba/vbachartobject.cxx      |   54 -------------
 sc/source/ui/vba/vbachartobject.hxx      |   12 ---
 11 files changed, 262 deletions(-)

New commits:
commit 84dba636e8bfeff35ae9703c0528ce8bb5248eaf
Author: Alfonso Eusebio <alfonso_eusebio at yahoo.co.uk>
Date:   Wed Feb 2 18:24:01 2011 +0000

    Removed unused functions from calc 2
    
    Removed some more unused functions from calc as identified
    by call-catcher.

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 26d7707..02d27c3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1311,7 +1311,6 @@ public:
     SC_DLLPUBLIC void			ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow);
     SC_DLLPUBLIC void			ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow);
     SC_DLLPUBLIC void			ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow);
-    SC_DLLPUBLIC void			SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags );
     SC_DLLPUBLIC void			SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags );
     SC_DLLPUBLIC void			SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags );
 
@@ -1347,7 +1346,6 @@ public:
     bool                        HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
     bool                        ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
     SC_DLLPUBLIC void           SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
-    SC_DLLPUBLIC void           SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bFiltered);
     SCROW                       FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
     SCROW                       LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
     SCROW                       CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
@@ -1456,7 +1454,6 @@ public:
 
     void			Sort( SCTAB nTab, const ScSortParam& rSortParam, BOOL bKeepQuery );
     SCSIZE			Query( SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeepSub );
-    BOOL			ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial = NULL );
     SC_DLLPUBLIC BOOL			CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
                                         SCTAB nTab, ScQueryParam& rQueryParam );
     void 			GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr);
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 4ca3050..4f7defe 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -164,7 +164,6 @@ public:
     ScDPTableData*			GetData()		{ return pData; }
     const ScDPTableData*	GetData() const	{ return pData; }
 
-    void                    SetGrandTotalName(const ::rtl::OUString& rName);
     const ::rtl::OUString*  GetGrandTotalName() const;
 
     USHORT					GetOrientation(long nColumn);
@@ -182,7 +181,6 @@ public:
     USHORT					GetDataLayoutOrientation();
 
     BOOL					IsDateDimension(long nDim);
-    UINT32					GetNumberFormat(long nDim);
 
     BOOL					SubTotalAllowed(long nColumn);		//! move to ScDPResultData
 
@@ -442,8 +440,6 @@ public:
     const ScDPItemData&         GetSelectedData();
 
     const ::com::sun::star::sheet::DataPilotFieldReference& GetReferenceValue() const;
-
-    BOOL                      IsVisible( const ScDPItemData& rData );
 };
 
 class ScDPHierarchies : public cppu::WeakImplHelper2<
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 10000a6..478fb51 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -180,7 +180,6 @@ public:
         /// Returns the half-open range of used columns in the specified row. Returns [0,0) if row is empty.
         SC_DLLPUBLIC ::std::pair< SCCOL, SCCOL > getColRange( SCROW nRow ) const;
         void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
-        const ScRangeList& getCachedRanges() const;
         bool isRangeCached(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
 
         void setCachedCell(SCCOL nCol, SCROW nRow);
@@ -299,7 +298,6 @@ private:
         bool             mbAllReferenced;
 
                     ReferencedStatus();
-        explicit    ReferencedStatus( size_t nDocs );
         void        reset( size_t nDocs );
         void        checkAllDocs();
 
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 6b50b84..39dffad 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1213,16 +1213,6 @@ SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeep
 }
 
 
-BOOL ScDocument::ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial )
-{
-    if ( ValidTab(nTab) && pTab[nTab] )
-        return pTab[nTab]->ValidQuery( nRow, rQueryParam, pSpecial );
-
-    DBG_ERROR("missing tab");
-    return FALSE;
-}
-
-
 void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr)
 {
     if ( ValidTab(nTab) && pTab[nTab] )
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d8187f5..b92ecaf 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3459,13 +3459,6 @@ void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow)
 }
 
 
-void ScDocument::SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags )
-{
-    if ( ValidTab(nTab) && pTab[nTab] )
-        pTab[nTab]->SetColFlags( nCol, nNewFlags );
-}
-
-
 void ScDocument::SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags )
 {
     if ( ValidTab(nTab) && pTab[nTab] )
@@ -3734,13 +3727,6 @@ void ScDocument::SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool
     pTab[nTab]->SetRowFiltered(nStartRow, nEndRow, bFiltered);
 }
 
-void ScDocument::SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bFiltered)
-{
-    if (!ValidTab(nTab) || !pTab[nTab])
-        return;
-
-    pTab[nTab]->SetColFiltered(nStartCol, nEndCol, bFiltered);
-}
 
 SCROW ScDocument::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
 {
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b9a570b..a0031c5 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -161,11 +161,6 @@ ScDPSource::~ScDPSource()
     delete pResData;
 }
 
-void ScDPSource::SetGrandTotalName(const ::rtl::OUString& rName)
-{
-    mpGrandTotalName.reset(new ::rtl::OUString(rName));
-}
-
 const ::rtl::OUString* ScDPSource::GetGrandTotalName() const
 {
     return mpGrandTotalName.get();
@@ -325,11 +320,6 @@ BOOL ScDPSource::IsDateDimension(long nDim)
     return pData->IsDateDimension(nDim);
 }
 
-UINT32	ScDPSource::GetNumberFormat(long nDim)
-{
-    return pData->GetNumberFormat( nDim );
-}
-
 ScDPDimensions* ScDPSource::GetDimensionsObject()
 {
     if (!pDimensions)
@@ -1529,19 +1519,6 @@ const ScDPItemData& ScDPDimension::GetSelectedData()
     return *pSelectedData;
 }
 
-BOOL ScDPDimension::IsVisible( const ScDPItemData& rData )
-{
-    if( ScDPMembers* pMembers = this->GetHierarchiesObject()->getByIndex(0)->
-        GetLevelsObject()->getByIndex(0)->GetMembersObject() )
-    {
-        for( long i = pMembers->getCount()-1; i>=0; i-- )
-            if( ScDPMember *pDPMbr = pMembers->getByIndex( i ) )
-                if( rData.IsCaseInsEqual( pDPMbr->GetItemData() ) && !pDPMbr->getIsVisible() )
-                    return FALSE;
-    }
-
-    return TRUE;
-}
 // XPropertySet
 
 uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetInfo()
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index e4f5276..344ff82 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -389,11 +389,6 @@ void ScExternalRefCache::Table::getAllNumberFormats(vector<sal_uInt32>& rNumFmts
     }
 }
 
-const ScRangeList& ScExternalRefCache::Table::getCachedRanges() const
-{
-    return maCachedRanges;
-}
-
 bool ScExternalRefCache::Table::isRangeCached(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
 {
     return maCachedRanges.In(ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0));
@@ -1091,12 +1086,6 @@ ScExternalRefCache::ReferencedStatus::ReferencedStatus() :
     reset(0);
 }
 
-ScExternalRefCache::ReferencedStatus::ReferencedStatus( size_t nDocs ) :
-    mbAllReferenced(false)
-{
-    reset( nDocs);
-}
-
 void ScExternalRefCache::ReferencedStatus::reset( size_t nDocs )
 {
     if (nDocs)
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 9c55800..e05278c 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -1073,126 +1073,6 @@ ScVbaChart::areIndicesValid( sal_Int32 _seriesindex, sal_Int32 _valindex) throw
     return false;
 }
 
-sal_Int32
-ScVbaChart::getSeriesIndex(rtl::OUString _sseriesname) throw ( script::BasicErrorException )
-{
-    uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW );
-    if (getPlotBy() == xlRows)
-        return ContainerUtilities::FieldInList(xChartDataArray->getRowDescriptions(), _sseriesname);
-    return ContainerUtilities::FieldInList(xChartDataArray->getColumnDescriptions(), _sseriesname);
-}
-void
-ScVbaChart::setSeriesName(sal_Int32 _index, rtl::OUString _sname) throw ( script::BasicErrorException )
-{
-    uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW );
-    if (isSeriesIndexValid(_index))
-    {
-        uno::Sequence< rtl::OUString > sDescriptions = xChartDataArray->getColumnDescriptions();
-        sDescriptions[_index] = _sname;
-        xChartDataArray->setColumnDescriptions(sDescriptions);
-    }
-}
-
-sal_Int32 
-ScVbaChart::getSeriesCount() throw ( script::BasicErrorException )
-{		
-    uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW );
-
-    if (getPlotBy() == xlRows)
-        return xChartDataArray->getRowDescriptions().getLength();
-    return xChartDataArray->getColumnDescriptions().getLength();
-
-}
-
-rtl::OUString
-ScVbaChart::getSeriesName(sal_Int32 _index) throw ( script::BasicErrorException )
-{
-    uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW );
-        uno::Sequence< rtl::OUString > sDescriptions;
-    rtl::OUString sName;
-    if (isSeriesIndexValid(_index))
-    {
-        if (getPlotBy() == xlRows)
-            sDescriptions = xChartDataArray->getRowDescriptions();
-        else
-            sDescriptions = xChartDataArray->getColumnDescriptions();
-        sName =  sDescriptions[_index];
-        }
-        return sName;	
-}
-
-double 
-ScVbaChart::getValue(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( script::BasicErrorException )
-{
-    double result = -1.0;
-    if (areIndicesValid(_seriesindex, _valindex))
-    {
-        if (getPlotBy() == xlRows)
-            result =  dblValues[_seriesindex][_valindex];
-        else
-            result =  dblValues[_valindex][_seriesindex];
-    }
-    return result;
-}
-
-sal_Int32 
-ScVbaChart::getValuesCount(sal_Int32 _seriesIndex) throw ( script::BasicErrorException )
-{
-    sal_Int32 nCount = 0;
-    uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), uno::UNO_QUERY_THROW );
-    if (isSeriesIndexValid(_seriesIndex))
-    {
-        dblValues = xChartDataArray->getData();
-        if (getPlotBy() == xlRows)
-            nCount = dblValues[_seriesIndex].getLength();
-        else
-            nCount =  dblValues.getLength();
-    }
-    return nCount;	
-}
-
-
-uno::Reference< excel::XDataLabels > 
-ScVbaChart::DataLabels( const uno::Reference< ov::excel::XSeries > /*_oSeries*/ ) throw ( css::script::BasicErrorException )
-{
-    if ( true )
-        throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
-    // #TODO #FIXE provide implementation
-    return uno::Reference< excel::XDataLabels > ();
-}
-
-bool 
-ScVbaChart::getHasDataCaption( const uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( script::BasicErrorException )
-{
-    bool bResult = false;
-    try
-    {
-        sal_Int32 nChartDataCaption = 0;
-        _xPropertySet->getPropertyValue(DATACAPTION) >>= nChartDataCaption;
-        bResult = (nChartDataCaption != chart::ChartDataCaption::NONE);
-    } 
-    catch (uno::Exception& ) 
-    {
-        throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
-    }
-    return bResult;
-}
-
-void 
-ScVbaChart::setHasDataCaption( const uno::Reference< beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( script::BasicErrorException )
-{
-    try
-    {
-        if ( _bHasDataLabels )
-            _xPropertySet->setPropertyValue(DATACAPTION, uno::makeAny ( chart::ChartDataCaption::VALUE) );
-        else
-            _xPropertySet->setPropertyValue(DATACAPTION, uno::makeAny ( chart::ChartDataCaption::NONE) );
-    } 
-    catch (uno::Exception& ) 
-    {
-        throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
-    }
-}
 
 uno::Reference< beans::XPropertySet > 
 ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( script::BasicErrorException )
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index ac8119c..85e3e03 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -76,15 +76,6 @@ public:
     css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() const { return mxDiagramPropertySet; }
     bool isSeriesIndexValid(sal_Int32 _seriesindex) throw( css::script::BasicErrorException );
     bool areIndicesValid(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( css::script::BasicErrorException );
-    void setSeriesName(sal_Int32 _index, rtl::OUString _sname) throw ( css::script::BasicErrorException );
-    sal_Int32 getSeriesIndex(rtl::OUString _sseriesname) throw ( css::script::BasicErrorException );
-    sal_Int32 getSeriesCount() throw ( css::script::BasicErrorException );
-    rtl::OUString getSeriesName(sal_Int32 _index) throw ( css::script::BasicErrorException );
-    double getValue(sal_Int32 _seriesIndex, sal_Int32 _valindex) throw ( css::script::BasicErrorException );
-    sal_Int32 getValuesCount(sal_Int32 _seriesIndex) throw ( css::script::BasicErrorException );
-    css::uno::Reference< ov::excel::XDataLabels > DataLabels( const css::uno::Reference< ov::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException );
-    bool getHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( css::script::BasicErrorException );
-    void setHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( css::script::BasicErrorException );
     bool is3D() throw ( css::uno::RuntimeException );
     css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( css::script::BasicErrorException );
     // Methods
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index 99fcbef..68b76f5 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -156,58 +156,4 @@ ScVbaChartObject::getServiceNames()
     return aServiceNames;
 }
 
-double 
-ScVbaChartObject::getHeight()
-{
-    return oShapeHelper->getHeight();
-}
-
-void 
-ScVbaChartObject::setHeight(double _fheight) throw ( script::BasicErrorException )
-{
-    oShapeHelper->setHeight(_fheight);
-}
-    
-double 
-ScVbaChartObject::getWidth()
-{
-        return oShapeHelper->getWidth();
-}
-
-void 
-ScVbaChartObject::setWidth(double _fWidth) throw ( script::BasicErrorException )
-{
-    oShapeHelper->setWidth(_fWidth);
-}
-    
-double 
-ScVbaChartObject::getLeft()
-{
-        return oShapeHelper->getLeft();
-}
-
-void 
-ScVbaChartObject::setLeft(double _fLeft)
-{
-    oShapeHelper->setLeft(_fLeft);
-}
-    
-double 
-ScVbaChartObject::getTop()
-{
-        return oShapeHelper->getTop();
-}    
-
-void 
-ScVbaChartObject::setTop(double _fTop)
-{
-    oShapeHelper->setTop(_fTop);
-}
-
-uno::Reference< uno::XInterface > 
-ScVbaChartObject::getUnoObject() const throw (script::BasicErrorException)
-{
-    return uno::Reference< uno::XInterface >( xShape, uno::UNO_QUERY );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx
index ad816b6..263f7f5 100644
--- a/sc/source/ui/vba/vbachartobject.hxx
+++ b/sc/source/ui/vba/vbachartobject.hxx
@@ -64,18 +64,6 @@ public:
     // XHelperInterface
     virtual rtl::OUString& getServiceImplName();
     virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-    // non interface methods
-    double getHeight();
-    void setHeight( double _fheight ) throw ( css::script::BasicErrorException );
-    double getWidth();
-    void setWidth( double _fwidth ) throw ( css::script::BasicErrorException );
-    double getLeft();
-    void setLeft( double _fleft );
-    double getTop();
-    void setTop( double _ftop );
-    // should make this part of the XHelperInterface with a default
-    // implementation returning NULL
-    css::uno::Reference< css::uno::XInterface > getUnoObject() const throw ( css::script::BasicErrorException );
 };
 
 #endif //SC_VBA_WINDOW_HXX


More information about the Libreoffice-commits mailing list