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

loplugin:unusedfields in tools..vbahelper

Change-Id: Ief7d4c8e1866604eda6308ea2a5c1ce4b1c093bc
Reviewed-on: https://gerrit.libreoffice.org/38836Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 83f9325f
......@@ -73,11 +73,9 @@ struct ImpRCStack
RCFlags Flags; ///< resource status
void * aResHandle; ///< Resource-Identifier from InternalResMgr
const Resource* pResObj; ///< pointer to Resource object
sal_uInt32 nId; ///< ResId used for error message
ResMgr* pResMgr; ///< ResMgr for Resource pResObj
void Clear();
void Init( ResMgr * pMgr, const Resource * pObj, sal_uInt32 nId );
void Init( const Resource * pObj, sal_uInt32 nId );
};
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC ResMgr
......
......@@ -574,7 +574,9 @@ class TOOLS_DLLPUBLIC SvFileStream : public SvStream
private:
StreamData* pInstanceData;
OUString aFilename;
#if defined(_WIN32)
sal_uInt16 nLockCounter;
#endif
bool bIsOpen;
SvFileStream (const SvFileStream&) = delete;
......
......@@ -316,7 +316,6 @@ class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication :
OUString m_aAccount;
css::ucb::RememberAuthentication m_eRememberPasswordMode;
css::ucb::RememberAuthentication m_eDefaultRememberPasswordMode;
css::ucb::RememberAuthentication m_eRememberAccountMode;
css::ucb::RememberAuthentication m_eDefaultRememberAccountMode;
bool m_bCanSetRealm : 1;
bool m_bCanSetUserName : 1;
......@@ -481,7 +480,6 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
m_aRememberAccountModes( rRememberAccountModes ),
m_eRememberPasswordMode( eDefaultRememberPasswordMode ),
m_eDefaultRememberPasswordMode( eDefaultRememberPasswordMode ),
m_eRememberAccountMode( eDefaultRememberAccountMode ),
m_eDefaultRememberAccountMode( eDefaultRememberAccountMode ),
m_bCanSetRealm( bCanSetRealm ),
m_bCanSetUserName( bCanSetUserName ),
......
......@@ -725,15 +725,13 @@ static void RscException_Impl()
}
}
void ImpRCStack::Init( ResMgr* pMgr, const Resource* pObj, sal_uInt32 Id )
void ImpRCStack::Init( const Resource* pObj, sal_uInt32 Id )
{
pResource = nullptr;
pClassRes = nullptr;
Flags = RCFlags::NONE;
aResHandle = nullptr;
pResObj = pObj;
nId = Id & ~RSC_DONTRELEASE; //TLX: Besser Init aendern
pResMgr = pMgr;
if ( !(Id & RSC_DONTRELEASE) )
Flags |= RCFlags::AUTORELEASE;
}
......@@ -745,8 +743,6 @@ void ImpRCStack::Clear()
Flags = RCFlags::NONE;
aResHandle = nullptr;
pResObj = nullptr;
nId = 0;
pResMgr = nullptr;
}
static RSHEADER_TYPE* LocalResource( const ImpRCStack* pStack,
......@@ -966,7 +962,7 @@ bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
incStack();
pTop = &aStack[nCurStack];
pTop->Init( pMgr, pResObj, nId |
pTop->Init( pResObj, nId |
(rId.IsAutoRelease() ? 0 : RSC_DONTRELEASE) );
if ( pClassRes )
......
......@@ -272,7 +272,6 @@ static sal_uInt32 GetSvError( oslFileError nErrno )
SvFileStream::SvFileStream( const OUString& rFileName, StreamMode nOpenMode )
{
bIsOpen = false;
nLockCounter = 0;
m_isWritable = false;
pInstanceData = new StreamData;
......@@ -290,7 +289,6 @@ SvFileStream::SvFileStream( const OUString& rFileName, StreamMode nOpenMode )
SvFileStream::SvFileStream()
{
bIsOpen = false;
nLockCounter = 0;
m_isWritable = false;
pInstanceData = new StreamData;
SetBufferSize( 1024 );
......
......@@ -48,13 +48,11 @@ void SAL_CALL XInteractionApproveImpl::select()
// XInteractionDisapproveImpl
XInteractionDisapproveImpl::XInteractionDisapproveImpl()
: m_bSelected(false)
{
}
void SAL_CALL XInteractionDisapproveImpl::select()
{
m_bSelected = true;
}
// XInteractionRequestImpl
......
......@@ -58,10 +58,6 @@ namespace ftp {
XInteractionDisapproveImpl();
virtual void SAL_CALL select() override;
private:
bool m_bSelected;
};
......
......@@ -644,9 +644,8 @@ InteractionSupplyAuthentication::getRememberAccountModes(
// virtual
void SAL_CALL InteractionSupplyAuthentication::setRememberAccount(
ucb::RememberAuthentication Remember )
ucb::RememberAuthentication )
{
m_eRememberAccountMode = Remember;
}
......
......@@ -98,7 +98,6 @@ class SvtExtendedSecurityOptions_Impl : public ConfigItem
OUString m_aExtensionPropName;
SvtExtendedSecurityOptions::OpenHyperlinkMode m_eOpenHyperlinkMode;
bool m_bROOpenHyperlinkMode;
ExtensionHashMap m_aExtensionHashMap;
};
......@@ -110,7 +109,6 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
, m_aSecureExtensionsSetName( SECURE_EXTENSIONS_SET )
, m_aExtensionPropName( EXTENSION_PROPNAME )
, m_eOpenHyperlinkMode(SvtExtendedSecurityOptions::OPEN_NEVER)
, m_bROOpenHyperlinkMode(false)
// Init member then.
{
// Fill the extension hash map with all secure extension strings
......@@ -118,7 +116,6 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
Sequence< OUString > seqNames = GetPropertyNames();
Sequence< Any > seqValues = GetProperties( seqNames );
Sequence< sal_Bool > seqRO = GetReadOnlyStates ( seqNames );
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
......@@ -138,7 +135,6 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
else {
OSL_FAIL("Wrong type for Open mode!");
}
m_bROOpenHyperlinkMode = seqRO[nProperty];
}
break;
}
......
......@@ -180,7 +180,6 @@ namespace DOM
// context struct passed to IO functions
typedef struct context {
CDocumentBuilder *pBuilder;
Reference< XInputStream > rInputStream;
bool close;
bool freeOnClose;
......@@ -247,7 +246,6 @@ namespace DOM
// when IO is actually performed through the callbacks. The close function must
// free the memory which is indicated by the freeOnClose field in the context struct
context_t *c = new context_t;
c->pBuilder = builder;
c->rInputStream = src.aInputStream;
c->close = true;
c->freeOnClose = true;
......@@ -316,7 +314,6 @@ namespace DOM
// IO context struct. Must outlive pContext, as destroying that via
// xmlFreeParserCtxt may still access this context_t
context_t c;
c.pBuilder = this;
c.rInputStream = is;
// we did not open the stream, thus we do not close it.
c.close = false;
......
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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
{
......
......@@ -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 );
}
......
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