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>
99 #include <bitmaps.hlst>
101 using namespace ::
osl;
102 using namespace ::
cppu;
133 ,mbHasSdrObjectOwnership(
false )
134 ,mbDisposing(
false )
135 ,maDisposeListeners( _rMutex )
136 ,maPropertyNotifier( _rAntiImpl, _rMutex )
146 explicit ShapePositionProvider(
SvxShape& _shape )
154 _out_rCurrentValue <<= static_cast< SvxShape& >(
getContext() ).getPosition();
162 explicit ShapeSizeProvider(
SvxShape& _shape )
170 _out_rCurrentValue <<= static_cast< SvxShape& >(
getContext() ).getSize();
175 sal_Int16 GetTextFitToSizeScale(
SdrObject* pObject)
185 != drawing::TextFitToSizeType_AUTOFIT)
197 , mbIsMultiPropertyCall(
false)
200 , mpSdrObjectWeakReference(pObject)
210 , mbIsMultiPropertyCall(
false)
211 , mpPropSet(pPropertySet)
212 , maPropMapEntries(pEntries)
213 , mpSdrObjectWeakReference(pObject)
227 mpImpl->mpMaster->dispose();
237 mpImpl->mbHasSdrObjectOwnership =
false;
248 mpImpl->mbHasSdrObjectOwnership =
true;
267 if ( !
mpImpl->mbHasSdrObjectOwnership )
270 OSL_ENSURE(
HasSdrObject(),
"SvxShape::HasSdrObjectOwnership: have the ownership of an object which I don't know!" );
289 mpImpl->mpMaster = pMaster;
298 if(
mpImpl->mpMaster->queryAggregation( rType, aAny ) )
305 const css::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() noexcept
308 return theSvxShapeUnoTunnelId.
getSeq();
311 sal_Int64 SAL_CALL SvxShape::getSomething(
const css::uno::Sequence< sal_Int8 >& rId )
319 return mpImpl->maPropertyNotifier;
326 std::make_unique<ShapePositionProvider>( *
this ) );
328 std::make_unique<ShapeSizeProvider>( *
this ) );
341 OSL_PRECOND(
HasSdrObject(),
"SvxShape::impl_initFromSdrObject: not to be called without SdrObject!" );
385 assert( pNewObj &&
"SvxShape::Create: invalid new object!" );
390 assert( ( !pCreatedObj || ( pCreatedObj == pNewObj ) ) &&
391 "SvxShape::Create: the same shape used for two different objects?! Strange ..." );
394 if ( pCreatedObj == pNewObj )
398 mpImpl->mpCreatedObj = pNewObj;
444 MapUnit eMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0));
445 if(eMapUnit == MapUnit::Map100thMM)
455 OSL_FAIL(
"AW: Missing unit translation to PoolMetric!");
465 GetSdrObject()->ForceMetricToItemPoolMetric(rPolyPolygon);
474 MapUnit eMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0));
475 if(eMapUnit == MapUnit::Map100thMM)
483 aDecomposedTransform.
getScale() * fConvert,
490 OSL_FAIL(
"Missing unit translation to PoolMetric!");
500 MapUnit eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
501 if(eMapUnit == MapUnit::Map100thMM)
511 OSL_FAIL(
"AW: Missing unit translation to 100th mm!");
521 MapUnit eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
522 if(eMapUnit == MapUnit::Map100thMM)
532 OSL_FAIL(
"Missing unit translation to 100th mm!");
542 MapUnit eMapUnit = GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetMetric(0);
543 if(eMapUnit == MapUnit::Map100thMM)
551 aDecomposedTransform.
getScale() * fConvert,
558 OSL_FAIL(
"Missing unit translation to 100th mm!");
572 const sal_uInt16 nWID = pSrcProp->nWID;
574 && (nWID < OWN_ATTR_VALUE_START || nWID > OWN_ATTR_VALUE_END)
591 if(pEntry->
nWID >= OWN_ATTR_VALUE_START && pEntry->
nWID <= OWN_ATTR_VALUE_END)
595 xSet->setPropertyValue( pSrcProp->aName, *pUsrAny);
649 if(
nullptr != pSdrGrafObj)
653 if(GraphicType::Bitmap == rGraphic.GetType())
655 Reference< awt::XBitmap > xBmp( rGraphic.GetXGraphic(), UNO_QUERY );
672 pVDev->SetMapMode(
MapMode(MapUnit::Map100thMM));
673 pVDev->EnableOutput(
false);
690 const uno::Sequence<sal_Int8>
aSeq(
691 static_cast< const sal_Int8* >(aDestStrm.
GetData()),
701 if(!xPrimitives.empty())
707 if(!aRange.isEmpty())
711 if(MapUnit::Map100thMM != aSourceMapUnit)
720 MapMode(MapUnit::Map100thMM)));
726 std::move(xPrimitives)));
733 aRange.transform(aMapTransform);
738 std::move(xPrimitives),
746 Reference< awt::XBitmap > xBmp( aGraph.
GetXGraphic(), UNO_QUERY );
759 return mpImpl->mpMaster->getTypes();
785 static uno::Sequence<uno::Type> aTypeSequence{
800 return aTypeSequence;
805 static uno::Sequence<uno::Type> aTypeSequence{
822 return aTypeSequence;
827 static uno::Sequence<uno::Type> aTypeSequence{
848 return aTypeSequence;
853 static uno::Sequence<uno::Type> aTypeSequence{
869 return aTypeSequence;
874 static uno::Sequence<uno::Type> aTypeSequence{
890 return aTypeSequence;
894 static uno::Sequence<uno::Type> aTypeSequence{
914 return aTypeSequence;
935 static uno::Sequence<uno::Type> aTypeSequence{
955 return aTypeSequence;
963 return css::uno::Sequence<sal_Int8>();
971 if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
980 if ( !pSdrObject || pSdrHint->
GetObject() != pSdrObject )
983 uno::Reference< uno::XInterface > xSelf( pSdrObject->
getWeakUnoShape() );
987 mpSdrObjectWeakReference.reset(
nullptr);
991 bool bClearMe =
false;
1012 if(!HasSdrObjectOwnership())
1014 if(
nullptr != pSdrObject)
1020 mpSdrObjectWeakReference.reset(
nullptr);
1024 if(
nullptr != pSdrObject && !pSdrObject->
IsInserted())
1030 if(!mpImpl->mbDisposing)
1113 return css::awt::Point( aPt.X(), aPt.Y() );
1130 if(dynamic_cast<const E3dCompoundObject* >(
GetSdrObject()) ==
nullptr)
1133 Point aLocalPos( Position.X, Position.Y );
1137 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
1161 return css::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() );
1175 Size aLocalSize( rSize.Width, rSize.Height );
1188 if ( !aLocalSize.
Width() )
1194 if ( !aLocalSize.
Height() )
1256 if(
mpImpl->mbDisposing )
1259 mpImpl->mbDisposing =
true;
1261 lang::EventObject aEvt;
1263 mpImpl->maDisposeListeners.disposeAndClear(aEvt);
1264 mpImpl->maPropertyNotifier.disposing();
1272 bool bFreeSdrObject =
false;
1279 for (
size_t nNum = 0; nNum < nCount; ++nNum )
1281 if ( pPage->
GetObj( nNum ) == pObject )
1286 bFreeSdrObject =
true;
1295 if ( bFreeSdrObject )
1299 mpImpl->mbHasSdrObjectOwnership =
false;
1307 mpImpl->maDisposeListeners.addInterface(xListener);
1313 mpImpl->maDisposeListeners.removeInterface(aListener);
1324 return mpImpl->mpMaster->getPropertySetInfo();
1341 ::osl::MutexGuard aGuard(
m_aMutex );
1342 mpImpl->maPropertyNotifier.addPropertyChangeListener( _propertyName, _listener );
1348 ::osl::MutexGuard aGuard(
m_aMutex );
1349 mpImpl->maPropertyNotifier.removePropertyChangeListener( _propertyName, _listener );
1355 OSL_FAIL(
"SvxShape::addVetoableChangeListener: don't have any vetoable properties, so why ...?" );
1361 OSL_FAIL(
"SvxShape::removeVetoableChangeListener: don't have any vetoable properties, so why ...?" );
1401 if( !pBitmapList.is() )
1408 const XBitmapEntry* pEntry = pBitmapList->GetBitmap(nPos);
1417 if( !pGradientList.is() )
1426 rSet.
Put( aGrdItem );
1433 if( !pHatchList.is() )
1440 const XHatchEntry* pEntry = pHatchList->GetHatch( nPos );
1442 rSet.
Put( aHatchItem );
1450 if( !pLineEndList.is() )
1457 const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nPos);
1461 rSet.
Put( aLEItem );
1466 rSet.
Put( aLSItem );
1475 if( !pDashList.is() )
1482 const XDashEntry* pEntry = pDashList->GetDash(nPos);
1484 rSet.
Put( aDashItem );
1500 if (aName.isEmpty())
1530 if( pItem->
GetName() == aName )
1545 mpImpl->mpMaster->setPropertyValue( rPropertyName, rVal );
1565 if (pMap && pMap->
nWID)
1578 if (rPropertyName ==
"HandlePathObjScale")
1583 bool bHandleScale{};
1584 if (rVal >>= bHandleScale)
1595 SAL_WARN_IF(rPropertyName !=
"FromWordArt" && rPropertyName !=
"GraphicColorMode",
1596 "svx.uno",
"Unknown Property: " << rPropertyName);
1597 throw beans::UnknownPropertyException( rPropertyName, static_cast<cppu::OWeakObject*>(
this));
1600 if ((pMap->
nFlags & beans::PropertyAttribute::READONLY) != 0)
1601 throw beans::PropertyVetoException(
1602 "Readonly property can't be set: " + rPropertyName,
1603 uno::Reference<drawing::XShape>(
this));
1611 DBG_ASSERT( pMap->
nWID < OWN_ATTR_VALUE_START || pMap->
nWID > OWN_ATTR_VALUE_END,
"Not item property not handled!" );
1617 sal_Int32 nCornerRadius = 0;
1618 if( !(rVal >>= nCornerRadius) || (nCornerRadius < 0) || (nCornerRadius > 5000000))
1619 throw IllegalArgumentException();
1622 std::optional<SfxItemSet> xLocalSet;
1628 mpImpl->mxItemSet.emplace(
GetSdrObject()->GetProperties().CreateObjectSpecificItemSet(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool() ) );
1630 pSet = &*
mpImpl->mxItemSet;
1634 xLocalSet.emplace(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), pMap->
nWID, pMap->
nWID);
1656 pSet->
Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1683 return mpImpl->mpMaster->getPropertyValue( PropertyName );
1698 if(pMap ==
nullptr )
1699 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
1704 DBG_ASSERT( pMap->
nWID < OWN_ATTR_VALUE_START || pMap->
nWID > OWN_ATTR_VALUE_END,
"Not item property not handled!" );
1725 aSet.
Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
1737 if(pMap && pMap->
nWID)
1751 const sal_Int32
nCount = aPropertyNames.getLength();
1752 const OUString* pNames = aPropertyNames.getConstArray();
1764 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pNames++, pValues++ )
1770 catch (beans::UnknownPropertyException&)
1774 catch (uno::Exception&)
1782 uno::Reference< beans::XPropertySet > xSet;
1785 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pNames++, pValues++ )
1789 xSet->setPropertyValue( *pNames, *pValues );
1791 catch (beans::UnknownPropertyException&)
1795 catch (uno::Exception&)
1810 mpImpl->mxItemSet.reset();
1816 const sal_Int32
nCount = aPropertyNames.getLength();
1817 const OUString* pNames = aPropertyNames.getConstArray();
1819 uno::Sequence< uno::Any > aRet( nCount );
1820 uno::Any* pValue = aRet.getArray();
1824 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++, pNames++ )
1830 catch( uno::Exception& )
1832 OSL_FAIL(
"SvxShape::getPropertyValues, unknown property asked" );
1838 uno::Reference< beans::XPropertySet > xSet;
1841 for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++, pValue++, pNames++ )
1845 *pValue = xSet->getPropertyValue( *pNames );
1847 catch( uno::Exception& )
1849 OSL_FAIL(
"SvxShape::getPropertyValues, unknown property asked" );
1881 Degree100 nAngle = pPoolItem->GetValue();
1882 aAny <<= nAngle.
get();
1891 Degree100 nAngle = pPoolItem->GetValue();
1892 aAny <<= nAngle.
get();
1901 drawing::CircleKind eKind;
1905 eKind = drawing::CircleKind_FULL;
1908 eKind = drawing::CircleKind_CUT;
1911 eKind = drawing::CircleKind_ARC;
1914 eKind = drawing::CircleKind_SECTION;
1928 if( pMap->
aType != aAny.getValueType() )
1935 aAny <<= static_cast<sal_Int16>(
nValue);
1939 OSL_FAIL(
"SvxShape::GetAnyForItem() Returnvalue has wrong Type!" );
1955 return mpImpl->mpMaster->getPropertyState( PropertyName );
1970 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
1972 beans::PropertyState eState;
1979 case SfxItemState::SET:
1980 eState = beans::PropertyState_DIRECT_VALUE;
1982 case SfxItemState::DEFAULT:
1983 eState = beans::PropertyState_DEFAULT_VALUE;
1986 eState = beans::PropertyState_AMBIGUOUS_VALUE;
1991 if( beans::PropertyState_DIRECT_VALUE == eState )
1993 switch( pMap->
nWID )
2004 if( ( pItem ==
nullptr ) || pItem->
GetName().isEmpty() )
2005 eState = beans::PropertyState_DEFAULT_VALUE;
2019 if ( pItem ==
nullptr )
2020 eState = beans::PropertyState_DEFAULT_VALUE;
2029 eState = beans::PropertyState_DEFAULT_VALUE;
2037 eState = beans::PropertyState_DEFAULT_VALUE;
2045 eState = beans::PropertyState_DEFAULT_VALUE;
2057 switch( pProperty->
nWID )
2062 if( rValue >>= aPnt )
2064 Point aVclPoint( aPnt.X, aPnt.Y );
2092 drawing::HomogenMatrix3 aMatrix;
2093 if(rValue >>= aMatrix)
2101 aNewHomogenMatrix.
set(0, 0, aMatrix.Line1.Column1);
2102 aNewHomogenMatrix.
set(0, 1, aMatrix.Line1.Column2);
2103 aNewHomogenMatrix.
set(0, 2, aMatrix.Line1.Column3);
2104 aNewHomogenMatrix.
set(1, 0, aMatrix.Line2.Column1);
2105 aNewHomogenMatrix.
set(1, 1, aMatrix.Line2.Column2);
2106 aNewHomogenMatrix.
set(1, 2, aMatrix.Line2.Column3);
2107 aNewHomogenMatrix.
set(2, 0, aMatrix.Line3.Column1);
2108 aNewHomogenMatrix.
set(2, 1, aMatrix.Line3.Column2);
2109 aNewHomogenMatrix.
set(2, 2, aMatrix.Line3.Column3);
2123 sal_Int32 nNewOrdNum = 0;
2124 if(rValue >>= nNewOrdNum)
2135 awt::Rectangle aUnoRect;
2136 if(rValue >>= aUnoRect)
2138 Point aTopLeft( aUnoRect.X, aUnoRect.Y );
2139 Size aObjSize( aUnoRect.Width, aUnoRect.Height );
2153 if(rValue >>= bMirror )
2173 switch(pProperty->
nWID)
2178 Reference< drawing::XShape > xShape;
2179 if( rValue >>= xShape )
2195 awt::Point aUnoPoint;
2196 if( rValue >>= aUnoPoint )
2198 Point aPoint( aUnoPoint.X, aUnoPoint.Y );
2204 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2217 if( rValue >>= nId )
2229 if(
auto s = o3tl::tryAccess<drawing::PointSequenceSequence>(rValue) )
2235 else if(
auto cs = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(rValue) )
2242 if(aNewPolyPolygon.
count())
2246 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2263 awt::Point aUnoPoint;
2264 if(pMeasureObj && ( rValue >>= aUnoPoint ) )
2266 Point aPoint( aUnoPoint.X, aUnoPoint.Y );
2270 if(
GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
2282 drawing::BitmapMode
eMode;
2283 if(!(rValue >>= eMode) )
2285 sal_Int32 nMode = 0;
2286 if(!(rValue >>= nMode))
2289 eMode =
static_cast<drawing::BitmapMode
>(nMode);
2298 sal_Int16 nLayerId = sal_Int16();
2299 if( rValue >>= nLayerId )
2313 OUString aLayerName;
2314 if( rValue >>= aLayerName )
2317 if( pLayer !=
nullptr )
2328 if( rValue >>= nTmp )
2348 if( rValue >>= nTmp )
2373 if( rValue >>= bMoveProtect )
2383 if( rValue >>= aName )
2393 sal_Int16 nMaxScale = 0;
2394 if (rValue >>= nMaxScale)
2408 if( rValue >>= aTitle )
2417 OUString aDescription;
2418 if( rValue >>= aDescription )
2429 if( rValue >>= bPrintable )
2439 if( rValue >>= bVisible )
2448 bool bResizeProtect;
2449 if( rValue >>= bResizeProtect )
2458 sal_Int32 nPageNum = 0;
2459 if( (rValue >>= nPageNum) && ( nPageNum >= 0 ) && ( nPageNum <= 0xffff ) )
2466 const sal_uInt16 nDestinationPageNum(static_cast<sal_uInt16>((nPageNum << 1) - 1));
2468 if(nDestinationPageNum < rModel.GetPageCount())
2470 pNewPage = rModel.GetPage(nDestinationPageNum);
2491 if( rValue >>= aApiName )
2506 if (
auto pTextObj = dynamic_cast<SdrTextObj*>(
GetSdrObject()))
2508 css::uno::Reference<css::text::XTextColumns> xTextColumns;
2509 if (rValue >>= xTextColumns)
2512 if (css::uno::Reference<css::beans::XPropertySet> xPropSet{ xTextColumns,
2513 css::uno::UNO_QUERY })
2515 auto aVal = xPropSet->getPropertyValue(
"AutomaticDistance");
2516 if (sal_Int32 nSpacing; aVal >>= nSpacing)
2526 OUString sHyperlink;
2527 if (rValue >>= sHyperlink)
2541 OUString sExceptionMessage (
"IllegalArgumentException in SvxShape::setPropertyValueImpl."
2542 " Property Type: " + pProperty->
aType.getTypeName() +
" Property nWID: " + OUString::number(pProperty->
nWID)
2543 +
" Value Type: " + (rValue.hasValue() ? rValue.getValueTypeName() :
"void (no value)"));
2545 throw lang::IllegalArgumentException(sExceptionMessage,
nullptr, 1);
2551 switch( pProperty->
nWID )
2575 awt::Point aPnt( aVclPoint.X(), aVclPoint.Y() );
2585 drawing::HomogenMatrix3 aMatrix;
2591 aMatrix.Line1.Column1 = aNewHomogenMatrix.
get(0, 0);
2592 aMatrix.Line1.Column2 = aNewHomogenMatrix.
get(0, 1);
2593 aMatrix.Line1.Column3 = aNewHomogenMatrix.
get(0, 2);
2594 aMatrix.Line2.Column1 = aNewHomogenMatrix.
get(1, 0);
2595 aMatrix.Line2.Column2 = aNewHomogenMatrix.
get(1, 1);
2596 aMatrix.Line2.Column3 = aNewHomogenMatrix.
get(1, 2);
2597 aMatrix.Line3.Column1 = aNewHomogenMatrix.
get(2, 0);
2598 aMatrix.Line3.Column2 = aNewHomogenMatrix.
get(2, 1);
2599 aMatrix.Line3.Column3 = aNewHomogenMatrix.
get(2, 2);
2615 if(!rValue.hasValue())
2616 throw uno::RuntimeException();
2623 bool bIsFontwork =
false;
2626 rValue <<= bIsFontwork;
2637 css::awt::Rectangle aUnoRect(
2638 aTopLeft.X(), aTopLeft.Y(),
2639 aObjSize.getWidth(), aObjSize.getHeight() );
2640 rValue <<= aUnoRect;
2651 css::awt::Rectangle aUnoRect(
2652 aTopLeft.X(), aTopLeft.Y(),
2653 aObjSize.getWidth(), aObjSize.getHeight() );
2654 rValue <<= aUnoRect;
2670 sId = RID_UNODRAW_OLE2;
2674 sId = RID_UNODRAW_GRAPHICS;
2678 sId = RID_UNODRAW_OBJECTS;
2690 bool bMirror =
false;
2692 if (
auto pGrafObj = dynamic_cast<SdrGrafObj*>(
GetSdrObject()) )
2693 bMirror = pGrafObj->IsMirrored();
2710 switch(pProperty->
nWID)
2734 awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
2736 rValue <<= aUnoPoint;
2755 drawing::PolyPolygonBezierCoords aRetval;
2777 awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
2779 rValue <<= aUnoPoint;
2791 rValue <<= drawing::BitmapMode_REPEAT;
2795 rValue <<= drawing::BitmapMode_STRETCH;
2799 rValue <<= drawing::BitmapMode_NO_REPEAT;
2853 rValue <<= aDescription;
2875 sal_Int32 nPageNumber = pPage ? pPage->
GetPageNum() : 0;
2878 rValue <<= nPageNumber;
2908 bool bIsWMF =
false;
2912 if ( aLnk.
GetType() == GfxLinkType::NativeWmf )
2915 uno::Sequence<sal_Int8>
aSeq(reinterpret_cast<sal_Int8 const *>(aLnk.
GetData()), static_cast<sal_Int32>(aLnk.
GetDataSize()));
2925 const uno::Sequence<sal_Int8>
aSeq(
2926 static_cast< const sal_Int8* >(aDestStrm.GetData()),
2927 aDestStrm.GetEndOfData());
2941 if (
auto pTextObj = dynamic_cast<const SdrTextObj*>(
GetSdrObject()))
2946 css::uno::Reference<css::text::XTextColumns> xCols(xIf, css::uno::UNO_QUERY_THROW);
2948 css::uno::Reference<css::beans::XPropertySet> xProp(xIf, css::uno::UNO_QUERY_THROW);
2949 xProp->setPropertyValue(
"AutomaticDistance",
2979 rState = beans::PropertyState_DIRECT_VALUE;
2983 rState = beans::PropertyState_AMBIGUOUS_VALUE;
2986 else if((( pProperty->
nWID >= OWN_ATTR_VALUE_START && pProperty->
nWID <= OWN_ATTR_VALUE_END ) ||
2989 rState = beans::PropertyState_DIRECT_VALUE;
3008 else if((pProperty->
nWID >= OWN_ATTR_VALUE_START && pProperty->
nWID <= OWN_ATTR_VALUE_END ) ||
3022 const sal_Int32
nCount = aPropertyName.getLength();
3023 uno::Sequence< beans::PropertyState > aRet( nCount );
3025 std::transform(aPropertyName.begin(), aPropertyName.end(), aRet.getArray(),
3026 [
this](
const OUString& rName) -> beans::PropertyState {
return getPropertyState(rName); });
3036 mpImpl->mpMaster->setPropertyToDefault( PropertyName );
3051 throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(
this));
3066 return mpImpl->mpMaster->getPropertyDefault( aPropertyName );
3081 throw beans::UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(
this));
3083 if(( pMap->
nWID >= OWN_ATTR_VALUE_START && pMap->
nWID <= OWN_ATTR_VALUE_END ) ||
3091 throw beans::UnknownPropertyException(
"No WhichID " + OUString::number(pMap->
nWID) +
" for " + aPropertyName, static_cast<cppu::OWeakObject*>(
this));
3094 aSet.
Put(
GetSdrObject()->getSdrModelFromSdrObject().GetItemPool().GetDefaultItem(pMap->
nWID));
3105 throw lang::DisposedException();
3108 if(dynamic_cast<const SdrGrafObj*>(
GetSdrObject()) !=
nullptr)
3120 if( dynamic_cast<const E3dLatheObj* >(
GetSdrObject()) !=
nullptr|| dynamic_cast<const E3dExtrudeObj* >(
GetSdrObject()) !=
nullptr)
3129 const uno::Sequence<OUString>& aPropertyNames )
3131 for (
const auto& rPropertyName : aPropertyNames )
3136 const uno::Sequence<OUString>& aPropertyNames )
3138 ::std::vector<uno::Any> ret;
3139 ret.reserve(aPropertyNames.getLength());
3140 std::transform(aPropertyNames.begin(), aPropertyNames.end(), std::back_inserter(ret),
3142 return uno::Sequence<uno::Any>( ret.data(), ret.size() );
3202 return mpImpl->mpMaster->getSupportedServiceNames();
3222 static const uno::Sequence<OUString> aSvxShape_GroupServices
3224 sUNO_service_drawing_Shape };
3225 return aSvxShape_GroupServices;
3229 static const uno::Sequence<OUString> aSvxShape_CustomShapeServices
3244 sUNO_service_drawing_RotationDescriptor };
3245 return aSvxShape_CustomShapeServices;
3249 static const uno::Sequence<OUString> aSvxShape_LineServices
3266 sUNO_service_drawing_RotationDescriptor };
3267 return aSvxShape_LineServices;
3272 static const uno::Sequence<OUString> aSvxShape_RectServices
3288 sUNO_service_drawing_RotationDescriptor };
3289 return aSvxShape_RectServices;
3297 static const uno::Sequence<OUString> aSvxShape_CircServices
3314 sUNO_service_drawing_RotationDescriptor };
3315 return aSvxShape_CircServices;
3321 static const uno::Sequence<OUString> aSvxShape_PathServices
3339 sUNO_service_drawing_RotationDescriptor };
3340 return aSvxShape_PathServices;
3346 static const uno::Sequence<OUString> aSvxShape_PolyServices
3365 sUNO_service_drawing_RotationDescriptor };
3366 return aSvxShape_PolyServices;
3372 static const uno::Sequence<OUString> aSvxShape_FreeLineServices
3391 sUNO_service_drawing_RotationDescriptor };
3392 return aSvxShape_FreeLineServices;
3398 static const uno::Sequence<OUString> aSvxShape_FreeFillServices
3417 sUNO_service_drawing_RotationDescriptor };
3418 return aSvxShape_FreeFillServices;
3425 static const uno::Sequence<OUString> aSvxShape_TextServices
3442 sUNO_service_drawing_RotationDescriptor };
3443 return aSvxShape_TextServices;
3448 static const uno::Sequence<OUString> aSvxShape_GrafServices
3463 sUNO_service_drawing_RotationDescriptor};
3464 return aSvxShape_GrafServices;
3469 static const uno::Sequence<OUString> aSvxShape_Ole2Services
3484 sUNO_service_drawing_RotationDescriptor };
3485 return aSvxShape_Ole2Services;
3490 static const uno::Sequence<OUString> aSvxShape_CaptionServices
3507 sUNO_service_drawing_RotationDescriptor };
3508 return aSvxShape_CaptionServices;
3513 static const uno::Sequence<OUString> aSvxShape_PageServices
3515 sUNO_service_drawing_Shape };
3516 return aSvxShape_PageServices;
3521 static const uno::Sequence<OUString> aSvxShape_MeasureServices
3540 sUNO_service_drawing_RotationDescriptor };
3541 return aSvxShape_MeasureServices;
3546 static const uno::Sequence<OUString> aSvxShape_FrameServices
3548 sUNO_service_drawing_Shape };
3549 return aSvxShape_FrameServices;
3554 static const uno::Sequence<OUString> aSvxShape_UnoServices
3556 sUNO_service_drawing_Shape };
3557 return aSvxShape_UnoServices;
3562 static const uno::Sequence<OUString> aSvxShape_EdgeServices
3580 sUNO_service_drawing_RotationDescriptor };
3581 return aSvxShape_EdgeServices;
3585 static const uno::Sequence<OUString> aSvxShape_MediaServices
3587 sUNO_service_drawing_Shape };
3588 return aSvxShape_MediaServices;
3595 #if OSL_DEBUG_LEVEL > 0
3597 OSL_ENSURE( nIdent ==
SdrObjKind::UNO,
"SvxShape::_getSupportedServiceNames: SdrInventor::FmForm, but no UNO object?" );
3599 static const uno::Sequence<OUString> aSvxShape_UnoServices
3601 sUNO_service_drawing_Shape };
3602 return aSvxShape_UnoServices;
3604 OSL_FAIL(
"SvxShape::_getSupportedServiceNames: could not determine object type!" );
3605 uno::Sequence< OUString >
aSeq;
3618 uno::Reference< container::XIndexContainer > xGluePoints(
mxGluePoints );
3635 if(
nullptr != pSdrObject)
3639 if(
nullptr != pParentSdrObjList)
3649 if(
nullptr != pParentSdrObject)
3658 if(
nullptr != pParentSdrPage)
3669 OSL_FAIL(
"SvxShape::getParent( ): unexpected Parent SdrObjList" );
3674 return uno::Reference<uno::XInterface>();
3679 throw lang::NoSupportException();
3749 sal_Int16 nOldLocks =
static_cast<sal_Int16
>(
mnLockCount);
3763 switch(
mpImpl->mnObjId )
3777 if( nId !=
mpImpl->mnObjId )
3808 "svx::SvxShapeText::~SvxShapeText(), text shape with living text ranges destroyed!");
3840 return "SvxShapeText";
3864 const sal_Int64 nReturn = SvxShape::getSomething( rId );
3868 return SvxUnoTextBase::getSomething( rId );
3874 return css::uno::Sequence<sal_Int8>();
3883 pEditSource->
lock();
3947 css::text::WritingMode
eMode;
3948 if( rValue >>= eMode )
3964 rValue <<= css::text::WritingMode_TB_RL;
3966 rValue <<= css::text::WritingMode_LR_TB;
4012 uno::Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY );
4019 SvxShape* pSvxShape = comphelper::getFromUnoTunnel<SvxShape>( xInt );
4020 return pSvxShape ? pSvxShape->
GetSdrObject() :
nullptr;
4025 if(!pMap || !pMap->
nWID)
4035 if(!pMap || !pMap->
nWID)
void TakeNotPersistAttr(SfxItemSet &rAttr) 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
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
constexpr OUStringLiteral sUNO_service_drawing_CaptionShape
uno::Reference< drawing::XShape > GetXShapeForSdrObject(SdrObject *pObj) noexcept
returns a StarOffice API wrapper for the given SdrObject
uno::Any SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
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 provider for a property value.
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
SvxItemPropertySetUsrAnys maUrsAnys
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
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
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
SVXCORE_DLLPUBLIC SvxShapeRect(SdrObject *pObj)
constexpr OUStringLiteral sUNO_service_drawing_LineShape
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
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
SAL_WARN_UNUSED_RESULT 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
constexpr OUStringLiteral sUNO_service_drawing_MeasureProperties
bool AreThereOwnUsrAnys() const
void setHyperlink(const OUString &sHyperlink)
::comphelper::OInterfaceContainerHelper3< css::lang::XEventListener > maDisposeListeners
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue)
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)
css::uno::Any getPropertyValue(const SfxItemPropertyMapEntry *pMap, SvxItemPropertySetUsrAnys &rAnys) const
void SetMirrored(bool _bMirrored)
virtual bool getPropertyStateImpl(const SfxItemPropertyMapEntry *pProperty, css::beans::PropertyState &rState) override
constexpr TypedWhichId< SdrObjPrintableItem > SDRATTR_OBJPRINTABLE(SDRATTR_NOTPERSIST_FIRST+2)
#define OWN_ATTR_TEXTCOLUMNS
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
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
static bool svx_needLogicRectHack(SdrObject const *pObj)
periodic cubic Spline (ni)
SdrObject * GetObj(size_t nNum) const
const css::uno::WeakReference< css::drawing::XShape > & getWeakUnoShape() const
size_t GetObjCount() const
virtual void SAL_CALL setActionLocks(sal_Int16 nLock) override
virtual OUString SAL_CALL getName() override
continuously activated OLE (PlugIn-Frame or similar)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
#define OWN_ATTR_MISC_OBJ_DESCRIPTION
XDashListRef GetDashList() const
mutable::osl::Mutex m_aMutex
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
void SetHandleScale(bool bHandleScale)
Scaling is ignored from the transform matrix by default, to not break compatibility.
virtual OUString TakeObjNameSingul() const
const OUString & getHyperlink() 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)
abstract object (SdrObject)
virtual void SAL_CALL setString(const OUString &aString) override
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
void SetTextColumnsSpacing(sal_Int32 nSpacing)
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
constexpr TypedWhichId< SdrMetricItem > SDRATTR_CORNER_RADIUS(SDRATTR_MISC_FIRST+0)
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
css::uno::Reference< css::uno::XInterface > SvxXTextColumns_createInstance() noexcept
sal_Int16 GetLumOff() const
#define OWN_ATTR_FILLBMP_MODE
virtual css::awt::Size SAL_CALL getSize() override
const sal_uInt8 * GetData() const
#define OWN_ATTR_UINAME_SINGULAR
void setShapeKind(SdrObjKind nKind)
SvxShapeImpl(SvxShape &_rAntiImpl,::osl::Mutex &_rMutex)
css::uno::WeakReference< css::container::XIndexContainer > mxGluePoints
sdr::contact::ViewContact & GetViewContact() const
void ConnectToNode(bool bTail1, SdrObject *pObj) override
virtual void SetGrabBagItem(const css::uno::Any &rVal)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
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
virtual bool setPropertyToDefaultImpl(const SfxItemPropertyMapEntry *pProperty) override
constexpr tools::Long Width() const
std::size_t GetEndOfData() const
void ForceMetricToItemPoolMetric(Pair &rPoint) const noexcept
void SetExistingObjectOrdNum(SdrObject *pExistingObj, size_t nNewObjNum)
Modify ZOrder of an SdrObject, object must already be in the list.
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)
const XGradient & GetGradient() const
const B2DVector & getTranslate() const
UNOTOOLS_DLLPUBLIC bool GetTitle(OUString const &url, OUString *title)
SvxThemeColor & GetThemeColor()
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
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
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...
#define MID_COLOR_THEME_INDEX
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
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
std::optional< SfxItemSet > mxItemSet
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet &rPropSet, SvxItemPropertySetUsrAnys &rAnys, SfxItemSet &rSet, const uno::Reference< beans::XPropertySet > &xSet, const SfxItemPropertyMap *pMap)
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
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 gluepoint for a connection nId == -1 : The best default point...
const XDash & GetDash() const
virtual OUString GetName() const override
constexpr TypedWhichId< SdrAngleItem > SDRATTR_ROTATEANGLE(SDRATTR_NOTPERSIST_FIRST+16)
void SetMoveProtect(bool bProt)
constexpr OUStringLiteral sUNO_service_drawing_PageShape
constexpr OUStringLiteral sUNO_service_drawing_FrameShape
virtual void SetChanged(bool bFlg=true)
virtual ~SvxShapeRect() noexcept override
void SetTextColumnsNumber(sal_Int16 nColumns)
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
natural cubic Spline (ni)
SdrLayer * GetLayer(sal_uInt16 i)
bool HasSdrObject() const
SdrObject * GetConnectedNode(bool bTail1) const 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)
const css::uno::Sequence< sal_Int8 > & getSeq() const
bool mbHasSdrObjectOwnership
foreign graphic (StarView Graphic)
virtual OUString SAL_CALL getImplementationName() override
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
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 ~SvxShapeText() noexcept override
#define DBG_UNHANDLED_EXCEPTION(...)
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
Polygon/PolyPolygon represented by SdrPathObj.
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.
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)
css::uno::Any GetAnyForItem(SfxItemSet const &aSet, const SfxItemPropertyMapEntry *pMap) const
void BroadcastObjectChange() const
constexpr sal_uInt16 SDRATTR_NOTPERSIST_FIRST(SDRATTR_CIRC_LAST+1)
virtual void SAL_CALL setSize(const css::awt::Size &aSize) override
static OUString getNameFromId(SdrObjKind nId)
virtual Degree100 GetShearAngle(bool bVertical=false) const
const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rName) const
SdrObjKind getShapeKind() const
virtual Point GetPoint(sal_uInt32 i) const override
#define OWN_ATTR_HYPERLINK
#define OWN_ATTR_GLUEID_HEAD
constexpr TypedWhichId< SdrObjVisibleItem > SDRATTR_OBJVISIBLE(SDRATTR_NOTPERSIST_FIRST+35)
const OUString & GetName() const
TitleText, special text object for StarDraw.
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
XGradientListRef GetGradientList() const
Universal Network Object packed into SvDraw object.
SdrModel & getSdrModelFromSdrObject() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) noexcept override
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...
sal_Int16 GetTextColumnsNumber() const
SdrLayer * GetLayerPerID(SdrLayerID nID)
sal_uInt16 GetFontScaleY() const
constexpr OUStringLiteral sUNO_service_drawing_ConnectorShape
bool mbIsMultiPropertyCall
void SetVisible(bool bVisible)
o3tl::strong_int< sal_Int16, struct SdrLayerIDTag > SdrLayerID
virtual void SetLogicRect(const tools::Rectangle &rRect)
virtual void Move(const Size &rSiz)
css::uno::Type const & get()
void SetMergedItem(const SfxPoolItem &rItem)
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)
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &_rxUnoShape)
Sets a new UNO representation of the shape.
constexpr OUStringLiteral sUNO_service_drawing_TextShape
Polyline represented by SdrPathObj.
virtual SdrInventor GetObjInventor() const
constexpr TypedWhichId< SdrYesNoItem > SDRATTR_OBJSIZEPROTECT(SDRATTR_NOTPERSIST_FIRST+1)
#define MID_COLOR_LUM_OFF
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Any GetBitmap(bool bMetaFile=false) const
virtual SdrLayerID GetLayer() const
void endSetPropertyValues()
bool HasTextColumnsNumber() const
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
constexpr OUStringLiteral sUNO_service_drawing_MeasureShape
virtual bool getPropertyStateImpl(const SfxItemPropertyMapEntry *pProperty, css::beans::PropertyState &rState)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
constexpr OUStringLiteral sUNO_service_drawing_GraphicObjectShape
const basegfx::B2DPolyPolygon & GetLineEnd() const
rectangle (round corners optional)
constexpr OUStringLiteral sUNO_service_drawing_ConnectorProperties
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual void SAL_CALL removeActionLock() override
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
void SetReferencedPage(SdrPage *pNewPage)
css::uno::Any * GetUsrAnyForID(SfxItemPropertyMapEntry const &entry) const
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
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
void ForceMetricTo100th_mm(Pair &rPoint) const noexcept
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
constexpr tools::Long Height() const
css::uno::Any _getPropertyValue(const OUString &PropertyName)
static void svx_setLogicRectHack(SdrObject *pObj, const tools::Rectangle &rRect)
constexpr OUStringLiteral sUNO_service_drawing_RotationDescriptor
virtual void GetDescription(OUString &rName) override
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
constexpr o3tl::Length MapToO3tlLength(MapUnit eU, o3tl::Length ePixelValue=o3tl::Length::px)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
::tools::WeakReference< SdrObject > mpSdrObjectWeakReference
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
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SdrObject * GetSdrObject() const
void SetDescription(const OUString &rStr)
const o3tl::sorted_vector< const SfxItemPropertyMapEntry *, SfxItemPropertyMapCompare > & getPropertyEntries() 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
void SetPrefSize(const Size &rPrefSize)
void SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const uno::Any &rVal, SfxItemSet &rSet)
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)
#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER
XBitmapListRef GetBitmapList() const
sal_Int16 GetThemeIndex() const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() 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
bool HasTextColumnsSpacing() const
void SetEdgeTrackPath(const basegfx::B2DPolyPolygon &rPoly)
sal_uInt32 GetDataSize() const
OUString const & GetName() const
sal_Int32 getGluePointIndex(bool bTail)
this method is used by the api to return a gluepoint id for a connection.
void B2DPolyPolygonToUnoPolyPolygonBezierCoords(const B2DPolyPolygon &rPolyPolygon, css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsRetval)
#define MID_COLOR_LUM_MOD
virtual bool setPropertyToDefaultImpl(const SfxItemPropertyMapEntry *pProperty)
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
static void setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet, bool bDontConvertNegativeValues)
#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...
sal_Int32 GetTextColumnsSpacing() const
const SfxItemPropertyMap & getPropertyMap() const
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
virtual OUString SAL_CALL getShapeType() override
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)
const SdrLayerAdmin & GetLayerAdmin() const
helper class for notifying XPropertyChangeListeners
virtual void SetChanged()
SvxUnoPropertyMapProvider & getSvxMapProvider()
#define OWN_ATTR_MEASURE_START_POS
sal_uInt16 mnLockCount
used from the XActionLockable interface
constexpr OUStringLiteral sUNO_service_drawing_EllipseShape
sal_uInt16 GetPageNum() 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
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
constexpr TypedWhichId< SvXMLAttrContainerItem > SDRATTR_XMLATTRIBUTES(SDRATTR_MISC_FIRST+22)
bool HasSdrObjectOwnership() const
BitmapEx convertPrimitive2DContainerToBitmapEx(primitive2d::Primitive2DContainer &&rSequence, const basegfx::B2DRange &rTargetRange, sal_uInt32 nMaximumQuadraticPixels, const o3tl::Length eTargetUnit, const std::optional< Size > &rTargetDPI)
SdrObjUserCall * GetUserCall() const
virtual SdrObject * getSdrObjectFromSdrObjList() const
const OUString & GetName() 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)
sal_Int16 GetLumMod() const
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
virtual void getCurrentValue(css::uno::Any &_out_rValue) const
returns the current value of the property which the provider is responsible for
virtual ~SvxShape() noexcept override
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
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue)
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...