[Libreoffice-commits] core.git: 2 commits - connectivity/source cui/source include/formula include/sfx2 include/svl reportdesign/source sc/source sd/source sfx2/source svl/source sw/source

Noel Grandin noel at peralex.com
Mon May 30 06:35:03 UTC 2016


 connectivity/source/drivers/mork/MDriver.hxx |    4 -
 cui/source/inc/iconcdlg.hxx                  |    2 
 include/formula/IFunctionDescription.hxx     |    1 
 include/sfx2/frmdescr.hxx                    |    2 
 include/sfx2/templateabstractview.hxx        |    2 
 include/sfx2/templatedlg.hxx                 |    2 
 include/svl/undo.hxx                         |   51 -------------
 reportdesign/source/ui/dlg/Formula.cxx       |    3 
 reportdesign/source/ui/inc/Formula.hxx       |    1 
 sc/source/filter/inc/biffinputstream.hxx     |   13 ---
 sc/source/filter/inc/defnamesbuffer.hxx      |    4 -
 sc/source/filter/inc/formulabuffer.hxx       |    7 -
 sc/source/filter/inc/stylesbuffer.hxx        |    3 
 sc/source/filter/oox/biffinputstream.cxx     |   14 ---
 sc/source/filter/oox/defnamesbuffer.cxx      |    2 
 sc/source/filter/oox/formulabuffer.cxx       |   10 --
 sc/source/filter/oox/stylesbuffer.cxx        |   23 ------
 sc/source/ui/formdlg/formula.cxx             |    6 -
 sc/source/ui/inc/formula.hxx                 |    1 
 sc/source/ui/inc/undobase.hxx                |    2 
 sc/source/ui/inc/undodraw.hxx                |    2 
 sc/source/ui/undo/undobase.cxx               |    8 --
 sc/source/ui/undo/undodraw.cxx               |    8 --
 sd/source/ui/view/outlview.cxx               |   41 ----------
 sfx2/source/appl/sfxpicklist.cxx             |   19 -----
 sfx2/source/control/templateabstractview.cxx |   23 ------
 sfx2/source/doc/frmdescr.cxx                 |    5 -
 sfx2/source/doc/templatedlg.cxx              |   20 -----
 sfx2/source/inc/sfxpicklist.hxx              |   12 ---
 svl/source/undo/undo.cxx                     |  102 ---------------------------
 sw/source/uibase/sidebar/PageFooterPanel.cxx |   13 +--
 sw/source/uibase/sidebar/PageFooterPanel.hxx |    9 --
 sw/source/uibase/sidebar/PageFormatPanel.cxx |   13 +--
 sw/source/uibase/sidebar/PageFormatPanel.hxx |   10 --
 sw/source/uibase/sidebar/PageStylesPanel.cxx |   13 +--
 sw/source/uibase/sidebar/PageStylesPanel.hxx |    9 --
 sw/source/uibase/sidebar/SwPanelFactory.cxx  |    6 -
 37 files changed, 22 insertions(+), 444 deletions(-)

New commits:
commit 77d5491e15c96b5864fccd3ffc3d6a7b90e93367
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 27 14:20:35 2016 +0200

    loplugin:unusedmethods
    
    Change-Id: I08e9bb65b2530148b80c67f01d51e594fc698acb
    Reviewed-on: https://gerrit.libreoffice.org/25543
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/connectivity/source/drivers/mork/MDriver.hxx b/connectivity/source/drivers/mork/MDriver.hxx
index d926579..c5cc3fc 100644
--- a/connectivity/source/drivers/mork/MDriver.hxx
+++ b/connectivity/source/drivers/mork/MDriver.hxx
@@ -34,10 +34,6 @@ class MorkDriver:
 {
 public:
     explicit MorkDriver(const css::uno::Reference< css::uno::XComponentContext >& context);
-    static OUString getImplementationName_Static()
-        throw(css::uno::RuntimeException);
-    static css::uno::Sequence< OUString > getSupportedServiceNames_Static()
-        throw (css::uno::RuntimeException);
 
     const css::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& getFactory(){return m_xFactory;}
     const OUString& getProfilePath() {return m_sProfilePath;}
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 131e4d0..dafd1ab 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -77,8 +77,6 @@ private:
 protected:
     IconChoicePage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet );
 
-    sal_uInt16          GetWhich( sal_uInt16 nSlot ) const  { return pSet->GetPool()->GetWhich( nSlot ); }
-
 public:
     virtual ~IconChoicePage();
     virtual void        dispose() override;
diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx
index 7fb02c5..42aaa99 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -131,7 +131,6 @@ namespace formula
 
         virtual void clear() = 0;
         virtual void deleteFormData() = 0;
-        virtual void setReferenceInput(const FormEditData* _pData) = 0;
 
         virtual IFunctionManager*   getFunctionManager() = 0;
         virtual ::std::unique_ptr<FormulaTokenArray> convertToTokenArray(const css::uno::Sequence< css::sheet::FormulaToken >& _aTokenList) = 0;
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index 8c88401..8d6f462 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -89,9 +89,7 @@ public:
     void                    SetActualURL( const INetURLObject& rURL );
     void                    SetActualURL( const OUString& rURL );
     void                    SetReadOnly( bool bSet ) { bReadOnly = bSet;}
-    bool                    IsReadOnly(  ) const { return bReadOnly;}
     void                    SetEditable( bool bSet );
-    bool                    IsEditable() const;
 
                             // Size
     void                    SetResizable( bool bRes )
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index 3844586..9d368c6 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -73,8 +73,6 @@ public:
     virtual ~TemplateAbstractView();
     virtual void dispose() override;
 
-    void insertItem (const TemplateItemProperties &rTemplate);
-
     // Fill view with new item list
     void insertItems (const std::vector<TemplateItemProperties> &rTemplates);
 
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 85d932d..ce95841 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -132,8 +132,6 @@ private:
 
     bool insertRepository (const OUString &rName, const OUString &rURL);
 
-    bool deleteRepository (const sal_uInt16 nRepositoryId);
-
     void syncRepositories () const;
 
     /// Return filter according to the currently selected application filter.
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 2b75a58..77c9cb0 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -128,9 +128,6 @@ void FormulaDialog::dispatch(bool /*_bOK*/, bool /*_bMatrixChecked*/)
 void FormulaDialog::setDispatcherLock( bool /*bLock*/ )
 {
 }
-void FormulaDialog::setReferenceInput(const FormEditData* /*_pData*/)
-{
-}
 void FormulaDialog::deleteFormData()
 {
 }
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 3df4361..b0df269 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -79,7 +79,6 @@ public:
     virtual void showReference(const OUString& _sFormula) override;
     virtual void dispatch(bool _bOK, bool _bMatrixChecked) override;
     virtual void setDispatcherLock( bool bLock ) override;
-    virtual void setReferenceInput(const formula::FormEditData* _pData) override;
     virtual void deleteFormData() override;
     virtual void clear() override;
     virtual void switchBack() override;
diff --git a/sc/source/filter/inc/biffinputstream.hxx b/sc/source/filter/inc/biffinputstream.hxx
index a46baca..996c567 100644
--- a/sc/source/filter/inc/biffinputstream.hxx
+++ b/sc/source/filter/inc/biffinputstream.hxx
@@ -322,19 +322,6 @@ private:
     bool                mbCont;             /// True = automatic CONTINUE lookup enabled.
 };
 
-class BiffInputStreamPos
-{
-public:
-    explicit            BiffInputStreamPos( BiffInputStream& rStrm );
-
-    void                restorePosition();
-
-private:
-    BiffInputStream&    mrStrm;
-    sal_Int64           mnRecHandle;
-    sal_Int64           mnRecPos;
-};
-
 } // namespace xls
 } // namespace oox
 
diff --git a/sc/source/filter/inc/defnamesbuffer.hxx b/sc/source/filter/inc/defnamesbuffer.hxx
index da10246..b477359 100644
--- a/sc/source/filter/inc/defnamesbuffer.hxx
+++ b/sc/source/filter/inc/defnamesbuffer.hxx
@@ -34,8 +34,6 @@ namespace com { namespace sun { namespace star {
 namespace oox {
 namespace xls {
 
-class BiffInputStreamPos;
-
 // codes for built-in names
 const sal_Unicode BIFF_DEFNAME_CONSOLIDATEAREA  = '\x00';
 const sal_Unicode BIFF_DEFNAME_AUTOOPEN         = '\x01';   // Sheet macro executed when workbook is opened.
@@ -127,14 +125,12 @@ public:
 
 private:
     typedef ::std::unique_ptr< StreamDataSequence >   StreamDataSeqPtr;
-    typedef ::std::unique_ptr< BiffInputStreamPos >   BiffStreamPosPtr;
 
     ScRangeData*        mpScRangeData;       /// ScRangeData of the defined name.
     sal_Int32           mnTokenIndex;       /// Name index used in API token array.
     sal_Int16           mnCalcSheet;        /// Calc sheet index for sheet-local names.
     sal_Unicode         mcBuiltinId;        /// Identifier for built-in defined names.
     StreamDataSeqPtr    mxFormula;          /// Formula data for BIFF12 import.
-    BiffStreamPosPtr    mxBiffStrm;         /// Cached BIFF stream for formula import.
 };
 
 typedef std::shared_ptr< DefinedName > DefinedNameRef;
diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx
index 1cb323b..692fff2 100644
--- a/sc/source/filter/inc/formulabuffer.hxx
+++ b/sc/source/filter/inc/formulabuffer.hxx
@@ -42,9 +42,6 @@ public:
         sal_Int32 mnSharedId;
 
         SharedFormulaEntry(
-            const css::table::CellAddress& rAddress,
-            const OUString& rTokenStr, sal_Int32 nSharedId );
-        SharedFormulaEntry(
             const ScAddress& rAddress,
             const OUString& rTokenStr, sal_Int32 nSharedId );
     };
@@ -60,9 +57,6 @@ public:
         sal_Int32 mnValueType;
 
         SharedFormulaDesc(
-            const css::table::CellAddress& rAddr, sal_Int32 nSharedId,
-            const OUString& rCellValue, sal_Int32 nValueType );
-        SharedFormulaDesc(
             const ScAddress& rAddr, sal_Int32 nSharedId,
             const OUString& rCellValue, sal_Int32 nValueType );
     };
@@ -72,7 +66,6 @@ public:
         OUString maTokenStr;
         ScAddress maCellAddress;
         TokenAddressItem( const OUString& rTokenStr, const ScAddress& rCellAddress ) : maTokenStr( rTokenStr ), maCellAddress( rCellAddress ) {}
-        TokenAddressItem( const OUString& rTokenStr, const css::table::CellAddress& rCellAddress ) : maTokenStr( rTokenStr ), maCellAddress( rCellAddress.Column, rCellAddress.Row, rCellAddress.Sheet ) {}
     };
 
     struct TokenRangeAddressItem
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 8090953..26ff2b1 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -653,9 +653,6 @@ public:
     void applyPatternToAttrList(
         AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal_Int32 nForceScNumFmt );
 
-    /** Writes all formatting attributes to the passed property map. */
-    void                writeToPropertyMap( PropertyMap& rPropMap ) const;
-
     void writeToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange );
 
     const ::ScPatternAttr& createPattern( bool bSkipPoolDefs = false );
diff --git a/sc/source/filter/oox/biffinputstream.cxx b/sc/source/filter/oox/biffinputstream.cxx
index 0607e06..685784b 100644
--- a/sc/source/filter/oox/biffinputstream.cxx
+++ b/sc/source/filter/oox/biffinputstream.cxx
@@ -478,20 +478,6 @@ void BiffInputStream::readUniStringHeader( bool& orb16BitChars, sal_Int32& ornAd
     ornAddSize = 4 * nFontCount + ::std::max< sal_Int32 >( 0, nPhoneticSize );
 }
 
-BiffInputStreamPos::BiffInputStreamPos( BiffInputStream& rStrm ) :
-    mrStrm( rStrm ),
-    mnRecHandle( rStrm.getRecHandle() ),
-    mnRecPos( rStrm.tell() )
-{
-}
-
-void BiffInputStreamPos::restorePosition()
-{
-    bool bValidRec = mrStrm.startRecordByHandle( mnRecHandle );
-    if( bValidRec )
-        mrStrm.seek( mnRecPos );
-}
-
 } // namespace xls
 } // namespace oox
 
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index feb6c2f..acc58ba 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -300,7 +300,7 @@ void DefinedName::createNameObject( sal_Int32 nIndex )
         return;
 
     // skip BIFF names without stream position (e.g. BIFF3-BIFF4 internal 3D references)
-    if( (getFilterType() == FILTER_BIFF) && !mxBiffStrm.get() )
+    if( getFilterType() == FILTER_BIFF )
         return;
 
     // convert original name to final Calc name (TODO: filter invalid characters from model name)
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index b265093..4c1eb05 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -344,21 +344,11 @@ FormulaBuffer::SharedFormulaEntry::SharedFormulaEntry(
     const OUString& rTokenStr, sal_Int32 nSharedId ) :
     maAddress(rAddr), maTokenStr(rTokenStr), mnSharedId(nSharedId) {}
 
-FormulaBuffer::SharedFormulaEntry::SharedFormulaEntry(
-    const css::table::CellAddress& rAddr,
-    const OUString& rTokenStr, sal_Int32 nSharedId ) :
-    maAddress( ScAddress( rAddr.Column, rAddr.Row, rAddr.Sheet ) ), maTokenStr(rTokenStr), mnSharedId(nSharedId) {}
-
 FormulaBuffer::SharedFormulaDesc::SharedFormulaDesc(
     const ScAddress& rAddr, sal_Int32 nSharedId,
     const OUString& rCellValue, sal_Int32 nValueType ) :
     maAddress(rAddr), mnSharedId(nSharedId), maCellValue(rCellValue), mnValueType(nValueType) {}
 
-FormulaBuffer::SharedFormulaDesc::SharedFormulaDesc(
-    const css::table::CellAddress& rAddr, sal_Int32 nSharedId,
-    const OUString& rCellValue, sal_Int32 nValueType ) :
-    maAddress( ScAddress( rAddr.Column, rAddr.Row, rAddr.Sheet ) ), mnSharedId(nSharedId), maCellValue(rCellValue), mnValueType(nValueType) {}
-
 FormulaBuffer::SheetItem::SheetItem() :
     mpCellFormulas(nullptr),
     mpArrayFormulas(nullptr),
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index f6eaddf..5e0e09b 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2188,29 +2188,6 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
     }
 }
 
-void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const
-{
-    StylesBuffer& rStyles = getStyles();
-
-    // create and set cell style.
-
-    // TODO : We should gradually move things to writeToDoc(), to set cell
-    // styles to the document directly.
-
-    if( maModel.mbFontUsed )
-        rStyles.writeFontToPropertyMap( rPropMap, maModel.mnFontId );
-    if( maModel.mbNumFmtUsed )
-        rStyles.writeNumFmtToPropertyMap( rPropMap, maModel.mnNumFmtId );
-    if( maModel.mbAlignUsed )
-        maAlignment.writeToPropertyMap( rPropMap );
-    if( maModel.mbProtUsed )
-        maProtection.writeToPropertyMap( rPropMap );
-    if( maModel.mbBorderUsed )
-        rStyles.writeBorderToPropertyMap( rPropMap, maModel.mnBorderId );
-    if( maModel.mbAreaUsed )
-        rStyles.writeFillToPropertyMap( rPropMap, maModel.mnFillId );
-}
-
 void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRange )
 {
     const StylesBuffer& rStyles = getStyles();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 177a0bb..bf50ba5 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -539,12 +539,6 @@ void ScFormulaDlg::setDispatcherLock( bool bLock )
 {
     ScFormulaReferenceHelper::SetDispatcherLock( bLock );
 }
-void ScFormulaDlg::setReferenceInput(const formula::FormEditData* _pData)
-{
-    ScModule* pScMod = SC_MOD();
-    ScFormEditData& rData = const_cast<ScFormEditData&>(dynamic_cast<const ScFormEditData&>(*_pData));
-    pScMod->SetRefInputHdl(rData.GetInputHandler());
-}
 void ScFormulaDlg::deleteFormData()
 {
     ScModule* pScMod = SC_MOD();
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index fc72393..0efb75d 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -65,7 +65,6 @@ public:
     virtual void showReference(const OUString& _sFormula) override;
     virtual void dispatch(bool _bOK, bool _bMatrixChecked) override;
     virtual void setDispatcherLock( bool bLock ) override;
-    virtual void setReferenceInput(const formula::FormEditData* _pData) override;
     virtual void deleteFormData() override;
     virtual void clear() override;
     virtual void switchBack() override;
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 676ada7..ac0f027 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -83,24 +83,6 @@ namespace
         : public rtl::Static<osl::Mutex, thePickListMutex> {};
 }
 
-void SfxPickList::RemovePickListEntries()
-{
-    ::osl::MutexGuard aGuard( thePickListMutex::get() );
-    for (PickListEntry* p : m_aPicklistVector)
-        delete p;
-    m_aPicklistVector.clear();
-}
-
-SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
-{
-    OSL_ASSERT( m_aPicklistVector.size() > nIndex );
-
-    if ( nIndex < m_aPicklistVector.size() )
-        return m_aPicklistVector[ nIndex ];
-    else
-        return nullptr;
-}
-
 void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
 {
     if (pDocSh->IsAvoidRecentDocs() || comphelper::LibreOfficeKit::isActive())
@@ -201,7 +183,6 @@ SfxPickList::SfxPickList( sal_uInt32 nAllowedMenuSize ) :
 
 SfxPickList::~SfxPickList()
 {
-    RemovePickListEntries();
 }
 
 
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 8f08f58..27dd8ff 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -104,29 +104,6 @@ void TemplateAbstractView::dispose()
     ThumbnailView::dispose();
 }
 
-void TemplateAbstractView::insertItem(const TemplateItemProperties &rTemplate)
-{
-    const TemplateItemProperties *pCur = &rTemplate;
-
-    TemplateViewItem *pChild = new TemplateViewItem(*this, pCur->nId);
-    pChild->mnDocId = pCur->nDocId;
-    pChild->mnRegionId = pCur->nRegionId;
-    pChild->maTitle = pCur->aName;
-    pChild->setPath(pCur->aPath);
-    pChild->maPreview1 = pCur->aThumbnail;
-
-    if ( pCur->aThumbnail.IsEmpty() )
-    {
-        // Use the default thumbnail if we have nothing else
-        pChild->maPreview1 = TemplateAbstractView::getDefaultThumbnail(pCur->aPath);
-    }
-
-    AppendItem(pChild);
-
-    CalculateItemPositions();
-    Invalidate();
-}
-
 void TemplateAbstractView::insertItems(const std::vector<TemplateItemProperties> &rTemplates)
 {
     std::vector<ThumbnailViewItem*> aItems(rTemplates.size());
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 964e877..50e851c 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -84,11 +84,6 @@ void SfxFrameDescriptor::SetEditable( bool bSet )
     pImpl->bEditable = bSet;
 }
 
-bool SfxFrameDescriptor::IsEditable() const
-{
-    return pImpl->bEditable;
-}
-
 void SfxFrameDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
 {
     DELETEZ( pImpl->pWallpaper );
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b2b7b75..d8dbb56 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1490,26 +1490,6 @@ bool SfxTemplateManagerDlg::insertRepository(const OUString &rName, const OUStri
     return true;
 }
 
-bool SfxTemplateManagerDlg::deleteRepository(const sal_uInt16 nRepositoryId)
-{
-    bool bRet = false;
-
-    for (size_t i = 0, n = maRepositories.size(); i < n; ++i)
-    {
-        if (maRepositories[i]->mnId == nRepositoryId)
-        {
-            delete maRepositories[i];
-
-            maRepositories.erase(maRepositories.begin() + i);
-            mbIsSynced = false;
-            bRet = true;
-            break;
-        }
-    }
-
-    return bRet;
-}
-
 void SfxTemplateManagerDlg::syncRepositories() const
 {
     if (!mbIsSynced)
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index 8cfd190..9f1fe78 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -31,24 +31,12 @@
 
 class SfxPickList : public SfxListener
 {
-    struct PickListEntry
-    {
-        PickListEntry( const OUString& _aName, const OUString& _aFilter ) :
-            aName( _aName ), aFilter( _aFilter ) {}
-
-        OUString aName;
-        OUString aFilter;
-    };
-
-    std::vector< PickListEntry* >   m_aPicklistVector;
     sal_uInt32                      m_nAllowedMenuSize;
     css::uno::Reference< css::util::XStringWidth > m_xStringLength;
 
                             SfxPickList( sal_uInt32 nMenuSize );
                             virtual ~SfxPickList();
 
-    PickListEntry*          GetPickListEntry( sal_uInt32 nIndex );
-    void                    RemovePickListEntries();
     /**
      * Adds the given document to the pick list (recent documents) if it satisfies
        certain requirements, e.g. being writable. Check implementation for requirement
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.cxx b/sw/source/uibase/sidebar/PageFooterPanel.cxx
index e68ff88..f204c827 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.cxx
@@ -39,26 +39,21 @@ namespace sw { namespace sidebar{
 
 VclPtr<vcl::Window> PageFooterPanel::Create(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings)
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame)
 {
     if( pParent == nullptr )
         throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFooterPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
         throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFooterPanel::Create", nullptr, 0);
-    if( pBindings == nullptr )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFooterPanel::Create", nullptr, 0);
 
-    return VclPtr<PageFooterPanel>::Create(pParent, rxFrame, pBindings);
+    return VclPtr<PageFooterPanel>::Create(pParent, rxFrame);
 }
 
 PageFooterPanel::PageFooterPanel(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame
     ) :
-    PanelLayout(pParent, "PageFooterPanel", "modules/swriter/ui/pagefooterpanel.ui", rxFrame),
-    mpBindings( pBindings )
+    PanelLayout(pParent, "PageFooterPanel", "modules/swriter/ui/pagefooterpanel.ui", rxFrame)
 {
 }
 
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.hxx b/sw/source/uibase/sidebar/PageFooterPanel.hxx
index 83c5300..0759f2c 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.hxx
@@ -53,8 +53,7 @@ class PageFooterPanel:
 public:
     static VclPtr<vcl::Window> Create(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
 
     virtual void NotifyItemUpdate(
         const sal_uInt16 nSId,
@@ -62,18 +61,14 @@ public:
         const SfxPoolItem* pState,
         const bool bIsEnabled) override;
 
-    SfxBindings* GetBindings() const { return mpBindings; }
     PageFooterPanel(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
     virtual ~PageFooterPanel();
     virtual void dispose() override;
 
 private:
 
-    SfxBindings* mpBindings;
-
     VclPtr<CheckBox> mpFooterToggle;
     VclPtr<MetricField> mpFooterHeightField;
     VclPtr<MetricField> mpFooterLMargin;
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 25ca959..5af1159 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -39,26 +39,21 @@ namespace sw { namespace sidebar{
 
 VclPtr<vcl::Window> PageFormatPanel::Create(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings)
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame)
 {
     if( pParent == nullptr )
         throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFormatPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
         throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFormatPanel::Create", nullptr, 0);
-    if( pBindings == nullptr )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFormatPanel::Create", nullptr, 0);
 
-    return VclPtr<PageFormatPanel>::Create(pParent, rxFrame, pBindings);
+    return VclPtr<PageFormatPanel>::Create(pParent, rxFrame);
 }
 
 PageFormatPanel::PageFormatPanel(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame
     ) :
-    PanelLayout(pParent, "PageFormatPanel", "modules/swriter/ui/pageformatpanel.ui", rxFrame),
-    mpBindings( pBindings )
+    PanelLayout(pParent, "PageFormatPanel", "modules/swriter/ui/pageformatpanel.ui", rxFrame)
 {
     get(mpPaperSizeLB, "papersize");
     get(mpPaperWidth, "paperwidth");
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx b/sw/source/uibase/sidebar/PageFormatPanel.hxx
index b8be54d..0b4b400 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx
@@ -53,8 +53,7 @@ class PageFormatPanel:
 public:
     static VclPtr<vcl::Window> Create(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
 
     virtual void NotifyItemUpdate(
         const sal_uInt16 nSId,
@@ -62,19 +61,14 @@ public:
         const SfxPoolItem* pState,
         const bool bIsEnabled) override;
 
-    SfxBindings* GetBindings() const { return mpBindings; }
-
     PageFormatPanel(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
     virtual ~PageFormatPanel();
     virtual void dispose() override;
 
 private:
 
-    SfxBindings* mpBindings;
-
     VclPtr<ListBox> mpPaperSizeLB;
     VclPtr<MetricField> mpPaperWidth;
     VclPtr<MetricField> mpPaperHeight;
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index b0af6fc..0b3e939 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -39,26 +39,21 @@ namespace sw { namespace sidebar{
 
 VclPtr<vcl::Window> PageStylesPanel::Create(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings)
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame)
 {
     if( pParent == nullptr )
         throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageStylesPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
         throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageStylesPanel::Create", nullptr, 0);
-    if( pBindings == nullptr )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageStylesPanel::Create", nullptr, 0);
 
-    return VclPtr<PageStylesPanel>::Create(pParent, rxFrame, pBindings);
+    return VclPtr<PageStylesPanel>::Create(pParent, rxFrame);
 }
 
 PageStylesPanel::PageStylesPanel(
     vcl::Window* pParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-    SfxBindings* pBindings
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame
     ) :
-    PanelLayout(pParent, "PageStylesPanel", "modules/swriter/ui/pagestylespanel.ui", rxFrame),
-    mpBindings( pBindings )
+    PanelLayout(pParent, "PageStylesPanel", "modules/swriter/ui/pagestylespanel.ui", rxFrame)
 {
 }
 
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx
index de3eb6d..b6d4b84 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.hxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx
@@ -53,8 +53,7 @@ class PageStylesPanel:
 public:
     static VclPtr<vcl::Window> Create(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
 
     virtual void NotifyItemUpdate(
         const sal_uInt16 nSId,
@@ -62,18 +61,14 @@ public:
         const SfxPoolItem* pState,
         const bool bIsEnabled) override;
 
-    SfxBindings* GetBindings() const { return mpBindings; }
     PageStylesPanel(
         vcl::Window* pParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
-        SfxBindings* pBindings);
+        const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame);
     virtual ~PageStylesPanel();
     virtual void dispose() override;
 
 private:
 
-    SfxBindings* mpBindings;
-
     VclPtr<CheckBox> mpFooterToggle;
     VclPtr<MetricField> mpFooterHeightField;
     VclPtr<MetricField> mpFooterLMargin;
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index e7f1151..7e7c467 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -145,7 +145,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
     }
     else if(rsResourceURL.endsWith("/PageStylesPanel"))
     {
-        VclPtr<vcl::Window> pPanel = sw::sidebar::PageStylesPanel::Create( pParentWindow, xFrame, pBindings );
+        VclPtr<vcl::Window> pPanel = sw::sidebar::PageStylesPanel::Create( pParentWindow, xFrame );
         xElement = sfx2::sidebar::SidebarPanelBase::Create(
             rsResourceURL,
             xFrame,
@@ -154,7 +154,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
     }
     else if(rsResourceURL.endsWith("/PageFormatPanel"))
     {
-        VclPtr<vcl::Window> pPanel = sw::sidebar::PageFormatPanel::Create( pParentWindow, xFrame, pBindings );
+        VclPtr<vcl::Window> pPanel = sw::sidebar::PageFormatPanel::Create( pParentWindow, xFrame );
         xElement = sfx2::sidebar::SidebarPanelBase::Create(
             rsResourceURL,
             xFrame,
@@ -172,7 +172,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
     }
     else if(rsResourceURL.endsWith("/PageFooterPanel"))
     {
-        VclPtr<vcl::Window> pPanel = sw::sidebar::PageFooterPanel::Create( pParentWindow, xFrame, pBindings );
+        VclPtr<vcl::Window> pPanel = sw::sidebar::PageFooterPanel::Create( pParentWindow, xFrame );
         xElement = sfx2::sidebar::SidebarPanelBase::Create(
             rsResourceURL,
             xFrame,
commit 3e9e667af2d8d307844b29d608b377a04b6bb139
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 27 14:07:12 2016 +0200

    loplugin:unusedmethods SfxLinkUndoAction
    
    Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b
    Reviewed-on: https://gerrit.libreoffice.org/25542
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 72cb502..8c54c08 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -41,19 +41,12 @@ public:
 };
 
 
-class SfxLinkUndoAction;
-
 class SVL_DLLPUBLIC SfxUndoAction
 {
-private:
-    SfxLinkUndoAction*      mpSfxLinkUndoAction;
-
 public:
                             SfxUndoAction();
     virtual                 ~SfxUndoAction();
 
-    virtual void SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction);
-
     virtual void            Undo();
     virtual void            UndoWithContext( SfxUndoContext& i_context );
     virtual void            Redo();
@@ -299,8 +292,6 @@ namespace svl { namespace undo { namespace impl
 struct SfxUndoManager_Data;
 class SVL_DLLPUBLIC SfxUndoManager : public ::svl::IUndoManager
 {
-    friend class SfxLinkUndoAction;
-
     std::unique_ptr< SfxUndoManager_Data >
                             m_xData;
 public:
@@ -392,48 +383,6 @@ private:
     friend class ::svl::undo::impl::LockGuard;
 };
 
-
-class SVL_DLLPUBLIC SfxLinkUndoAction : public SfxUndoAction
-
-/*  [Explanation]
-
-    SfxLinkUndoAction is used to link two SfxUndoManager. The Undo/Redos inserted
-    in the first SfxUndoManager redirect their Undo/Redo to the second. With this it
-    does not matter, if the undo/redo initially was on the first or the second.
-
-    After inserting SfxLinkUndoAction on the first SfxUndoManager, you have to
-    insert it on the second as well. While the second SfxUndoManager is steered
-    from the first, you must not insert neither Actions nor issue a  undo/redo
-    command to the second, while it is steered by the first.
-*/
-
-{
-private:
-    friend class SfxUndoAction;
-    void LinkedSfxUndoActionDestructed(const SfxUndoAction& rCandidate);
-
-public:
-                            SfxLinkUndoAction(::svl::IUndoManager *pManager);
-                            virtual ~SfxLinkUndoAction();
-
-    virtual void            Undo() override;
-    virtual void            Redo() override;
-    virtual bool            CanRepeat(SfxRepeatTarget& r) const override;
-
-    virtual void            Repeat(SfxRepeatTarget&r) override;
-
-    virtual OUString        GetComment() const override;
-    virtual OUString        GetRepeatComment(SfxRepeatTarget&r) const override;
-    virtual sal_uInt16      GetId() const override;
-
-    SfxUndoAction*          GetAction() const { return pAction; }
-
-protected:
-    ::svl::IUndoManager*    pUndoManager;
-    SfxUndoAction*          pAction;
-
-};
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 192f47e..95fed6c 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -172,8 +172,6 @@ public:
     SfxUndoAction*          GetWrappedUndo()        { return pWrappedUndo; }
     void                    ForgetWrappedUndo();
 
-    virtual void SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction) override;
-
     virtual void            Undo() override;
     virtual void            Redo() override;
     virtual void            Repeat(SfxRepeatTarget& rTarget) override;
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index 103b015..1572abd 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -38,8 +38,6 @@ public:
     SfxUndoAction*          GetDrawUndo()       { return pDrawUndo; }
     void                    ForgetDrawUndo();
 
-    virtual void SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction) override;
-
     virtual void            Undo() override;
     virtual void            Redo() override;
     virtual void            Repeat(SfxRepeatTarget& rTarget) override;
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 792cde5..b5a7e69 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -598,14 +598,6 @@ sal_uInt16 ScUndoWrapper::GetId() const
         return 0;
 }
 
-void ScUndoWrapper::SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction)
-{
-    if (pWrappedUndo)
-        pWrappedUndo->SetLinkToSfxLinkUndoAction(pSfxLinkUndoAction);
-    else
-        SetLinkToSfxLinkUndoAction(pSfxLinkUndoAction);
-}
-
 bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
 {
     if (pWrappedUndo)
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index 5645afb..89359ff 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -62,14 +62,6 @@ sal_uInt16 ScUndoDraw::GetId() const
         return 0;
 }
 
-void ScUndoDraw::SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction)
-{
-    if (pDrawUndo)
-        pDrawUndo->SetLinkToSfxLinkUndoAction(pSfxLinkUndoAction);
-    else
-        SetLinkToSfxLinkUndoAction(pSfxLinkUndoAction);
-}
-
 bool  ScUndoDraw::Merge( SfxUndoAction* pNextAction )
 {
     if (pDrawUndo)
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 94fac3d..7b184a2 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1568,47 +1568,6 @@ void OutlineView::TryToMergeUndoActions()
                     pListAction->aUndoActions.Remove(nEditPos);
                     delete pEditUndo;
 
-                    // now check if we also can merge the draw undo actions
-                    ::svl::IUndoManager* pDocUndoManager = mpDocSh->GetUndoManager();
-                    if( pDocUndoManager && ( pListAction->aUndoActions.size() == 1 ))
-                    {
-                        SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions.GetUndoAction(0) );
-                        SfxLinkUndoAction* pPrevLinkAction = nullptr;
-
-                        if( pLinkAction )
-                        {
-                            nAction = pPrevListAction->aUndoActions.size();
-                            while( !pPrevLinkAction && nAction )
-                                pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions.GetUndoAction(--nAction));
-                        }
-
-                        if( pLinkAction && pPrevLinkAction &&
-                            ( pLinkAction->GetAction() == pDocUndoManager->GetUndoAction() ) &&
-                            ( pPrevLinkAction->GetAction() == pDocUndoManager->GetUndoAction(1) ) )
-                        {
-                            SfxListUndoAction* pSourceList = dynamic_cast< SfxListUndoAction* >(pLinkAction->GetAction());
-                            SfxListUndoAction* pDestinationList = dynamic_cast< SfxListUndoAction* >(pPrevLinkAction->GetAction());
-
-                            if( pSourceList && pDestinationList )
-                            {
-                                sal_uInt16 nCount = pSourceList->aUndoActions.size();
-                                sal_uInt16 nDestAction = pDestinationList->aUndoActions.size();
-                                while( nCount-- )
-                                {
-                                    SfxUndoAction* pTemp = pSourceList->aUndoActions.GetUndoAction(0);
-                                    pSourceList->aUndoActions.Remove(0);
-                                    pDestinationList->aUndoActions.Insert( pTemp, nDestAction++ );
-                                }
-                                pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.size();
-
-                                pListAction->aUndoActions.Remove(0);
-                                delete pLinkAction;
-
-                                pDocUndoManager->RemoveLastUndoAction();
-                            }
-                        }
-                    }
-
                     if ( !pListAction->aUndoActions.empty() )
                     {
                         // now we have to move all remaining doc undo actions from the top undo
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 58320a1..57d654d 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -45,24 +45,12 @@ SfxUndoContext::~SfxUndoContext()
 }
 
 
-void SfxUndoAction::SetLinkToSfxLinkUndoAction(SfxLinkUndoAction* pSfxLinkUndoAction)
-{
-    mpSfxLinkUndoAction = pSfxLinkUndoAction;
-}
-
-
 SfxUndoAction::~SfxUndoAction()
 {
-    if(mpSfxLinkUndoAction)
-    {
-        mpSfxLinkUndoAction->LinkedSfxUndoActionDestructed(*this);
-        mpSfxLinkUndoAction = nullptr;
-    }
 }
 
 
 SfxUndoAction::SfxUndoAction()
-:   mpSfxLinkUndoAction(nullptr)
 {
 }
 
@@ -1396,90 +1384,6 @@ void SfxListUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) const
     xmlTextWriterEndElement(pWriter);
 }
 
-/**
- * Creates a LinkAction which points to another UndoManager.
- * Gets that UndoManagers current Action and sets it as that UndoManager's
- * associated Action.
- */
-SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager)
-{
-    pUndoManager = pManager;
-    SfxUndoManager* pUndoManagerImplementation = dynamic_cast< SfxUndoManager* >( pManager );
-    ENSURE_OR_THROW( pUndoManagerImplementation != nullptr, "unsupported undo manager implementation!" );
-
-    // yes, this cast is dirty. But reaching into the SfxUndoManager's implementation,
-    // directly accessing its internal stack, and tampering with an action on that stack
-    // is dirty, too.
-    if ( pManager->GetMaxUndoActionCount() )
-    {
-        size_t nPos = pManager->GetUndoActionCount()-1;
-        pAction = pUndoManagerImplementation->m_xData->pActUndoArray->aUndoActions[nPos].pAction;
-        pAction->SetLinkToSfxLinkUndoAction(this);
-    }
-    else
-        pAction = nullptr;
-}
-
-
-void SfxLinkUndoAction::Undo()
-{
-    if ( pAction )
-        pUndoManager->Undo();
-}
-
-
-void SfxLinkUndoAction::Redo()
-{
-    if ( pAction )
-        pUndoManager->Redo();
-}
-
-
-bool SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
-{
-    return pAction && pAction->CanRepeat(r);
-}
-
-
-void SfxLinkUndoAction::Repeat(SfxRepeatTarget&r)
-{
-    if ( pAction && pAction->CanRepeat( r ) )
-        pAction->Repeat( r );
-}
-
-
-OUString SfxLinkUndoAction::GetComment() const
-{
-    if ( pAction )
-        return pAction->GetComment();
-    return OUString();
-}
-
-
-OUString SfxLinkUndoAction::GetRepeatComment(SfxRepeatTarget&r) const
-{
-    if ( pAction )
-        return pAction->GetRepeatComment(r);
-    return OUString();
-}
-
-
-SfxLinkUndoAction::~SfxLinkUndoAction()
-{
-    if( pAction )
-        pAction->SetLinkToSfxLinkUndoAction(nullptr);
-}
-
-
-void SfxLinkUndoAction::LinkedSfxUndoActionDestructed(const SfxUndoAction& rCandidate)
-{
-    assert(nullptr != pAction);
-    assert(pAction == &rCandidate && "Oops, the destroyed and linked UndoActions differ (!)");
-    (void)rCandidate;
-    pAction = nullptr;
-}
-
-
 SfxUndoArray::~SfxUndoArray()
 {
     while ( !aUndoActions.empty() )
@@ -1490,10 +1394,4 @@ SfxUndoArray::~SfxUndoArray()
     }
 }
 
-
-sal_uInt16 SfxLinkUndoAction::GetId() const
-{
-      return pAction ? pAction->GetId() : 0;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list