Kaydet (Commit) f7acbfe2 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in vbahelper

Change-Id: I5b5820f236fa81a08faa8bd4d928ace2cc49cf25
Reviewed-on: https://gerrit.libreoffice.org/68157
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 50ef16e8
......@@ -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 );
......
......@@ -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 );
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment