diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-18 19:56:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-18 19:58:31 +0000 |
commit | 4632719f9e895b513418d2560637cea78d406ebf (patch) | |
tree | eef4ad95145fee61b81193d5709c435de8943bfd /framework/source | |
parent | 0d43a19e53c12a8f4f062ffa82a79369b3bf1315 (diff) |
WaE: fix dubious undefined behaviour
Diffstat (limited to 'framework/source')
-rwxr-xr-x | framework/source/layoutmanager/layoutmanager.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index c5c876da5f1c..da7c776132b5 100755 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -258,7 +258,7 @@ void LayoutManager::implts_lock() sal_Bool LayoutManager::implts_unlock() { WriteGuard aWriteLock( m_aLock ); - m_nLockCount = std::max( --m_nLockCount, static_cast<sal_Int32>(0) ); + m_nLockCount = std::max( m_nLockCount-1, static_cast<sal_Int32>(0) ); return ( m_nLockCount == 0 ); } @@ -1659,7 +1659,6 @@ throw (uno::RuntimeException) { bool bResult( false ); bool bNotify( false ); - bool bDoLayout( false ); ::rtl::OUString aElementType; ::rtl::OUString aElementName; @@ -1693,7 +1692,6 @@ throw (uno::RuntimeException) pWindow->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); bResult = true; bNotify = true; - bDoLayout = true; } } } @@ -1704,7 +1702,6 @@ throw (uno::RuntimeException) implts_showProgressBar(); bResult = true; bNotify = true; - bDoLayout = true; } else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_bVisible ) { @@ -1716,7 +1713,6 @@ throw (uno::RuntimeException) if ( pToolbarManager && bComponentAttached ) { bNotify = pToolbarManager->requestToolbar( rResourceURL ); - bDoLayout = true; } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "dockingwindow" )) @@ -1875,7 +1871,6 @@ throw (RuntimeException) { RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); - bool bResult( false ); bool bNotify( false ); bool bMustLayout( false ); ::rtl::OUString aElementType; @@ -1901,7 +1896,6 @@ throw (RuntimeException) if ( pMenuBar ) { pMenuBar->SetDisplayable( sal_False ); - bResult = true; bNotify = true; } } @@ -1916,12 +1910,11 @@ throw (RuntimeException) implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); bMustLayout = sal_True; bNotify = sal_True; - bResult = sal_True; } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) { - bResult = bNotify = implts_hideProgressBar(); + bNotify = implts_hideProgressBar(); } else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR )) { |