[Libreoffice-commits] .: 4 commits - forms/source sfx2/inc sfx2/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Jul 25 18:18:55 PDT 2012


 forms/source/component/clickableimage.cxx |   10 -----
 forms/source/component/clickableimage.hxx |    2 -
 sfx2/inc/sfx2/docfile.hxx                 |    1 
 sfx2/source/appl/fileobj.cxx              |   54 ------------------------------
 sfx2/source/appl/fileobj.hxx              |    1 
 sfx2/source/doc/docfile.cxx               |   18 ----------
 6 files changed, 86 deletions(-)

New commits:
commit 66e4540041f09b4e779d27190f0925479f74103b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Jul 25 20:37:27 2012 -0400

    aDataAvailableLink in SfxMedium was never called.
    
    Also remove all callback functions that would never get called
    because of this.
    
    Change-Id: I5dd5d64ccca9dd3d655428218957753d3200299e

diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index e58d914..783a13f 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -739,8 +739,6 @@ namespace frm
                 delete m_pMedium;
 
             m_pMedium = new SfxMedium(rURL, STREAM_STD_READ);
-            m_pMedium->SetDataAvailableLink(
-                    STATIC_LINK(this, OClickableImageBaseModel, DataAvailableLink));
 
             // Das XModel suchen, um an die Object-Shell oder zumindest den
             // Referer zu gelangen.
@@ -848,14 +846,6 @@ namespace frm
     }
 
     //------------------------------------------------------------------------------
-    IMPL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void*, EMPTYARG )
-    {
-        ::osl::MutexGuard aGuard( pThis->m_aMutex );
-        pThis->DataAvailable();
-        return 0;
-    }
-
-    //------------------------------------------------------------------------------
     void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
         throw( RuntimeException )
     {
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index 09105c2..45e5115 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -74,8 +74,6 @@ namespace frm
         ::com::sun::star::uno::Reference< ::com::sun::star::form::submission::XSubmission >
                                                 m_xSubmissionDelegate;
 
-
-        DECL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void* );
         DECL_STATIC_LINK( OClickableImageBaseModel, DownloadDoneLink, void* );
 
         inline ImageProducer* GetImageProducer() { return m_pProducer; }
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index b4da325..044ae4b 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -145,7 +145,6 @@ public:
     sal_Bool            IsOpen() const; // { return aStorage.Is() || pInStream; }
     void                DownLoad( const Link& aLink = Link());
     void                SetDoneLink( const Link& rLink );
-    void                SetDataAvailableLink( const Link& rLink );
 
     sal_uInt32          GetErrorCode() const;
     sal_uInt32          GetError() const
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 9a9c6ff..d715f4d 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -81,7 +81,6 @@ SvFileObject::~SvFileObject()
 {
     if ( xMed.Is() )
     {
-        xMed->SetDataAvailableLink( Link() );
         xMed->SetDoneLink( Link() );
         xMed.Clear();
     }
@@ -274,7 +273,6 @@ sal_Bool SvFileObject::LoadFile_Impl()
         bWaitForData = sal_True;
 
         SfxMediumRef xTmpMed = xMed;
-        xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
         bInCallDownLoad = sal_True;
         xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
         bInCallDownLoad = sal_False;
@@ -337,7 +335,6 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
 
             if( !pDownLoadData->aGrf.GetContext() )
             {
-                xMed->SetDataAvailableLink( Link() );
                 delete pDownLoadData, pDownLoadData = 0;
                 bDataReady = sal_True;
                 bWaitForData = sal_False;
@@ -513,7 +510,6 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
         pThis->bLoadAgain = sal_True;
         if( pThis->xMed.Is() )
         {
-            pThis->xMed->SetDataAvailableLink( Link() );
             pThis->xMed->SetDoneLink( Link() );
 
             Application::PostUserEvent(
@@ -535,56 +531,6 @@ IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
     return 0;
 }
 
-IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
-{
-    // When we come form here there it can not be an error no more.
-    if( pThis->bInNewData )
-        return 0;
-
-    pThis->bInNewData = sal_True;
-    pThis->bLoadError = sal_False;
-
-    if( !pThis->pDownLoadData )
-    {
-        pThis->pDownLoadData = new Impl_DownLoadData(
-                        STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
-        // Set Zero-link, so that no temporary graphics can be swapped out,
-        // the filter checks whether a link is set already => if so, is _no_
-        // new link set, the link here must be set (before it is first
-        // filtered), to prevent, that the context will be reset
-        // (aynchronous loading)
-        if( !pThis->bNativFormat )
-        {
-            static GfxLink aDummyLink;
-            pThis->pDownLoadData->aGrf.SetLink( aDummyLink );
-        }
-    }
-
-    pThis->NotifyDataChanged();
-
-    SvStream* pStrm = pThis->xMed.Is() ? pThis->xMed->GetInStream() : 0;
-    if( pStrm && pStrm->GetError() )
-    {
-        if( ERRCODE_IO_PENDING == pStrm->GetError() )
-            pStrm->ResetError();
-
-        // a DataReady in DataChanged?
-        else if( pThis->bWaitForData && pThis->pDownLoadData )
-        {
-            pThis->bLoadError = sal_True;
-        }
-    }
-
-    if( pThis->bDataReady )
-    {
-        // Graphic is finished, also send DataChanged from Status change
-        pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
-    }
-
-    pThis->bInNewData = sal_False;
-    return 0;
-}
-
 IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
 {
     String sFile;
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 7c7ab2a..b1b5699 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -58,7 +58,6 @@ class SvFileObject : public sfx2::SvLinkSource
 
     DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
     DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
-    DECL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void* );
     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
 
 protected:
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 14cfd8f..b0e0640 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -287,7 +287,6 @@ public:
     SvKeyValueIteratorRef xAttributes;
 
     svtools::AsynchronLink  aDoneLink;
-    svtools::AsynchronLink  aAvailableLink;
 
     uno::Sequence < util::RevisionTag > aVersions;
 
@@ -358,7 +357,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
 SfxMedium_Impl::~SfxMedium_Impl()
 {
     aDoneLink.ClearPendingCall();
-    aAvailableLink.ClearPendingCall();
 
     delete pTempFile;
     delete m_pSet;
@@ -2404,13 +2402,6 @@ void SfxMedium::SetDoneLink( const Link& rLink )
     pImp->aDoneLink = rLink;
 }
 
-//----------------------------------------------------------------
-
-void SfxMedium::SetDataAvailableLink( const Link& rLink )
-{
-    pImp->aAvailableLink = rLink;
-}
-
 void SfxMedium::DownLoad( const Link& aLink )
 {
     SetDoneLink( aLink );
commit 8a88273e75de0081c4284c9f09739da7f7f9bc3a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Jul 25 20:23:28 2012 -0400

    file version is no longer used in SfxMedium.
    
    Change-Id: Ibc6a4ea54e18946bf89364cd3ae235e59db33a5d

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6734c02..14cfd8f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -280,8 +280,6 @@ public:
     SvStream* m_pInStream;
     SvStream* m_pOutStream;
 
-    long             nFileVersion;
-
     const SfxFilter* pOrigFilter;
     rtl::OUString    aOrigURL;
     DateTime         aExpireTime;
@@ -347,7 +345,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
     pAntiImpl( pAntiImplP ),
     m_pInStream(NULL),
     m_pOutStream(NULL),
-    nFileVersion( 0 ),
     pOrigFilter( 0 ),
     aExpireTime( Date( Date::SYSTEM ) + 10, Time( Time::SYSTEM ) ),
     pTempFile( NULL ),
@@ -2562,7 +2559,6 @@ SfxMedium::GetInteractionHandler()
 void SfxMedium::SetFilter( const SfxFilter* pFilterP, sal_Bool /*bResetOrig*/ )
 {
     pImp->m_pFilter = pFilterP;
-    pImp->nFileVersion = 0;
 }
 
 const SfxFilter* SfxMedium::GetFilter() const
commit 1b8ae11bb618d4d5d55f9629d6185f45bd003854
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Jul 25 20:17:07 2012 -0400

    Another unused flag.
    
    Change-Id: Ifb0aab398ac0e64846907887983dda4ae8559563

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 695ecb7..6734c02 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -249,7 +249,6 @@ public:
     bool bUpdatePickList:1;
     bool bIsTemp:1;
     bool bDownloadDone:1;
-    bool bDontCallDoneLinkOnSharingError:1;
     bool bIsStorage:1;
     bool bUseInteractionHandler:1;
     bool bAllowDefaultIntHdl:1;
@@ -328,7 +327,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
     bUpdatePickList(true),
     bIsTemp( false ),
     bDownloadDone( true ),
-    bDontCallDoneLinkOnSharingError( false ),
     bIsStorage( false ),
     bUseInteractionHandler( true ),
     bAllowDefaultIntHdl( false ),
commit 63729dfd07a59af90a9a5da80634217ea47e3736
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Jul 25 20:16:08 2012 -0400

    This flag is set but never used. Removing.
    
    Change-Id: I97f017403e9b264075da41ddfc3fe34ca7093444

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 21f93ab..695ecb7 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -248,7 +248,6 @@ public:
     ::ucbhelper::Content aContent;
     bool bUpdatePickList:1;
     bool bIsTemp:1;
-    bool bForceSynchron:1;
     bool bDownloadDone:1;
     bool bDontCallDoneLinkOnSharingError:1;
     bool bIsStorage:1;
@@ -328,7 +327,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
     m_eError(SVSTREAM_OK),
     bUpdatePickList(true),
     bIsTemp( false ),
-    bForceSynchron( false ),
     bDownloadDone( true ),
     bDontCallDoneLinkOnSharingError( false ),
     bIsStorage( false ),
@@ -3021,7 +3019,6 @@ void SfxMedium::ForceSynchronStream_Impl( sal_Bool bForce )
         if( pBytes )
             pBytes->SetSynchronMode( bForce );
     }
-    pImp->bForceSynchron = bForce;
 }
 
 //----------------------------------------------------------------


More information about the Libreoffice-commits mailing list