[Libreoffice-commits] core.git: cppcanvas/source formula/source include/cppcanvas include/vcl sd/source vcl/null vcl/unx

Noel Grandin noel.grandin at collabora.co.uk
Thu Nov 3 11:37:59 UTC 2016


 cppcanvas/source/wrapper/implsprite.cxx        |    5 --
 cppcanvas/source/wrapper/implsprite.hxx        |    3 -
 formula/source/ui/dlg/formula.cxx              |   43 ++++++++++++-------------
 include/cppcanvas/sprite.hxx                   |    3 -
 include/vcl/printerinfomanager.hxx             |    4 --
 sd/source/ui/sidebar/PanelFactory.hxx          |    3 -
 vcl/null/printerinfomanager.cxx                |    5 --
 vcl/unx/generic/printer/printerinfomanager.cxx |   21 ++++--------
 8 files changed, 28 insertions(+), 59 deletions(-)

New commits:
commit b01c5ae95683aa4c059048eac3b3eb55cc256be4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Nov 3 11:07:20 2016 +0200

    loplugin:unusedmethods unused return types
    
    Change-Id: I88204bca60dd1e299b040c52bc87e500cbfaa930
    Reviewed-on: https://gerrit.libreoffice.org/30519
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cppcanvas/source/wrapper/implsprite.cxx b/cppcanvas/source/wrapper/implsprite.cxx
index 889b061..e292178 100644
--- a/cppcanvas/source/wrapper/implsprite.cxx
+++ b/cppcanvas/source/wrapper/implsprite.cxx
@@ -190,11 +190,6 @@ namespace cppcanvas
             if( mxSprite.is() )
                 mxSprite->setPriority(fPriority);
         }
-
-        uno::Reference< rendering::XSprite > ImplSprite::getUNOSprite() const
-        {
-            return mxSprite;
-        }
     }
 }
 
diff --git a/cppcanvas/source/wrapper/implsprite.hxx b/cppcanvas/source/wrapper/implsprite.hxx
index 82011e7..d9aa069 100644
--- a/cppcanvas/source/wrapper/implsprite.hxx
+++ b/cppcanvas/source/wrapper/implsprite.hxx
@@ -53,9 +53,6 @@ namespace cppcanvas
 
             virtual void setPriority( double fPriority ) override;
 
-            virtual css::uno::Reference<
-                css::rendering::XSprite >  getUNOSprite() const override;
-
         private:
             ImplSprite(const ImplSprite&) = delete;
             ImplSprite& operator=( const ImplSprite& ) = delete;
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 4947a36..f745cbc 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -121,7 +121,7 @@ public:
     RefEdit*        GetCurrRefEdit();
 
     const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
-    uno::Reference< sheet::XFormulaOpCodeMapper > const & GetFormulaOpCodeMapper() const;
+    void InitFormulaOpCodeMapper();
 
     DECL_LINK( ModifyHdl, ParaWin&, void );
     DECL_LINK( FxHdl, ParaWin&, void );
@@ -403,30 +403,29 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt )
     pData->SetFocusWindow(pWin);
 }
 
-uno::Reference< sheet::XFormulaOpCodeMapper > const & FormulaDlg_Impl::GetFormulaOpCodeMapper() const
+void FormulaDlg_Impl::InitFormulaOpCodeMapper()
 {
-    if ( !m_xOpCodeMapper.is() )
-    {
-        m_xOpCodeMapper = m_pHelper->getFormulaOpCodeMapper();
-        m_aFunctionOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::FUNCTIONS);
-        m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength();
+    if ( m_xOpCodeMapper.is() )
+        return;
+
+    m_xOpCodeMapper = m_pHelper->getFormulaOpCodeMapper();
+    m_aFunctionOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::FUNCTIONS);
+    m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength();
 
-        m_aUnaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::UNARY_OPERATORS);
-        m_pUnaryOpCodesEnd = m_aUnaryOpCodes.getConstArray() + m_aUnaryOpCodes.getLength();
+    m_aUnaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::UNARY_OPERATORS);
+    m_pUnaryOpCodesEnd = m_aUnaryOpCodes.getConstArray() + m_aUnaryOpCodes.getLength();
 
-        m_aBinaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::BINARY_OPERATORS);
-        m_pBinaryOpCodesEnd = m_aBinaryOpCodes.getConstArray() + m_aBinaryOpCodes.getLength();
+    m_aBinaryOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::BINARY_OPERATORS);
+    m_pBinaryOpCodesEnd = m_aBinaryOpCodes.getConstArray() + m_aBinaryOpCodes.getLength();
 
-        uno::Sequence< OUString > aArgs(3);
-        aArgs[TOKEN_OPEN]   = "(";
-        aArgs[TOKEN_CLOSE]  = ")";
-        aArgs[TOKEN_SEP]    = ";";
-        m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings(aArgs,sheet::FormulaLanguage::ODFF);
+    uno::Sequence< OUString > aArgs(3);
+    aArgs[TOKEN_OPEN]   = "(";
+    aArgs[TOKEN_CLOSE]  = ")";
+    aArgs[TOKEN_SEP]    = ";";
+    m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings(aArgs,sheet::FormulaLanguage::ODFF);
 
-        m_aSpecialOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::SPECIAL);
-        m_pSpecialOpCodesEnd = m_aSpecialOpCodes.getConstArray() + m_aSpecialOpCodes.getLength();
-    } // if ( !m_xOpCodeMapper.is() )
-    return m_xOpCodeMapper;
+    m_aSpecialOpCodes = m_xOpCodeMapper->getAvailableMappings(sheet::FormulaLanguage::ODFF,sheet::FormulaMapGroup::SPECIAL);
+    m_pSpecialOpCodesEnd = m_aSpecialOpCodes.getConstArray() + m_aSpecialOpCodes.getLength();
 }
 
 void FormulaDlg_Impl::DeleteArgs()
@@ -744,7 +743,7 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree,SvTreeListEntry* pParent,Formu
 
 void FormulaDlg_Impl::fillTree(StructPage* _pTree)
 {
-    GetFormulaOpCodeMapper();
+    InitFormulaOpCodeMapper();
     FormulaToken* pToken = m_pTokenArray->LastRPN();
 
     if( pToken != nullptr)
@@ -766,7 +765,7 @@ void FormulaDlg_Impl::UpdateTokenArray( const OUString& rStrExp)
     {
         DBG_UNHANDLED_EXCEPTION();
     }
-    GetFormulaOpCodeMapper(); // just to get it initialized
+    InitFormulaOpCodeMapper();
     m_pTokenArray = m_pHelper->convertToTokenArray(m_aTokenList);
     const sal_Int32 nLen = static_cast<sal_Int32>(m_pTokenArray->GetLen());
     FormulaToken** pTokens = m_pTokenArray->GetArray();
diff --git a/include/cppcanvas/sprite.hxx b/include/cppcanvas/sprite.hxx
index e5d4bd8..52b967e 100644
--- a/include/cppcanvas/sprite.hxx
+++ b/include/cppcanvas/sprite.hxx
@@ -96,9 +96,6 @@ namespace cppcanvas
             priority.
          */
         virtual void setPriority( double fPriority ) = 0;
-
-        virtual css::uno::Reference<
-            css::rendering::XSprite > getUNOSprite() const = 0;
     };
 
     typedef std::shared_ptr< ::cppcanvas::Sprite > SpriteSharedPtr;
diff --git a/include/vcl/printerinfomanager.hxx b/include/vcl/printerinfomanager.hxx
index 6dddd02..258b544 100644
--- a/include/vcl/printerinfomanager.hxx
+++ b/include/vcl/printerinfomanager.hxx
@@ -171,10 +171,6 @@ public:
     // fails if the specified printer does not exist
     virtual bool setDefaultPrinter( const OUString& rPrinterName );
 
-    // primarily used internally
-    // returns the printer queue names
-    const std::list< SystemPrintQueue >& getSystemPrintQueues();
-
     // abstract print command
     // returns a stdio FILE* that a postscript file may be written to
     // this may either be a regular file or the result of popen()
diff --git a/sd/source/ui/sidebar/PanelFactory.hxx b/sd/source/ui/sidebar/PanelFactory.hxx
index d017825..a2bcf78 100644
--- a/sd/source/ui/sidebar/PanelFactory.hxx
+++ b/sd/source/ui/sidebar/PanelFactory.hxx
@@ -49,9 +49,6 @@ class PanelFactory
       public PanelFactoryInterfaceBase
 {
 public:
-    static css::uno::Reference<css::uno::XInterface> SAL_CALL createInstance (
-        const css::uno::Reference<css::lang::XMultiServiceFactory>& rxFactory);
-
     explicit PanelFactory (const css::uno::Reference<css::uno::XComponentContext>& rxContext);
     virtual ~PanelFactory() override;
     PanelFactory(const PanelFactory&) = delete;
diff --git a/vcl/null/printerinfomanager.cxx b/vcl/null/printerinfomanager.cxx
index 833152f..de71d01 100644
--- a/vcl/null/printerinfomanager.cxx
+++ b/vcl/null/printerinfomanager.cxx
@@ -96,11 +96,6 @@ bool PrinterInfoManager::setDefaultPrinter( const OUString& /* rPrinterName */ )
     return false;
 }
 
-const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues()
-{
-    return m_aSystemPrintQueues;
-}
-
 bool PrinterInfoManager::checkFeatureToken( const OUString& /* rPrinterName */, const char* /* pToken */ ) const
 {
     return false;
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 820610f..05881c8 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -500,7 +500,13 @@ void PrinterInfoManager::initialize()
             aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue );
     }
 
-    getSystemPrintQueues();
+    if( m_pQueueInfo && m_pQueueInfo->hasChanged() )
+    {
+        m_aSystemPrintCommand = m_pQueueInfo->getCommand();
+        m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
+        delete m_pQueueInfo;
+        m_pQueueInfo = nullptr;
+    }
     for( ::std::list< SystemPrintQueue >::iterator it = m_aSystemPrintQueues.begin(); it != m_aSystemPrintQueues.end(); ++it )
     {
         OUString aPrinterName( "<" );
@@ -816,19 +822,6 @@ bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName )
     return bSuccess;
 }
 
-const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues()
-{
-    if( m_pQueueInfo && m_pQueueInfo->hasChanged() )
-    {
-        m_aSystemPrintCommand = m_pQueueInfo->getCommand();
-        m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
-        delete m_pQueueInfo;
-        m_pQueueInfo = nullptr;
-    }
-
-    return m_aSystemPrintQueues;
-}
-
 bool PrinterInfoManager::checkFeatureToken( const OUString& rPrinterName, const char* pToken ) const
 {
     const PrinterInfo& rPrinterInfo( getPrinterInfo( rPrinterName ) );


More information about the Libreoffice-commits mailing list