summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-24 12:57:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-27 05:18:07 +0000
commit22864b44fd00b5a778ef597f8dfcb407d4166306 (patch)
treefbdaa2e7c1aae149dab6194f9033b9543c74b441 /desktop
parentloplugin:singlevalfields in basic and fix leak (diff)
downloadcore-22864b44fd00b5a778ef597f8dfcb407d4166306.tar.gz
core-22864b44fd00b5a778ef597f8dfcb407d4166306.zip
loplugin:singlevalfields in dbaccess
Change-Id: I5c8990187b2b488eb75369c2a3e3dc7f855ce06a Reviewed-on: https://gerrit.libreoffice.org/26633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx25
-rw-r--r--desktop/source/splash/splash.cxx5
2 files changed, 9 insertions, 21 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index d3598f3adf04..c7f720f09708 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -123,7 +123,6 @@ class ProgressCmdEnv
DialogHelper* m_pDialogHelper;
OUString m_sTitle;
- bool m_bAborted;
bool m_bWarnUser;
sal_Int32 m_nCurrentProgress;
@@ -147,7 +146,6 @@ public:
: m_xContext( rContext )
, m_pDialogHelper( pDialogHelper )
, m_sTitle( rTitle )
- , m_bAborted( false )
, m_bWarnUser( false )
, m_nCurrentProgress(0)
{}
@@ -158,7 +156,6 @@ public:
void stopProgress();
void progressSection( const OUString &rText,
const uno::Reference< task::XAbortChannel > &xAbortChannel = nullptr );
- inline bool isAborted() const { return m_bAborted; }
inline void setWarnUser( bool bNewVal ) { m_bWarnUser = bNewVal; }
// XCommandEnvironment
@@ -295,26 +292,20 @@ void ProgressCmdEnv::progressSection( const OUString &rText,
const uno::Reference< task::XAbortChannel > &xAbortChannel )
{
m_xAbortChannel = xAbortChannel;
- if (! m_bAborted)
+ m_nCurrentProgress = 0;
+ if ( m_pDialogHelper )
{
- m_nCurrentProgress = 0;
- if ( m_pDialogHelper )
- {
- m_pDialogHelper->updateProgress( rText, xAbortChannel );
- m_pDialogHelper->updateProgress( 5 );
- }
+ m_pDialogHelper->updateProgress( rText, xAbortChannel );
+ m_pDialogHelper->updateProgress( 5 );
}
}
void ProgressCmdEnv::updateProgress()
{
- if ( ! m_bAborted )
- {
- long nProgress = ((m_nCurrentProgress*5) % 100) + 5;
- if ( m_pDialogHelper )
- m_pDialogHelper->updateProgress( nProgress );
- }
+ long nProgress = ((m_nCurrentProgress*5) % 100) + 5;
+ if ( m_pDialogHelper )
+ m_pDialogHelper->updateProgress( nProgress );
}
@@ -730,7 +721,7 @@ void ExtensionCmdQueue::Thread::execute()
// addExtension is called, which then blocks the main thread, then we deadlock.
bool bStartProgress = true;
- while ( !currentCmdEnv->isAborted() && --nSize >= 0 )
+ while ( --nSize >= 0 )
{
{
osl::MutexGuard aGuard( m_mutex );
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 091eeeb11ec4..aa33a5c16fca 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -92,7 +92,6 @@ private:
sal_Int32 _iMax;
sal_Int32 _iProgress;
BitmapMode _eBitmapMode;
- bool _bPaintBitmap;
bool _bPaintProgress;
bool _bVisible;
bool _bShowLogo;
@@ -163,7 +162,6 @@ SplashScreen::SplashScreen()
, _iMax(100)
, _iProgress(0)
, _eBitmapMode(BM_DEFAULTMODE)
- , _bPaintBitmap(true)
, _bPaintProgress(false)
, _bVisible(true)
, _bShowLogo(true)
@@ -646,8 +644,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
// non native drawing
// draw bitmap
- if (pSpl->_bPaintBitmap)
- _vdev->DrawBitmapEx(Point(), pSpl->_aIntroBmp);
+ _vdev->DrawBitmapEx(Point(), pSpl->_aIntroBmp);
if (pSpl->_bPaintProgress) {
// draw progress...