LibreOffice Module sc (master) 1
viewfun7.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
21#include <com/sun/star/embed/XEmbeddedObject.hpp>
22
23#include <svx/svditer.hxx>
24#include <svx/svdograf.hxx>
25#include <svx/svdoole2.hxx>
26#include <svx/svdouno.hxx>
27#include <svx/svdpage.hxx>
28#include <svx/svdpagv.hxx>
29#include <svx/svdundo.hxx>
30#include <svtools/embedhlp.hxx>
31#include <sfx2/objsh.hxx>
32#include <sfx2/ipclient.hxx>
34#include <com/sun/star/embed/Aspects.hpp>
35#include <osl/diagnose.h>
36
37#include <document.hxx>
38#include <viewfunc.hxx>
39#include <tabvwsh.hxx>
40#include <drawview.hxx>
41#include <scmod.hxx>
42#include <drwlayer.hxx>
43#include <drwtrans.hxx>
44#include <globstr.hrc>
45#include <scresid.hxx>
46#include <docuno.hxx>
47#include <docsh.hxx>
48#include <dragdata.hxx>
49#include <gridwin.hxx>
50
51bool bPasteIsMove = false;
52
53using namespace com::sun::star;
54
55static void lcl_AdjustInsertPos( ScViewData& rData, Point& rPos, const Size& rSize )
56{
57 SdrPage* pPage = rData.GetScDrawView()->GetModel()->GetPage( static_cast<sal_uInt16>(rData.GetTabNo()) );
58 OSL_ENSURE(pPage,"pPage ???");
59 Size aPgSize( pPage->GetSize() );
60 if (aPgSize.Width() < 0)
61 aPgSize.setWidth( -aPgSize.Width() );
62 tools::Long x = aPgSize.Width() - rPos.X() - rSize.Width();
63 tools::Long y = aPgSize.Height() - rPos.Y() - rSize.Height();
64 // if necessary: adjustments (80/200) for pixel approx. errors
65 if( x < 0 )
66 rPos.AdjustX(x + 80 );
67 if( y < 0 )
68 rPos.AdjustY(y + 200 );
69 rPos.AdjustX(rSize.Width() / 2 ); // position at paste is center
70 rPos.AdjustY(rSize.Height() / 2 );
71}
72
73void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
74 bool bGroup, std::u16string_view rSrcShellID, std::u16string_view rDestShellID )
75{
76 bool bSameDocClipboard = rSrcShellID == rDestShellID;
77
79 Point aPos( rLogicPos );
80
81 // MapMode at Outliner-RefDevice has to be right (as in FuText::MakeOutliner)
83 MapMode aOldMapMode;
85 if (pRef)
86 {
87 aOldMapMode = pRef->GetMapMode();
88 pRef->SetMapMode( MapMode(MapUnit::Map100thMM) );
89 }
90
91 bool bNegativePage = GetViewData().GetDocument().IsNegativePage( GetViewData().GetTabNo() );
92
93 SdrView* pDragEditView = nullptr;
94 ScModule* pScMod = SC_MOD();
95 const ScDragData& rData = pScMod->GetDragData();
96 ScDrawTransferObj* pDrawTrans = rData.pDrawTransfer;
97 if (pDrawTrans)
98 {
99 pDragEditView = pDrawTrans->GetDragSourceView();
100
101 aPos -= aDragStartDiff;
102 if ( bNegativePage )
103 {
104 if (aPos.X() > 0) aPos.setX( 0 );
105 }
106 else
107 {
108 if (aPos.X() < 0) aPos.setX( 0 );
109 }
110 if (aPos.Y() < 0) aPos.setY( 0 );
111 }
112
113 ScDrawView* pScDrawView = GetScDrawView();
114 if (bGroup)
115 pScDrawView->BegUndo( ScResId( STR_UNDO_PASTE ) );
116
117 bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() );
118 if (bSameDoc)
119 {
120 // copy locally - incl. charts
121
122 Point aSourceStart = pDragEditView->GetAllMarkedRect().TopLeft();
123 tools::Long nDiffX = aPos.X() - aSourceStart.X();
124 tools::Long nDiffY = aPos.Y() - aSourceStart.Y();
125
126 // move within a page?
127
128 if ( bPasteIsMove &&
129 pScDrawView->GetSdrPageView()->GetPage() ==
130 pDragEditView->GetSdrPageView()->GetPage() )
131 {
132 if ( nDiffX != 0 || nDiffY != 0 )
133 pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY));
134 }
135 else
136 {
137 SdrModel* pDrawModel = pDragEditView->GetModel();
138 SCTAB nTab = GetViewData().GetTabNo();
139 SdrPage* pDestPage = pDrawModel->GetPage( static_cast< sal_uInt16 >( nTab ) );
140 OSL_ENSURE(pDestPage,"who is this, Page?");
141
142 ::std::vector< OUString > aExcludedChartNames;
143 if ( pDestPage )
144 {
145 ScChartHelper::GetChartNames( aExcludedChartNames, pDestPage );
146 }
147
148 SdrMarkList aMark = pDragEditView->GetMarkedObjectList();
149 aMark.ForceSort();
150 const size_t nMarkCnt=aMark.GetMarkCount();
151 for (size_t nm=0; nm<nMarkCnt; ++nm) {
152 const SdrMark* pM=aMark.GetMark(nm);
153 const SdrObject* pObj=pM->GetMarkedSdrObj();
154
155 // Directly Clone to target SdrModel
156 rtl::Reference<SdrObject> pNewObj(pObj->CloneSdrObject(*pDrawModel));
157
158 if (pNewObj!=nullptr)
159 {
160 // copy graphics within the same model - always needs new name
161 if ( dynamic_cast<const SdrGrafObj*>( pNewObj.get()) != nullptr && !bPasteIsMove )
162 pNewObj->SetName(static_cast<ScDrawLayer*>(pDrawModel)->GetNewGraphicName());
163
164 if (nDiffX!=0 || nDiffY!=0)
165 pNewObj->NbcMove(Size(nDiffX,nDiffY));
166 if (pDestPage)
167 pDestPage->InsertObject( pNewObj.get() );
168 pScDrawView->AddUndo(std::make_unique<SdrUndoInsertObj>( *pNewObj ));
169
170 if (ScDrawLayer::IsCellAnchored(*pNewObj))
171 ScDrawLayer::SetCellAnchoredFromPosition(*pNewObj, GetViewData().GetDocument(), nTab,
173 }
174 }
175
176 if (bPasteIsMove)
177 pDragEditView->DeleteMarked();
178
179 ScDocument& rDocument = GetViewData().GetDocument();
180 ScDocShell* pDocShell = GetViewData().GetDocShell();
181 ScModelObj* pModelObj = ( pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr );
182 if ( pDestPage && pModelObj && pDrawTrans )
183 {
184 const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
185 ScChartHelper::CreateProtectedChartListenersAndNotify( rDocument, pDestPage, pModelObj, nTab,
186 rProtectedChartRangesVector, aExcludedChartNames, bSameDoc );
187 }
188 }
189 }
190 else
191 {
192 bPasteIsMove = false; // no internal move happened
193 SdrView aView(*pModel); // #i71529# never create a base class of SdrView directly!
194 SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
195 aView.MarkAllObj(pPv);
196 Size aSize = aView.GetAllMarkedRect().GetSize();
197 lcl_AdjustInsertPos( GetViewData(), aPos, aSize );
198
199 // don't change marking if OLE object is active
200 // (at Drop from OLE object it would be deactivated in the middle of ExecuteDrag!)
201
202 SdrInsertFlags nOptions = SdrInsertFlags::NONE;
204 if ( pClient && pClient->IsObjectInPlaceActive() )
205 nOptions |= SdrInsertFlags::DONTMARK;
206
207 ::std::vector< OUString > aExcludedChartNames;
208 SCTAB nTab = GetViewData().GetTabNo();
209 SdrPage* pPage = pScDrawView->GetModel()->GetPage( static_cast< sal_uInt16 >( nTab ) );
210 OSL_ENSURE( pPage, "Page?" );
211 if ( pPage )
212 {
213 ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
214 }
215
216 // #89247# Set flag for ScDocument::UpdateChartListeners() which is
217 // called during paste.
218 if ( !bSameDocClipboard )
220
221 pScDrawView->Paste(*pModel, aPos, nullptr, nOptions);
222
223 if ( !bSameDocClipboard )
225
226 // Paste puts all objects on the active (front) layer
227 // controls must be on SC_LAYER_CONTROLS
228 if (pPage)
229 {
230 SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups );
231 SdrObject* pObject = aIter.Next();
232 while (pObject)
233 {
234 if ( dynamic_cast<const SdrUnoObj*>( pObject) != nullptr && pObject->GetLayer() != SC_LAYER_CONTROLS )
235 pObject->NbcSetLayer(SC_LAYER_CONTROLS);
236
240
241 pObject = aIter.Next();
242 }
243 }
244
245 // all graphics objects must have names
247
248 ScDocument& rDocument = GetViewData().GetDocument();
249 ScDocShell* pDocShell = GetViewData().GetDocShell();
250 ScModelObj* pModelObj = ( pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr );
252 if ( pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
253 {
254 const ScRangeListVector& rProtectedChartRangesVector(
255 pTransferObj ? pTransferObj->GetProtectedChartRangesVector() : pDrawTrans->GetProtectedChartRangesVector() );
256 ScChartHelper::CreateProtectedChartListenersAndNotify( rDocument, pPage, pModelObj, nTab,
257 rProtectedChartRangesVector, aExcludedChartNames, bSameDocClipboard );
258 }
259 }
260
261 if (bGroup)
262 {
263 pScDrawView->GroupMarked();
264 pScDrawView->EndUndo();
265 }
266
267 if (pRef)
268 pRef->SetMapMode( aOldMapMode );
269
270 // GetViewData().GetViewShell()->SetDrawShell( true );
271 // It is not sufficient to just set the DrawShell if we pasted, for
272 // example, a chart. SetDrawShellOrSub() would only work for D&D in the
273 // same document but not if inserting from the clipboard, therefore
274 // MarkListHasChanged() is what we need.
275 pScDrawView->MarkListHasChanged();
276
277}
278
279bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj,
280 const Size* pDescSize, const Graphic* pReplGraph, const OUString& aMediaType, sal_Int64 nAspect )
281{
283 if ( xObj.is() )
284 {
285 OUString aName;
286 //TODO/MBA: is that OK?
288 if ( !aCnt.HasEmbeddedObject( xObj ) )
289 aCnt.InsertEmbeddedObject( xObj, aName );
290 else
291 aName = aCnt.GetEmbeddedObjectName( xObj );
292
293 svt::EmbeddedObjectRef aObjRef( xObj, nAspect );
294 if ( pReplGraph )
295 aObjRef.SetGraphic( *pReplGraph, aMediaType );
296
297 Size aSize;
298 if ( nAspect == embed::Aspects::MSOLE_ICON )
299 {
300 MapMode aMapMode( MapUnit::Map100thMM );
301 aSize = aObjRef.GetSize( &aMapMode );
302 }
303 else
304 {
305 // working with visual area can switch object to running state
306 MapUnit aMapObj = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
307 MapUnit aMap100 = MapUnit::Map100thMM;
308
309 if ( pDescSize && pDescSize->Width() && pDescSize->Height() )
310 {
311 // use size from object descriptor if given
312 aSize = OutputDevice::LogicToLogic(*pDescSize, MapMode(aMap100), MapMode(aMapObj));
313 awt::Size aSz;
314 aSz.Width = aSize.Width();
315 aSz.Height = aSize.Height();
316 xObj->setVisualAreaSize( nAspect, aSz );
317 }
318
319 awt::Size aSz;
320 try
321 {
322 aSz = xObj->getVisualAreaSize( nAspect );
323 }
324 catch ( embed::NoVisualAreaSizeException& )
325 {
326 // the default size will be set later
327 }
328
329 aSize = Size( aSz.Width, aSz.Height );
330 aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMapObj), MapMode(aMap100)); // for SdrOle2Obj
331
332 if( aSize.IsEmpty() )
333 {
334 OSL_FAIL("SvObjectDescriptor::GetSize == 0");
335 aSize.setWidth( 5000 );
336 aSize.setHeight( 5000 );
337 aSize = OutputDevice::LogicToLogic(aSize, MapMode(aMap100), MapMode(aMapObj));
338 aSz.Width = aSize.Width();
339 aSz.Height = aSize.Height();
340 xObj->setVisualAreaSize( nAspect, aSz );
341 }
342 }
343
344 // don't call AdjustInsertPos
345 Point aInsPos = rPos;
346 if ( GetViewData().GetDocument().IsNegativePage( GetViewData().GetTabNo() ) )
347 aInsPos.AdjustX( -(aSize.Width()) );
348 tools::Rectangle aRect( aInsPos, aSize );
349
350 ScDrawView* pDrView = GetScDrawView();
352 pDrView->getSdrModelFromSdrView(),
353 aObjRef,
354 aName,
355 aRect);
356
357 SdrPageView* pPV = pDrView->GetSdrPageView();
358 pDrView->InsertObjectSafe( pSdrObj.get(), *pPV ); // don't mark if OLE
360 return true;
361 }
362 else
363 return false;
364}
365
366bool ScViewFunc::PasteBitmapEx( const Point& rPos, const BitmapEx& rBmpEx )
367{
368 Graphic aGraphic(rBmpEx);
369 return PasteGraphic( rPos, aGraphic, "" );
370}
371
372bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf )
373{
374 Graphic aGraphic(rMtf);
375 return PasteGraphic( rPos, aGraphic, "" );
376}
377
378bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
379 const OUString& rFile )
380{
382 ScDrawView* pScDrawView = GetScDrawView();
383
384 if (!pScDrawView)
385 return false;
386
387 // #i123922# check if the drop was over an existing object; if yes, evtl. replace
388 // the graphic for a SdrGraphObj (including link state updates) or adapt the fill
389 // style for other objects
390 SdrPageView* pPageView = pScDrawView->GetSdrPageView();
391 if (pPageView)
392 {
393 SdrObject* pPickObj = pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPageView);
394 if (pPickObj)
395 {
396 const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
397 SdrObject* pResult = pScDrawView->ApplyGraphicToObject(
398 *pPickObj,
399 rGraphic,
400 aBeginUndo,
401 rFile);
402
403 if (pResult)
404 {
405 // we are done; mark the modified/new object
406 pScDrawView->MarkObj(pResult, pScDrawView->GetSdrPageView());
407 return true;
408 }
409 }
410 }
411
412 Point aPos( rPos );
413 vcl::Window* pWin = GetActiveWin();
414 MapMode aSourceMap = rGraphic.GetPrefMapMode();
415 MapMode aDestMap( MapUnit::Map100thMM );
416
417 if (aSourceMap.GetMapUnit() == MapUnit::MapPixel)
418 {
419 // consider pixel correction, so bitmap fits to screen
420 Fraction aScaleX, aScaleY;
421 pScDrawView->CalcNormScale( aScaleX, aScaleY );
422 aDestMap.SetScaleX(aScaleX);
423 aDestMap.SetScaleY(aScaleY);
424 }
425
426 Size aSize = pWin->LogicToLogic( rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
427
428 if ( GetViewData().GetDocument().IsNegativePage( GetViewData().GetTabNo() ) )
429 aPos.AdjustX( -(aSize.Width()) );
430
432 tools::Rectangle aRect(aPos, aSize);
434 pScDrawView->getSdrModelFromSdrView(),
435 rGraphic,
436 aRect);
437
438 // path was the name of the graphic in history
439
440 ScDrawLayer* pLayer = static_cast<ScDrawLayer*>( pScDrawView->GetModel() );
441 OUString aName = pLayer->GetNewGraphicName(); // "Graphics"
442 pGrafObj->SetName(aName);
443
444 // don't mark if OLE
445 bool bSuccess = pScDrawView->InsertObjectSafe(pGrafObj.get(), *pScDrawView->GetSdrPageView());
446
447 // SetGraphicLink has to be used after inserting the object,
448 // otherwise an empty graphic is swapped in and the contact stuff crashes.
449 // See #i37444#.
450 if (bSuccess && !rFile.isEmpty())
451 pGrafObj->SetGraphicLink( rFile );
452
453 return bSuccess;
454}
455
456/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< ScRangeList > ScRangeListVector
Definition: charthelper.hxx:29
virtual bool Paste(const SdrModel &rMod, const Point &rPos, SdrObjList *pLst, SdrInsertFlags nOptions) override
Size GetPrefSize() const
MapMode GetPrefMapMode() const
void SetScaleY(const Fraction &rScaleY)
MapUnit GetMapUnit() const
void SetScaleX(const Fraction &rScaleX)
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void SetMapMode()
const MapMode & GetMapMode() const
static void CreateProtectedChartListenersAndNotify(ScDocument &rDoc, const SdrPage *pPage, ScModelObj *pModelObj, SCTAB nTab, const ScRangeListVector &rRangesVector, const ::std::vector< OUString > &rExcludedChartNames, bool bSameDoc=true)
static void GetChartNames(::std::vector< OUString > &rChartNames, const SdrPage *pPage)
void EnsureGraphicNames()
Definition: documen9.cxx:393
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1006
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1082
void SetPastingDrawFromOtherDoc(bool bVal)
Definition: document.hxx:2516
static void SetCellAnchoredFromPosition(SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab, bool bResizeWithCell)
Definition: drwlayer.cxx:2304
static bool IsResizeWithCell(const SdrObject &rObj)
Definition: drwlayer.cxx:2436
static bool IsCellAnchored(const SdrObject &rObj)
Definition: drwlayer.cxx:2429
OUString GetNewGraphicName(tools::Long *pnCounter=nullptr) const
Definition: drwlayer.cxx:2207
static ScDrawTransferObj * GetOwnClipboard(const css::uno::Reference< css::datatransfer::XTransferable2 > &)
Definition: drwtrans.cxx:232
const ScRangeListVector & GetProtectedChartRangesVector() const
Definition: drwtrans.hxx:96
SdrView * GetDragSourceView()
Definition: drwtrans.hxx:88
SdrObject * ApplyGraphicToObject(SdrObject &rHitObject, const Graphic &rGraphic, const OUString &rBeginUndoText, const OUString &rFile)
Definition: drawview.cxx:1126
void CalcNormScale(Fraction &rFractX, Fraction &rFractY) const
Definition: drawvie4.cxx:410
bool InsertObjectSafe(SdrObject *pObj, SdrPageView &rPV)
Definition: drawview.cxx:806
virtual void MarkListHasChanged() override
Definition: drawview.cxx:358
const ScDragData & GetDragData() const
Definition: scmod.cxx:598
static css::uno::Reference< css::datatransfer::XTransferable2 > GetClipData(vcl::Window *pWin)
Definition: tabvwshc.cxx:494
void SetDrawShell(bool bActive)
Definition: tabvwsh4.cxx:613
void MakeDrawLayer()
Definition: tabview2.cxx:1427
ScViewData & GetViewData()
Definition: tabview.hxx:335
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:877
ScDrawView * GetScDrawView()
Definition: tabview.hxx:343
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
ScDrawView * GetScDrawView()
Definition: viewdata.cxx:3169
bool PasteGraphic(const Point &rPos, const Graphic &rGraphic, const OUString &rFile)
Definition: viewfun7.cxx:378
bool PasteMetaFile(const Point &, const GDIMetaFile &)
Definition: viewfun7.cxx:372
bool PasteBitmapEx(const Point &, const BitmapEx &)
Definition: viewfun7.cxx:366
void PasteDraw()
Definition: viewfun3.cxx:468
bool PasteObject(const Point &, const css::uno::Reference< css::embed::XEmbeddedObject > &, const Size *, const Graphic *=nullptr, const OUString &=OUString(), sal_Int64 nAspect=css::embed::Aspects::MSOLE_CONTENT)
Definition: viewfun7.cxx:279
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
void GroupMarked()
void BegUndo()
void MoveAllMarked(const Size &rSiz, bool bCopy=false)
void EndUndo()
void ForceSort() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
void MarkAllObj(SdrPageView *pPV=nullptr)
const tools::Rectangle & GetAllMarkedRect() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
OutputDevice * GetRefDevice() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
SdrPageView * ShowSdrPage(SdrPage *pPage) override
SdrObject * Next()
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const
SdrPage * GetPage() const
Size GetSize() const
SdrModel * GetModel() const
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
sal_uInt16 getHitTolLog() const
virtual void DeleteMarked()
bool IsObjectInPlaceActive() const
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual SfxObjectShell * GetObjectShell() override
SfxInPlaceClient * GetIPClient() const
bool IsEmpty() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
bool HasEmbeddedObject(const OUString &)
OUString GetEmbeddedObjectName(const css::uno::Reference< css::embed::XEmbeddedObject > &) const
bool InsertEmbeddedObject(const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString &)
void SetGraphic(const Graphic &rGraphic, const OUString &rMediaType)
Size GetSize(MapMode const *pTargetMapMode) const
constexpr Point TopLeft() const
constexpr Size GetSize() const
Size LogicToLogic(const Size &rSzSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Point aDragStartDiff
Definition: drawvie4.cxx:56
float y
float x
EmbeddedObjectRef * pObject
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
OUString aName
MapUnit
long Long
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
#define SC_MOD()
Definition: scmod.hxx:249
ScDrawTransferObj * pDrawTransfer
Definition: dragdata.hxx:21
SdrInsertFlags
sal_Int16 SCTAB
Definition: types.hxx:22
static void lcl_AdjustInsertPos(ScViewData &rData, Point &rPos, const Size &rSize)
Definition: viewfun7.cxx:55
bool bPasteIsMove
Definition: viewfun7.cxx:51