[Libreoffice-commits] core.git: include/oox oox/source sd/inc sd/source vcl/inc vcl/source writerfilter/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 1 09:26:38 UTC 2021


 include/oox/shape/ShapeContextHandler.hxx             |    6 ---
 oox/source/shape/ShapeContextHandler.cxx              |   32 -----------------
 sd/inc/sdabstdlg.hxx                                  |    1 
 sd/source/ui/dlg/sddlgfact.cxx                        |    5 --
 sd/source/ui/dlg/sddlgfact.hxx                        |    1 
 vcl/inc/wizdlg.hxx                                    |   14 -------
 vcl/source/control/roadmapwizard.cxx                  |   30 ----------------
 vcl/source/control/wizardmachine.cxx                  |   33 ------------------
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |    2 -
 9 files changed, 124 deletions(-)

New commits:
commit 65af6fda33bc40670d41055f63e010c763f5b0b1
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 1 10:27:41 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 1 11:26:04 2021 +0200

    loplugin:unusedmethods
    
    Change-Id: I3ff5333c1e73ca61b0a7339e4b7dcfce211b88e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118207
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/oox/shape/ShapeContextHandler.hxx b/include/oox/shape/ShapeContextHandler.hxx
index 39549c5d33af..ba500dd48f76 100644
--- a/include/oox/shape/ShapeContextHandler.hxx
+++ b/include/oox/shape/ShapeContextHandler.hxx
@@ -85,24 +85,18 @@ public:
 
     css::uno::Reference< css::drawing::XShape > getShape();
 
-    css::uno::Reference< css::drawing::XDrawPage > getDrawPage();
     void setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value);
 
-    css::uno::Reference< css::frame::XModel > getModel();
     void setModel(const css::uno::Reference< css::frame::XModel > & the_value);
 
-    OUString getRelationFragmentPath();
     void setRelationFragmentPath(const OUString & the_value);
 
     sal_Int32 getStartToken();
     void setStartToken( sal_Int32 _starttoken );
 
-    css::awt::Point getPosition();
     void setPosition(const css::awt::Point& rPosition);
 
     void setDocumentProperties(const css::uno::Reference<css::document::XDocumentProperties>& xDocProps);
-    css::uno::Reference<css::document::XDocumentProperties> getDocumentProperties();
-    css::uno::Sequence<css::beans::PropertyValue> getMediaDescriptor();
     void setMediaDescriptor(const css::uno::Sequence<css::beans::PropertyValue>& rMediaDescriptor);
 
     void setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rGraphicMapper);
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 0d03d322d011..066d49d00f60 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -513,23 +513,11 @@ ShapeContextHandler::getShape()
     return xResult;
 }
 
-css::uno::Reference< css::drawing::XDrawPage > ShapeContextHandler::getDrawPage()
-{
-    return mxDrawPage;
-}
-
 void ShapeContextHandler::setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value)
 {
     mxDrawPage = the_value;
 }
 
-css::uno::Reference< css::frame::XModel > ShapeContextHandler::getModel()
-{
-    if( !mxShapeFilterBase.is() )
-        throw uno::RuntimeException();
-    return mxShapeFilterBase->getModel();
-}
-
 void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel > & the_value)
 {
     if( !mxShapeFilterBase.is() )
@@ -538,11 +526,6 @@ void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel
     mxShapeFilterBase->setTargetDocument(xComp);
 }
 
-OUString ShapeContextHandler::getRelationFragmentPath()
-{
-    return msRelationFragmentPath;
-}
-
 void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
 {
     msRelationFragmentPath = the_value;
@@ -558,11 +541,6 @@ void ShapeContextHandler::setStartToken( sal_Int32 _starttoken )
     mnStartToken = _starttoken;
 }
 
-awt::Point ShapeContextHandler::getPosition()
-{
-    return maPosition;
-}
-
 void ShapeContextHandler::setPosition(const awt::Point& rPosition)
 {
     maPosition = rPosition;
@@ -574,16 +552,6 @@ void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::X
     mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
 }
 
-uno::Reference<document::XDocumentProperties> ShapeContextHandler::getDocumentProperties()
-{
-    return mxDocumentProperties;
-}
-
-uno::Sequence<beans::PropertyValue> ShapeContextHandler::getMediaDescriptor()
-{
-    return maMediaDescriptor;
-}
-
 void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
 {
     maMediaDescriptor = rMediaDescriptor;
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index c5c8c3a38ad4..4c9c547f98a2 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -70,7 +70,6 @@ class AbstractSdCustomShowDlg : public VclAbstractDialog
 protected:
     virtual ~AbstractSdCustomShowDlg() override = default;
 public:
-    virtual bool        IsModified() const = 0;
     virtual bool        IsCustomShow() const = 0;
 };
 
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index f5ab2524cdb9..0335c68fa8be 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -240,11 +240,6 @@ OString AbstractCopyDlg_Impl::GetScreenshotId() const
     return m_xDlg->get_help_id();
 }
 
-bool AbstractSdCustomShowDlg_Impl::IsModified() const
-{
-    return m_xDlg->IsModified();
-}
-
 bool AbstractSdCustomShowDlg_Impl::IsCustomShow() const
 {
     return m_xDlg->IsCustomShow();
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index c637eab5d6bc..6570c2b93b5d 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -133,7 +133,6 @@ public:
     {
     }
     virtual short       Execute() override;
-    virtual bool        IsModified() const override ;
     virtual bool        IsCustomShow() const override ;
 
     // screenshotting
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index c997741958d3..bfae0641a5ce 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -133,12 +133,6 @@ namespace vcl
         void                SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
         const Size&         GetPageSizePixel() const { return maPageSize; }
 
-        /// enable (or disable) buttons
-        void                enableButtons(WizardButtonFlags _nWizardButtonFlags, bool _bEnable);
-
-        /// determines whether there is a next state to which we can advance
-        bool            canAdvance() const;
-
         void            SetRoadmapHelpId( const OString& _rId );
 
         void            InsertRoadmapItem(int nIndex, const OUString& rLabel, int nId, bool bEnabled);
@@ -174,13 +168,6 @@ namespace vcl
         /// travel to the previous state
         void                travelPrevious();
 
-        /** enables the automatic enabled/disabled state of the "Next" button
-
-            If this is <TRUE/>, then upon entering a new state, the "Next" button will automatically be
-            enabled if and only if determineNextState does not return WZS_INVALID_STATE.
-        */
-        bool                isAutomaticNextButtonStateEnabled() const;
-
         /** removes a page from the history. Should be called when the page is being disabled
         */
         void                removePageFromHistory(WizardTypes::WizardState nToRemove);
@@ -267,7 +254,6 @@ namespace vcl
         DECL_LINK(OnPrevPage, Button*, void);
         DECL_LINK(OnFinish, Button*, void);
 
-        void     implUpdateTitle();
         void     implConstruct( const WizardButtonFlags _nButtonFlags );
     };
 
diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx
index 9f574ef19635..9530d8df3848 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -534,36 +534,6 @@ namespace vcl
         return aActivePathPos->second[ nNextStateIndex ];
     }
 
-    bool RoadmapWizard::canAdvance() const
-    {
-        if ( !m_xRoadmapImpl->bActivePathIsDefinite )
-        {
-            // check how many paths are still allowed
-            const WizardPath& rActivePath( m_xRoadmapImpl->aPaths[ m_xRoadmapImpl->nActivePath ] );
-            sal_Int32 nCurrentStatePathIndex = RoadmapWizardImpl::getStateIndexInPath( getCurrentState(), rActivePath );
-
-            size_t nPossiblePaths(0);
-            for (auto const& path : m_xRoadmapImpl->aPaths)
-            {
-                // the index from which on both paths differ
-                sal_Int32 nDivergenceIndex = RoadmapWizardImpl::getFirstDifferentIndex( rActivePath, path.second );
-
-                if ( nDivergenceIndex > nCurrentStatePathIndex )
-                    // this path is still a possible path
-                    nPossiblePaths += 1;
-            }
-
-            // if we have more than one path which is still possible, then we assume
-            // to always have a next state. Though there might be scenarios where this
-            // is not true, but this is too sophisticated (means not really needed) right now.
-            if ( nPossiblePaths > 1 )
-                return true;
-        }
-
-        const WizardPath& rPath = m_xRoadmapImpl->aPaths[ m_xRoadmapImpl->nActivePath ];
-        return *rPath.rbegin() != getCurrentState();
-    }
-
     bool RoadmapWizardMachine::canAdvance() const
     {
         if ( !m_pImpl->bActivePathIsDefinite )
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index f084804657ff..cbb414800372 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -384,20 +384,6 @@ namespace vcl
         Dialog::Resize();
     }
 
-    void RoadmapWizard::implUpdateTitle()
-    {
-        OUString sCompleteTitle(m_xWizardImpl->sTitleBase);
-
-        // append the page title
-        TabPage* pCurrentPage = GetPage(getCurrentState());
-        if ( pCurrentPage && !pCurrentPage->GetText().isEmpty() )
-        {
-            sCompleteTitle += " - " + pCurrentPage->GetText();
-        }
-
-        SetText(sCompleteTitle);
-    }
-
     void RoadmapWizard::CalcAndSetSize()
     {
         Size aDlgSize = GetPageSizePixel();
@@ -653,20 +639,6 @@ namespace vcl
         OSL_FAIL( "RoadmapWizard::RemoveButton() - Button not in list" );
     }
 
-    void RoadmapWizard::enableButtons(WizardButtonFlags _nWizardButtonFlags, bool _bEnable)
-    {
-        if (m_pFinish && (_nWizardButtonFlags & WizardButtonFlags::FINISH))
-            m_pFinish->Enable(_bEnable);
-        if (m_pNextPage && (_nWizardButtonFlags & WizardButtonFlags::NEXT))
-            m_pNextPage->Enable(_bEnable);
-        if (m_pPrevPage && (_nWizardButtonFlags & WizardButtonFlags::PREVIOUS))
-            m_pPrevPage->Enable(_bEnable);
-        if (m_pHelp && (_nWizardButtonFlags & WizardButtonFlags::HELP))
-            m_pHelp->Enable(_bEnable);
-        if (m_pCancel && (_nWizardButtonFlags & WizardButtonFlags::CANCEL))
-            m_pCancel->Enable(_bEnable);
-    }
-
     IMPL_LINK_NOARG(RoadmapWizard, OnFinish, Button*, void)
     {
         if ( isTravelingSuspended() )
@@ -787,11 +759,6 @@ namespace vcl
         }
     }
 
-    bool RoadmapWizard::isAutomaticNextButtonStateEnabled() const
-    {
-        return m_xWizardImpl->m_bAutoNextButtonState;
-    }
-
     IMPL_LINK_NOARG(RoadmapWizard, OnPrevPage, Button*, void)
     {
         if ( isTravelingSuspended() )
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 0e6590a60f69..0b79f9450afa 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -230,8 +230,6 @@ protected:
     void startAction();
     void endAction();
 
-    const css::uno::Reference< css::uno::XComponentContext >& getComponentContext() const { return m_xContext;}
-
     bool inPositionV;
     bool mbAllowInCell; // o:allowincell
     bool mbIsVMLfound;


More information about the Libreoffice-commits mailing list