summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/provider/BrowseNodeFactoryImpl.hxx1
-rw-r--r--scripting/source/stringresource/stringresource.cxx26
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx22
3 files changed, 17 insertions, 32 deletions
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.hxx b/scripting/source/provider/BrowseNodeFactoryImpl.hxx
index 2d16c5826317..1509caaa0866 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.hxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.hxx
@@ -42,7 +42,6 @@ class BrowseNodeFactoryImpl :
{
private:
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext;
- css::uno::Reference< css::script::browse::XBrowseNode > m_xSelectorBrowseNode;
protected:
virtual ~BrowseNodeFactoryImpl();
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index c539ce7f0a73..0e383b044d0f 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1245,14 +1245,12 @@ void StringResourcePersistenceImpl::implStoreAtLocation
class BinaryOutput
{
- Reference< XMultiComponentFactory > m_xMCF;
Reference< XComponentContext > m_xContext;
Reference< XInterface > m_xTempFile;
Reference< io::XOutputStream > m_xOutputStream;
public:
- BinaryOutput( Reference< XMultiComponentFactory > xMCF,
- Reference< XComponentContext > xContext );
+ BinaryOutput( Reference< XComponentContext > xContext );
Reference< io::XOutputStream > getOutputStream() const
{ return m_xOutputStream; }
@@ -1270,10 +1268,8 @@ public:
void writeString( const OUString& aStr );
};
-BinaryOutput::BinaryOutput( Reference< XMultiComponentFactory > xMCF,
- Reference< XComponentContext > xContext )
- : m_xMCF( xMCF )
- , m_xContext( xContext )
+BinaryOutput::BinaryOutput( Reference< XComponentContext > xContext )
+ : m_xContext( xContext )
{
m_xTempFile = io::TempFile::create( m_xContext );
m_xOutputStream.set( m_xTempFile, UNO_QUERY_THROW );
@@ -1380,8 +1376,7 @@ Sequence< ::sal_Int8 > BinaryOutput::closeAndGetData()
Sequence< sal_Int8 > StringResourcePersistenceImpl::exportBinary( )
throw (RuntimeException, std::exception)
{
- Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
- BinaryOutput aOut( xMCF, m_xContext );
+ BinaryOutput aOut( m_xContext );
sal_Int32 nLocaleCount = m_aLocaleItemVector.size();
Sequence< sal_Int8 >* pLocaleDataSeq = new Sequence< sal_Int8 >[ nLocaleCount ];
@@ -1397,7 +1392,7 @@ Sequence< sal_Int8 > StringResourcePersistenceImpl::exportBinary( )
if( m_pDefaultLocaleItem == pLocaleItem )
iDefault = iLocale;
- BinaryOutput aLocaleOut( m_xMCF, m_xContext );
+ BinaryOutput aLocaleOut( m_xContext );
implWriteLocaleBinary( pLocaleItem, aLocaleOut );
pLocaleDataSeq[iLocale] = aLocaleOut.closeAndGetData();
@@ -1462,7 +1457,6 @@ void StringResourcePersistenceImpl::implWriteLocaleBinary
class BinaryInput
{
Sequence< sal_Int8 > m_aData;
- Reference< XMultiComponentFactory > m_xMCF;
Reference< XComponentContext > m_xContext;
const sal_Int8* m_pData;
@@ -1470,8 +1464,7 @@ class BinaryInput
sal_Int32 m_nSize;
public:
- BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< XMultiComponentFactory > xMCF,
- Reference< XComponentContext > xContext );
+ BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< XComponentContext > xContext );
Reference< io::XInputStream > getInputStreamForSection( sal_Int32 nSize );
@@ -1485,10 +1478,8 @@ public:
OUString readString();
};
-BinaryInput::BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< XMultiComponentFactory > xMCF,
- Reference< XComponentContext > xContext )
+BinaryInput::BinaryInput( const Sequence< ::sal_Int8 >& aData, Reference< XComponentContext > xContext )
: m_aData( aData )
- , m_xMCF( xMCF )
, m_xContext( xContext )
{
m_pData = m_aData.getConstArray();
@@ -1607,8 +1598,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
while( nOldLocaleCount > 0 );
// Import data
- Reference< XMultiComponentFactory > xMCF = getMultiComponentFactory();
- BinaryInput aIn( Data, xMCF, m_xContext );
+ BinaryInput aIn( Data, m_xContext );
sal_Int32 nVersion = aIn.readInt16();
(void)nVersion;
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 66b4f912b86b..fdc80e336b6f 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -557,7 +557,7 @@ class EventListener : public EventListener_BASE
{
public:
- explicit EventListener( const Reference< XComponentContext >& rxContext );
+ EventListener();
// XEventListener
virtual void SAL_CALL disposing(const lang::EventObject& Source) throw( RuntimeException, std::exception ) override;
using cppu::OPropertySetHelper::disposing;
@@ -636,15 +636,14 @@ private:
void setShellFromModel();
void firing_Impl( const ScriptEvent& evt, Any *pSyncRet=nullptr ) throw( RuntimeException, std::exception );
- Reference< XComponentContext > m_xContext;
Reference< frame::XModel > m_xModel;
bool m_bDocClosed;
SfxObjectShell* mpShell;
OUString msProject;
};
-EventListener::EventListener( const Reference< XComponentContext >& rxContext ) :
-OPropertyContainer(GetBroadcastHelper()), m_xContext( rxContext ), m_bDocClosed(false), mpShell( nullptr )
+EventListener::EventListener() :
+OPropertyContainer(GetBroadcastHelper()), m_bDocClosed(false), mpShell( nullptr )
{
registerProperty( EVENTLSTNR_PROPERTY_MODEL, EVENTLSTNR_PROPERTY_ID_MODEL,
beans::PropertyAttribute::TRANSIENT, &m_xModel, cppu::UnoType<decltype(m_xModel)>::get() );
@@ -1026,7 +1025,7 @@ typedef ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo >
class VBAToOOEventDescGen : public VBAToOOEventDescGen_BASE
{
public:
- explicit VBAToOOEventDescGen(const Reference< XComponentContext >& rxContext);
+ VBAToOOEventDescGen();
// XVBAToOOEventDescGen
virtual Sequence< ScriptEventDescriptor > SAL_CALL getEventDescriptions( const OUString& sCtrlServiceName, const OUString& sCodeName ) throw (RuntimeException, std::exception) override;
@@ -1051,12 +1050,9 @@ public:
return Sequence< OUString >( &strName, 1 );
}
-private:
- Reference< XComponentContext > m_xContext;
-
};
-VBAToOOEventDescGen::VBAToOOEventDescGen( const Reference< XComponentContext >& rxContext ):m_xContext( rxContext ) {}
+VBAToOOEventDescGen::VBAToOOEventDescGen() {}
Sequence< ScriptEventDescriptor > SAL_CALL
VBAToOOEventDescGen::getEventDescriptions( const OUString& sCntrlServiceName, const OUString& sCodeName ) throw (RuntimeException, std::exception)
@@ -1076,18 +1072,18 @@ VBAToOOEventDescGen::getEventSupplier( const Reference< XInterface >& xControl,
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
-ooo_vba_EventListener_get_implementation(css::uno::XComponentContext* context,
+ooo_vba_EventListener_get_implementation(css::uno::XComponentContext*,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(new EventListener(context));
+ return cppu::acquire(new EventListener);
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
-ooo_vba_VBAToOOEventDesc_get_implementation(css::uno::XComponentContext* context,
+ooo_vba_VBAToOOEventDesc_get_implementation(css::uno::XComponentContext*,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(new VBAToOOEventDescGen(context));
+ return cppu::acquire(new VBAToOOEventDescGen);
}