21 #include <com/sun/star/awt/XBitmap.hpp>
22 #include <com/sun/star/awt/Rectangle.hpp>
23 #include <com/sun/star/drawing/CircleKind.hpp>
24 #include <com/sun/star/lang/NoSupportException.hpp>
28 #include <osl/mutex.hxx>
92 #include <bitmaps.hlst>
94 using namespace ::
osl;
95 using namespace ::
cppu;
125 :mrAntiImpl( _rAntiImpl )
128 ,mbHasSdrObjectOwnership( false )
129 ,mbDisposing( false )
131 ,maDisposeListeners( _rMutex )
132 ,maPropertyNotifier( _rAntiImpl, _rMutex )
142 explicit ShapePositionProvider(
const SvxShapeImpl& _shapeImpl )
150 _out_rCurrentValue <<= static_cast< SvxShape& >(
getContext() ).getPosition();
158 explicit ShapeSizeProvider(
const SvxShapeImpl& _shapeImpl )
166 _out_rCurrentValue <<= static_cast< SvxShape& >(
getContext() ).getSize();
171 sal_Int16 GetTextFitToSizeScale(
SdrObject* pObject)
181 != drawing::TextFitToSizeType_AUTOFIT)
186 std::unique_ptr<SdrOutliner> pOutliner
192 pOutliner->GetGlobalCharStretching(nX, nY);
200 , mbIsMultiPropertyCall(false)
203 , mpSdrObjectWeakReference(pObject)
213 , mbIsMultiPropertyCall(false)
214 , mpPropSet(pPropertySet)
215 , maPropMapEntries(pEntries)
216 , mpSdrObjectWeakReference(pObject)
230 mpImpl->mpMaster->dispose();
240 mpImpl->mbHasSdrObjectOwnership =
false;
251 mpImpl->mbHasSdrObjectOwnership =
true;
270 if ( !
mpImpl->mbHasSdrObjectOwnership )
273 OSL_ENSURE(
HasSdrObject(),
"SvxShape::HasSdrObjectOwnership: have the ownership of an object which I don't know!" );
292 mpImpl->mpMaster = pMaster;
301 if(
mpImpl->mpMaster->queryAggregation( rType, aAny ) )
310 class theSvxShapeUnoTunnelId :
public rtl::Static< UnoTunnelIdInit, theSvxShapeUnoTunnelId > {};
313 const css::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() throw()
315 return theSvxShapeUnoTunnelId::get().getSeq();
318 sal_Int64 SAL_CALL SvxShape::getSomething(
const css::uno::Sequence< sal_Int8 >& rId )
320 if( isUnoTunnelId<SvxShape>(rId) )
322 return sal::static_int_cast<sal_Int64>(
reinterpret_cast<sal_uIntPtr
>(
this));
333 return mpImpl->maPropertyNotifier;
340 std::make_shared<ShapePositionProvider>( *
mpImpl ) );
342 std::make_shared<ShapeSizeProvider>( *
mpImpl ) );
355 OSL_PRECOND(
HasSdrObject(),
"SvxShape::impl_initFromSdrObject: not to be called without SdrObject!" );
400 OSL_PRECOND( pNewObj,
"SvxShape::Create: invalid new object!" );
405 OSL_ENSURE( ( pCreatedObj ==
nullptr ) || ( pCreatedObj == pNewObj ),
406 "SvxShape::Create: the same shape used for two different objects?! Strange ..." );
409 if ( pCreatedObj == pNewObj )
413 mpImpl->mpCreatedObj = pNewObj;
459 MapUnit eMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0));
460 if(eMapUnit == MapUnit::Map100thMM)
465 case MapUnit::MapTwip :
473 OSL_FAIL(
"AW: Missing unit translation to PoolMetric!");
484 MapUnit eMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0));
485 if(eMapUnit == MapUnit::Map100thMM)
490 case MapUnit::MapTwip :
493 const double fMMToTWIPS(72.0 / 127.0);
495 aTransform.
scale(fMMToTWIPS, fMMToTWIPS);
496 rPolyPolygon.transform(aTransform);
501 OSL_FAIL(
"Missing unit translation to PoolMetric!");
512 MapUnit eMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0));
513 if(eMapUnit == MapUnit::Map100thMM)
518 case MapUnit::MapTwip :
520 const double fMMToTWIPS(72.0 / 127.0);
523 aDecomposedTransform.
getScale() * fMMToTWIPS,
531 OSL_FAIL(
"Missing unit translation to PoolMetric!");
539 MapUnit eMapUnit = MapUnit::Map100thMM;
543 eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
544 if(eMapUnit == MapUnit::Map100thMM)
549 case MapUnit::MapTwip :
557 OSL_FAIL(
"AW: Missing unit translation to 100th mm!");
565 MapUnit eMapUnit = MapUnit::Map100thMM;
569 eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
570 if(eMapUnit == MapUnit::Map100thMM)
575 case MapUnit::MapTwip :
578 const double fTWIPSToMM(127.0 / 72.0);
579 aTransform.
scale(fTWIPSToMM, fTWIPSToMM);
580 rPolyPolygon.transform(aTransform);
585 OSL_FAIL(
"Missing unit translation to 100th mm!");
593 MapUnit eMapUnit = MapUnit::Map100thMM;
597 eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
598 if(eMapUnit == MapUnit::Map100thMM)
603 case MapUnit::MapTwip :
605 const double fTWIPSToMM(127.0 / 72.0);
608 aDecomposedTransform.
getScale() * fTWIPSToMM,
616 OSL_FAIL(
"Missing unit translation to 100th mm!");
630 for(
const auto& rSrcProp : aSrcPropVector)
632 const sal_uInt16 nWID = rSrcProp.nWID;
634 && (nWID < OWN_ATTR_VALUE_START || nWID > OWN_ATTR_VALUE_END)
639 for(
const auto& rSrcProp : aSrcPropVector)
651 if(pEntry->
nWID >= OWN_ATTR_VALUE_START && pEntry->
nWID <= OWN_ATTR_VALUE_END)
655 xSet->setPropertyValue( rSrcProp.sName, *pUsrAny);
709 if(
nullptr != pSdrGrafObj)
713 if(GraphicType::Bitmap == rGraphic.GetType())
715 Reference< awt::XBitmap > xBmp( rGraphic.GetXGraphic(), UNO_QUERY );
732 pVDev->SetMapMode(
MapMode(MapUnit::Map100thMM));
733 pVDev->EnableOutput(
false);
750 const uno::Sequence<sal_Int8>
aSeq(
751 static_cast< const sal_Int8* >(aDestStrm.
GetData()),
759 GetSdrObject()->GetViewContact().getViewIndependentPrimitive2DContainer());
761 if(!xPrimitives.empty())
767 if(!aRange.isEmpty())
771 if(MapUnit::Map100thMM != aSourceMapUnit)
780 MapMode(MapUnit::Map100thMM)));
793 aRange.transform(aMapTransform);
806 Reference< awt::XBitmap > xBmp( aGraph.
GetXGraphic(), UNO_QUERY );
819 return mpImpl->mpMaster->getTypes();
845 static uno::Sequence<uno::Type> aTypeSequence{
860 return aTypeSequence;
865 static uno::Sequence<uno::Type> aTypeSequence{
882 return aTypeSequence;
887 static uno::Sequence<uno::Type> aTypeSequence{
908 return aTypeSequence;
913 static uno::Sequence<uno::Type> aTypeSequence{
929 return aTypeSequence;
934 static uno::Sequence<uno::Type> aTypeSequence{
950 return aTypeSequence;
954 static uno::Sequence<uno::Type> aTypeSequence{
974 return aTypeSequence;
995 static uno::Sequence<uno::Type> aTypeSequence{
1015 return aTypeSequence;
1023 return css::uno::Sequence<sal_Int8>();
1029 if( !HasSdrObject() )
1033 if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
1041 uno::Reference< uno::XInterface > xSelf( pSdrObject->
getWeakUnoShape() );
1045 mpSdrObjectWeakReference.reset(
nullptr);
1049 bool bClearMe =
false;
1070 if(!HasSdrObjectOwnership())
1072 if(
nullptr != pSdrObject)
1078 mpSdrObjectWeakReference.reset(
nullptr);
1082 if(
nullptr != pSdrObject && !pSdrObject->
IsInserted())
1088 if(!mpImpl->mbDisposing)
1171 return css::awt::Point( aPt.X(), aPt.Y() );
1188 if(dynamic_cast<const E3dCompoundObject* >(
GetSdrObject()) ==
nullptr)
1191 Point aLocalPos( Position.X, Position.Y );
1195 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
1219 return css::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() );
1236 const bool b3DConstruction(dynamic_cast< E3dObject* >(
GetSdrObject()) &&
GetSdrObject()->getSdrModelFromSdrObject().isLocked());
1241 Size aLocalSize( rSize.Width, rSize.Height );
1254 if ( !aLocalSize.
Width() )
1260 if ( !aLocalSize.
Height() )
1322 if(
mpImpl->mbDisposing )
1325 mpImpl->mbDisposing =
true;
1327 lang::EventObject aEvt;
1329 mpImpl->maDisposeListeners.disposeAndClear(aEvt);
1330 mpImpl->maPropertyNotifier.disposing();
1338 bool bFreeSdrObject =
false;
1349 for (
size_t nNum = 0; nNum < nCount; ++nNum )
1351 if ( pPage->
GetObj( nNum ) == pObject )
1354 bFreeSdrObject =
true;
1362 if ( bFreeSdrObject )
1366 mpImpl->mbHasSdrObjectOwnership =
false;
1374 mpImpl->maDisposeListeners.addInterface(xListener);
1380 mpImpl->maDisposeListeners.removeInterface(aListener);
1391 return mpImpl->mpMaster->getPropertySetInfo();
1408 ::osl::MutexGuard aGuard(
maMutex );
1409 mpImpl->maPropertyNotifier.addPropertyChangeListener( _propertyName, _listener );
1415 ::osl::MutexGuard aGuard(
maMutex );
1416 mpImpl->maPropertyNotifier.removePropertyChangeListener( _propertyName, _listener );
1422 OSL_FAIL(
"SvxShape::addVetoableChangeListener: don't have any vetoable properties, so why ...?" );
1428 OSL_FAIL(
"SvxShape::removeVetoableChangeListener: don't have any vetoable properties, so why ...?" );
1468 if( !pBitmapList.is() )
1475 const XBitmapEntry* pEntry = pBitmapList->GetBitmap(nPos);
1484 if( !pGradientList.is() )
1493 rSet.
Put( aGrdItem );
1500 if( !pHatchList.is() )
1507 const XHatchEntry* pEntry = pHatchList->GetHatch( nPos );
1509 rSet.
Put( aHatchItem );
1517 if( !pLineEndList.is() )
1524 const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nPos);
1528 rSet.
Put( aLEItem );
1533 rSet.
Put( aLSItem );
1542 if( !pDashList.is() )
1549 const XDashEntry* pEntry = pDashList->GetDash(nPos);
1551 rSet.
Put( aDashItem );
1567 if (aName.isEmpty())
1597 if( pItem->
GetName() == aName )
1612 mpImpl->mpMaster->setPropertyValue( rPropertyName, rVal );
1632 if (pMap && pMap->
nWID)
1648 SAL_WARN_IF(rPropertyName !=
"FromWordArt" && rPropertyName !=
"GraphicColorMode",
1649 "svx.uno",
"Unknown Property: " << rPropertyName);
1650 throw beans::UnknownPropertyException( rPropertyName, static_cast<cppu::OWeakObject*>(
this));
1653 if ((pMap->
nFlags & beans::PropertyAttribute::READONLY) != 0)
1654 throw beans::PropertyVetoException(
1655 "Readonly property can't be set: " + rPropertyName,
1656 uno::Reference<drawing::XShape>(
this));
1664 DBG_ASSERT( pMap->
nWID < OWN_ATTR_VALUE_START || pMap->
nWID > OWN_ATTR_VALUE_END,
"Not item property not handled!" );
1670 sal_Int32 nCornerRadius = 0;
1671 if( !(rVal >>= nCornerRadius) || (nCornerRadius < 0) || (nCornerRadius > 5000000))
1672 throw IllegalArgumentException();
1678 if(
mpImpl->mpItemSet ==
nullptr )
1686 pSet =
mpImpl->mpItemSet.get();
1711 pSet->
Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1743 return mpImpl->mpMaster->getPropertyValue( PropertyName );
1758 if(pMap ==
nullptr )
1759 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
1764 DBG_ASSERT( pMap->
nWID < OWN_ATTR_VALUE_START || pMap->
nWID > OWN_ATTR_VALUE_END,
"Not item property not handled!" );
1785 aSet.Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1797 if(pMap && pMap->
nWID)
1811 const sal_Int32
nCount = aPropertyNames.getLength();
1812 const OUString* pNames = aPropertyNames.getConstArray();
1824 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pNames++, pValues++ )
1830 catch( beans::UnknownPropertyException& ) {}
1831 catch( uno::Exception& ) {}
1836 uno::Reference< beans::XPropertySet > xSet;
1839 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pNames++, pValues++ )
1843 xSet->setPropertyValue( *pNames, *pValues );
1845 catch( beans::UnknownPropertyException& ) {}
1846 catch( uno::Exception& ) {}
1858 mpImpl->mpItemSet.reset();
1864 const sal_Int32
nCount = aPropertyNames.getLength();
1865 const OUString* pNames = aPropertyNames.getConstArray();
1867 uno::Sequence< uno::Any > aRet( nCount );
1868 uno::Any* pValue = aRet.getArray();
1872 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++, pNames++ )
1878 catch( uno::Exception& )
1880 OSL_FAIL(
"SvxShape::getPropertyValues, unknown property asked" );
1886 uno::Reference< beans::XPropertySet > xSet;
1889 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++, pNames++ )
1893 *pValue = xSet->getPropertyValue( *pNames );
1895 catch( uno::Exception& )
1897 OSL_FAIL(
"SvxShape::getPropertyValues, unknown property asked" );
1931 aAny <<= nAngle.
get();
1942 aAny <<= nAngle.
get();
1951 drawing::CircleKind eKind;
1955 eKind = drawing::CircleKind_FULL;
1958 eKind = drawing::CircleKind_CUT;
1961 eKind = drawing::CircleKind_ARC;
1964 eKind = drawing::CircleKind_SECTION;
1978 if( pMap->
aType != aAny.getValueType() )
1985 aAny <<= static_cast<sal_Int16>(
nValue);
1989 OSL_FAIL(
"SvxShape::GetAnyForItem() Returnvalue has wrong Type!" );
2005 return mpImpl->mpMaster->getPropertyState( PropertyName );
2020 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
2022 beans::PropertyState eState;
2029 case SfxItemState::READONLY:
2030 case SfxItemState::SET:
2031 eState = beans::PropertyState_DIRECT_VALUE;
2033 case SfxItemState::DEFAULT:
2034 eState = beans::PropertyState_DEFAULT_VALUE;
2037 eState = beans::PropertyState_AMBIGUOUS_VALUE;
2042 if( beans::PropertyState_DIRECT_VALUE == eState )
2044 switch( pMap->
nWID )
2055 if( ( pItem ==
nullptr ) || pItem->
GetName().isEmpty() )
2056 eState = beans::PropertyState_DEFAULT_VALUE;
2070 if ( pItem ==
nullptr )
2071 eState = beans::PropertyState_DEFAULT_VALUE;
2082 switch( pProperty->
nWID )
2087 if( rValue >>= aPnt )
2089 Point aVclPoint( aPnt.X, aPnt.Y );
2117 drawing::HomogenMatrix3 aMatrix;
2118 if(rValue >>= aMatrix)
2126 aNewHomogenMatrix.
set(0, 0, aMatrix.Line1.Column1);
2127 aNewHomogenMatrix.
set(0, 1, aMatrix.Line1.Column2);
2128 aNewHomogenMatrix.
set(0, 2, aMatrix.Line1.Column3);
2129 aNewHomogenMatrix.
set(1, 0, aMatrix.Line2.Column1);
2130 aNewHomogenMatrix.
set(1, 1, aMatrix.Line2.Column2);
2131 aNewHomogenMatrix.
set(1, 2, aMatrix.Line2.Column3);
2132 aNewHomogenMatrix.
set(2, 0, aMatrix.Line3.Column1);
2133 aNewHomogenMatrix.
set(2, 1, aMatrix.Line3.Column2);
2134 aNewHomogenMatrix.
set(2, 2, aMatrix.Line3.Column3);
2148 sal_Int32 nNewOrdNum = 0;
2149 if(rValue >>= nNewOrdNum)
2164 awt::Rectangle aUnoRect;
2165 if(rValue >>= aUnoRect)
2167 Point aTopLeft( aUnoRect.X, aUnoRect.Y );
2168 Size aObjSize( aUnoRect.Width, aUnoRect.Height );
2182 if(rValue >>= bMirror )
2202 switch(pProperty->
nWID)
2207 Reference< drawing::XShape > xShape;
2208 if( rValue >>= xShape )
2224 awt::Point aUnoPoint;
2225 if( rValue >>= aUnoPoint )
2227 Point aPoint( aUnoPoint.X, aUnoPoint.Y );
2233 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2246 if( rValue >>= nId )
2258 if(
auto s = o3tl::tryAccess<drawing::PointSequenceSequence>(rValue) )
2264 else if(
auto cs = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(rValue) )
2271 if(aNewPolyPolygon.
count())
2275 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2292 awt::Point aUnoPoint;
2293 if(pMeasureObj && ( rValue >>= aUnoPoint ) )
2295 Point aPoint( aUnoPoint.X, aUnoPoint.Y );
2299 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2311 drawing::BitmapMode
eMode;
2312 if(!(rValue >>= eMode) )
2314 sal_Int32 nMode = 0;
2315 if(!(rValue >>= nMode))
2318 eMode =
static_cast<drawing::BitmapMode
>(nMode);
2327 sal_Int16 nLayerId = sal_Int16();
2328 if( rValue >>= nLayerId )
2342 OUString aLayerName;
2343 if( rValue >>= aLayerName )
2346 if( pLayer !=
nullptr )
2357 if( rValue >>= nTmp )
2377 if( rValue >>= nTmp )
2402 if( rValue >>= bMoveProtect )
2412 if( rValue >>= aName )
2422 sal_Int16 nMaxScale = 0;
2423 if (rValue >>= nMaxScale)
2437 if( rValue >>= aTitle )
2446 OUString aDescription;
2447 if( rValue >>= aDescription )
2458 if( rValue >>= bPrintable )
2468 if( rValue >>= bVisible )
2477 bool bResizeProtect;
2478 if( rValue >>= bResizeProtect )
2487 sal_Int32 nPageNum = 0;
2488 if( (rValue >>= nPageNum) && ( nPageNum >= 0 ) && ( nPageNum <= 0xffff ) )
2495 const sal_uInt16 nDestinationPageNum(static_cast<sal_uInt16>((nPageNum << 1) - 1));
2497 if(nDestinationPageNum < rModel.GetPageCount())
2499 pNewPage = rModel.GetPage(nDestinationPageNum);
2520 if( rValue >>= aApiName )
2538 OUString sExceptionMessage (
"IllegalArgumentException in SvxShape::setPropertyValueImpl."
2539 " Property Type: " + pProperty->
aType.getTypeName() +
" Property nWID: " + OUString::number(pProperty->
nWID)
2540 +
" Value Type: " + (rValue.hasValue() ? rValue.getValueTypeName() :
"void (no value)"));
2542 throw lang::IllegalArgumentException(sExceptionMessage,
nullptr, 1);
2548 switch( pProperty->
nWID )
2572 awt::Point aPnt( aVclPoint.X(), aVclPoint.Y() );
2582 drawing::HomogenMatrix3 aMatrix;
2588 aMatrix.Line1.Column1 = aNewHomogenMatrix.
get(0, 0);
2589 aMatrix.Line1.Column2 = aNewHomogenMatrix.
get(0, 1);
2590 aMatrix.Line1.Column3 = aNewHomogenMatrix.
get(0, 2);
2591 aMatrix.Line2.Column1 = aNewHomogenMatrix.
get(1, 0);
2592 aMatrix.Line2.Column2 = aNewHomogenMatrix.
get(1, 1);
2593 aMatrix.Line2.Column3 = aNewHomogenMatrix.
get(1, 2);
2594 aMatrix.Line3.Column1 = aNewHomogenMatrix.
get(2, 0);
2595 aMatrix.Line3.Column2 = aNewHomogenMatrix.
get(2, 1);
2596 aMatrix.Line3.Column3 = aNewHomogenMatrix.
get(2, 2);
2612 if(!rValue.hasValue())
2613 throw uno::RuntimeException();
2620 bool bIsFontwork =
false;
2623 rValue <<= bIsFontwork;
2634 css::awt::Rectangle aUnoRect(
2635 aTopLeft.X(), aTopLeft.Y(),
2636 aObjSize.getWidth(), aObjSize.getHeight() );
2637 rValue <<= aUnoRect;
2648 css::awt::Rectangle aUnoRect(
2649 aTopLeft.X(), aTopLeft.Y(),
2650 aObjSize.getWidth(), aObjSize.getHeight() );
2651 rValue <<= aUnoRect;
2667 sId = RID_UNODRAW_OLE2;
2671 sId = RID_UNODRAW_GRAPHICS;
2675 sId = RID_UNODRAW_OBJECTS;
2687 bool bMirror =
false;
2706 switch(pProperty->
nWID)
2730 awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
2732 rValue <<= aUnoPoint;
2751 drawing::PolyPolygonBezierCoords aRetval;
2773 awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
2775 rValue <<= aUnoPoint;
2787 rValue <<= drawing::BitmapMode_REPEAT;
2791 rValue <<= drawing::BitmapMode_STRETCH;
2795 rValue <<= drawing::BitmapMode_NO_REPEAT;
2848 OUString aDescription(
GetSdrObject()->GetDescription() );
2849 rValue <<= aDescription;
2871 sal_Int32 nPageNumber = pPage ? pPage->
GetPageNum() : 0;
2874 rValue <<= nPageNumber;
2904 bool bIsWMF =
false;
2908 if ( aLnk.
GetType() == GfxLinkType::NativeWmf )
2911 uno::Sequence<sal_Int8>
aSeq(reinterpret_cast<sal_Int8 const *>(aLnk.
GetData()), static_cast<sal_Int32>(aLnk.
GetDataSize()));
2921 const uno::Sequence<sal_Int8>
aSeq(
2922 static_cast< const sal_Int8* >(aDestStrm.GetData()),
2923 aDestStrm.GetEndOfData());
2952 rState = beans::PropertyState_DIRECT_VALUE;
2956 rState = beans::PropertyState_AMBIGUOUS_VALUE;
2959 else if((( pProperty->
nWID >= OWN_ATTR_VALUE_START && pProperty->
nWID <= OWN_ATTR_VALUE_END ) ||
2962 rState = beans::PropertyState_DIRECT_VALUE;
2981 else if((pProperty->
nWID >= OWN_ATTR_VALUE_START && pProperty->
nWID <= OWN_ATTR_VALUE_END ) ||
2995 const sal_Int32
nCount = aPropertyName.getLength();
2996 uno::Sequence< beans::PropertyState > aRet( nCount );
2998 std::transform(aPropertyName.begin(), aPropertyName.end(), aRet.begin(),
2999 [
this](
const OUString& rName) -> beans::PropertyState {
return getPropertyState(rName); });
3009 mpImpl->mpMaster->setPropertyToDefault( PropertyName );
3024 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
3039 return mpImpl->mpMaster->getPropertyDefault( aPropertyName );
3054 throw beans::UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(
this));
3056 if(( pMap->
nWID >= OWN_ATTR_VALUE_START && pMap->
nWID <= OWN_ATTR_VALUE_END ) ||
3064 throw beans::UnknownPropertyException(
"No WhichID " + OUString::number(pMap->
nWID) +
" for " + aPropertyName, static_cast<cppu::OWeakObject*>(
this));
3067 aSet.Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
3078 throw lang::DisposedException();
3081 if(dynamic_cast<const SdrGrafObj*>(
GetSdrObject()) !=
nullptr)
3093 if( dynamic_cast<const E3dLatheObj* >(
GetSdrObject()) !=
nullptr|| dynamic_cast<const E3dExtrudeObj* >(
GetSdrObject()) !=
nullptr)
3102 const uno::Sequence<OUString>& aPropertyNames )
3104 for (
const auto& rPropertyName : aPropertyNames )
3109 const uno::Sequence<OUString>& aPropertyNames )
3111 ::std::vector<uno::Any> ret;
3112 ret.reserve(aPropertyNames.getLength());
3113 std::transform(aPropertyNames.begin(), aPropertyNames.end(), std::back_inserter(ret),
3115 return uno::Sequence<uno::Any>( ret.data(), ret.size() );
3175 return mpImpl->mpMaster->getSupportedServiceNames();
3195 static const uno::Sequence<OUString> aSvxShape_GroupServices
3197 sUNO_service_drawing_Shape };
3198 return aSvxShape_GroupServices;
3202 static const uno::Sequence<OUString> aSvxShape_CustomShapeServices
3217 sUNO_service_drawing_RotationDescriptor };
3218 return aSvxShape_CustomShapeServices;
3222 static const uno::Sequence<OUString> aSvxShape_LineServices
3239 sUNO_service_drawing_RotationDescriptor };
3240 return aSvxShape_LineServices;
3245 static const uno::Sequence<OUString> aSvxShape_RectServices
3261 sUNO_service_drawing_RotationDescriptor };
3262 return aSvxShape_RectServices;
3270 static const uno::Sequence<OUString> aSvxShape_CircServices
3287 sUNO_service_drawing_RotationDescriptor };
3288 return aSvxShape_CircServices;
3294 static const uno::Sequence<OUString> aSvxShape_PathServices
3312 sUNO_service_drawing_RotationDescriptor };
3313 return aSvxShape_PathServices;
3319 static const uno::Sequence<OUString> aSvxShape_PolyServices
3338 sUNO_service_drawing_RotationDescriptor };
3339 return aSvxShape_PolyServices;
3345 static const uno::Sequence<OUString> aSvxShape_FreeLineServices
3364 sUNO_service_drawing_RotationDescriptor };
3365 return aSvxShape_FreeLineServices;
3371 static const uno::Sequence<OUString> aSvxShape_FreeFillServices
3390 sUNO_service_drawing_RotationDescriptor };
3391 return aSvxShape_FreeFillServices;
3398 static const uno::Sequence<OUString> aSvxShape_TextServices
3415 sUNO_service_drawing_RotationDescriptor };
3416 return aSvxShape_TextServices;
3421 static const uno::Sequence<OUString> aSvxShape_GrafServices
3436 sUNO_service_drawing_RotationDescriptor};
3437 return aSvxShape_GrafServices;
3442 static const uno::Sequence<OUString> aSvxShape_Ole2Services
3457 sUNO_service_drawing_RotationDescriptor };
3458 return aSvxShape_Ole2Services;
3463 static const uno::Sequence<OUString> aSvxShape_CaptionServices
3480 sUNO_service_drawing_RotationDescriptor };
3481 return aSvxShape_CaptionServices;
3486 static const uno::Sequence<OUString> aSvxShape_PageServices
3488 sUNO_service_drawing_Shape };
3489 return aSvxShape_PageServices;
3494 static const uno::Sequence<OUString> aSvxShape_MeasureServices
3513 sUNO_service_drawing_RotationDescriptor };
3514 return aSvxShape_MeasureServices;
3519 static const uno::Sequence<OUString> aSvxShape_FrameServices
3521 sUNO_service_drawing_Shape };
3522 return aSvxShape_FrameServices;
3527 static const uno::Sequence<OUString> aSvxShape_UnoServices
3529 sUNO_service_drawing_Shape };
3530 return aSvxShape_UnoServices;
3535 static const uno::Sequence<OUString> aSvxShape_EdgeServices
3553 sUNO_service_drawing_RotationDescriptor };
3554 return aSvxShape_EdgeServices;
3558 static const uno::Sequence<OUString> aSvxShape_MediaServices
3560 sUNO_service_drawing_Shape };
3561 return aSvxShape_MediaServices;
3567 #if OSL_DEBUG_LEVEL > 0
3569 OSL_ENSURE( nIdent ==
OBJ_UNO,
"SvxShape::_getSupportedServiceNames: SdrInventor::FmForm, but no UNO object?" );
3571 static const uno::Sequence<OUString> aSvxShape_UnoServices
3573 sUNO_service_drawing_Shape };
3574 return aSvxShape_UnoServices;
3576 OSL_FAIL(
"SvxShape::_getSupportedServiceNames: could not determine object type!" );
3577 uno::Sequence< OUString >
aSeq;
3590 uno::Reference< container::XIndexContainer > xGluePoints(
mxGluePoints );
3607 if(
nullptr != pSdrObject)
3611 if(
nullptr != pParentSdrObjList)
3621 if(
nullptr != pParentSdrObject)
3630 if(
nullptr != pParentSdrPage)
3641 OSL_FAIL(
"SvxShape::getParent( ): unexpected Parent SdrObjList" );
3646 return uno::Reference<uno::XInterface>();
3651 throw lang::NoSupportException();
3721 sal_Int16 nOldLocks =
static_cast<sal_Int16
>(
mnLockCount);
3735 switch(
mpImpl->mnObjId )
3749 if( nId !=
mpImpl->mnObjId )
3779 "svx::SvxShapeText::~SvxShapeText(), text shape with living text ranges destroyed!");
3811 return "SvxShapeText";
3835 const sal_Int64 nReturn = SvxShape::getSomething( rId );
3839 return SvxUnoTextBase::getSomething( rId );
3845 return css::uno::Sequence<sal_Int8>();
3854 pEditSource->
lock();
3918 css::text::WritingMode
eMode;
3919 if( rValue >>= eMode )
3935 rValue <<= css::text::WritingMode_TB_RL;
3937 rValue <<= css::text::WritingMode_LR_TB;
3983 uno::Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY );
3990 SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape );
3997 SvxShape* pSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>( xInt );
3998 return pSvxShape ? pSvxShape->
GetSdrObject() :
nullptr;
4003 if(!pMap || !pMap->
nWID)
4013 if(!pMap || !pMap->
nWID)
void TakeNotPersistAttr(SfxItemSet &rAttr) const
void setPropertyValue(const SfxItemPropertySimpleEntry *pMap, const css::uno::Any &rVal) const
virtual void Shear(const Point &rRef, Degree100 nAngle, double tn, bool bVShear)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
constexpr OUStringLiteral sUNO_service_drawing_PolyLineShape
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
constexpr OUStringLiteral sUNO_service_drawing_CaptionShape
virtual bool setPropertyToDefaultImpl(const SfxItemPropertySimpleEntry *pProperty)
const css::uno::WeakReference< css::uno::XInterface > & getWeakUnoShape() const
virtual void unlock()
called from the XActionLockable interface methods on final unlock
#define OWN_ATTR_EDGE_START_OBJ
constexpr OUStringLiteral sUNO_service_drawing_OLE2Shape
default implementation of an IPropertyValueProvider
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getGluePoints() override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
uno::Reference< drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj)
returns a StarOffice API wrapper for the given SdrObject
void SetMaxScale(sal_Int16 nMaxScale)
#define OWN_ATTR_BOUNDRECT
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr OUStringLiteral sUNO_service_drawing_LineProperties
css::uno::Any _getPropertyDefault(const OUString &aPropertyName)
SdrHintKind GetKind() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual bool getPropertyStateImpl(const SfxItemPropertySimpleEntry *pProperty, css::beans::PropertyState &rState) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
SvxShapeRect(SdrObject *pObj)
constexpr OUStringLiteral sUNO_service_drawing_LineShape
Polygon/PolyPolygon represented by SdrPathObj.
virtual void Resize(const Point &rRef, const Fraction &xFact, const Fraction &yFact, bool bUnsetRelative=true)
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
void updateShapeKind()
since polygon shapes can change their kind during editing, we have to recheck it here.
#define OWN_ATTR_METAFILE
void SetResizeProtect(bool bProt)
#define OWN_ATTR_CAPTION_POINT
void SetupOutlinerFormatting(SdrOutliner &rOutl, tools::Rectangle &rPaintRect) const
Setup given Outliner equivalently to SdrTextObj::Paint()
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
css::awt::Point maPosition
::cppu::OWeakObject & getContext() const
#define OWN_ATTR_GLUEID_TAIL
const MapMode & GetPrefMapMode() const
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void SetName(const OUString &rStr, const bool bSetChanged=true)
#define OWN_ATTR_MIRRORED
abstract object (SdrObject)
constexpr OUStringLiteral sUNO_service_drawing_MeasureProperties
rectangle (round corners optional)
void _setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue)
virtual void lock()
called from the XActionLockable interface methods on initial locking
constexpr OUStringLiteral sUNO_service_style_ParagraphProperties
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
void SetMirrored(bool _bMirrored)
constexpr TypedWhichId< SdrObjPrintableItem > SDRATTR_OBJPRINTABLE(SDRATTR_NOTPERSIST_FIRST+2)
void SetPrefMapMode(const MapMode &rPrefMapMode)
#define OWN_ATTR_EDGE_START_POS
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
#define OWN_ATTR_FRAMERECT
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
bool ConvertGDIMetaFileToWMF(const GDIMetaFile &rMTF, SvStream &rTargetStream, FilterConfigItem const *pConfigItem, bool bPlaceable)
#define OWN_ATTR_TRANSFORMATION
static bool svx_needLogicRectHack(SdrObject const *pObj)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual void SAL_CALL setActionLocks(sal_Int16 nLock) override
virtual OUString SAL_CALL getName() override
void setUnoShape(const css::uno::Reference< css::uno::XInterface > &_rxUnoShape)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertySimpleEntry *pProperty, const css::uno::Any &rValue) override
#define OWN_ATTR_MISC_OBJ_DESCRIPTION
XDashListRef GetDashList() const
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
std::unique_ptr< SvxShapeImpl > mpImpl
these members are used to optimize XMultiProperty calls
virtual OUString TakeObjNameSingul() const
constexpr TypedWhichId< SdrYesNoItem > SDRATTR_OBJMOVEPROTECT(SDRATTR_NOTPERSIST_FIRST+0)
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
B2DPolyPolygon UnoPointSequenceSequenceToB2DPolyPolygon(const css::drawing::PointSequenceSequence &rPointSequenceSequenceSource)
virtual void SAL_CALL setString(const OUString &aString) override
bool AreThereOwnUsrAnys() const
constexpr OUStringLiteral sUNO_service_drawing_CustomShapeProperties
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
static void Free(SdrObject *&_rpObject)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
SVX_DLLPRIVATE void impl_construct()
CTOR-Impl.
virtual SdrObjKind GetObjIdentifier() const
constexpr OUStringLiteral sUNO_service_style_CharacterProperties
virtual ~SvxShape() override
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertySimpleEntry *pProperty, css::uno::Any &rValue)
#define OWN_ATTR_FILLBMP_MODE
virtual css::awt::Size SAL_CALL getSize() override
const sal_uInt8 * GetData() const
#define OWN_ATTR_UINAME_SINGULAR
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
SvxShapeImpl(SvxShape &_rAntiImpl,::osl::Mutex &_rMutex)
css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints
void ConnectToNode(bool bTail1, SdrObject *pObj) override
void SetGrabBagItem(const css::uno::Any &rVal)
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
constexpr TypedWhichId< SdrCircKindItem > SDRATTR_CIRCKIND(SDRATTR_CIRC_FIRST+0)
#define OWN_ATTR_UINAME_PLURAL
virtual const tools::Rectangle & GetSnapRect() const
virtual css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
#define OWN_ATTR_ISFONTWORK
std::size_t GetEndOfData() const
virtual bool getPropertyStateImpl(const SfxItemPropertySimpleEntry *pProperty, css::beans::PropertyState &rState)
sal_uInt32 getShapeKind() const
constexpr OUStringLiteral sUNO_service_drawing_TextProperties
basegfx::B2DPolyPolygon GetEdgeTrackPath() const
void ClearMergedItem(const sal_uInt16 nWhich=0)
constexpr TypedWhichId< SdrAngleItem > SDRATTR_CIRCENDANGLE(SDRATTR_CIRC_FIRST+2)
void ForceMetricToItemPoolMetric(Pair &rPoint) const
const XGradient & GetGradient() const
const B2DVector & getTranslate() const
UNOTOOLS_DLLPUBLIC bool GetTitle(OUString const &url, OUString *title)
virtual css::uno::Reference< css::uno::XInterface > getUnoShape()
SdrPage * getSdrPageFromSdrObject() const
constexpr sal_uInt16 SDRATTR_NOTPERSIST_LAST(SDRATTR_OBJVISIBLE)
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage)
#define OWN_ATTR_INTEROPGRABBAG
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
static tools::Rectangle svx_getLogicRectHack(SdrObject const *pObj)
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
#define OWN_ATTR_MISC_OBJ_TITLE
constexpr OUStringLiteral sUNO_service_drawing_RectangleShape
B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY)
constexpr OUStringLiteral sUNO_service_drawing_PolyPolygonBezierDescriptor
#define SVXMAP_SHAPE
Sorter.
const Size & GetPrefSize() const
OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString &rApiName)
if the given name is a predefined api name it is replaced by the predefined name for the current lang...
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setName(const OUString &aName) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType)
#define OWN_ATTR_EDGE_END_POS
virtual OUString SAL_CALL getImplementationName() override
const GDIMetaFile & GetGDIMetaFile() const
css::uno::Any getPropertyValue(const SfxItemPropertySimpleEntry *pMap) const
XLineEndListRef GetLineEndList() const
virtual sal_Int16 SAL_CALL resetActionLocks() override
void setGluePointIndex(bool bTail, sal_Int32 nId=-1)
this method is used by the api to set a glue point for a connection nId == -1 : The best default poin...
const XDash & GetDash() const
constexpr TypedWhichId< SdrAngleItem > SDRATTR_ROTATEANGLE(SDRATTR_NOTPERSIST_FIRST+16)
std::unique_ptr< SdrOutliner > createOutliner(OutlinerMode nOutlinerMode)
void SetMoveProtect(bool bProt)
constexpr OUStringLiteral sUNO_service_drawing_PageShape
constexpr OUStringLiteral sUNO_service_drawing_FrameShape
virtual void SetChanged(bool bFlg=true)
o3tl::strong_int< sal_uInt8, struct SdrLayerIDTag > SdrLayerID
virtual void SAL_CALL dispose() override
B2IRange fround(const B2DRange &rRange)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
const GraphicObject & GetGraphicObject() const
SdrLayer * GetLayer(sal_uInt16 i)
bool HasSdrObject() const
SdrObject * GetConnectedNode(bool bTail1) const override
virtual ~SvxShapeRect() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
uno::Reference< uno::XInterface > SvxUnoGluePointAccess_createInstance(SdrObject *pObject)
Create a SvxUnoGluePointAccess.
css::uno::Sequence< css::uno::Type > const & _getTypes()
constexpr OUStringLiteral sUNO_service_drawing_MediaShape
static css::uno::Reference< css::awt::XBitmap > CreateBitmap(const BitmapEx &rBitmap)
bool mbHasSdrObjectOwnership
Polyline represented by SdrPathObj.
virtual OUString SAL_CALL getImplementationName() override
virtual void getCurrentValue(css::uno::Any &_out_rValue) const override
returns the current value of the property which the provider is responsible for
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
constexpr OUStringLiteral sUNO_service_drawing_OpenBezierShape
virtual void SAL_CALL addActionLock() override
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertySimpleEntry *pProperty, css::uno::Any &rValue) override
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
virtual void SetLayer(SdrLayerID nLayer)
constexpr TypedWhichId< SdrTextFitToSizeTypeItem > SDRATTR_TEXT_FITTOSIZE(SDRATTR_MISC_FIRST+3)
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
UNDERLYING_TYPE get() const
constexpr OUStringLiteral sUNO_service_drawing_PolyPolygonShape
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
constexpr OUStringLiteral sUNO_service_drawing_Shape
constexpr OUStringLiteral sUNO_service_drawing_ShadowProperties
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral sUNO_service_style_CharacterPropertiesAsian
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setPosition(const css::awt::Point &aPosition) override
#define OWN_ATTR_TEXTFITTOSIZESCALE
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
Point GetTailPoint(bool bTail) const
void SingleObjectPainter(OutputDevice &rOut) const
void TakeSdrObjectOwnership()
takes the ownership of the SdrObject.
css::uno::Any GetAnyForItem(SfxItemSet const &aSet, const SfxItemPropertySimpleEntry *pMap) const
const Graphic & GetGraphic() const
constexpr OUStringLiteral sUNO_service_drawing_GroupShape
constexpr TypedWhichId< SdrLayerNameItem > SDRATTR_LAYERNAME(SDRATTR_NOTPERSIST_FIRST+4)
virtual void TRSetBaseGeometry(const basegfx::B2DHomMatrix &rMatrix, const basegfx::B2DPolyPolygon &rPolyPolygon)
B2DPolyPolygon UnoPolyPolygonBezierCoordsToB2DPolyPolygon(const css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsSource)
void ForceMetricTo100th_mm(Pair &rPoint) const
void BroadcastObjectChange() const
constexpr sal_uInt16 SDRATTR_NOTPERSIST_FIRST(SDRATTR_CIRC_LAST+1)
static OUString getNameFromId(sal_uInt32 nId)
virtual void SAL_CALL setSize(const css::awt::Size &aSize) override
virtual Degree100 GetShearAngle(bool bVertical=false) const
virtual Point GetPoint(sal_uInt32 i) const override
OutlineText, special text object for StarDraw.
#define OWN_ATTR_GLUEID_HEAD
constexpr TypedWhichId< SdrObjVisibleItem > SDRATTR_OBJVISIBLE(SDRATTR_NOTPERSIST_FIRST+35)
tools::Long Width() const
const OUString & GetName() const
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
XGradientListRef GetGradientList() const
void scale(double fX, double fY)
SdrModel & getSdrModelFromSdrObject() const
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void transform(const basegfx::B2DHomMatrix &rMatrix)
virtual void SAL_CALL setString(const OUString &aString) override
sal_uInt32 GetOrdNum() const
The order number (aka ZOrder, aka z-index) determines whether a SdrObject is located above or below a...
SdrLayer * GetLayerPerID(SdrLayerID nID)
constexpr OUStringLiteral sUNO_service_drawing_ConnectorShape
bool mbIsMultiPropertyCall
void SetVisible(bool bVisible)
virtual void SetLogicRect(const tools::Rectangle &rRect)
virtual void Move(const Size &rSiz)
css::uno::Type const & get()
void SetMergedItem(const SfxPoolItem &rItem)
std::unique_ptr< SfxItemSet > mpItemSet
constexpr OUStringLiteral sUNO_service_drawing_Text
void SetTailPoint(bool bTail, const Point &rPt)
bool IsResizeProtect() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
virtual void SAL_CALL setAllPropertiesToDefault() override
void SetUserCall(SdrObjUserCall *pUser)
constexpr TypedWhichId< SdrShearAngleItem > SDRATTR_SHEARANGLE(SDRATTR_NOTPERSIST_FIRST+17)
void _setPropertyToDefault(const OUString &PropertyName)
const B2DVector & getScale() const
This class represents an embedded or linked bitmap graphic object.
constexpr TypedWhichId< SdrLayerIdItem > SDRATTR_LAYERID(SDRATTR_NOTPERSIST_FIRST+3)
GfxLink GetGfxLink() const
#define OWN_ATTR_PAGE_NUMBER
constexpr OUStringLiteral sUNO_service_drawing_PolyPolygonDescriptor
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
void ObtainSettingsFromPropertySet(const SvxItemPropertySet &rPropSet)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
SfxItemPool * GetPool() const
virtual SdrObject * RemoveObject(size_t nObjNum)
constexpr OUStringLiteral sUNO_service_drawing_TextShape
virtual SdrInventor GetObjInventor() const
constexpr TypedWhichId< SdrYesNoItem > SDRATTR_OBJSIZEPROTECT(SDRATTR_NOTPERSIST_FIRST+1)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Any GetBitmap(bool bMetaFile=false) const
void endSetPropertyValues()
std::vector< SfxItemPropertyNamedEntry > PropertyEntryVector_t
virtual ~SvxShapeText() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
constexpr OUStringLiteral sUNO_service_drawing_MeasureShape
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
natural cubic Spline (ni)
constexpr OUStringLiteral sUNO_service_drawing_GraphicObjectShape
const basegfx::B2DPolyPolygon & GetLineEnd() const
constexpr OUStringLiteral sUNO_service_drawing_ConnectorProperties
#define E3D_INVENTOR_FLAG
Globals.
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual void SAL_CALL removeActionLock() override
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
void SetReferencedPage(SdrPage *pNewPage)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
const XHatch & GetHatch() const
virtual bool IsVerticalWriting() const
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
const SvxItemPropertySet * mpPropSet
PropertyEntryVector_t getPropertyEntries() const
void setMaster(SvxShapeMaster *pMaster)
XHatchListRef GetHatchList() const
virtual css::awt::Point SAL_CALL getPosition() override
#define OWN_ATTR_EDGE_END_OBJ
constexpr OUStringLiteral sUNO_service_drawing_FillProperties
svx::PropertyChangeNotifier maPropertyNotifier
oslInterlockedCount m_refCount
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool isSuppressGetBitmap() const
void GetGrabBagItem(css::uno::Any &rVal) const
SVX_DLLPRIVATE void impl_initFromSdrObject()
initializes SdrObj-dependent members.
SdrPage * GetReferencedPage() const
#define SAL_WARN_IF(condition, area, stream)
virtual OUString SAL_CALL getString() override
css::uno::Any _getPropertyValue(const OUString &PropertyName)
static void svx_setLogicRectHack(SdrObject *pObj, const tools::Rectangle &rRect)
constexpr OUStringLiteral sUNO_service_drawing_RotationDescriptor
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
::tools::WeakReference< SdrObject > mpSdrObjectWeakReference
void SvxItemPropertySet_setPropertyValue(const SfxItemPropertySimpleEntry *pMap, const uno::Any &rVal, SfxItemSet &rSet)
object that represents a SdrPage
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
constexpr OUStringLiteral sUNO_service_style_ParagraphPropertiesAsian
GfxLinkType GetType() const
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
const SfxItemSet & GetMergedItemSet() const
virtual bool setPropertyToDefaultImpl(const SfxItemPropertySimpleEntry *pProperty) override
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
#define TWIPS_TO_MM(val)
Macros to convert Twips<->100tel mm.
SdrObject * GetSdrObject() const
void SetDescription(const OUString &rStr)
tools::Long Height() const
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual SdrPage * getSdrPageFromSdrObjList() const
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
::tools::WeakReference< SdrObject > mpCreatedObj
CL, OD 2005-07-19 #i52126# - this is initially 0 and set when a SvxShape::Create() call is executed...
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
Sequence< sal_Int8 > aSeq
static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet &rPropSet, SfxItemSet &rSet, const uno::Reference< beans::XPropertySet > &xSet, const SfxItemPropertyMap *pMap)
void SetPrefSize(const Size &rPrefSize)
const Point & GetAnchorPos() const
virtual OUString TakeObjNamePlural() const
constexpr OUStringLiteral sUNO_service_drawing_ClosedBezierShape
virtual void Rotate(const Point &rRef, Degree100 nAngle, double sn, double cs)
Universal Network Object packed into SvDraw object.
#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER
XBitmapListRef GetBitmapList() const
css::uno::Sequence< OUString > _getSupportedServiceNames()
virtual void SetSnapRect(const tools::Rectangle &rRect)
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
constexpr OUStringLiteral sUNO_service_drawing_CustomShape
void SetEdgeTrackPath(const basegfx::B2DPolyPolygon &rPoly)
sal_uInt32 GetDataSize() const
OUString const & GetName() const
const SfxItemPropertySimpleEntry * getPropertyMapEntry(std::u16string_view rName) const
sal_Int32 getGluePointIndex(bool bTail)
this method is used by the api to return a glue point id for a connection.
void B2DPolyPolygonToUnoPolyPolygonBezierCoords(const B2DPolyPolygon &rPolyPolygon, css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsRetval)
BitmapEx convertPrimitive2DSequenceToBitmapEx(const std::deque< css::uno::Reference< css::graphic::XPrimitive2D > > &rSequence, const basegfx::B2DRange &rTargetRange, const sal_uInt32 nMaximumQuadraticPixels)
virtual void NbcSetPoint(const Point &rPnt, sal_uInt32 i) override
#define OWN_ATTR_LDBITMAP
basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &aViewInformation) const
virtual Degree100 GetRotateAngle() const
virtual SdrObject * SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum)
Modify ZOrder of an SdrObject.
#define DBG_TESTSOLARMUTEX()
virtual const tools::Rectangle & GetLogicRect() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
SvxShape(SdrObject *pObj)
this abstract class is the interface for an instance that likes to enhance the functionality of compo...
const SfxItemPropertyMap & getPropertyMap() const
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
virtual OUString SAL_CALL getShapeType() override
continuously activated OLE (PlugIn-Frame or similar)
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertySimpleEntry *pProperty, const css::uno::Any &rValue)
bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName)
const SvxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
SdrObjList * getParentSdrObjListFromSdrObject() const
void InvalidateSdrObject()
css::beans::PropertyState _getPropertyState(const OUString &PropertyName)
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix &rMatrix, basegfx::B2DPolyPolygon &rPolyPolygon) const
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
uno::Any SvxItemPropertySet_getPropertyValue(const SfxItemPropertySimpleEntry *pMap, const SfxItemSet &rSet)
SdrObject * GetSdrObjectFromXShape(const uno::Reference< drawing::XShape > &xShape)
returns the SdrObject from the given StarOffice API wrapper
const SdrLayerAdmin & GetLayerAdmin() const
helper class for notifying XPropertyChangeListeners
virtual void SetChanged()
SvxUnoPropertyMapProvider & getSvxMapProvider()
::comphelper::OInterfaceContainerHelper2 maDisposeListeners
#define OWN_ATTR_MEASURE_START_POS
TitleText, special text object for StarDraw.
sal_uInt16 mnLockCount
used from the XActionLockable interface
constexpr OUStringLiteral sUNO_service_drawing_EllipseShape
constexpr TypedWhichId< SdrMetricItem > SDRATTR_ECKENRADIUS(SDRATTR_MISC_FIRST+0)
sal_uInt16 GetPageNum() const
css::uno::Any * GetUsrAnyForID(SfxItemPropertySimpleEntry const &entry) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void SetPrintable(bool bPrn)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
periodic cubic Spline (ni)
void setShapeKind(sal_uInt32 nKind)
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
constexpr TypedWhichId< SvXMLAttrContainerItem > SDRATTR_XMLATTRIBUTES(SDRATTR_MISC_FIRST+22)
bool HasSdrObjectOwnership() const
foreign graphic (StarView Graphic)
SdrObjUserCall * GetUserCall() const
virtual SdrObject * getSdrObjectFromSdrObjList() const
void SetTitle(const OUString &rStr)
#define OWN_ATTR_MEASURE_END_POS
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void lock() override
called from the XActionLockable interface methods on initial locking
virtual void SetVerticalWriting(bool bVertical)
virtual OUString SAL_CALL getString() override
void ApplyNotPersistAttr(const SfxItemSet &rAttr)
svx::PropertyChangeNotifier & getShapePropertyChangeNotifier()
virtual void unlock() override
called from the XActionLockable interface methods on final unlock
constexpr TypedWhichId< SfxStringItem > SDRATTR_OBJECTNAME(SDRATTR_NOTPERSIST_FIRST+5)
SvxShapeText(SdrObject *pObj)
static bool IsWhich(sal_uInt16 nId)
constexpr TypedWhichId< SdrAngleItem > SDRATTR_CIRCSTARTANGLE(SDRATTR_CIRC_FIRST+1)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
bool IsMoveProtect() const
virtual bool IsFontwork() const
SvxShapeMaster * mpMaster
virtual sal_Bool SAL_CALL isActionLocked() override
const Graphic * GetGraphic() const
::basegfx::B2IVector maSize
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Utility class SdrEdgeObj.
constexpr OUStringLiteral sUNO_service_style_CharacterPropertiesComplex
css::uno::Reference< css::beans::XPropertySetInfo > const & _getPropertySetInfo()
same as SetFillAttribute but for property names instead of which ids, and the property found is retur...
constexpr OUStringLiteral sUNO_service_style_ParagraphPropertiesComplex
const SdrObject * GetObject() const
constexpr OUStringLiteral sUNO_service_drawing_ControlShape