[Libreoffice-commits] .: chart2/source sc/source sd/source svx/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 16 08:21:20 PST 2013


 chart2/source/controller/main/ChartTransferable.cxx |    2 +-
 sc/source/ui/app/seltrans.cxx                       |    2 +-
 sc/source/ui/navipi/content.cxx                     |    2 +-
 sc/source/ui/view/drawvie4.cxx                      |    6 +++---
 sd/source/core/drawdoc3.cxx                         |    2 +-
 sd/source/ui/app/sdxfer.cxx                         |    4 ++--
 sd/source/ui/view/sdview2.cxx                       |    2 +-
 sd/source/ui/view/sdview3.cxx                       |    2 +-
 svx/inc/svx/svdxcgv.hxx                             |    1 -
 9 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit c5fc0af6f551980d3e147f7d6cf1fdd320b8f1fe
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Jan 16 11:19:45 2013 -0500

    Remove GetAllMarkedModel() since all it does is call GetMarkedObjModel().
    
    One less indirection makes the code a tad easier to follow.
    
    Change-Id: I8e1113617c09f91c0cad32277ee4e32c78f9f058

diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx
index 6a987d0..efc9782 100644
--- a/chart2/source/controller/main/ChartTransferable.cxx
+++ b/chart2/source/controller/main/ChartTransferable.cxx
@@ -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;
 }
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 1c4ec97..2c200e2 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -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();
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 1e1c909..cb94bdb 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -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 );
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 234fbbc..cf5dbe9 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -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
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 9909623..a3ff2ec 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -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)
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index fffbf29..c4a9c0d 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -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 );
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index e664c01..e7b8283 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -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
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index c19789e..f6a59d6 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -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 )
diff --git a/svx/inc/svx/svdxcgv.hxx b/svx/inc/svx/svdxcgv.hxx
index 4918df0..1d7a161 100644
--- a/svx/inc/svx/svdxcgv.hxx
+++ b/svx/inc/svx/svdxcgv.hxx
@@ -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
 


More information about the Libreoffice-commits mailing list