diff options
Diffstat (limited to 'chart2/source/controller/main/FeatureCommandDispatchBase.cxx')
-rw-r--r-- | chart2/source/controller/main/FeatureCommandDispatchBase.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx index 90dcf77b2482..a07fb0735fa3 100644 --- a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx +++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx @@ -29,7 +29,7 @@ namespace chart FeatureCommandDispatchBase::FeatureCommandDispatchBase( const Reference< uno::XComponentContext >& rxContext ) :CommandDispatch( rxContext ) - ,m_nFeatureId( 0 ) + ,m_nFeatureId( ChartCommandID::NONE ) { } @@ -45,8 +45,7 @@ void FeatureCommandDispatchBase::initialize() bool FeatureCommandDispatchBase::isFeatureSupported( const OUString& rCommandURL ) { - SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( rCommandURL ); - return aIter != m_aSupportedFeatures.end(); + return m_aSupportedFeatures.contains(rCommandURL); } void FeatureCommandDispatchBase::fireStatusEvent( const OUString& rURL, @@ -78,15 +77,10 @@ void FeatureCommandDispatchBase::dispatch( const util::URL& URL, } } -void FeatureCommandDispatchBase::implDescribeSupportedFeature( const char* pAsciiCommandURL, - sal_uInt16 nId, sal_Int16 nGroup ) +void FeatureCommandDispatchBase::implDescribeSupportedFeature( const OUString& sCommandURL, + ChartCommandID nId, sal_Int16 nGroup ) { - ControllerFeature aFeature; - aFeature.Command = OUString::createFromAscii( pAsciiCommandURL ); - aFeature.nFeatureId = nId; - aFeature.GroupId = nGroup; - - m_aSupportedFeatures[ aFeature.Command ] = aFeature; + m_aSupportedFeatures[sCommandURL] = { sCommandURL, nGroup, nId }; } } // namespace chart |