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 | |
parent | 63c6c5d78c2712b824c9194269d13422d4835487 (diff) | |
parent | 1f680bfe9c50b03c7623bf34755d84ec0796ea32 (diff) |
autorecovery: merge after rebase to m69
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/PresentationViewShellBase.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/UpdateLockManager.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 84 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 21 | ||||
-rw-r--r-- | sd/source/ui/view/drviews5.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/frmview.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/presvish.cxx | 1 |
13 files changed, 63 insertions, 75 deletions
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx index 8019fb7ec1e9..3cc5a023a34b 100644 --- a/sd/source/ui/view/PresentationViewShellBase.cxx +++ b/sd/source/ui/view/PresentationViewShellBase.cxx @@ -92,10 +92,10 @@ PresentationViewShellBase::PresentationViewShellBase ( GetUpdateLockManager()->Disable(); // Hide the automatic (non-context sensitive) tool bars. - if (_pFrame!=NULL && _pFrame->GetFrame()!=NULL) + if (_pFrame!=NULL) { Reference<beans::XPropertySet> xFrameSet ( - _pFrame->GetFrame()->GetFrameInterface(), + _pFrame->GetFrame().GetFrameInterface(), UNO_QUERY); if (xFrameSet.is()) { diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 487794816270..21ad0c484473 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -721,8 +721,8 @@ void ToolBarManager::Implementation::SetValid (bool bValid) if (mbIsValid) { Reference<frame::XFrame> xFrame; - if (mrBase.GetViewFrame() != NULL && mrBase.GetViewFrame()->GetFrame()) - xFrame = mrBase.GetViewFrame()->GetFrame()->GetFrameInterface(); + if (mrBase.GetViewFrame() != NULL) + xFrame = mrBase.GetViewFrame()->GetFrame().GetFrameInterface(); try { Reference<beans::XPropertySet> xFrameProperties (xFrame, UNO_QUERY_THROW); diff --git a/sd/source/ui/view/UpdateLockManager.cxx b/sd/source/ui/view/UpdateLockManager.cxx index 40515bf20197..51285533a389 100644 --- a/sd/source/ui/view/UpdateLockManager.cxx +++ b/sd/source/ui/view/UpdateLockManager.cxx @@ -399,11 +399,10 @@ Reference< ::com::sun::star::frame::XLayoutManager> if (mxLayoutManager.get() == NULL) { - if (mrBase.GetViewFrame()!=NULL - && mrBase.GetViewFrame()->GetFrame()!=NULL) + if (mrBase.GetViewFrame()!=NULL) { Reference<beans::XPropertySet> xFrameProperties ( - mrBase.GetViewFrame()->GetFrame()->GetFrameInterface(), + mrBase.GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY); if (xFrameProperties.is()) { 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; +} diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 54e0f37a1b19..cdfb43b3ba2e 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -101,9 +101,12 @@ #include <com/sun/star/drawing/framework/XControllerManager.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfiguration.hpp> +#include <com/sun/star/frame/XFrame.hpp> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; +using ::com::sun::star::frame::XFrame; +using ::com::sun::star::frame::XController; namespace sd { @@ -378,17 +381,15 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) try { + Reference< XFrame > xFrame( pFrame->GetFrame().GetFrameInterface(), UNO_SET_THROW ); + // Save the current configuration of panes and views. Reference<XControllerManager> xControllerManager ( GetViewShellBase().GetController(), UNO_QUERY_THROW); Reference<XConfigurationController> xConfigurationController ( - xControllerManager->getConfigurationController()); - if ( ! xConfigurationController.is()) - throw RuntimeException(); + xControllerManager->getConfigurationController(), UNO_QUERY_THROW ); Reference<XConfiguration> xConfiguration ( - xConfigurationController->getRequestedConfiguration()); - if ( ! xConfiguration.is()) - throw RuntimeException(); + xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW ); SfxChildWindow* pWindow = pFrame->GetChildWindow(nId); if(pWindow) @@ -401,14 +402,12 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) // Normale Weiterleitung an ViewFrame zur Ausfuehrung GetViewFrame()->ExecuteSlot(rReq); - // From here on we must cope with this object already being + // From here on we must cope with this object and the frame already being // deleted. Do not call any methods or use data members. - ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pFrame); - OSL_ASSERT(pBase!=NULL); + Reference<XController> xController( xFrame->getController(), UNO_SET_THROW ); // Restore the configuration. - xControllerManager = Reference<XControllerManager>( - pBase->GetController(), UNO_QUERY_THROW); + xControllerManager = Reference<XControllerManager>( xController, UNO_QUERY_THROW); xConfigurationController = Reference<XConfigurationController>( xControllerManager->getConfigurationController()); if ( ! xConfigurationController.is()) diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 3f8973fbcd64..5aeb1aa00c53 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -156,7 +156,7 @@ void DrawViewShell::ArrangeGUIElements (void) if ( pIPClient && pIPClient->IsObjectInPlaceActive() ) bClientActive = TRUE; - BOOL bInPlaceActive = GetViewFrame()->GetFrame()->IsInPlace(); + BOOL bInPlaceActive = GetViewFrame()->GetFrame().IsInPlace(); if ( mbZoomOnPage && !bInPlaceActive && !bClientActive ) { diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index cc7fd3106fa2..8d30bd377f01 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1595,9 +1595,9 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet) // view mode is allowed. const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()); - if (GetViewFrame()->GetFrame()->IsInPlace() || bIsRunning) + if (GetViewFrame()->GetFrame().IsInPlace() || bIsRunning) { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { rSet.ClearItem( SID_DRAWINGMODE ); rSet.DisableItem( SID_DRAWINGMODE ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 1dbfa7211a76..f23c364a7a22 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -69,7 +69,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <avmedia/mediawindow.hxx> #include <svl/urihelper.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/docfile.hxx> #include "DrawViewShell.hxx" diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 3783f20a49ef..a4f0519373ea 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -62,7 +62,6 @@ #include <svx/svdouno.hxx> #include <tools/urlobj.hxx> #include <svx/fmshell.hxx> -#include <sfx2/topfrm.hxx> #include <svl/cjkoptions.hxx> #ifndef SD_FRAME_VIEW diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 503fc5ab0624..a27f648da6bf 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -36,7 +36,6 @@ #ifndef _SVXIDS_HRC #include <svx/svxids.hrc> #endif -#include <sfx2/topfrm.hxx> #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/drawing/framework/ResourceId.hpp> #include <rtl/ustrbuf.hxx> @@ -57,6 +56,7 @@ #include "sdiocmpt.hxx" #include "framework/FrameworkHelper.hxx" #include <comphelper/processfactory.hxx> +#include <sfx2/viewfrm.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -103,8 +103,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * ULONG nSdViewShellCount = 0; ViewShellBase* pBase = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell, - TYPE(SfxTopViewFrame)); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell); while (pSfxViewFrame) { @@ -145,8 +144,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * } } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell, - TYPE(SfxTopViewFrame)); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell); } SdDrawDocument* pDoc = pDocShell->GetDoc(); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 43a8683cd039..a168f7d6b88b 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -61,7 +61,6 @@ #include <sfx2/tplpitem.hxx> #include <svx/svdorect.hxx> #include <sot/formats.hxx> -#include <sfx2/topfrm.hxx> #include <com/sun/star/linguistic2/XThesaurus.hpp> #include <com/sun/star/i18n/TransliterationModules.hdl> #include <svx/unolingu.hxx> diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index c500a95f2811..3c0f0f51eb88 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -212,7 +212,7 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh maBulletFont.SetShadow(FALSE); - Reference<XFrame> xFrame (mpOutlineViewShell->GetViewShellBase().GetFrame()->GetTopFrame()->GetFrameInterface(), UNO_QUERY); + Reference<XFrame> xFrame (mpOutlineViewShell->GetViewShellBase().GetFrame()->GetTopFrame().GetFrameInterface(), UNO_QUERY); const OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:ShowSlide" )); maSlideImage = GetImage( xFrame, aSlotURL, true, false /* todo, hc mode */ ); diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index a9a2d9caac13..ca694b21a095 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -41,7 +41,6 @@ #include "optsitem.hxx" #include "sddll.hxx" #include <sfx2/request.hxx> -#include <sfx2/topfrm.hxx> #ifndef _SFX_DISPATCH_HXX #include <sfx2/dispatch.hxx> #endif |