[Libreoffice-commits] core.git: 2 commits - comphelper/source editeng/source include/comphelper include/editeng include/svtools include/svx sd/source svtools/source svx/source sw/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Apr 10 06:44:48 UTC 2018


 comphelper/source/container/embeddedobjectcontainer.cxx |   60 ----------------
 editeng/source/outliner/outlin2.cxx                     |   10 --
 include/comphelper/embeddedobjectcontainer.hxx          |    3 
 include/editeng/outliner.hxx                            |    2 
 include/svtools/inettbc.hxx                             |   15 ----
 include/svx/svdlayer.hxx                                |    1 
 include/svx/svdoole2.hxx                                |    1 
 include/svx/unomaster.hxx                               |    2 
 sd/source/ui/unoidl/unoobj.cxx                          |   13 ---
 sd/source/ui/unoidl/unoobj.hxx                          |    1 
 svtools/source/control/inettbc.cxx                      |   56 --------------
 svx/source/svdraw/svdoole2.cxx                          |    6 -
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx    |    7 -
 13 files changed, 3 insertions(+), 174 deletions(-)

New commits:
commit 8cbf84ed33014339cfc9741c1371cd065110060f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Apr 9 09:06:09 2018 +0200

    fix bug in SwSpellDialogChildWindow::FindNextDrawTextError_Impl
    
    looks like a regression from
        commit de60fd06b84bc1aa080ef209b0eeb36914bd8b32
        Date:   Fri Dec 17 09:02:23 2010 +0100
        CWS swlayoutrefactoring: #i115510#: first step to clean up the
    SwClient mess
    
    Change-Id: Ifc1d3e3f87b4b0d48fc5f311086bb5404b0aa1fb
    Reviewed-on: https://gerrit.libreoffice.org/52614
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 0b7daa49b5d7..95fe970a04f4 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -739,14 +739,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
     if(!m_pSpellState->m_bTextObjectsCollected )
     {
         m_pSpellState->m_bTextObjectsCollected = true;
-        std::list<SdrTextObj*> aTextObjs;
-        SwDrawContact::GetTextObjectsFromFormat( aTextObjs, pDoc );
+        SwDrawContact::GetTextObjectsFromFormat( m_pSpellState->m_aTextObjects, pDoc );
         if(pCurrentTextObj)
         {
             m_pSpellState->m_aTextObjects.remove(pCurrentTextObj);
             m_pSpellState->m_aTextObjects.push_back(pCurrentTextObj);
-                                }
-                            }
+        }
+    }
     if(!m_pSpellState->m_aTextObjects.empty())
     {
         Reference< XSpellChecker1 >  xSpell( GetSpellChecker() );
commit d913b7d2d8f5d8caf69b80274c58d7e27d207a0d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Apr 9 15:28:34 2018 +0200

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

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 539a8c3795c0..1395b63f5258 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -833,66 +833,6 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
     return xResult;
 }
 
-void EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const uno::Reference < embed::XEmbeddedObject >& xObj, OUString& rName )
-{
-    // get the object name before(!) it is assigned to a new storage
-    uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
-    OUString aName;
-    if ( xPersist.is() )
-        aName = xPersist->getEntryName();
-
-    // now move the object to the new container; the returned name is the new persist name in this container
-    bool bRet;
-
-    try
-    {
-        bRet = InsertEmbeddedObject( xObj, rName );
-        if ( bRet )
-            TryToCopyGraphReplacement( rSrc, aName, rName );
-    }
-    catch (const uno::Exception&)
-    {
-        SAL_WARN( "comphelper.container", "Failed to insert embedded object into storage!" );
-        bRet = false;
-    }
-
-    if ( bRet )
-    {
-        // now remove the object from the former container
-        bRet = false;
-        EmbeddedObjectContainerNameMap::iterator aEnd = rSrc.pImpl->maObjectContainer.end();
-        for( EmbeddedObjectContainerNameMap::iterator aIter = rSrc.pImpl->maObjectContainer.begin();
-             aIter != aEnd;
-             ++aIter )
-        {
-            if ( aIter->second == xObj )
-            {
-                rSrc.pImpl->maObjectContainer.erase( aIter );
-                bRet = true;
-                break;
-            }
-        }
-
-        SAL_WARN_IF( !bRet, "comphelper.container", "Object not found for removal!" );
-        if ( xPersist.is() )
-        {
-            // now it's time to remove the storage from the container storage
-            try
-            {
-                if ( xPersist.is() )
-                    rSrc.pImpl->mxStorage->removeElement( aName );
-            }
-            catch (const uno::Exception&)
-            {
-                SAL_WARN( "comphelper.container", "Failed to remove object from storage!" );
-                bRet = false;
-            }
-        }
-
-        // rSrc.RemoveGraphicStream( aName );
-    }
-}
-
 // #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+
 void EmbeddedObjectContainer::RemoveEmbeddedObject( const OUString& rName, bool bKeepToTempStorage )
 {
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 96285309a635..2c24cc1178a6 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -414,11 +414,6 @@ OutputDevice* Outliner::GetRefDevice() const
     return pEditEngine->GetRefDevice();
 }
 
-sal_uLong Outliner::GetTextHeight( sal_Int32 nParagraph ) const
-{
-    return pEditEngine->GetTextHeight(nParagraph );
-}
-
 tools::Rectangle Outliner::GetParaBounds( sal_Int32 nParagraph ) const
 {
     return pEditEngine->GetParaBounds(nParagraph );
@@ -429,11 +424,6 @@ Point Outliner::GetDocPos( const Point& rPaperPos ) const
     return pEditEngine->GetDocPos( rPaperPos );
 }
 
-Point Outliner::GetDocPosTopLeft( sal_Int32 nParagraph )
-{
-    return pEditEngine->GetDocPosTopLeft( nParagraph );
-}
-
 bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder )
 {
     return IsTextPos( rPaperPos, nBorder, nullptr );
diff --git a/include/comphelper/embeddedobjectcontainer.hxx b/include/comphelper/embeddedobjectcontainer.hxx
index 8abea504d7bd..466cb49ebede 100644
--- a/include/comphelper/embeddedobjectcontainer.hxx
+++ b/include/comphelper/embeddedobjectcontainer.hxx
@@ -129,9 +129,6 @@ public:
         EmbeddedObjectContainer& rSrc, const css::uno::Reference <css::embed::XEmbeddedObject>& xObj, OUString& rName,
         const OUString& rSrcShellID, const OUString& rDestShellID );
 
-    // move an embedded object from one container to another one
-    void MoveEmbeddedObject( EmbeddedObjectContainer& rSrc, const css::uno::Reference < css::embed::XEmbeddedObject >&, OUString& );
-
     // remove an embedded object from the container and from the storage; if object can't be closed
     // #i119941, bKeepToTempStorage: use to specify whether store the removed object to temporary storage+
     void            RemoveEmbeddedObject( const OUString& rName, bool bKeepToTempStorage = true);
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index ee856b9e6b35..6f9c67132c7c 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -930,9 +930,7 @@ public:
     OutputDevice*   GetRefDevice() const;
 
     sal_uLong       GetTextHeight() const;
-    sal_uLong       GetTextHeight( sal_Int32 nParagraph ) const;
     tools::Rectangle GetParaBounds( sal_Int32 nParagraph ) const;
-    Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     Point           GetDocPos( const Point& rPaperPos ) const;
     bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder );
     bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, bool* pbBulletPos );
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index 133978045054..46debbb9fafb 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -108,7 +108,6 @@ class SVT_DLLPUBLIC URLBox
 
     std::unique_ptr<weld::ComboBoxText> m_xWidget;
 
-    SVT_DLLPRIVATE bool             ProcessKey( const vcl::KeyCode& rCode );
     DECL_DLLPRIVATE_LINK(           TryAutoComplete, Timer*, void);
     SVT_DLLPRIVATE void             UpdatePicklistForSmartProtocol_Impl();
     DECL_DLLPRIVATE_LINK(           ChangedHdl, weld::ComboBoxText&, void);
@@ -124,27 +123,13 @@ public:
     void                            Clear() { m_xWidget->clear(); }
     void connect_entry_activate(const Link<weld::ComboBoxText&, void>& rLink) { m_xWidget->connect_entry_activate(rLink); }
     void                            append_text(const OUString& rStr) { m_xWidget->append_text(rStr); }
-    OUString                        get_text(int nIndex) { return m_xWidget->get_text(nIndex); }
-    void select_entry_region(int nStartPos, int nEndPos) { m_xWidget->select_entry_region(nStartPos, nEndPos); }
     void                            EnableAutocomplete() { m_xWidget->set_entry_completion(true); }
 
-    void                            SetBaseURL( const OUString& rURL );
-    const OUString&                 GetBaseURL() const { return aBaseURL; }
-    void                            SetOnlyDirectories( bool bDir );
     INetProtocol                    GetSmartProtocol() const { return eSmartProtocol; }
-    void                            SetSmartProtocol( INetProtocol eProt );
     OUString                        GetURL();
-    void                            DisableHistory();
-
-    void                            UpdatePickList( );
 
     static OUString                 ParseSmart( const OUString& aText, const OUString& aBaseURL );
 
-    void                            SetFilter(const OUString& _sFilter);
-
-    void                            SetPlaceHolder( const OUString& sPlaceHolder )
-                                        { aPlaceHolder = sPlaceHolder; }
-    const OUString&                 GetPlaceHolder() { return aPlaceHolder; }
     bool                            MatchesPlaceHolder( const OUString& sToMatch ) const
                                         { return ( !aPlaceHolder.isEmpty() ) && ( aPlaceHolder == sToMatch ); }
 };
diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx
index 1a60d8b24946..36fa08a1a105 100644
--- a/include/svx/svdlayer.hxx
+++ b/include/svx/svdlayer.hxx
@@ -114,7 +114,6 @@ public:
     SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin);
     ~SdrLayerAdmin();
     SdrLayerAdmin& operator=(const SdrLayerAdmin& rSrcLayerAdmin);
-    void               SetParent(SdrLayerAdmin* pNewParent)                        { pParent=pNewParent; }
     void               SetModel(SdrModel* pNewModel);
     void               InsertLayer(SdrLayer* pLayer, sal_uInt16 nPos)
     {
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index b170f6ac6d03..6122eef9c5dc 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -51,7 +51,6 @@ private:
 private:
     SVX_DLLPRIVATE void Connect_Impl();
     SVX_DLLPRIVATE void Disconnect_Impl();
-    SVX_DLLPRIVATE void Reconnect_Impl();
     SVX_DLLPRIVATE void AddListeners_Impl();
     SVX_DLLPRIVATE void RemoveListeners_Impl();
     SVX_DLLPRIVATE void GetObjRef_Impl();
diff --git a/include/svx/unomaster.hxx b/include/svx/unomaster.hxx
index 42c801f5e920..dad729df9ce3 100644
--- a/include/svx/unomaster.hxx
+++ b/include/svx/unomaster.hxx
@@ -67,8 +67,6 @@ public:
 
     virtual void dispose() = 0;
 
-    virtual void modelChanged( SdrModel* pNewModel ) = 0;
-
 protected:
     ~SvxShapeMaster() {}
 };
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 2d59d64903eb..d87831dc5702 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1679,17 +1679,4 @@ uno::Sequence< OUString > SAL_CALL SdUnoEventsAccess::getSupportedServiceNames(
     return aStr;
 }
 
-void SdXShape::modelChanged( SdrModel* pNewModel )
-{
-    if( pNewModel )
-    {
-        uno::Reference< uno::XInterface > xModel( pNewModel->getUnoModel() );
-        mpModel = SdXImpressDocument::getImplementation( xModel );
-    }
-    else
-    {
-        mpModel = nullptr;
-    }
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index 6db3862c30a6..0fa987313a0e 100644
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -72,7 +72,6 @@ public:
 
     virtual bool queryAggregation( const css::uno::Type & rType, css::uno::Any& aAny ) override;
     virtual void dispose() override;
-    virtual void modelChanged( SdrModel* pNewModel ) override;
 
     // XInterface
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index a1b3d744748d..a8cb237c19a8 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -2056,31 +2056,6 @@ URLBox::~URLBox()
     }
 }
 
-void URLBox::UpdatePickList( )
-{
-    if (pCtx.is())
-    {
-        pCtx->Stop();
-        pCtx->join();
-        pCtx.clear();
-    }
-    OUString sText = m_xWidget->get_active_text();
-    if (!sText.isEmpty())
-    {
-        pCtx = new MatchContext_Impl( this, sText );
-        pCtx->launch();
-    }
-}
-
-void URLBox::SetSmartProtocol( INetProtocol eProt )
-{
-    if ( eSmartProtocol != eProt )
-    {
-        eSmartProtocol = eProt;
-        UpdatePicklistForSmartProtocol_Impl();
-    }
-}
-
 void URLBox::UpdatePicklistForSmartProtocol_Impl()
 {
     m_xWidget->clear();
@@ -2165,13 +2140,6 @@ IMPL_LINK_NOARG(URLBox, FocusOutHdl, weld::Widget&, void)
     }
 }
 
-void URLBox::SetOnlyDirectories( bool bDir )
-{
-    bOnlyDirectories = bDir;
-    if (bOnlyDirectories)
-        m_xWidget->clear();
-}
-
 OUString URLBox::GetURL()
 {
     // wait for end of autocompletion
@@ -2250,28 +2218,4 @@ OUString URLBox::GetURL()
     return aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
 }
 
-void URLBox::DisableHistory()
-{
-    bHistoryDisabled = true;
-    UpdatePicklistForSmartProtocol_Impl();
-}
-
-void URLBox::SetBaseURL( const OUString& rURL )
-{
-    ::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() );
-
-    // Reset match lists
-    pImpl->aCompletions.clear();
-    pImpl->aURLs.clear();
-
-    aBaseURL = rURL;
-}
-
-void URLBox::SetFilter(const OUString& _sFilter)
-{
-    pImpl->m_aFilters.clear();
-    FilterMatch::createWildCardFilterList(_sFilter,pImpl->m_aFilters);
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 50595c5766df..c1a9553b7cf8 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -931,12 +931,6 @@ void SdrOle2Obj::CheckFileLink_Impl()
     }
 }
 
-void SdrOle2Obj::Reconnect_Impl()
-{
-    DBG_ASSERT( mpImpl->mbConnected, "Assigned unconnected object?!" );
-    Connect_Impl();
-}
-
 void SdrOle2Obj::Connect_Impl()
 {
     if(!mpImpl->aPersistName.isEmpty() )


More information about the Libreoffice-commits mailing list