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  SetBoundAndSnapRectsDirty(); // 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  OUString sName = "[" + rRefObj.TakeObjNameSingul() + "]";
149 
150  OUString aName(GetName());
151  if (!aName.isEmpty())
152  sName += " '" + aName + "'";
153 
154  return sName;
155 }
156 
158 {
159  return "[" + rRefObj.TakeObjNamePlural() + "]";
160 }
161 
163 {
164  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
165  return rRefObj.HasLimitedRotation();
166 }
167 
169 {
171 
172  if(m_aAnchor.X() || m_aAnchor.Y())
173  {
175  }
176 
177  return aPolyPolygon;
178 }
179 
180 
181 sal_uInt32 SdrVirtObj::GetHdlCount() const
182 {
183  return rRefObj.GetHdlCount();
184 }
185 
187 {
188  SdrHdlList tempList(nullptr);
189  rRefObj.AddToHdlList(tempList);
190  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
191  {
192  SdrHdl* pHdl = tempList.GetHdl(i);
193  Point aP(pHdl->GetPos()+m_aAnchor);
194  pHdl->SetPos(aP);
195  }
196  tempList.MoveTo(rHdlList);
197 }
198 
199 void SdrVirtObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
200 {
201  SdrHdlList tempList(nullptr);
202  rRefObj.AddToPlusHdlList(tempList, rHdl);
203  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
204  {
205  SdrHdl* pHdl = tempList.GetHdl(i);
206  Point aP(pHdl->GetPos()+m_aAnchor);
207  pHdl->SetPos(aP);
208  }
209  tempList.MoveTo(rHdlList);
210 }
211 
213 {
214  return rRefObj.hasSpecialDrag();
215 }
216 
218 {
219  return false;
220 }
221 
223 {
224  SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
225  return SdrObjectUniquePtr(new SdrGrafObj(
227  SdrDragView::GetObjGraphic(rReferencedObject),
228  GetLogicRect()));
229 }
230 
232 {
233  return rRefObj.beginSpecialDrag(rDrag);
234 }
235 
237 {
238  return rRefObj.applySpecialDrag(rDrag);
239 }
240 
242 {
243  return rRefObj.getSpecialDragPoly(rDrag);
244  // TODO: we don't handle offsets yet!
245 }
246 
247 OUString SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
248 {
249  return rRefObj.getSpecialDragComment(rDrag);
250 }
251 
252 
254 {
255  return rRefObj.BegCreate(rStat);
256 }
257 
259 {
260  return rRefObj.MovCreate(rStat);
261 }
262 
264 {
265  return rRefObj.EndCreate(rStat,eCmd);
266 }
267 
269 {
270  return rRefObj.BckCreate(rStat);
271 }
272 
274 {
275  rRefObj.BrkCreate(rStat);
276 }
277 
279 {
280  return rRefObj.TakeCreatePoly(rDrag);
281  // TODO: we don't handle offsets yet!
282 }
283 
284 
285 void SdrVirtObj::NbcMove(const Size& rSiz)
286 {
287  m_aAnchor.Move(rSiz);
289 }
290 
291 void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
292 {
293  rRefObj.NbcResize(rRef-m_aAnchor,xFact,yFact);
295 }
296 
297 void SdrVirtObj::NbcRotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
298 {
299  rRefObj.NbcRotate(rRef-m_aAnchor,nAngle,sn,cs);
301 }
302 
303 void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
304 {
305  rRefObj.NbcMirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
307 }
308 
309 void SdrVirtObj::NbcShear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
310 {
311  rRefObj.NbcShear(rRef-m_aAnchor,nAngle,tn,bVShear);
313 }
314 
315 
316 void SdrVirtObj::Move(const Size& rSiz)
317 {
318  if (!rSiz.IsEmpty()) {
319  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
320  NbcMove(rSiz);
321  SetChanged();
324  }
325 }
326 
327 void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
328 {
329  if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
330  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
331  rRefObj.Resize(rRef-m_aAnchor,xFact,yFact, bUnsetRelative);
334  }
335 }
336 
337 void SdrVirtObj::Rotate(const Point& rRef, Degree100 nAngle, double sn, double cs)
338 {
339  if (nAngle) {
340  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
341  rRefObj.Rotate(rRef-m_aAnchor,nAngle,sn,cs);
344  }
345 }
346 
347 void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
348 {
349  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
350  rRefObj.Mirror(rRef1-m_aAnchor,rRef2-m_aAnchor);
353 }
354 
355 void SdrVirtObj::Shear(const Point& rRef, Degree100 nAngle, double tn, bool bVShear)
356 {
357  if (nAngle) {
358  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
359  rRefObj.Shear(rRef-m_aAnchor,nAngle,tn,bVShear);
362  }
363 }
364 
365 
367 {
370 }
371 
373 {
374  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
375  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor;
376  return aSnapRect;
377 }
378 
380 {
381  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
382  tools::Rectangle aR(rRect);
383  aR-=m_aAnchor;
384  rRefObj.SetSnapRect(aR);
387 }
388 
390 {
391  tools::Rectangle aR(rRect);
392  aR-=m_aAnchor;
395 }
396 
397 
399 {
400  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
401  const_cast<SdrVirtObj*>(this)->aSnapRect+=m_aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
402  return aSnapRect;
403 }
404 
406 {
407  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
408  tools::Rectangle aR(rRect);
409  aR-=m_aAnchor;
410  rRefObj.SetLogicRect(aR);
413 }
414 
416 {
417  tools::Rectangle aR(rRect);
418  aR-=m_aAnchor;
421 }
422 
423 
425 {
426  return rRefObj.GetRotateAngle();
427 }
428 
430 {
431  return rRefObj.GetShearAngle(bVertical);
432 }
433 
434 
436 {
437  return rRefObj.GetSnapPointCount();
438 }
439 
440 Point SdrVirtObj::GetSnapPoint(sal_uInt32 i) const
441 {
442  Point aP(rRefObj.GetSnapPoint(i));
443  aP+=m_aAnchor;
444  return aP;
445 }
446 
448 {
449  return rRefObj.IsPolyObj();
450 }
451 
452 sal_uInt32 SdrVirtObj::GetPointCount() const
453 {
454  return rRefObj.GetPointCount();
455 }
456 
457 Point SdrVirtObj::GetPoint(sal_uInt32 i) const
458 {
459  return rRefObj.GetPoint(i) + m_aAnchor;
460 }
461 
462 void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
463 {
464  Point aP(rPnt);
465  aP-=m_aAnchor;
466  rRefObj.SetPoint(aP,i);
468 }
469 
470 
471 std::unique_ptr<SdrObjGeoData> SdrVirtObj::NewGeoData() const
472 {
473  return rRefObj.NewGeoData();
474 }
475 
477 {
478  rRefObj.SaveGeoData(rGeo);
479 }
480 
482 {
483  rRefObj.RestoreGeoData(rGeo);
485 }
486 
487 
488 std::unique_ptr<SdrObjGeoData> SdrVirtObj::GetGeoData() const
489 {
490  return rRefObj.GetGeoData();
491 }
492 
494 {
495  tools::Rectangle aBoundRect0; if (m_pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
496  rRefObj.SetGeoData(rGeo);
499 }
500 
501 
503 {
505 }
506 
508 {
509  return rRefObj.HasMacro();
510 }
511 
513 {
514  return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
515 }
516 
518 {
519  return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
520 }
521 
522 void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
523 {
524  rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
525 }
526 
528 {
529  return rRefObj.DoMacro(rRec); // TODO: positioning offset
530 }
531 
533 {
534  // #i73248# default offset of SdrVirtObj is aAnchor
535  return m_aAnchor;
536 }
537 
538 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1600
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1411
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1126
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:1899
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdovirt.cxx:398
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:664
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const override
Definition: svdovirt.cxx:488
virtual const tools::Rectangle & GetLastBoundRect() const override
Definition: svdovirt.cxx:122
virtual Point GetPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:457
SdrObject & ReferencedObj()
Definition: svdovirt.cxx:76
bool IsClosedObj() const
Definition: svdobj.hxx:737
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:957
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1380
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:1552
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:342
void SetPoint(const Point &rPnt, sal_uInt32 i)
Definition: svdobj.cxx:1744
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1367
void DelReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:738
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:168
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:231
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:297
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:355
bool m_bClosedObj
Definition: svdobj.hxx:896
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1729
virtual bool HasLimitedRotation() const override
Definition: svdovirt.cxx:162
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1439
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Definition: svdobj.cxx:1469
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:1528
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:253
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:309
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1328
virtual void SetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:405
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdovirt.cxx:285
SdrInventor
Definition: svdobj.hxx:99
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1082
tools::Rectangle m_aOutRect
Definition: svdobj.hxx:876
virtual OUString TakeObjNamePlural() const override
Definition: svdovirt.cxx:157
const Point & GetPos() const
Definition: svdhdl.hxx:197
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1228
virtual sal_uInt32 GetPointCount() const
Definition: svdobj.cxx:1734
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:659
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:210
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
Definition: svdovirt.cxx:462
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:347
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:173
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:748
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:435
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1248
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1666
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1856
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
Definition: svdovirt.cxx:337
Provides information about various ZObject properties.
Definition: svdobj.hxx:195
virtual std::unique_ptr< SdrObjGeoData > GetGeoData() const
Definition: svdobj.cxx:1954
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:241
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1407
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1399
static Graphic GetObjGraphic(const SdrObject &rSdrObject)
Generate a Graphic for the given draw object.
Definition: svdxcgv.cxx:594
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1724
SdrObject & rRefObj
Definition: svdovirt.hxx:39
const SdrObject & GetReferencedObj() const
Definition: svdovirt.cxx:71
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:389
virtual void Move(const Size &rSiz) override
Definition: svdovirt.cxx:316
virtual void RestoreGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:481
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:1071
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:510
virtual bool DoMacro(const SdrObjMacroHitRec &rRec) override
Definition: svdovirt.cxx:527
virtual SdrVirtObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdovirt.cxx:135
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1390
virtual bool HasMacro() const override
Definition: svdovirt.cxx:507
void AddReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:733
virtual void RestoreGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1927
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdovirt.cxx:186
virtual sal_uInt32 GetPointCount() const override
Definition: svdovirt.cxx:452
bool IsEmpty() const
int i
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2323
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdovirt.cxx:476
virtual void NbcSetAnchorPos(const Point &rAnchorPos) override
Definition: svdovirt.cxx:90
OUString sName
virtual void BrkCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:273
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1497
void BroadcastObjectChange() const
Definition: svdobj.cxx:1008
virtual void SetGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1961
virtual Degree100 GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1714
SdrVirtObj(const SdrVirtObj &)=delete
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1372
void ActionChanged() const
Definition: svdobj.cxx:263
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1904
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:279
virtual bool MovCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:258
SdrObjUserCall * m_pUserCall
Definition: svdobj.hxx:878
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual bool HasMacro() const
Definition: svdobj.cxx:1851
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: svdovirt.cxx:263
virtual void NbcReformatText() override
Definition: svdovirt.cxx:502
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdovirt.cxx:236
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1700
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1871
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:1223
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:471
virtual OUString TakeObjNameSingul() const override
Definition: svdovirt.cxx:146
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1591
OUString GetName() const
Definition: svdobj.cxx:802
virtual SdrInventor GetObjInventor() const override
Definition: svdovirt.cxx:100
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:654
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:512
virtual Degree100 GetShearAngle(bool bVertical=false) const override
Definition: svdovirt.cxx:429
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:440
virtual void SetGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:493
Point m_aAnchor
Definition: svdobj.hxx:877
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:971
virtual void NbcReformatText()
Definition: svdobj.cxx:1842
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:424
sal_Int32 GetDenominator() const
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:247
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1866
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1671
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdovirt.cxx:366
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1681
virtual bool supportsFullDrag() const override
Definition: svdovirt.cxx:217
virtual bool BckCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:268
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdovirt.cxx:372
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:29
sal_Int32 GetNumerator() const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdovirt.cxx:181
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:97
virtual bool IsPolyObj() const override
Definition: svdovirt.cxx:447
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1344
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdovirt.cxx:278
PointerStyle
virtual SdrObjKind GetObjIdentifier() const override
Definition: svdovirt.cxx:105
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:415
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1092
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:1580
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1691
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1355
virtual Point GetOffset() const
Definition: svdovirt.cxx:532
virtual Degree100 GetRotateAngle() const
Definition: svdobj.cxx:1709
virtual ~SdrVirtObj() override
Definition: svdovirt.cxx:66
bool m_bVirtObj
Definition: svdobj.hxx:882
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1676
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:517
virtual bool DoMacro(const SdrObjMacroHitRec &rRec)
Definition: svdobj.cxx:1888
virtual SdrObjectUniquePtr getFullDragClone() const override
Definition: svdovirt.cxx:222
virtual void RecalcBoundRect() override
Definition: svdovirt.cxx:129
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
SdrCreateCmd
Definition: svdtypes.hxx:26
virtual void SetChanged()
Definition: svdobj.cxx:1032
virtual Point GetPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1739
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:303
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:522
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1416
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2739
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdovirt.cxx:291
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1719
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
Definition: svdovirt.cxx:327
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdovirt.cxx:212
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const override
Definition: svdovirt.cxx:199
virtual void SetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:379