[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 include/svx include/vcl sc/inc sc/source sfx2/source svx/source vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 26 06:30:47 UTC 2019


 cui/source/factory/dlgfact.cxx      |   11 -----------
 cui/source/factory/dlgfact.hxx      |    9 ---------
 include/sfx2/basedlgs.hxx           |    4 ----
 include/sfx2/tabdlg.hxx             |    7 -------
 include/svx/dbaexchange.hxx         |   21 ---------------------
 include/vcl/svlbitm.hxx             |    1 -
 include/vcl/treelistbox.hxx         |    1 -
 sc/inc/dociter.hxx                  |    2 +-
 sc/inc/segmenttree.hxx              |    4 ++--
 sc/source/core/data/dociter.cxx     |    6 +++---
 sc/source/core/data/segmenttree.cxx |    2 +-
 sc/source/filter/xml/xmlrowi.cxx    |    2 +-
 sc/source/ui/docshell/docsh.cxx     |    2 +-
 sfx2/source/dialog/basedlgs.cxx     |   13 -------------
 sfx2/source/dialog/tabdlg.cxx       |   18 ------------------
 svx/source/fmcomp/dbaexchange.cxx   |   29 -----------------------------
 vcl/source/treelist/svlbitm.cxx     |    5 -----
 17 files changed, 9 insertions(+), 128 deletions(-)

New commits:
commit 276c722b0c13d84756da8e06fb94f58810c8849a
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 25 16:49:38 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 26 07:30:35 2019 +0100

    flatten TabRanges
    
    no need to declare this separately, saves one pointer hop
    
    Change-Id: I14fd82a9448c43ddfa0b6179a3b79cf6d364130d
    Reviewed-on: https://gerrit.libreoffice.org/69687
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 77541cec1511..5bb957059b03 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -567,7 +567,7 @@ public:
     struct TabRanges
     {
         SCTAB mnTab;
-        std::shared_ptr<ScFlatBoolRowSegments> mpRanges;
+        ScFlatBoolRowSegments maRanges;
 
         TabRanges(SCTAB nTab);
     };
diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index 8a7eb1ae0a8d..8414176d125d 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -56,11 +56,11 @@ public:
     class RangeIterator
     {
     public:
-        explicit RangeIterator(ScFlatBoolRowSegments& rSegs);
+        explicit RangeIterator(ScFlatBoolRowSegments const & rSegs);
         bool getFirst(RangeData& rRange);
         bool getNext(RangeData& rRange);
     private:
-        ScFlatBoolRowSegments& mrSegs;
+        ScFlatBoolRowSegments const & mrSegs;
     };
 
     ScFlatBoolRowSegments();
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5031caa5666b..d9bb1c415b8e 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2511,7 +2511,7 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& rCol, SCROW& rRow1, SCRO
 }
 
 ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab) :
-    mnTab(nTab), mpRanges(new ScFlatBoolRowSegments)
+    mnTab(nTab)
 {
 }
 
@@ -2537,7 +2537,7 @@ void ScDocRowHeightUpdater::update()
             continue;
 
         ScFlatBoolRowSegments::RangeData aData;
-        ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges);
+        ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges);
         for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = aRangeItr.getNext(aData))
         {
             if (!aData.mbValue)
@@ -2559,7 +2559,7 @@ void ScDocRowHeightUpdater::update()
 
         sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
         ScFlatBoolRowSegments::RangeData aData;
-        ScFlatBoolRowSegments::RangeIterator aRangeItr(*rTabRanges.mpRanges);
+        ScFlatBoolRowSegments::RangeIterator aRangeItr(rTabRanges.maRanges);
         for (bool bFound = aRangeItr.getFirst(aData); bFound; bFound = aRangeItr.getNext(aData))
         {
             if (!aData.mbValue)
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index e7b35ea5dfd5..b47f1e7b9f3c 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -318,7 +318,7 @@ bool ScFlatBoolRowSegments::ForwardIterator::getValue(SCROW nPos, bool& rVal)
     return true;
 }
 
-ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments& rSegs) :
+ScFlatBoolRowSegments::RangeIterator::RangeIterator(ScFlatBoolRowSegments const & rSegs) :
     mrSegs(rSegs)
 {
 }
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index e2729da7c2c9..e0b6480a7fb3 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -210,7 +210,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
                             rRecalcRanges.emplace_back(0);
                         }
                         rRecalcRanges.at(nSheet).mnTab = nSheet;
-                        rRecalcRanges.at(nSheet).mpRanges->setTrue(nFirstRow, nCurrentRow);
+                        rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
                     }
                 }
             }
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 8e66516e2442..298c8197e6a4 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1361,7 +1361,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 
             ScDocRowHeightUpdater::TabRanges aRecalcRanges(0);
             ErrCode eError = DBaseImport( rMedium.GetPhysicalName(),
-                    ScGlobal::GetCharsetValue(sItStr), aColWidthParam, *aRecalcRanges.mpRanges );
+                    ScGlobal::GetCharsetValue(sItStr), aColWidthParam, aRecalcRanges.maRanges );
             aRecalcRowRangesArray.push_back(aRecalcRanges);
 
             if (eError != ERRCODE_NONE)
commit 6c0f5f7f2a6cc122a738deb0a17353cca1cd5c7e
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 25 15:55:37 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 26 07:30:21 2019 +0100

    loplugin:unusedmethods
    
    Change-Id: I8bbf439d69a330a9ad28ff52cc49a9fec2c12500
    Reviewed-on: https://gerrit.libreoffice.org/69684
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 91b3e943621b..08fea16c4049 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -97,7 +97,6 @@ using ::com::sun::star::uno::Reference;
 
 using namespace svx;
 // AbstractTabDialog implementations just forwards everything to the dialog
-IMPL_ABSTDLG_BASE(CuiAbstractSfxDialog_Impl)
 
 short CuiAbstractController_Impl::Execute()
 {
@@ -343,16 +342,6 @@ void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
     m_xDlg->set_title(rStr);
 }
 
-const SfxItemSet* CuiAbstractSfxDialog_Impl::GetOutputItemSet() const
-{
-    return pDlg->GetOutputItemSet();
-}
-
-void CuiAbstractSfxDialog_Impl::SetText( const OUString& rStr )
-{
-    pDlg->SetText( rStr );
-}
-
 SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const
 {
     return m_xDlg->GetDistributeHor();
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 83e156abbf97..dae667cd312e 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -96,15 +96,6 @@ public:
     virtual short Execute() override;
 };
 
-class CuiAbstractSfxDialog_Impl : public SfxAbstractDialog
-{
-    DECL_ABSTDLG_BASE(CuiAbstractSfxDialog_Impl,SfxModalDialog)
-    virtual const SfxItemSet*   GetOutputItemSet() const override;
-
-        //From class Window.
-    virtual void          SetText( const OUString& rStr ) override;
-};
-
 class CuiAbstractSingleTabController_Impl : public SfxAbstractDialog
 {
     std::unique_ptr<SfxSingleTabDialogController> m_xDlg;
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index f58feba3cba2..311d7d397f06 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -142,9 +142,7 @@ protected:
     virtual ~SfxModelessDialogController() override;
 
 public:
-    void                    FillInfo(SfxChildWinInfo&) const;
     void                    Initialize (SfxChildWinInfo const * pInfo);
-    void                    DeInit();
     virtual void            Close() override;
     virtual void            EndDialog() override;
     virtual void            Activate() override;
@@ -221,8 +219,6 @@ public:
     void                SetTabPage(SfxTabPage* pTabPage);
     SfxTabPage*         GetTabPage() const { return pImpl->m_pSfxPage; }
 
-    OKButton*           GetOKButton() const { return pOKBtn; }
-
 private:
     VclPtr<OKButton>      pOKBtn;
     VclPtr<CancelButton>  pCancelBtn;
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 3b858cf4a7f5..0f6babf2774a 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -134,7 +134,6 @@ public:
                                     CreateTabPage pCreateFunc,      // != 0
                                     sal_uInt16 nPos = TAB_APPEND);
 
-    void                RemoveTabPage( const OString& rName ); // Name of the label for the page in the notebook .ui
     void                RemoveTabPage( sal_uInt16 nId );
 
     void                SetCurPageId(sal_uInt16 nId)
@@ -169,14 +168,8 @@ public:
     void                SetInputSet( const SfxItemSet* pInSet );
     const SfxItemSet*   GetOutputItemSet() const { return m_pOutSet.get(); }
 
-    const PushButton&   GetOKButton() const { return *m_pOKBtn; }
-    PushButton&         GetOKButton() { return *m_pOKBtn; }
-    const CancelButton& GetCancelButton() const { return *m_pCancelBtn; }
-    CancelButton&       GetCancelButton() { return *m_pCancelBtn; }
-
     short               Execute() override;
     bool                StartExecuteAsync( VclAbstractDialog::AsyncContext &rCtx ) override;
-    void                Start();
 
     const SfxItemSet*   GetExampleSet() const { return m_pExampleSet; }
 
diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx
index ffae51c0849a..1a5927f84dfc 100644
--- a/include/svx/dbaexchange.hxx
+++ b/include/svx/dbaexchange.hxx
@@ -53,15 +53,6 @@ namespace svx
     class SAL_WARN_UNUSED SVX_DLLPUBLIC OColumnTransferable final : public TransferableHelper
     {
     public:
-        /** construct the transferable
-        */
-        OColumnTransferable(
-             const OUString& _rDatasource
-            ,const OUString& _rCommand
-            ,const OUString& _rFieldName
-            ,ColumnTransferFormatFlags  _nFormats
-        );
-
         /** construct the transferable from a data access descriptor
 
             Note that some of the aspects, in particular all which cannot be represented
@@ -135,18 +126,6 @@ namespace svx
         static ODataAccessDescriptor
                         extractColumnDescriptor(const TransferableDataHelper& _rData);
 
-        /** adds the data contained in the object to the given data container
-            <p>This method helps you treating this class as simple container class:<br/>
-            At the moment, it is a data container and a transferable.
-            Using <method>addDataToContainer</method>, you can treat the class as dumb data container,
-            doing the Drag'n'Drop with a TransferDataContainer instance (which may contain
-            additional formats)</p>
-            @TODO
-                split this class into a two separate classes: one for the data container aspect, one for
-                the transfer aspect
-        */
-        void addDataToContainer( TransferDataContainer* _pContainer );
-
     private:
         // TransferableHelper overridables
         virtual void        AddSupportedFormats() override;
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx
index c5e478a6d539..e5c5f6dd840c 100644
--- a/include/vcl/svlbitm.hxx
+++ b/include/vcl/svlbitm.hxx
@@ -190,7 +190,6 @@ public:
     void SetStateUnchecked();
     void SetStateTristate();
     void SetStateHilighted(bool bHilight);
-    void SetStateInvisible();
 
     SvLBoxButtonKind GetKind() const { return eKind; }
 
diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 7031c0954acd..b90ee4b9fdb4 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -496,7 +496,6 @@ public:
     void                EnableCellFocus();
 
                         // For overwriting accessible role for all entries - normally 0, so each entry can be different
-    void                SetAllEntriesAccessibleRoleType( SvTreeAccRoleType n ) { nAllItemAccRoleType = n; }
     SvTreeAccRoleType   GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
 
     SvTreeFlags         GetTreeFlags() const {return nTreeFlags;}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index b7174b1ff76d..ce416ad935e4 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -506,19 +506,6 @@ void SfxModelessDialogController::Close()
         SfxCallMode::RECORD|SfxCallMode::SYNCHRON, { &aValue } );
 }
 
-/*  [Description]
-
-    Fills a SfxChildWinInfo with specific data from SfxModelessDialog,
-    so that it can be written in the INI file. It is assumed that rinfo
-    receives all other possible relevant data in the ChildWindow class.
-    ModelessDialogs have no specific information, so that the base
-    implementation does nothing and therefore must not be called.
-*/
-void SfxModelessDialogController::FillInfo(SfxChildWinInfo& rInfo) const
-{
-    rInfo.aSize = m_xDialog->get_size();
-}
-
 bool SfxFloatingWindow::EventNotify( NotifyEvent& rEvt )
 
 /*  [Description]
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 4fcc3cc25653..c73265b406d5 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -564,18 +564,6 @@ bool SfxTabDialog::StartExecuteAsync( VclAbstractDialog::AsyncContext &rCtx )
     return TabDialog::StartExecuteAsync( rCtx );
 }
 
-void SfxTabDialog::Start()
-{
-    m_pImpl->bModal = false;
-    Start_Impl();
-
-    Show();
-
-    if ( IsVisible() && ( !HasChildPathFocus() || HasFocus() ) )
-        GrabFocusToFirstControl();
-}
-
-
 void SfxTabDialog::Start_Impl()
 {
     assert(m_pImpl->aData.size() == m_pTabCtrl->GetPageCount()
@@ -685,12 +673,6 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
     }
 }
 
-void SfxTabDialog::RemoveTabPage(const OString &rName)
-{
-    RemoveTabPage(m_pTabCtrl->GetPageId(rName));
-}
-
-
 void SfxTabDialog::PageCreated
 
 /*  [Description]
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index a01525cfc00d..0e52f13f10d0 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -41,16 +41,6 @@ namespace svx
     using namespace ::com::sun::star::container;
     using namespace ::com::sun::star::datatransfer;
 
-    OColumnTransferable::OColumnTransferable(const OUString& _rDatasource
-                                            ,const OUString& _rCommand
-                                            ,const OUString& _rFieldName
-                                            ,ColumnTransferFormatFlags _nFormats)
-        :m_nFormatFlags(_nFormats)
-    {
-        implConstruct(_rDatasource,OUString(), css::sdb::CommandType::TABLE, _rCommand, _rFieldName);
-    }
-
-
     OColumnTransferable::OColumnTransferable(const ODataAccessDescriptor& _rDescriptor, ColumnTransferFormatFlags _nFormats )
         :m_nFormatFlags(_nFormats)
     {
@@ -341,25 +331,6 @@ namespace svx
     }
 
 
-    void OColumnTransferable::addDataToContainer( TransferDataContainer* _pContainer )
-    {
-        OSL_ENSURE( _pContainer, "OColumnTransferable::addDataToContainer: invalid container!" );
-        if ( _pContainer )
-        {
-            if ( m_nFormatFlags & ColumnTransferFormatFlags::FIELD_DESCRIPTOR )
-                _pContainer->CopyAny( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, makeAny( m_sCompatibleFormat ) );
-
-            if ( m_nFormatFlags & ColumnTransferFormatFlags::CONTROL_EXCHANGE )
-                _pContainer->CopyAny( SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, makeAny( m_sCompatibleFormat ) );
-
-            if ( m_nFormatFlags & ColumnTransferFormatFlags::COLUMN_DESCRIPTOR )
-            {
-                Any aContent = makeAny( m_aDescriptor.createPropertyValueSequence() );
-                _pContainer->CopyAny( getDescriptorFormatId(), aContent );
-            }
-        }
-    }
-
     ODataAccessObjectTransferable::ODataAccessObjectTransferable(
             const OUString&  _rDatasource
             ,const sal_Int32  _nCommandType
diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx
index 8edd585539f8..76d67ff36b49 100644
--- a/vcl/source/treelist/svlbitm.cxx
+++ b/vcl/source/treelist/svlbitm.cxx
@@ -361,11 +361,6 @@ bool SvLBoxButton::CheckModification() const
     return eKind == SvLBoxButtonKind::EnabledCheckbox;
 }
 
-void SvLBoxButton::SetStateInvisible()
-{
-    isVis = false;
-}
-
 // ***************************************************************
 // class SvLBoxContextBmp
 // ***************************************************************


More information about the Libreoffice-commits mailing list