LibreOffice Module svx (master)  1
svdovirt.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 
21 #include <svx/svdovirt.hxx>
22 #include <svx/svdhdl.hxx>
24 #include <svx/svdograf.hxx>
25 #include <svx/svddrgv.hxx>
27 
29 {
30  return rRefObj.GetProperties();
31 }
32 
33 
34 // #i27224#
35 std::unique_ptr<sdr::contact::ViewContact> SdrVirtObj::CreateObjectSpecificViewContact()
36 {
37  return std::make_unique<sdr::contact::ViewContactOfVirtObj>(*this);
38 }
39 
41  SdrModel& rSdrModel,
42  SdrObject& rNewObj)
43 : SdrObject(rSdrModel),
44  rRefObj(rNewObj)
45 {
46  m_bVirtObj=true; // this is only a virtual object
47  rRefObj.AddReference(*this);
49 }
50 
52  SdrModel& rSdrModel, SdrVirtObj const & rSource)
53 : SdrObject(rSdrModel, rSource),
54  rRefObj(rSource.rRefObj)
55 {
56  m_bVirtObj=true; // this is only a virtual object
58 
59  rRefObj.AddReference(*this);
60 
61  aSnapRect = rSource.aSnapRect;
62  m_aAnchor = rSource.m_aAnchor;
63 }
64 
66 {
67  rRefObj.DelReference(*this);
68 }
69 
71 {
72  return rRefObj;
73 }
74 
76 {
77  return rRefObj;
78 }
79 
80 void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
81 {
83  SetBoundAndSnapRectsDirty(); // TODO: Optimize this.
84 
85  // Only a repaint here, rRefObj may have changed and broadcasts
86  ActionChanged();
87 }
88 
89 void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
90 {
91  m_aAnchor=rAnchorPos;
92 }
93 
95 {
96  rRefObj.TakeObjInfo(rInfo);
97 }
98 
100 {
101  return rRefObj.GetObjInventor();
102 }
103 
105 {
106  return rRefObj.GetObjIdentifier();
107 }
108 
110 {
111  return rRefObj.GetSubList();
112 }
113 
115 {
116  m_aOutRect = rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
118  return m_aOutRect;
119 }
120 
122 {
123  m_aOutRect = rRefObj.GetLastBoundRect(); // TODO: Optimize this.
125  return m_aOutRect;
126 }
127 
129 {
132 }
133 
135 {
136  return new SdrVirtObj(rTargetModel, *this);
137  // TTTT not sure if the above works - how could SdrObjFactory::MakeNewObject
138  // create an object with correct rRefObj (?) OTOH VirtObj probably needs not
139  // to be cloned ever - only used in Writer for multiple instances e.g. Header/Footer
140  // return new SdrVirtObj(
141  // getSdrModelFromSdrObject(),
142  // rRefObj); // only a further reference
143 }
144 
146 {
147  OUString sName = "[" + rRefObj.TakeObjNameSingul() + "]";
148 
149  OUString aName(GetName());
150  if (!aName.isEmpty())
151  sName += " '" + aName + "'";
152 
153  return sName;
154 }
155 
157 {
158  return "[" + rRefObj.TakeObjNamePlural() + "]";
159 }
160 
162 {
163  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
164  return rRefObj.HasLimitedRotation();
165 }
166 
168 {
170 
171  if(m_aAnchor.X() || m_aAnchor.Y())
172  {
174  }
175 
176  return aPolyPolygon;
177 }
178 
179 
180 sal_uInt32 SdrVirtObj::GetHdlCount() const
181 {
182  return rRefObj.GetHdlCount();
183 }
184 
186 {
187  SdrHdlList tempList(nullptr);
188  rRefObj.AddToHdlList(tempList);
189  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
190  {
191  SdrHdl* pHdl = tempList.GetHdl(i);
192  Point aP(pHdl->GetPos()+m_aAnchor);
193  pHdl->SetPos(aP);
194  }
195  tempList.MoveTo(rHdlList);
196 }
197 
198 void SdrVirtObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
199 {
200  SdrHdlList tempList(nullptr);
201  rRefObj.AddToPlusHdlList(tempList, rHdl);
202  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
203  {
204  SdrHdl* pHdl = tempList.GetHdl(i);
205  Point aP(pHdl->GetPos()+m_aAnchor);
206  pHdl->SetPos(aP);
207  }
208  tempList.MoveTo(rHdlList);
209 }
210 
212 {
213  return rRefObj.hasSpecialDrag();
214 }
215 
217 {
218  return false;
219 }
220 
222 {
223  SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
224  return SdrObjectUniquePtr(new SdrGrafObj(
226  SdrDragView::GetObjGraphic(rReferencedObject),
227  GetLogicRect()));
228 }
229 
231 {
232  return rRefObj.beginSpecialDrag(rDrag);
233 }
234 
236 {
237  return rRefObj.applySpecialDrag(rDrag);
238 }
239 
241 {
242  return rRefObj.getSpecialDragPoly(rDrag);
243  // TODO: we don't handle offsets yet!
244 }
245 
246 OUString SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
247 {
248  return rRefObj.getSpecialDragComment(rDrag);
249 }
250 
251 
253 {
254  return rRefObj.BegCreate(rStat);
255 }
256 
258 {
259  return rRefObj.MovCreate(rStat);
260 }
261 
263 {
264  return rRefObj.EndCreate(rStat,eCmd);
265 }
266 
268 {
269  return rRefObj.BckCreate(rStat);
270 }
271 
273 {
274  rRefObj.BrkCreate(rStat);
275 }
276 
278 {
279  return rRefObj.TakeCreatePoly(rDrag);
280  // TODO: we don't handle offsets yet!
281 }
282 
283 
284 void SdrVirtObj::NbcMove(const Size& rSiz)
285 {
286  m_aAnchor.Move(rSiz);
288 }
289 
290 void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
291 {
292  rRefObj.NbcResize(rRef-m_aAnchor,xFact,yFact);
294 }
295 
296 void SdrVirtObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
297 {
298  rRefObj.NbcRotate(rRef-m_aAnchor,nAngle,sn,cs);
300 }
301 
302 void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
303 {
304  rRefObj.NbcMirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
306 }
307 
308 void SdrVirtObj::NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
309 {
310  rRefObj.NbcShear(rRef-m_aAnchor,nAngle,tn,bVShear);
312 }
313 
314 
315 void SdrVirtObj::Move(const Size& rSiz)
316 {
317  if (!rSiz.IsEmpty()) {
318  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
319  NbcMove(rSiz);
320  SetChanged();
323  }
324 }
325 
326 void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
327 {
328  if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
329  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
330  rRefObj.Resize(rRef-m_aAnchor,xFact,yFact, bUnsetRelative);
333  }
334 }
335 
336 void SdrVirtObj::Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
337 {
338  if (nAngle) {
339  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
340  rRefObj.Rotate(rRef-m_aAnchor,nAngle,sn,cs);
343  }
344 }
345 
346 void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
347 {
348  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
349  rRefObj.Mirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
352 }
353 
354 void SdrVirtObj::Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
355 {
356  if (nAngle) {
357  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
358  rRefObj.Shear(rRef-m_aAnchor,nAngle,tn,bVShear);
361  }
362 }
363 
364 
366 {
369 }
370 
372 {
373  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
374  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor;
375  return aSnapRect;
376 }
377 
379 {
380  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
381  tools::Rectangle aR(rRect);
382  aR-=m_aAnchor;
383  rRefObj.SetSnapRect(aR);
386 }
387 
389 {
390  tools::Rectangle aR(rRect);
391  aR-=m_aAnchor;
394 }
395 
396 
398 {
399  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
400  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
401  return aSnapRect;
402 }
403 
405 {
406  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
407  tools::Rectangle aR(rRect);
408  aR-=m_aAnchor;
409  rRefObj.SetLogicRect(aR);
412 }
413 
415 {
416  tools::Rectangle aR(rRect);
417  aR-=m_aAnchor;
420 }
421 
422 
424 {
425  return rRefObj.GetRotateAngle();
426 }
427 
429 {
430  return rRefObj.GetShearAngle(bVertical);
431 }
432 
433 
435 {
436  return rRefObj.GetSnapPointCount();
437 }
438 
439 Point SdrVirtObj::GetSnapPoint(sal_uInt32 i) const
440 {
441  Point aP(rRefObj.GetSnapPoint(i));
442  aP+=m_aAnchor;
443  return aP;
444 }
445 
447 {
448  return rRefObj.IsPolyObj();
449 }
450 
451 sal_uInt32 SdrVirtObj::GetPointCount() const
452 {
453  return rRefObj.GetPointCount();
454 }
455 
456 Point SdrVirtObj::GetPoint(sal_uInt32 i) const
457 {
458  return rRefObj.GetPoint(i) + m_aAnchor;
459 }
460 
461 void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
462 {
463  Point aP(rPnt);
464  aP-=m_aAnchor;
465  rRefObj.SetPoint(aP,i);
467 }
468 
469 
470 std::unique_ptr<SdrObjGeoData> SdrVirtObj::NewGeoData() const
471 {
472  return rRefObj.NewGeoData();
473 }
474 
476 {
477  rRefObj.SaveGeoData(rGeo);
478 }
479 
481 {
482  rRefObj.RestoreGeoData(rGeo);
484 }
485 
486 
487 std::unique_ptr<SdrObjGeoData> SdrVirtObj::GetGeoData() const
488 {
489  return rRefObj.GetGeoData();
490 }
491 
493 {
494  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
495  rRefObj.SetGeoData(rGeo);
498 }
499 
500 
502 {
504 }
505 
507 {
508  return rRefObj.HasMacro();
509 }
510 
512 {
513  return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
514 }
515 
517 {
518  return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
519 }
520 
521 void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
522 {
523  rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
524 }
525 
527 {
528  return rRefObj.DoMacro(rRec); // TODO: positioning offset
529 }
530 
532 {
533  // #i73248# default offset of SdrVirtObj is aAnchor
534  return m_aAnchor;
535 }
536 
537 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1594
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1405
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1119
virtual std::unique_ptr< SdrObjGeoData > NewGeoData() const
A derived class must override these 3 methods if it has own geometric data that must be saved for Und...
Definition: svdobj.cxx:1893
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdovirt.cxx:397
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:654
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const override
Definition: svdovirt.cxx:487
virtual const tools::Rectangle & GetLastBoundRect() const override
Definition: svdovirt.cxx:121
virtual Point GetPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:456
SdrObject & ReferencedObj()
Definition: svdovirt.cxx:75
bool IsClosedObj() const
Definition: svdobj.hxx:734
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:949
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1374
tools::Rectangle aSnapRect
Definition: svdovirt.hxx:40
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
Definition: svdobj.cxx:1546
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:343
void SetPoint(const Point &rPnt, sal_uInt32 i)
Definition: svdobj.cxx:1738
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1361
void DelReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:728
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdovirt.cxx:94
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdovirt.cxx:167
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:230
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:296
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:354
bool m_bClosedObj
Definition: svdobj.hxx:902
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1723
virtual bool HasLimitedRotation() const override
Definition: svdovirt.cxx:161
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1433
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1463
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdovirt.cxx:35
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1522
virtual const tools::Rectangle & GetCurrentBoundRect() const override
Definition: svdovirt.cxx:114
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
Definition: svdovirt.cxx:252
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:308
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1322
virtual void SetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:404
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdovirt.cxx:284
SdrInventor
Definition: svdobj.hxx:99
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1075
tools::Rectangle m_aOutRect
Definition: svdobj.hxx:882
virtual OUString TakeObjNamePlural() const override
Definition: svdovirt.cxx:156
const Point & GetPos() const
Definition: svdhdl.hxx:197
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1222
virtual sal_uInt32 GetPointCount() const
Definition: svdobj.cxx:1728
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:649
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:210
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
Definition: svdovirt.cxx:461
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:346
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:173
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:738
virtual sal_uInt32 GetSnapPointCount() const override
snap to special points of an Object (polygon points, center of circle)
Definition: svdovirt.cxx:434
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1242
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1660
SdrObjKind
Definition: svdobjkind.hxx:24
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1850
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:336
Provides information about various ZObject properties.
Definition: svdobj.hxx:195
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const
Definition: svdobj.cxx:1948
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:240
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1401
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1393
static Graphic GetObjGraphic(const SdrObject &rSdrObject)
Generate a Graphic for the given draw object.
Definition: svdxcgv.cxx:601
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1718
SdrObject & rRefObj
Definition: svdovirt.hxx:39
const SdrObject & GetReferencedObj() const
Definition: svdovirt.cxx:70
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:388
virtual void Move(const Size &rSiz) override
Definition: svdovirt.cxx:315
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:480
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:1064
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:510
virtual bool DoMacro(const SdrObjMacroHitRec &rRec) override
Definition: svdovirt.cxx:526
virtual SdrVirtObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdovirt.cxx:134
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1384
virtual bool HasMacro() const override
Definition: svdovirt.cxx:506
void AddReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:723
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1921
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdovirt.cxx:185
virtual sal_uInt32 GetPointCount() const override
Definition: svdovirt.cxx:451
bool IsEmpty() const
int i
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2324
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdovirt.cxx:475
virtual void NbcSetAnchorPos(const Point &rAnchorPos) override
Definition: svdovirt.cxx:89
OUString sName
virtual void BrkCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:272
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1491
void BroadcastObjectChange() const
Definition: svdobj.cxx:1001
virtual void SetGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1955
virtual Degree100 GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1708
SdrVirtObj(const SdrVirtObj &)=delete
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1366
void ActionChanged() const
Definition: svdobj.cxx:263
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1898
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:279
virtual bool MovCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:257
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:884
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual bool HasMacro() const
Definition: svdobj.cxx:1845
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: svdovirt.cxx:262
virtual void NbcReformatText() override
Definition: svdovirt.cxx:501
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdovirt.cxx:235
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1694
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1865
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:67
virtual sal_uInt32 GetHdlCount() const
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdobj.cxx:1217
Abstract DrawObject.
Definition: svdobj.hxx:259
virtual std::unique_ptr< SdrObjGeoData > NewGeoData() const override
A derived class must override these 3 methods if it has own geometric data that must be saved for Und...
Definition: svdovirt.cxx:470
virtual OUString TakeObjNameSingul() const override
Definition: svdovirt.cxx:145
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1585
virtual SdrInventor GetObjInventor() const override
Definition: svdovirt.cxx:99
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:644
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:511
virtual Degree100 GetShearAngle(bool bVertical=false) const override
Definition: svdovirt.cxx:428
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:439
virtual void SetGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:492
Point m_aAnchor
Definition: svdobj.hxx:883
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:963
virtual void NbcReformatText()
Definition: svdobj.cxx:1836
size_t GetHdlCount() const
Definition: svdhdl.hxx:459
SdrHdl * GetHdl(size_t nNum) const
Definition: svdhdl.hxx:460
virtual Degree100 GetRotateAngle() const override
Definition: svdovirt.cxx:423
sal_Int32 GetDenominator() const
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:246
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1860
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1665
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdovirt.cxx:365
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1675
virtual bool supportsFullDrag() const override
Definition: svdovirt.cxx:216
virtual bool BckCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:267
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdovirt.cxx:371
OUString aName
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdovirt.cxx:80
FIXME: The virtual object is not yet fully implemented and tested.
Definition: svdovirt.hxx:29
sal_Int32 GetNumerator() const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdovirt.cxx:180
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:97
virtual bool IsPolyObj() const override
Definition: svdovirt.cxx:446
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1338
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdovirt.cxx:277
PointerStyle
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdovirt.cxx:104
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:414
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1085
virtual sdr::properties::BaseProperties & GetProperties() const override
Definition: svdovirt.cxx:28
virtual SdrObjList * GetSubList() const override
Definition: svdovirt.cxx:109
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1574
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1685
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1349
virtual Point GetOffset() const
Definition: svdovirt.cxx:531
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1703
virtual ~SdrVirtObj() override
Definition: svdovirt.cxx:65
bool m_bVirtObj
Definition: svdobj.hxx:888
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1670
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:516
virtual bool DoMacro(const SdrObjMacroHitRec &rRec)
Definition: svdobj.cxx:1882
virtual SdrObjectUniquePtr getFullDragClone() const override
Definition: svdovirt.cxx:221
virtual void RecalcBoundRect() override
Definition: svdovirt.cxx:128
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
SdrCreateCmd
Definition: svdtypes.hxx:26
virtual void SetChanged()
Definition: svdobj.cxx:1025
virtual Point GetPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1733
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:302
const OUString & GetName() const
Definition: svdobj.cxx:792
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:521
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1410
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2762
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdovirt.cxx:290
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1713
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
Definition: svdovirt.cxx:326
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdovirt.cxx:211
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const override
Definition: svdovirt.cxx:198
virtual void SetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:378