diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-03-23 11:58:14 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-03-23 11:58:14 +0100 |
commit | e7fd3a40ed3ebf97d45068096ddca846db755bcc (patch) | |
tree | f7450102b35123d23cf4f802900b660041743316 /sd/source | |
parent | 82c3cb81272450f339f0286e3c4bc56cce55d873 (diff) | |
parent | 2ee0a0a80684cc334f0fe3fa4fdb4ad444fdf84e (diff) |
CWS-TOOLING: integrate CWS autorecovery
Diffstat (limited to 'sd/source')
31 files changed, 127 insertions, 157 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index d75cbd6495ed..e2fdc2f805e5 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -42,7 +42,6 @@ #include <unotools/useroptions.hxx> #include <sfx2/printer.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/app.hxx> #include <sfx2/linkmgr.hxx> #include <svx/dialogs.hrc> diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 36c824e1b919..d563df48276e 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1072,7 +1072,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation USHORT nId = 0; // set slot images - Reference< ::com::sun::star::frame::XFrame > xFrame( mrBase.GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface() ); + Reference< ::com::sun::star::frame::XFrame > xFrame( mrBase.GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface() ); if( xFrame.is() ) { const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); diff --git a/sd/source/ui/app/menuportal_tmpl.src b/sd/source/ui/app/menuportal_tmpl.src index e96ca6101fdc..29d7c6da1e4a 100644 --- a/sd/source/ui/app/menuportal_tmpl.src +++ b/sd/source/ui/app/menuportal_tmpl.src @@ -68,7 +68,6 @@ Menu SD_MENU_PORTAL MI ( ITEM_FILE_PRINTDOC ) MI ( ITEM_FILE_SETUPPRINTER ) SEPARATOR - MI ( ITEM_FILE_BACKTOWEBTOP ) MI ( ITEM_FILE_LOGOUT ) }; }; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index fcc22b73f424..743b7a35610d 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -84,6 +84,8 @@ using ::sd::framework::FrameworkHelper; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::frame::XFrame; namespace { @@ -302,13 +304,7 @@ void SdModule::OutlineToImpress (SfxRequest& rRequest) } SFX_REQUEST_ARG( rRequest, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE); - if ( pFrmItem ) - { - SfxFrame* pFrame = pFrmItem->GetFrame(); - pFrame->InsertDocument( pDocSh ); - } - else - SfxViewFrame::CreateViewFrame(*pDocSh, ::sd::OUTLINE_FACTORY_ID); + SfxViewFrame::LoadDocumentIntoFrame( *pDocSh, pFrmItem, ::sd::OUTLINE_FACTORY_ID ); ::sd::ViewShell* pViewSh = pDocSh->GetViewShell(); @@ -533,7 +529,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume } } -SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, SfxFrame* pTargetFrame ) +SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, const Reference< XFrame >& i_rFrame ) { SfxFrame* pFrame = 0; @@ -552,17 +548,9 @@ SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, SfxFrame* p } else if( pDocShell ) { - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pDocShell ); - } - else - { - SfxViewFrame* pViewFrame = SfxViewFrame::CreateViewFrame( *pDocShell ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pDocShell, i_rFrame ); + OSL_ENSURE( pViewFrame, "SdModule::CreateFromTemplate: no view frame - was the document really loaded?" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; } return pFrame; @@ -574,10 +562,10 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxFrame* pFrame = 0; if ( SvtModuleOptions().IsImpress() ) { - SfxFrame* pTargetFrame = 0; - SFX_REQUEST_ARG( rReq, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE); + Reference< XFrame > xTargetFrame; + SFX_REQUEST_ARG( rReq, pFrmItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE); if ( pFrmItem ) - pTargetFrame = pFrmItem->GetFrame(); + xTargetFrame = pFrmItem->GetFrame(); bool bMakeLayoutVisible = false; SfxViewFrame* pViewFrame = NULL; @@ -597,12 +585,12 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if( aStandardTemplate.Len() > 0 ) { //load a template document - pFrame = CreateFromTemplate( aStandardTemplate, pTargetFrame ); + pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame ); } else { //create an empty document - pFrame = CreateEmptyDocument( DOCUMENT_TYPE_IMPRESS, pTargetFrame ); + pFrame = CreateEmptyDocument( DOCUMENT_TYPE_IMPRESS, xTargetFrame ); bMakeLayoutVisible = true; } } @@ -635,7 +623,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxStringItem aReferer( SID_REFERER, UniString() ); SfxStringItem aPassword( SID_PASSWORD, aPasswrd ); - if ( pTargetFrame ) + if ( xTargetFrame.is() ) { SfxAllItemSet aSet( *rReq.GetArgs()->GetPool() ); aSet.Put( aFile ); @@ -645,10 +633,10 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if (aPasswrd.Len() > 0) aSet.Put( aPassword ); - const SfxPoolItem* pRet = pTargetFrame->LoadDocumentSynchron( aSet ); + const SfxPoolItem* pRet = SfxFrame::OpenDocumentSynchron( aSet, xTargetFrame ); const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); if ( pFrameItem && pFrameItem->GetFrame() ) - pFrame = pFrameItem->GetFrame()->GetFrame(); + pFrame = &pFrameItem->GetFrame()->GetFrame(); } else { @@ -667,7 +655,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot (aRequest); const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); if ( pFrameItem ) - pFrame = pFrameItem->GetFrame()->GetFrame(); + pFrame = &pFrameItem->GetFrame()->GetFrame(); } catch (::com::sun::star::uno::Exception e) { @@ -691,20 +679,9 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxObjectShell* pShell = xShell; if( pShell ) { - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pShell ); - pViewFrame = pFrame->GetCurrentViewFrame(); - } - else - { - pViewFrame = SfxViewFrame::CreateViewFrame( *pShell ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } - + pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pShell, xTargetFrame ); DBG_ASSERT( pViewFrame, "no ViewFrame!!" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; if(bNewDocDirect && !bStartWithTemplate) { @@ -790,7 +767,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) return pFrame; } -SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, SfxFrame* pTargetFrame ) +SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference< XFrame >& i_rFrame ) { SfxFrame* pFrame = 0; @@ -807,17 +784,9 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, SfxFrame* pTarge pDoc->StopWorkStartupDelay(); } - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pNewDocSh ); - } - else - { - SfxViewFrame* pViewFrame = SfxViewFrame::CreateViewFrame( *pNewDocSh ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pNewDocSh, i_rFrame ); + OSL_ENSURE( pViewFrame, "SdModule::CreateEmptyDocument: no view frame - was the document really loaded?" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; } return pFrame; diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index c82bda44f846..d398724a3074 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1591,14 +1591,13 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview ) aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aDocFile )); aReq.AppendItem( SfxStringItem( SID_REFERER, aEmptyStr ) ); aReq.AppendItem( SfxStringItem( SID_TARGETNAME, aTargetStr ) ); - aReq.AppendItem( SfxBoolItem( SID_VIEW, FALSE ) ); + aReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) ); aReq.AppendItem( SfxBoolItem( SID_PREVIEW, bDocPreview ) ); - const SfxObjectShellItem* pRet = (SfxObjectShellItem*) - SFX_APP()->ExecuteSlot( aReq ); + const SfxViewFrameItem* pRet = PTR_CAST( SfxViewFrameItem, SFX_APP()->ExecuteSlot( aReq ) ); - if( pRet && pRet->GetObjectShell() ) - xDocShell = pRet->GetObjectShell(); + if ( pRet && pRet->GetFrame() && pRet->GetFrame()->GetObjectShell() ) + xDocShell = pRet->GetFrame()->GetObjectShell(); } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 1dbd1b1ce923..f284651b91e5 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -59,7 +59,6 @@ #ifndef _SO_CLSIDS_HXX #include <sot/clsids.hxx> #endif -#include <sfx2/topfrm.hxx> #include <svl/cjkoptions.hxx> #include <svl/visitem.hxx> @@ -146,7 +145,7 @@ void DrawDocShell::Construct( bool bClipboard ) // the document's ref device. UpdateRefDevice(); - SetModel( new SdXImpressDocument( this, bClipboard ) ); + SetBaseModel( new SdXImpressDocument( this, bClipboard ) ); SetPool( &mpDoc->GetItemPool() ); mpUndoManager = new sd::UndoManager; mpDoc->SetSdrUndoManager( mpUndoManager ); @@ -163,7 +162,7 @@ void DrawDocShell::Construct( bool bClipboard ) DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, BOOL bDataObject, - DocumentType eDocumentType,BOOL bScriptSupport) : + DocumentType eDocumentType) : SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), mpDoc(NULL), mpUndoManager(NULL), @@ -176,8 +175,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, mbOwnPrinter(FALSE), mbNewDocument( sal_True ) { - if ( !bScriptSupport ) - SetHasNoBasic(); Construct( eMode == SFX_CREATE_MODE_INTERNAL ); } @@ -187,6 +184,28 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, |* \************************************************************************/ +DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObject, DocumentType eDocumentType ) : + SfxObjectShell( nModelCreationFlags ), + mpDoc(NULL), + mpUndoManager(NULL), + mpPrinter(NULL), + mpViewShell(NULL), + mpFontList(NULL), + meDocType(eDocumentType), + mpFilterSIDs(0), + mbSdDataObj(bDataObject), + mbOwnPrinter(FALSE), + mbNewDocument( sal_True ) +{ + Construct( FALSE ); +} + +/************************************************************************* +|* +|* Konstruktor 3 +|* +\************************************************************************/ + DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, BOOL bDataObject, DocumentType eDocumentType) : @@ -362,7 +381,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) ViewShell* pViewSh = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0, false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); while (pSfxViewFrame) { @@ -376,7 +395,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) pFrameViewList->Insert( new FrameView( mpDoc, pViewSh->GetFrameView() ) ); } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0, false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } } } @@ -392,7 +411,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) { ViewShell* pViewSh = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0,false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); sal_uInt32 i; for( i = 0; pSfxViewFrame && (i < pFrameViewList->Count()); i++ ) @@ -406,7 +425,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) pViewSh->ReadFrameViewData( (FrameView*)pFrameViewList->GetObject(i) ); } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0,false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } } } @@ -570,7 +589,7 @@ IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo) void DrawDocShell::ClearUndoBuffer() { // clear possible undo buffers of outliners - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0, false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); while(pSfxViewFrame) { ViewShellBase* pViewShellBase = dynamic_cast< ViewShellBase* >( pSfxViewFrame->GetViewShell() ); @@ -593,7 +612,7 @@ void DrawDocShell::ClearUndoBuffer() } } } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0, false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } SfxUndoManager* pUndoManager = GetUndoManager(); diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx index 38dff2996fcf..d5e7315144c0 100644 --- a/sd/source/ui/docshell/grdocsh.cxx +++ b/sd/source/ui/docshell/grdocsh.cxx @@ -68,8 +68,16 @@ SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), SFX GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode, BOOL bDataObject, - DocumentType eDocType,BOOL bScriptSupport) : - DrawDocShell(eMode, bDataObject, eDocType, bScriptSupport) + DocumentType eDocType) : + DrawDocShell(eMode, bDataObject, eDocType) +{ + SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); +} + +GraphicDocShell::GraphicDocShell(const sal_uInt64 nModelCreationFlags, + BOOL bDataObject, + DocumentType eDocType) : + DrawDocShell(nModelCreationFlags, bDataObject, eDocType) { SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); } diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 131b3a401936..74088422b4ab 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -31,7 +31,7 @@ #include "ViewShellBase.hxx" #include <cppcanvas/vclfactory.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/topfrm.hxx> +#include <vcl/wrkwin.hxx> #include <vcl/svapp.hxx> #include <vcl/dialog.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index f45ed82f4d3e..92b1450624e1 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -210,7 +210,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, - mpView->GetViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), + mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ) : 0; if( !pDlg ) return; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 2509a4f4f375..f2b77d01f96c 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -70,8 +70,12 @@ public: DrawDocShell ( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, BOOL bSdDataObj=FALSE, - DocumentType=DOCUMENT_TYPE_IMPRESS, - BOOL bScriptSupport=TRUE); + DocumentType=DOCUMENT_TYPE_IMPRESS); + + DrawDocShell ( + const sal_uInt64 nModelCreationFlags, + BOOL bSdDataObj=FALSE, + DocumentType=DOCUMENT_TYPE_IMPRESS); DrawDocShell ( SdDrawDocument* pDoc, diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx index 61f3f75110ce..7b506c515185 100644 --- a/sd/source/ui/inc/GraphicDocShell.hxx +++ b/sd/source/ui/inc/GraphicDocShell.hxx @@ -57,8 +57,12 @@ public: GraphicDocShell ( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, BOOL bSdDataObj=FALSE, - DocumentType=DOCUMENT_TYPE_DRAW, - BOOL bScriptSupport=TRUE); + DocumentType=DOCUMENT_TYPE_DRAW); + + GraphicDocShell ( + const sal_uInt64 nModelCreationFlags, + BOOL bSdDataObj=FALSE, + DocumentType=DOCUMENT_TYPE_DRAW); virtual ~GraphicDocShell (void); }; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 421129b8dba7..c951f68d9b74 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -44,7 +44,6 @@ #include <svx/svdpool.hxx> #include <svl/itemprop.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/viewfrm.hxx> #include <toolkit/unohlp.hxx> @@ -704,9 +703,9 @@ void SAL_CALL SlideShow::end() throw(RuntimeException) { PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(pFullScreenViewShellBase->GetMainViewShell().get()); - if( pShell && pShell->GetViewFrame() && pShell->GetViewFrame()->GetTopFrame() ) + if( pShell && pShell->GetViewFrame() ) { - WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame()->GetWindow().GetParent()); + WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); if( pWorkWindow ) { pWorkWindow->StartPresentationMode( FALSE, isAlwaysOnTop() ); @@ -1200,7 +1199,7 @@ void SlideShow::StartFullscreenPresentation( ) // The new frame is created hidden. To make it visible and activate the // new view shell--a prerequisite to process slot calls and initialize // its panes--a GrabFocus() has to be called later on. - SfxTopFrame* pNewFrame = SfxTopFrame::Create( mpDoc->GetDocSh(), pWorkWindow, PRESENTATION_FACTORY_ID, TRUE); + SfxFrame* pNewFrame = SfxFrame::Create( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID, true ); pNewFrame->SetPresentationMode(TRUE); mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell()); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 137136c80fc0..d58cfcb3f6c9 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2218,9 +2218,9 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG ) PopupMenu* pPageMenu = pMenu->GetPopupMenu( CM_GOTO ); SfxViewFrame* pViewFrame = getViewFrame(); - if( pViewFrame && pViewFrame->GetFrame() ) + if( pViewFrame ) { - Reference< ::com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame()->GetFrameInterface() ); + Reference< ::com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame().GetFrameInterface() ); if( xFrame.is() ) { pMenu->SetItemImage( CM_NEXT_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10617") ), FALSE, FALSE ) ); @@ -2843,12 +2843,12 @@ void SlideshowImpl::setActiveXToolbarsVisible( sal_Bool bVisible ) // this is a plugin/activex mode, no toolbars should be visible during slide show // after the end of slide show they should be visible again SfxViewFrame* pViewFrame = getViewFrame(); - if( pViewFrame && pViewFrame->GetFrame() && pViewFrame->GetFrame()->GetTopFrame() ) + if( pViewFrame ) { try { Reference< frame::XLayoutManager > xLayoutManager; - Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame()->GetTopFrame()->GetFrameInterface(), UNO_QUERY_THROW ); + Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame().GetTopFrame().GetFrameInterface(), UNO_QUERY_THROW ); if ( ( xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ) >>= xLayoutManager ) && xLayoutManager.is() ) diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 5f1e2a056a34..d90f6f0f824f 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -82,7 +82,6 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/topfrm.hxx> #include <tools/link.hxx> #include <vcl/svapp.hxx> @@ -649,7 +648,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) SfxViewFrame* pSlideViewFrame = SfxViewFrame::Current(); DBG_ASSERT(pSlideViewFrame!=NULL, "SlideSorterController::GetCtrlState: ViewFrame not found"); - if (pSlideViewFrame && pSlideViewFrame->ISA(SfxTopViewFrame)) + if (pSlideViewFrame) { pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 8033f5ac16bd..126a599c21d3 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -77,7 +77,6 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <svx/svxids.hrc> @@ -498,14 +497,7 @@ void SlotManager::GetCtrlState (SfxItemSet& rSet) SfxViewFrame* pSlideViewFrame = pShell->GetViewFrame(); DBG_ASSERT(pSlideViewFrame!=NULL, "SlideSorterController::GetCtrlState: ViewFrame not found"); - if (pSlideViewFrame->ISA(SfxTopViewFrame)) - { - pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); - } - else // MI sagt: kein MDIFrame --> disablen - { - rSet.DisableItem(SID_RELOAD); - } + pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); } } diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index 8d6bd5f6b4bc..81678d1af7c0 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -265,7 +265,7 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase) // Connect to the frame to listen for controllers being exchanged. // Listen to changes of certain properties. Reference<frame::XFrame> xFrame ( - mrBase.GetFrame()->GetTopFrame()->GetFrameInterface(), + mrBase.GetFrame()->GetTopFrame().GetFrameInterface(), uno::UNO_QUERY); mxFrameWeak = xFrame; if (xFrame.is()) diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx index ae36f8954e56..46ac4174cbe7 100644 --- a/sd/source/ui/tools/IdleDetection.cxx +++ b/sd/source/ui/tools/IdleDetection.cxx @@ -82,18 +82,15 @@ sal_Int32 IdleDetection::CheckSlideShowRunning (void) // Ignore the current frame when it does not exist, is not valid, or // is not active. bool bIgnoreFrame (true); - if (pViewFrame->GetFrame() != NULL) + uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame().GetFrameInterface()); + try { - uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame()->GetFrameInterface()); - try - { - if (xFrame.is() && xFrame->isActive()) - bIgnoreFrame = false; - } - catch (uno::RuntimeException e) - { - (void) e; - } + if (xFrame.is() && xFrame->isActive()) + bIgnoreFrame = false; + } + catch (uno::RuntimeException e) + { + (void) e; } if (bIgnoreFrame) continue; diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index 48aed3ccad39..a423692caa4f 100644 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -66,12 +66,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::GraphicDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_DRAW, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_DRAW ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } @@ -98,12 +95,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::DrawDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_IMPRESS, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_IMPRESS ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx index 273f7a3fd613..a16b12d3cb63 100644 --- a/sd/source/ui/view/PresentationViewShellBase.cxx +++ b/sd/source/ui/view/PresentationViewShellBase.cxx @@ -89,10 +89,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 e2a75849c524..4919a9fe2bbb 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -718,8 +718,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 2c992e826f0f..f373042f627b 100644 --- a/sd/source/ui/view/UpdateLockManager.cxx +++ b/sd/source/ui/view/UpdateLockManager.cxx @@ -396,11 +396,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 4a60d92e6bcb..6640d2455c20 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -280,11 +280,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(), @@ -1054,7 +1050,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) { @@ -1270,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( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW ); ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index e7ea82bb345a..852e56096a76 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -98,9 +98,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 { @@ -375,17 +378,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) @@ -398,14 +399,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 f3f4d3ded05e..18ff686fc612 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -153,7 +153,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 f718bc46ba93..e0cb78095bd0 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1592,9 +1592,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 d3ae49a1f068..1a667b28f6d4 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -66,7 +66,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 e5af6dcf991a..0a5f743bb738 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -59,7 +59,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 e358ebf4d562..aca0130624ce 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -33,7 +33,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> @@ -54,6 +53,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; @@ -100,8 +100,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) { @@ -142,8 +141,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 65e92b26c420..1467e6c24bd0 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -58,7 +58,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 <editeng/unolingu.hxx> diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 15b2f0f15d0f..30daec8b636e 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -209,7 +209,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 fde6287e3038..11f20c7a83d4 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -38,7 +38,6 @@ #include "optsitem.hxx" #include "sddll.hxx" #include <sfx2/request.hxx> -#include <sfx2/topfrm.hxx> #ifndef _SFX_DISPATCH_HXX #include <sfx2/dispatch.hxx> #endif |