diff options
Diffstat (limited to 'sd/source/ui/view/ViewShellBase.cxx')
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 6640d2455c20..f609f669da03 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1257,7 +1257,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const return *mpImpl->mpCustomHandleManager.get(); } -::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const +::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const ::rtl::OUString& aCmdURL ) { ::rtl::OUString aLabel; @@ -1266,7 +1266,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW ); - Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( xFrame, UNO_QUERY_THROW ); ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); @@ -1298,6 +1298,12 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const return aLabel; } +::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const +{ + Reference< XFrame > xFrame( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); + return ImplRetrieveLabelFromCommand( xFrame, aCmdURL ); +} + //===== ViewShellBase::Implementation ========================================= |