summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-15 16:02:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-16 08:26:04 +0200
commita975624bfeeb08670b90944eda372d6d4755ae34 (patch)
treeca4a79214d2f8004aa68d98e1761ff52dc2ba79d /vbahelper
parent83f9325f0d8d643d8b3e71fa3ff76ebbd599373d (diff)
loplugin:unusedfields in tools..vbahelper
Change-Id: Ief7d4c8e1866604eda6308ea2a5c1ce4b1c093bc Reviewed-on: https://gerrit.libreoffice.org/38836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx3
-rw-r--r--vbahelper/source/msforms/vbacontrol.hxx1
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx10
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.hxx5
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.cxx8
5 files changed, 10 insertions, 17 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 0906439c1e04..1c8e50d6632f 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -124,7 +124,7 @@ ScVbaControlListener::disposing( const lang::EventObject& )
//ScVbaControl
-ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ), bIsDialog(false), m_xControl( xControl ), m_xModel( xModel )
+ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ), m_xControl( xControl ), m_xModel( xModel )
{
//add listener
m_xEventListener.set( new ScVbaControlListener( this ) );
@@ -146,7 +146,6 @@ ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, c
else if ( xUserFormControl.is() ) // userform control
{
m_xProps.set( xUserFormControl->getModel(), uno::UNO_QUERY_THROW );
- bIsDialog = true;
}
}
diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx
index 51bcb958480d..66bebf5acad5 100644
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -44,7 +44,6 @@ protected:
// whether it is necessary is another question
OUString m_aControlTag;
- bool bIsDialog;
OUString m_sLibraryAndCodeName;
std::unique_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
css::uno::Reference< css::beans::XPropertySet > m_xProps;
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index cfc89c70abd8..f69bcf822d9a 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -24,7 +24,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_sResourceUrl( sResourceUrl ), m_xCurrentSettings( xSettings ), m_xBarSettings( xBarSettings ), m_nPosition( 0 ), m_bTemporary( true )
+ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_sResourceUrl( sResourceUrl ), m_xCurrentSettings( xSettings ), m_xBarSettings( xBarSettings ), m_nPosition( 0 )
{
}
@@ -200,12 +200,10 @@ ScVbaCommandBarPopup::ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelp
const VbaCommandBarHelperRef& pHelper,
const css::uno::Reference< css::container::XIndexAccess >& xBarSettings,
const OUString& sResourceUrl,
- sal_Int32 nPosition,
- bool bTemporary )
+ sal_Int32 nPosition )
: CommandBarPopup_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
{
m_nPosition = nPosition;
- m_bTemporary = bTemporary;
m_xCurrentSettings->getByIndex( m_nPosition ) >>= m_aPropertyValues;
}
@@ -234,12 +232,10 @@ ScVbaCommandBarButton::ScVbaCommandBarButton( const css::uno::Reference< ov::XHe
const VbaCommandBarHelperRef& pHelper,
const css::uno::Reference< css::container::XIndexAccess >& xBarSettings,
const OUString& sResourceUrl,
- sal_Int32 nPosition,
- bool bTemporary )
+ sal_Int32 nPosition )
: CommandBarButton_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
{
m_nPosition = nPosition;
- m_bTemporary = bTemporary;
m_xCurrentSettings->getByIndex( m_nPosition ) >>= m_aPropertyValues;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
index de5fdfc4d6af..348518b5ba2e 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
@@ -40,7 +40,6 @@ protected:
css::uno::Sequence< css::beans::PropertyValue > m_aPropertyValues;
sal_Int32 m_nPosition;
- bool m_bTemporary;
private:
/// @throws css::uno::RuntimeException
@@ -80,7 +79,7 @@ class ScVbaCommandBarPopup : public CommandBarPopup_BASE
{
public:
/// @throws css::uno::RuntimeException
- ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, bool bTemporary );
+ ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition );
virtual sal_Int32 SAL_CALL getType() override
{
@@ -96,7 +95,7 @@ class ScVbaCommandBarButton : public CommandBarButton_BASE
{
public:
/// @throws css::uno::RuntimeException
- ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, bool bTemporary );
+ ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition );
virtual sal_Int32 SAL_CALL getType() override
{
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index 9c0772c9c9da..1c4261f034f5 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -132,9 +132,9 @@ ScVbaCommandBarControls::createCollectionObject( const uno::Any& aSource )
getPropertyValue( aProps, ITEM_DESCRIPTOR_CONTAINER ) >>= xSubMenu;
ScVbaCommandBarControl* pNewCommandBarControl = nullptr;
if( xSubMenu.is() )
- pNewCommandBarControl = new ScVbaCommandBarPopup( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition, true );
+ pNewCommandBarControl = new ScVbaCommandBarPopup( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition );
else
- pNewCommandBarControl = new ScVbaCommandBarButton( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition, true );
+ pNewCommandBarControl = new ScVbaCommandBarButton( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition );
return uno::makeAny( uno::Reference< XCommandBarControl > ( pNewCommandBarControl ) );
}
@@ -227,9 +227,9 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
ScVbaCommandBarControl* pNewCommandBarControl = nullptr;
if( nType == office::MsoControlType::msoControlPopup )
- pNewCommandBarControl = new ScVbaCommandBarPopup( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition, bTemporary );
+ pNewCommandBarControl = new ScVbaCommandBarPopup( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition );
else
- pNewCommandBarControl = new ScVbaCommandBarButton( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition, bTemporary );
+ pNewCommandBarControl = new ScVbaCommandBarButton( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition );
return uno::Reference< XCommandBarControl >( pNewCommandBarControl );
}