[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source basic/source

Noel Grandin noel at peralex.com
Wed Dec 23 00:10:37 PST 2015


 avmedia/source/gstreamer/gstplayer.cxx |    2 +-
 avmedia/source/gstreamer/gstwindow.cxx |    3 +--
 avmedia/source/gstreamer/gstwindow.hxx |    4 +---
 basctl/source/basicide/basicbox.cxx    |    7 +++----
 basctl/source/basicide/basicbox.hxx    |    4 +---
 basctl/source/basicide/baside2.hxx     |    2 --
 basctl/source/basicide/bastypes.cxx    |    4 +---
 basctl/source/inc/bastypes.hxx         |    3 +--
 basic/source/classes/sbunoobj.cxx      |    7 ++-----
 basic/source/inc/dlgcont.hxx           |    2 --
 basic/source/inc/namecont.hxx          |    3 ---
 basic/source/inc/sbunoobj.hxx          |    5 +----
 basic/source/inc/scriptcont.hxx        |    2 --
 basic/source/uno/dlgcont.cxx           |   10 ++++------
 basic/source/uno/namecont.cxx          |    6 ++----
 basic/source/uno/scriptcont.cxx        |   10 ++++------
 16 files changed, 22 insertions(+), 52 deletions(-)

New commits:
commit 2351fd5d489fde281e8d1ef97af747149a29c247
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Dec 23 09:53:35 2015 +0200

    loplugin:unusedfields in avmedia
    
    Change-Id: I725a80cf7b6f2b728e650d0f365d063931b17ea7

diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index d59f591..a8888fd 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -871,7 +871,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
 
     if( aSize.Width > 0 && aSize.Height > 0 )
     {
-        ::avmedia::gstreamer::Window* pWindow = new ::avmedia::gstreamer::Window( mxMgr );
+        ::avmedia::gstreamer::Window* pWindow = new ::avmedia::gstreamer::Window;
 
         xRet = pWindow;
 
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index fc2a8ee..765343d 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -52,8 +52,7 @@ static ::osl::Mutex& ImplGetOwnStaticMutex()
 // Window
 
 
-Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
-    mxMgr( rxMgr ),
+Window::Window() :
     meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ),
     mnPointerType( awt::SystemPointer::ARROW )
 {
diff --git a/avmedia/source/gstreamer/gstwindow.hxx b/avmedia/source/gstreamer/gstwindow.hxx
index 73bfb30..2c9af23 100644
--- a/avmedia/source/gstreamer/gstwindow.hxx
+++ b/avmedia/source/gstreamer/gstwindow.hxx
@@ -39,7 +39,7 @@ class Window : public ::cppu::WeakImplHelper< css::media::XPlayerWindow,
 {
 public:
 
-    explicit Window( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxMgr );
+    explicit Window();
     virtual ~Window();
 
     // XPlayerWindow
@@ -79,8 +79,6 @@ public:
 
 private:
 
-    css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
-
     css::media::ZoomLevel                       meZoomLevel;
     int                                         mnPointerType;
 };
commit 472388fda8afc28d7b9f61056f45a741abfb732e
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Dec 23 09:51:38 2015 +0200

    loplugin:unusedfields in basctl
    
    Change-Id: I565bd86167c93ece1d65ce8a3b148144f5a7107a

diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 78518d1..c515c23 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -67,7 +67,7 @@ void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPool
 
 VclPtr<vcl::Window> LibBoxControl::CreateItemWindow( vcl::Window *pParent )
 {
-    return VclPtr<LibBox>::Create( pParent, m_xFrame );
+    return VclPtr<LibBox>::Create( pParent );
 }
 
 
@@ -133,9 +133,8 @@ void DocListenerBox::onDocumentModeChanged( const ScriptDocument& /*_rDocument*/
     // not interested in
 }
 
-LibBox::LibBox( vcl::Window* pParent, const uno::Reference< frame::XFrame >& rFrame ) :
-    DocListenerBox( pParent ),
-    m_xFrame( rFrame )
+LibBox::LibBox( vcl::Window* pParent ) :
+    DocListenerBox( pParent )
 {
     FillBox();
     bIgnoreSelect = true;   // do not yet transfer select of 0
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index 9102741..77f8642 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -77,7 +77,6 @@ private:
     OUString        aCurText;
     bool            bIgnoreSelect;
     bool            bFillBox;
-    css::uno::Reference< css::frame::XFrame > m_xFrame;
 
     static void     ReleaseFocus();
     void            InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation );
@@ -93,8 +92,7 @@ protected:
     virtual bool    PreNotify( NotifyEvent& rNEvt ) override;
 
 public:
-                    LibBox( vcl::Window* pParent,
-                            const css::uno::Reference< css::frame::XFrame >& rFrame );
+                    LibBox( vcl::Window* pParent );
     virtual         ~LibBox();
     virtual void    dispose() override;
 
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 94b2f18..72e617d 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -534,8 +534,6 @@ public:
 class UnoTypeCodeCompletetor
 {
 private:
-    css::uno::Reference< css::lang::XMultiServiceFactory > xFactory;
-    css::uno::Reference< css::reflection::XIdlReflection > xRefl;
     css::uno::Reference< css::reflection::XIdlClass > xClass;
     bool bCanComplete;
 
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 4d0da3c..32175e2 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -732,7 +732,7 @@ void LibInfos::InsertInfo (
 {
     Key aKey(rDocument, rLibName);
     m_aMap.erase(aKey);
-    m_aMap.insert(Map::value_type(aKey, Item(rDocument, rCurrentName, eCurrentType)));
+    m_aMap.insert(Map::value_type(aKey, Item(rCurrentName, eCurrentType)));
 }
 
 void LibInfos::RemoveInfoFor (ScriptDocument const& rDocument)
@@ -771,11 +771,9 @@ size_t LibInfos::Key::Hash::operator () (Key const& rKey) const
 }
 
 LibInfos::Item::Item (
-    ScriptDocument const& rDocument,
     OUString const& rCurrentName,
     ItemType eCurrentType
 ) :
-    m_aDocument(rDocument),
     m_aCurrentName(rCurrentName),
     m_eCurrentType(eCurrentType)
 { }
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index d09a0cc..8b1e06b 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -272,12 +272,11 @@ public:
     class Item
     {
     private:
-        ScriptDocument  m_aDocument;
         OUString        m_aCurrentName;
         ItemType        m_eCurrentType;
 
     public:
-        Item (ScriptDocument const&, OUString const& rCurrentName, ItemType eCurrentType);
+        Item (OUString const& rCurrentName, ItemType eCurrentType);
         ~Item ();
         const OUString& GetCurrentName()        const { return m_aCurrentName; }
         ItemType        GetCurrentType()        const { return m_eCurrentType; }
commit 70d14d2ccdc17266f76775e2171df12fefbbf13c
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Dec 23 09:46:48 2015 +0200

    loplugin:unusedfields in basic
    
    Change-Id: I304f3903f305ba5b538964071ab95b57ebf2f970

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 316234e..5bea517 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3793,17 +3793,15 @@ SbUnoSingleton* findUnoSingleton( const OUString& rName )
             {
                 Reference< XSingletonTypeDescription > xSingletonTypeDesc( xTypeDesc, UNO_QUERY );
                 if( xSingletonTypeDesc.is() )
-                    pSbUnoSingleton = new SbUnoSingleton( rName, xSingletonTypeDesc );
+                    pSbUnoSingleton = new SbUnoSingleton( rName );
             }
         }
     }
     return pSbUnoSingleton;
 }
 
-SbUnoSingleton::SbUnoSingleton( const OUString& aName_,
-    const Reference< XSingletonTypeDescription >& xSingletonTypeDesc )
+SbUnoSingleton::SbUnoSingleton( const OUString& aName_ )
         : SbxObject( aName_ )
-        , m_xSingletonTypeDesc( xSingletonTypeDesc )
 {
     SbxVariableRef xGetMethodRef = new SbxMethod( OUString( "get"  ), SbxOBJECT );
     QuickInsert( static_cast<SbxVariable*>(xGetMethodRef) );
@@ -3991,7 +3989,6 @@ public:
     virtual sal_Bool SAL_CALL hasProperty(const OUString& Name) throw( RuntimeException, std::exception ) override;
 
 private:
-    Reference< XIdlReflection >  m_xCoreReflection;
     Reference< XAllListener >    m_xAllListener;
     Reference< XIdlClass >       m_xListenerType;
     Any                          m_Helper;
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 5f2ed0f..8112158 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -119,7 +119,6 @@ public:
     (
         ModifiableHelper& _rModifiable,
         const OUString& aName,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
         SfxDialogLibraryContainer* pParent
     );
@@ -128,7 +127,6 @@ public:
     (
         ModifiableHelper& _rModifiable,
         const OUString& aName,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
         const OUString& aLibInfoFileURL, const OUString& aStorageURL, bool ReadOnly,
         SfxDialogLibraryContainer* pParent
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index e286ffd..cdc8a65 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -560,7 +560,6 @@ class SfxLibrary
     friend class SfxDialogLibraryContainer;
     friend class SfxScriptLibraryContainer;
 
-    css::uno::Reference< css::uno::XComponentContext >    mxContext;
     css::uno::Reference< css::ucb::XSimpleFileAccess3 >   mxSFI;
 
     ModifiableHelper&                                     mrModifiable;
@@ -622,13 +621,11 @@ public:
     SfxLibrary(
         ModifiableHelper& _rModifiable,
         const css::uno::Type& aType,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI
     );
     SfxLibrary(
         ModifiableHelper& _rModifiable,
         const css::uno::Type& aType,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
         const OUString& aLibInfoFileURL,
         const OUString& aStorageURL,
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 4c01fb1..3cec557 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -285,11 +285,8 @@ public:
 // Wrapper for UNO Singleton
 class SbUnoSingleton : public SbxObject
 {
-    const css::uno::Reference< css::reflection::XSingletonTypeDescription >   m_xSingletonTypeDesc;
-
 public:
-    SbUnoSingleton( const OUString& aName_,
-        const css::uno::Reference< css::reflection::XSingletonTypeDescription >& xSingletonTypeDesc );
+    SbUnoSingleton( const OUString& aName_ );
 
     void Notify( SfxBroadcaster&, const SfxHint& rHint ) override;
 };
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 69914c9..fccf638 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -148,14 +148,12 @@ public:
     SfxScriptLibrary
     (
         ModifiableHelper& _rModifiable,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI
     );
 
     SfxScriptLibrary
     (
         ModifiableHelper& _rModifiable,
-        const css::uno::Reference< css::uno::XComponentContext >& xContext,
         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xSFI,
         const OUString& aLibInfoFileURL, const OUString& aStorageURL, bool ReadOnly
     );
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index be8cd6a..ba60807 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -85,7 +85,7 @@ SfxDialogLibraryContainer::SfxDialogLibraryContainer( const uno::Reference< embe
 // Methods to get library instances of the correct type
 SfxLibrary* SfxDialogLibraryContainer::implCreateLibrary( const OUString& aName )
 {
-    SfxLibrary* pRet = new SfxDialogLibrary( maModifiable, aName, mxContext, mxSFI, this );
+    SfxLibrary* pRet = new SfxDialogLibrary( maModifiable, aName, mxSFI, this );
     return pRet;
 }
 
@@ -94,7 +94,7 @@ SfxLibrary* SfxDialogLibraryContainer::implCreateLibraryLink
       const OUString& StorageURL, bool ReadOnly )
 {
     SfxLibrary* pRet = new SfxDialogLibrary
-            ( maModifiable, aName, mxContext, mxSFI, aLibInfoFileURL, StorageURL, ReadOnly, this );
+            ( maModifiable, aName, mxSFI, aLibInfoFileURL, StorageURL, ReadOnly, this );
     return pRet;
 }
 
@@ -467,10 +467,9 @@ Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceName
 // Ctor
 SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
                                     const OUString& aName,
-                                    const Reference< XComponentContext >& xContext,
                                     const Reference< XSimpleFileAccess3 >& xSFI,
                                     SfxDialogLibraryContainer* pParent )
-    : SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(), xContext, xSFI )
+    : SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(), xSFI )
     , m_pParent( pParent )
     , m_aName( aName )
 {
@@ -478,14 +477,13 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
 
 SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable,
                                     const OUString& aName,
-                                    const Reference< XComponentContext >& xContext,
                                     const Reference< XSimpleFileAccess3 >& xSFI,
                                     const OUString& aLibInfoFileURL,
                                     const OUString& aStorageURL,
                                     bool ReadOnly,
                                     SfxDialogLibraryContainer* pParent )
     : SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(),
-                       xContext, xSFI, aLibInfoFileURL, aStorageURL, ReadOnly)
+                       xSFI, aLibInfoFileURL, aStorageURL, ReadOnly)
     , m_pParent( pParent )
     , m_aName( aName )
 {
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index e3baba0..472b74e 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -3003,9 +3003,8 @@ sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const OUString& _rServic
 
 // Ctor
 SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
-    const Reference< XComponentContext >& xContext, const Reference< XSimpleFileAccess3 >& xSFI )
+    const Reference< XSimpleFileAccess3 >& xSFI )
         : OComponentHelper( m_aMutex )
-        , mxContext( xContext )
         , mxSFI( xSFI )
         , mrModifiable( _rModifiable )
         , maNameContainer( new NameContainer(aType) )
@@ -3025,10 +3024,9 @@ SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
 }
 
 SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
-    const Reference< XComponentContext >& xContext, const Reference< XSimpleFileAccess3 >& xSFI,
+    const Reference< XSimpleFileAccess3 >& xSFI,
     const OUString& aLibInfoFileURL, const OUString& aStorageURL, bool ReadOnly )
         : OComponentHelper( m_aMutex )
-        , mxContext( xContext )
         , mxSFI( xSFI )
         , mrModifiable( _rModifiable )
         , maNameContainer( new NameContainer(aType) )
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 84ee6f6..f3be73f 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -117,7 +117,7 @@ SfxScriptLibraryContainer::SfxScriptLibraryContainer( const uno::Reference< embe
 SfxLibrary* SfxScriptLibraryContainer::implCreateLibrary( const OUString& aName )
 {
     (void)aName;    // Only needed for SfxDialogLibrary
-    SfxLibrary* pRet = new SfxScriptLibrary( maModifiable, mxContext, mxSFI );
+    SfxLibrary* pRet = new SfxScriptLibrary( maModifiable, mxSFI );
     return pRet;
 }
 
@@ -127,7 +127,7 @@ SfxLibrary* SfxScriptLibraryContainer::implCreateLibraryLink( const OUString& aN
                                                               bool ReadOnly )
 {
     (void)aName;    // Only needed for SfxDialogLibrary
-    SfxLibrary* pRet = new SfxScriptLibrary( maModifiable, mxContext, mxSFI,
+    SfxLibrary* pRet = new SfxScriptLibrary( maModifiable, mxSFI,
                                              aLibInfoFileURL, StorageURL, ReadOnly );
     return pRet;
 }
@@ -1181,21 +1181,19 @@ Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceName
 
 // Ctor
 SfxScriptLibrary::SfxScriptLibrary( ModifiableHelper& _rModifiable,
-                                    const Reference< XComponentContext >& xContext,
                                     const Reference< XSimpleFileAccess3 >& xSFI )
-    : SfxLibrary( _rModifiable, cppu::UnoType<OUString>::get(), xContext, xSFI )
+    : SfxLibrary( _rModifiable, cppu::UnoType<OUString>::get(), xSFI )
     , mbLoadedSource( false )
     , mbLoadedBinary( false )
 {
 }
 
 SfxScriptLibrary::SfxScriptLibrary( ModifiableHelper& _rModifiable,
-                                    const Reference< XComponentContext >& xContext,
                                     const Reference< XSimpleFileAccess3 >& xSFI,
                                     const OUString& aLibInfoFileURL,
                                     const OUString& aStorageURL,
                                     bool ReadOnly )
-    : SfxLibrary( _rModifiable, cppu::UnoType<OUString>::get(), xContext, xSFI,
+    : SfxLibrary( _rModifiable, cppu::UnoType<OUString>::get(), xSFI,
                         aLibInfoFileURL, aStorageURL, ReadOnly)
     , mbLoadedSource( false )
     , mbLoadedBinary( false )


More information about the Libreoffice-commits mailing list