diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-01-08 22:50:33 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-01-08 22:50:33 +0100 |
commit | 5f05cb55bcac03a31fc78b2d984195e12798f786 (patch) | |
tree | a95a1f883717a512e4d63bf058718ba3e6f3a277 /sd/source/ui/view/ViewShellBase.cxx | |
parent | 63c6c5d78c2712b824c9194269d13422d4835487 (diff) | |
parent | 1f680bfe9c50b03c7623bf34755d84ec0796ea32 (diff) |
autorecovery: merge after rebase to m69
Diffstat (limited to 'sd/source/ui/view/ViewShellBase.cxx')
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 3e0f6297f8d6..5a92c726c9c7 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -33,8 +33,8 @@ #include <comphelper/processfactory.hxx> -#include <com/sun/star/frame/UnknownModuleException.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/frame/UnknownModuleException.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -284,11 +284,7 @@ ViewShellBase::ViewShellBase ( SfxViewFrame* _pFrame, SfxViewShell*) : SfxViewShell (_pFrame, - SFX_VIEW_MAXIMIZE_FIRST - | SFX_VIEW_OPTIMIZE_EACH - | SFX_VIEW_DISABLE_ACCELS - | SFX_VIEW_OBJECTSIZE_EMBEDDED - | SFX_VIEW_CAN_PRINT + SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS), maMutex(), mpImpl(), @@ -1015,7 +1011,7 @@ void ViewShellBase::UpdateBorder ( bool bForce /* = false */ ) // calls for the views in side panes but prevents calling an already // dying SfxViewShell base class. // For issue #140703# we have to check the existence of the window, - // too. The SfxTopViewFrame accesses the window without checking it. + // too. The SfxViewFrame accesses the window without checking it. ViewShell* pMainViewShell = GetMainViewShell().get(); if (pMainViewShell != NULL && GetWindow()!=NULL) { @@ -1222,46 +1218,46 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const return *mpImpl->mpCustomHandleManager.get(); } -::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
-{
- ::rtl::OUString aLabel;
+::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const +{ + ::rtl::OUString aLabel; - if ( aCmdURL.getLength() > 0 ) try
- {
+ if ( aCmdURL.getLength() > 0 ) try + { 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 ); -
- ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
-
- if( aModuleIdentifier.getLength() > 0 )
- {
- Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY );
- if( xNameAccess.is() )
- {
- Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
- Sequence< PropertyValue > aPropSeq;
- if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
- {
- for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
- {
- if( aPropSeq[i].Name.equalsAscii( "Name" ))
- {
- aPropSeq[i].Value >>= aLabel;
- break;
- }
- }
- }
- }
- }
- }
- catch ( Exception& )
- {
- }
-
- return aLabel;
-}
+ + ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); + + if( aModuleIdentifier.getLength() > 0 ) + { + Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY ); + if( xNameAccess.is() ) + { + Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW ); + Sequence< PropertyValue > aPropSeq; + if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) + { + for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if( aPropSeq[i].Name.equalsAscii( "Name" )) + { + aPropSeq[i].Value >>= aLabel; + break; + } + } + } + } + } + } + catch ( Exception& ) + { + } + + return aLabel; +} |