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