summaryrefslogtreecommitdiff
path: root/forms/source/helper/formnavigation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/helper/formnavigation.cxx')
-rw-r--r--forms/source/helper/formnavigation.cxx56
1 files changed, 28 insertions, 28 deletions
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 96e2b6b8e935..5182b0544db6 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -119,21 +119,21 @@ namespace frm
void SAL_CALL OFormNavigationHelper::disposing( const EventObject& _rSource )
{
// was it one of our external dispatchers?
- if ( m_nConnectedFeatures )
+ if ( !m_nConnectedFeatures )
+ return;
+
+ for (auto & feature : m_aSupportedFeatures)
{
- for (auto & feature : m_aSupportedFeatures)
+ if ( feature.second.xDispatcher == _rSource.Source )
{
- if ( feature.second.xDispatcher == _rSource.Source )
- {
- feature.second.xDispatcher->removeStatusListener( static_cast< XStatusListener* >( this ), feature.second.aURL );
- feature.second.xDispatcher = nullptr;
- feature.second.bCachedState = false;
- feature.second.aCachedAdditionalState.clear();
- --m_nConnectedFeatures;
+ feature.second.xDispatcher->removeStatusListener( static_cast< XStatusListener* >( this ), feature.second.aURL );
+ feature.second.xDispatcher = nullptr;
+ feature.second.bCachedState = false;
+ feature.second.aCachedAdditionalState.clear();
+ --m_nConnectedFeatures;
- featureStateChanged( feature.first, false );
- break;
- }
+ featureStateChanged( feature.first, false );
+ break;
}
}
}
@@ -234,26 +234,26 @@ namespace frm
void OFormNavigationHelper::initializeSupportedFeatures( )
{
- if ( m_aSupportedFeatures.empty() )
- {
- // ask the derivee which feature ids it wants us to support
- ::std::vector< sal_Int16 > aFeatureIds;
- getSupportedFeatures( aFeatureIds );
+ if ( !m_aSupportedFeatures.empty() )
+ return;
- OFormNavigationMapper aUrlMapper( m_xORB );
+ // ask the derivee which feature ids it wants us to support
+ ::std::vector< sal_Int16 > aFeatureIds;
+ getSupportedFeatures( aFeatureIds );
- for (auto const& feature : aFeatureIds)
- {
- FeatureInfo aFeatureInfo;
+ OFormNavigationMapper aUrlMapper( m_xORB );
+
+ for (auto const& feature : aFeatureIds)
+ {
+ FeatureInfo aFeatureInfo;
- bool bKnownId =
- aUrlMapper.getFeatureURL( feature, aFeatureInfo.aURL );
- DBG_ASSERT( bKnownId, "OFormNavigationHelper::initializeSupportedFeatures: unknown feature id!" );
+ bool bKnownId =
+ aUrlMapper.getFeatureURL( feature, aFeatureInfo.aURL );
+ DBG_ASSERT( bKnownId, "OFormNavigationHelper::initializeSupportedFeatures: unknown feature id!" );
- if ( bKnownId )
- // add to our map
- m_aSupportedFeatures.emplace( feature, aFeatureInfo );
- }
+ if ( bKnownId )
+ // add to our map
+ m_aSupportedFeatures.emplace( feature, aFeatureInfo );
}
}