Kaydet (Commit) c5fc0af6 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Remove GetAllMarkedModel() since all it does is call GetMarkedObjModel().

One less indirection makes the code a tad easier to follow.

Change-Id: I8e1113617c09f91c0cad32277ee4e32c78f9f058
üst 05923e05
......@@ -58,7 +58,7 @@ ChartTransferable::ChartTransferable( SdrModel* pDrawModel, SdrObject* pSelected
m_xMetaFileGraphic.set( aGraphic.GetXGraphic());
if ( m_bDrawing )
{
m_pMarkedObjModel = ( pExchgView ? pExchgView->GetAllMarkedModel() : NULL );
m_pMarkedObjModel = ( pExchgView ? pExchgView->GetMarkedObjModel() : NULL );
}
delete pExchgView;
}
......
......@@ -340,7 +340,7 @@ void ScSelectionTransferObj::CreateDrawData()
//---------------------------------------------------------
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
SdrModel* pModel = pDrawView->GetAllMarkedModel();
SdrModel* pModel = pDrawView->GetMarkedObjModel();
ScDrawLayer::SetGlobalDrawPersist(NULL);
ScViewData* pViewData = pView->GetViewData();
......
......@@ -1049,7 +1049,7 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uI
SdrPageView* pPV = aEditView.GetSdrPageView();
aEditView.MarkObj(pObject, pPV);
SdrModel* pDragModel = aEditView.GetAllMarkedModel();
SdrModel* pDragModel = aEditView.GetMarkedObjModel();
TransferableObjectDescriptor aObjDesc;
pSrcShell->FillTransferableObjectDescriptor( aObjDesc );
......
......@@ -107,7 +107,7 @@ sal_Bool ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
aDragShellRef->DoInitNew(NULL);
}
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
SdrModel* pModel = GetAllMarkedModel();
SdrModel* pModel = GetMarkedObjModel();
ScDrawLayer::SetGlobalDrawPersist(NULL);
// Charts now always copy their data in addition to the source reference, so
......@@ -144,7 +144,7 @@ void ScDrawView::DoCopy()
// update ScGlobal::pDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
SdrModel* pModel = GetAllMarkedModel();
SdrModel* pModel = GetMarkedObjModel();
ScDrawLayer::SetGlobalDrawPersist(NULL);
// Charts now always copy their data in addition to the source reference, so
......@@ -180,7 +180,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
// update ScGlobal::pDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
SdrModel* pModel = GetAllMarkedModel();
SdrModel* pModel = GetMarkedObjModel();
ScDrawLayer::SetGlobalDrawPersist(NULL);
// Charts now always copy their data in addition to the source reference, so
......
......@@ -1066,7 +1066,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsObject(
if (bOLEObjFound)
pBMView->GetDoc().SetAllocDocSh(sal_True);
SdDrawDocument* pTmpDoc = (SdDrawDocument*) pBMView->GetAllMarkedModel();
SdDrawDocument* pTmpDoc = (SdDrawDocument*) pBMView->GetMarkedObjModel();
bOK = pView->Paste(*pTmpDoc, aObjPos, pPage);
if (bOLEObjFound)
......
......@@ -286,7 +286,7 @@ void SdTransferable::CreateData()
if( mpSourceDoc )
mpSourceDoc->CreatingDataObj(this);
mpSdDrawDocumentIntern = (SdDrawDocument*) mpSdView->GetAllMarkedModel();
mpSdDrawDocumentIntern = (SdDrawDocument*) mpSdView->GetMarkedObjModel();
if( mpSourceDoc )
mpSourceDoc->CreatingDataObj(0);
......@@ -509,7 +509,7 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
{
SdDrawDocument& rInternDoc = mpSdViewIntern->GetDoc();
rInternDoc.CreatingDataObj(this);
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( mpSdViewIntern->GetAllMarkedModel() );
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( mpSdViewIntern->GetMarkedObjModel() );
rInternDoc.CreatingDataObj(0);
bOK = SetObject( pDoc, SDTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
......
......@@ -107,7 +107,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
SD_MOD()->pTransferClip = pTransferable;
mrDoc.CreatingDataObj( pTransferable );
pTransferable->SetWorkDocument( (SdDrawDocument*) GetAllMarkedModel() );
pTransferable->SetWorkDocument( (SdDrawDocument*) GetMarkedObjModel() );
mrDoc.CreatingDataObj( NULL );
// #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get
......
......@@ -591,7 +591,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
// model is owned by from AllocModel() created DocShell
SdDrawDocument* pSourceDoc = (SdDrawDocument*) pSourceView->GetModel();
pSourceDoc->CreatingDataObj( pOwnData );
SdDrawDocument* pModel = (SdDrawDocument*) pSourceView->GetAllMarkedModel();
SdDrawDocument* pModel = (SdDrawDocument*) pSourceView->GetMarkedObjModel();
bReturn = Paste( *pModel, maDropPos, pPage, nPasteOptions );
if( !pPage )
......
......@@ -83,7 +83,6 @@ public:
virtual SdrModel* GetMarkedObjModel() const;
Graphic GetAllMarkedGraphic() const;
SdrModel* GetAllMarkedModel() const { return GetMarkedObjModel(); }
/** Generate a Graphic for the given draw object in the given model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment