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 #include <rtl/ustrbuf.hxx>
28 
30 {
31  return rRefObj.GetProperties();
32 }
33 
34 
35 // #i27224#
36 std::unique_ptr<sdr::contact::ViewContact> SdrVirtObj::CreateObjectSpecificViewContact()
37 {
38  return std::make_unique<sdr::contact::ViewContactOfVirtObj>(*this);
39 }
40 
42  SdrModel& rSdrModel,
43  SdrObject& rNewObj)
44 : SdrObject(rSdrModel),
45  rRefObj(rNewObj)
46 {
47  m_bVirtObj=true; // this is only a virtual object
48  rRefObj.AddReference(*this);
50 }
51 
53  SdrModel& rSdrModel, SdrVirtObj const & rSource)
54 : SdrObject(rSdrModel, rSource),
55  rRefObj(rSource.rRefObj)
56 {
57  m_bVirtObj=true; // this is only a virtual object
59 
60  rRefObj.AddReference(*this);
61 
62  aSnapRect = rSource.aSnapRect;
63  m_aAnchor = rSource.m_aAnchor;
64 }
65 
67 {
68  rRefObj.DelReference(*this);
69 }
70 
72 {
73  return rRefObj;
74 }
75 
77 {
78  return rRefObj;
79 }
80 
81 void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
82 {
84  SetRectsDirty(); // TODO: Optimize this.
85 
86  // Only a repaint here, rRefObj may have changed and broadcasts
87  ActionChanged();
88 }
89 
90 void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
91 {
92  m_aAnchor=rAnchorPos;
93 }
94 
96 {
97  rRefObj.TakeObjInfo(rInfo);
98 }
99 
101 {
102  return rRefObj.GetObjInventor();
103 }
104 
106 {
107  return rRefObj.GetObjIdentifier();
108 }
109 
111 {
112  return rRefObj.GetSubList();
113 }
114 
116 {
117  m_aOutRect = rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
119  return m_aOutRect;
120 }
121 
123 {
124  m_aOutRect = rRefObj.GetLastBoundRect(); // TODO: Optimize this.
126  return m_aOutRect;
127 }
128 
130 {
133 }
134 
136 {
137  return new SdrVirtObj(rTargetModel, *this);
138  // TTTT not sure if the above works - how could SdrObjFactory::MakeNewObject
139  // create an object with correct rRefObj (?) OTOH VirtObj probably needs not
140  // to be cloned ever - only used in Writer for multiple instances e.g. Header/Footer
141  // return new SdrVirtObj(
142  // getSdrModelFromSdrObject(),
143  // rRefObj); // only a further reference
144 }
145 
147 {
148  OUStringBuffer sName(rRefObj.TakeObjNameSingul());
149  sName.insert(0, '[');
150  sName.append(']');
151 
152  OUString aName(GetName());
153  if (!aName.isEmpty())
154  {
155  sName.append(' ');
156  sName.append('\'');
157  sName.append(aName);
158  sName.append('\'');
159  }
160 
161  return sName.makeStringAndClear();
162 }
163 
165 {
166  OUStringBuffer sName(rRefObj.TakeObjNamePlural());
167  sName.insert(0, '[');
168  sName.append(']');
169  return sName.makeStringAndClear();
170 }
171 
173 {
174  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
175  return rRefObj.HasLimitedRotation();
176 }
177 
179 {
181 
182  if(m_aAnchor.X() || m_aAnchor.Y())
183  {
185  }
186 
187  return aPolyPolygon;
188 }
189 
190 
191 sal_uInt32 SdrVirtObj::GetHdlCount() const
192 {
193  return rRefObj.GetHdlCount();
194 }
195 
197 {
198  SdrHdlList tempList(nullptr);
199  rRefObj.AddToHdlList(tempList);
200  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
201  {
202  SdrHdl* pHdl = tempList.GetHdl(i);
203  Point aP(pHdl->GetPos()+m_aAnchor);
204  pHdl->SetPos(aP);
205  }
206  tempList.MoveTo(rHdlList);
207 }
208 
209 void SdrVirtObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
210 {
211  SdrHdlList tempList(nullptr);
212  rRefObj.AddToPlusHdlList(tempList, rHdl);
213  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
214  {
215  SdrHdl* pHdl = tempList.GetHdl(i);
216  Point aP(pHdl->GetPos()+m_aAnchor);
217  pHdl->SetPos(aP);
218  }
219  tempList.MoveTo(rHdlList);
220 }
221 
223 {
224  return rRefObj.hasSpecialDrag();
225 }
226 
228 {
229  return false;
230 }
231 
233 {
234  SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
235  return SdrObjectUniquePtr(new SdrGrafObj(
237  SdrDragView::GetObjGraphic(rReferencedObject),
238  GetLogicRect()));
239 }
240 
242 {
243  return rRefObj.beginSpecialDrag(rDrag);
244 }
245 
247 {
248  return rRefObj.applySpecialDrag(rDrag);
249 }
250 
252 {
253  return rRefObj.getSpecialDragPoly(rDrag);
254  // TODO: we don't handle offsets yet!
255 }
256 
257 OUString SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
258 {
259  return rRefObj.getSpecialDragComment(rDrag);
260 }
261 
262 
264 {
265  return rRefObj.BegCreate(rStat);
266 }
267 
269 {
270  return rRefObj.MovCreate(rStat);
271 }
272 
274 {
275  return rRefObj.EndCreate(rStat,eCmd);
276 }
277 
279 {
280  return rRefObj.BckCreate(rStat);
281 }
282 
284 {
285  rRefObj.BrkCreate(rStat);
286 }
287 
289 {
290  return rRefObj.TakeCreatePoly(rDrag);
291  // TODO: we don't handle offsets yet!
292 }
293 
294 
295 void SdrVirtObj::NbcMove(const Size& rSiz)
296 {
297  m_aAnchor.Move(rSiz);
298  SetRectsDirty();
299 }
300 
301 void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
302 {
303  rRefObj.NbcResize(rRef-m_aAnchor,xFact,yFact);
304  SetRectsDirty();
305 }
306 
307 void SdrVirtObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
308 {
309  rRefObj.NbcRotate(rRef-m_aAnchor,nAngle,sn,cs);
310  SetRectsDirty();
311 }
312 
313 void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
314 {
315  rRefObj.NbcMirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
316  SetRectsDirty();
317 }
318 
319 void SdrVirtObj::NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
320 {
321  rRefObj.NbcShear(rRef-m_aAnchor,nAngle,tn,bVShear);
322  SetRectsDirty();
323 }
324 
325 
326 void SdrVirtObj::Move(const Size& rSiz)
327 {
328  if (!rSiz.IsEmpty()) {
329  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
330  NbcMove(rSiz);
331  SetChanged();
334  }
335 }
336 
337 void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
338 {
339  if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
340  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
341  rRefObj.Resize(rRef-m_aAnchor,xFact,yFact, bUnsetRelative);
342  SetRectsDirty();
344  }
345 }
346 
347 void SdrVirtObj::Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
348 {
349  if (nAngle) {
350  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
351  rRefObj.Rotate(rRef-m_aAnchor,nAngle,sn,cs);
352  SetRectsDirty();
354  }
355 }
356 
357 void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
358 {
359  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
360  rRefObj.Mirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
361  SetRectsDirty();
363 }
364 
365 void SdrVirtObj::Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
366 {
367  if (nAngle) {
368  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
369  rRefObj.Shear(rRef-m_aAnchor,nAngle,tn,bVShear);
370  SetRectsDirty();
372  }
373 }
374 
375 
377 {
380 }
381 
383 {
384  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
385  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor;
386  return aSnapRect;
387 }
388 
390 {
391  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
392  tools::Rectangle aR(rRect);
393  aR-=m_aAnchor;
394  rRefObj.SetSnapRect(aR);
395  SetRectsDirty();
397 }
398 
400 {
401  tools::Rectangle aR(rRect);
402  aR-=m_aAnchor;
403  SetRectsDirty();
405 }
406 
407 
409 {
410  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
411  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
412  return aSnapRect;
413 }
414 
416 {
417  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
418  tools::Rectangle aR(rRect);
419  aR-=m_aAnchor;
420  rRefObj.SetLogicRect(aR);
421  SetRectsDirty();
423 }
424 
426 {
427  tools::Rectangle aR(rRect);
428  aR-=m_aAnchor;
429  SetRectsDirty();
431 }
432 
433 
435 {
436  return rRefObj.GetRotateAngle();
437 }
438 
440 {
441  return rRefObj.GetShearAngle(bVertical);
442 }
443 
444 
446 {
447  return rRefObj.GetSnapPointCount();
448 }
449 
450 Point SdrVirtObj::GetSnapPoint(sal_uInt32 i) const
451 {
452  Point aP(rRefObj.GetSnapPoint(i));
453  aP+=m_aAnchor;
454  return aP;
455 }
456 
458 {
459  return rRefObj.IsPolyObj();
460 }
461 
462 sal_uInt32 SdrVirtObj::GetPointCount() const
463 {
464  return rRefObj.GetPointCount();
465 }
466 
467 Point SdrVirtObj::GetPoint(sal_uInt32 i) const
468 {
469  return rRefObj.GetPoint(i) + m_aAnchor;
470 }
471 
472 void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
473 {
474  Point aP(rPnt);
475  aP-=m_aAnchor;
476  rRefObj.SetPoint(aP,i);
477  SetRectsDirty();
478 }
479 
480 
481 std::unique_ptr<SdrObjGeoData> SdrVirtObj::NewGeoData() const
482 {
483  return rRefObj.NewGeoData();
484 }
485 
487 {
488  rRefObj.SaveGeoData(rGeo);
489 }
490 
492 {
493  rRefObj.RestoreGeoData(rGeo);
494  SetRectsDirty();
495 }
496 
497 
498 std::unique_ptr<SdrObjGeoData> SdrVirtObj::GetGeoData() const
499 {
500  return rRefObj.GetGeoData();
501 }
502 
504 {
505  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
506  rRefObj.SetGeoData(rGeo);
507  SetRectsDirty();
509 }
510 
511 
513 {
515 }
516 
518 {
519  return rRefObj.HasMacro();
520 }
521 
523 {
524  return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
525 }
526 
528 {
529  return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
530 }
531 
532 void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
533 {
534  rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
535 }
536 
538 {
539  return rRefObj.DoMacro(rRec); // TODO: positioning offset
540 }
541 
543 {
544  // #i73248# default offset of SdrVirtObj is aAnchor
545  return m_aAnchor;
546 }
547 
548 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1579
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1390
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1105
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:1878
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdovirt.cxx:408
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:637
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const override
Definition: svdovirt.cxx:498
virtual const tools::Rectangle & GetLastBoundRect() const override
Definition: svdovirt.cxx:122
virtual Point GetPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:467
SdrObject & ReferencedObj()
Definition: svdovirt.cxx:76
bool IsClosedObj() const
Definition: svdobj.hxx:736
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:931
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1359
tools::Rectangle aSnapRect
Definition: svdovirt.hxx:41
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
Definition: svdobj.cxx:1531
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:341
void SetPoint(const Point &rPnt, sal_uInt32 i)
Definition: svdobj.cxx:1723
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1346
void DelReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:711
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdovirt.cxx:95
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdovirt.cxx:178
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:241
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:307
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:365
bool m_bClosedObj
Definition: svdobj.hxx:892
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1708
virtual bool HasLimitedRotation() const override
Definition: svdovirt.cxx:172
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1418
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1448
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdovirt.cxx:36
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1507
virtual const tools::Rectangle & GetCurrentBoundRect() const override
Definition: svdovirt.cxx:115
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
Definition: svdovirt.cxx:263
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:319
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1307
virtual void SetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:415
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdovirt.cxx:295
SdrInventor
Definition: svdobj.hxx:98
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1056
tools::Rectangle m_aOutRect
Definition: svdobj.hxx:872
virtual OUString TakeObjNamePlural() const override
Definition: svdovirt.cxx:164
const Point & GetPos() const
Definition: svdhdl.hxx:197
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1207
virtual sal_uInt32 GetPointCount() const
Definition: svdobj.cxx:1713
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:632
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:207
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
Definition: svdovirt.cxx:472
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:357
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:172
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:721
SdrObjKind
Definition: svdobjkind.hxx:24
virtual sal_uInt32 GetSnapPointCount() const override
snap to special points of an Object (polygon points, center of circle)
Definition: svdovirt.cxx:445
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1227
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1645
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1835
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:347
Provides information about various ZObject properties.
Definition: svdobj.hxx:194
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const
Definition: svdobj.cxx:1933
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:251
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1386
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1378
static Graphic GetObjGraphic(const SdrObject &rSdrObject)
Generate a Graphic for the given draw object.
Definition: svdxcgv.cxx:584
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1703
SdrObject & rRefObj
Definition: svdovirt.hxx:40
const SdrObject & GetReferencedObj() const
Definition: svdovirt.cxx:71
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:399
virtual void Move(const Size &rSiz) override
Definition: svdovirt.cxx:326
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:491
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:1045
virtual bool DoMacro(const SdrObjMacroHitRec &rRec) override
Definition: svdovirt.cxx:537
virtual SdrVirtObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdovirt.cxx:135
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1369
virtual bool HasMacro() const override
Definition: svdovirt.cxx:517
void AddReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:706
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1906
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdovirt.cxx:196
virtual sal_uInt32 GetPointCount() const override
Definition: svdovirt.cxx:462
bool IsEmpty() const
int i
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2323
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdovirt.cxx:486
virtual void NbcSetAnchorPos(const Point &rAnchorPos) override
Definition: svdovirt.cxx:90
OUString sName
virtual void BrkCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:283
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1476
void BroadcastObjectChange() const
Definition: svdobj.cxx:982
virtual void SetGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1940
virtual Degree100 GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1693
SdrVirtObj(const SdrVirtObj &)=delete
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1351
void ActionChanged() const
Definition: svdobj.cxx:260
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1883
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:276
virtual bool MovCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:268
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:874
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual bool HasMacro() const
Definition: svdobj.cxx:1830
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: svdovirt.cxx:273
virtual void NbcReformatText() override
Definition: svdovirt.cxx:512
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdovirt.cxx:246
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1679
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1850
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:77
virtual sal_uInt32 GetHdlCount() const
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdobj.cxx:1202
Abstract DrawObject.
Definition: svdobj.hxx:258
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:481
virtual OUString TakeObjNameSingul() const override
Definition: svdovirt.cxx:146
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1570
OUString GetName() const
Definition: svdobj.cxx:775
virtual SdrInventor GetObjInventor() const override
Definition: svdovirt.cxx:100
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:627
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:522
virtual Degree100 GetShearAngle(bool bVertical=false) const override
Definition: svdovirt.cxx:439
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:450
virtual void SetGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:503
Point m_aAnchor
Definition: svdobj.hxx:873
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:945
virtual void NbcReformatText()
Definition: svdobj.cxx:1821
size_t GetHdlCount() const
Definition: svdhdl.hxx:461
SdrHdl * GetHdl(size_t nNum) const
Definition: svdhdl.hxx:462
virtual Degree100 GetRotateAngle() const override
Definition: svdovirt.cxx:434
sal_Int32 GetDenominator() const
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:257
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1845
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1650
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdovirt.cxx:376
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1660
virtual bool supportsFullDrag() const override
Definition: svdovirt.cxx:227
virtual bool BckCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:278
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdovirt.cxx:382
OUString aName
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdovirt.cxx:81
FIXME: The virtual object is not yet fully implemented and tested.
Definition: svdovirt.hxx:30
sal_Int32 GetNumerator() const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdovirt.cxx:191
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:96
virtual bool IsPolyObj() const override
Definition: svdovirt.cxx:457
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1323
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdovirt.cxx:288
PointerStyle
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdovirt.cxx:105
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:425
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1071
virtual sdr::properties::BaseProperties & GetProperties() const override
Definition: svdovirt.cxx:29
virtual SdrObjList * GetSubList() const override
Definition: svdovirt.cxx:110
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1559
virtual void SetRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:509
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1670
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1334
virtual Point GetOffset() const
Definition: svdovirt.cxx:542
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1688
virtual ~SdrVirtObj() override
Definition: svdovirt.cxx:66
bool m_bVirtObj
Definition: svdobj.hxx:878
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1655
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:527
virtual bool DoMacro(const SdrObjMacroHitRec &rRec)
Definition: svdobj.cxx:1867
virtual SdrObjectUniquePtr getFullDragClone() const override
Definition: svdovirt.cxx:232
virtual void RecalcBoundRect() override
Definition: svdovirt.cxx:129
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
SdrCreateCmd
Definition: svdtypes.hxx:27
virtual void SetChanged()
Definition: svdobj.cxx:1006
virtual Point GetPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1718
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:313
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:532
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1395
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2718
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdovirt.cxx:301
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1698
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
Definition: svdovirt.cxx:337
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdovirt.cxx:222
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const override
Definition: svdovirt.cxx:209
virtual void SetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:389