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/xpool.hxx>
23 #include <svx/svdtrans.hxx>
24 #include <svx/svdetc.hxx>
25 #include <svx/svdhdl.hxx>
28 #include <svx/svdograf.hxx>
29 #include <svx/svddrgv.hxx>
31 
32 
34 {
35  return rRefObj.GetProperties();
36 }
37 
38 
39 // #i27224#
40 std::unique_ptr<sdr::contact::ViewContact> SdrVirtObj::CreateObjectSpecificViewContact()
41 {
42  return std::make_unique<sdr::contact::ViewContactOfVirtObj>(*this);
43 }
44 
46  SdrModel& rSdrModel,
47  SdrObject& rNewObj)
48 : SdrObject(rSdrModel),
49  rRefObj(rNewObj)
50 {
51  bVirtObj=true; // this is only a virtual object
52  rRefObj.AddReference(*this);
54 }
55 
57 {
58  rRefObj.DelReference(*this);
59 }
60 
62 {
63  return rRefObj;
64 }
65 
67 {
68  return rRefObj;
69 }
70 
71 void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/)
72 {
74  SetRectsDirty(); // TODO: Optimize this.
75 
76  // Only a repaint here, rRefObj may have changed and broadcasts
77  ActionChanged();
78 }
79 
80 void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
81 {
82  aAnchor=rAnchorPos;
83 }
84 
86 {
87  rRefObj.TakeObjInfo(rInfo);
88 }
89 
91 {
92  return rRefObj.GetObjInventor();
93 }
94 
95 sal_uInt16 SdrVirtObj::GetObjIdentifier() const
96 {
97  return rRefObj.GetObjIdentifier();
98 }
99 
101 {
102  return rRefObj.GetSubList();
103 }
104 
106 {
107  const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
108  const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
109  return aOutRect;
110 }
111 
113 {
114  const_cast<SdrVirtObj*>(this)->aOutRect=rRefObj.GetLastBoundRect(); // TODO: Optimize this.
115  const_cast<SdrVirtObj*>(this)->aOutRect+=aAnchor;
116  return aOutRect;
117 }
118 
120 {
122  aOutRect+=aAnchor;
123 }
124 
126 {
127  return CloneHelper< SdrVirtObj >(rTargetModel);
128  // TTTT not sure if the above works - how could SdrObjFactory::MakeNewObject
129  // create an object with correct rRefObj (?) OTOH VirtObj probably needs not
130  // to be cloned ever - only used in Writer for multiple instances e.g. Header/Footer
131  // return new SdrVirtObj(
132  // getSdrModelFromSdrObject(),
133  // rRefObj); // only a further reference
134 }
135 
137 {
138  SdrObject::operator=(rObj);
139 
140  // reference different object?? TTTT -> yes!
141  rRefObj.DelReference(*this);
142  rRefObj = rObj.rRefObj;
143  rRefObj.AddReference(*this);
144 
145  aSnapRect = rObj.aSnapRect;
146  aAnchor = rObj.aAnchor;
147 
148  return *this;
149 }
150 
152 {
153  OUStringBuffer sName(rRefObj.TakeObjNameSingul());
154  sName.insert(0, '[');
155  sName.append(']');
156 
157  OUString aName(GetName());
158  if (!aName.isEmpty())
159  {
160  sName.append(' ');
161  sName.append('\'');
162  sName.append(aName);
163  sName.append('\'');
164  }
165 
166  return sName.makeStringAndClear();
167 }
168 
170 {
171  OUStringBuffer sName(rRefObj.TakeObjNamePlural());
172  sName.insert(0, '[');
173  sName.append(']');
174  return sName.makeStringAndClear();
175 }
176 
178 {
179  // RotGrfFlyFrame: If true, this SdrObject supports only limited rotation
180  return rRefObj.HasLimitedRotation();
181 }
182 
184 {
186 
187  if(aAnchor.X() || aAnchor.Y())
188  {
190  }
191 
192  return aPolyPolygon;
193 }
194 
195 
196 sal_uInt32 SdrVirtObj::GetHdlCount() const
197 {
198  return rRefObj.GetHdlCount();
199 }
200 
202 {
203  SdrHdlList tempList(nullptr);
204  rRefObj.AddToHdlList(tempList);
205  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
206  {
207  SdrHdl* pHdl = tempList.GetHdl(i);
208  Point aP(pHdl->GetPos()+aAnchor);
209  pHdl->SetPos(aP);
210  }
211  tempList.MoveTo(rHdlList);
212 }
213 
214 void SdrVirtObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
215 {
216  SdrHdlList tempList(nullptr);
217  rRefObj.AddToPlusHdlList(tempList, rHdl);
218  for (size_t i=0; i<tempList.GetHdlCount(); ++i)
219  {
220  SdrHdl* pHdl = tempList.GetHdl(i);
221  Point aP(pHdl->GetPos()+aAnchor);
222  pHdl->SetPos(aP);
223  }
224  tempList.MoveTo(rHdlList);
225 }
226 
228 {
229  return rRefObj.hasSpecialDrag();
230 }
231 
233 {
234  return false;
235 }
236 
238 {
239  SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
240  return SdrObjectUniquePtr(new SdrGrafObj(
242  SdrDragView::GetObjGraphic(rReferencedObject),
243  GetLogicRect()));
244 }
245 
247 {
248  return rRefObj.beginSpecialDrag(rDrag);
249 }
250 
252 {
253  return rRefObj.applySpecialDrag(rDrag);
254 }
255 
257 {
258  return rRefObj.getSpecialDragPoly(rDrag);
259  // TODO: we don't handle offsets yet!
260 }
261 
262 OUString SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const
263 {
264  return rRefObj.getSpecialDragComment(rDrag);
265 }
266 
267 
269 {
270  return rRefObj.BegCreate(rStat);
271 }
272 
274 {
275  return rRefObj.MovCreate(rStat);
276 }
277 
279 {
280  return rRefObj.EndCreate(rStat,eCmd);
281 }
282 
284 {
285  return rRefObj.BckCreate(rStat);
286 }
287 
289 {
290  rRefObj.BrkCreate(rStat);
291 }
292 
294 {
295  return rRefObj.TakeCreatePoly(rDrag);
296  // TODO: we don't handle offsets yet!
297 }
298 
299 
300 void SdrVirtObj::NbcMove(const Size& rSiz)
301 {
302  aAnchor.Move(rSiz);
303  SetRectsDirty();
304 }
305 
306 void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
307 {
308  rRefObj.NbcResize(rRef-aAnchor,xFact,yFact);
309  SetRectsDirty();
310 }
311 
312 void SdrVirtObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
313 {
314  rRefObj.NbcRotate(rRef-aAnchor,nAngle,sn,cs);
315  SetRectsDirty();
316 }
317 
318 void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
319 {
320  rRefObj.NbcMirror(rRef1-aAnchor,rRef2-aAnchor);
321  SetRectsDirty();
322 }
323 
324 void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
325 {
326  rRefObj.NbcShear(rRef-aAnchor,nAngle,tn,bVShear);
327  SetRectsDirty();
328 }
329 
330 
331 void SdrVirtObj::Move(const Size& rSiz)
332 {
333  if (rSiz.Width()!=0 || rSiz.Height()!=0) {
334  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
335  NbcMove(rSiz);
336  SetChanged();
339  }
340 }
341 
342 void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative)
343 {
344  if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
345  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
346  rRefObj.Resize(rRef-aAnchor,xFact,yFact, bUnsetRelative);
347  SetRectsDirty();
349  }
350 }
351 
352 void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
353 {
354  if (nAngle!=0) {
355  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
356  rRefObj.Rotate(rRef-aAnchor,nAngle,sn,cs);
357  SetRectsDirty();
359  }
360 }
361 
362 void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
363 {
364  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
365  rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor);
366  SetRectsDirty();
368 }
369 
370 void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
371 {
372  if (nAngle!=0) {
373  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
374  rRefObj.Shear(rRef-aAnchor,nAngle,tn,bVShear);
375  SetRectsDirty();
377  }
378 }
379 
380 
382 {
385 }
386 
388 {
389  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetSnapRect();
390  const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor;
391  return aSnapRect;
392 }
393 
395 {
396  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
397  tools::Rectangle aR(rRect);
398  aR-=aAnchor;
399  rRefObj.SetSnapRect(aR);
400  SetRectsDirty();
402 }
403 
405 {
406  tools::Rectangle aR(rRect);
407  aR-=aAnchor;
408  SetRectsDirty();
410 }
411 
412 
414 {
415  const_cast<SdrVirtObj*>(this)->aSnapRect=rRefObj.GetLogicRect(); // An abuse of aSnapRect!
416  const_cast<SdrVirtObj*>(this)->aSnapRect+=aAnchor; // If there's trouble, we need another Rectangle Member (or a Heap).
417  return aSnapRect;
418 }
419 
421 {
422  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
423  tools::Rectangle aR(rRect);
424  aR-=aAnchor;
425  rRefObj.SetLogicRect(aR);
426  SetRectsDirty();
428 }
429 
431 {
432  tools::Rectangle aR(rRect);
433  aR-=aAnchor;
434  SetRectsDirty();
436 }
437 
438 
440 {
441  return rRefObj.GetRotateAngle();
442 }
443 
444 long SdrVirtObj::GetShearAngle(bool bVertical) const
445 {
446  return rRefObj.GetShearAngle(bVertical);
447 }
448 
449 
451 {
452  return rRefObj.GetSnapPointCount();
453 }
454 
455 Point SdrVirtObj::GetSnapPoint(sal_uInt32 i) const
456 {
457  Point aP(rRefObj.GetSnapPoint(i));
458  aP+=aAnchor;
459  return aP;
460 }
461 
463 {
464  return rRefObj.IsPolyObj();
465 }
466 
467 sal_uInt32 SdrVirtObj::GetPointCount() const
468 {
469  return rRefObj.GetPointCount();
470 }
471 
472 Point SdrVirtObj::GetPoint(sal_uInt32 i) const
473 {
474  return rRefObj.GetPoint(i) + aAnchor;
475 }
476 
477 void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
478 {
479  Point aP(rPnt);
480  aP-=aAnchor;
481  rRefObj.SetPoint(aP,i);
482  SetRectsDirty();
483 }
484 
485 
487 {
488  return rRefObj.NewGeoData();
489 }
490 
492 {
493  rRefObj.SaveGeoData(rGeo);
494 }
495 
497 {
498  rRefObj.RestGeoData(rGeo);
499  SetRectsDirty();
500 }
501 
502 
504 {
505  return rRefObj.GetGeoData();
506 }
507 
509 {
510  tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
511  rRefObj.SetGeoData(rGeo);
512  SetRectsDirty();
514 }
515 
516 
518 {
520 }
521 
523 {
524  return rRefObj.HasMacro();
525 }
526 
528 {
529  return rRefObj.CheckMacroHit(rRec); // TODO: positioning offset
530 }
531 
533 {
534  return rRefObj.GetMacroPointer(rRec); // TODO: positioning offset
535 }
536 
537 void SdrVirtObj::PaintMacro(OutputDevice& rOut, const tools::Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
538 {
539  rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // TODO: positioning offset
540 }
541 
543 {
544  return rRefObj.DoMacro(rRec); // TODO: positioning offset
545 }
546 
548 {
549  // #i73248# default offset of SdrVirtObj is aAnchor
550  return aAnchor;
551 }
552 
553 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
virtual bool BckCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1379
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
Definition: svdobj.cxx:1094
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdovirt.cxx:413
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
Definition: svdobj.cxx:590
virtual const tools::Rectangle & GetLastBoundRect() const override
Definition: svdovirt.cxx:112
virtual Point GetPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:472
SdrObject & ReferencedObj()
Definition: svdovirt.cxx:66
bool IsClosedObj() const
Definition: svdobj.hxx:787
virtual const tools::Rectangle & GetCurrentBoundRect() const
Definition: svdobj.cxx:881
virtual bool BegCreate(SdrDragStat &rStat)
Every object must be able to create itself interactively.
Definition: svdobj.cxx:1348
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:1511
void SetPos(const Point &rPnt)
Definition: svdhdl.cxx:346
void SetPoint(const Point &rPnt, sal_uInt32 i)
Definition: svdobj.cxx:1702
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1335
SdrObjUserCall * pUserCall
Definition: svdobj.hxx:923
void DelReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:664
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
Definition: svdovirt.cxx:85
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
Definition: svdovirt.cxx:183
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:246
virtual long GetRotateAngle() const override
Definition: svdovirt.cxx:439
virtual bool IsPolyObj() const
Definition: svdobj.cxx:1687
virtual bool HasLimitedRotation() const override
Definition: svdovirt.cxx:177
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
Definition: svdobj.cxx:1407
long Height() const
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
Definition: svdovirt.cxx:40
virtual const tools::Rectangle & GetCurrentBoundRect() const override
Definition: svdovirt.cxx:105
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
Definition: svdovirt.cxx:268
virtual bool hasSpecialDrag() const
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdobj.cxx:1296
virtual void SetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:420
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
Definition: svdovirt.cxx:300
SdrInventor
Definition: svdobj.hxx:152
virtual OUString TakeObjNameSingul() const
Definition: svdobj.cxx:1045
virtual OUString TakeObjNamePlural() const override
Definition: svdovirt.cxx:169
const Point & GetPos() const
Definition: svdhdl.hxx:197
virtual void AddToHdlList(SdrHdlList &rHdlList) const
Definition: svdobj.cxx:1196
virtual sal_uInt32 GetPointCount() const
Definition: svdobj.cxx:1692
virtual sdr::properties::BaseProperties & GetProperties() const
Definition: svdobj.cxx:230
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
Definition: svdovirt.cxx:477
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:362
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:226
virtual SdrObjList * GetSubList() const
Definition: svdobj.cxx:674
virtual SdrObjGeoData * GetGeoData() const
Definition: svdobj.cxx:1887
virtual sal_uInt32 GetSnapPointCount() const override
snap to special points of an Object (polygon points, center of circle)
Definition: svdovirt.cxx:450
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const
Definition: svdobj.cxx:1216
virtual void Rotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1538
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs) override
Definition: svdovirt.cxx:312
virtual const tools::Rectangle & GetSnapRect() const
Definition: svdobj.cxx:1624
virtual void RestGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:496
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1789
Provides information about various ZObject properties.
Definition: svdobj.hxx:248
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:256
virtual void BrkCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1375
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:324
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd)
Definition: svdobj.cxx:1367
static Graphic GetObjGraphic(const SdrObject &rSdrObject)
Generate a Graphic for the given draw object.
Definition: svdxcgv.cxx:593
virtual Point GetSnapPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1682
SdrObject & rRefObj
Definition: svdovirt.hxx:39
bool bVirtObj
Definition: svdobj.hxx:927
const SdrObject & GetReferencedObj() const
Definition: svdovirt.cxx:61
bool bClosedObj
Definition: svdobj.hxx:941
virtual SdrObjGeoData * GetGeoData() const override
Definition: svdovirt.cxx:503
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:404
virtual void NbcRotate(const Point &rRef, long nAngle, double sn, double cs)
Definition: svdobj.cxx:1428
virtual void Move(const Size &rSiz) override
Definition: svdovirt.cxx:331
SdrObject & operator=(const SdrObject &rObj)
Definition: svdobj.cxx:1006
virtual bool HasLimitedRotation() const
Definition: svdobj.cxx:995
virtual bool DoMacro(const SdrObjMacroHitRec &rRec) override
Definition: svdovirt.cxx:542
virtual SdrVirtObj * CloneSdrObject(SdrModel &rTargetModel) const override
Definition: svdovirt.cxx:125
virtual bool MovCreate(SdrDragStat &rStat)
Definition: svdobj.cxx:1358
virtual bool HasMacro() const override
Definition: svdovirt.cxx:522
void AddReference(SdrVirtObj &rVrtObj)
Definition: svdobj.cxx:659
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
Definition: svdovirt.cxx:201
virtual sal_uInt32 GetPointCount() const override
Definition: svdovirt.cxx:467
void MoveTo(SdrHdlList &rOther)
Definition: svdhdl.cxx:2333
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override
Definition: svdovirt.cxx:491
virtual void NbcSetAnchorPos(const Point &rAnchorPos) override
Definition: svdovirt.cxx:80
virtual sal_uInt16 GetObjIdentifier() const
Definition: svdobj.cxx:585
OUString sName
virtual void BrkCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:288
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1456
tools::Rectangle aOutRect
Definition: svdobj.hxx:921
int i
void BroadcastObjectChange() const
Definition: svdobj.cxx:932
virtual void SetGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1894
SdrVirtObj(const SdrVirtObj &)=delete
virtual basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
Definition: svdobj.cxx:1340
void ActionChanged() const
Definition: svdobj.cxx:283
virtual void SaveGeoData(SdrObjGeoData &rGeo) const
Definition: svdobj.cxx:1837
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:299
virtual bool MovCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:273
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual bool HasMacro() const
Definition: svdobj.cxx:1784
virtual long GetShearAngle(bool bVertical=false) const
Definition: svdobj.cxx:1672
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: svdovirt.cxx:278
virtual void NbcReformatText() override
Definition: svdovirt.cxx:517
virtual bool applySpecialDrag(SdrDragStat &rDrag) override
Definition: svdovirt.cxx:251
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1658
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1804
This class represents an embedded or linked bitmap graphic object.
Definition: svdograf.hxx:79
virtual sal_uInt32 GetHdlCount() const
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdobj.cxx:1191
virtual sal_uInt16 GetObjIdentifier() const override
Definition: svdovirt.cxx:95
Abstract DrawObject.
Definition: svdobj.hxx:312
long X() const
virtual OUString TakeObjNameSingul() const override
Definition: svdovirt.cxx:151
virtual void Mirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1549
OUString GetName() const
Definition: svdobj.cxx:725
Point aAnchor
Definition: svdobj.hxx:922
virtual SdrInventor GetObjInventor() const override
Definition: svdovirt.cxx:90
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:580
virtual SdrObject * CheckMacroHit(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:527
virtual void Rotate(const Point &rRef, long nAngle, double sn, double cs) override
Definition: svdovirt.cxx:352
virtual Point GetSnapPoint(sal_uInt32 i) const override
Definition: svdovirt.cxx:455
virtual void SetGeoData(const SdrObjGeoData &rGeo) override
Definition: svdovirt.cxx:508
virtual void NbcShear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1487
virtual void RestGeoData(const SdrObjGeoData &rGeo)
Definition: svdobj.cxx:1860
virtual const tools::Rectangle & GetLastBoundRect() const
Definition: svdobj.cxx:895
virtual void Shear(const Point &rRef, long nAngle, double tn, bool bVShear) override
Definition: svdovirt.cxx:370
virtual void NbcReformatText()
Definition: svdobj.cxx:1775
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:444
sal_Int32 GetDenominator() const
virtual OUString getSpecialDragComment(const SdrDragStat &rDrag) const override
Definition: svdovirt.cxx:262
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const
Definition: svdobj.cxx:1799
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:1832
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1629
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
Definition: svdovirt.cxx:381
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1639
virtual bool supportsFullDrag() const override
Definition: svdovirt.cxx:232
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:486
virtual bool BckCreate(SdrDragStat &rStat) override
Definition: svdovirt.cxx:283
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdovirt.cxx:387
OUString aName
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdovirt.cxx:71
FIXME: The virtual object is not yet fully implemented and tested.
Definition: svdovirt.hxx:30
virtual long GetRotateAngle() const
Definition: svdobj.cxx:1667
sal_Int32 GetNumerator() const
virtual sal_uInt32 GetHdlCount() const override
Via GetHdlCount the number of Handles can be retrieved.
Definition: svdovirt.cxx:196
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:114
virtual bool IsPolyObj() const override
Definition: svdovirt.cxx:462
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const
Definition: svdobj.cxx:1312
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const override
Polygon dragged by the user when creating the object.
Definition: svdovirt.cxx:293
PointerStyle
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:430
virtual OUString TakeObjNamePlural() const
Definition: svdobj.cxx:1060
virtual sdr::properties::BaseProperties & GetProperties() const override
Definition: svdovirt.cxx:33
virtual SdrObjList * GetSubList() const override
Definition: svdovirt.cxx:100
virtual void SetRectsDirty(bool bNotMyself=false, bool bRecursive=true)
Definition: svdobj.cxx:462
virtual void Shear(const Point &rRef, long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1558
virtual void SetSnapRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1649
virtual bool applySpecialDrag(SdrDragStat &rDrag)
Definition: svdobj.cxx:1323
void Move(long nHorzMove, long nVertMove)
virtual Point GetOffset() const
Definition: svdovirt.cxx:547
virtual ~SdrVirtObj() override
Definition: svdovirt.cxx:56
virtual const tools::Rectangle & GetLogicRect() const
Definition: svdobj.cxx:1634
virtual PointerStyle GetMacroPointer(const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:532
virtual bool DoMacro(const SdrObjMacroHitRec &rRec)
Definition: svdobj.cxx:1821
SdrVirtObj & operator=(const SdrVirtObj &rObj)
Definition: svdovirt.cxx:136
virtual SdrObjectUniquePtr getFullDragClone() const override
Definition: svdovirt.cxx:237
virtual void RecalcBoundRect() override
Definition: svdovirt.cxx:119
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
SdrCreateCmd
Definition: svdtypes.hxx:27
virtual void SetChanged()
Definition: svdobj.cxx:956
virtual Point GetPoint(sal_uInt32 i) const
Definition: svdobj.cxx:1697
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
Definition: svdovirt.cxx:318
virtual void PaintMacro(OutputDevice &rOut, const tools::Rectangle &rDirtyRect, const SdrObjMacroHitRec &rRec) const override
Definition: svdovirt.cxx:537
virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat &rDrag) const
Polygon dragged by the user when creating the object.
Definition: svdobj.cxx:1384
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
Definition: svdobj.cxx:2676
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: svdovirt.cxx:306
long Y() const
virtual sal_uInt32 GetSnapPointCount() const
snap to special points of an Object (polygon points, center of circle)
Definition: svdobj.cxx:1677
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
Definition: svdovirt.cxx:342
virtual bool hasSpecialDrag() const override
The standard transformations (Move,Resize,Rotate,Mirror,Shear) are taken over by the View (TakeXorPol...
Definition: svdovirt.cxx:227
virtual void AddToPlusHdlList(SdrHdlList &rHdlList, SdrHdl &rHdl) const override
Definition: svdovirt.cxx:214
virtual void SetSnapRect(const tools::Rectangle &rRect) override
Definition: svdovirt.cxx:394