framework/source/inc/loadenv/loadenv.hxx | 24 +++---------- framework/source/loadenv/loadenv.cxx | 55 ------------------------------- 2 files changed, 6 insertions(+), 73 deletions(-)
New commits: commit c549e1e836182e586a42e5ecb398db6faf0a2cbe Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Tue Jul 24 13:08:07 2012 -0400 Unused methods. Change-Id: Iafd1895d96df32c312f937db479e04abd7cb7038 diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index 75269e3..4c72e6b 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -373,14 +373,6 @@ class LoadEnv : private ThreadHelpBase //_______________________________________ /** TODO document me ... */ - void cancelLoading(); - - //_______________________________________ - /** TODO document me ... */ - css::uno::Reference< css::frame::XFrame > getTarget() const; - - //_______________________________________ - /** TODO document me ... */ css::uno::Reference< css::lang::XComponent > getTargetComponent() const; diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 35b85c5..79224ef 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -463,57 +463,6 @@ sal_Bool LoadEnv::waitWhileLoading(sal_uInt32 nTimeout) // <- SAFE ---------------------------------- } - -void LoadEnv::cancelLoading() -{ - // PARTIAL(!) SAFE -> ------------------------------ - ReadGuard aReadLock(m_aLock); - - // Still running? Might waitWhileLoading() - // runned into the timeout! - if (m_xAsynchronousJob.is()) - { - // try to cancel it ... if its an asynchronous frame loader - css::uno::Reference< css::frame::XFrameLoader > xAsyncLoader(m_xAsynchronousJob, css::uno::UNO_QUERY); - if (xAsyncLoader.is()) - { - aReadLock.unlock(); - // <- BREAK SAFE ------------------------------ - xAsyncLoader->cancel(); - // <- RESTART SAFE ---------------------------- - aReadLock.lock(); - /* Attention: - After returning from any cancel/dispose call, neither the frame nor weself - may be called back. Because only we can cancel this job, we already know - the result! => Thats why its not usefull nor neccessary to wait for any - asynchronous listener notification. - */ - m_bLoaded = sal_False; - m_xAsynchronousJob.clear(); - } - // or may be its a content handler? Such handler can't be cancelled in its running - // operation :-( And we can't deregister us there again :-( - // => The only chance is an exception :-) - else - throw LoadEnvException(LoadEnvException::ID_STILL_RUNNING); - } - - impl_reactForLoadingState(); - - aReadLock.unlock(); - // <- PARTIAL(!) SAFE ------------------------------ -} - - -css::uno::Reference< css::frame::XFrame > LoadEnv::getTarget() const -{ - // SAFE -> - ReadGuard aReadLock(m_aLock); - return m_xTargetFrame; - // <- SAFE -} - - css::uno::Reference< css::lang::XComponent > LoadEnv::getTargetComponent() const { // SAFE -> commit f15b1d084eb026342e8d0440d5bfb3ac8f23f30c Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Tue Jul 24 13:03:22 2012 -0400 It makes no sense to make these methods virtual. LoadEnv doesn't have any child classes, and is not a UNO service. Change-Id: I773324e10b755c6e5f1a29c07495b21f6a236a3e diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index 9ed683c..75269e3 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -248,7 +248,7 @@ class LoadEnv : private ThreadHelpBase /** @short deinitialize an instance of this class in the right way. */ - virtual ~LoadEnv(); + ~LoadEnv(); //_______________________________________ @@ -315,14 +315,13 @@ class LoadEnv : private ThreadHelpBase @throw A RuntimeException in case any internal process indicates, that the whole runtime cant be used any longer. */ - virtual void initializeLoading(const ::rtl::OUString& sURL , + void initializeLoading(const ::rtl::OUString& sURL , const css::uno::Sequence< css::beans::PropertyValue >& lMediaDescriptor, const css::uno::Reference< css::frame::XFrame >& xBaseFrame , const ::rtl::OUString& sTarget , sal_Int32 nSearchFlags , EFeature eFeature = E_NO_FEATURE , - EContentType eContentType = E_UNSUPPORTED_CONTENT) - throw(LoadEnvException, css::uno::RuntimeException); + EContentType eContentType = E_UNSUPPORTED_CONTENT); //_______________________________________ @@ -346,8 +345,7 @@ class LoadEnv : private ThreadHelpBase @throw A RuntimeException in case any internal process indicates, that the whole runtime cant be used any longer. */ - virtual void startLoading() - throw(LoadEnvException, css::uno::RuntimeException); + void startLoading(); //_______________________________________ @@ -371,21 +369,19 @@ class LoadEnv : private ThreadHelpBase @throw A RuntimeException in case any internal process indicates, that the whole runtime cant be used any longer. */ - virtual sal_Bool waitWhileLoading(sal_uInt32 nTimeout = 0) - throw(LoadEnvException, css::uno::RuntimeException); + sal_Bool waitWhileLoading(sal_uInt32 nTimeout = 0); //_______________________________________ /** TODO document me ... */ - virtual void cancelLoading() - throw(LoadEnvException, css::uno::RuntimeException); + void cancelLoading(); //_______________________________________ /** TODO document me ... */ - virtual css::uno::Reference< css::frame::XFrame > getTarget() const; + css::uno::Reference< css::frame::XFrame > getTarget() const; //_______________________________________ /** TODO document me ... */ - virtual css::uno::Reference< css::lang::XComponent > getTargetComponent() const; + css::uno::Reference< css::lang::XComponent > getTargetComponent() const; //___________________________________________ diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index fc6e313..35b85c5 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -251,7 +251,6 @@ void LoadEnv::initializeLoading(const ::rtl::OUString& sal_Int32 nSearchFlags , EFeature eFeature , // => use default ... EContentType eContentType ) // => use default ... - throw(LoadEnvException, css::uno::RuntimeException) { // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); @@ -377,7 +376,6 @@ void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::lang::XMulti void LoadEnv::startLoading() - throw(LoadEnvException, css::uno::RuntimeException) { // SAFE -> ReadGuard aReadLock(m_aLock); @@ -431,7 +429,6 @@ void LoadEnv::startLoading() Current implementation counts yield calls only ... -----------------------------------------------*/ sal_Bool LoadEnv::waitWhileLoading(sal_uInt32 nTimeout) - throw(LoadEnvException, css::uno::RuntimeException) { // Because its not a good idea to block the main thread // (and we can't be sure that we are currently not used inside the @@ -468,7 +465,6 @@ sal_Bool LoadEnv::waitWhileLoading(sal_uInt32 nTimeout) void LoadEnv::cancelLoading() - throw(LoadEnvException, css::uno::RuntimeException) { // PARTIAL(!) SAFE -> ------------------------------ ReadGuard aReadLock(m_aLock); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits