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  bVirtObj=true; // this is only a virtual object
48  rRefObj.AddReference(*this);
50 }
51 
53 {
54  rRefObj.DelReference(*this);
55 }
56 
58 {
59  return rRefObj;
60 }
61 
63 {
64  return rRefObj;
65 }
66 
67 void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
68 {
70  SetRectsDirty(); // TODO: Optimize this.
71 
72  // Only a repaint here, rRefObj may have changed and broadcasts
73  ActionChanged();
74 }
75 
76 void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
77 {
78  aAnchor=rAnchorPos;
79 }
80 
82 {
83  rRefObj.TakeObjInfo(rInfo);
84 }
85 
87 {
88  return rRefObj.GetObjInventor();
89 }
90 
91 sal_uInt16 SdrVirtObj::GetObjIdentifier() const
92 {
93  return rRefObj.GetObjIdentifier();
94 }
95 
97 {
98  return rRefObj.GetSubList();
99 }
100 
102 {
103  const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
104  const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
105  return aOutRect;
106 }
107 
109 {
110  const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this.
111  const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
112  return aOutRect;
113 }
114 
116 {
118  aOutRect+=aAnchor;
119 }
120 
122 {
123  return CloneHelper< SdrVirtObj >(rTargetModel);
124  // TTTT not sure if the above works - how could SdrObjFactory::MakeNewObject
125  // create an object with correct rRefObj (?) OTOH VirtObj probably needs not
126  // to be cloned ever - only used in Writer for multiple instances e.g. Header/Footer
127  // return new SdrVirtObj(
128  // getSdrModelFromSdrObject(),
129  // rRefObj); // only a further reference
130 }
131 
133 {
134  SdrObject::operator=(rObj);
135 
136  // reference different object?? TTTT -> yes!
137  rRefObj.DelReference(*this);
138  rRefObj = rObj.rRefObj;
139  rRefObj.AddReference(*this);
140 
141  aSnapRect = rObj.aSnapRect;
142  aAnchor = rObj.aAnchor;
143 
144  return *this;
145 }
146 
148 {
149  OUStringBuffer sName(rRefObj.TakeObjNameSingul());
150  sName.insert(0, '[');
151  sName.append(']');
152 
153  OUString aName(GetName());
154  if (!aName.isEmpty())
155  {
156  sName.append(' ');
157  sName.append('\'');
158  sName.append(aName);
159  sName.append('\'');
160  }
161 
162  return sName.makeStringAndClear();
163 }
164 
166 {
167  OUStringBuffer sName(rRefObj.TakeObjNamePlural());
168  sName.insert(0, '[');
169  sName.append(']');
170  return sName.makeStringAndClear();
171 }
172 
174 {
175  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
176  return rRefObj.HasLimitedRotation();
177 }
178 
180 {
182 
183  if(aAnchor.X() || aAnchor.Y())
184  {
186  }
187 
188  return aPolyPolygon;
189 }
190 
191 
192 sal_uInt32 SdrVirtObj::GetHdlCount() const
193 {
194  return rRefObj.GetHdlCount();
195 }
196 
198 {
199  SdrHdlList tempList(nullptr);
200  rRefObj.AddToHdlList(tempList);
201  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
202  {
203  SdrHdl* pHdl = tempList.GetHdl(i);
204  Point aP(pHdl->GetPos()+aAnchor);
205  pHdl->SetPos(aP);
206  }
207  tempList.MoveTo(rHdlList);
208 }
209 
210 void SdrVirtObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
211 {
212  SdrHdlList tempList(nullptr);
213  rRefObj.AddToPlusHdlList(tempList, rHdl);
214  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
215  {
216  SdrHdl* pHdl = tempList.GetHdl(i);
217  Point aP(pHdl->GetPos()+aAnchor);
218  pHdl->SetPos(aP);
219  }
220  tempList.MoveTo(rHdlList);
221 }
222 
224 {
225  return rRefObj.hasSpecialDrag();
226 }
227 
229 {
230  return false;
231 }
232 
234 {
235  SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
236  return SdrObjectUniquePtr(new SdrGrafObj(
238  SdrDragView::GetObjGraphic(rReferencedObject),
239  GetLogicRect()));
240 }
241 
243 {
244  return rRefObj.beginSpecialDrag(rDrag);
245 }
246 
248 {
249  return rRefObj.applySpecialDrag(rDrag);
250 }
251 
253 {
254  return rRefObj.getSpecialDragPoly(rDrag);
255  // TODO: we don't handle offsets yet!
256 }
257 
258 OUString SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
259 {
260  return rRefObj.getSpecialDragComment(rDrag);
261 }
262 
263 
265 {
266  return rRefObj.BegCreate(rStat);
267 }
268 
270 {
271  return rRefObj.MovCreate(rStat);
272 }
273 
275 {
276  return rRefObj.EndCreate(rStat,eCmd);
277 }
278 
280 {
281  return rRefObj.BckCreate(rStat);
282 }
283 
285 {
286  rRefObj.BrkCreate(rStat);
287 }
288 
290 {
291  return rRefObj.TakeCreatePoly(rDrag);
292  // TODO: we don't handle offsets yet!
293 }
294 
295 
296 void SdrVirtObj::NbcMove(const Size& rSiz)
297 {
298  aAnchor.Move(rSiz);
299  SetRectsDirty();
300 }
301 
302 void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
303 {
304  rRefObj.NbcResize(rRef-aAnchor,xFact,yFact);
305  SetRectsDirty();
306 }
307 
308 void SdrVirtObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
309 {
310  rRefObj.NbcRotate(rRef-aAnchor,nAngle,sn,cs);
311  SetRectsDirty();
312 }
313 
314 void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
315 {
316  rRefObj.NbcMirror(rRef1-aAnchor,rRef2-aAnchor);
317  SetRectsDirty();
318 }
319 
320 void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
321 {
322  rRefObj.NbcShear(rRef-aAnchor,nAngle,tn,bVShear);
323  SetRectsDirty();
324 }
325 
326 
327 void SdrVirtObj::Move(const Size& rSiz)
328 {
329  if (!rSiz.IsEmpty()) {
330  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
331  NbcMove(rSiz);
332  SetChanged();
335  }
336 }
337 
338 void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
339 {
340  if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
341  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
342  rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative);
343  SetRectsDirty();
345  }
346 }
347 
348 void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
349 {
350  if (nAngle!=0) {
351  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
352  rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs);
353  SetRectsDirty();
355  }
356 }
357 
358 void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
359 {
360  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
361  rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor);
362  SetRectsDirty();
364 }
365 
366 void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
367 {
368  if (nAngle!=0) {
369  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
370  rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear);
371  SetRectsDirty();
373  }
374 }
375 
376 
378 {
381 }
382 
384 {
385  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
386  const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor;
387  return aSnapRect;
388 }
389 
391 {
392  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
393  tools::Rectangle aR(rRect);
394  aR-=aAnchor;
395  rRefObj.SetSnapRect(aR);
396  SetRectsDirty();
398 }
399 
401 {
402  tools::Rectangle aR(rRect);
403  aR-=aAnchor;
404  SetRectsDirty();
406 }
407 
408 
410 {
411  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
412  const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
413  return aSnapRect;
414 }
415 
417 {
418  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
419  tools::Rectangle aR(rRect);
420  aR-=aAnchor;
421  rRefObj.SetLogicRect(aR);
422  SetRectsDirty();
424 }
425 
427 {
428  tools::Rectangle aR(rRect);
429  aR-=aAnchor;
430  SetRectsDirty();
432 }
433 
434 
436 {
437  return rRefObj.GetRotateAngle();
438 }
439 
440 long SdrVirtObj::GetShearAngle(bool bVertical) const
441 {
442  return rRefObj.GetShearAngle(bVertical);
443 }
444 
445 
447 {
448  return rRefObj.GetSnapPointCount();
449 }
450 
451 Point SdrVirtObj::GetSnapPoint(sal_uInt32 i) const
452 {
453  Point aP(rRefObj.GetSnapPoint(i));
454  aP+=aAnchor;
455  return aP;
456 }
457 
459 {
460  return rRefObj.IsPolyObj();
461 }
462 
463 sal_uInt32 SdrVirtObj::GetPointCount() const
464 {
465  return rRefObj.GetPointCount();
466 }
467 
468 Point SdrVirtObj::GetPoint(sal_uInt32 i) const
469 {
470  return rRefObj.GetPoint(i) + aAnchor;
471 }
472 
473 void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
474 {
475  Point aP(rPnt);
476  aP-=aAnchor;
477  rRefObj.SetPoint(aP,i);
478  SetRectsDirty();
479 }
480 
481 
483 {
484  return rRefObj.NewGeoData();
485 }
486 
488 {
489  rRefObj.SaveGeoData(rGeo);
490 }
491 
493 {
494  rRefObj.RestGeoData(rGeo);
495  SetRectsDirty();
496 }
497 
498 
500 {
501  return rRefObj.GetGeoData();
502 }
503 
505 {
506  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
507  rRefObj.SetGeoData(rGeo);
508  SetRectsDirty();
510 }
511 
512 
514 {
516 }
517 
519 {
520  return rRefObj.HasMacro();
521 }
522 
524 {
525  return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
526 }
527 
529 {
530  return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
531 }
532 
533 void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
534 {
535  rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
536 }
537 
539 {
540  return rRefObj.DoMacro(rRec); // TODO: positioning offset
541 }
542 
544 {
545  // #i73248# default offset of SdrVirtObj is aAnchor
546  return aAnchor;
547 }
548 
549 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1352
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1067
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdovirt.cxx:409
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:563
virtual const tools::Rectangle & GetLastBoundRect() const override
Definition: svdovirt.cxx:108
virtual Point GetPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:468
SdrObject & ReferencedObj()
Definition: svdovirt.cxx:62
bool IsClosedObj() const
Definition: svdobj.hxx:788
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:854
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1321
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:1484
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:341
void SetPoint(const Point &rPnt, sal_uInt32 i)
Definition: svdobj.cxx:1676
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1308
SdrObjUserCall * pUserCall
Definition: svdobj.hxx:924
void DelReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:637
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdovirt.cxx:81
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdovirt.cxx:179
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:242
virtual long GetRotateAngle() const override
Definition: svdovirt.cxx:435
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1661
virtual bool HasLimitedRotation() const override
Definition: svdovirt.cxx:173
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1380
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdovirt.cxx:36
virtual const tools::Rectangle & GetCurrentBoundRect() const override
Definition: svdovirt.cxx:101
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
Definition: svdovirt.cxx:264
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1269
virtual void SetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:416
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdovirt.cxx:296
SdrInventor
Definition: svdobj.hxx:152
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1018
virtual OUString TakeObjNamePlural() const override
Definition: svdovirt.cxx:165
const Point & GetPos() const
Definition: svdhdl.hxx:197
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1169
virtual sal_uInt32 GetPointCount() const
Definition: svdobj.cxx:1666
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:204
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
Definition: svdovirt.cxx:473
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:358
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:226
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:647
virtual SdrObjGeoData * GetGeoData() const
Definition: svdobj.cxx:1866
virtual sal_uInt32 GetSnapPointCount() const override
snap to special points of an Object (polygon points, center of circle)
Definition: svdovirt.cxx:446
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1189
virtual void Rotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1512
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs) override
Definition: svdovirt.cxx:308
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1598
virtual void RestGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:492
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1768
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:252
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1348
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:320
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1340
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:1656
SdrObject & rRefObj
Definition: svdovirt.hxx:39
bool bVirtObj
Definition: svdobj.hxx:928
const SdrObject & GetReferencedObj() const
Definition: svdovirt.cxx:57
bool bClosedObj
Definition: svdobj.hxx:942
virtual SdrObjGeoData * GetGeoData() const override
Definition: svdovirt.cxx:499
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:400
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1401
virtual void Move(const Size &rSiz) override
Definition: svdovirt.cxx:327
SdrObject & operator=(const SdrObject &rObj)
Definition: svdobj.cxx:979
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:968
virtual bool DoMacro(const SdrObjMacroHitRec &rRec) override
Definition: svdovirt.cxx:538
virtual SdrVirtObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdovirt.cxx:121
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1331
virtual bool HasMacro() const override
Definition: svdovirt.cxx:518
void AddReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:632
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdovirt.cxx:197
virtual sal_uInt32 GetPointCount() const override
Definition: svdovirt.cxx:463
bool IsEmpty() const
int i
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2327
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdovirt.cxx:487
virtual void NbcSetAnchorPos(const Point &rAnchorPos) override
Definition: svdovirt.cxx:76
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:558
OUString sName
virtual void BrkCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:284
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1429
tools::Rectangle aOutRect
Definition: svdobj.hxx:922
void BroadcastObjectChange() const
Definition: svdobj.cxx:905
virtual void SetGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1873
SdrVirtObj(const SdrVirtObj &)=delete
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1313
void ActionChanged() const
Definition: svdobj.cxx:257
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1816
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:273
virtual bool MovCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:269
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual bool HasMacro() const
Definition: svdobj.cxx:1763
virtual long GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1646
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: svdovirt.cxx:274
virtual void NbcReformatText() override
Definition: svdovirt.cxx:513
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdovirt.cxx:247
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1632
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1783
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:1164
virtual sal_uInt16 GetObjIdentifier() const override
Definition: svdovirt.cxx:91
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual OUString TakeObjNameSingul() const override
Definition: svdovirt.cxx:147
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1523
OUString GetName() const
Definition: svdobj.cxx:698
Point aAnchor
Definition: svdobj.hxx:923
virtual SdrInventor GetObjInventor() const override
Definition: svdovirt.cxx:86
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:553
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:523
virtual void Rotate(const Point &rRef, long nAngle, double sn, double cs) override
Definition: svdovirt.cxx:348
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:451
virtual void SetGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:504
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1460
virtual void RestGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1839
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:868
virtual void Shear(const Point &rRef, long nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:366
virtual void NbcReformatText()
Definition: svdobj.cxx:1754
size_t GetHdlCount() const
Definition: svdhdl.hxx:461
SdrHdl * GetHdl(size_t nNum) const
Definition: svdhdl.hxx:462
virtual long GetShearAngle(bool bVertical=false) const override
Definition: svdovirt.cxx:440
sal_Int32 GetDenominator() const
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:258
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1778
virtual 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:1811
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1603
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdovirt.cxx:377
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1613
virtual bool supportsFullDrag() const override
Definition: svdovirt.cxx:228
virtual 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:482
virtual bool BckCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:279
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdovirt.cxx:383
OUString aName
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdovirt.cxx:67
FIXME: The virtual object is not yet fully implemented and tested.
Definition: svdovirt.hxx:30
virtual long GetRotateAngle() const
Definition: svdobj.cxx:1641
sal_Int32 GetNumerator() const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdovirt.cxx:192
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:114
virtual bool IsPolyObj() const override
Definition: svdovirt.cxx:458
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1285
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdovirt.cxx:289
PointerStyle
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:426
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1033
virtual sdr::properties::BaseProperties & GetProperties() const override
Definition: svdovirt.cxx:29
virtual SdrObjList * GetSubList() const override
Definition: svdovirt.cxx:96
virtual void SetRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:435
virtual void Shear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1532
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1623
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1296
virtual Point GetOffset() const
Definition: svdovirt.cxx:543
virtual ~SdrVirtObj() override
Definition: svdovirt.cxx:52
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1608
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:528
virtual bool DoMacro(const SdrObjMacroHitRec &rRec)
Definition: svdobj.cxx:1800
SdrVirtObj & operator=(const SdrVirtObj &rObj)
Definition: svdovirt.cxx:132
virtual SdrObjectUniquePtr getFullDragClone() const override
Definition: svdovirt.cxx:233
virtual void RecalcBoundRect() override
Definition: svdovirt.cxx:115
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
SdrCreateCmd
Definition: svdtypes.hxx:27
virtual void SetChanged()
Definition: svdobj.cxx:929
virtual Point GetPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1671
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:314
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:533
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1357
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2655
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdovirt.cxx:302
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1651
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
Definition: svdovirt.cxx:338
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdovirt.cxx:223
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const override
Definition: svdovirt.cxx:210
virtual void SetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:390