summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-21 21:16:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-22 20:14:40 +0000
commit0f02bc189b6e89ca2e62d4bd6a2f407a9fd4ec3b (patch)
treee33175c301413ad98d2dff96659a054a03191b17 /svx
parent8a05b74eeb8d5e0955fbe3cefd945cdc9bffa3f5 (diff)
crashtesting: CreateShellID returns the mediums base url...
when it works the way we want it to work, so presumably we can cut out the middle man and use getDocumentBaseURL directly which does the same thing. This has the advantage of being in the IEmbeddedHelper api so assignFrom can be tweaked to pull the src and dest ids arguments to CopyAndGetEmbeddedObject from the src and dest IEmbeddedHelpers always available there. So we ensure we have some ids to present to CopyAndGetEmbeddedObject, avoiding the assert on converting documents such as ooo89433-1.ppt to pdf So the explicit args can apparently be dropped, bubbling up then means we don't need a CloneWithShellIDs (introduced with tdf#71076 and tdf#71767) as normal Clone should now do the right thing. And various other arguments in various callers of these, which are typically filled in with an unhelpful empty OUString placeholder, can go Change-Id: I9c0be0340e72f98b10ee87ada7d2a021fcc39e23
Diffstat (limited to 'svx')
-rw-r--r--svx/source/engine3d/view3d.cxx5
-rw-r--r--svx/source/svdraw/svdobj.cxx5
-rw-r--r--svx/source/svdraw/svdoole2.cxx21
-rw-r--r--svx/source/svdraw/svdxcgv.cxx5
4 files changed, 7 insertions, 29 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index d7fd886b169a..eadcd53b83db 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -444,8 +444,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
// not the scene itself
bool E3dView::Paste(
- const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions,
- const OUString& rSrcShellID, const OUString& rDestShellID )
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions)
{
bool bRetval = false;
@@ -490,7 +489,7 @@ bool E3dView::Paste(
else
{
// call parent
- bRetval = SdrView::Paste(rMod, rPos, pLst, nOptions, rSrcShellID, rDestShellID);
+ bRetval = SdrView::Paste(rMod, rPos, pLst, nOptions);
}
return bRetval;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 7dd6799b97d0..d5dc3b970449 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -956,11 +956,6 @@ SdrObject* SdrObject::Clone() const
return CloneHelper< SdrObject >();
}
-SdrObject* SdrObject::CloneWithShellIDs( const OUString& /*rSrcShellID*/, const OUString& /*rDestShellID*/ ) const
-{
- return Clone();
-}
-
SdrObject& SdrObject::operator=(const SdrObject& rObj)
{
if( this == &rObj )
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index e786dbfb56e3..9cb32791a195 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1642,27 +1642,12 @@ OUString SdrOle2Obj::TakeObjNamePlural() const
return ImpGetResStr(mpImpl->mbFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2);
}
-
-
SdrOle2Obj* SdrOle2Obj::Clone() const
{
return CloneHelper< SdrOle2Obj >();
}
-SdrOle2Obj* SdrOle2Obj::CloneWithShellIDs( const OUString& rSrcShellID, const OUString& rDestShellID ) const
-{
- SdrOle2Obj* pObj =
- dynamic_cast<SdrOle2Obj*>(
- SdrObjFactory::MakeNewObject(GetObjInventor(), GetObjIdentifier(), nullptr));
-
- if (pObj)
- pObj->assignFrom(*this, rSrcShellID, rDestShellID);
-
- return pObj;
-}
-
-SdrOle2Obj& SdrOle2Obj::assignFrom(
- const SdrOle2Obj& rObj, const OUString& rSrcShellID, const OUString& rDestShellID )
+SdrOle2Obj& SdrOle2Obj::assignFrom(const SdrOle2Obj& rObj)
{
//TODO/LATER: who takes over control of my old object?!
if( &rObj != this )
@@ -1709,7 +1694,7 @@ SdrOle2Obj& SdrOle2Obj::assignFrom(
{
OUString aTmp;
mpImpl->mxObjRef.Assign( pDestPers->getEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
- rContainer, xObj, aTmp, rSrcShellID, rDestShellID), rOle2Obj.GetAspect());
+ rContainer, xObj, aTmp, pSrcPers->getDocumentBaseURL(), pDestPers->getDocumentBaseURL()), rOle2Obj.GetAspect());
mpImpl->mbTypeAsked = false;
mpImpl->aPersistName = aTmp;
CheckFileLink_Impl();
@@ -1724,7 +1709,7 @@ SdrOle2Obj& SdrOle2Obj::assignFrom(
SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
{
- return assignFrom(rObj, OUString(), OUString());
+ return assignFrom(rObj);
}
void SdrOle2Obj::ImpSetVisAreaSize()
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 0eeedc95436f..2cf6bee83511 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -224,8 +224,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt
}
bool SdrExchangeView::Paste(
- const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions,
- const OUString& rSrcShellID, const OUString& rDestShellID )
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions)
{
const SdrModel* pSrcMod=&rMod;
if (pSrcMod==mpModel)
@@ -300,7 +299,7 @@ bool SdrExchangeView::Paste(
{
const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
- SdrObject* pNeuObj = pSrcOb->CloneWithShellIDs(rSrcShellID, rDestShellID);
+ SdrObject* pNeuObj = pSrcOb->Clone();
if (pNeuObj!=nullptr)
{