[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Feb 22 10:06:22 UTC 2019


 include/vbahelper/vbashape.hxx           |    2 --
 include/vbahelper/vbashapes.hxx          |    4 ++--
 vbahelper/source/vbahelper/vbashapes.cxx |   11 ++++-------
 3 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit f7acbfe2322477b25e5a21b414fd5f5e129eafb1
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Feb 22 10:00:32 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Feb 22 11:05:58 2019 +0100

    loplugin:unusedfields in vbahelper
    
    Change-Id: I5b5820f236fa81a08faa8bd4d928ace2cc49cf25
    Reviewed-on: https://gerrit.libreoffice.org/68157
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx
index 3cdf74abe312..59581dfe81ee 100644
--- a/include/vbahelper/vbashape.hxx
+++ b/include/vbahelper/vbashape.hxx
@@ -66,7 +66,6 @@ protected:
     css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
     sal_Int32 const m_nType;
     css::uno::Reference< css::frame::XModel > m_xModel;
-    css::uno::Any m_aRange;
     void addListeners();
     /// @throws css::uno::RuntimeException
     void removeShapeListener();
@@ -79,7 +78,6 @@ public:
     /// @throws css::uno::RuntimeException
     ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nType );
     virtual ~ScVbaShape() override;
-    void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
 
     /// @throws css::uno::RuntimeException
     static sal_Int32 getType( const css::uno::Reference< css::drawing::XShape >& rShape );
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index 3c956c10eb37..4a23b13d10c0 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -66,9 +66,9 @@ private:
     /// @throws css::uno::RuntimeException
     css::uno::Reference< css::drawing::XShape > createShape( const OUString& service );
     /// @throws css::uno::RuntimeException
-    css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange );
+    css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight );
     /// @throws css::uno::RuntimeException
-    css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange );
+    css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight );
     /// @throws css::uno::RuntimeException
     css::uno::Any AddTextboxInWriter( sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight );
     OUString createName( const OUString& sName );
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 5c3bcbf304fe..74fb90504bcf 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -215,7 +215,7 @@ ScVbaShapes::createShape( const OUString& service )
 }
 
 uno::Any
-ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange)
+ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight)
 {
     sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
     sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
@@ -241,12 +241,11 @@ ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWid
     xShape->setSize( size );
 
     ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
-    pScVbaShape->setRange(rRange);
     return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
 }
 
 uno::Any
-ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange)
+ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight)
 {
     sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
     sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
@@ -284,7 +283,6 @@ ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth
     xShape->setSize(size);
 
     ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
-    pScVbaShape->setRange(rRange);
     return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
 }
 
@@ -326,14 +324,13 @@ ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_In
 uno::Any SAL_CALL
 ScVbaShapes::AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight )
 {
-    uno::Any _aAnchor;
     if (_nType == office::MsoAutoShapeType::msoShapeRectangle)
     {
-        return AddRectangle(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
+        return AddRectangle(_nLeft, _nTop, _nWidth, _nHeight);
     }
     else if (_nType == office::MsoAutoShapeType::msoShapeOval)
     {
-        return AddEllipse(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
+        return AddEllipse(_nLeft, _nTop, _nWidth, _nHeight);
     }
     return uno::Any();
 }


More information about the Libreoffice-commits mailing list