Kaydet (Commit) 591c3192 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:simplifybool

Change-Id: If173ec26ed53cf99fd23f0930eaeefc595a05722
üst 232d37b2
...@@ -390,16 +390,13 @@ class PerformanceHash : public std::unordered_map< OUString ...@@ -390,16 +390,13 @@ class PerformanceHash : public std::unordered_map< OUString
++pStepper; ++pStepper;
} }
while( while( pStepper != end() && !bFound )
( pStepper != end() ) &&
( bFound == false )
)
{ {
bFound = Wildcard::match( sSearchValue, pStepper->first ); bFound = Wildcard::match( sSearchValue, pStepper->first );
// If element was found - break loop by setting right return value // If element was found - break loop by setting right return value
// and don't change "pStepper". He must point to found element! // and don't change "pStepper". He must point to found element!
// Otherwise step to next one. // Otherwise step to next one.
if( bFound == false ) if( !bFound )
++pStepper; ++pStepper;
} }
return bFound; return bFound;
......
...@@ -163,7 +163,7 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce ...@@ -163,7 +163,7 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce
// Safe impossible cases // Safe impossible cases
SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" ); SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" );
if( m_bAlreadyDisposed == false ) if( !m_bAlreadyDisposed )
{ {
m_bAlreadyDisposed = true; m_bAlreadyDisposed = true;
......
...@@ -282,7 +282,7 @@ void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( Runtim ...@@ -282,7 +282,7 @@ void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( Runtim
// Safe impossible cases // Safe impossible cases
SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" ); SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" );
if( m_bAlreadyDisposed == false ) if( !m_bAlreadyDisposed )
{ {
m_bAlreadyDisposed = true; m_bAlreadyDisposed = true;
......
...@@ -120,7 +120,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int ...@@ -120,7 +120,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
if ( xOwner.is() ) if ( xOwner.is() )
{ {
// Work only, if search was not started here ...! // Work only, if search was not started here ...!
if( m_bRecursiveSearchProtection == false ) if( !m_bRecursiveSearchProtection )
{ {
// This class is a helper for services, which must implement XFrames. // This class is a helper for services, which must implement XFrames.
// His parent and children are MY parent and children to. // His parent and children are MY parent and children to.
......
...@@ -282,8 +282,8 @@ void LoadEnv::initializeLoading(const OUString& ...@@ -282,8 +282,8 @@ void LoadEnv::initializeLoading(const OUString&
// UI mode // UI mode
const bool bUIMode = const bool bUIMode =
( ( m_eFeature & E_WORK_WITH_UI ) == E_WORK_WITH_UI ) && ( ( m_eFeature & E_WORK_WITH_UI ) == E_WORK_WITH_UI ) &&
( m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_HIDDEN(), false ) == false ) && !m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_HIDDEN(), false ) &&
( m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_PREVIEW(), false ) == false ); !m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_PREVIEW(), false );
initializeUIDefaults( initializeUIDefaults(
m_xContext, m_xContext,
...@@ -1241,9 +1241,9 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() ...@@ -1241,9 +1241,9 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded()
// or better its not allowed for some requests in general :-) // or better its not allowed for some requests in general :-)
if ( if (
( ! TargetHelper::matchSpecialTarget(m_sTarget, TargetHelper::E_DEFAULT) ) || ( ! TargetHelper::matchSpecialTarget(m_sTarget, TargetHelper::E_DEFAULT) ) ||
(m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false) == true) || m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false) ||
// (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN() , false) == sal_True) || // (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN() , false) == sal_True) ||
(m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), false) == true) m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), false)
) )
{ {
return css::uno::Reference< css::frame::XFrame >(); return css::uno::Reference< css::frame::XFrame >();
...@@ -1396,7 +1396,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() ...@@ -1396,7 +1396,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget()
// It doesn't matter if somewhere wants to create a new view // It doesn't matter if somewhere wants to create a new view
// or open a new untitled document ... // or open a new untitled document ...
// The only exception form that - hidden frames! // The only exception form that - hidden frames!
if (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false) == true) if (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false))
return css::uno::Reference< css::frame::XFrame >(); return css::uno::Reference< css::frame::XFrame >();
css::uno::Reference< css::frame::XFramesSupplier > xSupplier( css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY); css::uno::Reference< css::frame::XFramesSupplier > xSupplier( css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY);
...@@ -1413,8 +1413,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() ...@@ -1413,8 +1413,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget()
// These states indicates a wish for creation of a new view in general. // These states indicates a wish for creation of a new view in general.
if ( if (
(m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false) == true) || m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , false) ||
(m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), false) == true) m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), false)
) )
{ {
return css::uno::Reference< css::frame::XFrame >(); return css::uno::Reference< css::frame::XFrame >();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment