From af4e6b24573b5dd00e6beac7544becf559b8f498 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 20 Nov 2009 15:30:25 +0100 Subject: [CWS autorecovery] introduced status SfxFrame::InsertDocument which encapsulates a usage pattern comprised of the old InsertDocument/CreateViewFrame pair --- sw/source/ui/app/apphdl.cxx | 9 ++------- sw/source/ui/app/applab.cxx | 21 ++++++--------------- 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 7fe0d349e8a7..840b765b9a72 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -965,13 +965,8 @@ void NewXForms( SfxRequest& rReq ) { const SfxPoolItem* pFrameItem = NULL; pArgs->GetItemState( SID_DOCFRAME, FALSE, &pFrameItem ); - if( pFrameItem != NULL ) - { - SfxFrame* pFrame = - static_cast( pFrameItem )->GetFrame(); - DBG_ASSERT( pFrame != NULL, "no frame?" ); - pFrame->InsertDocument( xDocSh ); - } + SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; + SfxFrame::InsertDocument( *xDocSh, pFrame ); } // set return value diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index d09e522599d7..7e04e982d039 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -243,19 +243,10 @@ static sal_uInt16 nBCTitleNo = 0; if(pArgs) pArgs->GetItemState(SID_DOCFRAME, FALSE, &pFrameItem); - SfxViewFrame* pFrame = 0; - if( pFrameItem ) - { - SfxFrame* pFr = ((const SfxFrameItem*)pFrameItem)->GetFrame(); - xDocSh->PutItem(SfxBoolItem(SID_HIDDEN, TRUE)); - pFr->InsertDocument(xDocSh); - pFrame = pFr->GetCurrentViewFrame(); - } - else - { - pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); - } - SwView *pNewView = (SwView*) pFrame->GetViewShell(); + SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; + SfxViewFrame* pViewFrame = SfxFrame::InsertDocument( *xDocSh, pFrame, 0, true ); + + SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. // Dokumenttitel setzen @@ -272,7 +263,7 @@ static sal_uInt16 nBCTitleNo = 0; } xDocSh->SetTitle( aTmp ); - pFrame->GetFrame()->Appear(); + pViewFrame->GetFrame()->Appear(); // Shell ermitteln SwWrtShell *pSh = pNewView->GetWrtShellPtr(); @@ -474,7 +465,7 @@ static sal_uInt16 nBCTitleNo = 0; if( rItem.bSynchron ) { - SfxDispatcher* pDisp = pFrame->GetDispatcher(); + SfxDispatcher* pDisp = pViewFrame->GetDispatcher(); ASSERT(pDisp, "Heute kein Dispatcher am Frame?"); pDisp->Execute(FN_SYNC_LABELS, SFX_CALLMODE_ASYNCHRON); } -- cgit From afb4cbbcae4e553eae99303024a72784a336a399 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 23 Nov 2009 14:38:46 +0100 Subject: [CWS autorecovery] removed SfxCancellable/SfxCancelManager, and (part of) its transitive closure No real-life use cases for this exist anymore, since nowadays document loading happens synchronously all the time. --- sw/inc/ndgrf.hxx | 4 ---- sw/source/core/graphic/ndgrf.cxx | 9 --------- sw/source/filter/html/htmlgrin.cxx | 1 - 3 files changed, 14 deletions(-) (limited to 'sw') diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 45ecea30a9c0..b21bf78037d7 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -211,10 +211,6 @@ public: BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const; void ReleaseLink(); - // Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link - // ein FileObject gesetzt hat - void SetTransferPriority( USHORT nPrio ); - // Skalieren einer Image-Map: Die Image-Map wird um den Faktor // zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert void ScaleImageMap(); diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 55fbb54bd718..a359f4b5c7c9 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -674,15 +674,6 @@ void SwGrfNode::SetTwipSize( const Size& rSz ) } } - // Prioritaet beim Laden der Grafik setzen. Geht nur, wenn der Link - // ein FileObject gesetzt hat -void SwGrfNode::SetTransferPriority( USHORT nPrio ) -{ - if( refLink.Is() && refLink->GetObj() ) - SvxLinkManager::SetTransferPriority( *refLink, nPrio ); -} - - void SwGrfNode::ScaleImageMap() { if( !nGrfSize.Width() || !nGrfSize.Height() ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index d18a2b762aa0..5d84c49d9e86 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -809,7 +809,6 @@ IMAGE_SETEVENT: // gleich (synchron) angepasst wird (war bug #40983#) if( bRequestGrfNow ) { - pGrfNd->SetTransferPriority( SFX_TFPRIO_VISIBLE_LOWRES_GRAPHIC ); pGrfNd->SwapIn(); } -- cgit From f686c4209086312d92ee16c78c7b4e1ee120327e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 23 Nov 2009 20:48:33 +0100 Subject: [CWS autorecovery] while we are at it .... SID_BROWSE_STOP is dead, for a long time now ... --- sw/source/ui/docvw/docvw.hrc | 2 +- sw/source/ui/docvw/docvw.src | 6 ------ sw/source/ui/docvw/romenu.cxx | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc index afb599e64c6c..95581adbe5fa 100644 --- a/sw/source/ui/docvw/docvw.hrc +++ b/sw/source/ui/docvw/docvw.hrc @@ -37,7 +37,7 @@ #define MN_READONLY_OPENURL (RC_DOCVW_BEGIN + 2) #define MN_READONLY_OPENURLNEW (RC_DOCVW_BEGIN + 3) #define MN_READONLY_EDITDOC (RC_DOCVW_BEGIN + 4) -#define MN_READONLY_BROWSE_STOP (RC_DOCVW_BEGIN + 5) + // FREE, formerly known as MN_READONLY_BROWSE_STOP #define MN_READONLY_BROWSE_BACKWARD (RC_DOCVW_BEGIN + 6) #define MN_READONLY_BROWSE_FORWARD (RC_DOCVW_BEGIN + 7) #define MN_READONLY_SELECTION_MODE (RC_DOCVW_BEGIN + 8) diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src index 0220d9d9eddf..93b51e6de83b 100644 --- a/sw/source/ui/docvw/docvw.src +++ b/sw/source/ui/docvw/docvw.src @@ -80,12 +80,6 @@ Menu MN_READONLY_POPUP }; SEPARATOR MenuItem - { - Identifier = MN_READONLY_BROWSE_STOP ; - HelpID = SID_BROWSE_STOP ; - Text [ en-US ] = "~Stop" ; - }; - MenuItem { Identifier = MN_READONLY_BROWSE_BACKWARD ; HelpID = SID_BROWSE_BACKWARD ; diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 50776ef80f11..598cf064c7b3 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -226,7 +226,6 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : Check( MN_READONLY_EDITDOC, SID_EDITDOC, rDis ); Check( MN_READONLY_SELECTION_MODE, FN_READONLY_SELECTION_MODE, rDis ); Check( MN_READONLY_SOURCEVIEW, SID_SOURCEVIEW, rDis ); - Check( MN_READONLY_BROWSE_STOP, SID_BROWSE_STOP, rDis ); Check( MN_READONLY_BROWSE_BACKWARD, SID_BROWSE_BACKWARD,rDis ); Check( MN_READONLY_BROWSE_FORWARD, SID_BROWSE_FORWARD, rDis ); #ifdef WNT @@ -318,7 +317,6 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId ) rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(SID_RELOAD); break; - case MN_READONLY_BROWSE_STOP: nExecId = SID_BROWSE_STOP; break; case MN_READONLY_BROWSE_BACKWARD: nExecId = SID_BROWSE_BACKWARD;break; case MN_READONLY_BROWSE_FORWARD: nExecId = SID_BROWSE_FORWARD; break; case MN_READONLY_SOURCEVIEW: nExecId = SID_SOURCEVIEW; break; -- cgit From 14ce234fa0e33753a930e527da9c0ad8ce39723f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:04 +0100 Subject: [CWS autorecovery] merged SfxTopViewFrame into SfxViewFrame SfxTopViewFrame was the only class deriving from the abstract class SfxViewFrame, so both can effectively be treated as one class. This change was done to make subsequent refactorings easier. --- sw/source/ui/app/docsh2.cxx | 6 +++--- sw/source/ui/app/swwait.cxx | 8 ++++---- sw/source/ui/uiview/pview.cxx | 6 ++---- sw/source/ui/uno/unomailmerge.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 6 ++---- 5 files changed, 12 insertions(+), 16 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 3fd1e879b063..46d2ee5006a3 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1800,15 +1800,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView ) // Currently there can be only one view (layout) if the document is viewed in Web layout // So if there are more views we are in print layout and for toggling to Web layout all other views must be closed - SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE); + SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); do { if( pTmpFrm != pTempView->GetViewFrame() ) { pTmpFrm->DoClose(); - pTmpFrm = SfxViewFrame::GetFirst(this, 0, FALSE); + pTmpFrm = SfxViewFrame::GetFirst(this, FALSE); } else - pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, 0, FALSE); + pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE); } while ( pTmpFrm ); diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx index 5ab9258025e8..54b5b83757a3 100644 --- a/sw/source/ui/app/swwait.cxx +++ b/sw/source/ui/app/swwait.cxx @@ -41,25 +41,25 @@ void SwDocShell::EnterWait( BOOL bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); while ( pFrame ) { pFrame->GetWindow().EnterWait(); if ( bLockDispatcher ) pFrame->GetDispatcher()->Lock( TRUE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); } } void SwDocShell::LeaveWait( BOOL bLockDispatcher ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, 0, FALSE ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE ); while ( pFrame ) { pFrame->GetWindow().LeaveWait(); if ( bLockDispatcher ) pFrame->GetDispatcher()->Lock( FALSE ); - pFrame = SfxViewFrame::GetNext( *pFrame, this, 0, FALSE ); + pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE ); } } diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 93ae56fbca73..12cf21ede0ae 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1909,10 +1909,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): delete pPageDownBtn; /* SfxObjectShell* pDocSh = GetDocShell(); - TypeId aType = TYPE( SfxTopViewFrame ); - - for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh, aType ); - pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh, aType ) ) + for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh ); + pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) ) if( pFrame != GetViewFrame() ) { // es gibt noch eine weitere Sicht auf unser Dokument, also diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index fed4c2b201cf..44c5d011fe75 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -627,7 +627,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aCurSelection = aTranslated; } - SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, 0, FALSE); + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE); SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() ); if (!pView) throw RuntimeException(); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index fe3d8639bf84..1336e01e55f4 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -185,7 +185,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) { // check if the view frame still exists SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell, - 0, FALSE ); while(pFound) { @@ -196,7 +195,6 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell ) } pFound = SfxViewFrame::GetNext( *pFound, pDocShell, - 0, FALSE ); } } @@ -2691,7 +2689,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell() SfxViewShell *pView = 0; SwView *pSwView = 0; SwPagePreView *pSwPagePreView = 0; - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); while (pFrame) { pView = pFrame->GetViewShell(); @@ -2700,7 +2698,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell() break; if (!pSwPagePreView) pSwPagePreView = dynamic_cast< SwPagePreView * >(pView); - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); } return pSwView ? pSwView : dynamic_cast< SwView * >(pSwPagePreView); -- cgit From 69849b972d7ebdaa080a5bf331709b379aa79a79 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:04 +0100 Subject: [CWS autorecovery] forgot to remove some includes --- sw/inc/pch/precompiled_sw.hxx | 1 - sw/source/ui/uiview/pview.cxx | 1 - sw/source/ui/uiview/view2.cxx | 1 - 3 files changed, 3 deletions(-) (limited to 'sw') diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 0a43d2c73d96..fac4fdbfe366 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -597,7 +597,6 @@ #include "sfx2/tabdlg.hxx" #include "sfx2/tbxctrl.hxx" #include "sfx2/templdlg.hxx" -#include "sfx2/topfrm.hxx" #include "sfx2/tplpitem.hxx" #include "sfx2/viewfac.hxx" #include "sfx2/viewfrm.hxx" diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 12cf21ede0ae..c29961b9897c 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 77c06f44c494..4aa00311c5bd 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -90,7 +90,6 @@ #include #include #include -#include #include #include #include -- cgit From 1c6da69ba2bc437d826573c7909a220290a67311 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 12:56:05 +0100 Subject: [CWS autorecovery] removed some dead/unused stuff SID_BACKTOWEBTOP, some SFX_VIEW_* flags, some SFXFRAME_* flags, all BROWSE_* flags --- sw/source/ui/uiview/pview.cxx | 3 +-- sw/source/ui/uiview/srcview.cxx | 4 +--- sw/source/ui/uiview/view.cxx | 12 ++---------- 3 files changed, 4 insertions(+), 15 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index c29961b9897c..033c1fe27247 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -129,8 +129,7 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX)) TYPEINIT1(SwPagePreView,SfxViewShell) -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST|SFX_VIEW_OPTIMIZE_EACH| \ - SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS ) #define MIN_PREVIEW_ZOOM 25 #define MAX_PREVIEW_ZOOM 600 diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index d30e85c5ee71..c651baae1070 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -114,9 +114,7 @@ using ::rtl::OUString; using ::com::sun::star::util::SearchOptions; -#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT|\ +#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\ SFX_VIEW_NO_NEWWINDOW ) #define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL)) diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index a13f25d8933e..48bb6149fa3b 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -131,14 +131,9 @@ using ::rtl::OUStringBuffer; extern sal_Bool bNoInterrupt; // in mainwn.cxx -#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \ - SFX_VIEW_OBJECTSIZE_EMBEDDED| \ - SFX_VIEW_CAN_PRINT| \ +#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \ SFX_VIEW_HAS_PRINTOPTIONS) -//MA 06. Nov. 95: Each raus in Absprache mit MI wg. Bug 21523 -// SFX_VIEW_OPTIMIZE_EACH| - /*-------------------------------------------------------------------- Beschreibung: Statics --------------------------------------------------------------------*/ @@ -932,10 +927,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() ) aBrwsBorder = GetMargin(); - if( _pFrame->GetFrameType() & SFXFRAME_INTERNAL ) - pWrtShell->SetFrameView( aBrwsBorder ); - else - pWrtShell->SetBrowseBorder( aBrwsBorder ); + pWrtShell->SetBrowseBorder( aBrwsBorder ); // Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber // den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX -- cgit From 67372d922ccfc1d8515115573c7143cbabcbb45f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 30 Nov 2009 13:30:52 +0100 Subject: #i10000# --- sw/source/ui/uiview/view.cxx | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 48bb6149fa3b..cb1e7799bd6c 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -998,13 +998,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions()); - if( UseObjectSize() ) - { - //Damit der Sfx _rechtzeitig weiss_, wie gross die sheet::Border sind. - SvBorder aTmp; - CalcAndSetBorderPixel( aTmp, sal_True ); - } - if( pWrtShell->GetDoc()->IsUpdateExpFld() ) { SET_CURR_SHELL( pWrtShell ); -- cgit From 9d2d7e247db83c9f48272929edd3d5d5c22a1f11 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 10:11:06 +0100 Subject: autorecovery: another client of InsertDocument_Impl died ... SfxFrame::InsertDocument has been replaced with SfxViewFrame::LoadDocument, which now uses the UNO loader to load the existing document into a frame, instead of going the direct (non-UNO-, pure-SFX-) way --- sw/source/ui/app/apphdl.cxx | 13 +++---------- sw/source/ui/app/applab.cxx | 10 ++-------- 2 files changed, 5 insertions(+), 18 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 840b765b9a72..21a13cfd3320 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -958,16 +958,9 @@ void NewXForms( SfxRequest& rReq ) // initialize XForms static_cast( &xDocSh )->GetDoc()->initXForms( true ); - // put document into frame - const SfxItemSet* pArgs = rReq.GetArgs(); - DBG_ASSERT( pArgs, "no arguments in SfxRequest"); - if( pArgs != NULL ) - { - const SfxPoolItem* pFrameItem = NULL; - pArgs->GetItemState( SID_DOCFRAME, FALSE, &pFrameItem ); - SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; - SfxFrame::InsertDocument( *xDocSh, pFrame ); - } + // load document into frame + SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 7e04e982d039..1f9f0b8dbfd9 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,14 +237,8 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - const SfxItemSet *pArgs = rReq.GetArgs(); - DBG_ASSERT( pArgs, "no arguments in SfxRequest"); - const SfxPoolItem* pFrameItem = 0; - if(pArgs) - pArgs->GetItemState(SID_DOCFRAME, FALSE, &pFrameItem); - - SfxFrame* pFrame = pFrameItem ? dynamic_cast< const SfxFrameItem& >( *pFrameItem ).GetFrame() : NULL; - SfxViewFrame* pViewFrame = SfxFrame::InsertDocument( *xDocSh, pFrame, 0, true ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. -- cgit From 6550b83b1761a5d7cc71660c53439f550c463359 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 21:29:53 +0100 Subject: autorecovery: replace some calls to SfxViewFrame::CreateViewFrame with calls to the (newly introduced) SfxViewFrame::LoadHiddenDocument This way, we got rid of some more clients of InsertDocument_Impl. Final goal is to remove SfxViewFrame::CreateViewFrame completely, so the UNO loader is the only (indirect) client of InsertDocument_Impl. --- sw/source/core/doc/docglbl.cxx | 4 ++-- sw/source/filter/html/htmlform.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index 113319494e03..67b2163be449 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -326,7 +326,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, pDoc->GetSpzFrmFmts()->Count() ) { /* SfxViewFrame* pFrame = */ - SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); } xDocSh->DoSaveAs( *pTmpMed ); xDocSh->DoSaveCompleted( pTmpMed ); @@ -672,7 +672,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel ) pDoc->GetSpzFrmFmts()->Count() ) { /* SfxViewFrame* pFrame = */ - SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); } xDocSh->DoSaveAs( *pTmpMed ); xDocSh->DoSaveCompleted( pTmpMed ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index dd93a4e60b92..a954cc6134ab 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -732,7 +732,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha bRemoveHidden = ( pHiddenItem == NULL || !pHiddenItem->GetValue() ); } - pTempViewFrame = SfxViewFrame::CreateViewFrame( *pDocSh, 0, sal_True ); + pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 ); CallStartAction(); pDoc->GetEditShell( &pVSh ); } -- cgit From 65d3f97332dec72637177a0b15932b979067569e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Dec 2009 22:09:14 +0100 Subject: autorecovery: rename SfxViewFrame's LoadDocument to LoadDocumentIntoFrame, and introduce a new LoadDocument, which does not take any frame-like argument. Makes writing code easier (and more explicit) for clients which do not have a frame, but want to load non-hidden. --- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 2 +- sw/source/ui/app/docsh2.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 21a13cfd3320..8b1d64cf3f5d 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -960,7 +960,7 @@ void NewXForms( SfxRequest& rReq ) // load document into frame SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); - SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); + SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 1f9f0b8dbfd9..3af0fe9369e1 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -238,7 +238,7 @@ static sal_uInt16 nBCTitleNo = 0; } SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); - SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocument( *xDocSh, pFrameItem ); + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 46d2ee5006a3..8d62d65d0b12 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1061,7 +1061,7 @@ void SwDocShell::Execute(SfxRequest& rReq) else { // Neues Dokument erzeugen. - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0 ); + SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 ); SwView *pCurrView = (SwView*) pFrame->GetViewShell(); // Dokumenttitel setzen -- cgit From 330620b17d6785b9f1f7d3646e3958bc7fbdd1eb Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 9 Dec 2009 10:11:48 +0100 Subject: autorecovery: substituted some more usages of SfxViewFrame::CreateViewFrame with their new equivalents --- sw/source/ui/app/appenv.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 14 +++++++------- sw/source/ui/dbui/mmoutputpage.cxx | 4 ++-- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/uno/unomailmerge.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 4 ++-- sw/source/ui/uno/unotxvw.cxx | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 7f3acf375b35..2ee6fb9e7db8 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -210,7 +210,7 @@ static USHORT nTitleNo = 0; // Neues Dokument erzeugen (kein Show!) SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); pNewView = (SwView*) pFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. pSh = pNewView->GetWrtShellPtr(); diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 603af1c31111..9ed35bf00e6a 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1327,7 +1327,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // create a target docshell to put the merged document into xTargetDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); @@ -1447,7 +1447,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, if (xWorkDocSh->DoLoad(pWorkMed)) { //create a view frame for the document - SfxViewFrame* pWorkFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); //request the layout calculation SwWrtShell& rWorkShell = static_cast< SwView* >(pWorkFrame->GetViewShell())->GetWrtShell(); @@ -2892,7 +2892,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, pWorkMed->SetFilter( pSfxFlt ); if( xWorkDocSh->DoLoad(pWorkMed) ) { - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. //set the current DBMgr @@ -3183,7 +3183,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, // create a target docshell to put the merged document into SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTargetDocShell->DoInitNew( 0 ); - SfxViewFrame* pTargetFrame = SfxViewFrame::CreateViewFrame( *xTargetDocShell, 0, TRUE ); + SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); @@ -3244,7 +3244,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, xWorkDocSh->DoInitNew(); } //create a ViewFrame - SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); + SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() ); SwWrtShell& rWorkShell = pWorkView->GetWrtShell(); pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird. @@ -3255,8 +3255,8 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pWorkDoc->EmbedAllLinks(); if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds()) rWorkShell.Undo(); - // #i69485# lock fields to prevent access to the result set while calculating layout - rWorkShell.LockExpFlds(); + // #i69485# lock fields to prevent access to the result set while calculating layout + rWorkShell.LockExpFlds(); // create a layout rWorkShell.CalcLayout(); rWorkShell.UnlockExpFlds(); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index eb1f75d57979..cf13e0911546 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -858,7 +858,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame()->Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); @@ -1244,7 +1244,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) //now extract a document from the target document SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); - SfxViewFrame* pTempFrame = SfxViewFrame::CreateViewFrame( *xTempDocShell, 0, TRUE ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); // pTempFrame->GetFrame()->Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index a79e67eec31c..e82abfe2788e 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -309,7 +309,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS } // Dokumenttitel setzen - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, nViewId, !bShow ); + SfxViewFrame* pFrame = bShow ? SfxViewFrame::LoadDocument( *xDocSh, nViewId ) : SfxViewFrame::LoadHiddenDocument( *xDocSh, nViewId ); String aDocTitle(SW_RES( STR_GLOSSARY )); aDocTitle += ' '; aDocTitle += sLongName; diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 44c5d011fe75..7268679301b7 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -429,7 +429,7 @@ SwXMailMerge::SwXMailMerge() : SwDocShell *pDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD ); xDocSh = pDocShell; xDocSh->DoInitNew( 0 ); - SfxViewFrame *pFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView *pView = (SwView*) pFrame->GetViewShell(); pView->AttrChangedNotify( &pView->GetWrtShell() );//Damit SelectShell gerufen wird. diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 1336e01e55f4..7a6dafbfc2d2 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1194,7 +1194,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption ::vos::OGuard aGuard(Application::GetSolarMutex()); if(IsValid()) { - SfxViewFrame* pFrame = SfxViewFrame::CreateViewFrame( *pDocShell, 7, sal_True ); + SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 ); SfxRequest aReq(FN_PRINT_PAGEPREVIEW, SFX_CALLMODE_SYNCHRON, pDocShell->GetDoc()->GetAttrPool()); aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, sal_True)); @@ -2619,7 +2619,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( if( !pWrtShell ) { //create a hidden view to be able to export as PDF also in print preview - m_pHiddenViewFrame = SfxViewFrame::CreateViewFrame( *pRenderDocShell, 2, TRUE ); + m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, 2 ); SwView* pSwView = (SwView*) m_pHiddenViewFrame->GetViewShell(); pWrtShell = pSwView->GetWrtShellPtr(); } diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 6197bb489d61..15551b62b962 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -930,7 +930,7 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt); - SfxViewFrame* pDocFrame = SfxViewFrame::CreateViewFrame( *xDocSh, 0, TRUE ); + SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. SwWrtShell* pSh = pDocView->GetWrtShellPtr(); -- cgit From e68cf1abaf8d5545fe771ccafd92ce4b88989136 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 14 Dec 2009 12:55:05 +0100 Subject: autorecovery: replace some SfxFrameItem occurences by SfxUnoFrameItem As a consequence, replace some occurences of SfxFrame with XFrame. This allows getting rid of yet some more Sfx code in the (SFX) doc loader. Also, it prevents premature creations of SfxFrame instances during loading, since now the frame is really created when it is needed only. --- sw/source/ui/app/apphdl.cxx | 2 +- sw/source/ui/app/applab.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 8b1d64cf3f5d..1fe69e88eacd 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -959,7 +959,7 @@ void NewXForms( SfxRequest& rReq ) static_cast( &xDocSh )->GetDoc()->initXForms( true ); // load document into frame - SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); // set return value diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 3af0fe9369e1..122217501b64 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,7 +237,7 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - SFX_REQUEST_ARG( rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME, FALSE ); + SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); -- cgit From 9688479e09b20ba09a419931af59c04177e4373e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Dec 2009 23:07:57 +0100 Subject: autorecovery: SfxViewFrame's SfxFrame is a reference now, no pointer (it can never be NULL) --- sw/source/ui/app/appenv.cxx | 2 +- sw/source/ui/app/apphdl.cxx | 10 +++++----- sw/source/ui/app/applab.cxx | 2 +- sw/source/ui/app/docsh2.cxx | 2 +- sw/source/ui/app/swmodul1.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 6 +++--- sw/source/ui/dbui/mailmergewizard.cxx | 2 +- sw/source/ui/dbui/mmoutputpage.cxx | 6 +++--- sw/source/ui/dialog/macassgn.cxx | 2 +- sw/source/ui/docvw/edtdd.cxx | 2 +- sw/source/ui/docvw/edtwin.cxx | 2 +- sw/source/ui/docvw/romenu.cxx | 2 +- sw/source/ui/fldui/fldedt.cxx | 2 +- sw/source/ui/fmtui/tmpdlg.cxx | 2 +- sw/source/ui/frmdlg/frmdlg.cxx | 2 +- sw/source/ui/lingu/olmenu.cxx | 6 +++--- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/glshell.cxx | 2 +- sw/source/ui/misc/insfnote.cxx | 2 +- sw/source/ui/misc/srtdlg.cxx | 2 +- sw/source/ui/shells/annotsh.cxx | 2 +- sw/source/ui/shells/basesh.cxx | 6 +++--- sw/source/ui/shells/drwtxtsh.cxx | 2 +- sw/source/ui/shells/tabsh.cxx | 2 +- sw/source/ui/shells/textsh.cxx | 2 +- sw/source/ui/shells/txtattr.cxx | 2 +- sw/source/ui/uiview/pview.cxx | 4 ++-- sw/source/ui/uiview/view.cxx | 12 ++++++------ sw/source/ui/uiview/view2.cxx | 2 +- sw/source/ui/uiview/viewling.cxx | 5 ++--- sw/source/ui/uiview/viewmdi.cxx | 6 +++--- sw/source/ui/uiview/viewport.cxx | 8 ++++---- sw/source/ui/uno/unodispatch.cxx | 3 +-- sw/source/ui/utlui/navipi.cxx | 2 +- sw/source/ui/utlui/numfmtlb.cxx | 2 +- sw/source/ui/utlui/uitool.cxx | 2 +- sw/source/ui/wrtsh/wrtsh1.cxx | 2 +- 37 files changed, 61 insertions(+), 63 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index 2ee6fb9e7db8..5388924434ac 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -520,7 +520,7 @@ static USHORT nTitleNo = 0; if (nMode == ENV_NEWDOC) { - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); if ( rItem.aAddrText.indexOf('<') >= 0 ) { diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 1fe69e88eacd..e6a9f33eb730 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -243,7 +243,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL) if( pViewShell->ISA(SwView) ) { pNewView = PTR_CAST(SwView,pViewShell); - pNewView->GetViewFrame()->GetFrame()->Appear(); + pNewView->GetViewFrame()->GetFrame().Appear(); } else { @@ -477,7 +477,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM { SwView* pTargetView = m_pMMConfig->GetTargetView(); uno::Reference< frame::XFrame > xFrame = - m_pView->GetViewFrame()->GetFrame()->GetFrameInterface(); + m_pView->GetViewFrame()->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_False); DBG_ASSERT(pTargetView, "No target view has been created"); if(pTargetView) @@ -523,7 +523,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM { m_pView2Close = pTargetView; pTargetView->GetViewFrame()->GetTopViewFrame()->GetWindow().Hide(); - pSourceView->GetViewFrame()->GetFrame()->AppearWithUpdate(); + pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate(); // the current view has be be set when the target is destroyed m_pView = pSourceView; m_pMMConfig->SetTargetView(0); @@ -562,7 +562,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM if(pDocShell->HasName() && !pDocShell->IsModified()) m_pMMConfig->GetSourceView()->GetViewFrame()->DoClose(); else - m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->Appear(); + m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().Appear(); } ExecutionFinished( true ); break; @@ -596,7 +596,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, CancelHdl, AbstractMailMergeWizard*, EMPTY m_pMMConfig->SetTargetView(0); } if(m_pMMConfig->GetSourceView()) - m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame()->AppearWithUpdate(); + m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate(); m_pMMConfig->Commit(); delete m_pMMConfig; diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 122217501b64..cf62e3954d9a 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -257,7 +257,7 @@ static sal_uInt16 nBCTitleNo = 0; } xDocSh->SetTitle( aTmp ); - pViewFrame->GetFrame()->Appear(); + pViewFrame->GetFrame().Appear(); // Shell ermitteln SwWrtShell *pSh = pNewView->GetWrtShellPtr(); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 8d62d65d0b12..2fbdc79653f3 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -710,7 +710,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bOnly = FALSE; else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell())) { - pTmpFrm->GetFrame()->Appear(); + pTmpFrm->GetFrame().Appear(); bFound = TRUE; } if( bFound && !bOnly ) diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 863ef3c22f76..a95241689b9c 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -358,7 +358,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules() void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/) { - Reference xFrame = rView.GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface(); Reference xDP(xFrame, uno::UNO_QUERY); uno::Reference xBeamerFrame = xFrame->findFrame( diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 9ed35bf00e6a..ce8646239425 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3186,11 +3186,11 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, SfxViewFrame* pTargetFrame = SfxViewFrame::LoadHiddenDocument( *xTargetDocShell, 0 ); //the created window has to be located at the same position as the source window - Window& rTargetWindow = pTargetFrame->GetFrame()->GetWindow(); - Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame()->GetWindow(); + Window& rTargetWindow = pTargetFrame->GetFrame().GetWindow(); + Window& rSourceWindow = rSourceView.GetViewFrame()->GetFrame().GetWindow(); rTargetWindow.SetPosPixel(rSourceWindow.GetPosPixel()); -// pTargetFrame->GetFrame()->Appear(); +// pTargetFrame->GetFrame().Appear(); SwView* pTargetView = static_cast( pTargetFrame->GetViewShell() ); rMMConfig.SetTargetView(pTargetView); //initiate SelectShell() to create sub shells diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 84dba4d979e6..84dd10273f0e 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -310,7 +310,7 @@ void SwMailMergeWizard::CreateTargetDocument() MergeDocuments( m_rConfigItem, *GetSwView() ); m_rConfigItem.SetMergeDone(); if( m_rConfigItem.GetTargetView() ) - m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame()->Appear(); + m_rConfigItem.GetTargetView()->GetViewFrame()->GetFrame().Appear(); } /*-- 23.08.2004 08:51:36--------------------------------------------------- diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index cf13e0911546..db8f1e6d02ea 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -695,7 +695,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) { SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame(); uno::Reference< frame::XFrame > xFrame = - pSourceViewFrm->GetFrame()->GetFrameInterface(); + pSourceViewFrm->GetFrame().GetFrameInterface(); xFrame->getContainerWindow()->setVisible(sal_True); pSourceViewFrm->GetDispatcher()->Execute(SID_SAVEDOC, SFX_CALLMODE_SYNCHRON); xFrame->getContainerWindow()->setVisible(sal_False); @@ -859,7 +859,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); -// pTempFrame->GetFrame()->Appear(); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; @@ -1245,7 +1245,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) ); xTempDocShell->DoInitNew( 0 ); SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); -// pTempFrame->GetFrame()->Appear(); +// pTempFrame->GetFrame().Appear(); SwView* pTempView = static_cast( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 0c052223abcf..be533b05b0ad 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -152,7 +152,7 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh, SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( pParent, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 43efb040670f..b108ecbece76 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -518,7 +518,7 @@ IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG ) ReleaseMouse(); bFrmDrag = FALSE; - if ( rView.GetViewFrame() && rView.GetViewFrame()->GetFrame() ) + if ( rView.GetViewFrame() ) { bExecuteDrag = TRUE; StartExecuteDrag(); diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 7d8e38443ca0..3b8cf9746c39 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4710,7 +4710,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { SwWrtShell &rSh = rView.GetWrtShell(); - if ( !rView.GetViewFrame() || !rView.GetViewFrame()->GetFrame() ) + if ( !rView.GetViewFrame() ) { //Wenn der ViewFrame in Kuerze stirbt kein Popup mehr! Window::Command(rCEvt); diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index 598cf064c7b3..d9bd5ac8f41e 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -218,7 +218,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : else EnableItem( MN_READONLY_LOADGRAPHIC, FALSE ); - BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame()->GetParentFrame(); + BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); EnableItem( MN_READONLY_RELOAD_FRAME, bReloadFrame ); EnableItem( MN_READONLY_RELOAD, !bReloadFrame); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index c0ee8f2e0a98..6465e518418f 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -410,7 +410,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_ADDR ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 4c6f35341e30..3d451da20620 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -570,7 +570,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) SfxAllItemSet aNewSet(*aSet.GetPool()); aNewSet.Put( SwMacroAssignDlg::AddEvents(MACASSGN_ALLFRM) ); if ( pWrtShell ) - rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index c4b463baa297..914788a36e7a 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -196,7 +196,7 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) aNewSet.Put( SwMacroAssignDlg::AddEvents( DLG_FRM_GRF == m_nDlgType ? MACASSGN_GRAPHIC : DLG_FRM_OLE == m_nDlgType ? MACASSGN_OLE : MACASSGN_FRMURL ) ); if ( m_pWrtShell ) - rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame()->GetFrameInterface() ); + rPage.SetFrame( m_pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() ); rPage.PageCreated(aNewSet); break; } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 771836c6ccd5..55afd7e55566 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -279,7 +279,7 @@ USHORT SwSpellPopup::fillLangPopupMenu( //6--all languages used in current document uno::Reference< com::sun::star::frame::XModel > xModel; - uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface()->getController(), uno::UNO_QUERY ); + uno::Reference< com::sun::star::frame::XController > xController( pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController(), uno::UNO_QUERY ); if ( xController.is() ) xModel = xController->getModel(); @@ -580,7 +580,7 @@ bGrammarResults(false) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); @@ -714,7 +714,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) nNumLanguageDocEntries = fillLangPopupMenu( pMenu, MN_LANGUAGE_ALL_TEXT_START, aSeq, pWrtSh, 2 ); EnableItem( MN_LANGUAGE_ALL_TEXT, true ); */ - uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); Image rImg = ::GetImage( xFrame, ::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False, Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index ef368f680378..f3b287156bf7 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -661,7 +661,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) const SfxPoolItem* pItem; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( this, aSet, - pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), SID_EVENTCONFIG ); + pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && SFX_ITEM_SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, sal_False, &pItem ) ) { diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index e82abfe2788e..4508d03b8c8e 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -346,7 +346,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS xDocSh->GetDoc()->DoUndo( bDoesUndo ); xDocSh->GetDoc()->ResetModified(); if ( bShow ) - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); delete pGroup; } diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index d659ceb0b6f1..c0c020141148 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -176,7 +176,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aAllSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if (RET_OK == pDlg->Execute()) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 0b2ff55c7c41..3224fca700d8 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -396,7 +396,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG ) SfxAllItemSet aSet( rSh.GetAttrPool() ); aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) ); SfxAbstractDialog* pMap = pFact->CreateSfxDialog( &aDelimPB, aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pMap->Execute() ) { SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 1a34e2972956..6754d3d3698d 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1557,7 +1557,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 9f5ee6195e81..41f462f06dfc 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -2548,7 +2548,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SvxBrushItem aBrush(RES_BACKGROUND); rSh.GetBoxBackground( aBrush ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); aSet.Put( aBrush ); @@ -2567,7 +2567,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetFlyFrmAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) @@ -2582,7 +2582,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetCurAttr( aSet ); pDlg = pFact->CreateSfxDialog( pMDI, aSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 9f1d49ebe067..f62256a5c674 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -816,7 +816,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) // Wenn Zeichen selektiert ist kann es angezeigt werden SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, - rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) { diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 7ba4d0b8e954..5bdff0ffc1b8 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -736,7 +736,7 @@ void SwTableShell::Execute(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet, - pView->GetViewFrame()->GetFrame()->GetFrameInterface(), + pView->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 7e38c1297d0b..f26730b31be0 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1149,7 +1149,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet, - GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pDlg->Execute() ) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 8e30123a192b..29a3669a9277 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -564,7 +564,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aSet, - rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), DLG_SWDROPCAPS ); + rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), DLG_SWDROPCAPS ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) { diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 033c1fe27247..1632a0745ea6 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1822,7 +1822,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): pPageUpBtn(0), pPageDownBtn(0), pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(), - pViewFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), mnPageCount( 0 ), // OD 09.01.2003 #106334# mbResetFormDesignMode( false ), @@ -1913,7 +1913,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): { // es gibt noch eine weitere Sicht auf unser Dokument, also // aktiviere dieses - pFrame->GetFrame()->Appear(); + pFrame->GetFrame().Appear(); break; } */} diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index cb1e7799bd6c..4e5b87dd5cfe 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -173,7 +173,7 @@ inline SfxDispatcher &SwView::GetDispatcher() void SwView::ImpSetVerb( int nSelType ) { sal_Bool bResetVerbs = bVerbsActive; - if ( !GetViewFrame()->GetFrame()->IsInPlace() && + if ( !GetViewFrame()->GetFrame().IsInPlace() && (nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType ) { if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) ) @@ -755,7 +755,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pFormShell(0), pHScrollbar(0), pVScrollbar(0), - pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )), + pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )), pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS | @@ -939,7 +939,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) pVRuler->SetActive( sal_True ); SfxViewFrame* pViewFrame = GetViewFrame(); - if( pViewFrame->GetFrame()->GetParentFrame()) + if( pViewFrame->GetFrame().GetParentFrame()) { aUsrPref.SetViewHRuler(sal_False); aUsrPref.SetViewVRuler(sal_False); @@ -1046,10 +1046,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) /*uno::Reference< awt::XWindow > aTmpRef; - _pFrame->GetFrame()->GetFrameInterface()->setComponent( aTmpRef, + _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef, pViewImpl->GetUNOObject_Impl());*/ - uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN); @@ -1611,7 +1611,7 @@ void SwView::ShowCursor( FASTBOOL bOn ) ErrCode SwView::DoVerb( long nVerb ) { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { SwWrtShell &rSh = GetWrtShell(); const int nSel = rSh.GetSelectionType(); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 4aa00311c5bd..44975fe13b26 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1051,7 +1051,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); - SfxHelp::OpenHelpAgent( pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); + SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE, diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 588c30a9844d..5c1b1a37a9fd 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -842,10 +842,9 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) else { SfxViewFrame *pSfxViewFrame = GetViewFrame(); - SfxFrame *pSfxFrame = pSfxViewFrame? pSfxViewFrame->GetFrame() : 0; uno::Reference< frame::XFrame > xFrame; - if (pSfxFrame) - xFrame = pSfxFrame->GetFrameInterface(); + if ( pSfxViewFrame ) + xFrame = pSfxViewFrame->GetFrame().GetFrameInterface(); com::sun::star::util::URL aURL; uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory(), uno::UNO_QUERY ); diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 702c0790012f..52509b2956e1 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -181,7 +181,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, nFac = Max( long( MINZOOM ), nFac ); SwViewOption aOpt( *pOpt ); - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { //MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen //View updaten. @@ -264,7 +264,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly ) ACT_KONTEXT(pWrtShell); - if ( !GetViewFrame()->GetFrame()->IsInPlace() && !bViewOnly ) + if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly ) { const BOOL bWeb = 0 != PTR_CAST(SwWebView, this); SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb); @@ -350,7 +350,7 @@ void SwView::CreatePageButtons(BOOL bShow) pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP); pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE ); pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN); - Reference< XFrame > xFrame = GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); pNaviBtn = new SwNaviImageButton(pMDI, xFrame ); pNaviBtn->SetHelpId(HID_SCRL_NAVI); Link aLk( LINK( this, SwView, BtnPage ) ); diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 1cc886f5d204..d10a990d8e71 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -224,7 +224,7 @@ aDocSz = rSz; SetVisArea( aNewVisArea, FALSE ); if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel && - !GetViewFrame()->GetFrame()->IsInPlace()) + !GetViewFrame()->GetFrame().IsInPlace()) OuterResizePixel( Point(), GetViewFrame()->GetWindow().GetOutputSizePixel() ); } @@ -358,7 +358,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar ) void SwView::CheckVisArea() { pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) && - !GetViewFrame()->GetFrame()->IsInPlace() ); + !GetViewFrame()->GetFrame().IsInPlace() ); if ( IsDocumentBorder() ) { if ( aVisArea.Left() != DOCUMENTBORDER || @@ -735,7 +735,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) { // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, // so we dont must do it agin. -// if(!GetViewFrame()->GetFrame()->IsInPlace()) +// if(!GetViewFrame()->GetFrame().IsInPlace()) // S F X_BINDINGS().Update(FN_STAT_PAGE); //QuickHelp: @@ -1056,7 +1056,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) Size aSz( rSize ); SvBorder aBorder; CalcAndSetBorderPixel( aBorder, TRUE ); - if ( GetViewFrame()->GetFrame()->IsInPlace() ) + if ( GetViewFrame()->GetFrame().IsInPlace() ) { Size aViewSize( aSz ); Point aViewPos( rOfst ); diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx index 81849559cfc2..ba0f490da4ca 100644 --- a/sw/source/ui/uno/unodispatch.cxx +++ b/sw/source/ui/uno/unodispatch.cxx @@ -59,8 +59,7 @@ const sal_Char* cInternalDBChangeNotification = ".uno::Writer/DataSourceChanged" SwXDispatchProviderInterceptor::SwXDispatchProviderInterceptor(SwView& rVw) : m_pView(&rVw) { - SfxFrame* pFrame = m_pView->GetViewFrame()->GetFrame(); - uno::Reference< frame::XFrame> xUnoFrame = pFrame->GetFrameInterface(); + uno::Reference< frame::XFrame> xUnoFrame = m_pView->GetViewFrame()->GetFrame().GetFrameInterface(); m_xIntercepted = uno::Reference< frame::XDispatchProviderInterception>(xUnoFrame, uno::UNO_QUERY); if(m_xIntercepted.is()) { diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 78fc237f8b20..6c4636f18f44 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -503,7 +503,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus { // SfxBindings& rBind = GetCreateView()->GetViewFrame()->GetBindings(); // rBind.ENTERREGISTRATIONS(); - Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame()->GetFrameInterface(); + Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface(); SwScrollNaviPopup* pPopup = new SwScrollNaviPopup(FN_SCROLL_NAVIGATION, xFrame ); diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 5a0030d9dd85..ac70127653b0 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -438,7 +438,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox ) DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aCoreSet, - GetView()->GetViewFrame()->GetFrame()->GetFrameInterface(), + GetView()->GetViewFrame()->GetFrame().GetFrameInterface(), RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index cb6a3888d45f..6a7b6885bded 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -759,7 +759,7 @@ bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId } if(sCommand.Len()) { - uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame()->GetFrameInterface(); + uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame().GetFrameInterface(); uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY ); util::URL aURL; aURL.Complete = sCommand; diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index cd6bb82739ca..66c584fea88d 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -645,7 +645,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm void SwWrtShell::LaunchOLEObj( long nVerb ) { if ( GetCntType() == CNT_OLE && - !GetView().GetViewFrame()->GetFrame()->IsInPlace() ) + !GetView().GetViewFrame()->GetFrame().IsInPlace() ) { svt::EmbeddedObjectRef& xRef = GetOLEObject(); ASSERT( xRef.is(), "OLE not found" ); -- cgit From 857a0d334f01134784a983f9c50e4f920b41e2e0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 15 Dec 2009 23:31:21 +0100 Subject: autorecovery: Sfx(View)Frame::GetTopFrame now also returning a SfxFrame& instead of an SfxFrame* --- sw/source/ui/chrdlg/chardlg.cxx | 4 ++-- sw/source/ui/shells/basesh.cxx | 2 +- sw/source/ui/shells/frmsh.cxx | 2 +- sw/source/ui/shells/grfsh.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 2aff6e0cf4d1..e8246d51c03a 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -244,8 +244,8 @@ SwCharURLPage::SwCharURLPage( Window* pParent, ::FillCharStyleListBox(aNotVisitedLB, pView->GetDocShell()); TargetList* pList = new TargetList; - const SfxFrame* pFrame = pView->GetViewFrame()->GetTopFrame(); - pFrame->GetTargetList(*pList); + const SfxFrame& rFrame = pView->GetViewFrame()->GetTopFrame(); + rFrame.GetTargetList(*pList); USHORT nCount = (USHORT)pList->Count(); if( nCount ) { diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 41f462f06dfc..879a2c3afdca 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -192,7 +192,7 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh ) void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType ? rSh.GetIMapInventor() : 0; TargetList* pList = new TargetList; - rSh.GetView().GetViewFrame()->GetTopFrame()->GetTargetList(*pList); + rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList); SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index f7957a66077a..6c311a7c242e 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -453,7 +453,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView())); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) )); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 7203d9c91ebb..203b80fc8c8c 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -228,7 +228,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio())); aSet.Put(SfxBoolItem( SID_ATTR_GRAF_KEEP_ZOOM, aUsrPref.IsGrfKeepZoom())); - aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); -- cgit From ade249bf2b4be34133fc9d86939b66e8cdfe6559 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 09:48:23 +0100 Subject: autorecovery: removed a few unused slot IDs --- sw/sdi/_docsh.sdi | 4 ---- sw/source/ui/app/docsh2.cxx | 12 ------------ 2 files changed, 16 deletions(-) (limited to 'sw') diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi index 9154e6ce2578..15ffb44b1399 100644 --- a/sw/sdi/_docsh.sdi +++ b/sw/sdi/_docsh.sdi @@ -78,10 +78,6 @@ interface BaseTextDocument : OfficeDocument ExecMethod = Execute ; ] - SID_MAIL_PREPAREEXPORT - [ - ExecMethod = Execute ; - ] SID_MAIL_EXPORT_FINISHED [ ExecMethod = Execute; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 2fbdc79653f3..8dfabb7ac969 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1203,18 +1203,6 @@ void SwDocShell::Execute(SfxRequest& rReq) } break; - case SID_MAIL_PREPAREEXPORT: - { - //pWrtShell is not set in page preview - if(pWrtShell) - pWrtShell->StartAllAction(); - pDoc->UpdateFlds( NULL, false ); - pDoc->EmbedAllLinks(); - pDoc->RemoveInvisibleContent(); - if(pWrtShell) - pWrtShell->EndAllAction(); - } - break; case SID_MAIL_EXPORT_FINISHED: { if(pWrtShell) -- cgit From dc0e0e62c498846357d2881f73b53472b57c1c9b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 12:34:33 +0100 Subject: autorecovery: ensure that unsaved XML forms are properly recovered, by properly respecting the 'Hidden' load parameter --- sw/source/ui/app/apphdl.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index e6a9f33eb730..26299a37fcea 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -959,8 +959,7 @@ void NewXForms( SfxRequest& rReq ) static_cast( &xDocSh )->GetDoc()->initXForms( true ); // load document into frame - SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); - SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); + SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); // set return value rReq.SetReturnValue( SfxVoidItem( rReq.GetSlot() ) ); -- cgit From d46f080c23f69bb729173a23aa12b936b78b8803 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 18 Dec 2009 13:44:13 +0100 Subject: autorecovery: oops, *this* version of LoadDocumentIntoFrame was just removed --- sw/source/ui/app/applab.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index cf62e3954d9a..572236555d50 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -237,8 +237,7 @@ static sal_uInt16 nBCTitleNo = 0; pDocSh->getIDocumentDeviceAccess()->setJobsetup(pPrt->GetJobSetup()); } - SFX_REQUEST_ARG( rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE ); - SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *xDocSh, pFrameItem ); + SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); SwView *pNewView = (SwView*) pViewFrame->GetViewShell(); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird. -- cgit From 1ab97e6cbe7357c51c485be667aa23c191ccda47 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 5 Jan 2010 14:44:36 +0100 Subject: autorecovery: method - no call of method for window of zero size. --- sw/source/ui/uiview/pview.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 1632a0745ea6..5725ec4ed7cf 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -2090,8 +2090,11 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize ) //Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen //Scrollrange immer die halbe Hoehe der VisArea abgezogen wird. - if ( pVScrollbar ) - ScrollDocSzChg(); + if ( pVScrollbar && + aTmpSize.Width() > 0 && aTmpSize.Height() > 0 ) + { + ScrollDocSzChg(); + } } /*-------------------------------------------------------------------- -- cgit From d1233ab8290a14cea18cf78f6712767a02291456 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 6 Jan 2010 21:34:53 +0100 Subject: autorecovery: allow creating SFX-based documents which do not support the XDocumentRecovery interface For this purpose, the SFX document factory methods got an additional parameter respectively flag ("DocumentRecoverySupport" resp. SFXMODEL_DISABLE_DOCUMENT_RECOVERY). This flag is used by database documents to remove the interface from sub documents (aka forms/reports). In this course, some of the functionality around those SFXMODELL_* flags, previously duplicated in all applications, has been consolidated into a new SfxObjectShell constructor. --- sw/inc/docsh.hxx | 3 ++- sw/source/ui/app/docshini.cxx | 24 +++++++++++++++++++++--- sw/source/ui/uno/unodoc.cxx | 4 +--- 3 files changed, 24 insertions(+), 7 deletions(-) (limited to 'sw') diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 6ed3f6d652bd..6d54542c1075 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -154,7 +154,8 @@ public: static rtl::OUString GetEventName( sal_Int32 nId ); //Das Doc wird fuer SO-Datenaustausch benoetigt! - SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, sal_Bool _bScriptingSupport = sal_True ); + SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED ); + SwDocShell( const sal_uInt64 i_nSfxCreationFlags ); SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD ); ~SwDocShell(); diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 630d836c785b..9ec18607a71e 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #ifndef _OFA_MISCCFG_HXX //autogen #include #endif @@ -400,7 +401,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) --------------------------------------------------------------------*/ -SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) : +SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) : SfxObjectShell ( eMode ), pDoc(0), pFontList(0), @@ -411,8 +412,25 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) bInUpdateFontList(false) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); - if ( !_bScriptingSupport ) - SetHasNoBasic(); + Init_Impl(); +} + +/*-------------------------------------------------------------------- + Beschreibung: Ctor / Dtor + --------------------------------------------------------------------*/ + + +SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) : + SfxObjectShell ( i_nSfxCreationFlags ), + pDoc(0), + pFontList(0), + pView( 0 ), + pWrtShell( 0 ), + pOLEChildList( 0 ), + nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG), + bInUpdateFontList(false) +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); Init_Impl(); } diff --git a/sw/source/ui/uno/unodoc.cxx b/sw/source/ui/uno/unodoc.cxx index dc801a8abee5..65cdecc0ca7a 100644 --- a/sw/source/ui/uno/unodoc.cxx +++ b/sw/source/ui/uno/unodoc.cxx @@ -69,9 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance( { ::vos::OGuard aGuard( Application::GetSolarMutex() ); SwDLL::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 SwDocShell( eCreateMode, bScriptSupport ); + SfxObjectShell* pShell = new SwDocShell( _nCreationFlags ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } -- cgit From 9d43ce3490eb06668cd7fa6e7d29b7a7ced18957 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 8 Jan 2010 09:39:22 +0100 Subject: autorecovery: need to compile some files (which indirectly include sfxbasemodel.hxx) with exception support --- sw/source/ui/app/makefile.mk | 1 + sw/source/ui/shells/makefile.mk | 1 + 2 files changed, 2 insertions(+) (limited to 'sw') diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk index d3a4cd242d30..80af904aa731 100644 --- a/sw/source/ui/app/makefile.mk +++ b/sw/source/ui/app/makefile.mk @@ -73,6 +73,7 @@ SLOFILES = \ EXCEPTIONSFILES= \ $(SLO)$/docsh.obj \ $(SLO)$/docst.obj \ + $(SLO)$/docshini.obj \ $(SLO)$/swmodule.obj \ $(SLO)$/swmodul1.obj \ $(SLO)$/apphdl.obj \ diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index 2e4a96c990bf..a3317235b746 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -77,6 +77,7 @@ SLOFILES = \ $(SLO)$/txtnum.obj EXCEPTIONSFILES = \ + $(SLO)$/basesh.obj \ $(SLO)$/annotsh.obj \ $(SLO)$/drwtxtsh.obj \ $(SLO)$/textsh.obj \ -- cgit From bd711a0e5e5e0e94cc4cb78251f50de205aeb485 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Feb 2010 21:32:33 +0100 Subject: autorecovery: more sophisticated configuration data for interaction handlers The generic css.task.InteractionHandler implementation in module uui is now able to instantiate "sub handlers", i.e. components to delegate a request to, based on the type of the request, and some configuration data. The "old" (and now deprecated) configuration scheme at org.openoffice.ucb.InteractionHandler did not contain type information, so any handlers registered there were always called when no default implementation for a given request was available. The "new" configuration scheme at org.openoffice.Interaction contains UNO type information. That is, a given handler implementation can declare itself responsible for an arbitrary set of UNO types, and for each of those types, whether it is also responsible for sub types. The generic interaction handler implementation uses this configuration data, when it encounteres an interaction request it cannot fullfill itself, to instantiate a component to delegate the request to. As with the "old" data, such a component is required to support the css.task.XInteractionHandler2 interface. Also, if it supports css.lang.XInitialization, then it will be initialized with a name-value pair, the name being "Parent", the value being the XWindow interface of the parent window for any message boxes. As an examplary implementation for this feature, the css.sdb.InteractionHandler has been deprecated. Now the css.sdb.DatabaseInteractionHandler is reponsible for database-related interactions, and the new configuration scheme is pre-filled with data assigning this responsibility. Consequently, a lot of places previously creating an css.sdb.InteractionHandler have been modified to create the default css.task.InteractionHandler. --- sw/source/ui/dbui/addresslistdialog.cxx | 2 +- sw/source/ui/dbui/dbmgr.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index ec8ad0dc1473..858a4b5a63b2 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -583,7 +583,7 @@ void SwAddressListDialog::DetectTablesAndQueries( uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); uno::Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) ); } if(pUserData->xConnection.is()) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 1f72bbf1fe84..3d8eb202fbb4 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1949,7 +1949,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData { rxSource.set(xComplConnection,UNO_QUERY); Reference< XInteractionHandler > xHandler( - xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY); + xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY); xConnection = xComplConnection->connectWithCompletion( xHandler ); } } @@ -3100,7 +3100,7 @@ uno::Reference SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat if ( xRowSet.is() ) { - uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.sdb.InteractionHandler")), UNO_QUERY); + uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY); xRowSet->executeWithCompletion(xHandler); } xResultSet = uno::Reference(xRowSet, UNO_QUERY); -- cgit From b8ec51cb99a7c38644b418cc9f52bf820c2fcff2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 4 Feb 2010 14:13:58 +0100 Subject: autorecovery: post-rebase build problems solved --- sw/source/core/doc/docnew.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 9f572f017c09..3120a74af793 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -172,12 +172,12 @@ void StartGrammarChecking( SwDoc &rDoc ) // check for a visible view bool bVisible = false; const SwDocShell *pDocShell = rDoc.GetDocShell(); - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, 0, sal_False ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); while (pFrame && !bVisible) { if (pFrame->IsVisible()) bVisible = true; - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, 0, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); } //!! only documents with visible views need to be checked -- cgit