summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/engine3d/view3d.cxx6
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx16
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx5
-rw-r--r--svx/source/fmcomp/xmlexchg.cxx2
-rw-r--r--svx/source/form/fmexch.cxx11
-rw-r--r--svx/source/form/fmview.cxx7
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/inc/fmexch.hxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx5
-rw-r--r--svx/source/svdraw/svdoole2.cxx23
-rw-r--r--svx/source/svdraw/svdxcgv.cxx6
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx4
12 files changed, 53 insertions, 38 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 3aee208d33ae..f0bbd32b40f8 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -441,7 +441,9 @@ SdrModel* E3dView::GetMarkedObjModel() const
// When pasting objects have to integrated if a scene is inserted, but
// not the scene itself
-sal_Bool E3dView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions)
+sal_Bool E3dView::Paste(
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions,
+ const OUString& rSrcShellID, const OUString& rDestShellID )
{
sal_Bool bRetval = sal_False;
@@ -486,7 +488,7 @@ sal_Bool E3dView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLs
else
{
// call parent
- bRetval = SdrView::Paste(rMod, rPos, pLst, nOptions);
+ bRetval = SdrView::Paste(rMod, rPos, pLst, nOptions, rSrcShellID, rDestShellID);
}
return bRetval;
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index ff0e74f6584e..01a78453c3f2 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -223,8 +223,7 @@ namespace svx
AddFormat(getDescriptorFormatId());
}
- //--------------------------------------------------------------------
- sal_Bool OColumnTransferable::GetData( const DataFlavor& _rFlavor )
+ sal_Bool OColumnTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor);
switch (nFormatId)
@@ -276,7 +275,7 @@ namespace svx
SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
- Any aDescriptor = _rData.GetAny(aFlavor);
+ Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
@@ -468,8 +467,7 @@ namespace svx
AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE);
}
- // -----------------------------------------------------------------------------
- sal_Bool ODataAccessObjectTransferable::GetData( const DataFlavor& rFlavor )
+ sal_Bool ODataAccessObjectTransferable::GetData( const DataFlavor& rFlavor, const OUString& /*rDestDoc*/ )
{
sal_uIntPtr nFormat = SotExchange::GetFormat(rFlavor);
switch (nFormat)
@@ -524,7 +522,7 @@ namespace svx
SotExchange::GetFormatDataFlavor(nKnownFormatId, aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
- Any aDescriptor = _rData.GetAny(aFlavor);
+ Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
@@ -643,8 +641,8 @@ namespace svx
{
AddFormat(getDescriptorFormatId());
}
- //--------------------------------------------------------------------
- sal_Bool OMultiColumnTransferable::GetData( const DataFlavor& _rFlavor )
+
+ sal_Bool OMultiColumnTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor);
if (nFormatId == getDescriptorFormatId())
@@ -682,7 +680,7 @@ namespace svx
SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
- _rData.GetAny(aFlavor) >>= aList;
+ _rData.GetAny(aFlavor, OUString()) >>= aList;
} // if (_rData.HasFormat(getDescriptorFormatId()))
return aList;
}
diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx
index 2d5be88f04b0..353465940b7c 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -89,8 +89,7 @@ namespace svx
AddFormat(getDescriptorFormatId(bForm));
}
- //--------------------------------------------------------------------
- sal_Bool OComponentTransferable::GetData( const DataFlavor& _rFlavor )
+ sal_Bool OComponentTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor);
if ( nFormatId == getDescriptorFormatId(sal_True) || nFormatId == getDescriptorFormatId(sal_False) )
@@ -131,7 +130,7 @@ namespace svx
SotExchange::GetFormatDataFlavor(getDescriptorFormatId(bForm), aFlavor);
OSL_ENSURE(bSuccess, "OComponentTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
- Any aDescriptor = _rData.GetAny(aFlavor);
+ Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx
index fecc0e6f158f..fe94b029234f 100644
--- a/svx/source/fmcomp/xmlexchg.cxx
+++ b/svx/source/fmcomp/xmlexchg.cxx
@@ -43,7 +43,7 @@ namespace svx
AddFormat( SOT_FORMATSTR_ID_XFORMS );
}
//--------------------------------------------------------------------
- sal_Bool OXFormsTransferable::GetData( const DataFlavor& _rFlavor )
+ sal_Bool OXFormsTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat( _rFlavor );
if ( SOT_FORMATSTR_ID_XFORMS == nFormatId )
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index c137183caf2f..6a074a4370d7 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -115,7 +115,7 @@ namespace svxform
}
//--------------------------------------------------------------------
- sal_Bool OLocalExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& /*_rFlavor*/ )
+ sal_Bool OLocalExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& /*_rFlavor*/, const OUString& /*rDestDoc*/ )
{
return sal_False; // do not have any formats by default
}
@@ -139,7 +139,7 @@ namespace svxform
if ( OControlExchange::hasControlPathFormat( aExchangedData.GetDataFlavorExVector() ) )
{ // paths to the controls, relative to a root
Sequence< Any > aControlPathData;
- if ( aExchangedData.GetAny( OControlExchange::getControlPathFormatId() ) >>= aControlPathData )
+ if ( aExchangedData.GetAny(OControlExchange::getControlPathFormatId(), OUString()) >>= aControlPathData )
{
DBG_ASSERT( aControlPathData.getLength() >= 2, "OControlTransferData::OControlTransferData: invalid data for the control path format!" );
if ( aControlPathData.getLength() >= 2 )
@@ -155,7 +155,7 @@ namespace svxform
}
if ( OControlExchange::hasHiddenControlModelsFormat( aExchangedData.GetDataFlavorExVector() ) )
{ // sequence of models of hidden controls
- aExchangedData.GetAny( OControlExchange::getHiddenControlModelsFormatId() ) >>= m_aHiddenControlModels;
+ aExchangedData.GetAny(OControlExchange::getHiddenControlModelsFormatId(), OUString()) >>= m_aHiddenControlModels;
}
updateFormats( );
@@ -289,8 +289,7 @@ namespace svxform
{
}
- //--------------------------------------------------------------------
- sal_Bool OControlExchange::GetData( const DataFlavor& _rFlavor )
+ sal_Bool OControlExchange::GetData( const DataFlavor& _rFlavor, const OUString& rDestDoc )
{
const sal_uInt32 nFormatId = SotExchange::GetFormat( _rFlavor );
@@ -310,7 +309,7 @@ namespace svxform
SetAny( makeAny( m_aHiddenControlModels ), _rFlavor );
}
else
- return OLocalExchange::GetData( _rFlavor );
+ return OLocalExchange::GetData(_rFlavor, rDestDoc);
return sal_True;
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 83c6709f3476..3f5b8f1c1c98 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -379,13 +379,6 @@ SdrModel* FmFormView::GetMarkedObjModel() const
return E3dView::GetMarkedObjModel();
}
-//------------------------------------------------------------------------
-sal_Bool FmFormView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions)
-{
- return E3dView::Paste(rMod, rPos, pLst, nOptions);
-}
-
-//------------------------------------------------------------------------
void FmFormView::ActivateControls(SdrPageView* pPageView)
{
if (!pPageView)
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index fca950f8660f..8adad0dbd473 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -512,7 +512,7 @@ void GalleryTransferable::AddSupportedFormats()
}
}
-sal_Bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor )
+sal_Bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
sal_Bool bRet = sal_False;
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index e2c9a84e412a..6c59ffb0316d 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -79,7 +79,7 @@ namespace svxform
// TransferableHelper
virtual void DragFinished( sal_Int8 nDropAction );
- virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
private:
void StartDrag( Window* pWindow, sal_Int8 nDragSourceActions, sal_Int32 nDragPointer = DND_POINTER_NONE, sal_Int32 nDragImage = DND_IMAGE_NONE )
@@ -222,7 +222,7 @@ namespace svxform
inline static sal_Bool hasHiddenControlModelsFormat( const DataFlavorExVector& _rFormats );
protected:
- virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
virtual void AddSupportedFormats();
};
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b495c5b98b8f..d821757035d3 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1064,6 +1064,11 @@ 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 1102de8c9325..f68f5d795623 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1621,7 +1621,20 @@ SdrOle2Obj* SdrOle2Obj::Clone() const
return CloneHelper< SdrOle2Obj >();
}
-SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
+SdrOle2Obj* SdrOle2Obj::CloneWithShellIDs( const OUString& rSrcShellID, const OUString& rDestShellID ) const
+{
+ SdrOle2Obj* pObj =
+ dynamic_cast<SdrOle2Obj*>(
+ SdrObjFactory::MakeNewObject(GetObjInventor(), GetObjIdentifier(), NULL));
+
+ if (pObj)
+ pObj->assignFrom(*this, rSrcShellID, rDestShellID);
+
+ return pObj;
+}
+
+SdrOle2Obj& SdrOle2Obj::assignFrom(
+ const SdrOle2Obj& rObj, const OUString& rSrcShellID, const OUString& rDestShellID )
{
//TODO/LATER: who takes over control of my old object?!
if( &rObj != this )
@@ -1668,7 +1681,8 @@ SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
if ( xObj.is() )
{
OUString aTmp;
- xObjRef.Assign( pDestPers->getEmbeddedObjectContainer().CopyAndGetEmbeddedObject( rContainer, xObj, aTmp ), rOle2Obj.GetAspect() );
+ xObjRef.Assign( pDestPers->getEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
+ rContainer, xObj, aTmp, rSrcShellID, rDestShellID), rOle2Obj.GetAspect());
m_bTypeAsked = false;
mpImpl->aPersistName = aTmp;
CheckFileLink_Impl();
@@ -1681,7 +1695,10 @@ SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
return *this;
}
-// -----------------------------------------------------------------------------
+SdrOle2Obj& SdrOle2Obj::operator=(const SdrOle2Obj& rObj)
+{
+ return assignFrom(rObj, OUString(), OUString());
+}
void SdrOle2Obj::ImpSetVisAreaSize()
{
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 374f9a9f4e26..fe62e91219b5 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -223,7 +223,9 @@ sal_Bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_
return sal_True;
}
-sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions)
+sal_Bool SdrExchangeView::Paste(
+ const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions,
+ const OUString& rSrcShellID, const OUString& rDestShellID )
{
const SdrModel* pSrcMod=&rMod;
if (pSrcMod==pMod)
@@ -298,7 +300,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
{
const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
- SdrObject* pNeuObj = pSrcOb->Clone();
+ SdrObject* pNeuObj = pSrcOb->CloneWithShellIDs(rSrcShellID, rDestShellID);
if (pNeuObj!=NULL)
{
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 959123536811..61e5bf12010f 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -49,7 +49,7 @@ private:
protected:
virtual void AddSupportedFormats();
- virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
public:
@@ -67,7 +67,7 @@ void SvxColorValueSetData::AddSupportedFormats()
// -----------------------------------------------------------------------------
-sal_Bool SvxColorValueSetData::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
+sal_Bool SvxColorValueSetData::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ )
{
sal_Bool bRet = sal_False;