21#include <com/sun/star/embed/XEmbedObjectClipboardCreator.hpp>
22#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
23#include <com/sun/star/embed/MSOLEObjectSystemCreator.hpp>
24#include <com/sun/star/lang/XComponent.hpp>
47#include <svx/svxids.hrc>
50#include <osl/diagnose.h>
83#define CHECK_FORMAT_TRANS( _def_Type ) ( ( nFormat == (_def_Type) || nFormat == SotClipboardFormatId::NONE ) && aDataHelper.HasFormat( _def_Type ) )
93struct ImpRememberOrigAndClone
103 for(
const ImpRememberOrigAndClone& rImp : aConnectorContainer)
105 if(pConnObj == rImp.pOrig)
114 if(rWorkArea.IsEmpty())
122 if(aMarkRect.
Left() < rWorkArea.Left())
124 rPos.
AdjustX(rWorkArea.Left() - aMarkRect.
Left() );
127 if(aMarkRect.
Right() > rWorkArea.Right())
129 rPos.
AdjustX( -(aMarkRect.
Right() - rWorkArea.Right()) );
132 if(aMarkRect.
Top() < rWorkArea.Top())
134 rPos.
AdjustY(rWorkArea.Top() - aMarkRect.
Top() );
137 if(aMarkRect.
Bottom() > rWorkArea.Bottom())
147 if( !rDataHelper.
GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMtf ) )
150 bool bVector =
false;
157 while( pAction && !bVector )
161 case MetaActionType::POINT:
162 case MetaActionType::LINE:
163 case MetaActionType::RECT:
164 case MetaActionType::ROUNDRECT:
165 case MetaActionType::ELLIPSE:
166 case MetaActionType::ARC:
167 case MetaActionType::PIE:
168 case MetaActionType::CHORD:
169 case MetaActionType::POLYLINE:
170 case MetaActionType::POLYGON:
171 case MetaActionType::POLYPOLYGON:
172 case MetaActionType::TEXT:
173 case MetaActionType::TEXTARRAY:
174 case MetaActionType::STRETCHTEXT:
175 case MetaActionType::TEXTRECT:
176 case MetaActionType::GRADIENT:
177 case MetaActionType::HATCH:
178 case MetaActionType::WALLPAPER:
179 case MetaActionType::EPS:
180 case MetaActionType::TEXTLINE:
181 case MetaActionType::FLOATTRANSPARENT:
182 case MetaActionType::GRADIENTEX:
183 case MetaActionType::BMPSCALEPART:
184 case MetaActionType::BMPEXSCALEPART:
187 case MetaActionType::BMP:
188 case MetaActionType::BMPSCALE:
189 case MetaActionType::BMPEX:
190 case MetaActionType::BMPEXSCALE:
191 if( aGraphic.
GetType() != GraphicType::NONE )
195 else switch( pAction->
GetType() )
197 case MetaActionType::BMP:
204 case MetaActionType::BMPSCALE:
207 if( pBmpScaleAction )
211 case MetaActionType::BMPEX:
218 case MetaActionType::BMPEXSCALE:
221 if( pBmpExScaleAction )
236 if( !bVector && (aGraphic.
GetType() == GraphicType::NONE) )
240 Point aInsertPos( rPos );
265 std::unique_ptr<ImageMap> pImageMap;
266 bool bReturn =
false;
277 nPasteOptions |= SdrInsertFlags::DONTMARK;
295 pImplementation =
nullptr;
298 bool bSelfDND =
false;
301 if( pImplementation )
303 if(
SD_MOD()->pTransferClip == pImplementation )
304 pOwnData =
SD_MOD()->pTransferClip;
305 else if(
SD_MOD()->pTransferDrag == pImplementation )
307 pOwnData =
SD_MOD()->pTransferDrag;
310 else if(
SD_MOD()->pTransferSelection == pImplementation )
311 pOwnData =
SD_MOD()->pTransferSelection;
315 if (bGroupUndoFromDragWithDrop)
322 if( !pOwnData && aDataHelper.
HasFormat( SotClipboardFormatId::SVIM ) )
330 pImageMap->Read( *xStm );
336 if( !bLink && (nFormat == SotClipboardFormatId::NONE || (nFormat == SotClipboardFormatId::RTF) || (nFormat == SotClipboardFormatId::RICHTEXT)) )
339 bool bIsRTF = aDataHelper.
HasFormat( SotClipboardFormatId::RTF );
340 if( ( bIsRTF || aDataHelper.
HasFormat( SotClipboardFormatId::RICHTEXT ) )
341 && ! aDataHelper.
HasFormat( SotClipboardFormatId::DRAWING ) )
345 if( aDataHelper.
GetSotStorageStream( bIsRTF ? SotClipboardFormatId::RTF : SotClipboardFormatId::RICHTEXT, xStm ) )
350 while (xStm->ReadLine(aLine))
352 size_t x = std::string_view(aLine).find(
"\\trowd" );
353 if (
x != std::string_view::npos)
356 nFormat = bIsRTF ? SotClipboardFormatId::RTF : SotClipboardFormatId::RICHTEXT;
369 if (!bReturn && pOwnData)
374 if (pSource.
is() && pDestination)
382 if( !bReturn && pOwnData && nFormat == SotClipboardFormatId::NONE )
391 else if( pSourceView )
393 if( pSourceView ==
this )
402 OUString aLayer = pLayer->
GetName();
434 bool bDropOnTabBar =
true;
439 bDropOnTabBar =
false;
466 std::vector<ImpRememberOrigAndClone> aConnectorContainer;
467 size_t nConnectorCount = 0;
472 if( pOwnData ==
SD_MOD()->pTransferSelection )
477 aCurPos = aCurBoundRect.
TopLeft();
486 std::unordered_set<rtl::OUString> aNameSet;
497 pObj->NbcMove(aVector);
513 ImpRememberOrigAndClone aRem;
515 aRem.pClone = pObj.get();
516 aConnectorContainer.push_back(aRem);
518 if(
dynamic_cast< SdrEdgeObj *
>( pObj.get() ) !=
nullptr)
526 for(
size_t a = 0;
a < aConnectorContainer.size(); ++
a)
528 ImpRememberOrigAndClone* pRem = &aConnectorContainer[
a];
530 if(
auto pCloneEdge =
dynamic_cast<SdrEdgeObj *
>( pRem->pClone ))
543 pCloneEdge->ConnectToNode(
false, pConnClone);
544 pCloneEdge->GetConnection(
false).SetConnectorId(rConn0.
GetConnectorId());
560 pCloneEdge->SetTailPoint(
false, aPosition);
575 pCloneEdge->ConnectToNode(
true, pConnClone);
576 pCloneEdge->GetConnection(
true).SetConnectorId(rConn1.
GetConnectorId());
592 pCloneEdge->SetTailPoint(
true, aPosition);
639 aLayout = aLayout.copy(0,
nPos);
669 pWorkModel->
DeletePage(
static_cast<sal_uInt16
>(
i) );
680 aLayout = aLayout.copy(0,
nPos);
690 Point aInsertPos(rPos);
694 const sal_Int32 nGraphicContentSize(xStm->Tell());
697 aGraphic.
SetGfxLink(std::make_shared<GfxLink>(aGraphicContent, GfxLinkType::NativePdf));
717 Reference< XComponent > xComponent = xShell->GetModel();
721 bReturn =
SvxDrawingLayerImport( pModel, xInputStream, xComponent,
"com.sun.star.comp.Impress.XMLOasisImporter" );
725 OSL_FAIL(
"empty or invalid drawing xml document on clipboard!" );
729 bool bChanged =
false;
753 pNewObj->NbcResize( aObjRect.
TopLeft(), aScaleWidth, aScaleHeight );
756 pNewObj->NbcMove(
Size( aVec.
X(), aVec.
Y() ) );
762 pNewObj->NbcSetLayer( pPickObj->
GetLayer() );
780 dynamic_cast< const SdrGrafObj *
>( pPickObj ) ==
nullptr &&
781 dynamic_cast< const SdrOle2Obj *
>( pPickObj ) ==
nullptr )
824 std::make_unique<E3dAttributesUndoAction>(
865 if( aDataHelper.
GetString( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, aOUString ) )
878 pObj->SetLogicRect( aRect );
888 aDataHelper.
HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR))
891 uno::Reference < io::XInputStream > xStm;
897 xStm = aDataHelper.
GetInputStream(nFormat != SotClipboardFormatId::NONE ? nFormat : SotClipboardFormatId::EMBED_SOURCE, aDocShellID);
899 xStm = aDataHelper.
GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ, aDocShellID);
911 if( xDocShRef->DoLoad( pMedium ) )
944 aLayout = aLayout.copy(0,
nPos);
948 xDocShRef->DoClose();
961 if ( aObjDesc.
mnViewAspect == embed::Aspects::MSOLE_ICON )
967 MapMode aMapMode( MapUnit::Map100thMM );
968 aSize = aObjRef.
GetSize( &aMapMode );
978 aSz.Width = aTmp.
Width();
979 aSz.Height = aTmp.
Height();
987 catch( embed::NoVisualAreaSizeException& )
992 aSize =
Size( aSz.Width, aSz.Height );
999 aSz.Width = aSize.
Width();
1000 aSz.Height = aSize.
Height();
1027 nOptions |= SdrInsertFlags::DONTMARK;
1033 if (bInserted && pImageMap)
1034 pObj->AppendUserData( std::unique_ptr<SdrObjUserData>(
new SvxIMapInfo( *pImageMap )) );
1036 if (bInserted && pObj->IsChart())
1038 bool bDisableDataTableDialog =
false;
1040 uno::Reference< beans::XPropertySet > xProps( xObj->getComponent(), uno::UNO_QUERY );
1042 ( xProps->getPropertyValue(
"DisableDataTableDialog" ) >>= bDisableDataTableDialog ) &&
1043 bDisableDataTableDialog )
1045 xProps->setPropertyValue(
"DisableDataTableDialog" ,
uno::Any(
false ) );
1046 xProps->setPropertyValue(
"DisableComplexChartTypes" ,
uno::Any(
false ) );
1047 uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
1048 if ( xModifiable.is() )
1050 xModifiable->setModified(
true );
1064 aDataHelper.
HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR_OLE))
1067 if( (nFormat != SotClipboardFormatId::NONE) || !aDataHelper.
HasFormat( SotClipboardFormatId::GDIMETAFILE ) )
1069 uno::Reference < io::XInputStream > xStm;
1074 uno::Reference < embed::XEmbeddedObject > xObj;
1077 xStm = aDataHelper.
GetInputStream(nFormat != SotClipboardFormatId::NONE ? nFormat : SotClipboardFormatId::EMBED_SOURCE_OLE, OUString());
1079 xStm = aDataHelper.
GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ_OLE, OUString());
1090 uno::Reference < embed::XEmbedObjectClipboardCreator > xClipboardCreator =
1091 embed::MSOLEObjectSystemCreator::create( ::comphelper::getProcessComponentContext() );
1093 embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard(
1096 uno::Sequence< beans::PropertyValue >() );
1100 xObj = aInfo.Object;
1104 catch( uno::Exception& )
1118 if( aDataHelper.
GetGraphic( SotClipboardFormatId::SVXB, aGraphic ) )
1119 nGrFormat = SotClipboardFormatId::SVXB;
1120 else if( aDataHelper.
GetGraphic( SotClipboardFormatId::GDIMETAFILE, aGraphic ) )
1121 nGrFormat = SotClipboardFormatId::GDIMETAFILE;
1122 else if( aDataHelper.
GetGraphic( SotClipboardFormatId::BITMAP, aGraphic ) )
1123 nGrFormat = SotClipboardFormatId::BITMAP;
1127 if ( nGrFormat != SotClipboardFormatId::NONE )
1129 datatransfer::DataFlavor aDataFlavor;
1131 aObjRef.
SetGraphic( aGraphic, aDataFlavor.MimeType );
1135 if ( aObjDesc.
mnViewAspect == embed::Aspects::MSOLE_ICON )
1141 MapMode aMapMode( MapUnit::Map100thMM );
1142 aSize = aObjRef.
GetSize( &aMapMode );
1151 aSz = xObj->getVisualAreaSize( aObjDesc.
mnViewAspect );
1153 catch( embed::NoVisualAreaSizeException& )
1161 if ( aSz.Width != aTmp.
Width() || aSz.Height != aTmp.
Height() )
1163 aSz.Width = aTmp.
Width();
1164 aSz.Height = aTmp.
Height();
1169 aSize =
Size( aSz.Width, aSz.Height );
1174 aSz.Width = aSize.
Width();
1175 aSz.Height = aSize.
Height();
1202 nOptions |= SdrInsertFlags::DONTMARK;
1210 pObj->AppendUserData( std::unique_ptr<SdrObjUserData>(
new SvxIMapInfo( *pImageMap )) );
1219 if( !bReturn && aDataHelper.
HasFormat( SotClipboardFormatId::GDIMETAFILE ) )
1227 if(!bReturn && (!bLink || pPickObj) &&
CHECK_FORMAT_TRANS(SotClipboardFormatId::SVXB))
1233 Point aInsertPos( rPos );
1266 if(!bReturn && (!bLink || pPickObj) &&
CHECK_FORMAT_TRANS(SotClipboardFormatId::GDIMETAFILE))
1268 Point aInsertPos( rPos );
1287 bReturn =
InsertMetaFile( aDataHelper, aInsertPos, pImageMap.get(), nFormat == SotClipboardFormatId::NONE );
1290 if(!bReturn && (!bLink || pPickObj) &&
CHECK_FORMAT_TRANS(SotClipboardFormatId::BITMAP))
1295 aDataHelper.
GetBitmapEx(SotClipboardFormatId::BITMAP, aBmpEx);
1302 if(aDataHelper.
GetGraphic(SotClipboardFormatId::GDIMETAFILE, aGraphic))
1306 else if(aDataHelper.
GetGraphic(SotClipboardFormatId::SVXB, aGraphic))
1310 else if(aDataHelper.
GetGraphic(SotClipboardFormatId::BITMAP, aGraphic))
1318 Point aInsertPos( rPos );
1347 uno::Any const data(aDataHelper.
GetAny(SotClipboardFormatId::XFA,
""));
1348 uno::Sequence<beans::NamedValue>
props;
1354 AddUndo(
GetModel().GetSdrUndoFactory().CreateUndoAttrObject(*pPickObj));
1359 drawing::FillStyle eFill(drawing::FillStyle_BITMAP);
1361 auto it =
map.find(
"FillStyle");
1362 if (it !=
map.end())
1366 eFill = style.GetValue();
1368 it =
map.find(
"FillColor");
1369 if (it !=
map.end())
1372 color.PutValue(it->second, 0);
1373 aColor =
color.GetColorValue();
1376 if( eFill == drawing::FillStyle_SOLID || eFill == drawing::FillStyle_NONE )
1382 const ::tools::Long n2HitLog = fHitLog * 2;
1383 Point aHitPosR( rPos );
1384 Point aHitPosL( rPos );
1385 Point aHitPosT( rPos );
1386 Point aHitPosB( rPos );
1390 aHitPosL.
AdjustX( -n2HitLog );
1392 aHitPosB.
AdjustY( -n2HitLog );
1401 if(eFill == drawing::FillStyle_SOLID )
1428 if(!bReturn && !bLink &&
CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT))
1431 if( aDataHelper.
GetSotStorageStream( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT, xStm ) )
1456 if(!bReturn && !bLink)
1463 if( aDataHelper.
GetSotStorageStream( bIsRTF ? SotClipboardFormatId::RTF : SotClipboardFormatId::RICHTEXT, xStm ) )
1500 if( aDataHelper.
GetFileList( SotClipboardFormatId::FILE_LIST, aDropFileList ) )
1517 if( aDataHelper.
GetString( SotClipboardFormatId::SIMPLE_FILE, aDropFile ) )
1529 if( ( SotClipboardFormatId::STRING == nFormat ) ||
1530 ( !aDataHelper.
HasFormat( SotClipboardFormatId::SOLK ) &&
1531 !aDataHelper.
HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
1532 !aDataHelper.
HasFormat( SotClipboardFormatId::FILENAME ) ) )
1536 if( aDataHelper.
GetString( SotClipboardFormatId::STRING, aOUString ) )
1556 if (bGroupUndoFromDragWithDrop)
1571 xShell->DoInitNew();
const Size & GetPrefSize() const
virtual bool Paste(const SdrModel &rMod, const Point &rPos, SdrObjList *pLst, SdrInsertFlags nOptions) override
virtual std::unique_ptr< SdrModel > CreateMarkedObjModel() const override
OUString GetFile(size_t nIndex) const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE) override
void SetPrefMapMode(const MapMode &rPrefMapMode)
GraphicType GetType() const
void SetGfxLink(const std::shared_ptr< GfxLink > &rGfxLink)
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
MapMode GetPrefMapMode() const
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
void SetPrefSize(const Size &rPrefSize)
virtual void Start(bool bStartTimer=true) override
void Read(SvStream &rInput, EETextFormat eFormat, SvKeyValueIterator *pHTTPHeaderAttrs)
void InsertText(const OUString &rNew, bool bSelect=false)
vcl::Window * GetWindow() const
tools::Rectangle const & GetOutputArea() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual SAL_DLLPRIVATE rtl::Reference< SdrPage > AllocPage(bool bMasterPage) override
SAL_DLLPRIVATE SfxItemPool & GetPool()
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
SAL_DLLPRIVATE void InsertPage(SdrPage *pPage, sal_uInt16 nPos=0xFFFF) override
SAL_DLLPRIVATE void CreatingDataObj(SdTransferable *pTransferable)
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
SAL_DLLPRIVATE void DeletePage(sal_uInt16 nPgNum) override
SAL_DLLPRIVATE DocumentType GetDocumentType() const
PageKind GetPageKind() const
virtual OUString GetLayoutName() const override
void SetPresentationLayout(std::u16string_view rLayoutName, bool bReplaceStyleSheets=true, bool bSetMasterPage=true, bool bReverseOrder=false)
const SfxObjectShellRef & GetDocShell() const
bool IsPageTransferable() const
const ::sd::View * GetView() const
void SetInternalMove(bool bSet)
const Point & GetStartPos() const
const SdDrawDocument * GetWorkDocument() const
static SdTransferable * getImplementation(const css::uno::Reference< css::uno::XInterface > &rxData) noexcept
const tools::Rectangle & GetWorkArea() const
SdrObjConnection & GetConnection(bool bTail1)
bool IsUndoEnabled() const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void MoveAllMarked(const Size &rSiz, bool bCopy=false)
virtual bool Paste(const SdrModel &rMod, const Point &rPos, SdrObjList *pLst, SdrInsertFlags nOptions)
sal_uInt16 FindGluePoint(sal_uInt16 nId) const
Point GetAbsolutePos(const SdrObject &rObj) const
const Graphic & GetGraphic() const
SdrLayer * GetLayerPerID(SdrLayerID nID)
const OUString & GetName() const
size_t GetMarkCount() const
bool TakeBoundRect(SdrPageView const *pPageView, tools::Rectangle &rRect) const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
void SortMarkedObjects() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
size_t GetMarkedObjectCount() const
SdrMark * GetSdrMarkByIndex(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
const Size & GetMaxObjSize() const
SdrUndoFactory & GetSdrUndoFactory() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
const SdrLayerAdmin & GetLayerAdmin() const
sal_uInt16 GetPageCount() const
sal_uInt16 GetConnectorId() const
SdrObject * GetObject() const
const OutlinerView * GetTextEditOutlinerView() const
virtual bool IsTextEdit() const final override
const tools::Rectangle & GetAllObjBoundRect() const
void InsertObjectThenMakeNameUnique(SdrObject *pObj)
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void SetSdrObjListRectsDirty()
virtual rtl::Reference< SdrObject > RemoveObject(size_t nObjNum)
sal_uInt32 GetOrdNum() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
bool IsGroupObject() const
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const=0
virtual const SdrGluePointList * GetGluePointList() const
const SfxItemSet & GetMergedItemSet() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
const SdrLayerIDSet & GetVisibleLayers() const
SdrPage * GetPage() const
bool IsLayerLocked(const OUString &rName) const
sal_uInt16 GetPageNum() const
SdrModel & getSdrModelFromSdrPage() const
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
sal_uInt16 getHitTolLog() const
const OUString & GetActiveLayer() const
virtual std::unique_ptr< SdrUndoAction > CreateUndoNewObject(SdrObject &rObject, bool bOrdNumDirect=false)
virtual std::unique_ptr< SdrUndoAction > CreateUndoAttrObject(SdrObject &rObject, bool bStyleSheet1=false, bool bSaveText=false)
virtual std::unique_ptr< SdrUndoAction > CreateUndoDeleteObject(SdrObject &rObject, bool bOrdNumDirect=false)
static bool ShowPasteInfo(SfxClassificationCheckPasteResult eResult)
static SfxClassificationCheckPasteResult CheckPaste(const css::uno::Reference< css::document::XDocumentProperties > &xSource, const css::uno::Reference< css::document::XDocumentProperties > &xDestination)
bool IsObjectInPlaceActive() const
void SetDefaultMetric(MapUnit eNewMetric)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
static OUString CreateShellID(const SfxObjectShell *pShell)
SvKeyValueIterator * GetHeaderAttributes()
SfxViewShell * GetViewShell() const
SfxInPlaceClient * GetIPClient() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static bool GetFormatDataFlavor(SotClipboardFormatId nFormat, css::datatransfer::DataFlavor &rFlavor)
bool GetTransferableObjectDescriptor(SotClipboardFormatId nFormat, TransferableObjectDescriptor &rDesc)
bool GetString(SotClipboardFormatId nFormat, OUString &rStr) const
css::uno::Any GetAny(SotClipboardFormatId nFormat, const OUString &rDestDoc) const
bool GetFileList(SotClipboardFormatId nFormat, FileList &rFileList) const
css::uno::Reference< css::io::XInputStream > GetInputStream(SotClipboardFormatId nFormat, const OUString &rDestDoc) const
bool GetSotStorageStream(SotClipboardFormatId nFormat, tools::SvRef< SotTempStream > &rStreamRef) const
bool GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMetaFile &rMtf, size_t nMaxActions=0) const
bool HasFormat(SotClipboardFormatId nFormat) const
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable() const
bool GetBitmapEx(SotClipboardFormatId nFormat, BitmapEx &rBmp) const
bool GetGraphic(SotClipboardFormatId nFormat, Graphic &rGraphic) const
void readGraphic(Graphic &rGraphic)
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
bool InsertEmbeddedObject(const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString &)
static css::uno::Reference< css::embed::XStorage > GetStorageFromInputStream(const css::uno::Reference< css::io::XInputStream > &xStream, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
SfxClassificationCheckPasteResult
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
virtual void DragFinished(sal_Int8 nDropAction)
bool IsPresObjSelected(bool bOnPage=true, bool bOnMasterPage=true, bool bCheckPresObjListOnly=false, bool bCheckLayoutOnly=false) const
Is a presentation object selected?
SdrGrafObj * InsertGraphic(const Graphic &rGraphic, sal_Int8 &rAction, const Point &rPos, SdrObject *pSelectedObj, ImageMap const *pImageMap)
If an empty graphic object is provided, we fill it.
::std::unique_ptr< ViewClipboard > mpClipboard
std::unique_ptr< SdrMarkList > mpDragSrcMarkList
bool InsertData(const TransferableDataHelper &rDataHelper, const Point &rPos, sal_Int8 &rDnDAction, bool bDrag, SotClipboardFormatId nFormat=SotClipboardFormatId::NONE, sal_uInt16 nPage=SDRPAGE_NOTFOUND, SdrLayerID nLayer=SDRLAYER_NOTFOUND)
bool PasteRTFTable(const ::tools::SvRef< SotTempStream > &xStm, SdrPage *pPage, SdrInsertFlags nPasteOptions)
sal_uInt16 mnDragSrcPgNum
::std::vector< OUString > maDropFileVector
bool InsertMetaFile(const TransferableDataHelper &rDataHelper, const Point &rInsertPos, ImageMap const *pImageMap, bool bOptimize)
gets the metafile from the given transferable helper and insert it as a graphic shape.
virtual void MarkListHasChanged() override
Idle maDropInsertFileIdle
An SdWindow contains the actual working area of ViewShell.
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
void SetGraphic(const Graphic &rGraphic, const OUString &rMediaType)
Size GetSize(MapMode const *pTargetMapMode) const
Point PixelToLogic(const Point &rDevicePt) const
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr OUStringLiteral SD_LT_SEPARATOR
static void ImpCheckInsertPos(Point &rPos, const Size &rSize, const ::tools::Rectangle &rWorkArea)
static SdrObject * ImpGetClone(std::vector< ImpRememberOrigAndClone > &aConnectorContainer, SdrObject const *pConnObj)
void CreateTableFromRTF(SvStream &rStream, SdDrawDocument *pModel)
bool ImportPDF(SvStream &rStream, Graphic &rGraphic)
OUString SdResId(TranslateId aId)
SVXCORE_DLLPUBLIC SdrObject * SdrObjectPrimitiveHit(const SdrObject &rObject, const Point &rPnt, const basegfx::B2DVector &rHitTolerance, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly, drawinglayer::primitive2d::Primitive2DContainer *pHitContainer=nullptr)
#define CHECK_FORMAT_TRANS(_def_Type)
std::map< OUString, rtl::Reference< Entity > > map
constexpr TypedWhichId< SdrMetricItem > SDRATTR_CORNER_RADIUS(SDRATTR_MISC_FIRST+0)
#define SDRGLUEPOINT_NOTFOUND
SVXCORE_DLLPUBLIC E3dObject * DynCastE3dObject(SdrObject *)
constexpr SdrLayerID SDRLAYER_NOTFOUND(-1)
SVXCORE_DLLPUBLIC bool SvxDrawingLayerImport(SdrModel *pModel, const css::uno::Reference< css::io::XInputStream > &xInputStream)