1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_DRWTRANS_HXX 25cdf0e10cSrcweir #define SC_DRWTRANS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 28cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp> 29cdf0e10cSrcweir #include <svtools/transfer.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <sfx2/objsh.hxx> 32cdf0e10cSrcweir #include "global.hxx" 33cdf0e10cSrcweir #include "charthelper.hxx" 34cdf0e10cSrcweir #include "rangelst.hxx" 35cdf0e10cSrcweir 36cdf0e10cSrcweir 37cdf0e10cSrcweir class SdrModel; 38cdf0e10cSrcweir class ScDocShell; 39cdf0e10cSrcweir class INetBookmark; 40cdf0e10cSrcweir class SdrObject; 41cdf0e10cSrcweir class SdrView; 42cdf0e10cSrcweir class ScDrawView; 43cdf0e10cSrcweir class SdrOle2Obj; 44cdf0e10cSrcweir 45cdf0e10cSrcweir class ScDrawTransferObj : public TransferableHelper 46cdf0e10cSrcweir { 47cdf0e10cSrcweir private: 48cdf0e10cSrcweir SdrModel* pModel; 49cdf0e10cSrcweir TransferableDataHelper aOleData; 50cdf0e10cSrcweir TransferableObjectDescriptor aObjDesc; 51cdf0e10cSrcweir //REMOVE SvEmbeddedObjectRef aDocShellRef; 52cdf0e10cSrcweir //REMOVE SvEmbeddedObjectRef aDrawPersistRef; 53cdf0e10cSrcweir SfxObjectShellRef aDocShellRef; 54cdf0e10cSrcweir SfxObjectShellRef aDrawPersistRef; 55cdf0e10cSrcweir 56cdf0e10cSrcweir // extracted from model in ctor: 57cdf0e10cSrcweir Size aSrcSize; 58cdf0e10cSrcweir INetBookmark* pBookmark; 59cdf0e10cSrcweir sal_Bool bGraphic; 60cdf0e10cSrcweir sal_Bool bGrIsBit; 61cdf0e10cSrcweir sal_Bool bOleObj; 62cdf0e10cSrcweir // source information for drag&drop: 63cdf0e10cSrcweir // (view is needed to handle drawing obejcts) 64cdf0e10cSrcweir SdrView* pDragSourceView; 65cdf0e10cSrcweir sal_uInt16 nDragSourceFlags; 66cdf0e10cSrcweir sal_Bool bDragWasInternal; 67cdf0e10cSrcweir 68cdf0e10cSrcweir sal_uInt32 nSourceDocID; 69cdf0e10cSrcweir 70cdf0e10cSrcweir ScRangeListVector m_aProtectedChartRangesVector; 71cdf0e10cSrcweir 72cdf0e10cSrcweir 73cdf0e10cSrcweir void InitDocShell(); 74cdf0e10cSrcweir //REMOVE SvInPlaceObjectRef GetSingleObject(); 75cdf0e10cSrcweir SdrOle2Obj* GetSingleObject(); 76cdf0e10cSrcweir 77cdf0e10cSrcweir public: 78cdf0e10cSrcweir ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContainerShell, 79cdf0e10cSrcweir const TransferableObjectDescriptor& rDesc ); 80cdf0e10cSrcweir virtual ~ScDrawTransferObj(); 81cdf0e10cSrcweir 82cdf0e10cSrcweir virtual void AddSupportedFormats(); 83cdf0e10cSrcweir virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); 84cdf0e10cSrcweir virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, 85cdf0e10cSrcweir const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); 86cdf0e10cSrcweir virtual void ObjectReleased(); 87cdf0e10cSrcweir virtual void DragFinished( sal_Int8 nDropAction ); 88cdf0e10cSrcweir GetModel()89cdf0e10cSrcweir SdrModel* GetModel() { return pModel; } 90cdf0e10cSrcweir 91cdf0e10cSrcweir void SetDrawPersist( const SfxObjectShellRef& rRef ); 92cdf0e10cSrcweir void SetDragSource( ScDrawView* pView ); 93cdf0e10cSrcweir void SetDragSourceObj( SdrObject* pObj, SCTAB nTab ); 94cdf0e10cSrcweir void SetDragSourceFlags( sal_uInt16 nFlags ); 95cdf0e10cSrcweir void SetDragWasInternal(); 96cdf0e10cSrcweir GetDragSourceView()97cdf0e10cSrcweir SdrView* GetDragSourceView() { return pDragSourceView; } GetDragSourceFlags() const98cdf0e10cSrcweir sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; } 99cdf0e10cSrcweir SetSourceDocID(sal_uInt32 nVal)100cdf0e10cSrcweir void SetSourceDocID( sal_uInt32 nVal ) 101cdf0e10cSrcweir { nSourceDocID = nVal; } GetSourceDocID() const102cdf0e10cSrcweir sal_uInt32 GetSourceDocID() const { return nSourceDocID; } 103cdf0e10cSrcweir 104cdf0e10cSrcweir static ScDrawTransferObj* GetOwnClipboard( Window* pUIWin ); 105cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException ); 106cdf0e10cSrcweir static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); 107cdf0e10cSrcweir GetProtectedChartRangesVector() const108cdf0e10cSrcweir const ScRangeListVector& GetProtectedChartRangesVector() const { return m_aProtectedChartRangesVector; } 109cdf0e10cSrcweir }; 110cdf0e10cSrcweir 111cdf0e10cSrcweir #endif 112cdf0e10cSrcweir 113