diff options
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index d16bc895a5d1..ee46cd116c43 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -373,6 +373,18 @@ void ScModelObj::CreateAndSet(ScDocShell* pDocSh) pDocSh->SetBaseModel( new ScModelObj(pDocSh) ); } +SdrModel* ScModelObj::getSdrModelFromUnoModel() const +{ + ScDocument& rDoc(pDocShell->GetDocument()); + + if(!rDoc.GetDrawLayer()) + { + rDoc.InitDrawLayer(); + } + + return rDoc.GetDrawLayer(); +} + ScModelObj::ScModelObj( ScDocShell* pDocSh ) : SfxBaseModel( pDocSh ), aPropSet( lcl_GetDocOptPropertyMap() ), @@ -1947,7 +1959,9 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec if( pModel ) { - aDrawViewKeeper.mpDrawView = new FmFormView( pModel, pDev ); + aDrawViewKeeper.mpDrawView = new FmFormView( + *pModel, + pDev); aDrawViewKeeper.mpDrawView->ShowSdrPage(aDrawViewKeeper.mpDrawView->GetModel()->GetPage(nTab)); aDrawViewKeeper.mpDrawView->SetPrintPreview(); } |