summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-15 23:07:57 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-15 23:07:57 +0100
commit89f6e13ee257f3ceccdae1ca77de7d61e50e7bc4 (patch)
treec2838f23eaab8a88e99ea53fae43edbd9da3e902
parentf75a050a0f7761062d16f4ed4ea270a21dfc9fc6 (diff)
autorecovery: SfxViewFrame's SfxFrame is a reference now, no pointer (it can never be NULL)
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx18
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx2
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx6
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx7
-rw-r--r--sc/source/ui/vba/vbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbawindow.cxx4
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx17
-rw-r--r--sc/source/ui/view/gridwin.cxx28
-rw-r--r--sc/source/ui/view/tabview.cxx19
-rw-r--r--sc/source/ui/view/tabview3.cxx14
-rw-r--r--sc/source/ui/view/tabview5.cxx14
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx29
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx2
24 files changed, 79 insertions, 107 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 3ed9b4062a9d..f766dbb91abd 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -966,18 +966,14 @@ void ScChildrenShapes::FillSelectionSupplier() const
SfxViewFrame* pViewFrame = mpViewShell->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(pViewFrame->GetFrame().GetController(), uno::UNO_QUERY);
+ if (xSelectionSupplier.is())
{
- xSelectionSupplier = uno::Reference<view::XSelectionSupplier>(pFrame->GetController(), uno::UNO_QUERY);
- if (xSelectionSupplier.is())
- {
- if (mpAccessibleDocument)
- xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
- uno::Reference<drawing::XShapes> xShapes (xSelectionSupplier->getSelection(), uno::UNO_QUERY);
- if (xShapes.is())
- mnShapesSelected = xShapes->getCount();
- }
+ if (mpAccessibleDocument)
+ xSelectionSupplier->addSelectionChangeListener(mpAccessibleDocument);
+ uno::Reference<drawing::XShapes> xShapes (xSelectionSupplier->getSelection(), uno::UNO_QUERY);
+ if (xShapes.is())
+ mnShapesSelected = xShapes->getCount();
}
}
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 09e4dd7aa4af..b2c8335d6c11 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -89,7 +89,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram
if ( !pFrame || !rParam.bImport )
return;
- uno::Reference<frame::XFrame> xFrame = pFrame->GetFrame()->GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = pFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 63f958763479..05bc18249973 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -338,7 +338,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
com::sun::star::uno::Reference < com::sun::star::frame::XFrame > xFrame;
if (GetViewShell())
- xFrame = GetViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface();
+ xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pMacroDlg = pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG );
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index fadb8270b6a6..59e279d582ba 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -313,7 +313,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt)
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
{
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle )
{
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 79c466f9f2c3..f2595d53c956 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -393,7 +393,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
BOOL bReturn = FuDraw::MouseButtonUp(rMEvt);
// BOOL bOle = pViewShell->GetViewData()->IsOle();
- BOOL bOle = pViewShell->GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace();
if (aDragTimer.IsActive() )
{
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 1a3cf1f29dc1..96dba779a406 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -105,7 +105,7 @@ void ScFormulaReferenceHelper::enableInput( BOOL bEnable )
while( pFrame )
{
// #71577# enable everything except InPlace, including bean frames
- if ( !pFrame->GetFrame()->IsInPlace() )
+ if ( !pFrame->GetFrame().IsInPlace() )
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell,p);
@@ -601,7 +601,7 @@ void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds)
while( pFrame )
{
// #71577# enable everything except InPlace, including bean frames
- if ( !pFrame->GetFrame()->IsInPlace() )
+ if ( !pFrame->GetFrame().IsInPlace() )
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell,p);
@@ -641,7 +641,7 @@ void lcl_InvalidateWindows()
while( pFrame )
{
// #71577# enable everything except InPlace, including bean frames
- if ( !pFrame->GetFrame()->IsInPlace() )
+ if ( !pFrame->GetFrame().IsInPlace() )
{
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell,p);
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 1e2309dd2c0a..ebb0f8022f94 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -68,9 +68,7 @@ uno::Reference<view::XSelectionSupplier> lcl_GetSelectionSupplier( SfxViewShell*
SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
- return uno::Reference<view::XSelectionSupplier>( pFrame->GetController(), uno::UNO_QUERY );
+ return uno::Reference<view::XSelectionSupplier>( pViewFrame->GetFrame().GetController(), uno::UNO_QUERY );
}
}
return uno::Reference<view::XSelectionSupplier>();
@@ -84,8 +82,7 @@ ScDispatchProviderInterceptor::ScDispatchProviderInterceptor(ScTabViewShell* pVi
{
if ( pViewShell )
{
- SfxFrame* pFrame = pViewShell->GetViewFrame()->GetFrame();
- m_xIntercepted.set(uno::Reference<frame::XDispatchProviderInterception>(pFrame->GetFrameInterface(), uno::UNO_QUERY));
+ m_xIntercepted.set(uno::Reference<frame::XDispatchProviderInterception>(pViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY));
if (m_xIntercepted.is())
{
comphelper::increment( m_refCount );
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index 353c036393c2..1c886fd17db7 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -521,7 +521,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
{
if ( bPreview )
{
- if ( !pViewFrame->GetFrame()->IsInPlace() )
+ if ( !pViewFrame->GetFrame().IsInPlace() )
{
SC_MOD()->InputEnterHandler();
pViewFrame->GetDispatcher()->Execute( SID_VIEWSHELL1, SFX_CALLMODE_SYNCHRON );
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index de1eadb7a86c..d5072c858847 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -401,7 +401,7 @@ ScVbaWindow::getWindowState() throw (uno::RuntimeException)
sal_Int32 nwindowState = xlNormal;
ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
- WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame()->GetSystemWindow();
+ WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow();
if ( pWork )
{
if ( pWork -> IsMaximized())
@@ -419,7 +419,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
_windowstate >>= nwindowState;
ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
- WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame()->GetSystemWindow();
+ WorkWindow* pWork = (WorkWindow*) pViewFrame->GetFrame().GetSystemWindow();
if ( pWork )
{
if ( nwindowState == xlMaximized)
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c2d0f68fc6ef..f1dec2a510b8 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -521,7 +521,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
// removed: SID_BORDER_OBJECT (old Basic)
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
-// BOOL bOle = pTabViewShell->GetViewFrame()->GetFrame()->IsInPlace();
+// BOOL bOle = pTabViewShell->GetViewFrame()->GetFrame().IsInPlace();
// BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScViewData* pData = GetViewData();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f610e28b3fc5..618ac0204dd6 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1947,7 +1947,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
- pTabViewShell->GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP );
+ pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 039e4dc256ba..433da76b21ad 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -233,7 +233,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
BOOL bWasOpen = FALSE;
{
- uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame()->GetFrameInterface();
+ uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
rtl::OUString::createFromAscii("_beamer"),
frame::FrameSearchFlag::CHILDREN);
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index dd79bb52a112..7bead7d42e07 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -91,7 +91,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case SID_OPENDLG_FUNCTION:
// #53318# inplace macht die EditShell Aerger...
//! kann nicht immer umgeschaltet werden ????
- if (!pTabViewShell->GetViewFrame()->GetFrame()->IsInPlace())
+ if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace())
pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten
// kein break
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index ef68bbc9bd0c..ae6f9b309d19 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -532,7 +532,7 @@ void ScDrawView::MarkListHasChanged()
// Verben anpassen
SfxViewFrame* pViewFrame = pViewSh->GetViewFrame();
- BOOL bOle = pViewSh->GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace();
if ( pOle2Obj && !bOle )
{
uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
@@ -573,16 +573,13 @@ void ScDrawView::MarkListHasChanged()
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ SfxFrame& rFrame = pViewFrame->GetFrame();
+ uno::Reference<frame::XController> xController = rFrame.GetController();
+ if (xController.is())
{
- uno::Reference<frame::XController> xController = pFrame->GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+ if (pImp)
+ pImp->SelectionChanged();
}
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index de2b962f3272..116c2af6d1fb 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2412,24 +2412,20 @@ long ScGridWindow::PreNotify( NotifyEvent& rNEvt )
SfxViewFrame* pViewFrame = pViewData->GetViewShell()->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ com::sun::star::uno::Reference<com::sun::star::frame::XController> xController = pViewFrame->GetFrame().GetController();
+ if (xController.is())
{
- com::sun::star::uno::Reference<com::sun::star::frame::XController> xController = pFrame->GetController();
- if (xController.is())
+ ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+ if (pImp && pImp->IsMouseListening())
{
- ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
- if (pImp && pImp->IsMouseListening())
- {
- ::com::sun::star::awt::MouseEvent aEvent;
- lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() );
- if ( rNEvt.GetWindow() )
- aEvent.Source = rNEvt.GetWindow()->GetComponentInterface();
- if ( nType == EVENT_MOUSEBUTTONDOWN)
- pImp->MousePressed( aEvent );
- else
- pImp->MouseReleased( aEvent );
- }
+ ::com::sun::star::awt::MouseEvent aEvent;
+ lcl_InitMouseEvent( aEvent, *rNEvt.GetMouseEvent() );
+ if ( rNEvt.GetWindow() )
+ aEvent.Source = rNEvt.GetWindow()->GetComponentInterface();
+ if ( nType == EVENT_MOUSEBUTTONDOWN)
+ pImp->MousePressed( aEvent );
+ else
+ pImp->MouseReleased( aEvent );
}
}
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 3077e852dbaf..63d675e03d15 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1168,7 +1168,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
const CommandWheelData* pData = rCEvt.GetWheelData();
if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM )
{
- if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace() )
{
// for ole inplace editing, the scale is defined by the visarea and client size
// and can't be changed directly
@@ -1625,7 +1625,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY
return;
SCROW nEndPos = MAXROW;
- if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !aViewData.GetViewShell()->GetViewFrame()->GetFrame().IsInPlace() )
{
// fuer OLE Inplace immer MAXROW
@@ -2454,16 +2454,13 @@ void ScTabView::SetNewVisArea()
SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ SfxFrame& rFrame = pViewFrame->GetFrame();
+ com::sun::star::uno::Reference<com::sun::star::frame::XController> xController = rFrame.GetController();
+ if (xController.is())
{
- com::sun::star::uno::Reference<com::sun::star::frame::XController> xController = pFrame->GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
- if (pImp)
- pImp->VisAreaChanged();
- }
+ ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+ if (pImp)
+ pImp->VisAreaChanged();
}
}
if (aViewData.GetViewShell()->HasAccessibilityObjects())
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index a19760e4c277..a71a3080331d 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -370,16 +370,12 @@ void ScTabView::SelectionChanged()
SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
+ if (xController.is())
{
- uno::Reference<frame::XController> xController = pFrame->GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
- if (pImp)
- pImp->SelectionChanged();
- }
+ ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+ if (pImp)
+ pImp->SelectionChanged();
}
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 75e961d5eeec..d1b76d06a599 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -337,16 +337,12 @@ void ScTabView::TabChanged()
SfxViewFrame* pViewFrame = aViewData.GetViewShell()->GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
+ uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
+ if (xController.is())
{
- uno::Reference<frame::XController> xController = pFrame->GetController();
- if (xController.is())
- {
- ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
- if (pImp)
- pImp->SheetChanged();
- }
+ ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
+ if (pImp)
+ pImp->SheetChanged();
}
}
}
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index db6ee302a792..ebd408fe6349 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -454,7 +454,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAW_CHART:
{
- BOOL bOle = GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
if ( bOle || !SvtModuleOptions().IsChart() )
rSet.DisableItem( nWhich );
}
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 62824f53759b..7d1f45875005 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -492,7 +492,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
}
if ( bFound )
- pViewFrame->GetFrame()->Appear();
+ pViewFrame->GetFrame().Appear();
rReq.Ignore();//XXX wird von SFX erledigt
}
@@ -503,7 +503,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_PRINTPREVIEW:
{
- if ( !pThisFrame->GetFrame()->IsInPlace() ) // nicht bei OLE
+ if ( !pThisFrame->GetFrame().IsInPlace() ) // nicht bei OLE
{
// print preview is now always in the same frame as the tab view
// -> always switch this frame back to normal view
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 2db8f9a03f62..2ef946b768d5 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -265,7 +265,7 @@ void __EXPORT ScTabViewShell::Deactivate(BOOL bMDI)
DeActivateOlk( GetViewData() );
ActivateView( FALSE, FALSE );
- if ( GetViewFrame()->GetFrame()->IsInPlace() ) // inplace
+ if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
GetViewData()->GetDocShell()->UpdateOle(GetViewData(),TRUE);
if ( pHdl )
@@ -293,7 +293,7 @@ void ScTabViewShell::SetActive()
#if 0
SfxViewFrame* pFrame = GetViewFrame();
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
SFX_APP()->SetViewFrame( pFrame ); // immer erst Appear, dann SetViewFrame (#29290#)
#endif
@@ -391,7 +391,7 @@ void __EXPORT ScTabViewShell::AdjustPosSizePixel( const Point &rPos, const Size
void __EXPORT ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
{
Size aNewSize( rSize );
- if ( GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( GetViewFrame()->GetFrame().IsInPlace() )
{
SvBorder aBorder;
GetBorderSize( aBorder, rSize );
@@ -1336,13 +1336,10 @@ ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
SfxViewFrame* pViewFrame = rShell.GetViewFrame();
if (pViewFrame)
{
- SfxFrame* pFrame = pViewFrame->GetFrame();
- if (pFrame)
- {
- uno::Reference<frame::XController> xController = pFrame->GetController();
- if (xController.is())
- pRet = ScTabViewObj::getImplementation( xController );
- }
+ SfxFrame& rFrame = pViewFrame->GetFrame();
+ uno::Reference<frame::XController> xController = rFrame.GetController();
+ if (xController.is())
+ pRet = ScTabViewObj::getImplementation( xController );
}
return pRet;
}
@@ -1383,7 +1380,7 @@ void ScTabViewShell::StartSimpleRefDialog(
// Then the view has to be activated first, the same way as in Execute for SID_CURRENTDOC.
// Can't use GrabFocus here, because it needs to take effect immediately.
- pViewFrm->GetFrame()->Appear();
+ pViewFrm->GetFrame().Appear();
}
USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId();
@@ -1525,7 +1522,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
// container app and are executed during Window::KeyInput.
// -> don't pass keys to input handler that would be used there
// but should call slots instead.
- BOOL bParent = ( GetViewFrame()->GetFrame()->IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
+ BOOL bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW );
if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent )
bUsed = pScMod->InputKeyEvent( rKEvt, TRUE ); // Eingabe
@@ -1734,7 +1731,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// show the right cells
GetViewData()->SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() );
- if ( GetViewFrame()->GetFrame()->IsInPlace() ) // inplace
+ if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace
{
pDocSh->SetInplace( TRUE ); // schon so initialisiert
if (pDoc->IsEmbedded())
@@ -1874,7 +1871,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
// #105575#; update only in the first creation of the ViewShell
pDocSh->SetUpdateEnabled(FALSE);
- if ( GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( GetViewFrame()->GetFrame().IsInPlace() )
UpdateHeaderWidth(); // The implace activation requires headers to be calculated
SvBorder aBorder;
@@ -1896,7 +1893,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
//UNUSED2008-05
//UNUSED2008-05 UpdatePageBreakData();
//UNUSED2008-05
-//UNUSED2008-05 /*uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame()->GetFrameInterface();
+//UNUSED2008-05 /*uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
//UNUSED2008-05 if (xFrame.is())
//UNUSED2008-05 xFrame->setComponent( uno::Reference<awt::XWindow>(), new ScTabViewObj( this ) );*/
//UNUSED2008-05 // make Controller known to SFX
@@ -1948,7 +1945,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
SetZoomType( rAppOpt.GetZoomType(), TRUE );
}
- /*uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame()->GetFrameInterface();
+ /*uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
if (xFrame.is())
xFrame->setComponent( uno::Reference<awt::XWindow>(), new ScTabViewObj( this ) );*/
// make Controller known to SFX
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 9e844f970909..4a9a2e2d5abf 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -177,7 +177,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet )
USHORT nMyId = 0;
SfxViewFrame* pThisFrame = GetViewFrame();
- BOOL bOle = GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
SCTAB nTabCount = pDoc->GetTableCount();
SCTAB nTabSelCount = rMark.GetSelectCount();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 37dc2c11da7f..7219a3d2b8e2 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -435,7 +435,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
{
- BOOL bOle = GetViewFrame()->GetFrame()->IsInPlace();
+ BOOL bOle = GetViewFrame()->GetFrame().IsInPlace();
BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL );
bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false );
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index d0a6f2acf015..569e17fa51aa 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -374,7 +374,7 @@ BOOL ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
- SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP );
+ SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if ( pDlg->Execute() == RET_OK )
{
SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );