Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


This patch removes unused code as listed in unusedcode.easy
From 7696cfebc875621dd68cbc65dc45772e530a79e7 Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Fri, 27 Jan 2012 21:45:33 +0100
Subject: [PATCH] Remove unused code as listed in unusedcode.easy

---
 sc/source/ui/vba/vbachart.cxx |   33 ---------------------------------
 sc/source/ui/vba/vbachart.hxx |    1 -
 unusedcode.easy               |    1 -
 3 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 94d2900..db9d23e 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -1028,39 +1028,6 @@ ScVbaChart::assignDiagramAttributes()
     xTwoAxisYSupplier.set( mxDiagramPropertySet, uno::UNO_QUERY_THROW );
 }
 
-bool
-ScVbaChart::isSeriesIndexValid(sal_Int32 _seriesindex) throw( script::BasicErrorException )
-{
-    bool bret = false;
-    try
-    {
-        uno::Reference< chart::XChartDataArray > xChartDataArray( mxChartDocument->getData(), 
uno::UNO_QUERY_THROW );
-        //TODO I guess we have to differentiate between XlRowCol
-        if ( !xChartDataArray.is() )
-        {
-            if (getPlotBy() == xlRows)
-            {
-                if ((_seriesindex < xChartDataArray->getRowDescriptions().getLength() ) && 
(_seriesindex >= 0))
-                    bret = true;
-            }
-            else
-            {
-                if ((_seriesindex < xChartDataArray->getColumnDescriptions().getLength() ) && 
(_seriesindex >= 0))
-                    bret = true;
-            }
-        }
-    }
-    catch (const uno::Exception&)
-    {
-        throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), 
SbERR_METHOD_FAILED, rtl::OUString() );
-    }
-    if (!bret)
-    {
-        throw script::BasicErrorException( rtl::OUString(), uno::Reference< uno::XInterface >(), 
SbERR_OUT_OF_RANGE, rtl::OUString() );
-    }
-    return bret;
-}
-
 
 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 104cc55..e984ecf 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -74,7 +74,6 @@ public:
 
     // Non-interface
     css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() const { return 
mxDiagramPropertySet; }
-    bool isSeriesIndexValid(sal_Int32 _seriesindex) 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/unusedcode.easy b/unusedcode.easy
index d75fd4f..23f628c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -215,7 +215,6 @@ ScValidationEntries_Impl::Insert(ScValidationEntries_Impl const*, unsigned short
 ScValidationEntries_Impl::Remove(ScValidationData* const&, unsigned short)
 ScValidationEntries_Impl::Remove(unsigned short, unsigned short)
 ScValueCell::ScValueCell()
-ScVbaChart::isSeriesIndexValid(int)
 ScVbaColorFormat::setColorFormat(short)
 
ScVbaCommandBarControl::ScVbaCommandBarControl(com::sun::star::uno::Reference<ooo::vba::XHelperInterface>
 const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, 
com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> const&, 
boost::shared_ptr<VbaCommandBarHelper>, 
com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> const&, rtl::OUString 
const&, int, unsigned char)
 ScVbaCommentShape::ScVbaCommentShape(com::sun::star::uno::Reference<ooo::vba::XHelperInterface> 
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, 
com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&, 
com::sun::star::uno::Reference<ooo::vba::excel::XComment> const&, 
com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, 
com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, int)
-- 
1.7.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.