[Libreoffice-commits] core.git: sfx2/source

Stephan Bergmann sbergman at redhat.com
Wed Mar 9 08:39:45 UTC 2016


 sfx2/source/doc/doctemplates.cxx |   52 ---------------------------------------
 1 file changed, 52 deletions(-)

New commits:
commit 49b78749b1323dc7978d15135bc42646cb0db719
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 9 09:38:11 2016 +0100

    mpUpdater has been proven unused
    
    ...by 435d6d50c3cdb6711942ee40dc2fae1865361845 "loplugin:constantparam in sfx2"
    
    Change-Id: I28db5cc1fd6506ba9e374d28b40e5d0cf7d676bd

diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 7f6d50c..04f9c27 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -148,7 +148,6 @@ struct NamePair_Impl
     OUString maLongName;
 };
 
-class Updater_Impl;
 class DocTemplates_EntryData_Impl;
 class GroupData_Impl;
 
@@ -186,7 +185,6 @@ class SfxDocTplService_Impl
     std::vector< NamePair_Impl* > maNames;
     lang::Locale                maLocale;
     Content                     maRootContent;
-    Updater_Impl*               mpUpdater;
     bool                        mbIsInitialized : 1;
     bool                        mbLocaleSet     : 1;
 
@@ -304,21 +302,6 @@ public:
 
     void                        update();
     void                        doUpdate();
-    void                        finished() { mpUpdater = nullptr; }
-};
-
-
-class Updater_Impl : public ::osl::Thread
-{
-private:
-    SfxDocTplService_Impl   *mpDocTemplates;
-
-public:
-    explicit                Updater_Impl( SfxDocTplService_Impl* pTemplates );
-    virtual                 ~Updater_Impl();
-
-    virtual void SAL_CALL   run() override;
-    virtual void SAL_CALL   onTerminated() override;
 };
 
 
@@ -1097,7 +1080,6 @@ SfxDocTplService_Impl::SfxDocTplService_Impl( const uno::Reference< XComponentCo
     : maRelocator(xContext)
 {
     mxContext       = xContext;
-    mpUpdater       = nullptr;
     mbIsInitialized = false;
     mbLocaleSet     = false;
 }
@@ -1107,13 +1089,6 @@ SfxDocTplService_Impl::~SfxDocTplService_Impl()
 {
     ::osl::MutexGuard aGuard( maMutex );
 
-    if ( mpUpdater )
-    {
-        mpUpdater->terminate();
-        mpUpdater->join();
-        delete mpUpdater;
-    }
-
     for ( size_t i = 0, n = maNames.size(); i < n; ++i )
         delete maNames[ i ];
     maNames.clear();
@@ -2375,33 +2350,6 @@ void SAL_CALL SfxDocTplService::update()
         pImp->update();
 }
 
-
-Updater_Impl::Updater_Impl( SfxDocTplService_Impl* pTemplates )
-{
-    mpDocTemplates = pTemplates;
-}
-
-
-Updater_Impl::~Updater_Impl()
-{
-}
-
-
-void SAL_CALL Updater_Impl::run()
-{
-    osl_setThreadName("Updater_Impl");
-
-    mpDocTemplates->doUpdate();
-}
-
-
-void SAL_CALL Updater_Impl::onTerminated()
-{
-    mpDocTemplates->finished();
-    delete this;
-}
-
-
 WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK)
 {
     Rectangle aRect = Rectangle(0, 0, 300, 30000);


More information about the Libreoffice-commits mailing list