27#include <svx/strings.hrc>
33#include <libxml/xmlwriter.h>
45 return std::make_unique<sdr::properties::GroupProperties>(*
this);
51 return std::make_unique<sdr::contact::ViewContactOfGroup>(*
this);
121 for (
size_t i=0;
i<nObjCount; ++
i) {
180 for (
size_t i=0;
i<nObjCount; ++
i) {
182 if (b1st) { nLay=nLay1; b1st =
false; }
192 for (
size_t i=0;
i<nObjCount; ++
i) {
215 const css::uno::Sequence<css::beans::PropertyValue>& propList(rVal.get< css::uno::Sequence<css::beans::PropertyValue> >());
216 for (
const auto& rProp : std::as_const(propList))
218 if(rProp.Name.startsWith(
"OOX"))
292 if (!
aName.isEmpty())
302 return SvxResId(STR_ObjNamePluralGRUPEMPTY);
304 return SvxResId(RID_GALLERYSTR_THEME_DIAGRAMS);
305 return SvxResId(STR_ObjNamePluralGRUP);
319 for(
size_t a = 0;
a < nObjCount; ++
a)
383 if (nDivX==0) { nMulX=1; nDivX=1; }
384 if (nDivY==0) { nMulY=1; nDivY=1; }
385 if (nMulX!=nDivX || nMulY!=nDivY) {
409 for (
size_t i=0;
i<nObjCount; ++
i)
427 if (bXMirr || bYMirr) {
446 for (
size_t i=0;
i<nObjCount; ++
i)
469 for (
size_t i=0;
i<nObjCount; ++
i)
486 for (
size_t i=0;
i<nObjCount; ++
i)
503 for (
size_t i=0;
i<nObjCount; ++
i)
506 pObj->
NbcShear(rRef,nAngle,tn,bVShear);
521 for (
size_t i=0;
i<nObjCount; ++
i)
545 if (nDivX==0) { nMulX=1; nDivX=1; }
546 if (nDivY==0) { nMulY=1; nDivY=1; }
547 if (nMulX!=nDivX || nMulY!=nDivY) {
581 for (
size_t i=0;
i<nObjCount; ++
i)
588 for (
size_t i=0;
i<nObjCount; ++
i)
614 if (bXMirr || bYMirr) {
634 for (
size_t i=0;
i<nObjCount; ++
i)
638 pObj->
Resize(rRef,xFact,yFact,bUnsetRelative);
641 for (
size_t i=0;
i<nObjCount; ++
i)
645 pObj->
Resize(rRef,xFact,yFact,bUnsetRelative);
665 if (nAngle==0_deg100)
674 for (
size_t i=0;
i<nObjCount; ++
i)
678 pObj->
Rotate(rRef,nAngle,sn,cs);
681 for (
size_t i=0;
i<nObjCount; ++
i)
685 pObj->
Rotate(rRef,nAngle,sn,cs);
704 for (
size_t i=0;
i<nObjCount; ++
i)
708 pObj->
Mirror(rRef1,rRef2);
711 for (
size_t i=0;
i<nObjCount; ++
i)
715 pObj->
Mirror(rRef1,rRef2);
728 if (nAngle==0_deg100)
737 for (
size_t i=0;
i<nObjCount; ++
i)
741 pObj->
Shear(rRef,nAngle,tn,bVShear);
744 for (
size_t i=0;
i<nObjCount; ++
i)
748 pObj->
Shear(rRef,nAngle,tn,bVShear);
770 for (
size_t i=0;
i<nObjCount; ++
i)
777 for (
size_t i=0;
i<nObjCount; ++
i)
796 Size aSiz(rPnt.
X()-aRelPos0.
X(),rPnt.
Y()-aRelPos0.
Y());
803 Size aSiz(rPnt.
X()-aRelPos0.
X(),rPnt.
Y()-aRelPos0.
Y());
817 for(
size_t a=0;
a < nObjCount; ++
a)
824 pGroup->GetSubList()->NbcInsertObject(pResult.get());
832 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SdrObjGroup"));
833 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
838 (void)xmlTextWriterEndElement(pWriter);
sal_Int32 GetNumerator() const
sal_Int32 GetDenominator() const
constexpr tools::Long Y() const
void Move(tools::Long nHorzMove, tools::Long nVertMove)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual rtl::Reference< SdrObject > DoConvertToPolyObj(bool bBezier, bool bAddText) const override
virtual void NbcMove(const Size &rSiz) override
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
virtual SdrLayerID GetLayer() const override
virtual SdrObjKind GetObjIdentifier() const override
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual void RecalcSnapRect() override
Snap is not done on the BoundRect but if possible on logic coordinates (i.e.
virtual void NbcSetAnchorPos(const Point &rPnt) override
virtual void Move(const Size &rSiz) override
virtual const std::shared_ptr< svx::diagram::IDiagramHelper > & getDiagramHelper() const override
std::shared_ptr< svx::diagram::IDiagramHelper > mp_DiagramHelper
virtual void NbcSetLayer(SdrLayerID nLayer) override
virtual SdrObjList * getChildrenOfSdrObject() const override
virtual void NbcSetRelativePos(const Point &rPnt) override
The relative position of a SdrObject is the distance of the upper left corner of the logic bounding r...
virtual void Mirror(const Point &rRef1, const Point &rRef2) override
virtual ~SdrObjGroup() override
virtual std::unique_ptr< sdr::contact::ViewContact > CreateObjectSpecificViewContact() override
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs) override
virtual Degree100 GetRotateAngle() const override
virtual void SetGrabBagItem(const css::uno::Any &rVal) override
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true) override
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
virtual Degree100 GetShearAngle(bool bVertical=false) const override
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
virtual void SetLogicRect(const tools::Rectangle &rRect) override
virtual void NbcReformatText() override
virtual basegfx::B2DPolyPolygon TakeXorPoly() const override
The Xor-Polygon is required by the View to drag the object.
virtual const tools::Rectangle & GetCurrentBoundRect() const override
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
virtual SdrObject * getSdrObjectFromSdrObjList() const override
virtual bool beginSpecialDrag(SdrDragStat &rDrag) const override
virtual bool BegCreate(SdrDragStat &rStat) override
Every object must be able to create itself interactively.
virtual void NbcMirror(const Point &rRef1, const Point &rRef2) override
virtual SdrObjList * GetSubList() const override
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage) override
SdrObjGroup(SdrModel &rSdrModel)
virtual const tools::Rectangle & GetSnapRect() const override
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
virtual OUString TakeObjNameSingul() const override
virtual void AddToHdlList(SdrHdlList &rHdlList) const override
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const override
virtual void SetBoundRectDirty() override
virtual OUString TakeObjNamePlural() const override
virtual void SetRelativePos(const Point &rPnt) override
virtual void SetAnchorPos(const Point &rPnt) override
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear) override
virtual void SetSnapRect(const tools::Rectangle &rRect) override
virtual std::unique_ptr< sdr::properties::BaseProperties > CreateObjectSpecificProperties() override
virtual SdrPage * getSdrPageFromSdrObjList() const override
const tools::Rectangle & GetAllObjBoundRect() const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
void CopyObjects(const SdrObjList &rSrcList)
const tools::Rectangle & GetAllObjSnapRect() const
void NbcReformatAllTextObjects()
reformat all text objects, e.g. when changing printer
void setOutRectangleConst(tools::Rectangle const &rRectangle) const
virtual void NbcSetAnchorPos(const Point &rPnt)
virtual Degree100 GetShearAngle(bool bVertical=false) const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual rtl::Reference< SdrObject > DoConvertToPolyObj(bool bBezier, bool bAddText) const
virtual void SetAnchorPos(const Point &rPnt)
virtual Degree100 GetRotateAngle() const
virtual void SetGrabBagItem(const css::uno::Any &rVal)
virtual void NbcSetLayer(SdrLayerID nLayer)
const tools::Rectangle & getOutRectangle() const
void moveOutRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta)
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
The Xor-Polygon is required by the View to drag the object.
void BroadcastObjectChange() const
virtual void Mirror(const Point &rRef1, const Point &rRef2)
void NbcMirrorGluePoints(const Point &rRef1, const Point &rRef2)
virtual void handlePageChange(SdrPage *pOldPage, SdrPage *pNewPage)
virtual void Move(const Size &rSiz)
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
SdrModel & getSdrModelFromSdrObject() const
SdrObjUserCall * m_pUserCall
virtual void NbcShear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
void NbcShearGluePoints(const Point &rRef, double tn, bool bVShear)
virtual const OUString & GetName() const
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
void SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle &rBoundRect) const
virtual void SetChanged()
virtual const tools::Rectangle & GetLastBoundRect() const
SdrPage * getSdrPageFromSdrObject() const
virtual SdrLayerID GetLayer() const
void NbcRotateGluePoints(const Point &rRef, Degree100 nAngle, double sn, double cs)
void GetGrabBagItem(css::uno::Any &rVal) const
void setOutRectangle(tools::Rectangle const &rRectangle)
void SetGlueReallyAbsolute(bool bOn)
virtual void NbcMove(const Size &rSiz)
The methods Move, Resize, Rotate, Mirror, Shear, SetSnapRect and SetLogicRect call the corresponding ...
virtual void SetBoundAndSnapRectsDirty(bool bNotMyself=false, bool bRecursive=true)
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
virtual void NbcRotate(const Point &rRef, Degree100 nAngle, double sn, double cs)=0
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
static void AddAdditionalVisualization(const SdrObjGroup &rTarget, SdrHdlList &rHdlList)
OUString SvxResId(TranslateId aId)
struct _xmlTextWriter * xmlTextWriterPtr
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
@ Group
abstract object (SdrObject)
static bool containsOOXData(const css::uno::Any &rVal)
void ResizeRect(tools::Rectangle &rRect, const Point &rRef, const Fraction &rxFact, const Fraction &ryFact)
void MirrorPoint(Point &rPnt, const Point &rRef1, const Point &rRef2)
void ShearPoint(Point &rPnt, const Point &rRef, double tn, bool bVShear=false)
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
void ResizePoint(Point &rPnt, const Point &rRef, const Fraction &xFract, const Fraction &yFract)
o3tl::strong_int< sal_Int16, struct SdrLayerIDTag > SdrLayerID