LibreOffice Module svx (master)  1
EnhancedCustomShapeEngine.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 #include <com/sun/star/uno/Reference.h>
21 #include <com/sun/star/uno/XComponentContext.hpp>
22 #include <com/sun/star/awt/Rectangle.hpp>
23 #include <com/sun/star/beans/PropertyValue.hpp>
24 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/drawing/XCustomShapeEngine.hpp>
32 #include <svx/unoshape.hxx>
33 #include <svx/unopage.hxx>
34 #include <svx/unoapi.hxx>
35 #include <svx/svdobj.hxx>
36 #include <svx/svdoashp.hxx>
37 #include <svx/svdogrp.hxx>
38 #include <editeng/outlobj.hxx>
39 #include <svl/itemset.hxx>
40 #include <svx/svdopath.hxx>
41 #include <svx/svdpage.hxx>
42 #include <svx/svditer.hxx>
43 #include <svx/xfillit0.hxx>
44 #include <svx/xlineit0.hxx>
46 #include <com/sun/star/document/XActionLockable.hpp>
47 #include <cppuhelper/implbase.hxx>
49 
50 using namespace css;
51 using namespace css::uno;
52 
53 class SdrObject;
54 class SdrObjCustomShape;
55 
56 namespace {
57 
58 class EnhancedCustomShapeEngine : public cppu::WeakImplHelper
59 <
60  css::lang::XInitialization,
61  css::lang::XServiceInfo,
62  css::drawing::XCustomShapeEngine
63 >
64 {
65  css::uno::Reference< css::drawing::XShape > mxShape;
66  bool mbForceGroupWithText;
67 
68  std::unique_ptr<SdrObject, SdrObjectFreeOp> ImplForceGroupWithText(
69  const SdrObjCustomShape& rSdrObjCustomShape,
70  std::unique_ptr<SdrObject, SdrObjectFreeOp> pRenderedShape);
71 
72 public:
73  EnhancedCustomShapeEngine();
74 
75  // XInterface
76  virtual void SAL_CALL acquire() throw() override;
77  virtual void SAL_CALL release() throw() override;
78 
79  // XInitialization
80  virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
81 
82  // XServiceInfo
83  virtual OUString SAL_CALL getImplementationName() override;
84  virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
85  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
86 
87  // XCustomShapeEngine
88  virtual css::uno::Reference< css::drawing::XShape > SAL_CALL render() override;
89  virtual css::awt::Rectangle SAL_CALL getTextBounds() override;
90  virtual css::drawing::PolyPolygonBezierCoords SAL_CALL getLineGeometry() override;
91  virtual css::uno::Sequence< css::uno::Reference< css::drawing::XCustomShapeHandle > > SAL_CALL getInteraction() override;
92 };
93 
94 EnhancedCustomShapeEngine::EnhancedCustomShapeEngine() :
95  mbForceGroupWithText ( false )
96 {
97 }
98 
99 // XInterface
100 void SAL_CALL EnhancedCustomShapeEngine::acquire() throw()
101 {
102  OWeakObject::acquire();
103 }
104 void SAL_CALL EnhancedCustomShapeEngine::release() throw()
105 {
106  OWeakObject::release();
107 }
108 
109 // XInitialization
110 void SAL_CALL EnhancedCustomShapeEngine::initialize( const Sequence< Any >& aArguments )
111 {
113  for ( const auto& rArgument : aArguments )
114  {
115  if ( rArgument >>= aParameter )
116  break;
117  }
118  for ( const beans::PropertyValue& rProp : std::as_const(aParameter) )
119  {
120  if ( rProp.Name == "CustomShape" )
121  rProp.Value >>= mxShape;
122  else if ( rProp.Name == "ForceGroupWithText" )
123  rProp.Value >>= mbForceGroupWithText;
124  }
125 }
126 
127 // XServiceInfo
128 OUString SAL_CALL EnhancedCustomShapeEngine::getImplementationName()
129 {
130  return "com.sun.star.drawing.EnhancedCustomShapeEngine";
131 }
132 sal_Bool SAL_CALL EnhancedCustomShapeEngine::supportsService( const OUString& rServiceName )
133 {
134  return cppu::supportsService(this, rServiceName);
135 }
136 Sequence< OUString > SAL_CALL EnhancedCustomShapeEngine::getSupportedServiceNames()
137 {
138  return { "com.sun.star.drawing.CustomShapeEngine" };
139 }
140 
141 // XCustomShapeEngine
142 std::unique_ptr<SdrObject, SdrObjectFreeOp> EnhancedCustomShapeEngine::ImplForceGroupWithText(
143  const SdrObjCustomShape& rSdrObjCustomShape,
144  std::unique_ptr<SdrObject, SdrObjectFreeOp> pRenderedShape)
145 {
146  const bool bHasText(rSdrObjCustomShape.HasText());
147 
148  if ( pRenderedShape || bHasText )
149  {
150  // applying shadow
151  const SdrObject* pShadowGeometry(rSdrObjCustomShape.GetSdrObjectShadowFromCustomShape());
152 
153  if ( pShadowGeometry )
154  {
155  if ( pRenderedShape )
156  {
157  if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape.get() ) == nullptr )
158  {
159  auto pTmp = std::move(pRenderedShape);
160  pRenderedShape.reset(new SdrObjGroup(rSdrObjCustomShape.getSdrModelFromSdrObject()));
161  static_cast<SdrObjGroup*>(pRenderedShape.get())->GetSubList()->NbcInsertObject( pTmp.release() );
162  }
163 
164  static_cast<SdrObjGroup*>(pRenderedShape.get())->GetSubList()->NbcInsertObject(
165  pShadowGeometry->CloneSdrObject(pShadowGeometry->getSdrModelFromSdrObject()),
166  0);
167  }
168  else
169  {
170  pRenderedShape.reset( pShadowGeometry->CloneSdrObject(pShadowGeometry->getSdrModelFromSdrObject()) );
171  }
172  }
173 
174  // apply text
175  if ( bHasText )
176  {
177  // #i37011# also create a text object and add at rPos + 1
178  std::unique_ptr<SdrObject, SdrObjectFreeOp> pTextObj( SdrObjFactory::MakeNewObject(
179  rSdrObjCustomShape.getSdrModelFromSdrObject(),
180  rSdrObjCustomShape.GetObjInventor(),
181  OBJ_TEXT) );
182 
183  // Copy text content
184  OutlinerParaObject* pParaObj(rSdrObjCustomShape.GetOutlinerParaObject());
185 
186  if( pParaObj )
187  pTextObj->NbcSetOutlinerParaObject( std::make_unique<OutlinerParaObject>(*pParaObj) );
188 
189  // copy all attributes
190  SfxItemSet aTargetItemSet(rSdrObjCustomShape.GetMergedItemSet());
191 
192  // clear fill and line style
193  aTargetItemSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
194  aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE));
195 
196  // get the text bounds and set at text object
197  tools::Rectangle aTextBounds(rSdrObjCustomShape.GetSnapRect());
198  const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(mxShape)));
199 
200  if(bIsSdrObjCustomShape)
201  {
202  SdrObjCustomShape& rSdrObjCustomShape2(
203  static_cast< SdrObjCustomShape& >(
204  *GetSdrObjectFromXShape(mxShape)));
205  EnhancedCustomShape2d aCustomShape2d(rSdrObjCustomShape2);
206  aTextBounds = aCustomShape2d.GetTextRect();
207  }
208 
209  pTextObj->SetSnapRect( aTextBounds );
210 
211  // if rotated, copy GeoStat, too.
212  const GeoStat& rSourceGeo(rSdrObjCustomShape.GetGeoStat());
213  if ( rSourceGeo.nRotationAngle )
214  {
215  pTextObj->NbcRotate(
216  rSdrObjCustomShape.GetSnapRect().Center(),
217  rSourceGeo.nRotationAngle,
218  rSourceGeo.nSin,
219  rSourceGeo.nCos);
220  }
221 
222  // set modified ItemSet at text object
223  pTextObj->SetMergedItemSet(aTargetItemSet);
224 
225  if ( pRenderedShape )
226  {
227  if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape.get() ) == nullptr )
228  {
229  auto pTmp = std::move(pRenderedShape);
230  pRenderedShape.reset(new SdrObjGroup(rSdrObjCustomShape.getSdrModelFromSdrObject()));
231  static_cast<SdrObjGroup*>(pRenderedShape.get())->GetSubList()->NbcInsertObject( pTmp.release() );
232  }
233  static_cast<SdrObjGroup*>(pRenderedShape.get())->GetSubList()->NbcInsertObject( pTextObj.release() );
234  }
235  else
236  pRenderedShape = std::move(pTextObj);
237  }
238 
239  // force group
240  if ( pRenderedShape )
241  {
242  if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape.get() ) == nullptr )
243  {
244  auto pTmp = std::move(pRenderedShape);
245  pRenderedShape.reset(new SdrObjGroup(rSdrObjCustomShape.getSdrModelFromSdrObject()));
246  static_cast<SdrObjGroup*>(pRenderedShape.get())->GetSubList()->NbcInsertObject( pTmp.release() );
247  }
248  }
249  }
250 
251  return pRenderedShape;
252 }
253 
254 void SetTemporary( uno::Reference< drawing::XShape > const & xShape )
255 {
256  if ( xShape.is() )
257  {
258  SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape );
259  if ( pShape )
260  pShape->TakeSdrObjectOwnership();
261  }
262 }
263 
264 Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
265 {
266  const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(mxShape)));
267 
268  if(!bIsSdrObjCustomShape)
269  {
270  return Reference< drawing::XShape >();
271  }
272 
273  SdrObjCustomShape& rSdrObjCustomShape(
274  static_cast< SdrObjCustomShape& >(
275  *GetSdrObjectFromXShape(mxShape)));
276 
277  // retrieving the TextPath property to check if feature is enabled
278  const SdrCustomShapeGeometryItem& rGeometryItem(rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
279  bool bTextPathOn = false;
280  const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "TextPath" );
281  if ( pAny )
282  *pAny >>= bTextPathOn;
283 
284  EnhancedCustomShape2d aCustomShape2d(rSdrObjCustomShape);
285  sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle();
286 
287  bool bFlipV = aCustomShape2d.IsFlipVert();
288  bool bFlipH = aCustomShape2d.IsFlipHorz();
289  bool bLineGeometryNeededOnly = bTextPathOn;
290 
291  std::unique_ptr<SdrObject, SdrObjectFreeOp> xRenderedShape(aCustomShape2d.CreateObject(bLineGeometryNeededOnly));
292  if (xRenderedShape)
293  {
294  if ( bTextPathOn )
295  {
296  std::unique_ptr<SdrObject, SdrObjectFreeOp> xRenderedFontWork(
298  xRenderedShape.get(),
299  rSdrObjCustomShape));
300 
301  if (xRenderedFontWork)
302  {
303  xRenderedShape = std::move(xRenderedFontWork);
304  }
305  }
306  std::unique_ptr<SdrObject, SdrObjectFreeOp> xRenderedShape3d(EnhancedCustomShape3d::Create3DObject(xRenderedShape.get(), rSdrObjCustomShape));
307  if (xRenderedShape3d)
308  {
309  bFlipV = bFlipH = false;
310  nRotateAngle = 0;
311  xRenderedShape = std::move(xRenderedShape3d);
312  }
313 
314  tools::Rectangle aRect(rSdrObjCustomShape.GetSnapRect());
315  const GeoStat& rGeoStat(rSdrObjCustomShape.GetGeoStat());
316 
317  if ( rGeoStat.nShearAngle )
318  {
319  tools::Long nShearAngle = rGeoStat.nShearAngle;
320  double nTan = rGeoStat.nTan;
321  if (bFlipV != bFlipH)
322  {
323  nShearAngle = -nShearAngle;
324  nTan = -nTan;
325  }
326 
327  xRenderedShape->Shear(rSdrObjCustomShape.GetSnapRect().Center(), nShearAngle, nTan, false);
328  }
329  if(nRotateAngle )
330  {
331  double a = nRotateAngle * F_PI18000;
332 
333  xRenderedShape->NbcRotate(rSdrObjCustomShape.GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ));
334  }
335  if ( bFlipV )
336  {
337  Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 );
338  Point aRight( aLeft.X() + 1000, aLeft.Y() );
339  xRenderedShape->NbcMirror( aLeft, aRight );
340  }
341  if ( bFlipH )
342  {
343  Point aTop( ( aRect.Left() + aRect.Right() ) >> 1, aRect.Top() );
344  Point aBottom( aTop.X(), aTop.Y() + 1000 );
345  xRenderedShape->NbcMirror( aTop, aBottom );
346  }
347 
348  xRenderedShape->NbcSetStyleSheet(rSdrObjCustomShape.GetStyleSheet(), true);
349  xRenderedShape->RecalcSnapRect();
350  }
351 
352  if ( mbForceGroupWithText )
353  {
354  xRenderedShape = ImplForceGroupWithText(
355  rSdrObjCustomShape,
356  std::move(xRenderedShape));
357  }
358 
359  Reference< drawing::XShape > xShape;
360 
361  if (xRenderedShape)
362  {
363  aCustomShape2d.ApplyGluePoints(xRenderedShape.get());
364  SdrObject* pRenderedShape = xRenderedShape.release();
366  pRenderedShape->GetObjInventor(), pRenderedShape );
367  }
368 
369  SetTemporary( xShape );
370 
371  return xShape;
372 }
373 
374 awt::Rectangle SAL_CALL EnhancedCustomShapeEngine::getTextBounds()
375 {
376  awt::Rectangle aTextRect;
377  const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(mxShape)));
378 
379  if(bIsSdrObjCustomShape)
380  {
381  SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*GetSdrObjectFromXShape(mxShape)));
382  uno::Reference< document::XActionLockable > xLockable( mxShape, uno::UNO_QUERY );
383 
384  if(xLockable.is() && !xLockable->isActionLocked())
385  {
386  EnhancedCustomShape2d aCustomShape2d(rSdrObjCustomShape);
387  tools::Rectangle aRect( aCustomShape2d.GetTextRect() );
388  aTextRect.X = aRect.Left();
389  aTextRect.Y = aRect.Top();
390  aTextRect.Width = aRect.GetWidth();
391  aTextRect.Height = aRect.GetHeight();
392  }
393  }
394 
395  return aTextRect;
396 }
397 
398 drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeometry()
399 {
400  drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords;
401  const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(mxShape)));
402 
403  if(bIsSdrObjCustomShape)
404  {
405  SdrObjCustomShape& rSdrObjCustomShape(
406  static_cast< SdrObjCustomShape& >(
407  *GetSdrObjectFromXShape(mxShape)));
408  EnhancedCustomShape2d aCustomShape2d(rSdrObjCustomShape);
409  SdrObject* pObj = aCustomShape2d.CreateLineGeometry();
410 
411  if ( pObj )
412  {
413  tools::Rectangle aRect(rSdrObjCustomShape.GetSnapRect());
414  bool bFlipV = aCustomShape2d.IsFlipVert();
415  bool bFlipH = aCustomShape2d.IsFlipHorz();
416  const GeoStat& rGeoStat(rSdrObjCustomShape.GetGeoStat());
417 
418  if ( rGeoStat.nShearAngle )
419  {
420  tools::Long nShearAngle = rGeoStat.nShearAngle;
421  double nTan = rGeoStat.nTan;
422  if (bFlipV != bFlipH)
423  {
424  nShearAngle = -nShearAngle;
425  nTan = -nTan;
426  }
427  pObj->Shear( aRect.Center(), nShearAngle, nTan, false);
428  }
429  sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle();
430  if( nRotateAngle )
431  {
432  double a = nRotateAngle * F_PI18000;
433  pObj->NbcRotate( aRect.Center(), nRotateAngle, sin( a ), cos( a ) );
434  }
435  if ( bFlipH )
436  {
437  Point aTop( ( aRect.Left() + aRect.Right() ) >> 1, aRect.Top() );
438  Point aBottom( aTop.X(), aTop.Y() + 1000 );
439  pObj->NbcMirror( aTop, aBottom );
440  }
441  if ( bFlipV )
442  {
443  Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) >> 1 );
444  Point aRight( aLeft.X() + 1000, aLeft.Y() );
445  pObj->NbcMirror( aLeft, aRight );
446  }
447 
448  basegfx::B2DPolyPolygon aPolyPolygon;
450 
451  while ( aIter.IsMore() )
452  {
454  const SdrObject* pNext = aIter.Next();
455 
456  if ( auto pPathObj = dynamic_cast<const SdrPathObj*>(pNext) )
457  {
458  aPP = pPathObj->GetPathPoly();
459  }
460  else
461  {
462  SdrObjectUniquePtr pNewObj = pNext->ConvertToPolyObj( false, false );
463  SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pNewObj.get() );
464  if ( pPath )
465  aPP = pPath->GetPathPoly();
466  }
467 
468  if ( aPP.count() )
469  aPolyPolygon.append(aPP);
470  }
471  SdrObject::Free( pObj );
473  aPolyPolygonBezierCoords );
474  }
475  }
476 
477  return aPolyPolygonBezierCoords;
478 }
479 
480 Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShapeEngine::getInteraction()
481 {
482  sal_uInt32 i, nHdlCount = 0;
483  const bool bIsSdrObjCustomShape(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(mxShape)));
484 
485  if(bIsSdrObjCustomShape)
486  {
487  SdrObjCustomShape& rSdrObjCustomShape(
488  static_cast< SdrObjCustomShape& >(
489  *GetSdrObjectFromXShape(mxShape)));
490  EnhancedCustomShape2d aCustomShape2d(rSdrObjCustomShape);
491  nHdlCount = aCustomShape2d.GetHdlCount();
492  }
493 
494  Sequence< Reference< drawing::XCustomShapeHandle > > aSeq( nHdlCount );
495 
496  for ( i = 0; i < nHdlCount; i++ )
497  aSeq[ i ] = new EnhancedCustomShapeHandle( mxShape, i );
498  return aSeq;
499 }
500 
501 }
502 
503 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
505  css::uno::XComponentContext *,
506  css::uno::Sequence<css::uno::Any> const &)
507 {
508  return cppu::acquire(new EnhancedCustomShapeEngine);
509 }
510 
511 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
static SvxShape * CreateShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage=nullptr, OUString const &referer=OUString())
Definition: unopage.cxx:612
long Long
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
Definition: svdpage.cxx:292
static SdrObject * MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
Definition: svdobj.cxx:3056
static void Free(SdrObject *&_rpObject)
Definition: svdobj.cxx:396
virtual SdrObjKind GetObjIdentifier() const
Definition: svdobj.cxx:558
virtual const tools::Rectangle & GetSnapRect() const override
Definition: svdoattr.cxx:44
virtual bool HasText() const override
Definition: svdotxat.cxx:413
uno::Reference< drawing::XShape > const mxShape
tools::Long Left() const
The transformation of a rectangle into a polygon, by using angle parameters from GeoStat.
Definition: svdtrans.hxx:214
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SfxStyleSheet * GetStyleSheet() const
Definition: svdobj.cxx:2141
const GeoStat & GetGeoStat() const
Definition: svdotext.hxx:399
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
int i
uno_Any a
virtual void NbcMirror(const Point &rRef1, const Point &rRef2)
Definition: svdobj.cxx:1429
void TakeSdrObjectOwnership()
takes the ownership of the SdrObject.
Definition: unoshape.cxx:249
unsigned char sal_Bool
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:273
const SdrObject * GetSdrObjectShadowFromCustomShape() const
Definition: svdoashp.cxx:418
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
Definition: svdobj.cxx:1925
Abstract DrawObject.
Definition: svdobj.hxx:260
virtual SdrInventor GetObjInventor() const
Definition: svdobj.cxx:553
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
SdrObjectUniquePtr ConvertToPolyObj(bool bBezier, bool bLineToArea) const
Definition: svdobj.cxx:2511
sal_uInt32 count() const
static SdrObject * Create3DObject(const SdrObject *pShape2d, const SdrObjCustomShape &rSdrObjCustomShape)
virtual OutlinerParaObject * GetOutlinerParaObject() const override
Definition: svdotext.cxx:1362
static SdrObject * CreateFontWork(const SdrObject *pShape2d, const SdrObjCustomShape &rSdrObjCustomShape)
const SfxItemSet & GetMergedItemSet() const
Definition: svdobj.cxx:1890
#define F_PI18000
Sequence< sal_Int8 > aSeq
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:98
const basegfx::B2DPolyPolygon & GetPathPoly() const
Definition: svdopath.hxx:139
void B2DPolyPolygonToUnoPolyPolygonBezierCoords(const B2DPolyPolygon &rPolyPolygon, css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsRetval)
virtual void Shear(const Point &rRef, tools::Long nAngle, double tn, bool bVShear)
Definition: svdobj.cxx:1532
tools::Long nShearAngle
Definition: svdtrans.hxx:217
SdrObject * GetSdrObjectFromXShape(const uno::Reference< drawing::XShape > &xShape)
returns the SdrObject from the given StarOffice API wrapper
Definition: unoshape.cxx:3986
virtual void NbcRotate(const Point &rRef, tools::Long nAngle, double sn, double cs)
Definition: svdobj.cxx:1401
periodic cubic Spline (ni)
Definition: svdobjkind.hxx:42
Point Center() const